diff --git "a/data/train/cpp-000.jsonl" "b/data/train/cpp-000.jsonl" --- "a/data/train/cpp-000.jsonl" +++ "b/data/train/cpp-000.jsonl" @@ -1,362 +1,424 @@ -{"question_id": 1, "task_id": "two-sum", "difficulty": "Easy", "problem_description": "Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.\nYou may assume that each input would have exactly one solution, and you may not use the same element twice.\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\n \nConstraints:\n\n2 <= nums.length <= 104\n-109 <= nums[i] <= 109\n-109 <= target <= 109\nOnly one valid answer exists.\n\n \nFollow-up: Can you come up with an algorithm that is less than O(n2) time complexity?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [3, 3],target = 6) == [0, 1]\n assert candidate(nums = [-1, -2, -3, -4],target = -8) == None\n assert candidate(nums = [1000000000, 1000000000],target = 2000000000) == [0, 1]\n assert candidate(nums = [1, 5, 7, 9],target = 10) == [0, 3]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 3) == [0, 1]\n assert candidate(nums = [0, 4, 3, 0],target = 0) == [0, 3]\n assert candidate(nums = [1000000000, -1000000000, 500000000, -500000000],target = 0) == [0, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 17) == [7, 8]\n assert candidate(nums = [1, 5, 7, 8],target = 15) == [2, 3]\n assert candidate(nums = [1000000000, -1000000000],target = 0) == [0, 1]\n assert candidate(nums = [2, 7, 11, 15],target = 9) == [0, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 19) == [8, 9]\n assert candidate(nums = [1, 5, 7, 11],target = 16) == [1, 3]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 10) == [0, 1]\n assert candidate(nums = [3, 2, 4],target = 6) == [1, 2]\n assert candidate(nums = [15, 11, 7, 2],target = 9) == [2, 3]\n assert candidate(nums = [1000000000, -1000000000, 2000000000, -2000000000],target = 0) == [0, 1]\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],target = 4000) == [18, 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, 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 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 candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = 0) == [4, 6]\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],target = -150) == [6, 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],target = -39) == [18, 19]\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],target = 110) == [26, 28]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [-1000000000, -2000000000, -3000000000, -4000000000, -5000000000, -6000000000, -7000000000, -8000000000, -9000000000, -10000000000],target = -15000000000) == [6, 7]\n assert candidate(nums = [23, 8, 15, 37, 48, 5, 21, 7, 40, 6],target = 33) == None\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 = 390) == [18, 19]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1500) == [6, 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],target = 21) == [9, 10]\n assert candidate(nums = [2, 5, 1, 9, 3, 8, 7, 6, 4, 0],target = 17) == [3, 5]\n assert candidate(nums = [1000000000, -1000000000, 500000000, 500000000],target = 0) == [0, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 29) == [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 = 38) == [17, 19]\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 = 78) == None\n assert candidate(nums = [-1000000000, 1000000000, 500000000, -500000000],target = 0) == [0, 1]\n assert candidate(nums = [1000000000, 999999999, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 1999999999) == [0, 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],target = 300) == [13, 15]\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 = 100) == [24, 25]\n assert candidate(nums = [5, 12, 7, 3, 9, 14, 10, 23, 1, 11],target = 22) == [1, 6]\n assert candidate(nums = [-3, 4, 3, 90, -11, 23, -5, 67, 100, -45, 89],target = 53) == None\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],target = -199) == [98, 99]\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],target = 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, 1, 1, 1, 2],target = 3) == [23, 24]\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, 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 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 candidate(nums = [123456789, 987654321, 456789123, 321987654, 654321987, 789123456],target = 1111111110) == [0, 1]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [0, 1]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -11) == [4, 5]\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992],target = 1999999997) == [0, 1]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -15) == [6, 7]\n assert candidate(nums = [1000000000, -1000000000, 500000000, 500000000, -500000000, -500000000, 1, 2, 3, 4],target = 0) == [0, 1]\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],target = 2000000000) == [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, 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 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 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 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 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 candidate(nums = [1000000000, -500000000, 2000000000, -1000000000, 0, 500000000],target = 1000000000) == [2, 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],target = 99) == [48, 49]\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],target = 49) == [23, 24]\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990],target = 1999999989) == [4, 5]\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],target = 513) == [0, 9]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -18) == [7, 9]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],target = 1300) == [5, 6]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -17) == [7, 8]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1900) == [8, 9]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [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],target = 79) == None\n assert candidate(nums = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000],target = 30000000000) == None\n assert candidate(nums = [-3, -1, 0, 2, 5, 7, 8, 10],target = 4) == [1, 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, 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 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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().twoSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector twoSum(vector& nums, int target) {", "container": "Solution", "callable": "twoSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 2, "task_id": "add-two-numbers", "difficulty": "Medium", "problem_description": "You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.\nYou may assume the two numbers do not contain any leading zero, except the number 0 itself.\n \nExample 1:\n\n\nInput: l1 = [2,4,3], l2 = [5,6,4]\nOutput: [7,0,8]\nExplanation: 342 + 465 = 807.\n\nExample 2:\n\nInput: l1 = [0], l2 = [0]\nOutput: [0]\n\nExample 3:\n\nInput: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]\nOutput: [8,9,9,9,0,0,0,1]\n\n \nConstraints:\n\nThe number of nodes in each linked list is in the range [1, 100].\n0 <= Node.val <= 9\nIt is guaranteed that the list represents a number that does not have leading zeros.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(l1 = list_node([9, 8, 7]),l2 = list_node([1, 2, 3])), list_node([0, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([5, 6, 4])), list_node([6, 6, 4, 0, 0, 0, 0, 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 is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([5, 6, 4])), list_node([6, 6, 4, 0, 0, 0, 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 is_same_list(candidate(l1 = list_node([2, 4, 3]),l2 = list_node([5, 6, 4, 1])), list_node([7, 0, 8, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([9, 8, 7, 6, 5])), list_node([0, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([5, 5, 5]),l2 = list_node([5, 5, 5, 5, 5])), list_node([0, 1, 1, 6, 5]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9]),l2 = list_node([9, 9, 9, 9])), list_node([8, 9, 9, 9, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9])), list_node([0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0]),l2 = list_node([9, 9, 9, 9])), list_node([0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),l2 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9])), list_node([0, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 8, 9]),l2 = list_node([0, 0, 9])), list_node([1, 8, 8, 1]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 3]),l2 = list_node([5, 6, 4])), list_node([7, 0, 8]))\n assert is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([5, 6, 4])), list_node([6, 6, 4, 0, 0, 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 is_same_list(candidate(l1 = list_node([2, 4, 6]),l2 = list_node([1, 3, 5])), list_node([3, 7, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 1, 1]),l2 = list_node([9, 9, 9])), list_node([0, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 8]),l2 = list_node([0])), list_node([1, 8]))\n assert is_same_list(candidate(l1 = list_node([1, 8]),l2 = list_node([0])), list_node([1, 8]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([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])), list_node([5, 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]))\n assert is_same_list(candidate(l1 = list_node([1, 8, 9]),l2 = list_node([9, 1])), list_node([0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([7, 2, 4, 3]),l2 = list_node([5, 6, 4])), list_node([2, 9, 8, 3]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([1, 2, 3, 4, 5])), list_node([2, 2, 3, 4, 5]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([6, 4, 5]),l2 = list_node([0, 4, 5])), list_node([6, 8, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([5]),l2 = list_node([5])), list_node([0, 1]))\n assert is_same_list(candidate(l1 = list_node([7, 2, 4, 3]),l2 = list_node([5, 6, 4, 2])), list_node([2, 9, 8, 5]))\n assert is_same_list(candidate(l1 = list_node([1, 2]),l2 = list_node([3, 4, 5, 6])), list_node([4, 6, 5, 6]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9]),l2 = list_node([1])), list_node([0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([9, 9]),l2 = list_node([1])), list_node([0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9])), list_node([0, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([9, 8, 7])), list_node([0, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([7, 8, 9])), list_node([8, 0, 3, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),l2 = list_node([5, 6, 4])), list_node([6, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([4, 5, 6])), list_node([5, 7, 9]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([5, 4, 3, 2, 1])), list_node([6, 6, 6, 6, 6]))\n assert is_same_list(candidate(l1 = list_node([0, 0, 1]),l2 = list_node([0, 0, 1])), list_node([0, 0, 2]))\n assert is_same_list(candidate(l1 = list_node([9, 9]),l2 = list_node([1, 1, 1])), list_node([0, 1, 2]))\n assert is_same_list(candidate(l1 = list_node([6, 4, 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, 1]),l2 = list_node([3, 4, 2])), list_node([9, 8, 7, 0, 0, 0, 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 is_same_list(candidate(l1 = list_node([9]),l2 = list_node([1])), list_node([0, 1]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0]),l2 = list_node([1])), list_node([2, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([4, 5, 6])), list_node([5, 7, 9]))\n assert is_same_list(candidate(l1 = list_node([1, 8, 9]),l2 = list_node([2, 5, 8])), list_node([3, 3, 8, 1]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9]),l2 = list_node([9, 9, 9, 9])), list_node([8, 9, 9, 9, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([3, 2, 1]),l2 = list_node([9, 8, 7])), list_node([2, 1, 9]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),l2 = list_node([5, 6, 4])), list_node([6, 6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([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, 6])), list_node([6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([1, 2, 3, 4, 5])), list_node([2, 4, 6, 8, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([0]),l2 = list_node([0])), list_node([0]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 9]),l2 = list_node([5, 6, 4, 9])), list_node([7, 0, 4, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 3]),l2 = list_node([5, 6, 4])), list_node([7, 0, 8]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 3, 2, 5, 5, 5]),l2 = list_node([5, 6, 4])), list_node([7, 0, 8, 2, 5, 5, 5]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0]),l2 = list_node([9, 9, 9, 9, 9])), list_node([0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 6, 8]),l2 = list_node([1, 3, 5, 7])), list_node([3, 7, 1, 6, 1]))\n assert is_same_list(candidate(l1 = list_node([9]),l2 = list_node([1, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]))\n assert is_same_list(candidate(l1 = list_node([0, 1]),l2 = list_node([0, 1])), list_node([0, 2]))\n assert is_same_list(candidate(l1 = list_node([7, 1, 6]),l2 = list_node([5, 9, 2])), list_node([2, 1, 9]))\n"}, "metadata": {"canonical_parameter_names": ["l1", "l2"], "leetcode_dataset_entry_point": "Solution().addTwoNumbers", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {", "container": "Solution", "callable": "addTwoNumbers", "parameters": [{"name": "l1", "type": "ListNode*"}, {"name": "l2", "type": "ListNode*"}], "return_type": "ListNode*", "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 repeating characters.\n \nExample 1:\n\nInput: s = \"abcabcbb\"\nOutput: 3\nExplanation: The answer is \"abc\", with the length of 3.\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\n \nConstraints:\n\n0 <= s.length <= 5 * 104\ns consists of English letters, digits, symbols and spaces.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().lengthOfLongestSubstring", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int lengthOfLongestSubstring(string s) {", "container": "Solution", "callable": "lengthOfLongestSubstring", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\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\n \nConstraints:\n\nnums1.length == m\nnums2.length == n\n0 <= m <= 1000\n0 <= n <= 1000\n1 <= m + n <= 2000\n-106 <= nums1[i], nums2[i] <= 106\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [100, 200, 300],nums2 = [150, 250, 350]) == 225.0\n assert candidate(nums1 = [2],nums2 = []) == 2.0\n assert candidate(nums1 = [1, 3],nums2 = [2]) == 2.0\n assert candidate(nums1 = [1],nums2 = [2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5.5\n assert candidate(nums1 = [1000000],nums2 = [-1000000]) == 0.0\n assert 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 candidate(nums1 = [1, 3, 5, 7],nums2 = [2, 4, 6, 8]) == 4.5\n assert candidate(nums1 = [10, 20, 30],nums2 = [5, 15, 25, 35, 45]) == 22.5\n assert candidate(nums1 = [0, 0],nums2 = [0, 0]) == 0.0\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]) == 10.5\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10]) == 5.5\n assert candidate(nums1 = [1, 2, 3],nums2 = [0, 4, 5, 6]) == 3.0\n assert candidate(nums1 = [5, 6],nums2 = [1, 2, 3, 4, 7, 8]) == 4.5\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [2, 4, 6, 8, 10]) == 5.0\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6],nums2 = [0]) == 3.0\n assert candidate(nums1 = [1, 2, 3],nums2 = [4]) == 2.5\n assert candidate(nums1 = [1, 2],nums2 = [3]) == 2.0\n assert candidate(nums1 = [1, 3, 5],nums2 = [2, 4, 6]) == 3.5\n assert candidate(nums1 = [1],nums2 = [2, 3, 4]) == 2.5\n assert candidate(nums1 = [1, 2],nums2 = [3, 4]) == 2.5\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [5, 15, 25, 35, 45]) == 27.5\n assert candidate(nums1 = [],nums2 = [1]) == 1.0\n assert 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 candidate(nums1 = [1000000, 1000001, 1000002, 1000003, 1000004],nums2 = [999999, 1000000, 1000005, 1000010]) == 1000002.0\n assert candidate(nums1 = [-1000000, -999999, -999998],nums2 = [-1000001, -999997, -999995, -999993, -999991]) == -999997.5\n assert 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 candidate(nums1 = [-5, -3, -1],nums2 = [-6, -4, -2, 0]) == -3.0\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-7, -3, 2, 7, 12]) == 1.0\n assert 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 candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10]) == 8.0\n assert candidate(nums1 = [-1000000],nums2 = [0, 1000000]) == 0.0\n assert 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 candidate(nums1 = [-10, -9, -8, -7, -6],nums2 = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == -2.5\n assert 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 candidate(nums1 = [1],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 15.0\n assert candidate(nums1 = [1, 5, 9, 13],nums2 = [2, 6, 10, 14, 18]) == 9.0\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 8.0\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 8.0\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]) == 0.0\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]) == 10.5\n assert candidate(nums1 = [-5, -3, -1, 1, 3, 5],nums2 = [-6, -4, -2, 0, 2, 4, 6]) == 0.0\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10, 12, 14, 16]) == 7.0\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]) == 10.5\n assert candidate(nums1 = [1],nums2 = [1000000]) == 500000.5\n assert candidate(nums1 = [5, 15, 25, 35, 45],nums2 = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 37.5\n assert 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 candidate(nums1 = [-1000000, -999999, -999998],nums2 = [-1000001, -1000000, -999999, -999998]) == -999999.0\n assert 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 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 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 candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15],nums2 = [2, 4, 6, 8, 10, 12, 14, 16]) == 8.5\n assert 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 candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [0, 2, 4, 6, 8]) == 4.5\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [5, 15, 25, 35, 45, 55]) == 55.0\n assert 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 candidate(nums1 = [],nums2 = [1, 3, 5, 7, 9]) == 5.0\n assert 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 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [50, 150, 250, 350, 450, 550]) == 300.0\n assert 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [5, 15, 25, 35, 45, 55]) == 30.0\n assert candidate(nums1 = [1, 2, 3],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4.0\n assert candidate(nums1 = [-1, -3, -5, -7, -9],nums2 = [-2, -4, -6, -8, -10]) == -5.5\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11],nums2 = [2, 4, 6, 8, 10, 12]) == 6.5\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [50, 150, 250, 350, 450, 550, 650]) == 325.0\n assert 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 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 candidate(nums1 = [-10, -8, -6, -4, -2],nums2 = [-9, -7, -5, -3, -1]) == -5.5\n assert candidate(nums1 = [1000000],nums2 = [999999]) == 999999.5\n assert candidate(nums1 = [-5, -3, -1, 1, 3],nums2 = [-10, -8, -6, -4, -2]) == -3.5\n assert candidate(nums1 = [],nums2 = [1, 2, 3, 4, 5]) == 3.0\n assert candidate(nums1 = [1, 5, 9, 13, 17],nums2 = [2, 6, 10, 14, 18]) == 9.5\n assert candidate(nums1 = [1000000, 1000001, 1000002],nums2 = [999999, 1000000, 1000001, 1000002]) == 1000001.0\n assert candidate(nums1 = [100000, 100001, 100002, 100003, 100004],nums2 = [100005, 100006, 100007, 100008, 100009]) == 100004.5\n assert candidate(nums1 = [-5, -4, -3, -2, -1],nums2 = [0, 1, 2, 3, 4, 5]) == 0.0\n assert candidate(nums1 = [100000],nums2 = [-100000, -99999, -99998, -99997, -99996, -99995]) == -99997.0\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = []) == 5.5\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = []) == 3.0\n assert 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 candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10]) == 5.5\n assert candidate(nums1 = [],nums2 = [1, 2, 3, 4, 5]) == 3.0\n assert candidate(nums1 = [-5, -3, 0, 8],nums2 = [-10, -4, 2, 6, 12]) == 0.0\n assert 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 candidate(nums1 = [-1, 3, 5, 7, 9],nums2 = [-2, -4, -6, -8, -10]) == -5.5\n assert 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 candidate(nums1 = [1, 2, 2, 3, 3],nums2 = [2, 2, 3, 3, 4, 4, 5, 5]) == 3.0\n assert candidate(nums1 = [100, 200, 300],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 6.5\n assert 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 candidate(nums1 = [],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5.5\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6, 7, 8, 9, 10]) == 5.5\n assert 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [50, 150, 250, 350, 450, 550]) == 300.0\n assert candidate(nums1 = [-5, 0, 3, 8, 12],nums2 = [-10, -1, 2, 4, 9, 14]) == 3.0\n assert candidate(nums1 = [50, 60, 70, 80, 90],nums2 = [10, 20, 30, 40]) == 50.0\n assert 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 candidate(nums1 = [1, 5, 7, 9, 11, 13],nums2 = [2, 4, 6, 8, 10, 12, 14]) == 8.0\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -15, -1, 1, 6, 11, 15, 20]) == 1.0\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10, 11, 12]) == 6.5\n assert candidate(nums1 = [-1, -2, -3, -4, -5],nums2 = [-10, -9, -8, -7, -6]) == -3.5\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [0, 0, 0, 0]) == 0.0\n assert candidate(nums1 = [5, 15, 25, 35, 45],nums2 = [10, 20, 30, 40, 50, 60]) == 30.0\n assert candidate(nums1 = [100, 200, 300],nums2 = [50, 150, 250, 350]) == 200.0\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, 22, 24, 26]) == 12.0\n assert candidate(nums1 = [1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1.0\n assert candidate(nums1 = [-100000, -99999, -99998],nums2 = [-99997, -99996, -99995, -99994, -99993, -99992]) == -99996.0\n assert 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = []) == 3.0\n assert candidate(nums1 = [1],nums2 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53]) == 19.0\n assert candidate(nums1 = [1, 2, 2, 3, 4],nums2 = [2, 2, 3, 4, 5]) == 2.5\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10, 12, 14]) == 6.5\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [50, 150, 250, 350, 450, 550]) == 275.0\n"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().findMedianSortedArrays", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "double findMedianSortedArrays(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "findMedianSortedArrays", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "double", "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\n \nConstraints:\n\n1 <= s.length <= 1000\ns consist of only digits and English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string longestPalindrome(string s) {", "container": "Solution", "callable": "longestPalindrome", "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\"\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\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\n \nConstraints:\n\n1 <= s.length <= 1000\ns consists of English letters (lower-case and upper-case), ',' and '.'.\n1 <= numRows <= 1000\n\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 = \"HELLO WORLD\",numRows = 5) == \"HREOLLWDL O\"\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 = \"\",numRows = 1) == \"\"\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 = \"The quick brown fox jumps over the lazy dog.\",numRows = 3) == \"Tqkofjsehadh uc rw o up vrtelz o.eibnxmo yg\"\n assert candidate(s = \"WithSpecialCharacters!@#$%^&*()\",numRows = 5) == \"Wic$icaat#%telre@^)hpCar!&(Shs*\"\n assert candidate(s = \"The quick brown fox jumps over the lazy dog.\",numRows = 8) == \"Tneghw vro.eofo d ro t qbxshyu pezikjm acul\"\n assert candidate(s = \"This,is,a,longer,string,with,punctuation!\",numRows = 7) == \"Tnwthog,iaiilegtuos,rnhtn,a,i,c!i,srpnstu\"\n assert candidate(s = \"\",numRows = 5) == \"\"\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 = \"1234567890\",numRows = 2) == \"1357924680\"\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 = \"1234567890abcdefghijklmnopqrstuvwxyz\",numRows = 7) == \"1co2bdnpz3aemqy40flrx59gksw68hjtv7iu\"\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 = \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",numRows = 6) == \"Lmtna ou i os dgersdsacerinlepo m cupiimilre,ttict otes.\"\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 = \"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\",numRows = 12) == \"1Mi2LNhj3KOgk4JPfl5IQem6HRdnz7GScoy8FTbpx9EUaqw0DVZrvACWYsuBXt\"\n assert candidate(s = \"HELLOWORLDTHISISATEST\",numRows = 7) == \"HIEHSLTILDSOLATWRTSOE\"\n assert candidate(s = \"AQuickBrownFoxJumpsOverTheLazyDog\",numRows = 11) == \"AvQOeusripTcmhkueBJLrxaoozgwFyonD\"\n assert candidate(s = \"123456789012345678901234567890\",numRows = 5) == \"197528068463715937462402805319\"\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 = \"12345678901234567890\",numRows = 10) == \"19280374655647382910\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\",numRows = 7) == \"AMYBLNXZ9CKOW08DJPV17EIQU26FHRT35GS4\"\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 = \"123456789012345678901234567890\",numRows = 6) == \"111202020393939484848575757666\"\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 = \"\",numRows = 3) == \"\"\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 = \"PythonProgrammingIsFunAndEducational!\",numRows = 7) == \"Pmd!yamnEltriAdahgnnunooguconrIFaiPst\"\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 = \"MixedCASEAndNumbers123\",numRows = 4) == \"MANsiCSdur1xdEnme2eAb3\"\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"}, "metadata": {"canonical_parameter_names": ["s", "numRows"], "leetcode_dataset_entry_point": "Solution().convert", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string convert(string s, int numRows) {", "container": "Solution", "callable": "convert", "parameters": [{"name": "s", "type": "string"}, {"name": "numRows", "type": "int"}], "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 [-231, 231 - 1], then return 0.\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\n \nConstraints:\n\n-231 <= x <= 231 - 1\n\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 = 10000000000) == 1\n assert candidate(x = 11000000001) == 0\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 = -9646324351) == -1534236469\n assert candidate(x = -123456789) == -987654321\n assert candidate(x = 7463847412) == 2147483647\n assert candidate(x = -1000000003) == 0\n assert candidate(x = -3000000001) == -1000000003\n assert candidate(x = -876543210) == -12345678\n assert candidate(x = -1111111111) == -1111111111\n assert candidate(x = -1001001001) == -1001001001\n assert candidate(x = 9646324351) == 1534236469\n assert candidate(x = 1010101010) == 101010101\n assert candidate(x = 123456789) == 987654321\n assert candidate(x = -10000000000) == -1\n assert candidate(x = -2147483640) == -463847412\n assert candidate(x = -7463847412) == -2147483647\n assert candidate(x = 3000000001) == 1000000003\n assert candidate(x = 1000000000) == 1\n assert candidate(x = 1000000003) == 0\n assert candidate(x = -214748364) == -463847412\n assert candidate(x = 9000000000) == 9\n"}, "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().reverse", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int reverse(int x) {", "container": "Solution", "callable": "reverse", "parameters": [{"name": "x", "type": "int"}], "return_type": "int", "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.\nThe algorithm for myAtoi(string s) is as follows:\n\nWhitespace: Ignore any leading whitespace (\" \").\nSignedness: Determine the sign by checking if the next character is '-' or '+', assuming positivity if neither present.\nConversion: 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.\nRounding: If the integer is out of the 32-bit signed integer range [-231, 231 - 1], then round the integer to remain in the range. Specifically, integers less than -231 should be rounded to -231, and integers greater than 231 - 1 should be rounded to 231 - 1.\n\nReturn the integer as the final result.\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\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\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\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\n\nExample 5:\n\nInput: s = \"words and 987\"\nOutput: 0\nExplanation:\nReading stops at the first non-digit character 'w'.\n\n \nConstraints:\n\n0 <= s.length <= 200\ns consists of English letters (lower-case and upper-case), digits (0-9), ' ', '+', '-', and '.'.\n\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 = \" !@#$%^&*()_+\") == 0\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().myAtoi", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int myAtoi(string s) {", "container": "Solution", "callable": "myAtoi", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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\n \nConstraints:\n\n-231 <= x <= 231 - 1\n\n \nFollow up: Could you solve it without converting the integer to a string?", "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 = 12345678987654321) == True\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 = 999999999999999999) == True\n assert candidate(x = 123456789987654321) == True\n assert candidate(x = 10000000000000000000000000000000000001) == True\n assert candidate(x = 1100110011) == True\n assert candidate(x = 12210000221) == False\n assert candidate(x = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) == False\n assert candidate(x = 12345678987654322) == False\n assert candidate(x = 987656789) == True\n assert candidate(x = 100000000000000001) == True\n assert candidate(x = 1234567890987654321) == True\n assert candidate(x = 100000000000000000001) == 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 = 12345677654321) == True\n assert candidate(x = 98765432112345678) == False\n assert candidate(x = 10000000001) == True\n assert candidate(x = 10000000000000000000) == False\n assert candidate(x = 12345654321) == True\n assert candidate(x = 999999999) == True\n assert candidate(x = 987898789) == True\n assert candidate(x = 1000000000000000000000000000000000001) == True\n assert candidate(x = -1000000001) == False\n assert candidate(x = 1000000000000000001) == True\n assert candidate(x = 2121212121) == False\n assert candidate(x = 123321000) == False\n assert candidate(x = 1001) == True\n assert candidate(x = 1234567899876543210) == False\n assert candidate(x = 1230321) == True\n assert candidate(x = 12211221) == True\n assert candidate(x = 1002001) == True\n assert candidate(x = 10000200001) == True\n assert candidate(x = 98789) == True\n assert candidate(x = 123454321) == True\n assert candidate(x = 98765432123456789) == True\n assert candidate(x = 100000000000000000000000000000000000000000000000001) == True\n assert candidate(x = 100000000000000000000000000000000000000) == False\n assert candidate(x = 123321123321) == True\n assert candidate(x = 1111111111111111111) == True\n assert candidate(x = 1000000000) == False\n"}, "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().isPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPalindrome(int x) {", "container": "Solution", "callable": "isPalindrome", "parameters": [{"name": "x", "type": "int"}], "return_type": "bool", "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\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 = \"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\n \nConstraints:\n\n1 <= s.length <= 20\n1 <= p.length <= 20\ns contains only lowercase English letters.\np contains only lowercase English letters, '.', and '*'.\nIt is guaranteed for each appearance of the character '*', there will be a previous valid character to match.\n\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 = \"abababa\",p = \"(ab)*a\") == False\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 = \"ababab\",p = \"(ab)*\") == False\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 = \"aaa\",p = \"a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a\") == True\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 = \"ababab\",p = \"(ab)*b*\") == 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 = \"abababab\",p = \"(ab)*\") == 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 = \"abcabcabcabc\",p = \"(abc)*d\") == False\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 = \"xyxxyxyx\",p = \"(xy)*x\") == False\n assert candidate(s = \"aabbbccc\",p = \"a*b*c*\") == True\n assert candidate(s = \"abcabcabcabc\",p = \"(abc)*\") == False\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 = \"zzzzzzzzzzzz\",p = \"z*z*z*z*z*z*z*z*z*z*z*z*z*z*z*z*z*\") == 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 = \"xyxyxyxyxyx\",p = \"x.y.x.y.x.y.x.y.x.y.x\") == False\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 = \"abcdeabcdeabcde\",p = \"abc*de*abc*de*abc*de*f*\") == 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 = \"abcdeabcdeabcde\",p = \"abc*de*abc*de*abc*de*\") == 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 = \"ababab\",p = \"(ab)*b\") == False\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 world\",p = \"h.*o w*r*d\") == False\n assert candidate(s = \"abcdefgh\",p = \"a.*b.*c.*d.*e.*f.*g.*h\") == 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 = \"abcabcabc\",p = \"(abc)*\") == False\n assert candidate(s = \"ababab\",p = \"(ab)*ab*\") == False\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 = \"abab\",p = \"(ab)*\") == False\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"}, "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().isMatch", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isMatch(string s, string p) {", "container": "Solution", "callable": "isMatch", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "bool", "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 ith line are (i, 0) and (i, height[i]).\nFind two lines that together with the x-axis form a container, such that the container contains the most water.\nReturn the maximum amount of water a container can store.\nNotice that you may not slant the container.\n \nExample 1:\n\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\n \nConstraints:\n\nn == height.length\n2 <= n <= 105\n0 <= height[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["height"], "leetcode_dataset_entry_point": "Solution().maxArea", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxArea(vector& height) {", "container": "Solution", "callable": "maxArea", "parameters": [{"name": "height", "type": "vector&"}], "return_type": "int", "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\n\n\nSymbol\nValue\n\n\n\n\nI\n1\n\n\nV\n5\n\n\nX\n10\n\n\nL\n50\n\n\nC\n100\n\n\nD\n500\n\n\nM\n1000\n\n\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\nIf 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.\nIf 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).\nOnly 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\n\nExample 2:\n\nInput: num = 58\nOutput: \"LVIII\"\nExplanation:\n\n50 = L\n 8 = VIII\n\n\nExample 3:\n\nInput: num = 1994\nOutput: \"MCMXCIV\"\nExplanation:\n\n1000 = M\n 900 = CM\n 90 = XC\n 4 = IV\n\n\n \nConstraints:\n\n1 <= num <= 3999\n\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"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().intToRoman", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string intToRoman(int num) {", "container": "Solution", "callable": "intToRoman", "parameters": [{"name": "num", "type": "int"}], "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\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.\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\nI can be placed before V (5) and X (10) to make 4 and 9. \nX can be placed before L (50) and C (100) to make 40 and 90. \nC 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\n \nConstraints:\n\n1 <= s.length <= 15\ns contains only the characters ('I', 'V', 'X', 'L', 'C', 'D', 'M').\nIt is guaranteed that s is a valid roman numeral in the range [1, 3999].\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().romanToInt", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int romanToInt(string s) {", "container": "Solution", "callable": "romanToInt", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= strs.length <= 200\n0 <= strs[i].length <= 200\nstrs[i] consists of only lowercase English letters if it is non-empty.\n\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"}, "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().longestCommonPrefix", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string longestCommonPrefix(vector& strs) {", "container": "Solution", "callable": "longestCommonPrefix", "parameters": [{"name": "strs", "type": "vector&"}], "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.\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\n \nConstraints:\n\n3 <= nums.length <= 3000\n-105 <= nums[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().threeSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> threeSum(vector& nums) {", "container": "Solution", "callable": "threeSum", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 16, "task_id": "3sum-closest", "difficulty": "Medium", "problem_description": "Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.\nReturn the sum of the three integers.\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\n \nConstraints:\n\n3 <= nums.length <= 500\n-1000 <= nums[i] <= 1000\n-104 <= target <= 104\n\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 = [100, -200, 300, -400, 500, -600, 700, -800, 900, -1000, 1100, -1200, 1300, -1400, 1500],target = 500) == 500\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().threeSumClosest", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int threeSumClosest(vector& nums, int target) {", "container": "Solution", "callable": "threeSumClosest", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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.\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\n \nExample 1:\n\nInput: digits = \"23\"\nOutput: [\"ad\",\"ae\",\"af\",\"bd\",\"be\",\"bf\",\"cd\",\"ce\",\"cf\"]\n\nExample 2:\n\nInput: digits = \"\"\nOutput: []\n\nExample 3:\n\nInput: digits = \"2\"\nOutput: [\"a\",\"b\",\"c\"]\n\n \nConstraints:\n\n0 <= digits.length <= 4\ndigits[i] is a digit in the range ['2', '9'].\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 candidate(digits = \"2\") == ['a', 'b', 'c']\n assert candidate(digits = \"3\") == ['d', 'e', 'f']\n assert candidate(digits = \"9\") == ['w', 'x', 'y', 'z']\n assert candidate(digits = \"47\") == ['gp', 'gq', 'gr', 'gs', 'hp', 'hq', 'hr', 'hs', 'ip', 'iq', 'ir', 'is']\n assert candidate(digits = \"99\") == ['ww', 'wx', 'wy', 'wz', 'xw', 'xx', 'xy', 'xz', 'yw', 'yx', 'yy', 'yz', 'zw', 'zx', 'zy', 'zz']\n assert 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 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 candidate(digits = \"\") == []\n assert candidate(digits = \"79\") == ['pw', 'px', 'py', 'pz', 'qw', 'qx', 'qy', 'qz', 'rw', 'rx', 'ry', 'rz', 'sw', 'sx', 'sy', 'sz']\n assert candidate(digits = \"23\") == ['ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf']\n assert candidate(digits = \"89\") == ['tw', 'tx', 'ty', 'tz', 'uw', 'ux', 'uy', 'uz', 'vw', 'vx', 'vy', 'vz']\n assert 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 candidate(digits = \"34\") == ['dg', 'dh', 'di', 'eg', 'eh', 'ei', 'fg', 'fh', 'fi']\n assert 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 candidate(digits = \"62\") == ['ma', 'mb', 'mc', 'na', 'nb', 'nc', 'oa', 'ob', 'oc']\n assert 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 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 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 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 candidate(digits = \"8\") == ['t', 'u', 'v']\n assert 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 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 candidate(digits = \"38\") == ['dt', 'du', 'dv', 'et', 'eu', 'ev', 'ft', 'fu', 'fv']\n assert 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 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 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 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 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 candidate(digits = \"73\") == ['pd', 'pe', 'pf', 'qd', 'qe', 'qf', 'rd', 're', 'rf', 'sd', 'se', 'sf']\n assert 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 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 candidate(digits = \"33\") == ['dd', 'de', 'df', 'ed', 'ee', 'ef', 'fd', 'fe', 'ff']\n assert 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 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 candidate(digits = \"59\") == ['jw', 'jx', 'jy', 'jz', 'kw', 'kx', 'ky', 'kz', 'lw', 'lx', 'ly', 'lz']\n assert 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 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 candidate(digits = \"88\") == ['tt', 'tu', 'tv', 'ut', 'uu', 'uv', 'vt', 'vu', 'vv']\n assert 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 candidate(digits = \"97531\") == ['wpjdw', 'wpjdx', 'wpjdy', 'wpjdz', 'wpjew', 'wpjex', 'wpjey', 'wpjez', 'wpjfw', 'wpjfx', 'wpjfy', 'wpjfz', 'wpkdw', 'wpkdx', 'wpkdy', 'wpkdz', 'wpkew', 'wpkex', 'wpkey', 'wpkez', 'wpkfw', 'wpkfx', 'wpkfy', 'wpkfz', 'wpldw', 'wpldx', 'wpldy', 'wpldz', 'wplew', 'wplex', 'wpley', 'wplez', 'wplfw', 'wplfx', 'wplfy', 'wplfz', 'wqjdw', 'wqjdx', 'wqjdy', 'wqjdz', 'wqjew', 'wqjex', 'wqjey', 'wqjez', 'wqjfw', 'wqjfx', 'wqjfy', 'wqjfz', 'wqkdw', 'wqkdx', 'wqkdy', 'wqkdz', 'wqkew', 'wqkex', 'wqkey', 'wqkez', 'wqkfw', 'wqkfx', 'wqkfy', 'wqkfz', 'wqldw', 'wqldx', 'wqldy', 'wqldz', 'wqlew', 'wqlex', 'wqley', 'wqlez', 'wqlfw', 'wqlfx', 'wqlfy', 'wqlfz', 'wrjdw', 'wrjdx', 'wrjdy', 'wrjdz', 'wrjew', 'wrjex', 'wrjey', 'wrjez', 'wrjfw', 'wrjfx', 'wrjfy', 'wrjfz', 'wrkdw', 'wrkdx', 'wrkdy', 'wrkdz', 'wrkew', 'wrkex', 'wrkey', 'wrkez', 'wrkfw', 'wrkfx', 'wrkfy', 'wrkfz', 'wrldw', 'wrldx', 'wrldy', 'wrldz', 'wrlew', 'wrlex', 'wrley', 'wrlez', 'wrlfw', 'wrlfx', 'wrlfy', 'wrlfz', 'wsjdw', 'wsjdx', 'wsjdy', 'wsjdz', 'wsjew', 'wsjex', 'wsjey', 'wsjez', 'wsjfw', 'wsjfx', 'wsjfy', 'wsjfz', 'wskdw', 'wskdx', 'wskdy', 'wskdz', 'wskew', 'wskex', 'wskey', 'wskez', 'wskfw', 'wskfx', 'wskfy', 'wskfz', 'wsldw', 'wsldx', 'wsldy', 'wsldz', 'wslew', 'wslex', 'wsley', 'wslez', 'wslfw', 'wslfx', 'wslfy', 'wslfz', 'xpjdw', 'xpjdx', 'xpjdy', 'xpjdz', 'xpjew', 'xpjex', 'xpjey', 'xpjez', 'xpjfw', 'xpjfx', 'xpjfy', 'xpjfz', 'xpkdw', 'xpkdx', 'xpkdy', 'xpkdz', 'xpkew', 'xpkex', 'xpkey', 'xpkez', 'xpkfw', 'xpkfx', 'xpkfy', 'xpkfz', 'xpldw', 'xpldx', 'xpldy', 'xpldz', 'xplew', 'xplex', 'xpley', 'xplez', 'xplfw', 'xplfx', 'xplfy', 'xplfz', 'xqjdw', 'xqjdx', 'xqjdy', 'xqjdz', 'xqjew', 'xqjex', 'xqjey', 'xqjez', 'xqjfw', 'xqjfx', 'xqjfy', 'xqjfz', 'xqkdw', 'xqkdx', 'xqkdy', 'xqkdz', 'xqkew', 'xqkex', 'xqkey', 'xqkez', 'xqkfw', 'xqkfx', 'xqkfy', 'xqkfz', 'xqldw', 'xqldx', 'xqldy', 'xqldz', 'xqlew', 'xqlex', 'xqley', 'xqlez', 'xqlfw', 'xqlfx', 'xqlfy', 'xqlfz', 'xrjdw', 'xrjdx', 'xrjdy', 'xrjdz', 'xrjew', 'xrjex', 'xrjey', 'xrjez', 'xrjfw', 'xrjfx', 'xrjfy', 'xrjfz', 'xrkdw', 'xrkdx', 'xrkdy', 'xrkdz', 'xrkew', 'xrkex', 'xrkey', 'xrkez', 'xrkfw', 'xrkfx', 'xrkfy', 'xrkfz', 'xrldw', 'xrldx', 'xrldy', 'xrldz', 'xrlew', 'xrlex', 'xrley', 'xrlez', 'xrlfw', 'xrlfx', 'xrlfy', 'xrlfz', 'xsjdw', 'xsjdx', 'xsjdy', 'xsjdz', 'xsjew', 'xsjex', 'xsjey', 'xsjez', 'xsjfw', 'xsjfx', 'xsjfy', 'xsjfz', 'xskdw', 'xskdx', 'xskdy', 'xskdz', 'xskew', 'xskex', 'xskey', 'xskez', 'xskfw', 'xskfx', 'xskfy', 'xskfz', 'xsldw', 'xsldx', 'xsldy', 'xsldz', 'xslew', 'xslex', 'xsley', 'xslez', 'xslfw', 'xslfx', 'xslfy', 'xslfz', 'ypjdw', 'ypjdx', 'ypjdy', 'ypjdz', 'ypjew', 'ypjex', 'ypjey', 'ypjez', 'ypjfw', 'ypjfx', 'ypjfy', 'ypjfz', 'ypkdw', 'ypkdx', 'ypkdy', 'ypkdz', 'ypkew', 'ypkex', 'ypkey', 'ypkez', 'ypkfw', 'ypkfx', 'ypkfy', 'ypkfz', 'ypldw', 'ypldx', 'ypldy', 'ypldz', 'yplew', 'yplex', 'ypley', 'yplez', 'yplfw', 'yplfx', 'yplfy', 'yplfz', 'yqjdw', 'yqjdx', 'yqjdy', 'yqjdz', 'yqjew', 'yqjex', 'yqjey', 'yqjez', 'yqjfw', 'yqjfx', 'yqjfy', 'yqjfz', 'yqkdw', 'yqkdx', 'yqkdy', 'yqkdz', 'yqkew', 'yqkex', 'yqkey', 'yqkez', 'yqkfw', 'yqkfx', 'yqkfy', 'yqkfz', 'yqldw', 'yqldx', 'yqldy', 'yqldz', 'yqlew', 'yqlex', 'yqley', 'yqlez', 'yqlfw', 'yqlfx', 'yqlfy', 'yqlfz', 'yrjdw', 'yrjdx', 'yrjdy', 'yrjdz', 'yrjew', 'yrjex', 'yrjey', 'yrjez', 'yrjfw', 'yrjfx', 'yrjfy', 'yrjfz', 'yrkdw', 'yrkdx', 'yrkdy', 'yrkdz', 'yrkew', 'yrkex', 'yrkey', 'yrkez', 'yrkfw', 'yrkfx', 'yrkfy', 'yrkfz', 'yrldw', 'yrldx', 'yrldy', 'yrldz', 'yrlew', 'yrlex', 'yrley', 'yrlez', 'yrlfw', 'yrlfx', 'yrlfy', 'yrlfz', 'ysjdw', 'ysjdx', 'ysjdy', 'ysjdz', 'ysjew', 'ysjex', 'ysjey', 'ysjez', 'ysjfw', 'ysjfx', 'ysjfy', 'ysjfz', 'yskdw', 'yskdx', 'yskdy', 'yskdz', 'yskew', 'yskex', 'yskey', 'yskez', 'yskfw', 'yskfx', 'yskfy', 'yskfz', 'ysldw', 'ysldx', 'ysldy', 'ysldz', 'yslew', 'yslex', 'ysley', 'yslez', 'yslfw', 'yslfx', 'yslfy', 'yslfz', 'zpjdw', 'zpjdx', 'zpjdy', 'zpjdz', 'zpjew', 'zpjex', 'zpjey', 'zpjez', 'zpjfw', 'zpjfx', 'zpjfy', 'zpjfz', 'zpkdw', 'zpkdx', 'zpkdy', 'zpkdz', 'zpkew', 'zpkex', 'zpkey', 'zpkez', 'zpkfw', 'zpkfx', 'zpkfy', 'zpkfz', 'zpldw', 'zpldx', 'zpldy', 'zpldz', 'zplew', 'zplex', 'zpley', 'zplez', 'zplfw', 'zplfx', 'zplfy', 'zplfz', 'zqjdw', 'zqjdx', 'zqjdy', 'zqjdz', 'zqjew', 'zqjex', 'zqjey', 'zqjez', 'zqjfw', 'zqjfx', 'zqjfy', 'zqjfz', 'zqkdw', 'zqkdx', 'zqkdy', 'zqkdz', 'zqkew', 'zqkex', 'zqkey', 'zqkez', 'zqkfw', 'zqkfx', 'zqkfy', 'zqkfz', 'zqldw', 'zqldx', 'zqldy', 'zqldz', 'zqlew', 'zqlex', 'zqley', 'zqlez', 'zqlfw', 'zqlfx', 'zqlfy', 'zqlfz', 'zrjdw', 'zrjdx', 'zrjdy', 'zrjdz', 'zrjew', 'zrjex', 'zrjey', 'zrjez', 'zrjfw', 'zrjfx', 'zrjfy', 'zrjfz', 'zrkdw', 'zrkdx', 'zrkdy', 'zrkdz', 'zrkew', 'zrkex', 'zrkey', 'zrkez', 'zrkfw', 'zrkfx', 'zrkfy', 'zrkfz', 'zrldw', 'zrldx', 'zrldy', 'zrldz', 'zrlew', 'zrlex', 'zrley', 'zrlez', 'zrlfw', 'zrlfx', 'zrlfy', 'zrlfz', 'zsjdw', 'zsjdx', 'zsjdy', 'zsjdz', 'zsjew', 'zsjex', 'zsjey', 'zsjez', 'zsjfw', 'zsjfx', 'zsjfy', 'zsjfz', 'zskdw', 'zskdx', 'zskdy', 'zskdz', 'zskew', 'zskex', 'zskey', 'zskez', 'zskfw', 'zskfx', 'zskfy', 'zskfz', 'zsldw', 'zsldx', 'zsldy', 'zsldz', 'zslew', 'zslex', 'zsley', 'zslez', 'zslfw', 'zslfx', 'zslfy', 'zslfz']\n assert 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 candidate(digits = \"29\") == ['aw', 'ax', 'ay', 'az', 'bw', 'bx', 'by', 'bz', 'cw', 'cx', 'cy', 'cz']\n assert 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 candidate(digits = \"44\") == ['gg', 'gh', 'gi', 'hg', 'hh', 'hi', 'ig', 'ih', 'ii']\n assert 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 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 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 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 candidate(digits = \"57\") == ['jp', 'jq', 'jr', 'js', 'kp', 'kq', 'kr', 'ks', 'lp', 'lq', 'lr', 'ls']\n assert 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 candidate(digits = \"7\") == ['p', 'q', 'r', 's']\n assert 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 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 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 candidate(digits = \"94\") == ['wg', 'wh', 'wi', 'xg', 'xh', 'xi', 'yg', 'yh', 'yi', 'zg', 'zh', 'zi']\n assert 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 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 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 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 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 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 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 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 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 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 candidate(digits = \"23579\") == ['adjpw', 'adjpx', 'adjpy', 'adjpz', 'adjqw', 'adjqx', 'adjqy', 'adjqz', 'adjrw', 'adjrx', 'adjry', 'adjrz', 'adjsw', 'adjsx', 'adjsy', 'adjsz', 'adkpw', 'adkpx', 'adkpy', 'adkpz', 'adkqw', 'adkqx', 'adkqy', 'adkqz', 'adkrw', 'adkrx', 'adkry', 'adkrz', 'adksw', 'adksx', 'adksy', 'adksz', 'adlpw', 'adlpx', 'adlpy', 'adlpz', 'adlqw', 'adlqx', 'adlqy', 'adlqz', 'adlrw', 'adlrx', 'adlry', 'adlrz', 'adlsw', 'adlsx', 'adlsy', 'adlsz', 'aejpw', 'aejpx', 'aejpy', 'aejpz', 'aejqw', 'aejqx', 'aejqy', 'aejqz', 'aejrw', 'aejrx', 'aejry', 'aejrz', 'aejsw', 'aejsx', 'aejsy', 'aejsz', 'aekpw', 'aekpx', 'aekpy', 'aekpz', 'aekqw', 'aekqx', 'aekqy', 'aekqz', 'aekrw', 'aekrx', 'aekry', 'aekrz', 'aeksw', 'aeksx', 'aeksy', 'aeksz', 'aelpw', 'aelpx', 'aelpy', 'aelpz', 'aelqw', 'aelqx', 'aelqy', 'aelqz', 'aelrw', 'aelrx', 'aelry', 'aelrz', 'aelsw', 'aelsx', 'aelsy', 'aelsz', 'afjpw', 'afjpx', 'afjpy', 'afjpz', 'afjqw', 'afjqx', 'afjqy', 'afjqz', 'afjrw', 'afjrx', 'afjry', 'afjrz', 'afjsw', 'afjsx', 'afjsy', 'afjsz', 'afkpw', 'afkpx', 'afkpy', 'afkpz', 'afkqw', 'afkqx', 'afkqy', 'afkqz', 'afkrw', 'afkrx', 'afkry', 'afkrz', 'afksw', 'afksx', 'afksy', 'afksz', 'aflpw', 'aflpx', 'aflpy', 'aflpz', 'aflqw', 'aflqx', 'aflqy', 'aflqz', 'aflrw', 'aflrx', 'aflry', 'aflrz', 'aflsw', 'aflsx', 'aflsy', 'aflsz', 'bdjpw', 'bdjpx', 'bdjpy', 'bdjpz', 'bdjqw', 'bdjqx', 'bdjqy', 'bdjqz', 'bdjrw', 'bdjrx', 'bdjry', 'bdjrz', 'bdjsw', 'bdjsx', 'bdjsy', 'bdjsz', 'bdkpw', 'bdkpx', 'bdkpy', 'bdkpz', 'bdkqw', 'bdkqx', 'bdkqy', 'bdkqz', 'bdkrw', 'bdkrx', 'bdkry', 'bdkrz', 'bdksw', 'bdksx', 'bdksy', 'bdksz', 'bdlpw', 'bdlpx', 'bdlpy', 'bdlpz', 'bdlqw', 'bdlqx', 'bdlqy', 'bdlqz', 'bdlrw', 'bdlrx', 'bdlry', 'bdlrz', 'bdlsw', 'bdlsx', 'bdlsy', 'bdlsz', 'bejpw', 'bejpx', 'bejpy', 'bejpz', 'bejqw', 'bejqx', 'bejqy', 'bejqz', 'bejrw', 'bejrx', 'bejry', 'bejrz', 'bejsw', 'bejsx', 'bejsy', 'bejsz', 'bekpw', 'bekpx', 'bekpy', 'bekpz', 'bekqw', 'bekqx', 'bekqy', 'bekqz', 'bekrw', 'bekrx', 'bekry', 'bekrz', 'beksw', 'beksx', 'beksy', 'beksz', 'belpw', 'belpx', 'belpy', 'belpz', 'belqw', 'belqx', 'belqy', 'belqz', 'belrw', 'belrx', 'belry', 'belrz', 'belsw', 'belsx', 'belsy', 'belsz', 'bfjpw', 'bfjpx', 'bfjpy', 'bfjpz', 'bfjqw', 'bfjqx', 'bfjqy', 'bfjqz', 'bfjrw', 'bfjrx', 'bfjry', 'bfjrz', 'bfjsw', 'bfjsx', 'bfjsy', 'bfjsz', 'bfkpw', 'bfkpx', 'bfkpy', 'bfkpz', 'bfkqw', 'bfkqx', 'bfkqy', 'bfkqz', 'bfkrw', 'bfkrx', 'bfkry', 'bfkrz', 'bfksw', 'bfksx', 'bfksy', 'bfksz', 'bflpw', 'bflpx', 'bflpy', 'bflpz', 'bflqw', 'bflqx', 'bflqy', 'bflqz', 'bflrw', 'bflrx', 'bflry', 'bflrz', 'bflsw', 'bflsx', 'bflsy', 'bflsz', 'cdjpw', 'cdjpx', 'cdjpy', 'cdjpz', 'cdjqw', 'cdjqx', 'cdjqy', 'cdjqz', 'cdjrw', 'cdjrx', 'cdjry', 'cdjrz', 'cdjsw', 'cdjsx', 'cdjsy', 'cdjsz', 'cdkpw', 'cdkpx', 'cdkpy', 'cdkpz', 'cdkqw', 'cdkqx', 'cdkqy', 'cdkqz', 'cdkrw', 'cdkrx', 'cdkry', 'cdkrz', 'cdksw', 'cdksx', 'cdksy', 'cdksz', 'cdlpw', 'cdlpx', 'cdlpy', 'cdlpz', 'cdlqw', 'cdlqx', 'cdlqy', 'cdlqz', 'cdlrw', 'cdlrx', 'cdlry', 'cdlrz', 'cdlsw', 'cdlsx', 'cdlsy', 'cdlsz', 'cejpw', 'cejpx', 'cejpy', 'cejpz', 'cejqw', 'cejqx', 'cejqy', 'cejqz', 'cejrw', 'cejrx', 'cejry', 'cejrz', 'cejsw', 'cejsx', 'cejsy', 'cejsz', 'cekpw', 'cekpx', 'cekpy', 'cekpz', 'cekqw', 'cekqx', 'cekqy', 'cekqz', 'cekrw', 'cekrx', 'cekry', 'cekrz', 'ceksw', 'ceksx', 'ceksy', 'ceksz', 'celpw', 'celpx', 'celpy', 'celpz', 'celqw', 'celqx', 'celqy', 'celqz', 'celrw', 'celrx', 'celry', 'celrz', 'celsw', 'celsx', 'celsy', 'celsz', 'cfjpw', 'cfjpx', 'cfjpy', 'cfjpz', 'cfjqw', 'cfjqx', 'cfjqy', 'cfjqz', 'cfjrw', 'cfjrx', 'cfjry', 'cfjrz', 'cfjsw', 'cfjsx', 'cfjsy', 'cfjsz', 'cfkpw', 'cfkpx', 'cfkpy', 'cfkpz', 'cfkqw', 'cfkqx', 'cfkqy', 'cfkqz', 'cfkrw', 'cfkrx', 'cfkry', 'cfkrz', 'cfksw', 'cfksx', 'cfksy', 'cfksz', 'cflpw', 'cflpx', 'cflpy', 'cflpz', 'cflqw', 'cflqx', 'cflqy', 'cflqz', 'cflrw', 'cflrx', 'cflry', 'cflrz', 'cflsw', 'cflsx', 'cflsy', 'cflsz']\n assert candidate(digits = \"6\") == ['m', 'n', 'o']\n assert candidate(digits = \"58\") == ['jt', 'ju', 'jv', 'kt', 'ku', 'kv', 'lt', 'lu', 'lv']\n assert candidate(digits = \"77\") == ['pp', 'pq', 'pr', 'ps', 'qp', 'qq', 'qr', 'qs', 'rp', 'rq', 'rr', 'rs', 'sp', 'sq', 'sr', 'ss']\n assert candidate(digits = \"56\") == ['jm', 'jn', 'jo', 'km', 'kn', 'ko', 'lm', 'ln', 'lo']\n assert candidate(digits = \"85\") == ['tj', 'tk', 'tl', 'uj', 'uk', 'ul', 'vj', 'vk', 'vl']\n assert 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 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 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 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 candidate(digits = \"5\") == ['j', 'k', 'l']\n assert candidate(digits = \"654321\") == ['mjgdaw', 'mjgdax', 'mjgday', 'mjgdaz', 'mjgdbw', 'mjgdbx', 'mjgdby', 'mjgdbz', 'mjgdcw', 'mjgdcx', 'mjgdcy', 'mjgdcz', 'mjgeaw', 'mjgeax', 'mjgeay', 'mjgeaz', 'mjgebw', 'mjgebx', 'mjgeby', 'mjgebz', 'mjgecw', 'mjgecx', 'mjgecy', 'mjgecz', 'mjgfaw', 'mjgfax', 'mjgfay', 'mjgfaz', 'mjgfbw', 'mjgfbx', 'mjgfby', 'mjgfbz', 'mjgfcw', 'mjgfcx', 'mjgfcy', 'mjgfcz', 'mjhdaw', 'mjhdax', 'mjhday', 'mjhdaz', 'mjhdbw', 'mjhdbx', 'mjhdby', 'mjhdbz', 'mjhdcw', 'mjhdcx', 'mjhdcy', 'mjhdcz', 'mjheaw', 'mjheax', 'mjheay', 'mjheaz', 'mjhebw', 'mjhebx', 'mjheby', 'mjhebz', 'mjhecw', 'mjhecx', 'mjhecy', 'mjhecz', 'mjhfaw', 'mjhfax', 'mjhfay', 'mjhfaz', 'mjhfbw', 'mjhfbx', 'mjhfby', 'mjhfbz', 'mjhfcw', 'mjhfcx', 'mjhfcy', 'mjhfcz', 'mjidaw', 'mjidax', 'mjiday', 'mjidaz', 'mjidbw', 'mjidbx', 'mjidby', 'mjidbz', 'mjidcw', 'mjidcx', 'mjidcy', 'mjidcz', 'mjieaw', 'mjieax', 'mjieay', 'mjieaz', 'mjiebw', 'mjiebx', 'mjieby', 'mjiebz', 'mjiecw', 'mjiecx', 'mjiecy', 'mjiecz', 'mjifaw', 'mjifax', 'mjifay', 'mjifaz', 'mjifbw', 'mjifbx', 'mjifby', 'mjifbz', 'mjifcw', 'mjifcx', 'mjifcy', 'mjifcz', 'mkgdaw', 'mkgdax', 'mkgday', 'mkgdaz', 'mkgdbw', 'mkgdbx', 'mkgdby', 'mkgdbz', 'mkgdcw', 'mkgdcx', 'mkgdcy', 'mkgdcz', 'mkgeaw', 'mkgeax', 'mkgeay', 'mkgeaz', 'mkgebw', 'mkgebx', 'mkgeby', 'mkgebz', 'mkgecw', 'mkgecx', 'mkgecy', 'mkgecz', 'mkgfaw', 'mkgfax', 'mkgfay', 'mkgfaz', 'mkgfbw', 'mkgfbx', 'mkgfby', 'mkgfbz', 'mkgfcw', 'mkgfcx', 'mkgfcy', 'mkgfcz', 'mkhdaw', 'mkhdax', 'mkhday', 'mkhdaz', 'mkhdbw', 'mkhdbx', 'mkhdby', 'mkhdbz', 'mkhdcw', 'mkhdcx', 'mkhdcy', 'mkhdcz', 'mkheaw', 'mkheax', 'mkheay', 'mkheaz', 'mkhebw', 'mkhebx', 'mkheby', 'mkhebz', 'mkhecw', 'mkhecx', 'mkhecy', 'mkhecz', 'mkhfaw', 'mkhfax', 'mkhfay', 'mkhfaz', 'mkhfbw', 'mkhfbx', 'mkhfby', 'mkhfbz', 'mkhfcw', 'mkhfcx', 'mkhfcy', 'mkhfcz', 'mkidaw', 'mkidax', 'mkiday', 'mkidaz', 'mkidbw', 'mkidbx', 'mkidby', 'mkidbz', 'mkidcw', 'mkidcx', 'mkidcy', 'mkidcz', 'mkieaw', 'mkieax', 'mkieay', 'mkieaz', 'mkiebw', 'mkiebx', 'mkieby', 'mkiebz', 'mkiecw', 'mkiecx', 'mkiecy', 'mkiecz', 'mkifaw', 'mkifax', 'mkifay', 'mkifaz', 'mkifbw', 'mkifbx', 'mkifby', 'mkifbz', 'mkifcw', 'mkifcx', 'mkifcy', 'mkifcz', 'mlgdaw', 'mlgdax', 'mlgday', 'mlgdaz', 'mlgdbw', 'mlgdbx', 'mlgdby', 'mlgdbz', 'mlgdcw', 'mlgdcx', 'mlgdcy', 'mlgdcz', 'mlgeaw', 'mlgeax', 'mlgeay', 'mlgeaz', 'mlgebw', 'mlgebx', 'mlgeby', 'mlgebz', 'mlgecw', 'mlgecx', 'mlgecy', 'mlgecz', 'mlgfaw', 'mlgfax', 'mlgfay', 'mlgfaz', 'mlgfbw', 'mlgfbx', 'mlgfby', 'mlgfbz', 'mlgfcw', 'mlgfcx', 'mlgfcy', 'mlgfcz', 'mlhdaw', 'mlhdax', 'mlhday', 'mlhdaz', 'mlhdbw', 'mlhdbx', 'mlhdby', 'mlhdbz', 'mlhdcw', 'mlhdcx', 'mlhdcy', 'mlhdcz', 'mlheaw', 'mlheax', 'mlheay', 'mlheaz', 'mlhebw', 'mlhebx', 'mlheby', 'mlhebz', 'mlhecw', 'mlhecx', 'mlhecy', 'mlhecz', 'mlhfaw', 'mlhfax', 'mlhfay', 'mlhfaz', 'mlhfbw', 'mlhfbx', 'mlhfby', 'mlhfbz', 'mlhfcw', 'mlhfcx', 'mlhfcy', 'mlhfcz', 'mlidaw', 'mlidax', 'mliday', 'mlidaz', 'mlidbw', 'mlidbx', 'mlidby', 'mlidbz', 'mlidcw', 'mlidcx', 'mlidcy', 'mlidcz', 'mlieaw', 'mlieax', 'mlieay', 'mlieaz', 'mliebw', 'mliebx', 'mlieby', 'mliebz', 'mliecw', 'mliecx', 'mliecy', 'mliecz', 'mlifaw', 'mlifax', 'mlifay', 'mlifaz', 'mlifbw', 'mlifbx', 'mlifby', 'mlifbz', 'mlifcw', 'mlifcx', 'mlifcy', 'mlifcz', 'njgdaw', 'njgdax', 'njgday', 'njgdaz', 'njgdbw', 'njgdbx', 'njgdby', 'njgdbz', 'njgdcw', 'njgdcx', 'njgdcy', 'njgdcz', 'njgeaw', 'njgeax', 'njgeay', 'njgeaz', 'njgebw', 'njgebx', 'njgeby', 'njgebz', 'njgecw', 'njgecx', 'njgecy', 'njgecz', 'njgfaw', 'njgfax', 'njgfay', 'njgfaz', 'njgfbw', 'njgfbx', 'njgfby', 'njgfbz', 'njgfcw', 'njgfcx', 'njgfcy', 'njgfcz', 'njhdaw', 'njhdax', 'njhday', 'njhdaz', 'njhdbw', 'njhdbx', 'njhdby', 'njhdbz', 'njhdcw', 'njhdcx', 'njhdcy', 'njhdcz', 'njheaw', 'njheax', 'njheay', 'njheaz', 'njhebw', 'njhebx', 'njheby', 'njhebz', 'njhecw', 'njhecx', 'njhecy', 'njhecz', 'njhfaw', 'njhfax', 'njhfay', 'njhfaz', 'njhfbw', 'njhfbx', 'njhfby', 'njhfbz', 'njhfcw', 'njhfcx', 'njhfcy', 'njhfcz', 'njidaw', 'njidax', 'njiday', 'njidaz', 'njidbw', 'njidbx', 'njidby', 'njidbz', 'njidcw', 'njidcx', 'njidcy', 'njidcz', 'njieaw', 'njieax', 'njieay', 'njieaz', 'njiebw', 'njiebx', 'njieby', 'njiebz', 'njiecw', 'njiecx', 'njiecy', 'njiecz', 'njifaw', 'njifax', 'njifay', 'njifaz', 'njifbw', 'njifbx', 'njifby', 'njifbz', 'njifcw', 'njifcx', 'njifcy', 'njifcz', 'nkgdaw', 'nkgdax', 'nkgday', 'nkgdaz', 'nkgdbw', 'nkgdbx', 'nkgdby', 'nkgdbz', 'nkgdcw', 'nkgdcx', 'nkgdcy', 'nkgdcz', 'nkgeaw', 'nkgeax', 'nkgeay', 'nkgeaz', 'nkgebw', 'nkgebx', 'nkgeby', 'nkgebz', 'nkgecw', 'nkgecx', 'nkgecy', 'nkgecz', 'nkgfaw', 'nkgfax', 'nkgfay', 'nkgfaz', 'nkgfbw', 'nkgfbx', 'nkgfby', 'nkgfbz', 'nkgfcw', 'nkgfcx', 'nkgfcy', 'nkgfcz', 'nkhdaw', 'nkhdax', 'nkhday', 'nkhdaz', 'nkhdbw', 'nkhdbx', 'nkhdby', 'nkhdbz', 'nkhdcw', 'nkhdcx', 'nkhdcy', 'nkhdcz', 'nkheaw', 'nkheax', 'nkheay', 'nkheaz', 'nkhebw', 'nkhebx', 'nkheby', 'nkhebz', 'nkhecw', 'nkhecx', 'nkhecy', 'nkhecz', 'nkhfaw', 'nkhfax', 'nkhfay', 'nkhfaz', 'nkhfbw', 'nkhfbx', 'nkhfby', 'nkhfbz', 'nkhfcw', 'nkhfcx', 'nkhfcy', 'nkhfcz', 'nkidaw', 'nkidax', 'nkiday', 'nkidaz', 'nkidbw', 'nkidbx', 'nkidby', 'nkidbz', 'nkidcw', 'nkidcx', 'nkidcy', 'nkidcz', 'nkieaw', 'nkieax', 'nkieay', 'nkieaz', 'nkiebw', 'nkiebx', 'nkieby', 'nkiebz', 'nkiecw', 'nkiecx', 'nkiecy', 'nkiecz', 'nkifaw', 'nkifax', 'nkifay', 'nkifaz', 'nkifbw', 'nkifbx', 'nkifby', 'nkifbz', 'nkifcw', 'nkifcx', 'nkifcy', 'nkifcz', 'nlgdaw', 'nlgdax', 'nlgday', 'nlgdaz', 'nlgdbw', 'nlgdbx', 'nlgdby', 'nlgdbz', 'nlgdcw', 'nlgdcx', 'nlgdcy', 'nlgdcz', 'nlgeaw', 'nlgeax', 'nlgeay', 'nlgeaz', 'nlgebw', 'nlgebx', 'nlgeby', 'nlgebz', 'nlgecw', 'nlgecx', 'nlgecy', 'nlgecz', 'nlgfaw', 'nlgfax', 'nlgfay', 'nlgfaz', 'nlgfbw', 'nlgfbx', 'nlgfby', 'nlgfbz', 'nlgfcw', 'nlgfcx', 'nlgfcy', 'nlgfcz', 'nlhdaw', 'nlhdax', 'nlhday', 'nlhdaz', 'nlhdbw', 'nlhdbx', 'nlhdby', 'nlhdbz', 'nlhdcw', 'nlhdcx', 'nlhdcy', 'nlhdcz', 'nlheaw', 'nlheax', 'nlheay', 'nlheaz', 'nlhebw', 'nlhebx', 'nlheby', 'nlhebz', 'nlhecw', 'nlhecx', 'nlhecy', 'nlhecz', 'nlhfaw', 'nlhfax', 'nlhfay', 'nlhfaz', 'nlhfbw', 'nlhfbx', 'nlhfby', 'nlhfbz', 'nlhfcw', 'nlhfcx', 'nlhfcy', 'nlhfcz', 'nlidaw', 'nlidax', 'nliday', 'nlidaz', 'nlidbw', 'nlidbx', 'nlidby', 'nlidbz', 'nlidcw', 'nlidcx', 'nlidcy', 'nlidcz', 'nlieaw', 'nlieax', 'nlieay', 'nlieaz', 'nliebw', 'nliebx', 'nlieby', 'nliebz', 'nliecw', 'nliecx', 'nliecy', 'nliecz', 'nlifaw', 'nlifax', 'nlifay', 'nlifaz', 'nlifbw', 'nlifbx', 'nlifby', 'nlifbz', 'nlifcw', 'nlifcx', 'nlifcy', 'nlifcz', 'ojgdaw', 'ojgdax', 'ojgday', 'ojgdaz', 'ojgdbw', 'ojgdbx', 'ojgdby', 'ojgdbz', 'ojgdcw', 'ojgdcx', 'ojgdcy', 'ojgdcz', 'ojgeaw', 'ojgeax', 'ojgeay', 'ojgeaz', 'ojgebw', 'ojgebx', 'ojgeby', 'ojgebz', 'ojgecw', 'ojgecx', 'ojgecy', 'ojgecz', 'ojgfaw', 'ojgfax', 'ojgfay', 'ojgfaz', 'ojgfbw', 'ojgfbx', 'ojgfby', 'ojgfbz', 'ojgfcw', 'ojgfcx', 'ojgfcy', 'ojgfcz', 'ojhdaw', 'ojhdax', 'ojhday', 'ojhdaz', 'ojhdbw', 'ojhdbx', 'ojhdby', 'ojhdbz', 'ojhdcw', 'ojhdcx', 'ojhdcy', 'ojhdcz', 'ojheaw', 'ojheax', 'ojheay', 'ojheaz', 'ojhebw', 'ojhebx', 'ojheby', 'ojhebz', 'ojhecw', 'ojhecx', 'ojhecy', 'ojhecz', 'ojhfaw', 'ojhfax', 'ojhfay', 'ojhfaz', 'ojhfbw', 'ojhfbx', 'ojhfby', 'ojhfbz', 'ojhfcw', 'ojhfcx', 'ojhfcy', 'ojhfcz', 'ojidaw', 'ojidax', 'ojiday', 'ojidaz', 'ojidbw', 'ojidbx', 'ojidby', 'ojidbz', 'ojidcw', 'ojidcx', 'ojidcy', 'ojidcz', 'ojieaw', 'ojieax', 'ojieay', 'ojieaz', 'ojiebw', 'ojiebx', 'ojieby', 'ojiebz', 'ojiecw', 'ojiecx', 'ojiecy', 'ojiecz', 'ojifaw', 'ojifax', 'ojifay', 'ojifaz', 'ojifbw', 'ojifbx', 'ojifby', 'ojifbz', 'ojifcw', 'ojifcx', 'ojifcy', 'ojifcz', 'okgdaw', 'okgdax', 'okgday', 'okgdaz', 'okgdbw', 'okgdbx', 'okgdby', 'okgdbz', 'okgdcw', 'okgdcx', 'okgdcy', 'okgdcz', 'okgeaw', 'okgeax', 'okgeay', 'okgeaz', 'okgebw', 'okgebx', 'okgeby', 'okgebz', 'okgecw', 'okgecx', 'okgecy', 'okgecz', 'okgfaw', 'okgfax', 'okgfay', 'okgfaz', 'okgfbw', 'okgfbx', 'okgfby', 'okgfbz', 'okgfcw', 'okgfcx', 'okgfcy', 'okgfcz', 'okhdaw', 'okhdax', 'okhday', 'okhdaz', 'okhdbw', 'okhdbx', 'okhdby', 'okhdbz', 'okhdcw', 'okhdcx', 'okhdcy', 'okhdcz', 'okheaw', 'okheax', 'okheay', 'okheaz', 'okhebw', 'okhebx', 'okheby', 'okhebz', 'okhecw', 'okhecx', 'okhecy', 'okhecz', 'okhfaw', 'okhfax', 'okhfay', 'okhfaz', 'okhfbw', 'okhfbx', 'okhfby', 'okhfbz', 'okhfcw', 'okhfcx', 'okhfcy', 'okhfcz', 'okidaw', 'okidax', 'okiday', 'okidaz', 'okidbw', 'okidbx', 'okidby', 'okidbz', 'okidcw', 'okidcx', 'okidcy', 'okidcz', 'okieaw', 'okieax', 'okieay', 'okieaz', 'okiebw', 'okiebx', 'okieby', 'okiebz', 'okiecw', 'okiecx', 'okiecy', 'okiecz', 'okifaw', 'okifax', 'okifay', 'okifaz', 'okifbw', 'okifbx', 'okifby', 'okifbz', 'okifcw', 'okifcx', 'okifcy', 'okifcz', 'olgdaw', 'olgdax', 'olgday', 'olgdaz', 'olgdbw', 'olgdbx', 'olgdby', 'olgdbz', 'olgdcw', 'olgdcx', 'olgdcy', 'olgdcz', 'olgeaw', 'olgeax', 'olgeay', 'olgeaz', 'olgebw', 'olgebx', 'olgeby', 'olgebz', 'olgecw', 'olgecx', 'olgecy', 'olgecz', 'olgfaw', 'olgfax', 'olgfay', 'olgfaz', 'olgfbw', 'olgfbx', 'olgfby', 'olgfbz', 'olgfcw', 'olgfcx', 'olgfcy', 'olgfcz', 'olhdaw', 'olhdax', 'olhday', 'olhdaz', 'olhdbw', 'olhdbx', 'olhdby', 'olhdbz', 'olhdcw', 'olhdcx', 'olhdcy', 'olhdcz', 'olheaw', 'olheax', 'olheay', 'olheaz', 'olhebw', 'olhebx', 'olheby', 'olhebz', 'olhecw', 'olhecx', 'olhecy', 'olhecz', 'olhfaw', 'olhfax', 'olhfay', 'olhfaz', 'olhfbw', 'olhfbx', 'olhfby', 'olhfbz', 'olhfcw', 'olhfcx', 'olhfcy', 'olhfcz', 'olidaw', 'olidax', 'oliday', 'olidaz', 'olidbw', 'olidbx', 'olidby', 'olidbz', 'olidcw', 'olidcx', 'olidcy', 'olidcz', 'olieaw', 'olieax', 'olieay', 'olieaz', 'oliebw', 'oliebx', 'olieby', 'oliebz', 'oliecw', 'oliecx', 'oliecy', 'oliecz', 'olifaw', 'olifax', 'olifay', 'olifaz', 'olifbw', 'olifbx', 'olifby', 'olifbz', 'olifcw', 'olifcx', 'olifcy', 'olifcz']\n assert 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"}, "metadata": {"canonical_parameter_names": ["digits"], "leetcode_dataset_entry_point": "Solution().letterCombinations", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector letterCombinations(string digits) {", "container": "Solution", "callable": "letterCombinations", "parameters": [{"name": "digits", "type": "string"}], "return_type": "vector", "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\n0 <= a, b, c, d < n\na, b, c, and d are distinct.\nnums[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\n \nConstraints:\n\n1 <= nums.length <= 200\n-109 <= nums[i] <= 109\n-109 <= target <= 109\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 0, -1, 0, -2, 2],target = 0) == [[-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]]\n assert candidate(nums = [-3, -1, 0, 2, 4, 5],target = 0) == [[-3, -1, 0, 4]]\n assert candidate(nums = [-1, -2, -3, -4, -5],target = -14) == [[-5, -4, -3, -2]]\n assert candidate(nums = [0, 0, 0, 0],target = 0) == [[0, 0, 0, 0]]\n assert 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000],target = 4000000000) == [[1000000000, 1000000000, 1000000000, 1000000000]]\n assert candidate(nums = [-1, -2, -3, -4, -5],target = -10) == [[-4, -3, -2, -1]]\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000],target = 4000000000) == [[1000000000, 1000000000, 1000000000, 1000000000]]\n assert candidate(nums = [2, 2, 2, 2, 2],target = 8) == [[2, 2, 2, 2]]\n assert 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 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 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 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 candidate(nums = [-1, 0, 1, 2, -1, -4],target = -1) == [[-4, 0, 1, 2], [-1, -1, 0, 1]]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8],target = 10) == [[1, 2, 3, 4]]\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == [[1, 2, 3, 4]]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1, -1, 2, -2],target = 4000000000) == [[1000000000, 1000000000, 1000000000, 1000000000]]\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) == [[-1, -1, 1, 1]]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 35) == []\n assert candidate(nums = [-1, 2, 2, -5, 0, -1, 4],target = 3) == [[-5, 2, 2, 4], [-1, 0, 2, 2]]\n assert 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 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 candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 1) == []\n assert candidate(nums = [1, -2, -5, -4, -3, 3, 3, 5],target = -11) == [[-5, -4, -3, 1]]\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 1],target = 0) == [[-1, -1, 1, 1], [-1, 0, 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, 0],target = 0) == [[0, 0, 0, 0]]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],target = 5000000000) == []\n assert 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 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 candidate(nums = [-1000000000, -1000000000, 1000000000, 1000000000, -1000000000, 1000000000, 0, 0],target = 0) == [[-1000000000, -1000000000, 1000000000, 1000000000], [-1000000000, 0, 0, 1000000000]]\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 = 4) == [[1, 1, 1, 1]]\n assert 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 candidate(nums = [1000000000, 1000000000, -1000000000, -1000000000, 500000000, -500000000],target = 0) == [[-1000000000, -1000000000, 1000000000, 1000000000], [-1000000000, -500000000, 500000000, 1000000000]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [[0, 0, 0, 0]]\n assert 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 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 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 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 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 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 candidate(nums = [1000000000, -1000000000, 2000000000, -2000000000, 500000000, -500000000],target = 0) == [[-2000000000, -1000000000, 1000000000, 2000000000], [-2000000000, -500000000, 500000000, 2000000000], [-1000000000, -500000000, 500000000, 1000000000]]\n assert 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 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 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 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 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 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 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 candidate(nums = [-1, 2, 2, -5, 0, 2, 4],target = 3) == [[-5, 2, 2, 4], [-1, 0, 2, 2]]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 0, 0, 0, 0],target = 3000000000) == [[0, 1000000000, 1000000000, 1000000000]]\n assert 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 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 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 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 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 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 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 candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 8) == [[2, 2, 2, 2]]\n assert 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 candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [[0, 0, 0, 0]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [[0, 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],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 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 candidate(nums = [-1, -1, -1, -1, 1, 1, 1, 1],target = 0) == [[-1, -1, 1, 1]]\n assert 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 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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().fourSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> fourSum(vector& nums, int target) {", "container": "Solution", "callable": "fourSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 19, "task_id": "remove-nth-node-from-end-of-list", "difficulty": "Medium", "problem_description": "Given the head of a linked list, remove the nth node from the end of the list and return its head.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5], n = 2\nOutput: [1,2,3,5]\n\nExample 2:\n\nInput: head = [1], n = 1\nOutput: []\n\nExample 3:\n\nInput: head = [1,2], n = 1\nOutput: [1]\n\n \nConstraints:\n\nThe number of nodes in the list is sz.\n1 <= sz <= 30\n0 <= Node.val <= 100\n1 <= n <= sz\n\n \nFollow up: Could you do this in one pass?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([100, 90, 80, 70, 60]),n = 3), list_node([100, 90, 70, 60]))\n assert is_same_list(candidate(head = list_node([1, 2]),n = 1), list_node([1]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),n = 5), list_node([4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),n = 2), list_node([1, 2, 3, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),n = 5), list_node([1, 2, 3, 4, 5, 7, 8, 9, 10]))\n assert candidate(head = list_node([1]),n = 1) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3]),n = 3), list_node([2, 3]))\n assert is_same_list(candidate(head = list_node([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]),n = 15), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),n = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),n = 5), list_node([10, 20, 30, 40, 50, 70, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([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 = 1), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),n = 3), list_node([1, 2, 3, 4, 5, 6, 7, 9, 10]))\n assert is_same_list(candidate(head = list_node([30, 20, 10]),n = 2), list_node([30, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 29), list_node([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 is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 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 = 30), list_node([1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]),n = 13), list_node([7, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60]),n = 1), list_node([10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([2, 3, 4, 5]),n = 1), list_node([2, 3, 4]))\n assert is_same_list(candidate(head = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0]),n = 2), list_node([1, 0, 1, 0, 1, 0, 1, 0, 0]))\n assert is_same_list(candidate(head = list_node([5, 10]),n = 2), list_node([10]))\n assert is_same_list(candidate(head = list_node([3, 2, 1]),n = 1), list_node([3, 2]))\n assert is_same_list(candidate(head = list_node([99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89]),n = 1), list_node([99, 98, 97, 96, 95, 94, 93, 92, 91, 90]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90]),n = 5), list_node([10, 20, 30, 40, 60, 70, 80, 90]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 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 = 10), list_node([1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),n = 10), list_node([20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert candidate(head = list_node([5]),n = 1) == None\n assert is_same_list(candidate(head = list_node([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 = 29), list_node([30, 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 is_same_list(candidate(head = list_node([3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45]),n = 7), list_node([3, 6, 9, 12, 15, 18, 21, 24, 30, 33, 36, 39, 42, 45]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 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 = 29), list_node([1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),n = 10), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([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]),n = 30), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),n = 10), list_node([2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]),n = 10), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 65, 70, 75, 80, 85, 90, 95, 100]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30]),n = 16), list_node([3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 30]))\n assert is_same_list(candidate(head = list_node([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 = 1), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),n = 5), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90]),n = 3), list_node([100, 99, 98, 97, 96, 95, 94, 93, 91, 90]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),n = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_list(candidate(head = list_node([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]),n = 10), list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9, 7, 9, 3, 2, 3, 8, 4, 6, 6, 4, 3, 3, 8, 3, 2, 7, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 25), list_node([1, 2, 3, 4, 5, 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 is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 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 = 28), list_node([5, 5, 5, 5, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),n = 10), list_node([1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 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 = 29), list_node([5, 5, 5, 5, 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 is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 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 = 20), list_node([1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([3, 5, 1, 2, 4, 7, 6, 8, 9]),n = 3), list_node([3, 5, 1, 2, 4, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]),n = 1), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28]))\n assert is_same_list(candidate(head = list_node([1, 2]),n = 2), list_node([2]))\n assert is_same_list(candidate(head = list_node([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]),n = 28), list_node([1, 3, 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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),n = 4), list_node([1, 2, 3, 4, 5, 6, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),n = 4), list_node([9, 8, 7, 6, 5, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([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 = 15), list_node([30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 1), list_node([1, 2, 3, 4, 5, 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 is_same_list(candidate(head = list_node([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 = 2), list_node([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 is_same_list(candidate(head = list_node([2, 3, 4, 5]),n = 4), list_node([3, 4, 5]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]),n = 14), list_node([10, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),n = 1), list_node([10, 20, 30, 40, 50, 60, 70, 80, 90]))\n assert is_same_list(candidate(head = list_node([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 = 29), list_node([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 is_same_list(candidate(head = list_node([3, 3, 3, 3, 3, 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 = 15), list_node([3, 3, 3, 3, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 30), list_node([2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 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 = 25), list_node([5, 5, 5, 5, 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 is_same_list(candidate(head = list_node([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]),n = 15), list_node([99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70]))\n assert is_same_list(candidate(head = list_node([6, 2, 8, 2, 8, 4, 1, 8, 5, 2, 8, 6, 4, 3, 2, 8, 6, 2, 4, 3, 8, 2, 6, 4, 3, 2, 8, 6, 2, 4]),n = 20), list_node([6, 2, 8, 2, 8, 4, 1, 8, 5, 2, 6, 4, 3, 2, 8, 6, 2, 4, 3, 8, 2, 6, 4, 3, 2, 8, 6, 2, 4]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),n = 20), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([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]),n = 10), list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 79, 78, 77, 76, 75, 74, 73, 72, 71]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),n = 10), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([99, 88, 77, 66, 55, 44, 33, 22, 11]),n = 9), list_node([88, 77, 66, 55, 44, 33, 22, 11]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),n = 1), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]),n = 14), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]))\n assert is_same_list(candidate(head = list_node([7, 7, 7, 7, 7, 7, 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 = 15), list_node([7, 7, 7, 7, 7, 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 is_same_list(candidate(head = list_node([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]),n = 1), list_node([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]))\n assert is_same_list(candidate(head = list_node([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]),n = 1), list_node([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]))\n assert is_same_list(candidate(head = list_node([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]),n = 30), list_node([0, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),n = 7), list_node([1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([3, 2, 1]),n = 2), list_node([3, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 2), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),n = 8), list_node([1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 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 = 15), list_node([0, 0, 0, 0, 0, 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 is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),n = 9), list_node([8, 7, 6, 5, 4, 3, 2, 1]))\n"}, "metadata": {"canonical_parameter_names": ["head", "n"], "leetcode_dataset_entry_point": "Solution().removeNthFromEnd", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* removeNthFromEnd(ListNode* head, int n) {", "container": "Solution", "callable": "removeNthFromEnd", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "n", "type": "int"}], "return_type": "ListNode*", "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.\nAn input string is valid if:\n\nOpen brackets must be closed by the same type of brackets.\nOpen brackets must be closed in the correct order.\nEvery close bracket has a corresponding open bracket of the same type.\n\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\n \nConstraints:\n\n1 <= s.length <= 104\ns consists of parentheses only '()[]{}'.\n\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 = \"\") == 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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().isValid", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isValid(string s) {", "container": "Solution", "callable": "isValid", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 21, "task_id": "merge-two-sorted-lists", "difficulty": "Easy", "problem_description": "You are given the heads of two sorted linked lists list1 and list2.\nMerge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists.\nReturn the head of the merged linked list.\n \nExample 1:\n\n\nInput: list1 = [1,2,4], list2 = [1,3,4]\nOutput: [1,1,2,3,4,4]\n\nExample 2:\n\nInput: list1 = [], list2 = []\nOutput: []\n\nExample 3:\n\nInput: list1 = [], list2 = [0]\nOutput: [0]\n\n \nConstraints:\n\nThe number of nodes in both lists is in the range [0, 50].\n-100 <= Node.val <= 100\nBoth list1 and list2 are sorted in non-decreasing order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(list1 = list_node([1, 1, 1]),list2 = list_node([1, 1, 1])), list_node([1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30]),list2 = list_node([5, 15, 25, 35])), list_node([5, 10, 15, 20, 25, 30, 35]))\n assert is_same_list(candidate(list1 = list_node([-1, 0, 2]),list2 = list_node([-2, -1, 0])), list_node([-2, -1, -1, 0, 0, 2]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([2, 4, 6, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([10]),list2 = list_node([10])), list_node([10, 10]))\n assert is_same_list(candidate(list1 = list_node([100]),list2 = list_node([50, 75, 100])), list_node([50, 75, 100, 100]))\n assert is_same_list(candidate(list1 = list_node([-100, 0, 100]),list2 = list_node([-50, 50])), list_node([-100, -50, 0, 50, 100]))\n assert is_same_list(candidate(list1 = list_node([5]),list2 = list_node([4])), list_node([4, 5]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7]),list2 = list_node([2, 4, 6, 8])), list_node([1, 2, 3, 4, 5, 6, 7, 8]))\n assert candidate(list1 = list_node([]),list2 = list_node([])) == None\n assert is_same_list(candidate(list1 = list_node([5]),list2 = list_node([1, 2, 3])), list_node([1, 2, 3, 5]))\n assert is_same_list(candidate(list1 = list_node([-100, 0, 100]),list2 = list_node([-50, 50])), list_node([-100, -50, 0, 50, 100]))\n assert is_same_list(candidate(list1 = list_node([]),list2 = list_node([0])), list_node([0]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0]),list2 = list_node([-20, -15, -10])), list_node([-20, -15, -10, -10, -5, 0]))\n assert is_same_list(candidate(list1 = list_node([1, 1, 1, 1]),list2 = list_node([1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(list1 = list_node([-1, -2, -3]),list2 = list_node([-4, -5, -6])), list_node([-4, -5, -6, -1, -2, -3]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 4]),list2 = list_node([1, 3, 4])), list_node([1, 1, 2, 3, 4, 4]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3]),list2 = list_node([4, 5, 6])), list_node([1, 2, 3, 4, 5, 6]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5]),list2 = list_node([6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(list1 = list_node([-100, -50, 0, 50, 100]),list2 = list_node([-200, -150, -100, -50, 0])), list_node([-200, -150, -100, -100, -50, -50, 0, 0, 50, 100]))\n assert is_same_list(candidate(list1 = list_node([-99, -98, -97]),list2 = list_node([-96, -95, -94])), list_node([-99, -98, -97, -96, -95, -94]))\n assert is_same_list(candidate(list1 = list_node([-100, -99, -98]),list2 = list_node([-100, -99, -98])), list_node([-100, -100, -99, -99, -98, -98]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0, 5, 10]),list2 = list_node([-20, -15, -10, -5, 0])), list_node([-20, -15, -10, -10, -5, -5, 0, 0, 5, 10]))\n assert is_same_list(candidate(list1 = list_node([30, 40, 50]),list2 = list_node([10, 20, 30, 40, 50, 60])), list_node([10, 20, 30, 30, 40, 40, 50, 50, 60]))\n assert is_same_list(candidate(list1 = list_node([2, 4, 6, 8]),list2 = list_node([1, 3, 5, 7, 9, 11, 13, 15])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 15]))\n assert is_same_list(candidate(list1 = list_node([-99, -50, -20, 0, 20, 50]),list2 = list_node([-98, -49, -19, -1, 19, 49])), list_node([-99, -98, -50, -49, -20, -19, -1, 0, 19, 20, 49, 50]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0, 5, 10]),list2 = list_node([-11, -6, -1, 6, 11])), list_node([-11, -10, -6, -5, -1, 0, 5, 6, 10, 11]))\n assert is_same_list(candidate(list1 = list_node([1]),list2 = list_node([2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([0, 1, 2, 3, 4]),list2 = list_node([-4, -3, -2, -1, 0])), list_node([-4, -3, -2, -1, 0, 0, 1, 2, 3, 4]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9, 11, 13]),list2 = list_node([2, 4, 6, 8, 10, 12, 14])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_list(candidate(list1 = list_node([50, 100, 150, 200, 250, 300]),list2 = list_node([25, 75, 125, 175, 225, 275, 325])), list_node([25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325]))\n assert is_same_list(candidate(list1 = list_node([50, 45, 40, 35, 30]),list2 = list_node([25, 20, 15, 10, 5, 0])), list_node([25, 20, 15, 10, 5, 0, 50, 45, 40, 35, 30]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(list1 = list_node([-1, 2, 4, 6, 8]),list2 = list_node([0, 3, 5, 7, 9])), list_node([-1, 0, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50]),list2 = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([2, 4, 6, 8, 10, 10, 12, 14, 16, 18, 20, 20, 30, 40, 50]))\n assert is_same_list(candidate(list1 = list_node([0, 2, 4, 6, 8, 10]),list2 = list_node([1, 3, 5, 7, 9])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([-1, -2, -3, -4, -5]),list2 = list_node([-5, -4, -3, -2, -1])), list_node([-5, -4, -3, -2, -1, -2, -3, -4, -5, -1]))\n assert is_same_list(candidate(list1 = list_node([-99, -98, -97, -96]),list2 = list_node([-95, -94, -93, -92])), list_node([-99, -98, -97, -96, -95, -94, -93, -92]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5]),list2 = list_node([0, -1, -2, -3, -4, -5])), list_node([0, -1, -2, -3, -4, -5, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(list1 = list_node([-5, -4, -3, -2, -1]),list2 = list_node([0, 1, 2, 3, 4, 5])), list_node([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(list1 = list_node([-1, 2, -3, 4, -5]),list2 = list_node([1, -2, 3, -4, 5])), list_node([-1, 1, -2, 2, -3, 3, -4, 4, -5, 5]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),list2 = list_node([5, 15, 25, 35, 45, 55, 65, 75, 85, 95])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([10, 20, 30, 40, 50])), list_node([1, 3, 5, 7, 9, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(list1 = list_node([0, 2, 4, 6, 8]),list2 = list_node([1, 3, 5, 7, 9])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(list1 = list_node([-100, -50, 0, 50, 100]),list2 = list_node([])), list_node([-100, -50, 0, 50, 100]))\n assert is_same_list(candidate(list1 = list_node([-10, -8, -6, -4, -2]),list2 = list_node([-9, -7, -5, -3, -1])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(list1 = list_node([-100, -50, 0, 50, 100]),list2 = list_node([-75, -25, 25, 75])), list_node([-100, -75, -50, -25, 0, 25, 50, 75, 100]))\n assert is_same_list(candidate(list1 = list_node([1]),list2 = list_node([2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([1, 3, 5, 7, 9])), list_node([1, 1, 3, 3, 5, 5, 7, 7, 9, 9]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(list1 = list_node([-50, -40, -30]),list2 = list_node([-20, -10, 0, 10, 20, 30])), list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([2, 4, 6, 8, 10, 12, 14])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14]))\n assert is_same_list(candidate(list1 = list_node([100, 101, 102, 103]),list2 = list_node([104, 105, 106, 107])), list_node([100, 101, 102, 103, 104, 105, 106, 107]))\n assert is_same_list(candidate(list1 = list_node([-100, -50, -10]),list2 = list_node([-200, -150, -100, -50, -10])), list_node([-200, -150, -100, -100, -50, -50, -10, -10]))\n assert is_same_list(candidate(list1 = list_node([1]),list2 = list_node([1, 2, 3, 4, 5])), list_node([1, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30]),list2 = list_node([5, 15, 25, 35, 45, 55, 65])), list_node([5, 10, 15, 20, 25, 30, 35, 45, 55, 65]))\n assert is_same_list(candidate(list1 = list_node([100, 90, 80, 70, 60]),list2 = list_node([50, 40, 30, 20, 10])), list_node([50, 40, 30, 20, 10, 100, 90, 80, 70, 60]))\n assert is_same_list(candidate(list1 = list_node([10]),list2 = list_node([5, 15, 25, 35, 45])), list_node([5, 10, 15, 25, 35, 45]))\n assert is_same_list(candidate(list1 = list_node([100, 200, 300]),list2 = list_node([50, 150, 250, 350])), list_node([50, 100, 150, 200, 250, 300, 350]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([5])), list_node([1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([-99, -50, 0, 25, 75, 100]),list2 = list_node([-100, -75, -25, -1, 50, 100])), list_node([-100, -99, -75, -50, -25, -1, 0, 25, 50, 75, 100, 100]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),list2 = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 24, 26, 28, 30]))\n assert is_same_list(candidate(list1 = list_node([2, 4, 6, 8, 10]),list2 = list_node([1, 3, 5, 7, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([100]),list2 = list_node([-100, -50, 0, 50, 75])), list_node([-100, -50, 0, 50, 75, 100]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3]),list2 = list_node([4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5]),list2 = list_node([])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(list1 = list_node([-1, 0, 1, 2, 3]),list2 = list_node([-3, -2, -1, 0, 1])), list_node([-3, -2, -1, -1, 0, 0, 1, 1, 2, 3]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50]),list2 = list_node([5, 15, 25, 35, 45])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([2, 4, 6, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(list1 = list_node([-1, -3, -5, -7, -9]),list2 = list_node([-2, -4, -6, -8, -10])), list_node([-2, -4, -6, -8, -10, -1, -3, -5, -7, -9]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30]),list2 = list_node([5, 15, 25, 35, 45])), list_node([5, 10, 15, 20, 25, 30, 35, 45]))\n assert is_same_list(candidate(list1 = list_node([-1, 0, 1]),list2 = list_node([-2, -1, 0, 1, 2])), list_node([-2, -1, -1, 0, 0, 1, 1, 2]))\n assert is_same_list(candidate(list1 = list_node([50]),list2 = list_node([50, 50, 50, 50, 50])), list_node([50, 50, 50, 50, 50, 50]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3]),list2 = list_node([1, 2, 3, 4, 5])), list_node([1, 1, 2, 2, 3, 3, 4, 5]))\n assert is_same_list(candidate(list1 = list_node([50]),list2 = list_node([-50, 0, 50, 100])), list_node([-50, 0, 50, 50, 100]))\n assert is_same_list(candidate(list1 = list_node([-5, -3, -1]),list2 = list_node([-4, -2, 0, 2, 4])), list_node([-5, -4, -3, -2, -1, 0, 2, 4]))\n assert is_same_list(candidate(list1 = list_node([5, 10, 15, 20]),list2 = list_node([25, 30, 35, 40, 45, 50])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50]))\n assert is_same_list(candidate(list1 = list_node([-99, -50, 0, 25, 75]),list2 = list_node([-100, -25, -1, 50, 100])), list_node([-100, -99, -50, -25, -1, 0, 25, 50, 75, 100]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0, 5, 10]),list2 = list_node([-20, -15, -10, 0, 15, 20])), list_node([-20, -15, -10, -10, -5, 0, 0, 5, 10, 15, 20]))\n assert is_same_list(candidate(list1 = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),list2 = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([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]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),list2 = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(list1 = list_node([0, 0, 0, 0, 0]),list2 = list_node([0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9]),list2 = list_node([2, 4, 6, 8, 10, 11, 12])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))\n assert is_same_list(candidate(list1 = list_node([-50, -40, -30, -20, -10]),list2 = list_node([-60, -55, -45, -35, -25])), list_node([-60, -55, -50, -45, -40, -35, -30, -25, -20, -10]))\n assert is_same_list(candidate(list1 = list_node([-3, -2, -1, 0, 1, 2, 3]),list2 = list_node([-4, -3, -2, -1, 0, 1, 2, 3, 4])), list_node([-4, -3, -3, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 4]))\n assert is_same_list(candidate(list1 = list_node([0, 0, 0, 0]),list2 = list_node([-1, -2, -3, -4])), list_node([-1, -2, -3, -4, 0, 0, 0, 0]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0, 5, 10]),list2 = list_node([-20, -15, -10, -5, 0, 5, 10])), list_node([-20, -15, -10, -10, -5, -5, 0, 0, 5, 5, 10, 10]))\n assert is_same_list(candidate(list1 = list_node([-10, -5, 0, 5, 10]),list2 = list_node([-15, -10, -5, 0, 5])), list_node([-15, -10, -10, -5, -5, 0, 0, 5, 5, 10]))\n assert is_same_list(candidate(list1 = list_node([]),list2 = list_node([-50, -25, 0, 25, 50, 75])), list_node([-50, -25, 0, 25, 50, 75]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5]),list2 = list_node([5, 6, 7, 8, 9])), list_node([1, 2, 3, 4, 5, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(list1 = list_node([100, 200, 300]),list2 = list_node([50, 150, 250, 350])), list_node([50, 100, 150, 200, 250, 300, 350]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50]),list2 = list_node([5, 15, 25, 35, 45])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50]))\n assert is_same_list(candidate(list1 = list_node([-1, 0, 3, 10, 20, 30, 40, 50]),list2 = list_node([1, 2, 4, 5, 8, 13, 21, 25, 35, 45, 55])), list_node([-1, 0, 1, 2, 3, 4, 5, 8, 10, 13, 20, 21, 25, 30, 35, 40, 45, 50, 55]))\n assert is_same_list(candidate(list1 = list_node([-20, -10, 0, 10, 20]),list2 = list_node([-15, -5, 5, 15, 25])), list_node([-20, -15, -10, -5, 0, 5, 10, 15, 20, 25]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9, 11]),list2 = list_node([2, 4, 6, 8, 10, 12])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))\n assert is_same_list(candidate(list1 = list_node([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]),list2 = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50]),list2 = list_node([5, 15, 25, 35, 45, 55])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(list1 = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),list2 = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(list1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),list2 = list_node([11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(list1 = list_node([-99, -98, -97, -96, -95]),list2 = list_node([-94, -93, -92, -91, -90])), list_node([-99, -98, -97, -96, -95, -94, -93, -92, -91, -90]))\n assert is_same_list(candidate(list1 = list_node([10, 20, 30, 40, 50]),list2 = list_node([25, 35, 45, 55, 65])), list_node([10, 20, 25, 30, 35, 40, 45, 50, 55, 65]))\n assert is_same_list(candidate(list1 = list_node([100]),list2 = list_node([-100])), list_node([-100, 100]))\n assert is_same_list(candidate(list1 = list_node([1, 4, 7, 10]),list2 = list_node([2, 5, 8, 11])), list_node([1, 2, 4, 5, 7, 8, 10, 11]))\n assert is_same_list(candidate(list1 = list_node([-1, 0, 1]),list2 = list_node([-2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-2, -3, -4, -5, -6, -7, -8, -9, -10, -1, 0, 1]))\n assert is_same_list(candidate(list1 = list_node([50, 60, 70, 80, 90]),list2 = list_node([40, 55, 65, 75, 85])), list_node([40, 50, 55, 60, 65, 70, 75, 80, 85, 90]))\n assert is_same_list(candidate(list1 = list_node([5, 10, 15, 20, 25]),list2 = list_node([3, 8, 13, 18, 23])), list_node([3, 5, 8, 10, 13, 15, 18, 20, 23, 25]))\n assert is_same_list(candidate(list1 = list_node([-1, -2, -3, -4, -5]),list2 = list_node([-1, -2, -3, -4, -5])), list_node([-1, -2, -3, -4, -5, -1, -2, -3, -4, -5]))\n assert is_same_list(candidate(list1 = list_node([-50, -40, -30, -20, -10]),list2 = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), list_node([-50, -40, -30, -20, -10, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert is_same_list(candidate(list1 = list_node([-10, -20, -30, -40, -50]),list2 = list_node([-5, -15, -25, -35, -45])), list_node([-10, -20, -30, -40, -50, -5, -15, -25, -35, -45]))\n"}, "metadata": {"canonical_parameter_names": ["list1", "list2"], "leetcode_dataset_entry_point": "Solution().mergeTwoLists", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* mergeTwoLists(ListNode* list1, ListNode* list2) {", "container": "Solution", "callable": "mergeTwoLists", "parameters": [{"name": "list1", "type": "ListNode*"}, {"name": "list2", "type": "ListNode*"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 22, "task_id": "generate-parentheses", "difficulty": "Medium", "problem_description": "Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.\n \nExample 1:\nInput: n = 3\nOutput: [\"((()))\",\"(()())\",\"(())()\",\"()(())\",\"()()()\"]\nExample 2:\nInput: n = 1\nOutput: [\"()\"]\n\n \nConstraints:\n\n1 <= n <= 8\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == ['(((((((())))))))', '((((((()()))))))', '((((((())())))))', '((((((()))()))))', '((((((())))())))', '((((((()))))()))', '((((((())))))())', '((((((()))))))()', '(((((()(()))))))', '(((((()()())))))', '(((((()())()))))', '(((((()()))())))', '(((((()())))()))', '(((((()()))))())', '(((((()())))))()', '(((((())(())))))', '(((((())()()))))', '(((((())())())))', '(((((())()))()))', '(((((())())))())', '(((((())()))))()', '(((((()))(()))))', '(((((()))()())))', '(((((()))())()))', '(((((()))()))())', '(((((()))())))()', '(((((())))(())))', '(((((())))()()))', '(((((())))())())', '(((((())))()))()', '(((((()))))(()))', '(((((()))))()())', '(((((()))))())()', '(((((())))))(())', '(((((())))))()()', '((((()((()))))))', '((((()(()())))))', '((((()(())()))))', '((((()(()))())))', '((((()(())))()))', '((((()(()))))())', '((((()(())))))()', '((((()()(())))))', '((((()()()()))))', '((((()()())())))', '((((()()()))()))', '((((()()())))())', '((((()()()))))()', '((((()())(()))))', '((((()())()())))', '((((()())())()))', '((((()())()))())', '((((()())())))()', '((((()()))(())))', '((((()()))()()))', '((((()()))())())', '((((()()))()))()', '((((()())))(()))', '((((()())))()())', '((((()())))())()', '((((()()))))(())', '((((()()))))()()', '((((())((())))))', '((((())(()()))))', '((((())(())())))', '((((())(()))()))', '((((())(())))())', '((((())(()))))()', '((((())()(()))))', '((((())()()())))', '((((())()())()))', '((((())()()))())', '((((())()())))()', '((((())())(())))', '((((())())()()))', '((((())())())())', '((((())())()))()', '((((())()))(()))', '((((())()))()())', '((((())()))())()', '((((())())))(())', '((((())())))()()', '((((()))((()))))', '((((()))(()())))', '((((()))(())()))', '((((()))(()))())', '((((()))(())))()', '((((()))()(())))', '((((()))()()()))', '((((()))()())())', '((((()))()()))()', '((((()))())(()))', '((((()))())()())', '((((()))())())()', '((((()))()))(())', '((((()))()))()()', '((((())))((())))', '((((())))(()()))', '((((())))(())())', '((((())))(()))()', '((((())))()(()))', '((((())))()()())', '((((())))()())()', '((((())))())(())', '((((())))())()()', '((((()))))((()))', '((((()))))(()())', '((((()))))(())()', '((((()))))()(())', '((((()))))()()()', '(((()(((()))))))', '(((()((()())))))', '(((()((())()))))', '(((()((()))())))', '(((()((())))()))', '(((()((()))))())', '(((()((())))))()', '(((()(()(())))))', '(((()(()()()))))', '(((()(()())())))', '(((()(()()))()))', '(((()(()())))())', '(((()(()()))))()', '(((()(())(()))))', '(((()(())()())))', '(((()(())())()))', '(((()(())()))())', '(((()(())())))()', '(((()(()))(())))', '(((()(()))()()))', '(((()(()))())())', '(((()(()))()))()', '(((()(())))(()))', '(((()(())))()())', '(((()(())))())()', '(((()(()))))(())', '(((()(()))))()()', '(((()()((())))))', '(((()()(()()))))', '(((()()(())())))', '(((()()(()))()))', '(((()()(())))())', '(((()()(()))))()', '(((()()()(()))))', '(((()()()()())))', '(((()()()())()))', '(((()()()()))())', '(((()()()())))()', '(((()()())(())))', '(((()()())()()))', '(((()()())())())', '(((()()())()))()', '(((()()()))(()))', '(((()()()))()())', '(((()()()))())()', '(((()()())))(())', '(((()()())))()()', '(((()())((()))))', '(((()())(()())))', '(((()())(())()))', '(((()())(()))())', '(((()())(())))()', '(((()())()(())))', '(((()())()()()))', '(((()())()())())', '(((()())()()))()', '(((()())())(()))', '(((()())())()())', '(((()())())())()', '(((()())()))(())', '(((()())()))()()', '(((()()))((())))', '(((()()))(()()))', '(((()()))(())())', '(((()()))(()))()', '(((()()))()(()))', '(((()()))()()())', '(((()()))()())()', '(((()()))())(())', '(((()()))())()()', '(((()())))((()))', '(((()())))(()())', '(((()())))(())()', '(((()())))()(())', '(((()())))()()()', '(((())(((())))))', '(((())((()()))))', '(((())((())())))', '(((())((()))()))', '(((())((())))())', '(((())((()))))()', '(((())(()(()))))', '(((())(()()())))', '(((())(()())()))', '(((())(()()))())', '(((())(()())))()', '(((())(())(())))', '(((())(())()()))', '(((())(())())())', '(((())(())()))()', '(((())(()))(()))', '(((())(()))()())', '(((())(()))())()', '(((())(())))(())', '(((())(())))()()', '(((())()((()))))', '(((())()(()())))', '(((())()(())()))', '(((())()(()))())', '(((())()(())))()', '(((())()()(())))', '(((())()()()()))', '(((())()()())())', '(((())()()()))()', '(((())()())(()))', '(((())()())()())', '(((())()())())()', '(((())()()))(())', '(((())()()))()()', '(((())())((())))', '(((())())(()()))', '(((())())(())())', '(((())())(()))()', '(((())())()(()))', '(((())())()()())', '(((())())()())()', '(((())())())(())', '(((())())())()()', '(((())()))((()))', '(((())()))(()())', '(((())()))(())()', '(((())()))()(())', '(((())()))()()()', '(((()))(((()))))', '(((()))((()())))', '(((()))((())()))', '(((()))((()))())', '(((()))((())))()', '(((()))(()(())))', '(((()))(()()()))', '(((()))(()())())', '(((()))(()()))()', '(((()))(())(()))', '(((()))(())()())', '(((()))(())())()', '(((()))(()))(())', '(((()))(()))()()', '(((()))()((())))', '(((()))()(()()))', '(((()))()(())())', '(((()))()(()))()', '(((()))()()(()))', '(((()))()()()())', '(((()))()()())()', '(((()))()())(())', '(((()))()())()()', '(((()))())((()))', '(((()))())(()())', '(((()))())(())()', '(((()))())()(())', '(((()))())()()()', '(((())))(((())))', '(((())))((()()))', '(((())))((())())', '(((())))((()))()', '(((())))(()(()))', '(((())))(()()())', '(((())))(()())()', '(((())))(())(())', '(((())))(())()()', '(((())))()((()))', '(((())))()(()())', '(((())))()(())()', '(((())))()()(())', '(((())))()()()()', '((()((((()))))))', '((()(((()())))))', '((()(((())()))))', '((()(((()))())))', '((()(((())))()))', '((()(((()))))())', '((()(((())))))()', '((()((()(())))))', '((()((()()()))))', '((()((()())())))', '((()((()()))()))', '((()((()())))())', '((()((()()))))()', '((()((())(()))))', '((()((())()())))', '((()((())())()))', '((()((())()))())', '((()((())())))()', '((()((()))(())))', '((()((()))()()))', '((()((()))())())', '((()((()))()))()', '((()((())))(()))', '((()((())))()())', '((()((())))())()', '((()((()))))(())', '((()((()))))()()', '((()(()((())))))', '((()(()(()()))))', '((()(()(())())))', '((()(()(()))()))', '((()(()(())))())', '((()(()(()))))()', '((()(()()(()))))', '((()(()()()())))', '((()(()()())()))', '((()(()()()))())', '((()(()()())))()', '((()(()())(())))', '((()(()())()()))', '((()(()())())())', '((()(()())()))()', '((()(()()))(()))', '((()(()()))()())', '((()(()()))())()', '((()(()())))(())', '((()(()())))()()', '((()(())((()))))', '((()(())(()())))', '((()(())(())()))', '((()(())(()))())', '((()(())(())))()', '((()(())()(())))', '((()(())()()()))', '((()(())()())())', '((()(())()()))()', '((()(())())(()))', '((()(())())()())', '((()(())())())()', '((()(())()))(())', '((()(())()))()()', '((()(()))((())))', '((()(()))(()()))', '((()(()))(())())', '((()(()))(()))()', '((()(()))()(()))', '((()(()))()()())', '((()(()))()())()', '((()(()))())(())', '((()(()))())()()', '((()(())))((()))', '((()(())))(()())', '((()(())))(())()', '((()(())))()(())', '((()(())))()()()', '((()()(((())))))', '((()()((()()))))', '((()()((())())))', '((()()((()))()))', '((()()((())))())', '((()()((()))))()', '((()()(()(()))))', '((()()(()()())))', '((()()(()())()))', '((()()(()()))())', '((()()(()())))()', '((()()(())(())))', '((()()(())()()))', '((()()(())())())', '((()()(())()))()', '((()()(()))(()))', '((()()(()))()())', '((()()(()))())()', '((()()(())))(())', '((()()(())))()()', '((()()()((()))))', '((()()()(()())))', '((()()()(())()))', '((()()()(()))())', '((()()()(())))()', '((()()()()(())))', '((()()()()()()))', '((()()()()())())', '((()()()()()))()', '((()()()())(()))', '((()()()())()())', '((()()()())())()', '((()()()()))(())', '((()()()()))()()', '((()()())((())))', '((()()())(()()))', '((()()())(())())', '((()()())(()))()', '((()()())()(()))', '((()()())()()())', '((()()())()())()', '((()()())())(())', '((()()())())()()', '((()()()))((()))', '((()()()))(()())', '((()()()))(())()', '((()()()))()(())', '((()()()))()()()', '((()())(((()))))', '((()())((()())))', '((()())((())()))', '((()())((()))())', '((()())((())))()', '((()())(()(())))', '((()())(()()()))', '((()())(()())())', '((()())(()()))()', '((()())(())(()))', '((()())(())()())', '((()())(())())()', '((()())(()))(())', '((()())(()))()()', '((()())()((())))', '((()())()(()()))', '((()())()(())())', '((()())()(()))()', '((()())()()(()))', '((()())()()()())', '((()())()()())()', '((()())()())(())', '((()())()())()()', '((()())())((()))', '((()())())(()())', '((()())())(())()', '((()())())()(())', '((()())())()()()', '((()()))(((())))', '((()()))((()()))', '((()()))((())())', '((()()))((()))()', '((()()))(()(()))', '((()()))(()()())', '((()()))(()())()', '((()()))(())(())', '((()()))(())()()', '((()()))()((()))', '((()()))()(()())', '((()()))()(())()', '((()()))()()(())', '((()()))()()()()', '((())((((())))))', '((())(((()()))))', '((())(((())())))', '((())(((()))()))', '((())(((())))())', '((())(((()))))()', '((())((()(()))))', '((())((()()())))', '((())((()())()))', '((())((()()))())', '((())((()())))()', '((())((())(())))', '((())((())()()))', '((())((())())())', '((())((())()))()', '((())((()))(()))', '((())((()))()())', '((())((()))())()', '((())((())))(())', '((())((())))()()', '((())(()((()))))', '((())(()(()())))', '((())(()(())()))', '((())(()(()))())', '((())(()(())))()', '((())(()()(())))', '((())(()()()()))', '((())(()()())())', '((())(()()()))()', '((())(()())(()))', '((())(()())()())', '((())(()())())()', '((())(()()))(())', '((())(()()))()()', '((())(())((())))', '((())(())(()()))', '((())(())(())())', '((())(())(()))()', '((())(())()(()))', '((())(())()()())', '((())(())()())()', '((())(())())(())', '((())(())())()()', '((())(()))((()))', '((())(()))(()())', '((())(()))(())()', '((())(()))()(())', '((())(()))()()()', '((())()(((()))))', '((())()((()())))', '((())()((())()))', '((())()((()))())', '((())()((())))()', '((())()(()(())))', '((())()(()()()))', '((())()(()())())', '((())()(()()))()', '((())()(())(()))', '((())()(())()())', '((())()(())())()', '((())()(()))(())', '((())()(()))()()', '((())()()((())))', '((())()()(()()))', '((())()()(())())', '((())()()(()))()', '((())()()()(()))', '((())()()()()())', '((())()()()())()', '((())()()())(())', '((())()()())()()', '((())()())((()))', '((())()())(()())', '((())()())(())()', '((())()())()(())', '((())()())()()()', '((())())(((())))', '((())())((()()))', '((())())((())())', '((())())((()))()', '((())())(()(()))', '((())())(()()())', '((())())(()())()', '((())())(())(())', '((())())(())()()', '((())())()((()))', '((())())()(()())', '((())())()(())()', '((())())()()(())', '((())())()()()()', '((()))((((()))))', '((()))(((()())))', '((()))(((())()))', '((()))(((()))())', '((()))(((())))()', '((()))((()(())))', '((()))((()()()))', '((()))((()())())', '((()))((()()))()', '((()))((())(()))', '((()))((())()())', '((()))((())())()', '((()))((()))(())', '((()))((()))()()', '((()))(()((())))', '((()))(()(()()))', '((()))(()(())())', '((()))(()(()))()', '((()))(()()(()))', '((()))(()()()())', '((()))(()()())()', '((()))(()())(())', '((()))(()())()()', '((()))(())((()))', '((()))(())(()())', '((()))(())(())()', '((()))(())()(())', '((()))(())()()()', '((()))()(((())))', '((()))()((()()))', '((()))()((())())', '((()))()((()))()', '((()))()(()(()))', '((()))()(()()())', '((()))()(()())()', '((()))()(())(())', '((()))()(())()()', '((()))()()((()))', '((()))()()(()())', '((()))()()(())()', '((()))()()()(())', '((()))()()()()()', '(()(((((()))))))', '(()((((()())))))', '(()((((())()))))', '(()((((()))())))', '(()((((())))()))', '(()((((()))))())', '(()((((())))))()', '(()(((()(())))))', '(()(((()()()))))', '(()(((()())())))', '(()(((()()))()))', '(()(((()())))())', '(()(((()()))))()', '(()(((())(()))))', '(()(((())()())))', '(()(((())())()))', '(()(((())()))())', '(()(((())())))()', '(()(((()))(())))', '(()(((()))()()))', '(()(((()))())())', '(()(((()))()))()', '(()(((())))(()))', '(()(((())))()())', '(()(((())))())()', '(()(((()))))(())', '(()(((()))))()()', '(()((()((())))))', '(()((()(()()))))', '(()((()(())())))', '(()((()(()))()))', '(()((()(())))())', '(()((()(()))))()', '(()((()()(()))))', '(()((()()()())))', '(()((()()())()))', '(()((()()()))())', '(()((()()())))()', '(()((()())(())))', '(()((()())()()))', '(()((()())())())', '(()((()())()))()', '(()((()()))(()))', '(()((()()))()())', '(()((()()))())()', '(()((()())))(())', '(()((()())))()()', '(()((())((()))))', '(()((())(()())))', '(()((())(())()))', '(()((())(()))())', '(()((())(())))()', '(()((())()(())))', '(()((())()()()))', '(()((())()())())', '(()((())()()))()', '(()((())())(()))', '(()((())())()())', '(()((())())())()', '(()((())()))(())', '(()((())()))()()', '(()((()))((())))', '(()((()))(()()))', '(()((()))(())())', '(()((()))(()))()', '(()((()))()(()))', '(()((()))()()())', '(()((()))()())()', '(()((()))())(())', '(()((()))())()()', '(()((())))((()))', '(()((())))(()())', '(()((())))(())()', '(()((())))()(())', '(()((())))()()()', '(()(()(((())))))', '(()(()((()()))))', '(()(()((())())))', '(()(()((()))()))', '(()(()((())))())', '(()(()((()))))()', '(()(()(()(()))))', '(()(()(()()())))', '(()(()(()())()))', '(()(()(()()))())', '(()(()(()())))()', '(()(()(())(())))', '(()(()(())()()))', '(()(()(())())())', '(()(()(())()))()', '(()(()(()))(()))', '(()(()(()))()())', '(()(()(()))())()', '(()(()(())))(())', '(()(()(())))()()', '(()(()()((()))))', '(()(()()(()())))', '(()(()()(())()))', '(()(()()(()))())', '(()(()()(())))()', '(()(()()()(())))', '(()(()()()()()))', '(()(()()()())())', '(()(()()()()))()', '(()(()()())(()))', '(()(()()())()())', '(()(()()())())()', '(()(()()()))(())', '(()(()()()))()()', '(()(()())((())))', '(()(()())(()()))', '(()(()())(())())', '(()(()())(()))()', '(()(()())()(()))', '(()(()())()()())', '(()(()())()())()', '(()(()())())(())', '(()(()())())()()', '(()(()()))((()))', '(()(()()))(()())', '(()(()()))(())()', '(()(()()))()(())', '(()(()()))()()()', '(()(())(((()))))', '(()(())((()())))', '(()(())((())()))', '(()(())((()))())', '(()(())((())))()', '(()(())(()(())))', '(()(())(()()()))', '(()(())(()())())', '(()(())(()()))()', '(()(())(())(()))', '(()(())(())()())', '(()(())(())())()', '(()(())(()))(())', '(()(())(()))()()', '(()(())()((())))', '(()(())()(()()))', '(()(())()(())())', '(()(())()(()))()', '(()(())()()(()))', '(()(())()()()())', '(()(())()()())()', '(()(())()())(())', '(()(())()())()()', '(()(())())((()))', '(()(())())(()())', '(()(())())(())()', '(()(())())()(())', '(()(())())()()()', '(()(()))(((())))', '(()(()))((()()))', '(()(()))((())())', '(()(()))((()))()', '(()(()))(()(()))', '(()(()))(()()())', '(()(()))(()())()', '(()(()))(())(())', '(()(()))(())()()', '(()(()))()((()))', '(()(()))()(()())', '(()(()))()(())()', '(()(()))()()(())', '(()(()))()()()()', '(()()((((())))))', '(()()(((()()))))', '(()()(((())())))', '(()()(((()))()))', '(()()(((())))())', '(()()(((()))))()', '(()()((()(()))))', '(()()((()()())))', '(()()((()())()))', '(()()((()()))())', '(()()((()())))()', '(()()((())(())))', '(()()((())()()))', '(()()((())())())', '(()()((())()))()', '(()()((()))(()))', '(()()((()))()())', '(()()((()))())()', '(()()((())))(())', '(()()((())))()()', '(()()(()((()))))', '(()()(()(()())))', '(()()(()(())()))', '(()()(()(()))())', '(()()(()(())))()', '(()()(()()(())))', '(()()(()()()()))', '(()()(()()())())', '(()()(()()()))()', '(()()(()())(()))', '(()()(()())()())', '(()()(()())())()', '(()()(()()))(())', '(()()(()()))()()', '(()()(())((())))', '(()()(())(()()))', '(()()(())(())())', '(()()(())(()))()', '(()()(())()(()))', '(()()(())()()())', '(()()(())()())()', '(()()(())())(())', '(()()(())())()()', '(()()(()))((()))', '(()()(()))(()())', '(()()(()))(())()', '(()()(()))()(())', '(()()(()))()()()', '(()()()(((()))))', '(()()()((()())))', '(()()()((())()))', '(()()()((()))())', '(()()()((())))()', '(()()()(()(())))', '(()()()(()()()))', '(()()()(()())())', '(()()()(()()))()', '(()()()(())(()))', '(()()()(())()())', '(()()()(())())()', '(()()()(()))(())', '(()()()(()))()()', '(()()()()((())))', '(()()()()(()()))', '(()()()()(())())', '(()()()()(()))()', '(()()()()()(()))', '(()()()()()()())', '(()()()()()())()', '(()()()()())(())', '(()()()()())()()', '(()()()())((()))', '(()()()())(()())', '(()()()())(())()', '(()()()())()(())', '(()()()())()()()', '(()()())(((())))', '(()()())((()()))', '(()()())((())())', '(()()())((()))()', '(()()())(()(()))', '(()()())(()()())', '(()()())(()())()', '(()()())(())(())', '(()()())(())()()', '(()()())()((()))', '(()()())()(()())', '(()()())()(())()', '(()()())()()(())', '(()()())()()()()', '(()())((((()))))', '(()())(((()())))', '(()())(((())()))', '(()())(((()))())', '(()())(((())))()', '(()())((()(())))', '(()())((()()()))', '(()())((()())())', '(()())((()()))()', '(()())((())(()))', '(()())((())()())', '(()())((())())()', '(()())((()))(())', '(()())((()))()()', '(()())(()((())))', '(()())(()(()()))', '(()())(()(())())', '(()())(()(()))()', '(()())(()()(()))', '(()())(()()()())', '(()())(()()())()', '(()())(()())(())', '(()())(()())()()', '(()())(())((()))', '(()())(())(()())', '(()())(())(())()', '(()())(())()(())', '(()())(())()()()', '(()())()(((())))', '(()())()((()()))', '(()())()((())())', '(()())()((()))()', '(()())()(()(()))', '(()())()(()()())', '(()())()(()())()', '(()())()(())(())', '(()())()(())()()', '(()())()()((()))', '(()())()()(()())', '(()())()()(())()', '(()())()()()(())', '(()())()()()()()', '(())(((((())))))', '(())((((()()))))', '(())((((())())))', '(())((((()))()))', '(())((((())))())', '(())((((()))))()', '(())(((()(()))))', '(())(((()()())))', '(())(((()())()))', '(())(((()()))())', '(())(((()())))()', '(())(((())(())))', '(())(((())()()))', '(())(((())())())', '(())(((())()))()', '(())(((()))(()))', '(())(((()))()())', '(())(((()))())()', '(())(((())))(())', '(())(((())))()()', '(())((()((()))))', '(())((()(()())))', '(())((()(())()))', '(())((()(()))())', '(())((()(())))()', '(())((()()(())))', '(())((()()()()))', '(())((()()())())', '(())((()()()))()', '(())((()())(()))', '(())((()())()())', '(())((()())())()', '(())((()()))(())', '(())((()()))()()', '(())((())((())))', '(())((())(()()))', '(())((())(())())', '(())((())(()))()', '(())((())()(()))', '(())((())()()())', '(())((())()())()', '(())((())())(())', '(())((())())()()', '(())((()))((()))', '(())((()))(()())', '(())((()))(())()', '(())((()))()(())', '(())((()))()()()', '(())(()(((()))))', '(())(()((()())))', '(())(()((())()))', '(())(()((()))())', '(())(()((())))()', '(())(()(()(())))', '(())(()(()()()))', '(())(()(()())())', '(())(()(()()))()', '(())(()(())(()))', '(())(()(())()())', '(())(()(())())()', '(())(()(()))(())', '(())(()(()))()()', '(())(()()((())))', '(())(()()(()()))', '(())(()()(())())', '(())(()()(()))()', '(())(()()()(()))', '(())(()()()()())', '(())(()()()())()', '(())(()()())(())', '(())(()()())()()', '(())(()())((()))', '(())(()())(()())', '(())(()())(())()', '(())(()())()(())', '(())(()())()()()', '(())(())(((())))', '(())(())((()()))', '(())(())((())())', '(())(())((()))()', '(())(())(()(()))', '(())(())(()()())', '(())(())(()())()', '(())(())(())(())', '(())(())(())()()', '(())(())()((()))', '(())(())()(()())', '(())(())()(())()', '(())(())()()(())', '(())(())()()()()', '(())()((((()))))', '(())()(((()())))', '(())()(((())()))', '(())()(((()))())', '(())()(((())))()', '(())()((()(())))', '(())()((()()()))', '(())()((()())())', '(())()((()()))()', '(())()((())(()))', '(())()((())()())', '(())()((())())()', '(())()((()))(())', '(())()((()))()()', '(())()(()((())))', '(())()(()(()()))', '(())()(()(())())', '(())()(()(()))()', '(())()(()()(()))', '(())()(()()()())', '(())()(()()())()', '(())()(()())(())', '(())()(()())()()', '(())()(())((()))', '(())()(())(()())', '(())()(())(())()', '(())()(())()(())', '(())()(())()()()', '(())()()(((())))', '(())()()((()()))', '(())()()((())())', '(())()()((()))()', '(())()()(()(()))', '(())()()(()()())', '(())()()(()())()', '(())()()(())(())', '(())()()(())()()', '(())()()()((()))', '(())()()()(()())', '(())()()()(())()', '(())()()()()(())', '(())()()()()()()', '()((((((()))))))', '()(((((()())))))', '()(((((())()))))', '()(((((()))())))', '()(((((())))()))', '()(((((()))))())', '()(((((())))))()', '()((((()(())))))', '()((((()()()))))', '()((((()())())))', '()((((()()))()))', '()((((()())))())', '()((((()()))))()', '()((((())(()))))', '()((((())()())))', '()((((())())()))', '()((((())()))())', '()((((())())))()', '()((((()))(())))', '()((((()))()()))', '()((((()))())())', '()((((()))()))()', '()((((())))(()))', '()((((())))()())', '()((((())))())()', '()((((()))))(())', '()((((()))))()()', '()(((()((())))))', '()(((()(()()))))', '()(((()(())())))', '()(((()(()))()))', '()(((()(())))())', '()(((()(()))))()', '()(((()()(()))))', '()(((()()()())))', '()(((()()())()))', '()(((()()()))())', '()(((()()())))()', '()(((()())(())))', '()(((()())()()))', '()(((()())())())', '()(((()())()))()', '()(((()()))(()))', '()(((()()))()())', '()(((()()))())()', '()(((()())))(())', '()(((()())))()()', '()(((())((()))))', '()(((())(()())))', '()(((())(())()))', '()(((())(()))())', '()(((())(())))()', '()(((())()(())))', '()(((())()()()))', '()(((())()())())', '()(((())()()))()', '()(((())())(()))', '()(((())())()())', '()(((())())())()', '()(((())()))(())', '()(((())()))()()', '()(((()))((())))', '()(((()))(()()))', '()(((()))(())())', '()(((()))(()))()', '()(((()))()(()))', '()(((()))()()())', '()(((()))()())()', '()(((()))())(())', '()(((()))())()()', '()(((())))((()))', '()(((())))(()())', '()(((())))(())()', '()(((())))()(())', '()(((())))()()()', '()((()(((())))))', '()((()((()()))))', '()((()((())())))', '()((()((()))()))', '()((()((())))())', '()((()((()))))()', '()((()(()(()))))', '()((()(()()())))', '()((()(()())()))', '()((()(()()))())', '()((()(()())))()', '()((()(())(())))', '()((()(())()()))', '()((()(())())())', '()((()(())()))()', '()((()(()))(()))', '()((()(()))()())', '()((()(()))())()', '()((()(())))(())', '()((()(())))()()', '()((()()((()))))', '()((()()(()())))', '()((()()(())()))', '()((()()(()))())', '()((()()(())))()', '()((()()()(())))', '()((()()()()()))', '()((()()()())())', '()((()()()()))()', '()((()()())(()))', '()((()()())()())', '()((()()())())()', '()((()()()))(())', '()((()()()))()()', '()((()())((())))', '()((()())(()()))', '()((()())(())())', '()((()())(()))()', '()((()())()(()))', '()((()())()()())', '()((()())()())()', '()((()())())(())', '()((()())())()()', '()((()()))((()))', '()((()()))(()())', '()((()()))(())()', '()((()()))()(())', '()((()()))()()()', '()((())(((()))))', '()((())((()())))', '()((())((())()))', '()((())((()))())', '()((())((())))()', '()((())(()(())))', '()((())(()()()))', '()((())(()())())', '()((())(()()))()', '()((())(())(()))', '()((())(())()())', '()((())(())())()', '()((())(()))(())', '()((())(()))()()', '()((())()((())))', '()((())()(()()))', '()((())()(())())', '()((())()(()))()', '()((())()()(()))', '()((())()()()())', '()((())()()())()', '()((())()())(())', '()((())()())()()', '()((())())((()))', '()((())())(()())', '()((())())(())()', '()((())())()(())', '()((())())()()()', '()((()))(((())))', '()((()))((()()))', '()((()))((())())', '()((()))((()))()', '()((()))(()(()))', '()((()))(()()())', '()((()))(()())()', '()((()))(())(())', '()((()))(())()()', '()((()))()((()))', '()((()))()(()())', '()((()))()(())()', '()((()))()()(())', '()((()))()()()()', '()(()((((())))))', '()(()(((()()))))', '()(()(((())())))', '()(()(((()))()))', '()(()(((())))())', '()(()(((()))))()', '()(()((()(()))))', '()(()((()()())))', '()(()((()())()))', '()(()((()()))())', '()(()((()())))()', '()(()((())(())))', '()(()((())()()))', '()(()((())())())', '()(()((())()))()', '()(()((()))(()))', '()(()((()))()())', '()(()((()))())()', '()(()((())))(())', '()(()((())))()()', '()(()(()((()))))', '()(()(()(()())))', '()(()(()(())()))', '()(()(()(()))())', '()(()(()(())))()', '()(()(()()(())))', '()(()(()()()()))', '()(()(()()())())', '()(()(()()()))()', '()(()(()())(()))', '()(()(()())()())', '()(()(()())())()', '()(()(()()))(())', '()(()(()()))()()', '()(()(())((())))', '()(()(())(()()))', '()(()(())(())())', '()(()(())(()))()', '()(()(())()(()))', '()(()(())()()())', '()(()(())()())()', '()(()(())())(())', '()(()(())())()()', '()(()(()))((()))', '()(()(()))(()())', '()(()(()))(())()', '()(()(()))()(())', '()(()(()))()()()', '()(()()(((()))))', '()(()()((()())))', '()(()()((())()))', '()(()()((()))())', '()(()()((())))()', '()(()()(()(())))', '()(()()(()()()))', '()(()()(()())())', '()(()()(()()))()', '()(()()(())(()))', '()(()()(())()())', '()(()()(())())()', '()(()()(()))(())', '()(()()(()))()()', '()(()()()((())))', '()(()()()(()()))', '()(()()()(())())', '()(()()()(()))()', '()(()()()()(()))', '()(()()()()()())', '()(()()()()())()', '()(()()()())(())', '()(()()()())()()', '()(()()())((()))', '()(()()())(()())', '()(()()())(())()', '()(()()())()(())', '()(()()())()()()', '()(()())(((())))', '()(()())((()()))', '()(()())((())())', '()(()())((()))()', '()(()())(()(()))', '()(()())(()()())', '()(()())(()())()', '()(()())(())(())', '()(()())(())()()', '()(()())()((()))', '()(()())()(()())', '()(()())()(())()', '()(()())()()(())', '()(()())()()()()', '()(())((((()))))', '()(())(((()())))', '()(())(((())()))', '()(())(((()))())', '()(())(((())))()', '()(())((()(())))', '()(())((()()()))', '()(())((()())())', '()(())((()()))()', '()(())((())(()))', '()(())((())()())', '()(())((())())()', '()(())((()))(())', '()(())((()))()()', '()(())(()((())))', '()(())(()(()()))', '()(())(()(())())', '()(())(()(()))()', '()(())(()()(()))', '()(())(()()()())', '()(())(()()())()', '()(())(()())(())', '()(())(()())()()', '()(())(())((()))', '()(())(())(()())', '()(())(())(())()', '()(())(())()(())', '()(())(())()()()', '()(())()(((())))', '()(())()((()()))', '()(())()((())())', '()(())()((()))()', '()(())()(()(()))', '()(())()(()()())', '()(())()(()())()', '()(())()(())(())', '()(())()(())()()', '()(())()()((()))', '()(())()()(()())', '()(())()()(())()', '()(())()()()(())', '()(())()()()()()', '()()(((((())))))', '()()((((()()))))', '()()((((())())))', '()()((((()))()))', '()()((((())))())', '()()((((()))))()', '()()(((()(()))))', '()()(((()()())))', '()()(((()())()))', '()()(((()()))())', '()()(((()())))()', '()()(((())(())))', '()()(((())()()))', '()()(((())())())', '()()(((())()))()', '()()(((()))(()))', '()()(((()))()())', '()()(((()))())()', '()()(((())))(())', '()()(((())))()()', '()()((()((()))))', '()()((()(()())))', '()()((()(())()))', '()()((()(()))())', '()()((()(())))()', '()()((()()(())))', '()()((()()()()))', '()()((()()())())', '()()((()()()))()', '()()((()())(()))', '()()((()())()())', '()()((()())())()', '()()((()()))(())', '()()((()()))()()', '()()((())((())))', '()()((())(()()))', '()()((())(())())', '()()((())(()))()', '()()((())()(()))', '()()((())()()())', '()()((())()())()', '()()((())())(())', '()()((())())()()', '()()((()))((()))', '()()((()))(()())', '()()((()))(())()', '()()((()))()(())', '()()((()))()()()', '()()(()(((()))))', '()()(()((()())))', '()()(()((())()))', '()()(()((()))())', '()()(()((())))()', '()()(()(()(())))', '()()(()(()()()))', '()()(()(()())())', '()()(()(()()))()', '()()(()(())(()))', '()()(()(())()())', '()()(()(())())()', '()()(()(()))(())', '()()(()(()))()()', '()()(()()((())))', '()()(()()(()()))', '()()(()()(())())', '()()(()()(()))()', '()()(()()()(()))', '()()(()()()()())', '()()(()()()())()', '()()(()()())(())', '()()(()()())()()', '()()(()())((()))', '()()(()())(()())', '()()(()())(())()', '()()(()())()(())', '()()(()())()()()', '()()(())(((())))', '()()(())((()()))', '()()(())((())())', '()()(())((()))()', '()()(())(()(()))', '()()(())(()()())', '()()(())(()())()', '()()(())(())(())', '()()(())(())()()', '()()(())()((()))', '()()(())()(()())', '()()(())()(())()', '()()(())()()(())', '()()(())()()()()', '()()()((((()))))', '()()()(((()())))', '()()()(((())()))', '()()()(((()))())', '()()()(((())))()', '()()()((()(())))', '()()()((()()()))', '()()()((()())())', '()()()((()()))()', '()()()((())(()))', '()()()((())()())', '()()()((())())()', '()()()((()))(())', '()()()((()))()()', '()()()(()((())))', '()()()(()(()()))', '()()()(()(())())', '()()()(()(()))()', '()()()(()()(()))', '()()()(()()()())', '()()()(()()())()', '()()()(()())(())', '()()()(()())()()', '()()()(())((()))', '()()()(())(()())', '()()()(())(())()', '()()()(())()(())', '()()()(())()()()', '()()()()(((())))', '()()()()((()()))', '()()()()((())())', '()()()()((()))()', '()()()()(()(()))', '()()()()(()()())', '()()()()(()())()', '()()()()(())(())', '()()()()(())()()', '()()()()()((()))', '()()()()()(()())', '()()()()()(())()', '()()()()()()(())', '()()()()()()()()']\n assert candidate(n = 3) == ['((()))', '(()())', '(())()', '()(())', '()()()']\n assert candidate(n = 4) == ['(((())))', '((()()))', '((())())', '((()))()', '(()(()))', '(()()())', '(()())()', '(())(())', '(())()()', '()((()))', '()(()())', '()(())()', '()()(())', '()()()()']\n assert candidate(n = 6) == ['(((((())))))', '((((()()))))', '((((())())))', '((((()))()))', '((((())))())', '((((()))))()', '(((()(()))))', '(((()()())))', '(((()())()))', '(((()()))())', '(((()())))()', '(((())(())))', '(((())()()))', '(((())())())', '(((())()))()', '(((()))(()))', '(((()))()())', '(((()))())()', '(((())))(())', '(((())))()()', '((()((()))))', '((()(()())))', '((()(())()))', '((()(()))())', '((()(())))()', '((()()(())))', '((()()()()))', '((()()())())', '((()()()))()', '((()())(()))', '((()())()())', '((()())())()', '((()()))(())', '((()()))()()', '((())((())))', '((())(()()))', '((())(())())', '((())(()))()', '((())()(()))', '((())()()())', '((())()())()', '((())())(())', '((())())()()', '((()))((()))', '((()))(()())', '((()))(())()', '((()))()(())', '((()))()()()', '(()(((()))))', '(()((()())))', '(()((())()))', '(()((()))())', '(()((())))()', '(()(()(())))', '(()(()()()))', '(()(()())())', '(()(()()))()', '(()(())(()))', '(()(())()())', '(()(())())()', '(()(()))(())', '(()(()))()()', '(()()((())))', '(()()(()()))', '(()()(())())', '(()()(()))()', '(()()()(()))', '(()()()()())', '(()()()())()', '(()()())(())', '(()()())()()', '(()())((()))', '(()())(()())', '(()())(())()', '(()())()(())', '(()())()()()', '(())(((())))', '(())((()()))', '(())((())())', '(())((()))()', '(())(()(()))', '(())(()()())', '(())(()())()', '(())(())(())', '(())(())()()', '(())()((()))', '(())()(()())', '(())()(())()', '(())()()(())', '(())()()()()', '()((((()))))', '()(((()())))', '()(((())()))', '()(((()))())', '()(((())))()', '()((()(())))', '()((()()()))', '()((()())())', '()((()()))()', '()((())(()))', '()((())()())', '()((())())()', '()((()))(())', '()((()))()()', '()(()((())))', '()(()(()()))', '()(()(())())', '()(()(()))()', '()(()()(()))', '()(()()()())', '()(()()())()', '()(()())(())', '()(()())()()', '()(())((()))', '()(())(()())', '()(())(())()', '()(())()(())', '()(())()()()', '()()(((())))', '()()((()()))', '()()((())())', '()()((()))()', '()()(()(()))', '()()(()()())', '()()(()())()', '()()(())(())', '()()(())()()', '()()()((()))', '()()()(()())', '()()()(())()', '()()()()(())', '()()()()()()']\n assert candidate(n = 2) == ['(())', '()()']\n assert candidate(n = 1) == ['()']\n assert candidate(n = 7) == ['((((((()))))))', '(((((()())))))', '(((((())()))))', '(((((()))())))', '(((((())))()))', '(((((()))))())', '(((((())))))()', '((((()(())))))', '((((()()()))))', '((((()())())))', '((((()()))()))', '((((()())))())', '((((()()))))()', '((((())(()))))', '((((())()())))', '((((())())()))', '((((())()))())', '((((())())))()', '((((()))(())))', '((((()))()()))', '((((()))())())', '((((()))()))()', '((((())))(()))', '((((())))()())', '((((())))())()', '((((()))))(())', '((((()))))()()', '(((()((())))))', '(((()(()()))))', '(((()(())())))', '(((()(()))()))', '(((()(())))())', '(((()(()))))()', '(((()()(()))))', '(((()()()())))', '(((()()())()))', '(((()()()))())', '(((()()())))()', '(((()())(())))', '(((()())()()))', '(((()())())())', '(((()())()))()', '(((()()))(()))', '(((()()))()())', '(((()()))())()', '(((()())))(())', '(((()())))()()', '(((())((()))))', '(((())(()())))', '(((())(())()))', '(((())(()))())', '(((())(())))()', '(((())()(())))', '(((())()()()))', '(((())()())())', '(((())()()))()', '(((())())(()))', '(((())())()())', '(((())())())()', '(((())()))(())', '(((())()))()()', '(((()))((())))', '(((()))(()()))', '(((()))(())())', '(((()))(()))()', '(((()))()(()))', '(((()))()()())', '(((()))()())()', '(((()))())(())', '(((()))())()()', '(((())))((()))', '(((())))(()())', '(((())))(())()', '(((())))()(())', '(((())))()()()', '((()(((())))))', '((()((()()))))', '((()((())())))', '((()((()))()))', '((()((())))())', '((()((()))))()', '((()(()(()))))', '((()(()()())))', '((()(()())()))', '((()(()()))())', '((()(()())))()', '((()(())(())))', '((()(())()()))', '((()(())())())', '((()(())()))()', '((()(()))(()))', '((()(()))()())', '((()(()))())()', '((()(())))(())', '((()(())))()()', '((()()((()))))', '((()()(()())))', '((()()(())()))', '((()()(()))())', '((()()(())))()', '((()()()(())))', '((()()()()()))', '((()()()())())', '((()()()()))()', '((()()())(()))', '((()()())()())', '((()()())())()', '((()()()))(())', '((()()()))()()', '((()())((())))', '((()())(()()))', '((()())(())())', '((()())(()))()', '((()())()(()))', '((()())()()())', '((()())()())()', '((()())())(())', '((()())())()()', '((()()))((()))', '((()()))(()())', '((()()))(())()', '((()()))()(())', '((()()))()()()', '((())(((()))))', '((())((()())))', '((())((())()))', '((())((()))())', '((())((())))()', '((())(()(())))', '((())(()()()))', '((())(()())())', '((())(()()))()', '((())(())(()))', '((())(())()())', '((())(())())()', '((())(()))(())', '((())(()))()()', '((())()((())))', '((())()(()()))', '((())()(())())', '((())()(()))()', '((())()()(()))', '((())()()()())', '((())()()())()', '((())()())(())', '((())()())()()', '((())())((()))', '((())())(()())', '((())())(())()', '((())())()(())', '((())())()()()', '((()))(((())))', '((()))((()()))', '((()))((())())', '((()))((()))()', '((()))(()(()))', '((()))(()()())', '((()))(()())()', '((()))(())(())', '((()))(())()()', '((()))()((()))', '((()))()(()())', '((()))()(())()', '((()))()()(())', '((()))()()()()', '(()((((())))))', '(()(((()()))))', '(()(((())())))', '(()(((()))()))', '(()(((())))())', '(()(((()))))()', '(()((()(()))))', '(()((()()())))', '(()((()())()))', '(()((()()))())', '(()((()())))()', '(()((())(())))', '(()((())()()))', '(()((())())())', '(()((())()))()', '(()((()))(()))', '(()((()))()())', '(()((()))())()', '(()((())))(())', '(()((())))()()', '(()(()((()))))', '(()(()(()())))', '(()(()(())()))', '(()(()(()))())', '(()(()(())))()', '(()(()()(())))', '(()(()()()()))', '(()(()()())())', '(()(()()()))()', '(()(()())(()))', '(()(()())()())', '(()(()())())()', '(()(()()))(())', '(()(()()))()()', '(()(())((())))', '(()(())(()()))', '(()(())(())())', '(()(())(()))()', '(()(())()(()))', '(()(())()()())', '(()(())()())()', '(()(())())(())', '(()(())())()()', '(()(()))((()))', '(()(()))(()())', '(()(()))(())()', '(()(()))()(())', '(()(()))()()()', '(()()(((()))))', '(()()((()())))', '(()()((())()))', '(()()((()))())', '(()()((())))()', '(()()(()(())))', '(()()(()()()))', '(()()(()())())', '(()()(()()))()', '(()()(())(()))', '(()()(())()())', '(()()(())())()', '(()()(()))(())', '(()()(()))()()', '(()()()((())))', '(()()()(()()))', '(()()()(())())', '(()()()(()))()', '(()()()()(()))', '(()()()()()())', '(()()()()())()', '(()()()())(())', '(()()()())()()', '(()()())((()))', '(()()())(()())', '(()()())(())()', '(()()())()(())', '(()()())()()()', '(()())(((())))', '(()())((()()))', '(()())((())())', '(()())((()))()', '(()())(()(()))', '(()())(()()())', '(()())(()())()', '(()())(())(())', '(()())(())()()', '(()())()((()))', '(()())()(()())', '(()())()(())()', '(()())()()(())', '(()())()()()()', '(())((((()))))', '(())(((()())))', '(())(((())()))', '(())(((()))())', '(())(((())))()', '(())((()(())))', '(())((()()()))', '(())((()())())', '(())((()()))()', '(())((())(()))', '(())((())()())', '(())((())())()', '(())((()))(())', '(())((()))()()', '(())(()((())))', '(())(()(()()))', '(())(()(())())', '(())(()(()))()', '(())(()()(()))', '(())(()()()())', '(())(()()())()', '(())(()())(())', '(())(()())()()', '(())(())((()))', '(())(())(()())', '(())(())(())()', '(())(())()(())', '(())(())()()()', '(())()(((())))', '(())()((()()))', '(())()((())())', '(())()((()))()', '(())()(()(()))', '(())()(()()())', '(())()(()())()', '(())()(())(())', '(())()(())()()', '(())()()((()))', '(())()()(()())', '(())()()(())()', '(())()()()(())', '(())()()()()()', '()(((((())))))', '()((((()()))))', '()((((())())))', '()((((()))()))', '()((((())))())', '()((((()))))()', '()(((()(()))))', '()(((()()())))', '()(((()())()))', '()(((()()))())', '()(((()())))()', '()(((())(())))', '()(((())()()))', '()(((())())())', '()(((())()))()', '()(((()))(()))', '()(((()))()())', '()(((()))())()', '()(((())))(())', '()(((())))()()', '()((()((()))))', '()((()(()())))', '()((()(())()))', '()((()(()))())', '()((()(())))()', '()((()()(())))', '()((()()()()))', '()((()()())())', '()((()()()))()', '()((()())(()))', '()((()())()())', '()((()())())()', '()((()()))(())', '()((()()))()()', '()((())((())))', '()((())(()()))', '()((())(())())', '()((())(()))()', '()((())()(()))', '()((())()()())', '()((())()())()', '()((())())(())', '()((())())()()', '()((()))((()))', '()((()))(()())', '()((()))(())()', '()((()))()(())', '()((()))()()()', '()(()(((()))))', '()(()((()())))', '()(()((())()))', '()(()((()))())', '()(()((())))()', '()(()(()(())))', '()(()(()()()))', '()(()(()())())', '()(()(()()))()', '()(()(())(()))', '()(()(())()())', '()(()(())())()', '()(()(()))(())', '()(()(()))()()', '()(()()((())))', '()(()()(()()))', '()(()()(())())', '()(()()(()))()', '()(()()()(()))', '()(()()()()())', '()(()()()())()', '()(()()())(())', '()(()()())()()', '()(()())((()))', '()(()())(()())', '()(()())(())()', '()(()())()(())', '()(()())()()()', '()(())(((())))', '()(())((()()))', '()(())((())())', '()(())((()))()', '()(())(()(()))', '()(())(()()())', '()(())(()())()', '()(())(())(())', '()(())(())()()', '()(())()((()))', '()(())()(()())', '()(())()(())()', '()(())()()(())', '()(())()()()()', '()()((((()))))', '()()(((()())))', '()()(((())()))', '()()(((()))())', '()()(((())))()', '()()((()(())))', '()()((()()()))', '()()((()())())', '()()((()()))()', '()()((())(()))', '()()((())()())', '()()((())())()', '()()((()))(())', '()()((()))()()', '()()(()((())))', '()()(()(()()))', '()()(()(())())', '()()(()(()))()', '()()(()()(()))', '()()(()()()())', '()()(()()())()', '()()(()())(())', '()()(()())()()', '()()(())((()))', '()()(())(()())', '()()(())(())()', '()()(())()(())', '()()(())()()()', '()()()(((())))', '()()()((()()))', '()()()((())())', '()()()((()))()', '()()()(()(()))', '()()()(()()())', '()()()(()())()', '()()()(())(())', '()()()(())()()', '()()()()((()))', '()()()()(()())', '()()()()(())()', '()()()()()(())', '()()()()()()()']\n assert candidate(n = 5) == ['((((()))))', '(((()())))', '(((())()))', '(((()))())', '(((())))()', '((()(())))', '((()()()))', '((()())())', '((()()))()', '((())(()))', '((())()())', '((())())()', '((()))(())', '((()))()()', '(()((())))', '(()(()()))', '(()(())())', '(()(()))()', '(()()(()))', '(()()()())', '(()()())()', '(()())(())', '(()())()()', '(())((()))', '(())(()())', '(())(())()', '(())()(())', '(())()()()', '()(((())))', '()((()()))', '()((())())', '()((()))()', '()(()(()))', '()(()()())', '()(()())()', '()(())(())', '()(())()()', '()()((()))', '()()(()())', '()()(())()', '()()()(())', '()()()()()']\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().generateParenthesis", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector generateParenthesis(int n) {", "container": "Solution", "callable": "generateParenthesis", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 23, "task_id": "merge-k-sorted-lists", "difficulty": "Hard", "problem_description": "You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.\nMerge all the linked-lists into one sorted linked-list and return it.\n \nExample 1:\n\nInput: lists = [[1,4,5],[1,3,4],[2,6]]\nOutput: [1,1,2,3,4,4,5,6]\nExplanation: The linked-lists are:\n[\n 1->4->5,\n 1->3->4,\n 2->6\n]\nmerging them into one sorted list:\n1->1->2->3->4->4->5->6\n\nExample 2:\n\nInput: lists = []\nOutput: []\n\nExample 3:\n\nInput: lists = [[]]\nOutput: []\n\n \nConstraints:\n\nk == lists.length\n0 <= k <= 104\n0 <= lists[i].length <= 500\n-104 <= lists[i][j] <= 104\nlists[i] is sorted in ascending order.\nThe sum of lists[i].length will not exceed 104.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(lists = []) == None\n assert candidate(lists = [[],[],[],[]]) == None\n assert candidate(lists = [[]]) == None\n"}, "metadata": {"canonical_parameter_names": ["lists"], "leetcode_dataset_entry_point": "Solution().mergeKLists", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* mergeKLists(vector& lists) {", "container": "Solution", "callable": "mergeKLists", "parameters": [{"name": "lists", "type": "vector&"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 24, "task_id": "swap-nodes-in-pairs", "difficulty": "Medium", "problem_description": "Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i.e., only nodes themselves may be changed.)\n \nExample 1:\n\nInput: head = [1,2,3,4]\nOutput: [2,1,4,3]\nExplanation:\n\n\nExample 2:\n\nInput: head = []\nOutput: []\n\nExample 3:\n\nInput: head = [1]\nOutput: [1]\n\nExample 4:\n\nInput: head = [1,2,3]\nOutput: [2,1,3]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 100].\n0 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4])), list_node([2, 1, 4, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3])), list_node([2, 1, 3]))\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6])), list_node([2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 6]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 120, 131, 142, 153, 164, 175, 186, 197, 208])), list_node([21, 10, 43, 32, 65, 54, 87, 76, 109, 98, 131, 120, 153, 142, 175, 164, 197, 186, 208]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 9]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 23, 21, 25]))\n assert is_same_list(candidate(head = list_node([5])), list_node([5]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1])), list_node([4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 1, 2, 1, 2, 1, 2, 1, 2])), list_node([2, 1, 2, 1, 2, 1, 2, 1, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 10]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81])), list_node([99, 100, 97, 98, 95, 96, 93, 94, 91, 92, 89, 90, 87, 88, 85, 86, 83, 84, 81, 82]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60])), list_node([20, 10, 40, 30, 60, 50]))\n assert is_same_list(candidate(head = list_node([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])), list_node([99, 100, 97, 98, 95, 96, 93, 94, 91, 92, 89, 90, 87, 88, 85, 86, 83, 84, 81, 82, 79, 80, 77, 78, 75, 76, 73, 74, 71, 72, 69, 70, 67, 68, 65, 66, 63, 64, 61, 62, 59, 60, 57, 58, 55, 56, 53, 54, 51, 52, 49, 50, 47, 48, 45, 46, 43, 44, 41, 42, 39, 40, 37, 38, 35, 36, 33, 34, 31, 32, 29, 30, 27, 28, 25, 26, 23, 24, 21, 22, 19, 20, 17, 18, 15, 16, 13, 14, 11, 12, 9, 10, 7, 8, 5, 6, 3, 4, 1, 2]))\n assert is_same_list(candidate(head = list_node([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])), list_node([9, 10, 7, 8, 5, 6, 3, 4, 1, 2, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29]))\n assert is_same_list(candidate(head = list_node([7, 8, 9, 10, 11, 12, 13, 14])), list_node([8, 7, 10, 9, 12, 11, 14, 13]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90])), list_node([20, 10, 40, 30, 60, 50, 80, 70, 90]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0]))\n assert is_same_list(candidate(head = list_node([7, 6, 5, 4, 3, 2, 1])), list_node([6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([50, 25, 75, 100, 5, 20, 30, 40, 60, 80, 90, 10])), list_node([25, 50, 100, 75, 20, 5, 40, 30, 80, 60, 10, 90]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 21])), list_node([4, 2, 8, 6, 12, 10, 16, 14, 20, 18, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70])), list_node([20, 10, 40, 30, 60, 50, 70]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 20]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 1, 3, 3, 4, 4, 5, 5])), list_node([2, 1, 1, 2, 3, 3, 4, 4, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([42])), list_node([42]))\n assert is_same_list(candidate(head = list_node([1, 2])), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50])), list_node([20, 10, 40, 30, 50]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17, 21]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([9, 10, 7, 8, 5, 6, 3, 4, 1, 2]))\n assert is_same_list(candidate(head = list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 11]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22])), list_node([4, 2, 8, 6, 12, 10, 16, 14, 20, 18, 22]))\n assert is_same_list(candidate(head = list_node([2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 11]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 1, 3, 4, 4, 3, 5, 6, 6, 5])), list_node([2, 1, 1, 2, 4, 3, 3, 4, 6, 5, 5, 6]))\n assert is_same_list(candidate(head = list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 15]))\n assert is_same_list(candidate(head = list_node([100, 0, 100, 0, 100, 0, 100, 0])), list_node([0, 100, 0, 100, 0, 100, 0, 100]))\n assert is_same_list(candidate(head = list_node([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])), list_node([24, 25, 22, 23, 20, 21, 18, 19, 16, 17, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24])), list_node([4, 2, 8, 6, 12, 10, 16, 14, 20, 18, 24, 22]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([8, 9, 6, 7, 4, 5, 2, 3, 0, 1, -2, -1, -4, -3, -6, -5, -8, -7, -10, -9]))\n assert is_same_list(candidate(head = list_node([42, 42])), list_node([42, 42]))\n assert is_same_list(candidate(head = list_node([100, 1, 99, 2, 98, 3, 97, 4, 96, 5])), list_node([1, 100, 2, 99, 3, 98, 4, 97, 5, 96]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 6, 7])), list_node([4, 5, 2, 3, 6, 1, 7]))\n assert is_same_list(candidate(head = list_node([2, 3, 4, 5, 6, 7, 8, 9, 10, 11])), list_node([3, 2, 5, 4, 7, 6, 9, 8, 11, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([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]))\n assert is_same_list(candidate(head = list_node([19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([18, 19, 16, 17, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81])), list_node([99, 100, 97, 98, 95, 96, 93, 94, 91, 92, 89, 90, 87, 88, 85, 86, 83, 84, 81, 82]))\n assert is_same_list(candidate(head = list_node([2, 5, 3, 4, 1, 6, 8, 7])), list_node([5, 2, 4, 3, 6, 1, 7, 8]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 4])), list_node([4, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([5, 1, 9, 6, 2])), list_node([1, 5, 6, 9, 2]))\n assert is_same_list(candidate(head = list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2])), list_node([2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([4, 2, 8, 6, 12, 10, 16, 14, 20, 18]))\n assert is_same_list(candidate(head = list_node([1, 2])), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 15]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0])), list_node([1, 0, 1, 0, 1, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8])), list_node([3, 1, 7, 5, 2, 9, 6, 4, 8]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80])), list_node([20, 10, 40, 30, 60, 50, 80, 70]))\n assert is_same_list(candidate(head = list_node([21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([20, 21, 18, 19, 16, 17, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6])), list_node([4, 5, 2, 3, 10, 1, 8, 9, 6, 7]))\n assert is_same_list(candidate(head = list_node([99, 98, 97, 96, 95, 94, 93, 92, 91, 90])), list_node([98, 99, 96, 97, 94, 95, 92, 93, 90, 91]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8])), list_node([2, 1, 4, 3, 6, 5, 8, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([2, 1, 4, 3, 5]))\n assert is_same_list(candidate(head = list_node([5, 10])), list_node([10, 5]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16])), list_node([4, 2, 8, 6, 12, 10, 16, 14]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), list_node([20, 10, 40, 30, 60, 50, 80, 70, 100, 90]))\n assert is_same_list(candidate(head = list_node([1, 4, 3, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([4, 1, 2, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 8, 2])), list_node([1, 5, 8, 9, 2]))\n assert is_same_list(candidate(head = list_node([11, 22, 33, 44, 55, 66, 77, 88, 99, 100])), list_node([22, 11, 44, 33, 66, 55, 88, 77, 100, 99]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7])), list_node([2, 1, 4, 3, 6, 5, 7]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91])), list_node([99, 100, 97, 98, 95, 96, 93, 94, 91, 92]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([8, 9, 6, 7, 4, 5, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([19, 21, 15, 17, 11, 13, 7, 9, 3, 5, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19])), list_node([3, 1, 7, 5, 11, 9, 15, 13, 19, 17]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11])), list_node([2, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]))\n assert is_same_list(candidate(head = list_node([7, 6, 5, 4, 3, 2, 1, 0])), list_node([6, 7, 4, 5, 2, 3, 0, 1]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0]))\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().swapPairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* swapPairs(ListNode* head) {", "container": "Solution", "callable": "swapPairs", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 25, "task_id": "reverse-nodes-in-k-group", "difficulty": "Hard", "problem_description": "Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list.\nk is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of k then left-out nodes, in the end, should remain as it is.\nYou may not alter the values in the list's nodes, only nodes themselves may be changed.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5], k = 2\nOutput: [2,1,4,3,5]\n\nExample 2:\n\n\nInput: head = [1,2,3,4,5], k = 3\nOutput: [3,2,1,4,5]\n\n \nConstraints:\n\nThe number of nodes in the list is n.\n1 <= k <= n <= 5000\n0 <= Node.val <= 1000\n\n \nFollow-up: Can you solve the problem in O(1) extra memory space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, 2]),k = 2), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6]),k = 4), list_node([4, 3, 2, 1, 5, 6]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7]),k = 3), list_node([3, 2, 1, 6, 5, 4, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6]))\n assert candidate(head = list_node([]),k = 1) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),k = 5), list_node([5, 4, 3, 2, 1, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),k = 4), list_node([4, 3, 2, 1, 8, 7, 6, 5, 9, 10, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),k = 2), list_node([2, 1, 4, 3, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6]),k = 2), list_node([2, 1, 4, 3, 6, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),k = 2), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6]),k = 3), list_node([3, 2, 1, 6, 5, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),k = 3), list_node([3, 2, 1, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2]),k = 1), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([1]),k = 1), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8]),k = 4), list_node([4, 3, 2, 1, 8, 7, 6, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 1), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),k = 3), list_node([3, 2, 1, 6, 5, 4, 9, 8, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 18, 17, 16, 15, 14, 13, 19, 20, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),k = 13), list_node([13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 53, 54, 55, 56, 57, 58, 59, 60]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 4), list_node([4, 3, 2, 1, 8, 7, 6, 5, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 18, 17, 16, 15, 14, 13, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 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 = 11), list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 23, 24, 25]))\n assert is_same_list(candidate(head = list_node([9, 1, 7, 3, 8, 4, 6, 2, 5, 0]),k = 3), list_node([7, 1, 9, 4, 8, 3, 5, 2, 6, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 12), list_node([12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 25, 26, 27, 28, 29, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 21, 20, 19, 18, 17, 16, 15, 28, 27, 26, 25, 24, 23, 22, 29, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),k = 4), list_node([4, 3, 2, 1, 8, 7, 6, 5, 12, 11, 10, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 3), list_node([3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]),k = 11), list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 50), list_node([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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 3), list_node([3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10, 15, 14, 13, 18, 17, 16, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]),k = 20), list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 21, 22, 23, 24, 25, 26, 27]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 13), list_node([13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]),k = 10), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4]),k = 4), list_node([4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]),k = 16), list_node([16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 17, 18, 19, 20, 21, 22, 23]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 11, 12]))\n assert is_same_list(candidate(head = list_node([42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]),k = 6), list_node([42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 7, 4, 6, 2, 3]),k = 2), list_node([1, 5, 7, 9, 6, 4, 3, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 11), list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 34, 35, 36, 37, 38, 39, 40]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]),k = 19), list_node([19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 21, 22, 23, 24, 25, 26]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 12), list_node([12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 49, 50]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 9), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 8, 9, 10, 11, 12, 13]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),k = 3), list_node([3, 2, 1, 6, 5, 4, 9, 8, 7, 10, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 11, 12, 13, 14]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),k = 4), list_node([4, 3, 2, 1, 8, 7, 6, 5, 12, 11, 10, 9, 13]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]),k = 14), list_node([14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 16, 17, 18, 19, 20, 21]))\n assert is_same_list(candidate(head = list_node([1, 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), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11, 20, 19, 18, 17, 16, 25, 24, 23, 22, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),k = 11), list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 13, 14, 15, 16]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]),k = 11), list_node([11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 12, 13, 14, 15, 16, 17, 18]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 8), list_node([8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([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, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960]),k = 3), list_node([998, 999, 1000, 995, 996, 997, 992, 993, 994, 989, 990, 991, 986, 987, 988, 983, 984, 985, 980, 981, 982, 977, 978, 979, 974, 975, 976, 971, 972, 973, 968, 969, 970, 965, 966, 967, 962, 963, 964, 961, 960]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),k = 15), list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800]),k = 5), list_node([500, 400, 300, 200, 100, 600, 700, 800]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]),k = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 11, 12, 13]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]),k = 21), list_node([21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 22, 23, 24, 25, 26, 27, 28]))\n assert is_same_list(candidate(head = list_node([1, 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 = 18), list_node([18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 19, 20, 21, 22, 23, 24, 25]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 4), list_node([10, 9, 8, 7, 14, 13, 12, 11, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]),k = 10), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 12, 13, 14, 15, 16, 17]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 15, 16]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),k = 8), list_node([8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7]),k = 1), list_node([1, 2, 3, 4, 5, 6, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),k = 10), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 31]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]),k = 22), list_node([22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 23, 24, 25, 26, 27, 28, 29]))\n assert is_same_list(candidate(head = list_node([1, 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 = 9), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 17, 16, 15, 14, 13, 12, 11, 10, 19, 20, 21, 22, 23, 24, 25]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 13]))\n assert is_same_list(candidate(head = list_node([1, 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 = 8), list_node([8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 24, 23, 22, 21, 20, 19, 18, 17, 25]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 14), list_node([14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 29, 30, 31, 32, 33, 34, 35, 36]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 19), list_node([19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8]),k = 2), list_node([2, 1, 4, 3, 6, 5, 8, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 17, 16, 15, 14, 13, 12, 11, 10, 27, 26, 25, 24, 23, 22, 21, 20, 19, 28, 29, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 21, 20, 19, 18, 17, 16, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),k = 3), list_node([3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10, 15, 14, 13, 16]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),k = 13), list_node([13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 27, 28, 29, 30, 31]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]),k = 9), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 11, 12, 13, 14, 15, 16]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]),k = 5), list_node([1, 2, 3, 4, 5, -4, -3, -2, -1, 0, -5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]),k = 2), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]),k = 6), list_node([6, 5, 4, 3, 2, 1, 12, 11, 10, 9, 8, 7, 13, 14, 15, 16, 17]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 15), list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11]),k = 7), list_node([-1, 0, 1, 2, 3, 4, 5, -8, -7, -6, -5, -4, -3, -2, -9, -10, -11]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),k = 5), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130]),k = 3), list_node([30, 20, 10, 60, 50, 40, 90, 80, 70, 120, 110, 100, 130]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 10), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 1), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]),k = 9), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 17, 16, 15, 14, 13, 12, 11, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110]),k = 5), list_node([50, 40, 30, 20, 10, 100, 90, 80, 70, 60, 110]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 14, 13, 12, 11, 10, 9, 8, 15, 16, 17]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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 = 9), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 17, 16, 15, 14, 13, 12, 11, 10, 27, 26, 25, 24, 23, 22, 21, 20, 19, 36, 35, 34, 33, 32, 31, 30, 29, 28, 37, 38, 39, 40]))\n assert is_same_list(candidate(head = list_node([1, 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 = 13), list_node([13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),k = 5), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11, 20, 19, 18, 17, 16, 25, 24, 23, 22, 21, 30, 29, 28, 27, 26, 31]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 2), list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),k = 2), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([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, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960]),k = 20), list_node([981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 960]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]),k = 12), list_node([12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 13, 14, 15, 16, 17, 18, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]),k = 15), list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 17, 18, 19, 20, 21, 22]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 8), list_node([8, 7, 6, 5, 4, 3, 2, 1, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]),k = 17), list_node([17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 19, 20, 21, 22, 23, 24]))\n assert is_same_list(candidate(head = list_node([99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80]),k = 15), list_node([85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 84, 83, 82, 81, 80]))\n"}, "metadata": {"canonical_parameter_names": ["head", "k"], "leetcode_dataset_entry_point": "Solution().reverseKGroup", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* reverseKGroup(ListNode* head, int k) {", "container": "Solution", "callable": "reverseKGroup", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "k", "type": "int"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 26, "task_id": "remove-duplicates-from-sorted-array", "difficulty": "Easy", "problem_description": "Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept the same. Then return the number of unique elements in nums.\nConsider the number of unique elements of nums to be k, to get accepted, you need to do the following things:\n\nChange the array nums such that the first k elements of nums contain the unique elements in the order they were present in nums initially. The remaining elements of nums are not important as well as the size of nums.\nReturn k.\n\nCustom Judge:\nThe judge will test your solution with the following code:\n\nint[] nums = [...]; // Input array\nint[] expectedNums = [...]; // The expected answer with correct length\n\nint k = removeDuplicates(nums); // Calls your implementation\n\nassert k == expectedNums.length;\nfor (int i = 0; i < k; i++) {\n assert nums[i] == expectedNums[i];\n}\n\nIf all assertions pass, then your solution will be accepted.\n \nExample 1:\n\nInput: nums = [1,1,2]\nOutput: 2, nums = [1,2,_]\nExplanation: Your function should return k = 2, with the first two elements of nums being 1 and 2 respectively.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\nExample 2:\n\nInput: nums = [0,0,1,1,1,2,2,3,3,4]\nOutput: 5, nums = [0,1,2,3,4,_,_,_,_,_]\nExplanation: Your function should return k = 5, with the first five elements of nums being 0, 1, 2, 3, and 4 respectively.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\n \nConstraints:\n\n1 <= nums.length <= 3 * 104\n-100 <= nums[i] <= 100\nnums is sorted in non-decreasing order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 1\n assert candidate(nums = [-100, 0, 100]) == 3\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 4, 5]) == 5\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 = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 5\n assert candidate(nums = [-1, -1, -1, -1, -1]) == 1\n assert candidate(nums = [-1, -1, 0, 0, 1, 1, 2]) == 4\n assert candidate(nums = [-10, -10, -9, -9, -8, -7, -6, -6, -6, -5]) == 6\n assert candidate(nums = [-100, -100, -50, -50, 0, 0, 50, 50, 100, 100]) == 5\n assert candidate(nums = [0, 0, 0, 0, 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]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 1, 2]) == 2\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5]) == 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\n assert candidate(nums = [-1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 7\n assert candidate(nums = [-100, -100, -99, -99, 0, 0, 1, 1, 2, 2, 3, 3]) == 6\n assert candidate(nums = [-100, 100]) == 2\n assert candidate(nums = [0, 0, 1, 1, 1, 2, 2, 3, 3, 4]) == 5\n assert candidate(nums = [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 5\n assert candidate(nums = [-1, -1, 0, 0, 1, 2, 2, 3, 4]) == 6\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\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9]) == 9\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8]) == 8\n assert candidate(nums = [0, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 5, 6, 7, 8, 8, 9, 10, 10, 10]) == 11\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9]) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 4]) == 4\n assert candidate(nums = [-100, -99, -98, -98, -97, -97, -96, -95, -94, -94, -93, -92, -91, -90, -89, -89, -88, -87, -86, -85]) == 16\n assert candidate(nums = [-1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 7, 7, 8, 9, 10]) == 12\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 5\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10, 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, 7]) == 7\n assert candidate(nums = [-10, -10, -9, -9, -8, -8, -7, -7, -6, -6, -5, -5, -4, -4, -3, -3, -2, -2, -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\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 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, 2, 2, 2, 2, 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\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 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(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 = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10]) == 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]) == 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]) == 15\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 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]) == 8\n assert candidate(nums = [1, 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(nums = [-100, -100, -50, -50, -50, -50, -50, 0, 0, 0, 0, 0, 0, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100]) == 5\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 10\n assert candidate(nums = [-10, -10, -5, -5, -1, 0, 0, 0, 3, 3, 3, 3, 3, 5, 5, 8]) == 7\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9]) == 9\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 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]) == 10\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9, 10, 10, 10]) == 10\n assert candidate(nums = [-100, -50, 0, 50, 100]) == 5\n assert candidate(nums = [-100, -100, -50, -50, 0, 0, 0, 10, 10, 20, 20, 20, 50, 50, 100, 100]) == 7\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 11\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10]) == 10\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7]) == 7\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5]) == 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, 0, 1, 2, 3, 4]) == 5\n assert candidate(nums = [1, 1, 1, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8, 9, 10, 10, 11]) == 11\n assert candidate(nums = [-50, -50, -50, -25, -25, -25, 0, 0, 25, 25, 50, 50, 50]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10]) == 10\n assert candidate(nums = [-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 16\n assert candidate(nums = [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, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10]) == 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, 9, 9, 9, 9]) == 9\n assert candidate(nums = [-1, -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3]) == 5\n assert candidate(nums = [0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 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, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 30\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9, 10, 10, 10]) == 12\n assert candidate(nums = [-100, -100, -50, -50, 0, 0, 50, 50, 100, 100]) == 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]) == 1\n assert candidate(nums = [0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6]) == 7\n assert candidate(nums = [-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 0, 0, 0, 1, 2, 3, 4, 5]) == 7\n assert candidate(nums = [-10, -5, -3, -3, -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]) == 16\n assert candidate(nums = [0, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9]) == 10\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10]) == 10\n assert candidate(nums = [0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9]) == 10\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 1\n assert candidate(nums = [-100, -50, -50, -50, -25, -10, 0, 0, 0, 0, 5, 10, 10, 25, 50, 50, 50, 100, 100]) == 10\n assert candidate(nums = [0, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8, 8, 9, 10, 10, 10, 10]) == 11\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 1\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [-5, -5, -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]) == 14\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [-5, -4, -4, -3, -2, -2, -1, 0, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 7, 8, 8, 9, 10]) == 16\n assert candidate(nums = [-5, -4, -4, -4, -3, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 4]) == 10\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]) == 1\n assert candidate(nums = [-100, -100, -99, -98, -98, -97, -97, -97, -96]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-100, -100, -50, -50, 0, 0, 0, 50, 50, 50, 100, 100]) == 5\n assert candidate(nums = [-1, -1, -1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 7\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11]) == 2\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 1\n assert candidate(nums = [-1, -1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 9, 10]) == 12\n assert candidate(nums = [-1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 8, 9, 10]) == 12\n assert candidate(nums = [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, 5, 5]) == 5\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, 4]) == 4\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 10\n assert candidate(nums = [-100, -100, -50, -50, 0, 0, 0, 50, 50, 100, 100]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17]) == 17\n assert candidate(nums = [-10, -10, -10, -10, -10, -9, -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]) == 14\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9]) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12]) == 12\n assert candidate(nums = [-100, -50, -50, -25, -25, -10, -10, 0, 0, 50, 50, 100, 100]) == 7\n assert candidate(nums = [-100, -50, -50, 0, 0, 0, 25, 25, 50, 75, 75, 100]) == 7\n assert candidate(nums = [-100, -99, -98, -97, -96, -95, -95, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83]) == 18\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6]) == 6\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 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 = [-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]) == 21\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, 7, 8, 9, 10]) == 10\n assert candidate(nums = [-50, -50, -50, -25, -25, -25, -10, -10, -10, 0, 0, 0, 50, 50, 50, 100, 100, 100]) == 6\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().removeDuplicates", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int removeDuplicates(vector& nums) {", "container": "Solution", "callable": "removeDuplicates", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 27, "task_id": "remove-element", "difficulty": "Easy", "problem_description": "Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which are not equal to val.\nConsider the number of elements in nums which are not equal to val be k, to get accepted, you need to do the following things:\n\nChange the array nums such that the first k elements of nums contain the elements which are not equal to val. The remaining elements of nums are not important as well as the size of nums.\nReturn k.\n\nCustom Judge:\nThe judge will test your solution with the following code:\n\nint[] nums = [...]; // Input array\nint val = ...; // Value to remove\nint[] expectedNums = [...]; // The expected answer with correct length.\n // It is sorted with no values equaling val.\n\nint k = removeElement(nums, val); // Calls your implementation\n\nassert k == expectedNums.length;\nsort(nums, 0, k); // Sort the first k elements of nums\nfor (int i = 0; i < actualLength; i++) {\n assert nums[i] == expectedNums[i];\n}\n\nIf all assertions pass, then your solution will be accepted.\n \nExample 1:\n\nInput: nums = [3,2,2,3], val = 3\nOutput: 2, nums = [2,2,_,_]\nExplanation: Your function should return k = 2, with the first two elements of nums being 2.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\nExample 2:\n\nInput: nums = [0,1,2,2,3,0,4,2], val = 2\nOutput: 5, nums = [0,1,4,0,3,_,_,_]\nExplanation: Your function should return k = 5, with the first five elements of nums containing 0, 0, 1, 3, and 4.\nNote that the five elements can be returned in any order.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\n \nConstraints:\n\n0 <= nums.length <= 100\n0 <= nums[i] <= 50\n0 <= val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [],val = 1) == 0\n assert candidate(nums = [0, 0, 0, 0, 0],val = 0) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 5) == 9\n assert candidate(nums = [5, 5, 5, 5, 5, 5],val = 5) == 0\n assert candidate(nums = [0, 1, 2, 2, 3, 0, 4, 2],val = 2) == 5\n assert candidate(nums = [50, 49, 48, 47, 46],val = 46) == 4\n assert candidate(nums = [1, 1, 1, 1, 1],val = 1) == 0\n assert candidate(nums = [3, 2, 2, 3],val = 3) == 2\n assert candidate(nums = [1, 2, 3, 4, 5],val = 6) == 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],val = 5) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],val = 0) == 0\n assert candidate(nums = [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],val = 25) == 49\n assert candidate(nums = [42, 27, 15, 42, 27, 15, 42, 27, 15, 42],val = 42) == 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],val = 2) == 19\n assert candidate(nums = [42],val = 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],val = 1) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6],val = 5) == 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],val = 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, 21, 22, 23, 24, 25],val = 12) == 24\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],val = 2) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50, 10, 20, 30, 40, 50],val = 50) == 12\n assert candidate(nums = [3, 3, 3, 3, 3, 2, 2, 1, 1, 0, 0],val = 3) == 6\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75],val = 25) == 14\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],val = 1) == 18\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 5) == 10\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],val = 0) == 10\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31],val = 46) == 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],val = 10) == 19\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],val = 21) == 20\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, 9, 0, 0],val = 9) == 39\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\n assert candidate(nums = [10, 20, 10, 30, 10, 40, 50, 10],val = 10) == 4\n assert candidate(nums = [42],val = 42) == 0\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],val = 1) == 8\n assert candidate(nums = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],val = 33) == 14\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, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 6],val = 2) == 5\n assert candidate(nums = [7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9],val = 8) == 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],val = 3) == 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],val = 5) == 18\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41],val = 43) == 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],val = 10) == 19\n assert candidate(nums = [1, 3, 3, 3, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6],val = 3) == 13\n assert candidate(nums = [1, 2, 3, 4, 5, 2, 2, 2, 3, 4, 5],val = 2) == 7\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],val = 2) == 10\n assert candidate(nums = [3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -1],val = 1) == 16\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50],val = 50) == 0\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\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],val = 10) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 11) == 10\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],val = 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, 21, 22, 23, 24, 25],val = 15) == 24\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22],val = 2) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],val = 7) == 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],val = 0) == 18\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],val = 20) == 19\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],val = 0) == 0\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50],val = 25) == 18\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 3, 2, 1, 0, 3],val = 3) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1],val = 2) == 6\n assert candidate(nums = [30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2],val = 28) == 14\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],val = 3) == 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],val = 40) == 20\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],val = 8) == 14\n assert candidate(nums = [42, 24, 42, 24, 42, 24, 42, 24],val = 24) == 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],val = 15) == 19\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41],val = 41) == 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],val = 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],val = 1) == 29\n assert candidate(nums = [7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10],val = 7) == 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],val = 15) == 38\n assert candidate(nums = [10, 20, 10, 30, 10, 40, 10, 50],val = 10) == 4\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50, 60],val = 10) == 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, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50],val = 50) == 0\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31],val = 46) == 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],val = 15) == 19\n assert candidate(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, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25],val = 25) == 0\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],val = 42) == 0\n assert candidate(nums = [10, 20, 30, 10, 20, 30, 10, 20, 30, 10],val = 10) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 1) == 18\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],val = 11) == 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50],val = 50) == 49\n assert candidate(nums = [3, 1, 3, 3, 2, 3, 3, 3, 3, 3],val = 3) == 2\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5],val = 5) == 8\n assert candidate(nums = [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10],val = 0) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3],val = 2) == 10\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],val = 50) == 19\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],val = 42) == 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],val = 1) == 19\n assert candidate(nums = [10, 20, 30, 20, 10, 30, 40, 20],val = 20) == 5\n assert candidate(nums = [1, 2, 3, 4, 5],val = 6) == 5\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 5) == 18\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],val = 20) == 19\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50],val = 30) == 8\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31],val = 40) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1],val = 1) == 9\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],val = 22) == 14\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],val = 1) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 50, 40, 30, 20, 10],val = 10) == 8\n assert candidate(nums = [10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9],val = 10) == 9\n assert candidate(nums = [10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 1],val = 10) == 18\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],val = 10) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],val = 11) == 10\n assert candidate(nums = [10, 1, 10, 2, 10, 3, 10, 4],val = 10) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],val = 13) == 14\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42],val = 42) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],val = 15) == 14\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],val = 7) == 0\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 5],val = 3) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],val = 7) == 14\n"}, "metadata": {"canonical_parameter_names": ["nums", "val"], "leetcode_dataset_entry_point": "Solution().removeElement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int removeElement(vector& nums, int val) {", "container": "Solution", "callable": "removeElement", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "val", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= haystack.length, needle.length <= 104\nhaystack and needle consist of only lowercase English characters.\n\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 = \"abcdefg\",needle = \"\") == 0\n assert candidate(haystack = \"a quick brown fox jumps over the lazy dog\",needle = \"quack\") == -1\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 = \"abcde\",needle = \"\") == 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 = \"12345678901234567890\",needle = \"56789012\") == 4\n assert candidate(haystack = \"12345678901234567890\",needle = \"56789\") == 4\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 = \"\",needle = \"\") == 0\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 = \"this is a simple test\",needle = \"simple\") == 10\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 = \"\",needle = \"a\") == -1\n assert candidate(haystack = \"a\",needle = \"\") == 0\n assert candidate(haystack = \"09876543210987654321\",needle = \"654321\") == 4\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 = \"a quick brown fox jumps over the lazy dog\",needle = \"quick\") == 2\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 = \"a quick brown fox jumps over the lazy dog\",needle = \"lazy\") == 33\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"}, "metadata": {"canonical_parameter_names": ["haystack", "needle"], "leetcode_dataset_entry_point": "Solution().strStr", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int strStr(string haystack, string needle) {", "container": "Solution", "callable": "strStr", "parameters": [{"name": "haystack", "type": "string"}, {"name": "needle", "type": "string"}], "return_type": "int", "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.\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.\nReturn the quotient after dividing dividend by divisor.\nNote: Assume we are dealing with an environment that could only store integers within the 32-bit signed integer range: [−231, 231 − 1]. For this problem, if the quotient is strictly greater than 231 - 1, then return 231 - 1, and if the quotient is strictly less than -231, then return -231.\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\n \nConstraints:\n\n-231 <= dividend, divisor <= 231 - 1\ndivisor != 0\n\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 = -1,divisor = 2147483648) == 0\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"}, "metadata": {"canonical_parameter_names": ["dividend", "divisor"], "leetcode_dataset_entry_point": "Solution().divide", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int divide(int dividend, int divisor) {", "container": "Solution", "callable": "divide", "parameters": [{"name": "dividend", "type": "int"}, {"name": "divisor", "type": "int"}], "return_type": "int", "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.\nA concatenated string is a string that exactly contains all the strings of any permutation of words concatenated.\n\nFor 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\n \nConstraints:\n\n1 <= s.length <= 104\n1 <= words.length <= 5000\n1 <= words[i].length <= 30\ns and words[i] consist of lowercase English letters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"wordgoodgoodgoodbestword\",words = ['word', 'good', 'best', 'word']) == []\n assert candidate(s = \"a\",words = ['a', 'a', 'a']) == []\n assert candidate(s = \"abababab\",words = ['a', 'b', 'a', 'b']) == [0, 1, 2, 3, 4]\n assert candidate(s = \"lingmindraboofooowingdingbarrwingmonkeypoundcake\",words = ['fooo', 'barr', 'wing', 'ding', 'wing']) == [13]\n assert candidate(s = \"barfoothefoobarman\",words = ['foo', 'bar']) == [0, 9]\n assert candidate(s = \"barfoofoobarthefoobarman\",words = ['bar', 'foo', 'the']) == [6, 9, 12]\n assert candidate(s = \"aaa\",words = ['a', 'a']) == [0, 1]\n assert candidate(s = \"thisisjustafancysentencewithallthesewordsin\",words = ['this', 'is', 'a', 'just', 'fancy', 'sentence', 'with', 'all', 'these', 'words', 'in']) == []\n assert candidate(s = \"overlaplaplaplaplaplaplaplaplaplap\",words = ['lap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap']) == []\n assert candidate(s = \"abcdefabcdefabcdefabcdefabcdef\",words = ['abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef']) == [0]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",words = ['aabb', 'ccdd', 'eefg', 'ghhi', 'jklk', 'llmm', 'nnoo', 'pqqr', 'rstt', 'uuvv', 'wwxx', 'yyzz']) == []\n assert candidate(s = \"oneonetwoonethreetwothreeonetwothreeone\",words = ['one', 'two', 'three']) == []\n assert candidate(s = \"abcdefgabcdefgabcdefg\",words = ['abc', 'def', 'gab', 'cde', 'fgh']) == []\n assert candidate(s = \"zazbzczdzazbzczdzaz\",words = ['zaz', 'bz', 'cz', 'dz', 'az', 'bz', 'cz', 'dz']) == []\n assert candidate(s = \"onetwothreefourfivesixseveneightnine\",words = ['onetwo', 'threefour', 'fivesix', 'seveneight', 'ninetwo', 'threefour', 'fivesix']) == []\n assert candidate(s = \"zzzzzzzzzzzzzzzzzz\",words = ['zzz', 'zzz', 'zzz', 'zzz']) == [0, 3, 6, 1, 4, 2, 5]\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\",words = ['abc', 'def', 'ghi', 'jkl', 'abc', 'def', 'ghi', 'jkl', 'abc', 'def']) == []\n assert candidate(s = \"abcdabcdabcdabcd\",words = ['abcd', 'dcba', 'abdc', 'bacd']) == []\n assert candidate(s = \"testtesttesttest\",words = ['test', 'test', 'test']) == [0, 4]\n assert candidate(s = \"alibabacloudisfastgrowing\",words = ['ali', 'ba', 'ba', 'cloud', 'is', 'fast', 'grow', 'ing']) == []\n assert candidate(s = \"mississippiissippi\",words = ['mis', 'iss', 'ssi', 'ipp', 'ppi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi']) == []\n assert candidate(s = \"thisisaverylongstringthatcontainsmanywordsandwordstogether\",words = ['this', 'is', 'avery', 'long', 'string', 'that', 'contains', 'many', 'words', 'and', 'words', 'together']) == []\n assert candidate(s = \"catdogcatdogcatdogcat\",words = ['cat', 'dog', 'cat', 'dog', 'cat']) == [0, 6]\n assert candidate(s = \"abcdefghabcdefghabcdefgh\",words = ['abcdef', 'ghabcd', 'efghab', 'cdefgh', 'defghi', 'efghab', 'fghabc']) == []\n assert candidate(s = \"repeatedrepeatedrepeated\",words = ['repeated', 'repe', 'atedre', 'peated']) == []\n assert candidate(s = \"xylophoneclarinetxylophoneclarinet\",words = ['xylo', 'phone', 'clar', 'inet']) == []\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",words = ['quick', 'brown', 'fox', 'jump', 'over', 'the', 'lazy', 'dog']) == []\n assert candidate(s = \"repeatedrepeatedrepeatedword\",words = ['repeated', 'repeated', 'repeated', 'word']) == []\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",words = ['quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']) == []\n assert candidate(s = \"onetwothreefour\",words = ['one', 'two', 'three', 'four']) == []\n assert candidate(s = \"loremipsumdolorsitamet\",words = ['lorem', 'ipsum', 'dolor', 'sit', 'amet']) == []\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",words = ['aabb', 'ccdd', 'eefg', 'ghhi', 'ijjk', 'kllm', 'mnnm', 'nnoo', 'ppqq', 'rrss', 'ttuu', 'vvww', 'xxyy', 'zzaa']) == []\n assert 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 candidate(s = \"onetwothreefourfivesixseveneightnine\",words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']) == []\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiii\",words = ['aabb', 'bbcc', 'ccdd', 'ddeeff', 'ffgg', 'gghh', 'hhiiaa']) == []\n assert candidate(s = \"aabbccddeeffgghhiijj\",words = ['aabb', 'ccdd', 'eeff', 'gghh', 'iijj']) == [0]\n assert candidate(s = \"mississippi\",words = ['issi', 'ippi']) == []\n assert candidate(s = \"aaaaaaaaaaaabbbbbbbbbbbcccccccccccddddddddddd\",words = ['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'aaaaa', 'bbbbb']) == []\n assert candidate(s = \"complexcomplexcomplexcomplex\",words = ['com', 'ple', 'xco', 'mple', 'com', 'ple', 'xco', 'mple']) == []\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",words = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz', 'zz']) == []\n assert candidate(s = \"pythonprogramminglanguage\",words = ['py', 'thon', 'pro', 'gram', 'ming', 'lan', 'guag', 'e']) == []\n assert candidate(s = \"exampleexampleexampleexample\",words = ['example', 'example', 'example', 'example']) == [0]\n assert candidate(s = \"abcdefghabcdefgh\",words = ['abcd', 'efgh', 'efgh', 'abcd']) == [0]\n assert candidate(s = \"hellohellohellohellohello\",words = ['hello', 'hello', 'hello', 'hello', 'hello']) == [0]\n assert candidate(s = \"xxyyyzzzzzyyyxx\",words = ['xx', 'yy', 'zz', 'yy', 'xx']) == []\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",words = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz']) == []\n assert candidate(s = \"hellohellohellohellohellohellohello\",words = ['hello', 'hello']) == [0, 5, 10, 15, 20, 25]\n assert candidate(s = \"concatenationconcatenationconcatenation\",words = ['concat', 'enationc', 'ationc', 'tenation', 'enationc', 'oncatena']) == []\n assert candidate(s = \"overlapoverlappingoverlapping\",words = ['over', 'lap', 'over', 'lapping']) == []\n assert candidate(s = \"xxyyzzxxyyzzxxyyzzxxyyzz\",words = ['xxyy', 'yyzz', 'xxyy', 'yyzz', 'xxyy', 'yyzz']) == []\n assert candidate(s = \"abcdefgabcdefgabcdefg\",words = ['abc', 'def', 'gab']) == [0, 7]\n assert candidate(s = \"aabbccddeeff\",words = ['abc', 'def', 'abb']) == []\n assert candidate(s = \"mississippiissississippi\",words = ['issi', 'ssis', 'siss', 'issi', 'ssis', 'siss', 'issi', 'ssis', 'siss']) == []\n assert candidate(s = \"abcdefghijklmno\",words = ['abc', 'def', 'ghi', 'jkl', 'mno']) == [0]\n assert candidate(s = \"xyzxyzxyzxyzxyz\",words = ['xyz', 'zyx', 'yzx', 'xzy', 'zxy']) == []\n assert candidate(s = \"abcdefabcdefabcdefabcdefabcdefabcdef\",words = ['abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef']) == [0]\n assert candidate(s = \"thisisatargetstringwithtargetstring\",words = ['this', 'is', 'a', 'target', 'string']) == []\n assert candidate(s = \"thisisanexamplethisisanexamplethisisanexample\",words = ['this', 'isan', 'example', 'isan', 'example']) == []\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",words = ['zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz']) == [0, 4, 1, 5, 2, 6, 3]\n assert candidate(s = \"abcdabcdabcdabcdabcdabcd\",words = ['abcd', 'dcba', 'abdc', 'bacd', 'cdab']) == []\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\",words = ['abc', 'def', 'ghi', 'jabc', 'def', 'ghij', 'abc', 'def', 'ghi', 'j']) == []\n assert candidate(s = \"abcdefghiabcdefghiabcdefghi\",words = ['abc', 'def', 'ghi', 'abc', 'def', 'ghi', 'abc', 'def', 'ghi']) == [0]\n assert candidate(s = \"abcdefghijabcdefghijabcdefghijabcdefghij\",words = ['abc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'j']) == []\n assert candidate(s = \"aaaaaaaaaaaaaaaaaab\",words = ['aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'a']) == []\n assert candidate(s = \"onetwothreefourfivesix\",words = ['one', 'two', 'three', 'four', 'five', 'six']) == []\n assert candidate(s = \"ababababababababababababababab\",words = ['aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab']) == [0]\n assert candidate(s = \"abracadabra\",words = ['bra', 'cad']) == [1]\n assert candidate(s = \"amazinganduniquestring\",words = ['amazing', 'and', 'unique', 'string']) == []\n assert candidate(s = \"mississippiississi\",words = ['issi', 'ssis', 'siss', 'issi']) == []\n assert candidate(s = \"abcdefabcdefabcdef\",words = ['abc', 'def', 'cba', 'fed']) == []\n assert candidate(s = \"abcdefghij\",words = ['abc', 'def', 'ghi', 'j']) == []\n assert 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 candidate(s = \"mnopqrstuvmnopqrstuv\",words = ['mnop', 'qrst', 'uv', 'mnop', 'qrst', 'uv']) == []\n assert candidate(s = \"lmnopqrlmnopqrlmnopqr\",words = ['lmnop', 'qr', 'lmnop', 'qr', 'lmnop', 'qr']) == []\n assert candidate(s = \"xyzzxyzzxyzzxyzzxyzzxyzzxyzz\",words = ['xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx']) == []\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\",words = ['abcdefghij', 'abcdefghij', 'abcdefghij']) == [0]\n assert candidate(s = \"anananananananananananananananananan\",words = ['ana', 'nan', 'ana']) == [0, 6, 12, 18, 24, 4, 10, 16, 22, 2, 8, 14, 20, 26]\n assert candidate(s = \"hellohellohellohello\",words = ['hello', 'hello', 'hello']) == [0, 5]\n assert candidate(s = \"abcdefabcdefabcdefabcdefabcdef\",words = ['abc', 'def']) == [0, 3, 6, 9, 12, 15, 18, 21, 24]\n assert 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 candidate(s = \"aaaabbbbccccaaaabbbbcccc\",words = ['aaaa', 'bbbb', 'cccc', 'aaaa', 'bbbb', 'cccc']) == [0]\n assert candidate(s = \"concatenatedsubstringthatappearsmultipleconcatenatedsubstring\",words = ['concatenated', 'substring', 'that', 'appears', 'multiple']) == []\n assert 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 candidate(s = \"mississippiissimissing\",words = ['issi', 'ssis', 'ippi', 'ssip']) == []\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",words = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz']) == []\n assert candidate(s = \"longstringwithmanywordsoflengthfive\",words = ['fivel', 'ength', 'withm', 'nword', 'stringw', 'ongst', 'rings', 'words', 'thefa']) == []\n assert candidate(s = \"xxyzxyzyxzyzyzxzy\",words = ['xyz', 'zyx', 'zyz', 'zxy']) == []\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",words = ['abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc']) == [0]\n assert candidate(s = \"qwertyuiopqwertyuiopqwertyuiop\",words = ['qwerty', 'uiop', 'qwerty', 'uiop', 'qwerty', 'uiop']) == []\n assert candidate(s = \"mississippiississippi\",words = ['miss', 'issi', 'ssip', 'ippi']) == []\n assert candidate(s = \"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij\",words = ['abc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'j']) == []\n assert candidate(s = \"aaaaaabbbbccccdddd\",words = ['aaaa', 'bbbb', 'cccc', 'dddd']) == [2]\n assert candidate(s = \"xyzxyzxyzxyz\",words = ['xyz', 'xyz', 'xyz', 'xyz']) == [0]\n assert candidate(s = \"mississippiissimissing\",words = ['issi', 'ssis', 'ippi', 'ssim']) == []\n"}, "metadata": {"canonical_parameter_names": ["s", "words"], "leetcode_dataset_entry_point": "Solution().findSubstring", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findSubstring(string s, vector& words) {", "container": "Solution", "callable": "findSubstring", "parameters": [{"name": "s", "type": "string"}, {"name": "words", "type": "vector&"}], "return_type": "vector", "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\n \nConstraints:\n\n0 <= s.length <= 3 * 104\ns[i] is '(', or ')'.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestValidParentheses", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestValidParentheses(string s) {", "container": "Solution", "callable": "longestValidParentheses", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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).\nPrior to being passed to your function, nums is possibly rotated at an unknown pivot 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 rotated at pivot index 3 and become [4,5,6,7,0,1,2].\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.\nYou must write an algorithm with O(log n) runtime complexity.\n \nExample 1:\nInput: nums = [4,5,6,7,0,1,2], target = 0\nOutput: 4\nExample 2:\nInput: nums = [4,5,6,7,0,1,2], target = 3\nOutput: -1\nExample 3:\nInput: nums = [1], target = 0\nOutput: -1\n\n \nConstraints:\n\n1 <= nums.length <= 5000\n-104 <= nums[i] <= 104\nAll values of nums are unique.\nnums is an ascending array that is possibly rotated.\n-104 <= target <= 104\n\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, 200, 300, 400, 500, 600, 700, 800, 900, 100, 200, 300, 400, 500, 600, 700, 800],target = 900) == 8\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().search", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int search(vector& nums, int target) {", "container": "Solution", "callable": "search", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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.\nIf target is not found in the array, return [-1, -1].\nYou must write an algorithm with O(log n) runtime complexity.\n \nExample 1:\nInput: nums = [5,7,7,8,8,10], target = 8\nOutput: [3,4]\nExample 2:\nInput: nums = [5,7,7,8,8,10], target = 6\nOutput: [-1,-1]\nExample 3:\nInput: nums = [], target = 0\nOutput: [-1,-1]\n\n \nConstraints:\n\n0 <= nums.length <= 105\n-109 <= nums[i] <= 109\nnums is a non-decreasing array.\n-109 <= target <= 109\n\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().searchRange", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector searchRange(vector& nums, int target) {", "container": "Solution", "callable": "searchRange", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 104\n-104 <= nums[i] <= 104\nnums contains distinct values sorted in ascending order.\n-104 <= target <= 104\n\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, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000],target = 500000) == 6\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 = [10000],target = 10001) == 1\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 = [10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000],target = 55000) == 5\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 = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000],target = 10000000) == 7\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().searchInsert", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int searchInsert(vector& nums, int target) {", "container": "Solution", "callable": "searchInsert", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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\nEach row must contain the digits 1-9 without repetition.\nEach column must contain the digits 1-9 without repetition.\nEach of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition.\n\nNote:\n\nA Sudoku board (partially filled) could be valid but is not necessarily solvable.\nOnly the filled cells need to be validated according to the mentioned rules.\n\n \nExample 1:\n\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\n \nConstraints:\n\nboard.length == 9\nboard[i].length == 9\nboard[i][j] is a digit 1-9 or '.'.\n\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"}, "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().isValidSudoku", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isValidSudoku(vector>& board) {", "container": "Solution", "callable": "isValidSudoku", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "bool", "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\ncountAndSay(1) = \"1\"\ncountAndSay(n) is the run-length encoding of countAndSay(n - 1).\n\nRun-length encoding (RLE) is a string compression method that works by replacing consecutive identical characters (repeated 2 or more times) with the concatenation of the character and the number marking the count of the characters (length of the run). 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\".\nGiven a positive integer n, return the nth 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\n\nExample 2:\n\nInput: n = 1\nOutput: \"1\"\nExplanation:\nThis is the base case.\n\n \nConstraints:\n\n1 <= n <= 30\n\n \nFollow up: Could you solve it iteratively?", "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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countAndSay", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string countAndSay(int n) {", "container": "Solution", "callable": "countAndSay", "parameters": [{"name": "n", "type": "int"}], "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.\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.\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\n \nConstraints:\n\n1 <= candidates.length <= 30\n2 <= candidates[i] <= 40\nAll elements of candidates are distinct.\n1 <= target <= 40\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(candidates = [2, 5, 2, 1, 2],target = 5) == [[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 1, 2], [1, 1, 1, 2], [1, 2, 2], [1, 2, 2], [1, 2, 2], [1, 2, 2], [1, 2, 2], [1, 2, 2], [5]]\n assert candidate(candidates = [8, 7, 4, 3],target = 11) == [[3, 4, 4], [3, 8], [4, 7]]\n assert candidate(candidates = [2, 5, 10],target = 10) == [[2, 2, 2, 2, 2], [5, 5], [10]]\n assert candidate(candidates = [2, 5, 10],target = 15) == [[2, 2, 2, 2, 2, 5], [5, 5, 5], [5, 10]]\n assert candidate(candidates = [3, 5, 7],target = 10) == [[3, 7], [5, 5]]\n assert candidate(candidates = [2, 3, 5],target = 8) == [[2, 2, 2, 2], [2, 3, 3], [3, 5]]\n assert candidate(candidates = [8, 2, 3],target = 11) == [[2, 2, 2, 2, 3], [2, 3, 3, 3], [3, 8]]\n assert candidate(candidates = [3, 5, 8],target = 11) == [[3, 3, 5], [3, 8]]\n assert 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 candidate(candidates = [4, 2, 1],target = 10) == [[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, 2, 2], [1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 4], [1, 1, 2, 2, 2, 2], [1, 1, 2, 2, 4], [1, 1, 4, 4], [2, 2, 2, 2, 2], [2, 2, 2, 4], [2, 4, 4]]\n assert candidate(candidates = [10, 20, 30],target = 20) == [[10, 10], [20]]\n assert 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 candidate(candidates = [7, 6, 5],target = 17) == [[5, 5, 7], [5, 6, 6]]\n assert 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 candidate(candidates = [7, 14],target = 30) == []\n assert candidate(candidates = [1],target = 1) == [[1]]\n assert candidate(candidates = [1, 2, 3],target = 5) == [[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [2, 3]]\n assert candidate(candidates = [4, 6, 8],target = 12) == [[4, 4, 4], [4, 8], [6, 6]]\n assert candidate(candidates = [2],target = 1) == []\n assert candidate(candidates = [3, 5, 7],target = 11) == [[3, 3, 5]]\n assert candidate(candidates = [1, 2],target = 4) == [[1, 1, 1, 1], [1, 1, 2], [2, 2]]\n assert candidate(candidates = [1, 2, 5],target = 5) == [[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 2, 2], [5]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5],target = 8) == [[1, 1, 1, 1, 1, 1, 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, 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, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 5], [1, 1, 2, 2, 2], [1, 1, 6], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 5], [1, 1, 2, 2, 2], [1, 1, 6], [1, 2, 5], [1, 7], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 5], [1, 1, 2, 2, 2], [1, 1, 6], [1, 2, 5], [1, 7], [2, 2, 2, 2], [2, 6]]\n assert candidate(candidates = [1],target = 2) == [[1, 1]]\n assert candidate(candidates = [2, 3, 6, 7],target = 7) == [[2, 2, 3], [7]]\n assert candidate(candidates = [4, 7, 10, 13, 16, 19, 22, 25, 28, 31],target = 80) == [[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, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 10], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 10], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 28], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 25], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 22], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 13, 19], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 22], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 10, 19], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 13, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 10, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 13, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 19], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 10, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 13, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 10, 10, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10], [4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 16], [4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 10, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 10, 10, 10], [4, 4, 4, 4, 4, 4, 4, 4, 4, 13, 31], [4, 4, 4, 4, 4, 4, 4, 4, 4, 16, 28], [4, 4, 4, 4, 4, 4, 4, 4, 4, 19, 25], [4, 4, 4, 4, 4, 4, 4, 4, 4, 22, 22], [4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 13], [4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 10, 10], [4, 4, 4, 4, 4, 4, 4, 4, 7, 10, 31], [4, 4, 4, 4, 4, 4, 4, 4, 7, 13, 28], [4, 4, 4, 4, 4, 4, 4, 4, 7, 16, 25], [4, 4, 4, 4, 4, 4, 4, 4, 7, 19, 22], [4, 4, 4, 4, 4, 4, 4, 4, 10, 10, 28], [4, 4, 4, 4, 4, 4, 4, 4, 10, 13, 25], [4, 4, 4, 4, 4, 4, 4, 4, 10, 16, 22], [4, 4, 4, 4, 4, 4, 4, 4, 10, 19, 19], [4, 4, 4, 4, 4, 4, 4, 4, 13, 13, 22], [4, 4, 4, 4, 4, 4, 4, 4, 13, 16, 19], [4, 4, 4, 4, 4, 4, 4, 4, 16, 16, 16], [4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 10], [4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 31], [4, 4, 4, 4, 4, 4, 4, 7, 7, 10, 28], [4, 4, 4, 4, 4, 4, 4, 7, 7, 13, 25], [4, 4, 4, 4, 4, 4, 4, 7, 7, 16, 22], [4, 4, 4, 4, 4, 4, 4, 7, 7, 19, 19], [4, 4, 4, 4, 4, 4, 4, 7, 10, 10, 25], [4, 4, 4, 4, 4, 4, 4, 7, 10, 13, 22], [4, 4, 4, 4, 4, 4, 4, 7, 10, 16, 19], [4, 4, 4, 4, 4, 4, 4, 7, 13, 13, 19], [4, 4, 4, 4, 4, 4, 4, 7, 13, 16, 16], [4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 22], [4, 4, 4, 4, 4, 4, 4, 10, 10, 13, 19], [4, 4, 4, 4, 4, 4, 4, 10, 10, 16, 16], [4, 4, 4, 4, 4, 4, 4, 10, 13, 13, 16], [4, 4, 4, 4, 4, 4, 4, 13, 13, 13, 13], [4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 7], [4, 4, 4, 4, 4, 4, 7, 7, 7, 7, 28], [4, 4, 4, 4, 4, 4, 7, 7, 7, 10, 25], [4, 4, 4, 4, 4, 4, 7, 7, 7, 13, 22], [4, 4, 4, 4, 4, 4, 7, 7, 7, 16, 19], [4, 4, 4, 4, 4, 4, 7, 7, 10, 10, 22], [4, 4, 4, 4, 4, 4, 7, 7, 10, 13, 19], [4, 4, 4, 4, 4, 4, 7, 7, 10, 16, 16], [4, 4, 4, 4, 4, 4, 7, 7, 13, 13, 16], [4, 4, 4, 4, 4, 4, 7, 10, 10, 10, 19], [4, 4, 4, 4, 4, 4, 7, 10, 10, 13, 16], [4, 4, 4, 4, 4, 4, 7, 10, 13, 13, 13], [4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 16], [4, 4, 4, 4, 4, 4, 10, 10, 10, 13, 13], [4, 4, 4, 4, 4, 4, 25, 31], [4, 4, 4, 4, 4, 4, 28, 28], [4, 4, 4, 4, 4, 7, 7, 7, 7, 7, 25], [4, 4, 4, 4, 4, 7, 7, 7, 7, 10, 22], [4, 4, 4, 4, 4, 7, 7, 7, 7, 13, 19], [4, 4, 4, 4, 4, 7, 7, 7, 7, 16, 16], [4, 4, 4, 4, 4, 7, 7, 7, 10, 10, 19], [4, 4, 4, 4, 4, 7, 7, 7, 10, 13, 16], [4, 4, 4, 4, 4, 7, 7, 7, 13, 13, 13], [4, 4, 4, 4, 4, 7, 7, 10, 10, 10, 16], [4, 4, 4, 4, 4, 7, 7, 10, 10, 13, 13], [4, 4, 4, 4, 4, 7, 10, 10, 10, 10, 13], [4, 4, 4, 4, 4, 7, 22, 31], [4, 4, 4, 4, 4, 7, 25, 28], [4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10], [4, 4, 4, 4, 4, 10, 19, 31], [4, 4, 4, 4, 4, 10, 22, 28], [4, 4, 4, 4, 4, 10, 25, 25], [4, 4, 4, 4, 4, 13, 16, 31], [4, 4, 4, 4, 4, 13, 19, 28], [4, 4, 4, 4, 4, 13, 22, 25], [4, 4, 4, 4, 4, 16, 16, 28], [4, 4, 4, 4, 4, 16, 19, 25], [4, 4, 4, 4, 4, 16, 22, 22], [4, 4, 4, 4, 4, 19, 19, 22], [4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 22], [4, 4, 4, 4, 7, 7, 7, 7, 7, 10, 19], [4, 4, 4, 4, 7, 7, 7, 7, 7, 13, 16], [4, 4, 4, 4, 7, 7, 7, 7, 10, 10, 16], [4, 4, 4, 4, 7, 7, 7, 7, 10, 13, 13], [4, 4, 4, 4, 7, 7, 7, 10, 10, 10, 13], [4, 4, 4, 4, 7, 7, 10, 10, 10, 10, 10], [4, 4, 4, 4, 7, 7, 19, 31], [4, 4, 4, 4, 7, 7, 22, 28], [4, 4, 4, 4, 7, 7, 25, 25], [4, 4, 4, 4, 7, 10, 16, 31], [4, 4, 4, 4, 7, 10, 19, 28], [4, 4, 4, 4, 7, 10, 22, 25], [4, 4, 4, 4, 7, 13, 13, 31], [4, 4, 4, 4, 7, 13, 16, 28], [4, 4, 4, 4, 7, 13, 19, 25], [4, 4, 4, 4, 7, 13, 22, 22], [4, 4, 4, 4, 7, 16, 16, 25], [4, 4, 4, 4, 7, 16, 19, 22], [4, 4, 4, 4, 7, 19, 19, 19], [4, 4, 4, 4, 10, 10, 13, 31], [4, 4, 4, 4, 10, 10, 16, 28], [4, 4, 4, 4, 10, 10, 19, 25], [4, 4, 4, 4, 10, 10, 22, 22], [4, 4, 4, 4, 10, 13, 13, 28], [4, 4, 4, 4, 10, 13, 16, 25], [4, 4, 4, 4, 10, 13, 19, 22], [4, 4, 4, 4, 10, 16, 16, 22], [4, 4, 4, 4, 10, 16, 19, 19], [4, 4, 4, 4, 13, 13, 13, 25], [4, 4, 4, 4, 13, 13, 16, 22], [4, 4, 4, 4, 13, 13, 19, 19], [4, 4, 4, 4, 13, 16, 16, 19], [4, 4, 4, 4, 16, 16, 16, 16], [4, 4, 4, 7, 7, 7, 7, 7, 7, 7, 19], [4, 4, 4, 7, 7, 7, 7, 7, 7, 10, 16], [4, 4, 4, 7, 7, 7, 7, 7, 7, 13, 13], [4, 4, 4, 7, 7, 7, 7, 7, 10, 10, 13], [4, 4, 4, 7, 7, 7, 7, 10, 10, 10, 10], [4, 4, 4, 7, 7, 7, 16, 31], [4, 4, 4, 7, 7, 7, 19, 28], [4, 4, 4, 7, 7, 7, 22, 25], [4, 4, 4, 7, 7, 10, 13, 31], [4, 4, 4, 7, 7, 10, 16, 28], [4, 4, 4, 7, 7, 10, 19, 25], [4, 4, 4, 7, 7, 10, 22, 22], [4, 4, 4, 7, 7, 13, 13, 28], [4, 4, 4, 7, 7, 13, 16, 25], [4, 4, 4, 7, 7, 13, 19, 22], [4, 4, 4, 7, 7, 16, 16, 22], [4, 4, 4, 7, 7, 16, 19, 19], [4, 4, 4, 7, 10, 10, 10, 31], [4, 4, 4, 7, 10, 10, 13, 28], [4, 4, 4, 7, 10, 10, 16, 25], [4, 4, 4, 7, 10, 10, 19, 22], [4, 4, 4, 7, 10, 13, 13, 25], [4, 4, 4, 7, 10, 13, 16, 22], [4, 4, 4, 7, 10, 13, 19, 19], [4, 4, 4, 7, 10, 16, 16, 19], [4, 4, 4, 7, 13, 13, 13, 22], [4, 4, 4, 7, 13, 13, 16, 19], [4, 4, 4, 7, 13, 16, 16, 16], [4, 4, 4, 10, 10, 10, 10, 28], [4, 4, 4, 10, 10, 10, 13, 25], [4, 4, 4, 10, 10, 10, 16, 22], [4, 4, 4, 10, 10, 10, 19, 19], [4, 4, 4, 10, 10, 13, 13, 22], [4, 4, 4, 10, 10, 13, 16, 19], [4, 4, 4, 10, 10, 16, 16, 16], [4, 4, 4, 10, 13, 13, 13, 19], [4, 4, 4, 10, 13, 13, 16, 16], [4, 4, 4, 13, 13, 13, 13, 16], [4, 4, 7, 7, 7, 7, 7, 7, 7, 7, 16], [4, 4, 7, 7, 7, 7, 7, 7, 7, 10, 13], [4, 4, 7, 7, 7, 7, 7, 7, 10, 10, 10], [4, 4, 7, 7, 7, 7, 13, 31], [4, 4, 7, 7, 7, 7, 16, 28], [4, 4, 7, 7, 7, 7, 19, 25], [4, 4, 7, 7, 7, 7, 22, 22], [4, 4, 7, 7, 7, 10, 10, 31], [4, 4, 7, 7, 7, 10, 13, 28], [4, 4, 7, 7, 7, 10, 16, 25], [4, 4, 7, 7, 7, 10, 19, 22], [4, 4, 7, 7, 7, 13, 13, 25], [4, 4, 7, 7, 7, 13, 16, 22], [4, 4, 7, 7, 7, 13, 19, 19], [4, 4, 7, 7, 7, 16, 16, 19], [4, 4, 7, 7, 10, 10, 10, 28], [4, 4, 7, 7, 10, 10, 13, 25], [4, 4, 7, 7, 10, 10, 16, 22], [4, 4, 7, 7, 10, 10, 19, 19], [4, 4, 7, 7, 10, 13, 13, 22], [4, 4, 7, 7, 10, 13, 16, 19], [4, 4, 7, 7, 10, 16, 16, 16], [4, 4, 7, 7, 13, 13, 13, 19], [4, 4, 7, 7, 13, 13, 16, 16], [4, 4, 7, 10, 10, 10, 10, 25], [4, 4, 7, 10, 10, 10, 13, 22], [4, 4, 7, 10, 10, 10, 16, 19], [4, 4, 7, 10, 10, 13, 13, 19], [4, 4, 7, 10, 10, 13, 16, 16], [4, 4, 7, 10, 13, 13, 13, 16], [4, 4, 7, 13, 13, 13, 13, 13], [4, 4, 10, 10, 10, 10, 10, 22], [4, 4, 10, 10, 10, 10, 13, 19], [4, 4, 10, 10, 10, 10, 16, 16], [4, 4, 10, 10, 10, 13, 13, 16], [4, 4, 10, 10, 13, 13, 13, 13], [4, 4, 10, 31, 31], [4, 4, 13, 28, 31], [4, 4, 16, 25, 31], [4, 4, 16, 28, 28], [4, 4, 19, 22, 31], [4, 4, 19, 25, 28], [4, 4, 22, 22, 28], [4, 4, 22, 25, 25], [4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 13], [4, 7, 7, 7, 7, 7, 7, 7, 7, 10, 10], [4, 7, 7, 7, 7, 7, 10, 31], [4, 7, 7, 7, 7, 7, 13, 28], [4, 7, 7, 7, 7, 7, 16, 25], [4, 7, 7, 7, 7, 7, 19, 22], [4, 7, 7, 7, 7, 10, 10, 28], [4, 7, 7, 7, 7, 10, 13, 25], [4, 7, 7, 7, 7, 10, 16, 22], [4, 7, 7, 7, 7, 10, 19, 19], [4, 7, 7, 7, 7, 13, 13, 22], [4, 7, 7, 7, 7, 13, 16, 19], [4, 7, 7, 7, 7, 16, 16, 16], [4, 7, 7, 7, 10, 10, 10, 25], [4, 7, 7, 7, 10, 10, 13, 22], [4, 7, 7, 7, 10, 10, 16, 19], [4, 7, 7, 7, 10, 13, 13, 19], [4, 7, 7, 7, 10, 13, 16, 16], [4, 7, 7, 7, 13, 13, 13, 16], [4, 7, 7, 10, 10, 10, 10, 22], [4, 7, 7, 10, 10, 10, 13, 19], [4, 7, 7, 10, 10, 10, 16, 16], [4, 7, 7, 10, 10, 13, 13, 16], [4, 7, 7, 10, 13, 13, 13, 13], [4, 7, 7, 31, 31], [4, 7, 10, 10, 10, 10, 10, 19], [4, 7, 10, 10, 10, 10, 13, 16], [4, 7, 10, 10, 10, 13, 13, 13], [4, 7, 10, 28, 31], [4, 7, 13, 25, 31], [4, 7, 13, 28, 28], [4, 7, 16, 22, 31], [4, 7, 16, 25, 28], [4, 7, 19, 19, 31], [4, 7, 19, 22, 28], [4, 7, 19, 25, 25], [4, 7, 22, 22, 25], [4, 10, 10, 10, 10, 10, 10, 16], [4, 10, 10, 10, 10, 10, 13, 13], [4, 10, 10, 25, 31], [4, 10, 10, 28, 28], [4, 10, 13, 22, 31], [4, 10, 13, 25, 28], [4, 10, 16, 19, 31], [4, 10, 16, 22, 28], [4, 10, 16, 25, 25], [4, 10, 19, 19, 28], [4, 10, 19, 22, 25], [4, 10, 22, 22, 22], [4, 13, 13, 19, 31], [4, 13, 13, 22, 28], [4, 13, 13, 25, 25], [4, 13, 16, 16, 31], [4, 13, 16, 19, 28], [4, 13, 16, 22, 25], [4, 13, 19, 19, 25], [4, 13, 19, 22, 22], [4, 16, 16, 16, 28], [4, 16, 16, 19, 25], [4, 16, 16, 22, 22], [4, 16, 19, 19, 22], [4, 19, 19, 19, 19], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 10], [7, 7, 7, 7, 7, 7, 7, 31], [7, 7, 7, 7, 7, 7, 10, 28], [7, 7, 7, 7, 7, 7, 13, 25], [7, 7, 7, 7, 7, 7, 16, 22], [7, 7, 7, 7, 7, 7, 19, 19], [7, 7, 7, 7, 7, 10, 10, 25], [7, 7, 7, 7, 7, 10, 13, 22], [7, 7, 7, 7, 7, 10, 16, 19], [7, 7, 7, 7, 7, 13, 13, 19], [7, 7, 7, 7, 7, 13, 16, 16], [7, 7, 7, 7, 10, 10, 10, 22], [7, 7, 7, 7, 10, 10, 13, 19], [7, 7, 7, 7, 10, 10, 16, 16], [7, 7, 7, 7, 10, 13, 13, 16], [7, 7, 7, 7, 13, 13, 13, 13], [7, 7, 7, 10, 10, 10, 10, 19], [7, 7, 7, 10, 10, 10, 13, 16], [7, 7, 7, 10, 10, 13, 13, 13], [7, 7, 7, 28, 31], [7, 7, 10, 10, 10, 10, 10, 16], [7, 7, 10, 10, 10, 10, 13, 13], [7, 7, 10, 25, 31], [7, 7, 10, 28, 28], [7, 7, 13, 22, 31], [7, 7, 13, 25, 28], [7, 7, 16, 19, 31], [7, 7, 16, 22, 28], [7, 7, 16, 25, 25], [7, 7, 19, 19, 28], [7, 7, 19, 22, 25], [7, 7, 22, 22, 22], [7, 10, 10, 10, 10, 10, 10, 13], [7, 10, 10, 22, 31], [7, 10, 10, 25, 28], [7, 10, 13, 19, 31], [7, 10, 13, 22, 28], [7, 10, 13, 25, 25], [7, 10, 16, 16, 31], [7, 10, 16, 19, 28], [7, 10, 16, 22, 25], [7, 10, 19, 19, 25], [7, 10, 19, 22, 22], [7, 13, 13, 16, 31], [7, 13, 13, 19, 28], [7, 13, 13, 22, 25], [7, 13, 16, 16, 28], [7, 13, 16, 19, 25], [7, 13, 16, 22, 22], [7, 13, 19, 19, 22], [7, 16, 16, 16, 25], [7, 16, 16, 19, 22], [7, 16, 19, 19, 19], [10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 19, 31], [10, 10, 10, 22, 28], [10, 10, 10, 25, 25], [10, 10, 13, 16, 31], [10, 10, 13, 19, 28], [10, 10, 13, 22, 25], [10, 10, 16, 16, 28], [10, 10, 16, 19, 25], [10, 10, 16, 22, 22], [10, 10, 19, 19, 22], [10, 13, 13, 13, 31], [10, 13, 13, 16, 28], [10, 13, 13, 19, 25], [10, 13, 13, 22, 22], [10, 13, 16, 16, 25], [10, 13, 16, 19, 22], [10, 13, 19, 19, 19], [10, 16, 16, 16, 22], [10, 16, 16, 19, 19], [13, 13, 13, 13, 28], [13, 13, 13, 16, 25], [13, 13, 13, 19, 22], [13, 13, 16, 16, 22], [13, 13, 16, 19, 19], [13, 16, 16, 16, 19], [16, 16, 16, 16, 16]]\n assert candidate(candidates = [1, 4, 7, 10, 13, 16, 19],target = 50) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 4, 4, 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, 4, 7, 7], [1, 1, 1, 1, 1, 1, 1, 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, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19], [1, 1, 1, 1, 1, 1, 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, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 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, 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, 7, 13], [1, 1, 1, 1, 1, 1, 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, 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, 4, 4, 13], [1, 1, 1, 1, 1, 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, 7, 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, 7, 7, 7], [1, 1, 1, 1, 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, 4, 4, 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, 4, 4, 7, 7], [1, 1, 1, 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, 4, 4, 4, 7], [1, 1, 1, 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, 19], [1, 1, 1, 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, 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, 10, 13], [1, 1, 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, 4, 4, 4, 4, 4], [1, 1, 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, 4, 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, 4, 7, 13], [1, 1, 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, 10, 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, 7, 7, 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, 4, 4, 4, 13], [1, 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, 4, 7, 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, 4, 7, 7, 7], [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, 4, 4, 4, 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, 4, 4, 4, 7, 7], [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, 19], [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, 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, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 13, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 16, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 13, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 13, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 10, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 10, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 13, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 10, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 10], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 19], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 10, 16], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 13, 13], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 16], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 10, 13], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 10, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 4, 19, 19], [1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 7, 16, 19], [1, 1, 1, 1, 1, 1, 1, 1, 10, 13, 19], [1, 1, 1, 1, 1, 1, 1, 1, 10, 16, 16], [1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 16], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 19], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 16], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 10, 13], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 7, 13], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 10, 10], [1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 4, 4, 7, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 4, 4, 16, 19], [1, 1, 1, 1, 1, 1, 1, 4, 7, 13, 19], [1, 1, 1, 1, 1, 1, 1, 4, 7, 16, 16], [1, 1, 1, 1, 1, 1, 1, 4, 10, 10, 19], [1, 1, 1, 1, 1, 1, 1, 4, 10, 13, 16], [1, 1, 1, 1, 1, 1, 1, 4, 13, 13, 13], [1, 1, 1, 1, 1, 1, 1, 7, 7, 10, 19], [1, 1, 1, 1, 1, 1, 1, 7, 7, 13, 16], [1, 1, 1, 1, 1, 1, 1, 7, 10, 10, 16], [1, 1, 1, 1, 1, 1, 1, 7, 10, 13, 13], [1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 13], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 16], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 13], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 10, 10], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 7, 10], [1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 7, 7, 7, 7], [1, 1, 1, 1, 1, 1, 4, 4, 4, 13, 19], [1, 1, 1, 1, 1, 1, 4, 4, 4, 16, 16], [1, 1, 1, 1, 1, 1, 4, 4, 7, 10, 19], [1, 1, 1, 1, 1, 1, 4, 4, 7, 13, 16], [1, 1, 1, 1, 1, 1, 4, 4, 10, 10, 16], [1, 1, 1, 1, 1, 1, 4, 4, 10, 13, 13], [1, 1, 1, 1, 1, 1, 4, 7, 7, 7, 19], [1, 1, 1, 1, 1, 1, 4, 7, 7, 10, 16], [1, 1, 1, 1, 1, 1, 4, 7, 7, 13, 13], [1, 1, 1, 1, 1, 1, 4, 7, 10, 10, 13], [1, 1, 1, 1, 1, 1, 4, 10, 10, 10, 10], [1, 1, 1, 1, 1, 1, 7, 7, 7, 7, 16], [1, 1, 1, 1, 1, 1, 7, 7, 7, 10, 13], [1, 1, 1, 1, 1, 1, 7, 7, 10, 10, 10], [1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 13], [1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 7, 10], [1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 7, 7], [1, 1, 1, 1, 1, 4, 4, 4, 4, 10, 19], [1, 1, 1, 1, 1, 4, 4, 4, 4, 13, 16], [1, 1, 1, 1, 1, 4, 4, 4, 7, 7, 19], [1, 1, 1, 1, 1, 4, 4, 4, 7, 10, 16], [1, 1, 1, 1, 1, 4, 4, 4, 7, 13, 13], [1, 1, 1, 1, 1, 4, 4, 4, 10, 10, 13], [1, 1, 1, 1, 1, 4, 4, 7, 7, 7, 16], [1, 1, 1, 1, 1, 4, 4, 7, 7, 10, 13], [1, 1, 1, 1, 1, 4, 4, 7, 10, 10, 10], [1, 1, 1, 1, 1, 4, 7, 7, 7, 7, 13], [1, 1, 1, 1, 1, 4, 7, 7, 7, 10, 10], [1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 10], [1, 1, 1, 1, 1, 7, 19, 19], [1, 1, 1, 1, 1, 10, 16, 19], [1, 1, 1, 1, 1, 13, 13, 19], [1, 1, 1, 1, 1, 13, 16, 16], [1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10], [1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7], [1, 1, 1, 1, 4, 4, 4, 4, 4, 7, 19], [1, 1, 1, 1, 4, 4, 4, 4, 4, 10, 16], [1, 1, 1, 1, 4, 4, 4, 4, 4, 13, 13], [1, 1, 1, 1, 4, 4, 4, 4, 7, 7, 16], [1, 1, 1, 1, 4, 4, 4, 4, 7, 10, 13], [1, 1, 1, 1, 4, 4, 4, 4, 10, 10, 10], [1, 1, 1, 1, 4, 4, 4, 7, 7, 7, 13], [1, 1, 1, 1, 4, 4, 4, 7, 7, 10, 10], [1, 1, 1, 1, 4, 4, 7, 7, 7, 7, 10], [1, 1, 1, 1, 4, 4, 19, 19], [1, 1, 1, 1, 4, 7, 7, 7, 7, 7, 7], [1, 1, 1, 1, 4, 7, 16, 19], [1, 1, 1, 1, 4, 10, 13, 19], [1, 1, 1, 1, 4, 10, 16, 16], [1, 1, 1, 1, 4, 13, 13, 16], [1, 1, 1, 1, 7, 7, 13, 19], [1, 1, 1, 1, 7, 7, 16, 16], [1, 1, 1, 1, 7, 10, 10, 19], [1, 1, 1, 1, 7, 10, 13, 16], [1, 1, 1, 1, 7, 13, 13, 13], [1, 1, 1, 1, 10, 10, 10, 16], [1, 1, 1, 1, 10, 10, 13, 13], [1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7], [1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 19], [1, 1, 1, 4, 4, 4, 4, 4, 4, 7, 16], [1, 1, 1, 4, 4, 4, 4, 4, 4, 10, 13], [1, 1, 1, 4, 4, 4, 4, 4, 7, 7, 13], [1, 1, 1, 4, 4, 4, 4, 4, 7, 10, 10], [1, 1, 1, 4, 4, 4, 4, 7, 7, 7, 10], [1, 1, 1, 4, 4, 4, 7, 7, 7, 7, 7], [1, 1, 1, 4, 4, 4, 16, 19], [1, 1, 1, 4, 4, 7, 13, 19], [1, 1, 1, 4, 4, 7, 16, 16], [1, 1, 1, 4, 4, 10, 10, 19], [1, 1, 1, 4, 4, 10, 13, 16], [1, 1, 1, 4, 4, 13, 13, 13], [1, 1, 1, 4, 7, 7, 10, 19], [1, 1, 1, 4, 7, 7, 13, 16], [1, 1, 1, 4, 7, 10, 10, 16], [1, 1, 1, 4, 7, 10, 13, 13], [1, 1, 1, 4, 10, 10, 10, 13], [1, 1, 1, 7, 7, 7, 7, 19], [1, 1, 1, 7, 7, 7, 10, 16], [1, 1, 1, 7, 7, 7, 13, 13], [1, 1, 1, 7, 7, 10, 10, 13], [1, 1, 1, 7, 10, 10, 10, 10], [1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 16], [1, 1, 4, 4, 4, 4, 4, 4, 4, 7, 13], [1, 1, 4, 4, 4, 4, 4, 4, 4, 10, 10], [1, 1, 4, 4, 4, 4, 4, 4, 7, 7, 10], [1, 1, 4, 4, 4, 4, 4, 7, 7, 7, 7], [1, 1, 4, 4, 4, 4, 13, 19], [1, 1, 4, 4, 4, 4, 16, 16], [1, 1, 4, 4, 4, 7, 10, 19], [1, 1, 4, 4, 4, 7, 13, 16], [1, 1, 4, 4, 4, 10, 10, 16], [1, 1, 4, 4, 4, 10, 13, 13], [1, 1, 4, 4, 7, 7, 7, 19], [1, 1, 4, 4, 7, 7, 10, 16], [1, 1, 4, 4, 7, 7, 13, 13], [1, 1, 4, 4, 7, 10, 10, 13], [1, 1, 4, 4, 10, 10, 10, 10], [1, 1, 4, 7, 7, 7, 7, 16], [1, 1, 4, 7, 7, 7, 10, 13], [1, 1, 4, 7, 7, 10, 10, 10], [1, 1, 7, 7, 7, 7, 7, 13], [1, 1, 7, 7, 7, 7, 10, 10], [1, 1, 10, 19, 19], [1, 1, 13, 16, 19], [1, 1, 16, 16, 16], [1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 13], [1, 4, 4, 4, 4, 4, 4, 4, 4, 7, 10], [1, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7], [1, 4, 4, 4, 4, 4, 10, 19], [1, 4, 4, 4, 4, 4, 13, 16], [1, 4, 4, 4, 4, 7, 7, 19], [1, 4, 4, 4, 4, 7, 10, 16], [1, 4, 4, 4, 4, 7, 13, 13], [1, 4, 4, 4, 4, 10, 10, 13], [1, 4, 4, 4, 7, 7, 7, 16], [1, 4, 4, 4, 7, 7, 10, 13], [1, 4, 4, 4, 7, 10, 10, 10], [1, 4, 4, 7, 7, 7, 7, 13], [1, 4, 4, 7, 7, 7, 10, 10], [1, 4, 7, 7, 7, 7, 7, 10], [1, 4, 7, 19, 19], [1, 4, 10, 16, 19], [1, 4, 13, 13, 19], [1, 4, 13, 16, 16], [1, 7, 7, 7, 7, 7, 7, 7], [1, 7, 7, 16, 19], [1, 7, 10, 13, 19], [1, 7, 10, 16, 16], [1, 7, 13, 13, 16], [1, 10, 10, 10, 19], [1, 10, 10, 13, 16], [1, 10, 13, 13, 13], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10], [4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 7], [4, 4, 4, 4, 4, 4, 7, 19], [4, 4, 4, 4, 4, 4, 10, 16], [4, 4, 4, 4, 4, 4, 13, 13], [4, 4, 4, 4, 4, 7, 7, 16], [4, 4, 4, 4, 4, 7, 10, 13], [4, 4, 4, 4, 4, 10, 10, 10], [4, 4, 4, 4, 7, 7, 7, 13], [4, 4, 4, 4, 7, 7, 10, 10], [4, 4, 4, 7, 7, 7, 7, 10], [4, 4, 4, 19, 19], [4, 4, 7, 7, 7, 7, 7, 7], [4, 4, 7, 16, 19], [4, 4, 10, 13, 19], [4, 4, 10, 16, 16], [4, 4, 13, 13, 16], [4, 7, 7, 13, 19], [4, 7, 7, 16, 16], [4, 7, 10, 10, 19], [4, 7, 10, 13, 16], [4, 7, 13, 13, 13], [4, 10, 10, 10, 16], [4, 10, 10, 13, 13], [7, 7, 7, 10, 19], [7, 7, 7, 13, 16], [7, 7, 10, 10, 16], [7, 7, 10, 13, 13], [7, 10, 10, 10, 13], [10, 10, 10, 10, 10]]\n assert candidate(candidates = [11, 22, 33, 44, 55, 66, 77, 88, 99],target = 100) == []\n assert candidate(candidates = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],target = 100) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 35], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 40], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 35], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 45], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 40], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 35], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 50], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 35], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 45], [5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 40], [5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 35], [5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 30], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 30], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 25], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 40], [5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 35], [5, 5, 5, 5, 5, 5, 5, 5, 10, 20, 30], [5, 5, 5, 5, 5, 5, 5, 5, 10, 25, 25], [5, 5, 5, 5, 5, 5, 5, 5, 10, 50], [5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 15, 15, 30], [5, 5, 5, 5, 5, 5, 5, 5, 15, 20, 25], [5, 5, 5, 5, 5, 5, 5, 5, 15, 45], [5, 5, 5, 5, 5, 5, 5, 5, 20, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 20, 40], [5, 5, 5, 5, 5, 5, 5, 5, 25, 35], [5, 5, 5, 5, 5, 5, 5, 5, 30, 30], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 15, 20], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 35], [5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 15, 15], [5, 5, 5, 5, 5, 5, 5, 10, 10, 15, 30], [5, 5, 5, 5, 5, 5, 5, 10, 10, 20, 25], [5, 5, 5, 5, 5, 5, 5, 10, 10, 45], [5, 5, 5, 5, 5, 5, 5, 10, 15, 15, 25], [5, 5, 5, 5, 5, 5, 5, 10, 15, 20, 20], [5, 5, 5, 5, 5, 5, 5, 10, 15, 40], [5, 5, 5, 5, 5, 5, 5, 10, 20, 35], [5, 5, 5, 5, 5, 5, 5, 10, 25, 30], [5, 5, 5, 5, 5, 5, 5, 15, 15, 15, 20], [5, 5, 5, 5, 5, 5, 5, 15, 15, 35], [5, 5, 5, 5, 5, 5, 5, 15, 20, 30], [5, 5, 5, 5, 5, 5, 5, 15, 25, 25], [5, 5, 5, 5, 5, 5, 5, 15, 50], [5, 5, 5, 5, 5, 5, 5, 20, 20, 25], [5, 5, 5, 5, 5, 5, 5, 20, 45], [5, 5, 5, 5, 5, 5, 5, 25, 40], [5, 5, 5, 5, 5, 5, 5, 30, 35], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 15, 15], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 30], [5, 5, 5, 5, 5, 5, 10, 10, 10, 15, 25], [5, 5, 5, 5, 5, 5, 10, 10, 10, 20, 20], [5, 5, 5, 5, 5, 5, 10, 10, 10, 40], [5, 5, 5, 5, 5, 5, 10, 10, 15, 15, 20], [5, 5, 5, 5, 5, 5, 10, 10, 15, 35], [5, 5, 5, 5, 5, 5, 10, 10, 20, 30], [5, 5, 5, 5, 5, 5, 10, 10, 25, 25], [5, 5, 5, 5, 5, 5, 10, 10, 50], [5, 5, 5, 5, 5, 5, 10, 15, 15, 15, 15], [5, 5, 5, 5, 5, 5, 10, 15, 15, 30], [5, 5, 5, 5, 5, 5, 10, 15, 20, 25], [5, 5, 5, 5, 5, 5, 10, 15, 45], [5, 5, 5, 5, 5, 5, 10, 20, 20, 20], [5, 5, 5, 5, 5, 5, 10, 20, 40], [5, 5, 5, 5, 5, 5, 10, 25, 35], [5, 5, 5, 5, 5, 5, 10, 30, 30], [5, 5, 5, 5, 5, 5, 15, 15, 15, 25], [5, 5, 5, 5, 5, 5, 15, 15, 20, 20], [5, 5, 5, 5, 5, 5, 15, 15, 40], [5, 5, 5, 5, 5, 5, 15, 20, 35], [5, 5, 5, 5, 5, 5, 15, 25, 30], [5, 5, 5, 5, 5, 5, 20, 20, 30], [5, 5, 5, 5, 5, 5, 20, 25, 25], [5, 5, 5, 5, 5, 5, 20, 50], [5, 5, 5, 5, 5, 5, 25, 45], [5, 5, 5, 5, 5, 5, 30, 40], [5, 5, 5, 5, 5, 5, 35, 35], [5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 15], [5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 25], [5, 5, 5, 5, 5, 10, 10, 10, 10, 15, 20], [5, 5, 5, 5, 5, 10, 10, 10, 10, 35], [5, 5, 5, 5, 5, 10, 10, 10, 15, 15, 15], [5, 5, 5, 5, 5, 10, 10, 10, 15, 30], [5, 5, 5, 5, 5, 10, 10, 10, 20, 25], [5, 5, 5, 5, 5, 10, 10, 10, 45], [5, 5, 5, 5, 5, 10, 10, 15, 15, 25], [5, 5, 5, 5, 5, 10, 10, 15, 20, 20], [5, 5, 5, 5, 5, 10, 10, 15, 40], [5, 5, 5, 5, 5, 10, 10, 20, 35], [5, 5, 5, 5, 5, 10, 10, 25, 30], [5, 5, 5, 5, 5, 10, 15, 15, 15, 20], [5, 5, 5, 5, 5, 10, 15, 15, 35], [5, 5, 5, 5, 5, 10, 15, 20, 30], [5, 5, 5, 5, 5, 10, 15, 25, 25], [5, 5, 5, 5, 5, 10, 15, 50], [5, 5, 5, 5, 5, 10, 20, 20, 25], [5, 5, 5, 5, 5, 10, 20, 45], [5, 5, 5, 5, 5, 10, 25, 40], [5, 5, 5, 5, 5, 10, 30, 35], [5, 5, 5, 5, 5, 15, 15, 15, 15, 15], [5, 5, 5, 5, 5, 15, 15, 15, 30], [5, 5, 5, 5, 5, 15, 15, 20, 25], [5, 5, 5, 5, 5, 15, 15, 45], [5, 5, 5, 5, 5, 15, 20, 20, 20], [5, 5, 5, 5, 5, 15, 20, 40], [5, 5, 5, 5, 5, 15, 25, 35], [5, 5, 5, 5, 5, 15, 30, 30], [5, 5, 5, 5, 5, 20, 20, 35], [5, 5, 5, 5, 5, 20, 25, 30], [5, 5, 5, 5, 5, 25, 25, 25], [5, 5, 5, 5, 5, 25, 50], [5, 5, 5, 5, 5, 30, 45], [5, 5, 5, 5, 5, 35, 40], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 20], [5, 5, 5, 5, 10, 10, 10, 10, 10, 15, 15], [5, 5, 5, 5, 10, 10, 10, 10, 10, 30], [5, 5, 5, 5, 10, 10, 10, 10, 15, 25], [5, 5, 5, 5, 10, 10, 10, 10, 20, 20], [5, 5, 5, 5, 10, 10, 10, 10, 40], [5, 5, 5, 5, 10, 10, 10, 15, 15, 20], [5, 5, 5, 5, 10, 10, 10, 15, 35], [5, 5, 5, 5, 10, 10, 10, 20, 30], [5, 5, 5, 5, 10, 10, 10, 25, 25], [5, 5, 5, 5, 10, 10, 10, 50], [5, 5, 5, 5, 10, 10, 15, 15, 15, 15], [5, 5, 5, 5, 10, 10, 15, 15, 30], [5, 5, 5, 5, 10, 10, 15, 20, 25], [5, 5, 5, 5, 10, 10, 15, 45], [5, 5, 5, 5, 10, 10, 20, 20, 20], [5, 5, 5, 5, 10, 10, 20, 40], [5, 5, 5, 5, 10, 10, 25, 35], [5, 5, 5, 5, 10, 10, 30, 30], [5, 5, 5, 5, 10, 15, 15, 15, 25], [5, 5, 5, 5, 10, 15, 15, 20, 20], [5, 5, 5, 5, 10, 15, 15, 40], [5, 5, 5, 5, 10, 15, 20, 35], [5, 5, 5, 5, 10, 15, 25, 30], [5, 5, 5, 5, 10, 20, 20, 30], [5, 5, 5, 5, 10, 20, 25, 25], [5, 5, 5, 5, 10, 20, 50], [5, 5, 5, 5, 10, 25, 45], [5, 5, 5, 5, 10, 30, 40], [5, 5, 5, 5, 10, 35, 35], [5, 5, 5, 5, 15, 15, 15, 15, 20], [5, 5, 5, 5, 15, 15, 15, 35], [5, 5, 5, 5, 15, 15, 20, 30], [5, 5, 5, 5, 15, 15, 25, 25], [5, 5, 5, 5, 15, 15, 50], [5, 5, 5, 5, 15, 20, 20, 25], [5, 5, 5, 5, 15, 20, 45], [5, 5, 5, 5, 15, 25, 40], [5, 5, 5, 5, 15, 30, 35], [5, 5, 5, 5, 20, 20, 20, 20], [5, 5, 5, 5, 20, 20, 40], [5, 5, 5, 5, 20, 25, 35], [5, 5, 5, 5, 20, 30, 30], [5, 5, 5, 5, 25, 25, 30], [5, 5, 5, 5, 30, 50], [5, 5, 5, 5, 35, 45], [5, 5, 5, 5, 40, 40], [5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 15], [5, 5, 5, 10, 10, 10, 10, 10, 10, 25], [5, 5, 5, 10, 10, 10, 10, 10, 15, 20], [5, 5, 5, 10, 10, 10, 10, 10, 35], [5, 5, 5, 10, 10, 10, 10, 15, 15, 15], [5, 5, 5, 10, 10, 10, 10, 15, 30], [5, 5, 5, 10, 10, 10, 10, 20, 25], [5, 5, 5, 10, 10, 10, 10, 45], [5, 5, 5, 10, 10, 10, 15, 15, 25], [5, 5, 5, 10, 10, 10, 15, 20, 20], [5, 5, 5, 10, 10, 10, 15, 40], [5, 5, 5, 10, 10, 10, 20, 35], [5, 5, 5, 10, 10, 10, 25, 30], [5, 5, 5, 10, 10, 15, 15, 15, 20], [5, 5, 5, 10, 10, 15, 15, 35], [5, 5, 5, 10, 10, 15, 20, 30], [5, 5, 5, 10, 10, 15, 25, 25], [5, 5, 5, 10, 10, 15, 50], [5, 5, 5, 10, 10, 20, 20, 25], [5, 5, 5, 10, 10, 20, 45], [5, 5, 5, 10, 10, 25, 40], [5, 5, 5, 10, 10, 30, 35], [5, 5, 5, 10, 15, 15, 15, 15, 15], [5, 5, 5, 10, 15, 15, 15, 30], [5, 5, 5, 10, 15, 15, 20, 25], [5, 5, 5, 10, 15, 15, 45], [5, 5, 5, 10, 15, 20, 20, 20], [5, 5, 5, 10, 15, 20, 40], [5, 5, 5, 10, 15, 25, 35], [5, 5, 5, 10, 15, 30, 30], [5, 5, 5, 10, 20, 20, 35], [5, 5, 5, 10, 20, 25, 30], [5, 5, 5, 10, 25, 25, 25], [5, 5, 5, 10, 25, 50], [5, 5, 5, 10, 30, 45], [5, 5, 5, 10, 35, 40], [5, 5, 5, 15, 15, 15, 15, 25], [5, 5, 5, 15, 15, 15, 20, 20], [5, 5, 5, 15, 15, 15, 40], [5, 5, 5, 15, 15, 20, 35], [5, 5, 5, 15, 15, 25, 30], [5, 5, 5, 15, 20, 20, 30], [5, 5, 5, 15, 20, 25, 25], [5, 5, 5, 15, 20, 50], [5, 5, 5, 15, 25, 45], [5, 5, 5, 15, 30, 40], [5, 5, 5, 15, 35, 35], [5, 5, 5, 20, 20, 20, 25], [5, 5, 5, 20, 20, 45], [5, 5, 5, 20, 25, 40], [5, 5, 5, 20, 30, 35], [5, 5, 5, 25, 25, 35], [5, 5, 5, 25, 30, 30], [5, 5, 5, 35, 50], [5, 5, 5, 40, 45], [5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 10, 10, 10, 10, 10, 10, 10, 20], [5, 5, 10, 10, 10, 10, 10, 10, 15, 15], [5, 5, 10, 10, 10, 10, 10, 10, 30], [5, 5, 10, 10, 10, 10, 10, 15, 25], [5, 5, 10, 10, 10, 10, 10, 20, 20], [5, 5, 10, 10, 10, 10, 10, 40], [5, 5, 10, 10, 10, 10, 15, 15, 20], [5, 5, 10, 10, 10, 10, 15, 35], [5, 5, 10, 10, 10, 10, 20, 30], [5, 5, 10, 10, 10, 10, 25, 25], [5, 5, 10, 10, 10, 10, 50], [5, 5, 10, 10, 10, 15, 15, 15, 15], [5, 5, 10, 10, 10, 15, 15, 30], [5, 5, 10, 10, 10, 15, 20, 25], [5, 5, 10, 10, 10, 15, 45], [5, 5, 10, 10, 10, 20, 20, 20], [5, 5, 10, 10, 10, 20, 40], [5, 5, 10, 10, 10, 25, 35], [5, 5, 10, 10, 10, 30, 30], [5, 5, 10, 10, 15, 15, 15, 25], [5, 5, 10, 10, 15, 15, 20, 20], [5, 5, 10, 10, 15, 15, 40], [5, 5, 10, 10, 15, 20, 35], [5, 5, 10, 10, 15, 25, 30], [5, 5, 10, 10, 20, 20, 30], [5, 5, 10, 10, 20, 25, 25], [5, 5, 10, 10, 20, 50], [5, 5, 10, 10, 25, 45], [5, 5, 10, 10, 30, 40], [5, 5, 10, 10, 35, 35], [5, 5, 10, 15, 15, 15, 15, 20], [5, 5, 10, 15, 15, 15, 35], [5, 5, 10, 15, 15, 20, 30], [5, 5, 10, 15, 15, 25, 25], [5, 5, 10, 15, 15, 50], [5, 5, 10, 15, 20, 20, 25], [5, 5, 10, 15, 20, 45], [5, 5, 10, 15, 25, 40], [5, 5, 10, 15, 30, 35], [5, 5, 10, 20, 20, 20, 20], [5, 5, 10, 20, 20, 40], [5, 5, 10, 20, 25, 35], [5, 5, 10, 20, 30, 30], [5, 5, 10, 25, 25, 30], [5, 5, 10, 30, 50], [5, 5, 10, 35, 45], [5, 5, 10, 40, 40], [5, 5, 15, 15, 15, 15, 15, 15], [5, 5, 15, 15, 15, 15, 30], [5, 5, 15, 15, 15, 20, 25], [5, 5, 15, 15, 15, 45], [5, 5, 15, 15, 20, 20, 20], [5, 5, 15, 15, 20, 40], [5, 5, 15, 15, 25, 35], [5, 5, 15, 15, 30, 30], [5, 5, 15, 20, 20, 35], [5, 5, 15, 20, 25, 30], [5, 5, 15, 25, 25, 25], [5, 5, 15, 25, 50], [5, 5, 15, 30, 45], [5, 5, 15, 35, 40], [5, 5, 20, 20, 20, 30], [5, 5, 20, 20, 25, 25], [5, 5, 20, 20, 50], [5, 5, 20, 25, 45], [5, 5, 20, 30, 40], [5, 5, 20, 35, 35], [5, 5, 25, 25, 40], [5, 5, 25, 30, 35], [5, 5, 30, 30, 30], [5, 5, 40, 50], [5, 5, 45, 45], [5, 10, 10, 10, 10, 10, 10, 10, 10, 15], [5, 10, 10, 10, 10, 10, 10, 10, 25], [5, 10, 10, 10, 10, 10, 10, 15, 20], [5, 10, 10, 10, 10, 10, 10, 35], [5, 10, 10, 10, 10, 10, 15, 15, 15], [5, 10, 10, 10, 10, 10, 15, 30], [5, 10, 10, 10, 10, 10, 20, 25], [5, 10, 10, 10, 10, 10, 45], [5, 10, 10, 10, 10, 15, 15, 25], [5, 10, 10, 10, 10, 15, 20, 20], [5, 10, 10, 10, 10, 15, 40], [5, 10, 10, 10, 10, 20, 35], [5, 10, 10, 10, 10, 25, 30], [5, 10, 10, 10, 15, 15, 15, 20], [5, 10, 10, 10, 15, 15, 35], [5, 10, 10, 10, 15, 20, 30], [5, 10, 10, 10, 15, 25, 25], [5, 10, 10, 10, 15, 50], [5, 10, 10, 10, 20, 20, 25], [5, 10, 10, 10, 20, 45], [5, 10, 10, 10, 25, 40], [5, 10, 10, 10, 30, 35], [5, 10, 10, 15, 15, 15, 15, 15], [5, 10, 10, 15, 15, 15, 30], [5, 10, 10, 15, 15, 20, 25], [5, 10, 10, 15, 15, 45], [5, 10, 10, 15, 20, 20, 20], [5, 10, 10, 15, 20, 40], [5, 10, 10, 15, 25, 35], [5, 10, 10, 15, 30, 30], [5, 10, 10, 20, 20, 35], [5, 10, 10, 20, 25, 30], [5, 10, 10, 25, 25, 25], [5, 10, 10, 25, 50], [5, 10, 10, 30, 45], [5, 10, 10, 35, 40], [5, 10, 15, 15, 15, 15, 25], [5, 10, 15, 15, 15, 20, 20], [5, 10, 15, 15, 15, 40], [5, 10, 15, 15, 20, 35], [5, 10, 15, 15, 25, 30], [5, 10, 15, 20, 20, 30], [5, 10, 15, 20, 25, 25], [5, 10, 15, 20, 50], [5, 10, 15, 25, 45], [5, 10, 15, 30, 40], [5, 10, 15, 35, 35], [5, 10, 20, 20, 20, 25], [5, 10, 20, 20, 45], [5, 10, 20, 25, 40], [5, 10, 20, 30, 35], [5, 10, 25, 25, 35], [5, 10, 25, 30, 30], [5, 10, 35, 50], [5, 10, 40, 45], [5, 15, 15, 15, 15, 15, 20], [5, 15, 15, 15, 15, 35], [5, 15, 15, 15, 20, 30], [5, 15, 15, 15, 25, 25], [5, 15, 15, 15, 50], [5, 15, 15, 20, 20, 25], [5, 15, 15, 20, 45], [5, 15, 15, 25, 40], [5, 15, 15, 30, 35], [5, 15, 20, 20, 20, 20], [5, 15, 20, 20, 40], [5, 15, 20, 25, 35], [5, 15, 20, 30, 30], [5, 15, 25, 25, 30], [5, 15, 30, 50], [5, 15, 35, 45], [5, 15, 40, 40], [5, 20, 20, 20, 35], [5, 20, 20, 25, 30], [5, 20, 25, 25, 25], [5, 20, 25, 50], [5, 20, 30, 45], [5, 20, 35, 40], [5, 25, 25, 45], [5, 25, 30, 40], [5, 25, 35, 35], [5, 30, 30, 35], [5, 45, 50], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 10, 10, 15, 15], [10, 10, 10, 10, 10, 10, 10, 30], [10, 10, 10, 10, 10, 10, 15, 25], [10, 10, 10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 10, 10, 40], [10, 10, 10, 10, 10, 15, 15, 20], [10, 10, 10, 10, 10, 15, 35], [10, 10, 10, 10, 10, 20, 30], [10, 10, 10, 10, 10, 25, 25], [10, 10, 10, 10, 10, 50], [10, 10, 10, 10, 15, 15, 15, 15], [10, 10, 10, 10, 15, 15, 30], [10, 10, 10, 10, 15, 20, 25], [10, 10, 10, 10, 15, 45], [10, 10, 10, 10, 20, 20, 20], [10, 10, 10, 10, 20, 40], [10, 10, 10, 10, 25, 35], [10, 10, 10, 10, 30, 30], [10, 10, 10, 15, 15, 15, 25], [10, 10, 10, 15, 15, 20, 20], [10, 10, 10, 15, 15, 40], [10, 10, 10, 15, 20, 35], [10, 10, 10, 15, 25, 30], [10, 10, 10, 20, 20, 30], [10, 10, 10, 20, 25, 25], [10, 10, 10, 20, 50], [10, 10, 10, 25, 45], [10, 10, 10, 30, 40], [10, 10, 10, 35, 35], [10, 10, 15, 15, 15, 15, 20], [10, 10, 15, 15, 15, 35], [10, 10, 15, 15, 20, 30], [10, 10, 15, 15, 25, 25], [10, 10, 15, 15, 50], [10, 10, 15, 20, 20, 25], [10, 10, 15, 20, 45], [10, 10, 15, 25, 40], [10, 10, 15, 30, 35], [10, 10, 20, 20, 20, 20], [10, 10, 20, 20, 40], [10, 10, 20, 25, 35], [10, 10, 20, 30, 30], [10, 10, 25, 25, 30], [10, 10, 30, 50], [10, 10, 35, 45], [10, 10, 40, 40], [10, 15, 15, 15, 15, 15, 15], [10, 15, 15, 15, 15, 30], [10, 15, 15, 15, 20, 25], [10, 15, 15, 15, 45], [10, 15, 15, 20, 20, 20], [10, 15, 15, 20, 40], [10, 15, 15, 25, 35], [10, 15, 15, 30, 30], [10, 15, 20, 20, 35], [10, 15, 20, 25, 30], [10, 15, 25, 25, 25], [10, 15, 25, 50], [10, 15, 30, 45], [10, 15, 35, 40], [10, 20, 20, 20, 30], [10, 20, 20, 25, 25], [10, 20, 20, 50], [10, 20, 25, 45], [10, 20, 30, 40], [10, 20, 35, 35], [10, 25, 25, 40], [10, 25, 30, 35], [10, 30, 30, 30], [10, 40, 50], [10, 45, 45], [15, 15, 15, 15, 15, 25], [15, 15, 15, 15, 20, 20], [15, 15, 15, 15, 40], [15, 15, 15, 20, 35], [15, 15, 15, 25, 30], [15, 15, 20, 20, 30], [15, 15, 20, 25, 25], [15, 15, 20, 50], [15, 15, 25, 45], [15, 15, 30, 40], [15, 15, 35, 35], [15, 20, 20, 20, 25], [15, 20, 20, 45], [15, 20, 25, 40], [15, 20, 30, 35], [15, 25, 25, 35], [15, 25, 30, 30], [15, 35, 50], [15, 40, 45], [20, 20, 20, 20, 20], [20, 20, 20, 40], [20, 20, 25, 35], [20, 20, 30, 30], [20, 25, 25, 30], [20, 30, 50], [20, 35, 45], [20, 40, 40], [25, 25, 25, 25], [25, 25, 50], [25, 30, 45], [25, 35, 40], [30, 30, 40], [30, 35, 35], [50, 50]]\n assert candidate(candidates = [1, 3, 5, 7, 9, 11, 13],target = 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, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 3, 11], [1, 1, 1, 1, 1, 1, 5, 9], [1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 3, 3, 9], [1, 1, 1, 1, 1, 3, 5, 7], [1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 3, 3, 3, 7], [1, 1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 1, 3, 13], [1, 1, 1, 1, 5, 11], [1, 1, 1, 1, 7, 9], [1, 1, 1, 3, 3, 3, 3, 5], [1, 1, 1, 3, 3, 11], [1, 1, 1, 3, 5, 9], [1, 1, 1, 3, 7, 7], [1, 1, 1, 5, 5, 7], [1, 1, 3, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 9], [1, 1, 3, 3, 5, 7], [1, 1, 3, 5, 5, 5], [1, 1, 5, 13], [1, 1, 7, 11], [1, 1, 9, 9], [1, 3, 3, 3, 3, 7], [1, 3, 3, 3, 5, 5], [1, 3, 3, 13], [1, 3, 5, 11], [1, 3, 7, 9], [1, 5, 5, 9], [1, 5, 7, 7], [3, 3, 3, 3, 3, 5], [3, 3, 3, 11], [3, 3, 5, 9], [3, 3, 7, 7], [3, 5, 5, 7], [5, 5, 5, 5], [7, 13], [9, 11]]\n assert candidate(candidates = [6, 13, 17, 19, 23, 29, 31],target = 65) == [[6, 6, 6, 6, 6, 6, 6, 6, 17], [6, 6, 6, 6, 6, 6, 6, 23], [6, 6, 6, 6, 6, 6, 29], [6, 6, 6, 13, 17, 17], [6, 6, 13, 17, 23], [6, 6, 17, 17, 19], [6, 13, 17, 29], [6, 13, 23, 23], [6, 17, 19, 23], [13, 13, 13, 13, 13], [13, 23, 29], [17, 17, 31], [17, 19, 29], [19, 23, 23]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 18) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6], [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 2, 8], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 4, 6], [1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 10], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 1, 1, 1, 1, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 3, 6], [1, 1, 1, 1, 1, 1, 1, 2, 4, 5], [1, 1, 1, 1, 1, 1, 1, 2, 9], [1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 3, 4, 4], [1, 1, 1, 1, 1, 1, 1, 3, 8], [1, 1, 1, 1, 1, 1, 1, 4, 7], [1, 1, 1, 1, 1, 1, 1, 5, 6], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4], [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 6], [1, 1, 1, 1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 1, 1, 1, 2, 2, 8], [1, 1, 1, 1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 1, 1, 1, 2, 3, 7], [1, 1, 1, 1, 1, 1, 2, 4, 6], [1, 1, 1, 1, 1, 1, 2, 5, 5], [1, 1, 1, 1, 1, 1, 2, 10], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 3, 3, 6], [1, 1, 1, 1, 1, 1, 3, 4, 5], [1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 4, 4, 4], [1, 1, 1, 1, 1, 1, 4, 8], [1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 6, 6], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 1, 1, 2, 2, 2, 7], [1, 1, 1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 2, 2, 3, 6], [1, 1, 1, 1, 1, 2, 2, 4, 5], [1, 1, 1, 1, 1, 2, 2, 9], [1, 1, 1, 1, 1, 2, 3, 3, 5], [1, 1, 1, 1, 1, 2, 3, 4, 4], [1, 1, 1, 1, 1, 2, 3, 8], [1, 1, 1, 1, 1, 2, 4, 7], [1, 1, 1, 1, 1, 2, 5, 6], [1, 1, 1, 1, 1, 3, 3, 3, 4], [1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 3, 4, 6], [1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 3, 10], [1, 1, 1, 1, 1, 4, 4, 5], [1, 1, 1, 1, 1, 4, 9], [1, 1, 1, 1, 1, 5, 8], [1, 1, 1, 1, 1, 6, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2, 4], [1, 1, 1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 2, 2, 2, 2, 6], [1, 1, 1, 1, 2, 2, 2, 3, 5], [1, 1, 1, 1, 2, 2, 2, 4, 4], [1, 1, 1, 1, 2, 2, 2, 8], [1, 1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 1, 2, 2, 3, 7], [1, 1, 1, 1, 2, 2, 4, 6], [1, 1, 1, 1, 2, 2, 5, 5], [1, 1, 1, 1, 2, 2, 10], [1, 1, 1, 1, 2, 3, 3, 3, 3], [1, 1, 1, 1, 2, 3, 3, 6], [1, 1, 1, 1, 2, 3, 4, 5], [1, 1, 1, 1, 2, 3, 9], [1, 1, 1, 1, 2, 4, 4, 4], [1, 1, 1, 1, 2, 4, 8], [1, 1, 1, 1, 2, 5, 7], [1, 1, 1, 1, 2, 6, 6], [1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 3, 3, 4, 4], [1, 1, 1, 1, 3, 3, 8], [1, 1, 1, 1, 3, 4, 7], [1, 1, 1, 1, 3, 5, 6], [1, 1, 1, 1, 4, 4, 6], [1, 1, 1, 1, 4, 5, 5], [1, 1, 1, 1, 4, 10], [1, 1, 1, 1, 5, 9], [1, 1, 1, 1, 6, 8], [1, 1, 1, 1, 7, 7], [1, 1, 1, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 2, 2, 5], [1, 1, 1, 2, 2, 2, 2, 3, 4], [1, 1, 1, 2, 2, 2, 2, 7], [1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 6], [1, 1, 1, 2, 2, 2, 4, 5], [1, 1, 1, 2, 2, 2, 9], [1, 1, 1, 2, 2, 3, 3, 5], [1, 1, 1, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 3, 8], [1, 1, 1, 2, 2, 4, 7], [1, 1, 1, 2, 2, 5, 6], [1, 1, 1, 2, 3, 3, 3, 4], [1, 1, 1, 2, 3, 3, 7], [1, 1, 1, 2, 3, 4, 6], [1, 1, 1, 2, 3, 5, 5], [1, 1, 1, 2, 3, 10], [1, 1, 1, 2, 4, 4, 5], [1, 1, 1, 2, 4, 9], [1, 1, 1, 2, 5, 8], [1, 1, 1, 2, 6, 7], [1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 3, 3, 3, 6], [1, 1, 1, 3, 3, 4, 5], [1, 1, 1, 3, 3, 9], [1, 1, 1, 3, 4, 4, 4], [1, 1, 1, 3, 4, 8], [1, 1, 1, 3, 5, 7], [1, 1, 1, 3, 6, 6], [1, 1, 1, 4, 4, 7], [1, 1, 1, 4, 5, 6], [1, 1, 1, 5, 5, 5], [1, 1, 1, 5, 10], [1, 1, 1, 6, 9], [1, 1, 1, 7, 8], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2, 4], [1, 1, 2, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 2, 6], [1, 1, 2, 2, 2, 2, 3, 5], [1, 1, 2, 2, 2, 2, 4, 4], [1, 1, 2, 2, 2, 2, 8], [1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 3, 7], [1, 1, 2, 2, 2, 4, 6], [1, 1, 2, 2, 2, 5, 5], [1, 1, 2, 2, 2, 10], [1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 6], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 9], [1, 1, 2, 2, 4, 4, 4], [1, 1, 2, 2, 4, 8], [1, 1, 2, 2, 5, 7], [1, 1, 2, 2, 6, 6], [1, 1, 2, 3, 3, 3, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 8], [1, 1, 2, 3, 4, 7], [1, 1, 2, 3, 5, 6], [1, 1, 2, 4, 4, 6], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 10], [1, 1, 2, 5, 9], [1, 1, 2, 6, 8], [1, 1, 2, 7, 7], [1, 1, 3, 3, 3, 3, 4], [1, 1, 3, 3, 3, 7], [1, 1, 3, 3, 4, 6], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 10], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 9], [1, 1, 3, 5, 8], [1, 1, 3, 6, 7], [1, 1, 4, 4, 4, 4], [1, 1, 4, 4, 8], [1, 1, 4, 5, 7], [1, 1, 4, 6, 6], [1, 1, 5, 5, 6], [1, 1, 6, 10], [1, 1, 7, 9], [1, 1, 8, 8], [1, 2, 2, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2, 2, 5], [1, 2, 2, 2, 2, 2, 3, 4], [1, 2, 2, 2, 2, 2, 7], [1, 2, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 3, 6], [1, 2, 2, 2, 2, 4, 5], [1, 2, 2, 2, 2, 9], [1, 2, 2, 2, 3, 3, 5], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 8], [1, 2, 2, 2, 4, 7], [1, 2, 2, 2, 5, 6], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 7], [1, 2, 2, 3, 4, 6], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 10], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 9], [1, 2, 2, 5, 8], [1, 2, 2, 6, 7], [1, 2, 3, 3, 3, 3, 3], [1, 2, 3, 3, 3, 6], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 9], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 8], [1, 2, 3, 5, 7], [1, 2, 3, 6, 6], [1, 2, 4, 4, 7], [1, 2, 4, 5, 6], [1, 2, 5, 5, 5], [1, 2, 5, 10], [1, 2, 6, 9], [1, 2, 7, 8], [1, 3, 3, 3, 3, 5], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 8], [1, 3, 3, 4, 7], [1, 3, 3, 5, 6], [1, 3, 4, 4, 6], [1, 3, 4, 5, 5], [1, 3, 4, 10], [1, 3, 5, 9], [1, 3, 6, 8], [1, 3, 7, 7], [1, 4, 4, 4, 5], [1, 4, 4, 9], [1, 4, 5, 8], [1, 4, 6, 7], [1, 5, 5, 7], [1, 5, 6, 6], [1, 7, 10], [1, 8, 9], [2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 4], [2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 6], [2, 2, 2, 2, 2, 3, 5], [2, 2, 2, 2, 2, 4, 4], [2, 2, 2, 2, 2, 8], [2, 2, 2, 2, 3, 3, 4], [2, 2, 2, 2, 3, 7], [2, 2, 2, 2, 4, 6], [2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 10], [2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 3, 3, 6], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 9], [2, 2, 2, 4, 4, 4], [2, 2, 2, 4, 8], [2, 2, 2, 5, 7], [2, 2, 2, 6, 6], [2, 2, 3, 3, 3, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 8], [2, 2, 3, 4, 7], [2, 2, 3, 5, 6], [2, 2, 4, 4, 6], [2, 2, 4, 5, 5], [2, 2, 4, 10], [2, 2, 5, 9], [2, 2, 6, 8], [2, 2, 7, 7], [2, 3, 3, 3, 3, 4], [2, 3, 3, 3, 7], [2, 3, 3, 4, 6], [2, 3, 3, 5, 5], [2, 3, 3, 10], [2, 3, 4, 4, 5], [2, 3, 4, 9], [2, 3, 5, 8], [2, 3, 6, 7], [2, 4, 4, 4, 4], [2, 4, 4, 8], [2, 4, 5, 7], [2, 4, 6, 6], [2, 5, 5, 6], [2, 6, 10], [2, 7, 9], [2, 8, 8], [3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 6], [3, 3, 3, 4, 5], [3, 3, 3, 9], [3, 3, 4, 4, 4], [3, 3, 4, 8], [3, 3, 5, 7], [3, 3, 6, 6], [3, 4, 4, 7], [3, 4, 5, 6], [3, 5, 5, 5], [3, 5, 10], [3, 6, 9], [3, 7, 8], [4, 4, 4, 6], [4, 4, 5, 5], [4, 4, 10], [4, 5, 9], [4, 6, 8], [4, 7, 7], [5, 5, 8], [5, 6, 7], [6, 6, 6], [8, 10], [9, 9]]\n assert candidate(candidates = [2, 5, 10, 20, 50],target = 100) == [[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, 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, 2, 5, 5], [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], [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, 5, 5, 5, 5], [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, 5, 5, 10], [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, 10], [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, 20], [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, 5, 5, 5, 5], [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, 5, 5, 10], [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, 10, 10], [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, 20], [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, 10, 10], [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, 20], [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, 5, 5, 5, 5, 5, 5], [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, 5, 5, 5, 5, 10], [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, 5, 5, 10, 10], [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, 5, 5, 20], [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, 10, 10, 10], [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, 10, 20], [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, 10, 10, 10], [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, 10, 20], [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, 20, 20], [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, 5, 5, 5, 5, 5, 5, 5, 5], [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, 5, 5, 5, 5, 5, 5, 10], [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, 5, 5, 5, 5, 10, 10], [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, 5, 5, 5, 5, 20], [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, 5, 5, 10, 10, 10], [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, 5, 5, 10, 20], [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, 10, 10, 10, 10], [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, 10, 10, 20], [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, 20, 20], [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, 10, 10, 10, 10], [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, 10, 10, 20], [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, 20, 20], [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, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 20, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 20, 20, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 20, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20, 20, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5, 50], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 10, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10, 50], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 20, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10, 50], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 20, 20, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 20, 50], [2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 5, 5, 10, 10, 10, 50], [2, 2, 2, 2, 2, 5, 5, 10, 10, 20, 20, 20], [2, 2, 2, 2, 2, 5, 5, 10, 20, 50], [2, 2, 2, 2, 2, 5, 5, 20, 20, 20, 20], [2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 10, 10], [2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 10, 20], [2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 20, 20], [2, 2, 2, 2, 2, 10, 10, 10, 10, 50], [2, 2, 2, 2, 2, 10, 10, 10, 20, 20, 20], [2, 2, 2, 2, 2, 10, 10, 20, 50], [2, 2, 2, 2, 2, 10, 20, 20, 20, 20], [2, 2, 2, 2, 2, 20, 20, 50], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 50], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 50], [5, 5, 5, 5, 5, 5, 5, 5, 20, 20, 20], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 10, 10, 10, 20, 20], [5, 5, 5, 5, 5, 5, 10, 10, 50], [5, 5, 5, 5, 5, 5, 10, 20, 20, 20], [5, 5, 5, 5, 5, 5, 20, 50], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 20], [5, 5, 5, 5, 10, 10, 10, 10, 20, 20], [5, 5, 5, 5, 10, 10, 10, 50], [5, 5, 5, 5, 10, 10, 20, 20, 20], [5, 5, 5, 5, 10, 20, 50], [5, 5, 5, 5, 20, 20, 20, 20], [5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 10, 10, 10, 10, 10, 10, 10, 20], [5, 5, 10, 10, 10, 10, 10, 20, 20], [5, 5, 10, 10, 10, 10, 50], [5, 5, 10, 10, 10, 20, 20, 20], [5, 5, 10, 10, 20, 50], [5, 5, 10, 20, 20, 20, 20], [5, 5, 20, 20, 50], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 10, 50], [10, 10, 10, 10, 20, 20, 20], [10, 10, 10, 20, 50], [10, 10, 20, 20, 20, 20], [10, 20, 20, 50], [20, 20, 20, 20, 20], [50, 50]]\n assert 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 candidate(candidates = [13, 17, 19, 23, 29, 31, 37],target = 60) == [[13, 13, 17, 17], [23, 37], [29, 31]]\n assert candidate(candidates = [10, 20, 30, 40, 50],target = 100) == [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 10, 10, 30], [10, 10, 10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 10, 10, 40], [10, 10, 10, 10, 10, 20, 30], [10, 10, 10, 10, 10, 50], [10, 10, 10, 10, 20, 20, 20], [10, 10, 10, 10, 20, 40], [10, 10, 10, 10, 30, 30], [10, 10, 10, 20, 20, 30], [10, 10, 10, 20, 50], [10, 10, 10, 30, 40], [10, 10, 20, 20, 20, 20], [10, 10, 20, 20, 40], [10, 10, 20, 30, 30], [10, 10, 30, 50], [10, 10, 40, 40], [10, 20, 20, 20, 30], [10, 20, 20, 50], [10, 20, 30, 40], [10, 30, 30, 30], [10, 40, 50], [20, 20, 20, 20, 20], [20, 20, 20, 40], [20, 20, 30, 30], [20, 30, 50], [20, 40, 40], [30, 30, 40], [50, 50]]\n assert candidate(candidates = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 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, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 3, 11], [1, 1, 1, 1, 1, 1, 5, 9], [1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 3, 3, 9], [1, 1, 1, 1, 1, 3, 5, 7], [1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 1, 15], [1, 1, 1, 1, 3, 3, 3, 7], [1, 1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 1, 3, 13], [1, 1, 1, 1, 5, 11], [1, 1, 1, 1, 7, 9], [1, 1, 1, 3, 3, 3, 3, 5], [1, 1, 1, 3, 3, 11], [1, 1, 1, 3, 5, 9], [1, 1, 1, 3, 7, 7], [1, 1, 1, 5, 5, 7], [1, 1, 1, 17], [1, 1, 3, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 9], [1, 1, 3, 3, 5, 7], [1, 1, 3, 5, 5, 5], [1, 1, 3, 15], [1, 1, 5, 13], [1, 1, 7, 11], [1, 1, 9, 9], [1, 3, 3, 3, 3, 7], [1, 3, 3, 3, 5, 5], [1, 3, 3, 13], [1, 3, 5, 11], [1, 3, 7, 9], [1, 5, 5, 9], [1, 5, 7, 7], [1, 19], [3, 3, 3, 3, 3, 5], [3, 3, 3, 11], [3, 3, 5, 9], [3, 3, 7, 7], [3, 5, 5, 7], [3, 17], [5, 5, 5, 5], [5, 15], [7, 13], [9, 11]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 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, 2], [1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 6], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 6], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 8], [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6], [1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 2, 10], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 6], [1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5], [1, 1, 1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4], [1, 1, 1, 1, 1, 1, 1, 1, 4, 8], [1, 1, 1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 6, 6], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 6], [1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 5], [1, 1, 1, 1, 1, 1, 1, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 4], [1, 1, 1, 1, 1, 1, 1, 2, 3, 8], [1, 1, 1, 1, 1, 1, 1, 2, 4, 7], [1, 1, 1, 1, 1, 1, 1, 2, 5, 6], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 4], [1, 1, 1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 3, 4, 6], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 3, 10], [1, 1, 1, 1, 1, 1, 1, 4, 4, 5], [1, 1, 1, 1, 1, 1, 1, 4, 9], [1, 1, 1, 1, 1, 1, 1, 5, 8], [1, 1, 1, 1, 1, 1, 1, 6, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 4], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 6], [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 5], [1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 4], [1, 1, 1, 1, 1, 1, 2, 2, 2, 8], [1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 1, 1, 1, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 2, 2, 4, 6], [1, 1, 1, 1, 1, 1, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 2, 2, 10], [1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 2, 3, 3, 6], [1, 1, 1, 1, 1, 1, 2, 3, 4, 5], [1, 1, 1, 1, 1, 1, 2, 3, 9], [1, 1, 1, 1, 1, 1, 2, 4, 4, 4], [1, 1, 1, 1, 1, 1, 2, 4, 8], [1, 1, 1, 1, 1, 1, 2, 5, 7], [1, 1, 1, 1, 1, 1, 2, 6, 6], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 3, 3, 4, 4], [1, 1, 1, 1, 1, 1, 3, 3, 8], [1, 1, 1, 1, 1, 1, 3, 4, 7], [1, 1, 1, 1, 1, 1, 3, 5, 6], [1, 1, 1, 1, 1, 1, 4, 4, 6], [1, 1, 1, 1, 1, 1, 4, 5, 5], [1, 1, 1, 1, 1, 1, 4, 10], [1, 1, 1, 1, 1, 1, 5, 9], [1, 1, 1, 1, 1, 1, 6, 8], [1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5], [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, 3, 10], [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, 5, 10], [1, 1, 1, 1, 1, 6, 9], [1, 1, 1, 1, 1, 7, 8], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4], [1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 2, 2, 2, 2, 2, 6], [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, 2, 10], [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, 4, 10], [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, 3, 10], [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, 4, 4], [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, 6, 10], [1, 1, 1, 1, 7, 9], [1, 1, 1, 1, 8, 8], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 2, 2, 2, 2, 2, 3, 4], [1, 1, 1, 2, 2, 2, 2, 2, 7], [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, 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, 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, 5, 10], [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, 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, 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, 7, 10], [1, 1, 1, 8, 9], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2, 2, 4], [1, 1, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 2, 2, 6], [1, 1, 2, 2, 2, 2, 2, 3, 5], [1, 1, 2, 2, 2, 2, 2, 4, 4], [1, 1, 2, 2, 2, 2, 2, 8], [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, 2, 10], [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, 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, 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, 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, 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, 6, 10], [1, 1, 2, 7, 9], [1, 1, 2, 8, 8], [1, 1, 3, 3, 3, 3, 3, 3], [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, 5, 10], [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, 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, 6, 6, 6], [1, 1, 8, 10], [1, 1, 9, 9], [1, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2, 2, 2, 5], [1, 2, 2, 2, 2, 2, 2, 3, 4], [1, 2, 2, 2, 2, 2, 2, 7], [1, 2, 2, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 2, 3, 6], [1, 2, 2, 2, 2, 2, 4, 5], [1, 2, 2, 2, 2, 2, 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, 3, 10], [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, 5, 10], [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, 4, 10], [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, 7, 10], [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, 3, 10], [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, 4, 4], [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, 4, 7], [1, 4, 4, 5, 6], [1, 4, 5, 5, 5], [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, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 4], [2, 2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 2, 6], [2, 2, 2, 2, 2, 2, 3, 5], [2, 2, 2, 2, 2, 2, 4, 4], [2, 2, 2, 2, 2, 2, 8], [2, 2, 2, 2, 2, 3, 3, 4], [2, 2, 2, 2, 2, 3, 7], [2, 2, 2, 2, 2, 4, 6], [2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 10], [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, 4, 10], [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, 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, 4, 4], [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, 3, 3, 3, 3], [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, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 4, 4, 6], [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, 6, 6, 6], [2, 8, 10], [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, 4, 10], [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, 7, 10], [3, 8, 9], [4, 4, 4, 4, 4], [4, 4, 4, 8], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6], [4, 6, 10], [4, 7, 9], [4, 8, 8], [5, 5, 5, 5], [5, 5, 10], [5, 6, 9], [5, 7, 8], [6, 6, 8], [6, 7, 7], [10, 10]]\n assert candidate(candidates = [1, 18, 25, 37, 41, 52],target = 80) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 41], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 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, 25, 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, 52], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 18, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 37], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 41], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 18, 25], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 37], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 41], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 25, 25], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18, 52], [1, 1, 1, 1, 1, 1, 1, 1, 18, 18, 18, 18], [1, 1, 1, 1, 1, 1, 1, 18, 18, 37], [1, 1, 1, 1, 1, 1, 37, 37], [1, 1, 1, 1, 1, 25, 25, 25], [1, 1, 1, 18, 18, 41], [1, 1, 1, 25, 52], [1, 1, 37, 41], [1, 18, 18, 18, 25], [18, 25, 37]]\n assert candidate(candidates = [18, 22, 30, 26, 25, 27, 32],target = 50) == [[18, 32], [25, 25]]\n assert candidate(candidates = [7, 14, 21, 28, 35, 42, 49],target = 140) == [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 49], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 28, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 49], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 28, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 28, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 49], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 28, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 35, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 21, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 49], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 42], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 28, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 35], [7, 7, 7, 7, 7, 7, 7, 7, 7, 21, 28, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 28, 49], [7, 7, 7, 7, 7, 7, 7, 7, 7, 35, 42], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 28], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 42], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 21, 35], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 28, 28], [7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 21, 28], [7, 7, 7, 7, 7, 7, 7, 7, 14, 21, 49], [7, 7, 7, 7, 7, 7, 7, 7, 14, 28, 42], [7, 7, 7, 7, 7, 7, 7, 7, 14, 35, 35], [7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 21, 21, 42], [7, 7, 7, 7, 7, 7, 7, 7, 21, 28, 35], [7, 7, 7, 7, 7, 7, 7, 7, 28, 28, 28], [7, 7, 7, 7, 7, 7, 7, 7, 35, 49], [7, 7, 7, 7, 7, 7, 7, 7, 42, 42], [7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 21], [7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 35], [7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 21, 28], [7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 49], [7, 7, 7, 7, 7, 7, 7, 14, 14, 21, 21, 21], [7, 7, 7, 7, 7, 7, 7, 14, 14, 21, 42], [7, 7, 7, 7, 7, 7, 7, 14, 14, 28, 35], [7, 7, 7, 7, 7, 7, 7, 14, 21, 21, 35], [7, 7, 7, 7, 7, 7, 7, 14, 21, 28, 28], [7, 7, 7, 7, 7, 7, 7, 14, 28, 49], [7, 7, 7, 7, 7, 7, 7, 14, 35, 42], [7, 7, 7, 7, 7, 7, 7, 21, 21, 21, 28], [7, 7, 7, 7, 7, 7, 7, 21, 21, 49], [7, 7, 7, 7, 7, 7, 7, 21, 28, 42], [7, 7, 7, 7, 7, 7, 7, 21, 35, 35], [7, 7, 7, 7, 7, 7, 7, 28, 28, 35], [7, 7, 7, 7, 7, 7, 7, 42, 49], [7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14], [7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 28], [7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 21, 21], [7, 7, 7, 7, 7, 7, 14, 14, 14, 14, 42], [7, 7, 7, 7, 7, 7, 14, 14, 14, 21, 35], [7, 7, 7, 7, 7, 7, 14, 14, 14, 28, 28], [7, 7, 7, 7, 7, 7, 14, 14, 21, 21, 28], [7, 7, 7, 7, 7, 7, 14, 14, 21, 49], [7, 7, 7, 7, 7, 7, 14, 14, 28, 42], [7, 7, 7, 7, 7, 7, 14, 14, 35, 35], [7, 7, 7, 7, 7, 7, 14, 21, 21, 21, 21], [7, 7, 7, 7, 7, 7, 14, 21, 21, 42], [7, 7, 7, 7, 7, 7, 14, 21, 28, 35], [7, 7, 7, 7, 7, 7, 14, 28, 28, 28], [7, 7, 7, 7, 7, 7, 14, 35, 49], [7, 7, 7, 7, 7, 7, 14, 42, 42], [7, 7, 7, 7, 7, 7, 21, 21, 21, 35], [7, 7, 7, 7, 7, 7, 21, 21, 28, 28], [7, 7, 7, 7, 7, 7, 21, 28, 49], [7, 7, 7, 7, 7, 7, 21, 35, 42], [7, 7, 7, 7, 7, 7, 28, 28, 42], [7, 7, 7, 7, 7, 7, 28, 35, 35], [7, 7, 7, 7, 7, 7, 49, 49], [7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 21], [7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 35], [7, 7, 7, 7, 7, 14, 14, 14, 14, 21, 28], [7, 7, 7, 7, 7, 14, 14, 14, 14, 49], [7, 7, 7, 7, 7, 14, 14, 14, 21, 21, 21], [7, 7, 7, 7, 7, 14, 14, 14, 21, 42], [7, 7, 7, 7, 7, 14, 14, 14, 28, 35], [7, 7, 7, 7, 7, 14, 14, 21, 21, 35], [7, 7, 7, 7, 7, 14, 14, 21, 28, 28], [7, 7, 7, 7, 7, 14, 14, 28, 49], [7, 7, 7, 7, 7, 14, 14, 35, 42], [7, 7, 7, 7, 7, 14, 21, 21, 21, 28], [7, 7, 7, 7, 7, 14, 21, 21, 49], [7, 7, 7, 7, 7, 14, 21, 28, 42], [7, 7, 7, 7, 7, 14, 21, 35, 35], [7, 7, 7, 7, 7, 14, 28, 28, 35], [7, 7, 7, 7, 7, 14, 42, 49], [7, 7, 7, 7, 7, 21, 21, 21, 21, 21], [7, 7, 7, 7, 7, 21, 21, 21, 42], [7, 7, 7, 7, 7, 21, 21, 28, 35], [7, 7, 7, 7, 7, 21, 28, 28, 28], [7, 7, 7, 7, 7, 21, 35, 49], [7, 7, 7, 7, 7, 21, 42, 42], [7, 7, 7, 7, 7, 28, 28, 49], [7, 7, 7, 7, 7, 28, 35, 42], [7, 7, 7, 7, 7, 35, 35, 35], [7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14], [7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 28], [7, 7, 7, 7, 14, 14, 14, 14, 14, 21, 21], [7, 7, 7, 7, 14, 14, 14, 14, 14, 42], [7, 7, 7, 7, 14, 14, 14, 14, 21, 35], [7, 7, 7, 7, 14, 14, 14, 14, 28, 28], [7, 7, 7, 7, 14, 14, 14, 21, 21, 28], [7, 7, 7, 7, 14, 14, 14, 21, 49], [7, 7, 7, 7, 14, 14, 14, 28, 42], [7, 7, 7, 7, 14, 14, 14, 35, 35], [7, 7, 7, 7, 14, 14, 21, 21, 21, 21], [7, 7, 7, 7, 14, 14, 21, 21, 42], [7, 7, 7, 7, 14, 14, 21, 28, 35], [7, 7, 7, 7, 14, 14, 28, 28, 28], [7, 7, 7, 7, 14, 14, 35, 49], [7, 7, 7, 7, 14, 14, 42, 42], [7, 7, 7, 7, 14, 21, 21, 21, 35], [7, 7, 7, 7, 14, 21, 21, 28, 28], [7, 7, 7, 7, 14, 21, 28, 49], [7, 7, 7, 7, 14, 21, 35, 42], [7, 7, 7, 7, 14, 28, 28, 42], [7, 7, 7, 7, 14, 28, 35, 35], [7, 7, 7, 7, 14, 49, 49], [7, 7, 7, 7, 21, 21, 21, 21, 28], [7, 7, 7, 7, 21, 21, 21, 49], [7, 7, 7, 7, 21, 21, 28, 42], [7, 7, 7, 7, 21, 21, 35, 35], [7, 7, 7, 7, 21, 28, 28, 35], [7, 7, 7, 7, 21, 42, 49], [7, 7, 7, 7, 28, 28, 28, 28], [7, 7, 7, 7, 28, 35, 49], [7, 7, 7, 7, 28, 42, 42], [7, 7, 7, 7, 35, 35, 42], [7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 21], [7, 7, 7, 14, 14, 14, 14, 14, 14, 35], [7, 7, 7, 14, 14, 14, 14, 14, 21, 28], [7, 7, 7, 14, 14, 14, 14, 14, 49], [7, 7, 7, 14, 14, 14, 14, 21, 21, 21], [7, 7, 7, 14, 14, 14, 14, 21, 42], [7, 7, 7, 14, 14, 14, 14, 28, 35], [7, 7, 7, 14, 14, 14, 21, 21, 35], [7, 7, 7, 14, 14, 14, 21, 28, 28], [7, 7, 7, 14, 14, 14, 28, 49], [7, 7, 7, 14, 14, 14, 35, 42], [7, 7, 7, 14, 14, 21, 21, 21, 28], [7, 7, 7, 14, 14, 21, 21, 49], [7, 7, 7, 14, 14, 21, 28, 42], [7, 7, 7, 14, 14, 21, 35, 35], [7, 7, 7, 14, 14, 28, 28, 35], [7, 7, 7, 14, 14, 42, 49], [7, 7, 7, 14, 21, 21, 21, 21, 21], [7, 7, 7, 14, 21, 21, 21, 42], [7, 7, 7, 14, 21, 21, 28, 35], [7, 7, 7, 14, 21, 28, 28, 28], [7, 7, 7, 14, 21, 35, 49], [7, 7, 7, 14, 21, 42, 42], [7, 7, 7, 14, 28, 28, 49], [7, 7, 7, 14, 28, 35, 42], [7, 7, 7, 14, 35, 35, 35], [7, 7, 7, 21, 21, 21, 21, 35], [7, 7, 7, 21, 21, 21, 28, 28], [7, 7, 7, 21, 21, 28, 49], [7, 7, 7, 21, 21, 35, 42], [7, 7, 7, 21, 28, 28, 42], [7, 7, 7, 21, 28, 35, 35], [7, 7, 7, 21, 49, 49], [7, 7, 7, 28, 28, 28, 35], [7, 7, 7, 28, 42, 49], [7, 7, 7, 35, 35, 49], [7, 7, 7, 35, 42, 42], [7, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14], [7, 7, 14, 14, 14, 14, 14, 14, 14, 28], [7, 7, 14, 14, 14, 14, 14, 14, 21, 21], [7, 7, 14, 14, 14, 14, 14, 14, 42], [7, 7, 14, 14, 14, 14, 14, 21, 35], [7, 7, 14, 14, 14, 14, 14, 28, 28], [7, 7, 14, 14, 14, 14, 21, 21, 28], [7, 7, 14, 14, 14, 14, 21, 49], [7, 7, 14, 14, 14, 14, 28, 42], [7, 7, 14, 14, 14, 14, 35, 35], [7, 7, 14, 14, 14, 21, 21, 21, 21], [7, 7, 14, 14, 14, 21, 21, 42], [7, 7, 14, 14, 14, 21, 28, 35], [7, 7, 14, 14, 14, 28, 28, 28], [7, 7, 14, 14, 14, 35, 49], [7, 7, 14, 14, 14, 42, 42], [7, 7, 14, 14, 21, 21, 21, 35], [7, 7, 14, 14, 21, 21, 28, 28], [7, 7, 14, 14, 21, 28, 49], [7, 7, 14, 14, 21, 35, 42], [7, 7, 14, 14, 28, 28, 42], [7, 7, 14, 14, 28, 35, 35], [7, 7, 14, 14, 49, 49], [7, 7, 14, 21, 21, 21, 21, 28], [7, 7, 14, 21, 21, 21, 49], [7, 7, 14, 21, 21, 28, 42], [7, 7, 14, 21, 21, 35, 35], [7, 7, 14, 21, 28, 28, 35], [7, 7, 14, 21, 42, 49], [7, 7, 14, 28, 28, 28, 28], [7, 7, 14, 28, 35, 49], [7, 7, 14, 28, 42, 42], [7, 7, 14, 35, 35, 42], [7, 7, 21, 21, 21, 21, 21, 21], [7, 7, 21, 21, 21, 21, 42], [7, 7, 21, 21, 21, 28, 35], [7, 7, 21, 21, 28, 28, 28], [7, 7, 21, 21, 35, 49], [7, 7, 21, 21, 42, 42], [7, 7, 21, 28, 28, 49], [7, 7, 21, 28, 35, 42], [7, 7, 21, 35, 35, 35], [7, 7, 28, 28, 28, 42], [7, 7, 28, 28, 35, 35], [7, 7, 28, 49, 49], [7, 7, 35, 42, 49], [7, 7, 42, 42, 42], [7, 14, 14, 14, 14, 14, 14, 14, 14, 21], [7, 14, 14, 14, 14, 14, 14, 14, 35], [7, 14, 14, 14, 14, 14, 14, 21, 28], [7, 14, 14, 14, 14, 14, 14, 49], [7, 14, 14, 14, 14, 14, 21, 21, 21], [7, 14, 14, 14, 14, 14, 21, 42], [7, 14, 14, 14, 14, 14, 28, 35], [7, 14, 14, 14, 14, 21, 21, 35], [7, 14, 14, 14, 14, 21, 28, 28], [7, 14, 14, 14, 14, 28, 49], [7, 14, 14, 14, 14, 35, 42], [7, 14, 14, 14, 21, 21, 21, 28], [7, 14, 14, 14, 21, 21, 49], [7, 14, 14, 14, 21, 28, 42], [7, 14, 14, 14, 21, 35, 35], [7, 14, 14, 14, 28, 28, 35], [7, 14, 14, 14, 42, 49], [7, 14, 14, 21, 21, 21, 21, 21], [7, 14, 14, 21, 21, 21, 42], [7, 14, 14, 21, 21, 28, 35], [7, 14, 14, 21, 28, 28, 28], [7, 14, 14, 21, 35, 49], [7, 14, 14, 21, 42, 42], [7, 14, 14, 28, 28, 49], [7, 14, 14, 28, 35, 42], [7, 14, 14, 35, 35, 35], [7, 14, 21, 21, 21, 21, 35], [7, 14, 21, 21, 21, 28, 28], [7, 14, 21, 21, 28, 49], [7, 14, 21, 21, 35, 42], [7, 14, 21, 28, 28, 42], [7, 14, 21, 28, 35, 35], [7, 14, 21, 49, 49], [7, 14, 28, 28, 28, 35], [7, 14, 28, 42, 49], [7, 14, 35, 35, 49], [7, 14, 35, 42, 42], [7, 21, 21, 21, 21, 21, 28], [7, 21, 21, 21, 21, 49], [7, 21, 21, 21, 28, 42], [7, 21, 21, 21, 35, 35], [7, 21, 21, 28, 28, 35], [7, 21, 21, 42, 49], [7, 21, 28, 28, 28, 28], [7, 21, 28, 35, 49], [7, 21, 28, 42, 42], [7, 21, 35, 35, 42], [7, 28, 28, 28, 49], [7, 28, 28, 35, 42], [7, 28, 35, 35, 35], [7, 35, 49, 49], [7, 42, 42, 49], [14, 14, 14, 14, 14, 14, 14, 14, 14, 14], [14, 14, 14, 14, 14, 14, 14, 14, 28], [14, 14, 14, 14, 14, 14, 14, 21, 21], [14, 14, 14, 14, 14, 14, 14, 42], [14, 14, 14, 14, 14, 14, 21, 35], [14, 14, 14, 14, 14, 14, 28, 28], [14, 14, 14, 14, 14, 21, 21, 28], [14, 14, 14, 14, 14, 21, 49], [14, 14, 14, 14, 14, 28, 42], [14, 14, 14, 14, 14, 35, 35], [14, 14, 14, 14, 21, 21, 21, 21], [14, 14, 14, 14, 21, 21, 42], [14, 14, 14, 14, 21, 28, 35], [14, 14, 14, 14, 28, 28, 28], [14, 14, 14, 14, 35, 49], [14, 14, 14, 14, 42, 42], [14, 14, 14, 21, 21, 21, 35], [14, 14, 14, 21, 21, 28, 28], [14, 14, 14, 21, 28, 49], [14, 14, 14, 21, 35, 42], [14, 14, 14, 28, 28, 42], [14, 14, 14, 28, 35, 35], [14, 14, 14, 49, 49], [14, 14, 21, 21, 21, 21, 28], [14, 14, 21, 21, 21, 49], [14, 14, 21, 21, 28, 42], [14, 14, 21, 21, 35, 35], [14, 14, 21, 28, 28, 35], [14, 14, 21, 42, 49], [14, 14, 28, 28, 28, 28], [14, 14, 28, 35, 49], [14, 14, 28, 42, 42], [14, 14, 35, 35, 42], [14, 21, 21, 21, 21, 21, 21], [14, 21, 21, 21, 21, 42], [14, 21, 21, 21, 28, 35], [14, 21, 21, 28, 28, 28], [14, 21, 21, 35, 49], [14, 21, 21, 42, 42], [14, 21, 28, 28, 49], [14, 21, 28, 35, 42], [14, 21, 35, 35, 35], [14, 28, 28, 28, 42], [14, 28, 28, 35, 35], [14, 28, 49, 49], [14, 35, 42, 49], [14, 42, 42, 42], [21, 21, 21, 21, 21, 35], [21, 21, 21, 21, 28, 28], [21, 21, 21, 28, 49], [21, 21, 21, 35, 42], [21, 21, 28, 28, 42], [21, 21, 28, 35, 35], [21, 21, 49, 49], [21, 28, 28, 28, 35], [21, 28, 42, 49], [21, 35, 35, 49], [21, 35, 42, 42], [28, 28, 28, 28, 28], [28, 28, 35, 49], [28, 28, 42, 42], [28, 35, 35, 42], [35, 35, 35, 35], [42, 49, 49]]\n assert candidate(candidates = [8, 16, 24, 32, 40, 48],target = 64) == [[8, 8, 8, 8, 8, 8, 8, 8], [8, 8, 8, 8, 8, 8, 16], [8, 8, 8, 8, 8, 24], [8, 8, 8, 8, 16, 16], [8, 8, 8, 8, 32], [8, 8, 8, 16, 24], [8, 8, 8, 40], [8, 8, 16, 16, 16], [8, 8, 16, 32], [8, 8, 24, 24], [8, 8, 48], [8, 16, 16, 24], [8, 16, 40], [8, 24, 32], [16, 16, 16, 16], [16, 16, 32], [16, 24, 24], [16, 48], [24, 40], [32, 32]]\n assert candidate(candidates = [29, 26, 23, 20, 17, 14, 11, 8, 5, 2],target = 50) == [[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, 8], [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, 2, 2, 2, 14], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 2, 8, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 8, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 8, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 23], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 8, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 11, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 8, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 8, 8, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 8, 8, 8, 8], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 14], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 8, 11], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 8, 8, 8], [2, 2, 2, 2, 2, 2, 2, 2, 5, 29], [2, 2, 2, 2, 2, 2, 2, 2, 8, 26], [2, 2, 2, 2, 2, 2, 2, 2, 11, 23], [2, 2, 2, 2, 2, 2, 2, 2, 14, 20], [2, 2, 2, 2, 2, 2, 2, 2, 17, 17], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 8, 8], [2, 2, 2, 2, 2, 2, 2, 5, 5, 26], [2, 2, 2, 2, 2, 2, 2, 5, 8, 23], [2, 2, 2, 2, 2, 2, 2, 5, 11, 20], [2, 2, 2, 2, 2, 2, 2, 5, 14, 17], [2, 2, 2, 2, 2, 2, 2, 8, 8, 20], [2, 2, 2, 2, 2, 2, 2, 8, 11, 17], [2, 2, 2, 2, 2, 2, 2, 8, 14, 14], [2, 2, 2, 2, 2, 2, 2, 11, 11, 14], [2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 8], [2, 2, 2, 2, 2, 2, 5, 5, 5, 23], [2, 2, 2, 2, 2, 2, 5, 5, 8, 20], [2, 2, 2, 2, 2, 2, 5, 5, 11, 17], [2, 2, 2, 2, 2, 2, 5, 5, 14, 14], [2, 2, 2, 2, 2, 2, 5, 8, 8, 17], [2, 2, 2, 2, 2, 2, 5, 8, 11, 14], [2, 2, 2, 2, 2, 2, 5, 11, 11, 11], [2, 2, 2, 2, 2, 2, 8, 8, 8, 14], [2, 2, 2, 2, 2, 2, 8, 8, 11, 11], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 5, 5, 5, 8, 17], [2, 2, 2, 2, 2, 5, 5, 5, 11, 14], [2, 2, 2, 2, 2, 5, 5, 8, 8, 14], [2, 2, 2, 2, 2, 5, 5, 8, 11, 11], [2, 2, 2, 2, 2, 5, 8, 8, 8, 11], [2, 2, 2, 2, 2, 8, 8, 8, 8, 8], [2, 2, 2, 2, 2, 11, 29], [2, 2, 2, 2, 2, 14, 26], [2, 2, 2, 2, 2, 17, 23], [2, 2, 2, 2, 2, 20, 20], [2, 2, 2, 2, 5, 5, 5, 5, 5, 17], [2, 2, 2, 2, 5, 5, 5, 5, 8, 14], [2, 2, 2, 2, 5, 5, 5, 5, 11, 11], [2, 2, 2, 2, 5, 5, 5, 8, 8, 11], [2, 2, 2, 2, 5, 5, 8, 8, 8, 8], [2, 2, 2, 2, 5, 8, 29], [2, 2, 2, 2, 5, 11, 26], [2, 2, 2, 2, 5, 14, 23], [2, 2, 2, 2, 5, 17, 20], [2, 2, 2, 2, 8, 8, 26], [2, 2, 2, 2, 8, 11, 23], [2, 2, 2, 2, 8, 14, 20], [2, 2, 2, 2, 8, 17, 17], [2, 2, 2, 2, 11, 11, 20], [2, 2, 2, 2, 11, 14, 17], [2, 2, 2, 2, 14, 14, 14], [2, 2, 2, 5, 5, 5, 5, 5, 5, 14], [2, 2, 2, 5, 5, 5, 5, 5, 8, 11], [2, 2, 2, 5, 5, 5, 5, 8, 8, 8], [2, 2, 2, 5, 5, 5, 29], [2, 2, 2, 5, 5, 8, 26], [2, 2, 2, 5, 5, 11, 23], [2, 2, 2, 5, 5, 14, 20], [2, 2, 2, 5, 5, 17, 17], [2, 2, 2, 5, 8, 8, 23], [2, 2, 2, 5, 8, 11, 20], [2, 2, 2, 5, 8, 14, 17], [2, 2, 2, 5, 11, 11, 17], [2, 2, 2, 5, 11, 14, 14], [2, 2, 2, 8, 8, 8, 20], [2, 2, 2, 8, 8, 11, 17], [2, 2, 2, 8, 8, 14, 14], [2, 2, 2, 8, 11, 11, 14], [2, 2, 2, 11, 11, 11, 11], [2, 2, 5, 5, 5, 5, 5, 5, 5, 11], [2, 2, 5, 5, 5, 5, 5, 5, 8, 8], [2, 2, 5, 5, 5, 5, 26], [2, 2, 5, 5, 5, 8, 23], [2, 2, 5, 5, 5, 11, 20], [2, 2, 5, 5, 5, 14, 17], [2, 2, 5, 5, 8, 8, 20], [2, 2, 5, 5, 8, 11, 17], [2, 2, 5, 5, 8, 14, 14], [2, 2, 5, 5, 11, 11, 14], [2, 2, 5, 8, 8, 8, 17], [2, 2, 5, 8, 8, 11, 14], [2, 2, 5, 8, 11, 11, 11], [2, 2, 8, 8, 8, 8, 14], [2, 2, 8, 8, 8, 11, 11], [2, 2, 17, 29], [2, 2, 20, 26], [2, 2, 23, 23], [2, 5, 5, 5, 5, 5, 5, 5, 5, 8], [2, 5, 5, 5, 5, 5, 23], [2, 5, 5, 5, 5, 8, 20], [2, 5, 5, 5, 5, 11, 17], [2, 5, 5, 5, 5, 14, 14], [2, 5, 5, 5, 8, 8, 17], [2, 5, 5, 5, 8, 11, 14], [2, 5, 5, 5, 11, 11, 11], [2, 5, 5, 8, 8, 8, 14], [2, 5, 5, 8, 8, 11, 11], [2, 5, 8, 8, 8, 8, 11], [2, 5, 14, 29], [2, 5, 17, 26], [2, 5, 20, 23], [2, 8, 8, 8, 8, 8, 8], [2, 8, 11, 29], [2, 8, 14, 26], [2, 8, 17, 23], [2, 8, 20, 20], [2, 11, 11, 26], [2, 11, 14, 23], [2, 11, 17, 20], [2, 14, 14, 20], [2, 14, 17, 17], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 8, 17], [5, 5, 5, 5, 5, 11, 14], [5, 5, 5, 5, 8, 8, 14], [5, 5, 5, 5, 8, 11, 11], [5, 5, 5, 8, 8, 8, 11], [5, 5, 8, 8, 8, 8, 8], [5, 5, 11, 29], [5, 5, 14, 26], [5, 5, 17, 23], [5, 5, 20, 20], [5, 8, 8, 29], [5, 8, 11, 26], [5, 8, 14, 23], [5, 8, 17, 20], [5, 11, 11, 23], [5, 11, 14, 20], [5, 11, 17, 17], [5, 14, 14, 17], [8, 8, 8, 26], [8, 8, 11, 23], [8, 8, 14, 20], [8, 8, 17, 17], [8, 11, 11, 20], [8, 11, 14, 17], [8, 14, 14, 14], [11, 11, 11, 17], [11, 11, 14, 14]]\n assert candidate(candidates = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45],target = 60) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 21], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 24], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 21], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 27], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 12, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 24], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 21], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 15, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 30], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 21], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 12, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 27], [3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 12, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 24], [3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 21], [3, 3, 3, 3, 3, 3, 3, 3, 3, 15, 18], [3, 3, 3, 3, 3, 3, 3, 3, 3, 33], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 12], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 18], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 9, 15], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 12, 12], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 24], [3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 6, 9, 21], [3, 3, 3, 3, 3, 3, 3, 3, 6, 12, 18], [3, 3, 3, 3, 3, 3, 3, 3, 6, 15, 15], [3, 3, 3, 3, 3, 3, 3, 3, 6, 30], [3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 9, 9, 18], [3, 3, 3, 3, 3, 3, 3, 3, 9, 12, 15], [3, 3, 3, 3, 3, 3, 3, 3, 9, 27], [3, 3, 3, 3, 3, 3, 3, 3, 12, 12, 12], [3, 3, 3, 3, 3, 3, 3, 3, 12, 24], [3, 3, 3, 3, 3, 3, 3, 3, 15, 21], [3, 3, 3, 3, 3, 3, 3, 3, 18, 18], [3, 3, 3, 3, 3, 3, 3, 3, 36], [3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 9], [3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 15], [3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 9, 12], [3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 21], [3, 3, 3, 3, 3, 3, 3, 6, 6, 9, 9, 9], [3, 3, 3, 3, 3, 3, 3, 6, 6, 9, 18], [3, 3, 3, 3, 3, 3, 3, 6, 6, 12, 15], [3, 3, 3, 3, 3, 3, 3, 6, 6, 27], [3, 3, 3, 3, 3, 3, 3, 6, 9, 9, 15], [3, 3, 3, 3, 3, 3, 3, 6, 9, 12, 12], [3, 3, 3, 3, 3, 3, 3, 6, 9, 24], [3, 3, 3, 3, 3, 3, 3, 6, 12, 21], [3, 3, 3, 3, 3, 3, 3, 6, 15, 18], [3, 3, 3, 3, 3, 3, 3, 6, 33], [3, 3, 3, 3, 3, 3, 3, 9, 9, 9, 12], [3, 3, 3, 3, 3, 3, 3, 9, 9, 21], [3, 3, 3, 3, 3, 3, 3, 9, 12, 18], [3, 3, 3, 3, 3, 3, 3, 9, 15, 15], [3, 3, 3, 3, 3, 3, 3, 9, 30], [3, 3, 3, 3, 3, 3, 3, 12, 12, 15], [3, 3, 3, 3, 3, 3, 3, 12, 27], [3, 3, 3, 3, 3, 3, 3, 15, 24], [3, 3, 3, 3, 3, 3, 3, 18, 21], [3, 3, 3, 3, 3, 3, 3, 39], [3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6], [3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 12], [3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 9, 9], [3, 3, 3, 3, 3, 3, 6, 6, 6, 6, 18], [3, 3, 3, 3, 3, 3, 6, 6, 6, 9, 15], [3, 3, 3, 3, 3, 3, 6, 6, 6, 12, 12], [3, 3, 3, 3, 3, 3, 6, 6, 6, 24], [3, 3, 3, 3, 3, 3, 6, 6, 9, 9, 12], [3, 3, 3, 3, 3, 3, 6, 6, 9, 21], [3, 3, 3, 3, 3, 3, 6, 6, 12, 18], [3, 3, 3, 3, 3, 3, 6, 6, 15, 15], [3, 3, 3, 3, 3, 3, 6, 6, 30], [3, 3, 3, 3, 3, 3, 6, 9, 9, 9, 9], [3, 3, 3, 3, 3, 3, 6, 9, 9, 18], [3, 3, 3, 3, 3, 3, 6, 9, 12, 15], [3, 3, 3, 3, 3, 3, 6, 9, 27], [3, 3, 3, 3, 3, 3, 6, 12, 12, 12], [3, 3, 3, 3, 3, 3, 6, 12, 24], [3, 3, 3, 3, 3, 3, 6, 15, 21], [3, 3, 3, 3, 3, 3, 6, 18, 18], [3, 3, 3, 3, 3, 3, 6, 36], [3, 3, 3, 3, 3, 3, 9, 9, 9, 15], [3, 3, 3, 3, 3, 3, 9, 9, 12, 12], [3, 3, 3, 3, 3, 3, 9, 9, 24], [3, 3, 3, 3, 3, 3, 9, 12, 21], [3, 3, 3, 3, 3, 3, 9, 15, 18], [3, 3, 3, 3, 3, 3, 9, 33], [3, 3, 3, 3, 3, 3, 12, 12, 18], [3, 3, 3, 3, 3, 3, 12, 15, 15], [3, 3, 3, 3, 3, 3, 12, 30], [3, 3, 3, 3, 3, 3, 15, 27], [3, 3, 3, 3, 3, 3, 18, 24], [3, 3, 3, 3, 3, 3, 21, 21], [3, 3, 3, 3, 3, 3, 42], [3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 9], [3, 3, 3, 3, 3, 6, 6, 6, 6, 6, 15], [3, 3, 3, 3, 3, 6, 6, 6, 6, 9, 12], [3, 3, 3, 3, 3, 6, 6, 6, 6, 21], [3, 3, 3, 3, 3, 6, 6, 6, 9, 9, 9], [3, 3, 3, 3, 3, 6, 6, 6, 9, 18], [3, 3, 3, 3, 3, 6, 6, 6, 12, 15], [3, 3, 3, 3, 3, 6, 6, 6, 27], [3, 3, 3, 3, 3, 6, 6, 9, 9, 15], [3, 3, 3, 3, 3, 6, 6, 9, 12, 12], [3, 3, 3, 3, 3, 6, 6, 9, 24], [3, 3, 3, 3, 3, 6, 6, 12, 21], [3, 3, 3, 3, 3, 6, 6, 15, 18], [3, 3, 3, 3, 3, 6, 6, 33], [3, 3, 3, 3, 3, 6, 9, 9, 9, 12], [3, 3, 3, 3, 3, 6, 9, 9, 21], [3, 3, 3, 3, 3, 6, 9, 12, 18], [3, 3, 3, 3, 3, 6, 9, 15, 15], [3, 3, 3, 3, 3, 6, 9, 30], [3, 3, 3, 3, 3, 6, 12, 12, 15], [3, 3, 3, 3, 3, 6, 12, 27], [3, 3, 3, 3, 3, 6, 15, 24], [3, 3, 3, 3, 3, 6, 18, 21], [3, 3, 3, 3, 3, 6, 39], [3, 3, 3, 3, 3, 9, 9, 9, 9, 9], [3, 3, 3, 3, 3, 9, 9, 9, 18], [3, 3, 3, 3, 3, 9, 9, 12, 15], [3, 3, 3, 3, 3, 9, 9, 27], [3, 3, 3, 3, 3, 9, 12, 12, 12], [3, 3, 3, 3, 3, 9, 12, 24], [3, 3, 3, 3, 3, 9, 15, 21], [3, 3, 3, 3, 3, 9, 18, 18], [3, 3, 3, 3, 3, 9, 36], [3, 3, 3, 3, 3, 12, 12, 21], [3, 3, 3, 3, 3, 12, 15, 18], [3, 3, 3, 3, 3, 12, 33], [3, 3, 3, 3, 3, 15, 15, 15], [3, 3, 3, 3, 3, 15, 30], [3, 3, 3, 3, 3, 18, 27], [3, 3, 3, 3, 3, 21, 24], [3, 3, 3, 3, 3, 45], [3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6], [3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 12], [3, 3, 3, 3, 6, 6, 6, 6, 6, 9, 9], [3, 3, 3, 3, 6, 6, 6, 6, 6, 18], [3, 3, 3, 3, 6, 6, 6, 6, 9, 15], [3, 3, 3, 3, 6, 6, 6, 6, 12, 12], [3, 3, 3, 3, 6, 6, 6, 6, 24], [3, 3, 3, 3, 6, 6, 6, 9, 9, 12], [3, 3, 3, 3, 6, 6, 6, 9, 21], [3, 3, 3, 3, 6, 6, 6, 12, 18], [3, 3, 3, 3, 6, 6, 6, 15, 15], [3, 3, 3, 3, 6, 6, 6, 30], [3, 3, 3, 3, 6, 6, 9, 9, 9, 9], [3, 3, 3, 3, 6, 6, 9, 9, 18], [3, 3, 3, 3, 6, 6, 9, 12, 15], [3, 3, 3, 3, 6, 6, 9, 27], [3, 3, 3, 3, 6, 6, 12, 12, 12], [3, 3, 3, 3, 6, 6, 12, 24], [3, 3, 3, 3, 6, 6, 15, 21], [3, 3, 3, 3, 6, 6, 18, 18], [3, 3, 3, 3, 6, 6, 36], [3, 3, 3, 3, 6, 9, 9, 9, 15], [3, 3, 3, 3, 6, 9, 9, 12, 12], [3, 3, 3, 3, 6, 9, 9, 24], [3, 3, 3, 3, 6, 9, 12, 21], [3, 3, 3, 3, 6, 9, 15, 18], [3, 3, 3, 3, 6, 9, 33], [3, 3, 3, 3, 6, 12, 12, 18], [3, 3, 3, 3, 6, 12, 15, 15], [3, 3, 3, 3, 6, 12, 30], [3, 3, 3, 3, 6, 15, 27], [3, 3, 3, 3, 6, 18, 24], [3, 3, 3, 3, 6, 21, 21], [3, 3, 3, 3, 6, 42], [3, 3, 3, 3, 9, 9, 9, 9, 12], [3, 3, 3, 3, 9, 9, 9, 21], [3, 3, 3, 3, 9, 9, 12, 18], [3, 3, 3, 3, 9, 9, 15, 15], [3, 3, 3, 3, 9, 9, 30], [3, 3, 3, 3, 9, 12, 12, 15], [3, 3, 3, 3, 9, 12, 27], [3, 3, 3, 3, 9, 15, 24], [3, 3, 3, 3, 9, 18, 21], [3, 3, 3, 3, 9, 39], [3, 3, 3, 3, 12, 12, 12, 12], [3, 3, 3, 3, 12, 12, 24], [3, 3, 3, 3, 12, 15, 21], [3, 3, 3, 3, 12, 18, 18], [3, 3, 3, 3, 12, 36], [3, 3, 3, 3, 15, 15, 18], [3, 3, 3, 3, 15, 33], [3, 3, 3, 3, 18, 30], [3, 3, 3, 3, 21, 27], [3, 3, 3, 3, 24, 24], [3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 9], [3, 3, 3, 6, 6, 6, 6, 6, 6, 15], [3, 3, 3, 6, 6, 6, 6, 6, 9, 12], [3, 3, 3, 6, 6, 6, 6, 6, 21], [3, 3, 3, 6, 6, 6, 6, 9, 9, 9], [3, 3, 3, 6, 6, 6, 6, 9, 18], [3, 3, 3, 6, 6, 6, 6, 12, 15], [3, 3, 3, 6, 6, 6, 6, 27], [3, 3, 3, 6, 6, 6, 9, 9, 15], [3, 3, 3, 6, 6, 6, 9, 12, 12], [3, 3, 3, 6, 6, 6, 9, 24], [3, 3, 3, 6, 6, 6, 12, 21], [3, 3, 3, 6, 6, 6, 15, 18], [3, 3, 3, 6, 6, 6, 33], [3, 3, 3, 6, 6, 9, 9, 9, 12], [3, 3, 3, 6, 6, 9, 9, 21], [3, 3, 3, 6, 6, 9, 12, 18], [3, 3, 3, 6, 6, 9, 15, 15], [3, 3, 3, 6, 6, 9, 30], [3, 3, 3, 6, 6, 12, 12, 15], [3, 3, 3, 6, 6, 12, 27], [3, 3, 3, 6, 6, 15, 24], [3, 3, 3, 6, 6, 18, 21], [3, 3, 3, 6, 6, 39], [3, 3, 3, 6, 9, 9, 9, 9, 9], [3, 3, 3, 6, 9, 9, 9, 18], [3, 3, 3, 6, 9, 9, 12, 15], [3, 3, 3, 6, 9, 9, 27], [3, 3, 3, 6, 9, 12, 12, 12], [3, 3, 3, 6, 9, 12, 24], [3, 3, 3, 6, 9, 15, 21], [3, 3, 3, 6, 9, 18, 18], [3, 3, 3, 6, 9, 36], [3, 3, 3, 6, 12, 12, 21], [3, 3, 3, 6, 12, 15, 18], [3, 3, 3, 6, 12, 33], [3, 3, 3, 6, 15, 15, 15], [3, 3, 3, 6, 15, 30], [3, 3, 3, 6, 18, 27], [3, 3, 3, 6, 21, 24], [3, 3, 3, 6, 45], [3, 3, 3, 9, 9, 9, 9, 15], [3, 3, 3, 9, 9, 9, 12, 12], [3, 3, 3, 9, 9, 9, 24], [3, 3, 3, 9, 9, 12, 21], [3, 3, 3, 9, 9, 15, 18], [3, 3, 3, 9, 9, 33], [3, 3, 3, 9, 12, 12, 18], [3, 3, 3, 9, 12, 15, 15], [3, 3, 3, 9, 12, 30], [3, 3, 3, 9, 15, 27], [3, 3, 3, 9, 18, 24], [3, 3, 3, 9, 21, 21], [3, 3, 3, 9, 42], [3, 3, 3, 12, 12, 12, 15], [3, 3, 3, 12, 12, 27], [3, 3, 3, 12, 15, 24], [3, 3, 3, 12, 18, 21], [3, 3, 3, 12, 39], [3, 3, 3, 15, 15, 21], [3, 3, 3, 15, 18, 18], [3, 3, 3, 15, 36], [3, 3, 3, 18, 33], [3, 3, 3, 21, 30], [3, 3, 3, 24, 27], [3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6], [3, 3, 6, 6, 6, 6, 6, 6, 6, 12], [3, 3, 6, 6, 6, 6, 6, 6, 9, 9], [3, 3, 6, 6, 6, 6, 6, 6, 18], [3, 3, 6, 6, 6, 6, 6, 9, 15], [3, 3, 6, 6, 6, 6, 6, 12, 12], [3, 3, 6, 6, 6, 6, 6, 24], [3, 3, 6, 6, 6, 6, 9, 9, 12], [3, 3, 6, 6, 6, 6, 9, 21], [3, 3, 6, 6, 6, 6, 12, 18], [3, 3, 6, 6, 6, 6, 15, 15], [3, 3, 6, 6, 6, 6, 30], [3, 3, 6, 6, 6, 9, 9, 9, 9], [3, 3, 6, 6, 6, 9, 9, 18], [3, 3, 6, 6, 6, 9, 12, 15], [3, 3, 6, 6, 6, 9, 27], [3, 3, 6, 6, 6, 12, 12, 12], [3, 3, 6, 6, 6, 12, 24], [3, 3, 6, 6, 6, 15, 21], [3, 3, 6, 6, 6, 18, 18], [3, 3, 6, 6, 6, 36], [3, 3, 6, 6, 9, 9, 9, 15], [3, 3, 6, 6, 9, 9, 12, 12], [3, 3, 6, 6, 9, 9, 24], [3, 3, 6, 6, 9, 12, 21], [3, 3, 6, 6, 9, 15, 18], [3, 3, 6, 6, 9, 33], [3, 3, 6, 6, 12, 12, 18], [3, 3, 6, 6, 12, 15, 15], [3, 3, 6, 6, 12, 30], [3, 3, 6, 6, 15, 27], [3, 3, 6, 6, 18, 24], [3, 3, 6, 6, 21, 21], [3, 3, 6, 6, 42], [3, 3, 6, 9, 9, 9, 9, 12], [3, 3, 6, 9, 9, 9, 21], [3, 3, 6, 9, 9, 12, 18], [3, 3, 6, 9, 9, 15, 15], [3, 3, 6, 9, 9, 30], [3, 3, 6, 9, 12, 12, 15], [3, 3, 6, 9, 12, 27], [3, 3, 6, 9, 15, 24], [3, 3, 6, 9, 18, 21], [3, 3, 6, 9, 39], [3, 3, 6, 12, 12, 12, 12], [3, 3, 6, 12, 12, 24], [3, 3, 6, 12, 15, 21], [3, 3, 6, 12, 18, 18], [3, 3, 6, 12, 36], [3, 3, 6, 15, 15, 18], [3, 3, 6, 15, 33], [3, 3, 6, 18, 30], [3, 3, 6, 21, 27], [3, 3, 6, 24, 24], [3, 3, 9, 9, 9, 9, 9, 9], [3, 3, 9, 9, 9, 9, 18], [3, 3, 9, 9, 9, 12, 15], [3, 3, 9, 9, 9, 27], [3, 3, 9, 9, 12, 12, 12], [3, 3, 9, 9, 12, 24], [3, 3, 9, 9, 15, 21], [3, 3, 9, 9, 18, 18], [3, 3, 9, 9, 36], [3, 3, 9, 12, 12, 21], [3, 3, 9, 12, 15, 18], [3, 3, 9, 12, 33], [3, 3, 9, 15, 15, 15], [3, 3, 9, 15, 30], [3, 3, 9, 18, 27], [3, 3, 9, 21, 24], [3, 3, 9, 45], [3, 3, 12, 12, 12, 18], [3, 3, 12, 12, 15, 15], [3, 3, 12, 12, 30], [3, 3, 12, 15, 27], [3, 3, 12, 18, 24], [3, 3, 12, 21, 21], [3, 3, 12, 42], [3, 3, 15, 15, 24], [3, 3, 15, 18, 21], [3, 3, 15, 39], [3, 3, 18, 18, 18], [3, 3, 18, 36], [3, 3, 21, 33], [3, 3, 24, 30], [3, 3, 27, 27], [3, 6, 6, 6, 6, 6, 6, 6, 6, 9], [3, 6, 6, 6, 6, 6, 6, 6, 15], [3, 6, 6, 6, 6, 6, 6, 9, 12], [3, 6, 6, 6, 6, 6, 6, 21], [3, 6, 6, 6, 6, 6, 9, 9, 9], [3, 6, 6, 6, 6, 6, 9, 18], [3, 6, 6, 6, 6, 6, 12, 15], [3, 6, 6, 6, 6, 6, 27], [3, 6, 6, 6, 6, 9, 9, 15], [3, 6, 6, 6, 6, 9, 12, 12], [3, 6, 6, 6, 6, 9, 24], [3, 6, 6, 6, 6, 12, 21], [3, 6, 6, 6, 6, 15, 18], [3, 6, 6, 6, 6, 33], [3, 6, 6, 6, 9, 9, 9, 12], [3, 6, 6, 6, 9, 9, 21], [3, 6, 6, 6, 9, 12, 18], [3, 6, 6, 6, 9, 15, 15], [3, 6, 6, 6, 9, 30], [3, 6, 6, 6, 12, 12, 15], [3, 6, 6, 6, 12, 27], [3, 6, 6, 6, 15, 24], [3, 6, 6, 6, 18, 21], [3, 6, 6, 6, 39], [3, 6, 6, 9, 9, 9, 9, 9], [3, 6, 6, 9, 9, 9, 18], [3, 6, 6, 9, 9, 12, 15], [3, 6, 6, 9, 9, 27], [3, 6, 6, 9, 12, 12, 12], [3, 6, 6, 9, 12, 24], [3, 6, 6, 9, 15, 21], [3, 6, 6, 9, 18, 18], [3, 6, 6, 9, 36], [3, 6, 6, 12, 12, 21], [3, 6, 6, 12, 15, 18], [3, 6, 6, 12, 33], [3, 6, 6, 15, 15, 15], [3, 6, 6, 15, 30], [3, 6, 6, 18, 27], [3, 6, 6, 21, 24], [3, 6, 6, 45], [3, 6, 9, 9, 9, 9, 15], [3, 6, 9, 9, 9, 12, 12], [3, 6, 9, 9, 9, 24], [3, 6, 9, 9, 12, 21], [3, 6, 9, 9, 15, 18], [3, 6, 9, 9, 33], [3, 6, 9, 12, 12, 18], [3, 6, 9, 12, 15, 15], [3, 6, 9, 12, 30], [3, 6, 9, 15, 27], [3, 6, 9, 18, 24], [3, 6, 9, 21, 21], [3, 6, 9, 42], [3, 6, 12, 12, 12, 15], [3, 6, 12, 12, 27], [3, 6, 12, 15, 24], [3, 6, 12, 18, 21], [3, 6, 12, 39], [3, 6, 15, 15, 21], [3, 6, 15, 18, 18], [3, 6, 15, 36], [3, 6, 18, 33], [3, 6, 21, 30], [3, 6, 24, 27], [3, 9, 9, 9, 9, 9, 12], [3, 9, 9, 9, 9, 21], [3, 9, 9, 9, 12, 18], [3, 9, 9, 9, 15, 15], [3, 9, 9, 9, 30], [3, 9, 9, 12, 12, 15], [3, 9, 9, 12, 27], [3, 9, 9, 15, 24], [3, 9, 9, 18, 21], [3, 9, 9, 39], [3, 9, 12, 12, 12, 12], [3, 9, 12, 12, 24], [3, 9, 12, 15, 21], [3, 9, 12, 18, 18], [3, 9, 12, 36], [3, 9, 15, 15, 18], [3, 9, 15, 33], [3, 9, 18, 30], [3, 9, 21, 27], [3, 9, 24, 24], [3, 12, 12, 12, 21], [3, 12, 12, 15, 18], [3, 12, 12, 33], [3, 12, 15, 15, 15], [3, 12, 15, 30], [3, 12, 18, 27], [3, 12, 21, 24], [3, 12, 45], [3, 15, 15, 27], [3, 15, 18, 24], [3, 15, 21, 21], [3, 15, 42], [3, 18, 18, 21], [3, 18, 39], [3, 21, 36], [3, 24, 33], [3, 27, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 12], [6, 6, 6, 6, 6, 6, 6, 9, 9], [6, 6, 6, 6, 6, 6, 6, 18], [6, 6, 6, 6, 6, 6, 9, 15], [6, 6, 6, 6, 6, 6, 12, 12], [6, 6, 6, 6, 6, 6, 24], [6, 6, 6, 6, 6, 9, 9, 12], [6, 6, 6, 6, 6, 9, 21], [6, 6, 6, 6, 6, 12, 18], [6, 6, 6, 6, 6, 15, 15], [6, 6, 6, 6, 6, 30], [6, 6, 6, 6, 9, 9, 9, 9], [6, 6, 6, 6, 9, 9, 18], [6, 6, 6, 6, 9, 12, 15], [6, 6, 6, 6, 9, 27], [6, 6, 6, 6, 12, 12, 12], [6, 6, 6, 6, 12, 24], [6, 6, 6, 6, 15, 21], [6, 6, 6, 6, 18, 18], [6, 6, 6, 6, 36], [6, 6, 6, 9, 9, 9, 15], [6, 6, 6, 9, 9, 12, 12], [6, 6, 6, 9, 9, 24], [6, 6, 6, 9, 12, 21], [6, 6, 6, 9, 15, 18], [6, 6, 6, 9, 33], [6, 6, 6, 12, 12, 18], [6, 6, 6, 12, 15, 15], [6, 6, 6, 12, 30], [6, 6, 6, 15, 27], [6, 6, 6, 18, 24], [6, 6, 6, 21, 21], [6, 6, 6, 42], [6, 6, 9, 9, 9, 9, 12], [6, 6, 9, 9, 9, 21], [6, 6, 9, 9, 12, 18], [6, 6, 9, 9, 15, 15], [6, 6, 9, 9, 30], [6, 6, 9, 12, 12, 15], [6, 6, 9, 12, 27], [6, 6, 9, 15, 24], [6, 6, 9, 18, 21], [6, 6, 9, 39], [6, 6, 12, 12, 12, 12], [6, 6, 12, 12, 24], [6, 6, 12, 15, 21], [6, 6, 12, 18, 18], [6, 6, 12, 36], [6, 6, 15, 15, 18], [6, 6, 15, 33], [6, 6, 18, 30], [6, 6, 21, 27], [6, 6, 24, 24], [6, 9, 9, 9, 9, 9, 9], [6, 9, 9, 9, 9, 18], [6, 9, 9, 9, 12, 15], [6, 9, 9, 9, 27], [6, 9, 9, 12, 12, 12], [6, 9, 9, 12, 24], [6, 9, 9, 15, 21], [6, 9, 9, 18, 18], [6, 9, 9, 36], [6, 9, 12, 12, 21], [6, 9, 12, 15, 18], [6, 9, 12, 33], [6, 9, 15, 15, 15], [6, 9, 15, 30], [6, 9, 18, 27], [6, 9, 21, 24], [6, 9, 45], [6, 12, 12, 12, 18], [6, 12, 12, 15, 15], [6, 12, 12, 30], [6, 12, 15, 27], [6, 12, 18, 24], [6, 12, 21, 21], [6, 12, 42], [6, 15, 15, 24], [6, 15, 18, 21], [6, 15, 39], [6, 18, 18, 18], [6, 18, 36], [6, 21, 33], [6, 24, 30], [6, 27, 27], [9, 9, 9, 9, 9, 15], [9, 9, 9, 9, 12, 12], [9, 9, 9, 9, 24], [9, 9, 9, 12, 21], [9, 9, 9, 15, 18], [9, 9, 9, 33], [9, 9, 12, 12, 18], [9, 9, 12, 15, 15], [9, 9, 12, 30], [9, 9, 15, 27], [9, 9, 18, 24], [9, 9, 21, 21], [9, 9, 42], [9, 12, 12, 12, 15], [9, 12, 12, 27], [9, 12, 15, 24], [9, 12, 18, 21], [9, 12, 39], [9, 15, 15, 21], [9, 15, 18, 18], [9, 15, 36], [9, 18, 33], [9, 21, 30], [9, 24, 27], [12, 12, 12, 12, 12], [12, 12, 12, 24], [12, 12, 15, 21], [12, 12, 18, 18], [12, 12, 36], [12, 15, 15, 18], [12, 15, 33], [12, 18, 30], [12, 21, 27], [12, 24, 24], [15, 15, 15, 15], [15, 15, 30], [15, 18, 27], [15, 21, 24], [15, 45], [18, 18, 24], [18, 21, 21], [18, 42], [21, 39], [24, 36], [27, 33], [30, 30]]\n assert candidate(candidates = [18, 14, 9, 7, 3, 2, 1],target = 30) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2, 3], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [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, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 14], [1, 1, 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, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7, 9], [1, 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, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 9, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 14], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 9, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 18], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 14], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 14], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 9, 9], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 18], [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 14], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 7, 9], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 9], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 14], [1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 7, 9], [1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 2, 3, 9, 9], [1, 1, 1, 1, 1, 1, 1, 2, 3, 18], [1, 1, 1, 1, 1, 1, 1, 2, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 2, 7, 14], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 14], [1, 1, 1, 1, 1, 1, 1, 7, 7, 9], [1, 1, 1, 1, 1, 1, 1, 9, 14], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 9], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 14], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 7, 9], [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 2, 2, 2, 9, 9], [1, 1, 1, 1, 1, 1, 2, 2, 2, 18], [1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 7, 7], [1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 14], [1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 2, 3, 3, 7, 9], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 3, 3, 9, 9], [1, 1, 1, 1, 1, 1, 3, 3, 18], [1, 1, 1, 1, 1, 1, 3, 7, 7, 7], [1, 1, 1, 1, 1, 1, 3, 7, 14], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 9], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 7], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 9], [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 7, 7], [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 14], [1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 2, 2, 2, 3, 7, 9], [1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 9], [1, 1, 1, 1, 1, 2, 2, 3, 9, 9], [1, 1, 1, 1, 1, 2, 2, 3, 18], [1, 1, 1, 1, 1, 2, 2, 7, 7, 7], [1, 1, 1, 1, 1, 2, 2, 7, 14], [1, 1, 1, 1, 1, 2, 3, 3, 3, 7, 7], [1, 1, 1, 1, 1, 2, 3, 3, 3, 14], [1, 1, 1, 1, 1, 2, 7, 7, 9], [1, 1, 1, 1, 1, 2, 9, 14], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 3, 3, 3, 7, 9], [1, 1, 1, 1, 1, 7, 9, 9], [1, 1, 1, 1, 1, 7, 18], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 9], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 14], [1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 7, 9], [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 9], [1, 1, 1, 1, 2, 2, 2, 2, 9, 9], [1, 1, 1, 1, 2, 2, 2, 2, 18], [1, 1, 1, 1, 2, 2, 2, 3, 3, 7, 7], [1, 1, 1, 1, 2, 2, 2, 3, 3, 14], [1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 7], [1, 1, 1, 1, 2, 2, 3, 3, 7, 9], [1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 9], [1, 1, 1, 1, 2, 3, 3, 9, 9], [1, 1, 1, 1, 2, 3, 3, 18], [1, 1, 1, 1, 2, 3, 7, 7, 7], [1, 1, 1, 1, 2, 3, 7, 14], [1, 1, 1, 1, 3, 3, 3, 3, 7, 7], [1, 1, 1, 1, 3, 3, 3, 3, 14], [1, 1, 1, 1, 3, 7, 7, 9], [1, 1, 1, 1, 3, 9, 14], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7], [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 9], [1, 1, 1, 2, 2, 2, 2, 2, 3, 7, 7], [1, 1, 1, 2, 2, 2, 2, 2, 3, 14], [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 7], [1, 1, 1, 2, 2, 2, 2, 3, 7, 9], [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 9], [1, 1, 1, 2, 2, 2, 3, 9, 9], [1, 1, 1, 2, 2, 2, 3, 18], [1, 1, 1, 2, 2, 2, 7, 7, 7], [1, 1, 1, 2, 2, 2, 7, 14], [1, 1, 1, 2, 2, 3, 3, 3, 7, 7], [1, 1, 1, 2, 2, 3, 3, 3, 14], [1, 1, 1, 2, 2, 7, 7, 9], [1, 1, 1, 2, 2, 9, 14], [1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 7], [1, 1, 1, 2, 3, 3, 3, 7, 9], [1, 1, 1, 2, 7, 9, 9], [1, 1, 1, 2, 7, 18], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 3, 3, 3, 3, 3, 3, 9], [1, 1, 1, 3, 3, 3, 9, 9], [1, 1, 1, 3, 3, 3, 18], [1, 1, 1, 3, 3, 7, 7, 7], [1, 1, 1, 3, 3, 7, 14], [1, 1, 1, 9, 9, 9], [1, 1, 1, 9, 18], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 9], [1, 1, 2, 2, 2, 2, 2, 2, 2, 7, 7], [1, 1, 2, 2, 2, 2, 2, 2, 2, 14], [1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7], [1, 1, 2, 2, 2, 2, 2, 2, 7, 9], [1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 9], [1, 1, 2, 2, 2, 2, 2, 9, 9], [1, 1, 2, 2, 2, 2, 2, 18], [1, 1, 2, 2, 2, 2, 3, 3, 7, 7], [1, 1, 2, 2, 2, 2, 3, 3, 14], [1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 7], [1, 1, 2, 2, 2, 3, 3, 7, 9], [1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 3, 3, 3, 9], [1, 1, 2, 2, 3, 3, 9, 9], [1, 1, 2, 2, 3, 3, 18], [1, 1, 2, 2, 3, 7, 7, 7], [1, 1, 2, 2, 3, 7, 14], [1, 1, 2, 3, 3, 3, 3, 7, 7], [1, 1, 2, 3, 3, 3, 3, 14], [1, 1, 2, 3, 7, 7, 9], [1, 1, 2, 3, 9, 14], [1, 1, 3, 3, 3, 3, 3, 3, 3, 7], [1, 1, 3, 3, 3, 3, 7, 9], [1, 1, 3, 7, 9, 9], [1, 1, 3, 7, 18], [1, 1, 7, 7, 7, 7], [1, 1, 7, 7, 14], [1, 1, 14, 14], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9], [1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7], [1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 9], [1, 2, 2, 2, 2, 2, 2, 3, 7, 7], [1, 2, 2, 2, 2, 2, 2, 3, 14], [1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7], [1, 2, 2, 2, 2, 2, 3, 7, 9], [1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3, 3, 3, 9], [1, 2, 2, 2, 2, 3, 9, 9], [1, 2, 2, 2, 2, 3, 18], [1, 2, 2, 2, 2, 7, 7, 7], [1, 2, 2, 2, 2, 7, 14], [1, 2, 2, 2, 3, 3, 3, 7, 7], [1, 2, 2, 2, 3, 3, 3, 14], [1, 2, 2, 2, 7, 7, 9], [1, 2, 2, 2, 9, 14], [1, 2, 2, 3, 3, 3, 3, 3, 3, 7], [1, 2, 2, 3, 3, 3, 7, 9], [1, 2, 2, 7, 9, 9], [1, 2, 2, 7, 18], [1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 2, 3, 3, 3, 3, 3, 3, 9], [1, 2, 3, 3, 3, 9, 9], [1, 2, 3, 3, 3, 18], [1, 2, 3, 3, 7, 7, 7], [1, 2, 3, 3, 7, 14], [1, 2, 9, 9, 9], [1, 2, 9, 18], [1, 3, 3, 3, 3, 3, 7, 7], [1, 3, 3, 3, 3, 3, 14], [1, 3, 3, 7, 7, 9], [1, 3, 3, 9, 14], [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, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 9], [2, 2, 2, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 14], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 7, 9], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 3, 3, 3, 9], [2, 2, 2, 2, 2, 2, 9, 9], [2, 2, 2, 2, 2, 2, 18], [2, 2, 2, 2, 2, 3, 3, 7, 7], [2, 2, 2, 2, 2, 3, 3, 14], [2, 2, 2, 2, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 3, 3, 7, 9], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3, 3, 9], [2, 2, 2, 3, 3, 9, 9], [2, 2, 2, 3, 3, 18], [2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 3, 7, 14], [2, 2, 3, 3, 3, 3, 7, 7], [2, 2, 3, 3, 3, 3, 14], [2, 2, 3, 7, 7, 9], [2, 2, 3, 9, 14], [2, 3, 3, 3, 3, 3, 3, 3, 7], [2, 3, 3, 3, 3, 7, 9], [2, 3, 7, 9, 9], [2, 3, 7, 18], [2, 7, 7, 7, 7], [2, 7, 7, 14], [2, 14, 14], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 9], [3, 3, 3, 3, 9, 9], [3, 3, 3, 3, 18], [3, 3, 3, 7, 7, 7], [3, 3, 3, 7, 14], [3, 9, 9, 9], [3, 9, 18], [7, 7, 7, 9], [7, 9, 14]]\n assert candidate(candidates = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],target = 50) == [[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, 3, 3], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 3, 7], [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, 2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 3, 3, 5, 5], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 5, 11], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 3, 3, 5, 7], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 11], [2, 2, 2, 2, 2, 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, 2, 2, 2, 2, 2, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 23], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 23], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 11, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 23], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 23], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 13, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 11, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 29], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 19], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 13], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 19], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 23], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 11, 17], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 19], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 13, 13], [2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 11, 13], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 19], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 11, 13], [2, 2, 2, 2, 2, 2, 2, 2, 5, 7, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 5, 29], [2, 2, 2, 2, 2, 2, 2, 2, 7, 7, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 11, 23], [2, 2, 2, 2, 2, 2, 2, 2, 17, 17], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 13], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 11], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 19], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 17], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 11, 13], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 17], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 11, 11], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 7, 13], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 7, 13], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 7, 7, 11], [2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 23], [2, 2, 2, 2, 2, 2, 2, 3, 3, 11, 19], [2, 2, 2, 2, 2, 2, 2, 3, 3, 13, 17], [2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 23], [2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 5, 11, 17], [2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 19], [2, 2, 2, 2, 2, 2, 2, 3, 7, 13, 13], [2, 2, 2, 2, 2, 2, 2, 3, 11, 11, 11], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 19], [2, 2, 2, 2, 2, 2, 2, 5, 5, 13, 13], [2, 2, 2, 2, 2, 2, 2, 5, 7, 7, 17], [2, 2, 2, 2, 2, 2, 2, 5, 7, 11, 13], [2, 2, 2, 2, 2, 2, 2, 7, 7, 11, 11], [2, 2, 2, 2, 2, 2, 2, 7, 29], [2, 2, 2, 2, 2, 2, 2, 13, 23], [2, 2, 2, 2, 2, 2, 2, 17, 19], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 17], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 7, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 23], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 19], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 13, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 19], [2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 17], [2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 11, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 7, 11, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 29], [2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 17], [2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 11, 11], [2, 2, 2, 2, 2, 2, 3, 3, 5, 7, 7, 13], [2, 2, 2, 2, 2, 2, 3, 3, 7, 7, 7, 11], [2, 2, 2, 2, 2, 2, 3, 3, 13, 19], [2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 7, 13], [2, 2, 2, 2, 2, 2, 3, 5, 5, 7, 7, 11], [2, 2, 2, 2, 2, 2, 3, 5, 7, 23], [2, 2, 2, 2, 2, 2, 3, 5, 11, 19], [2, 2, 2, 2, 2, 2, 3, 5, 13, 17], [2, 2, 2, 2, 2, 2, 3, 7, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 3, 7, 11, 17], [2, 2, 2, 2, 2, 2, 3, 11, 11, 13], [2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 13], [2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 7, 11], [2, 2, 2, 2, 2, 2, 5, 5, 5, 23], [2, 2, 2, 2, 2, 2, 5, 5, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 5, 5, 11, 17], [2, 2, 2, 2, 2, 2, 5, 7, 7, 19], [2, 2, 2, 2, 2, 2, 5, 7, 13, 13], [2, 2, 2, 2, 2, 2, 5, 11, 11, 11], [2, 2, 2, 2, 2, 2, 7, 7, 7, 17], [2, 2, 2, 2, 2, 2, 7, 7, 11, 13], [2, 2, 2, 2, 2, 2, 19, 19], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 13], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 19], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 17], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 11, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 7, 13], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 7, 7, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 13], [2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 7, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 23], [2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 7, 7, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 11, 17], [2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 11], [2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 7, 7, 7], [2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 19], [2, 2, 2, 2, 2, 3, 3, 3, 5, 13, 13], [2, 2, 2, 2, 2, 3, 3, 3, 7, 7, 17], [2, 2, 2, 2, 2, 3, 3, 3, 7, 11, 13], [2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 5, 7, 7], [2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 19], [2, 2, 2, 2, 2, 3, 3, 5, 5, 7, 17], [2, 2, 2, 2, 2, 3, 3, 5, 5, 11, 13], [2, 2, 2, 2, 2, 3, 3, 5, 7, 11, 11], [2, 2, 2, 2, 2, 3, 3, 5, 29], [2, 2, 2, 2, 2, 3, 3, 7, 7, 7, 13], [2, 2, 2, 2, 2, 3, 3, 11, 23], [2, 2, 2, 2, 2, 3, 3, 17, 17], [2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 17], [2, 2, 2, 2, 2, 3, 5, 5, 5, 11, 11], [2, 2, 2, 2, 2, 3, 5, 5, 7, 7, 13], [2, 2, 2, 2, 2, 3, 5, 7, 7, 7, 11], [2, 2, 2, 2, 2, 3, 5, 13, 19], [2, 2, 2, 2, 2, 3, 7, 7, 23], [2, 2, 2, 2, 2, 3, 7, 11, 19], [2, 2, 2, 2, 2, 3, 7, 13, 17], [2, 2, 2, 2, 2, 3, 11, 13, 13], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 5, 5, 7, 13], [2, 2, 2, 2, 2, 5, 5, 5, 7, 7, 11], [2, 2, 2, 2, 2, 5, 5, 7, 23], [2, 2, 2, 2, 2, 5, 5, 11, 19], [2, 2, 2, 2, 2, 5, 5, 13, 17], [2, 2, 2, 2, 2, 5, 7, 7, 7, 7, 7], [2, 2, 2, 2, 2, 5, 7, 11, 17], [2, 2, 2, 2, 2, 5, 11, 11, 13], [2, 2, 2, 2, 2, 7, 7, 7, 19], [2, 2, 2, 2, 2, 7, 7, 13, 13], [2, 2, 2, 2, 2, 7, 11, 11, 11], [2, 2, 2, 2, 2, 11, 29], [2, 2, 2, 2, 2, 17, 23], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 13], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 11], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 11], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 7, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 19], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 17], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 11, 13], [2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 17], [2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 11, 11], [2, 2, 2, 2, 3, 3, 3, 3, 3, 7, 7, 13], [2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 7, 13], [2, 2, 2, 2, 3, 3, 3, 3, 5, 7, 7, 11], [2, 2, 2, 2, 3, 3, 3, 3, 7, 23], [2, 2, 2, 2, 3, 3, 3, 3, 11, 19], [2, 2, 2, 2, 3, 3, 3, 3, 13, 17], [2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 13], [2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 11], [2, 2, 2, 2, 3, 3, 3, 5, 5, 23], [2, 2, 2, 2, 3, 3, 3, 5, 7, 7, 7, 7], [2, 2, 2, 2, 3, 3, 3, 5, 11, 17], [2, 2, 2, 2, 3, 3, 3, 7, 7, 19], [2, 2, 2, 2, 3, 3, 3, 7, 13, 13], [2, 2, 2, 2, 3, 3, 3, 11, 11, 11], [2, 2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 11], [2, 2, 2, 2, 3, 3, 5, 5, 5, 7, 7, 7], [2, 2, 2, 2, 3, 3, 5, 5, 7, 19], [2, 2, 2, 2, 3, 3, 5, 5, 13, 13], [2, 2, 2, 2, 3, 3, 5, 7, 7, 17], [2, 2, 2, 2, 3, 3, 5, 7, 11, 13], [2, 2, 2, 2, 3, 3, 7, 7, 11, 11], [2, 2, 2, 2, 3, 3, 7, 29], [2, 2, 2, 2, 3, 3, 13, 23], [2, 2, 2, 2, 3, 3, 17, 19], [2, 2, 2, 2, 3, 5, 5, 5, 5, 5, 7, 7], [2, 2, 2, 2, 3, 5, 5, 5, 5, 19], [2, 2, 2, 2, 3, 5, 5, 5, 7, 17], [2, 2, 2, 2, 3, 5, 5, 5, 11, 13], [2, 2, 2, 2, 3, 5, 5, 7, 11, 11], [2, 2, 2, 2, 3, 5, 5, 29], [2, 2, 2, 2, 3, 5, 7, 7, 7, 13], [2, 2, 2, 2, 3, 5, 11, 23], [2, 2, 2, 2, 3, 5, 17, 17], [2, 2, 2, 2, 3, 7, 7, 7, 7, 11], [2, 2, 2, 2, 3, 7, 13, 19], [2, 2, 2, 2, 3, 11, 11, 17], [2, 2, 2, 2, 3, 13, 13, 13], [2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 7], [2, 2, 2, 2, 5, 5, 5, 5, 5, 17], [2, 2, 2, 2, 5, 5, 5, 5, 11, 11], [2, 2, 2, 2, 5, 5, 5, 7, 7, 13], [2, 2, 2, 2, 5, 5, 7, 7, 7, 11], [2, 2, 2, 2, 5, 5, 13, 19], [2, 2, 2, 2, 5, 7, 7, 23], [2, 2, 2, 2, 5, 7, 11, 19], [2, 2, 2, 2, 5, 7, 13, 17], [2, 2, 2, 2, 5, 11, 13, 13], [2, 2, 2, 2, 7, 7, 7, 7, 7, 7], [2, 2, 2, 2, 7, 7, 11, 17], [2, 2, 2, 2, 7, 11, 11, 13], [2, 2, 2, 2, 13, 29], [2, 2, 2, 2, 19, 23], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 13], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 13], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 7, 11], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 23], [2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 7, 7, 7], [2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 19], [2, 2, 2, 3, 3, 3, 3, 3, 3, 13, 13], [2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 7, 7], [2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 19], [2, 2, 2, 3, 3, 3, 3, 3, 5, 7, 17], [2, 2, 2, 3, 3, 3, 3, 3, 5, 11, 13], [2, 2, 2, 3, 3, 3, 3, 3, 7, 11, 11], [2, 2, 2, 3, 3, 3, 3, 3, 29], [2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7], [2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 17], [2, 2, 2, 3, 3, 3, 3, 5, 5, 11, 11], [2, 2, 2, 3, 3, 3, 3, 5, 7, 7, 13], [2, 2, 2, 3, 3, 3, 3, 7, 7, 7, 11], [2, 2, 2, 3, 3, 3, 3, 13, 19], [2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 13], [2, 2, 2, 3, 3, 3, 5, 5, 7, 7, 11], [2, 2, 2, 3, 3, 3, 5, 7, 23], [2, 2, 2, 3, 3, 3, 5, 11, 19], [2, 2, 2, 3, 3, 3, 5, 13, 17], [2, 2, 2, 3, 3, 3, 7, 7, 7, 7, 7], [2, 2, 2, 3, 3, 3, 7, 11, 17], [2, 2, 2, 3, 3, 3, 11, 11, 13], [2, 2, 2, 3, 3, 5, 5, 5, 5, 5, 13], [2, 2, 2, 3, 3, 5, 5, 5, 5, 7, 11], [2, 2, 2, 3, 3, 5, 5, 5, 23], [2, 2, 2, 3, 3, 5, 5, 7, 7, 7, 7], [2, 2, 2, 3, 3, 5, 5, 11, 17], [2, 2, 2, 3, 3, 5, 7, 7, 19], [2, 2, 2, 3, 3, 5, 7, 13, 13], [2, 2, 2, 3, 3, 5, 11, 11, 11], [2, 2, 2, 3, 3, 7, 7, 7, 17], [2, 2, 2, 3, 3, 7, 7, 11, 13], [2, 2, 2, 3, 3, 19, 19], [2, 2, 2, 3, 5, 5, 5, 5, 5, 5, 11], [2, 2, 2, 3, 5, 5, 5, 5, 7, 7, 7], [2, 2, 2, 3, 5, 5, 5, 7, 19], [2, 2, 2, 3, 5, 5, 5, 13, 13], [2, 2, 2, 3, 5, 5, 7, 7, 17], [2, 2, 2, 3, 5, 5, 7, 11, 13], [2, 2, 2, 3, 5, 7, 7, 11, 11], [2, 2, 2, 3, 5, 7, 29], [2, 2, 2, 3, 5, 13, 23], [2, 2, 2, 3, 5, 17, 19], [2, 2, 2, 3, 7, 7, 7, 7, 13], [2, 2, 2, 3, 7, 11, 23], [2, 2, 2, 3, 7, 17, 17], [2, 2, 2, 3, 11, 11, 19], [2, 2, 2, 3, 11, 13, 17], [2, 2, 2, 5, 5, 5, 5, 5, 5, 7, 7], [2, 2, 2, 5, 5, 5, 5, 5, 19], [2, 2, 2, 5, 5, 5, 5, 7, 17], [2, 2, 2, 5, 5, 5, 5, 11, 13], [2, 2, 2, 5, 5, 5, 7, 11, 11], [2, 2, 2, 5, 5, 5, 29], [2, 2, 2, 5, 5, 7, 7, 7, 13], [2, 2, 2, 5, 5, 11, 23], [2, 2, 2, 5, 5, 17, 17], [2, 2, 2, 5, 7, 7, 7, 7, 11], [2, 2, 2, 5, 7, 13, 19], [2, 2, 2, 5, 11, 11, 17], [2, 2, 2, 5, 13, 13, 13], [2, 2, 2, 7, 7, 7, 23], [2, 2, 2, 7, 7, 11, 19], [2, 2, 2, 7, 7, 13, 17], [2, 2, 2, 7, 11, 13, 13], [2, 2, 2, 11, 11, 11, 11], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 13], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 19], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 17], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11], [2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 7, 13], [2, 2, 3, 3, 3, 3, 3, 3, 3, 7, 7, 11], [2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 13], [2, 2, 3, 3, 3, 3, 3, 3, 5, 5, 7, 11], [2, 2, 3, 3, 3, 3, 3, 3, 5, 23], [2, 2, 3, 3, 3, 3, 3, 3, 7, 7, 7, 7], [2, 2, 3, 3, 3, 3, 3, 3, 11, 17], [2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 11], [2, 2, 3, 3, 3, 3, 3, 5, 5, 7, 7, 7], [2, 2, 3, 3, 3, 3, 3, 5, 7, 19], [2, 2, 3, 3, 3, 3, 3, 5, 13, 13], [2, 2, 3, 3, 3, 3, 3, 7, 7, 17], [2, 2, 3, 3, 3, 3, 3, 7, 11, 13], [2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7], [2, 2, 3, 3, 3, 3, 5, 5, 5, 19], [2, 2, 3, 3, 3, 3, 5, 5, 7, 17], [2, 2, 3, 3, 3, 3, 5, 5, 11, 13], [2, 2, 3, 3, 3, 3, 5, 7, 11, 11], [2, 2, 3, 3, 3, 3, 5, 29], [2, 2, 3, 3, 3, 3, 7, 7, 7, 13], [2, 2, 3, 3, 3, 3, 11, 23], [2, 2, 3, 3, 3, 3, 17, 17], [2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 5, 7], [2, 2, 3, 3, 3, 5, 5, 5, 5, 17], [2, 2, 3, 3, 3, 5, 5, 5, 11, 11], [2, 2, 3, 3, 3, 5, 5, 7, 7, 13], [2, 2, 3, 3, 3, 5, 7, 7, 7, 11], [2, 2, 3, 3, 3, 5, 13, 19], [2, 2, 3, 3, 3, 7, 7, 23], [2, 2, 3, 3, 3, 7, 11, 19], [2, 2, 3, 3, 3, 7, 13, 17], [2, 2, 3, 3, 3, 11, 13, 13], [2, 2, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 3, 3, 5, 5, 5, 5, 7, 13], [2, 2, 3, 3, 5, 5, 5, 7, 7, 11], [2, 2, 3, 3, 5, 5, 7, 23], [2, 2, 3, 3, 5, 5, 11, 19], [2, 2, 3, 3, 5, 5, 13, 17], [2, 2, 3, 3, 5, 7, 7, 7, 7, 7], [2, 2, 3, 3, 5, 7, 11, 17], [2, 2, 3, 3, 5, 11, 11, 13], [2, 2, 3, 3, 7, 7, 7, 19], [2, 2, 3, 3, 7, 7, 13, 13], [2, 2, 3, 3, 7, 11, 11, 11], [2, 2, 3, 3, 11, 29], [2, 2, 3, 3, 17, 23], [2, 2, 3, 5, 5, 5, 5, 5, 5, 13], [2, 2, 3, 5, 5, 5, 5, 5, 7, 11], [2, 2, 3, 5, 5, 5, 5, 23], [2, 2, 3, 5, 5, 5, 7, 7, 7, 7], [2, 2, 3, 5, 5, 5, 11, 17], [2, 2, 3, 5, 5, 7, 7, 19], [2, 2, 3, 5, 5, 7, 13, 13], [2, 2, 3, 5, 5, 11, 11, 11], [2, 2, 3, 5, 7, 7, 7, 17], [2, 2, 3, 5, 7, 7, 11, 13], [2, 2, 3, 5, 19, 19], [2, 2, 3, 7, 7, 7, 11, 11], [2, 2, 3, 7, 7, 29], [2, 2, 3, 7, 13, 23], [2, 2, 3, 7, 17, 19], [2, 2, 3, 11, 13, 19], [2, 2, 3, 13, 13, 17], [2, 2, 5, 5, 5, 5, 5, 5, 5, 11], [2, 2, 5, 5, 5, 5, 5, 7, 7, 7], [2, 2, 5, 5, 5, 5, 7, 19], [2, 2, 5, 5, 5, 5, 13, 13], [2, 2, 5, 5, 5, 7, 7, 17], [2, 2, 5, 5, 5, 7, 11, 13], [2, 2, 5, 5, 7, 7, 11, 11], [2, 2, 5, 5, 7, 29], [2, 2, 5, 5, 13, 23], [2, 2, 5, 5, 17, 19], [2, 2, 5, 7, 7, 7, 7, 13], [2, 2, 5, 7, 11, 23], [2, 2, 5, 7, 17, 17], [2, 2, 5, 11, 11, 19], [2, 2, 5, 11, 13, 17], [2, 2, 7, 7, 7, 7, 7, 11], [2, 2, 7, 7, 13, 19], [2, 2, 7, 11, 11, 17], [2, 2, 7, 13, 13, 13], [2, 2, 11, 11, 11, 13], [2, 2, 17, 29], [2, 2, 23, 23], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 13], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 11], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 11], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 7], [2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7, 7], [2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 19], [2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 17], [2, 3, 3, 3, 3, 3, 3, 3, 3, 11, 13], [2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 7], [2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 17], [2, 3, 3, 3, 3, 3, 3, 3, 5, 11, 11], [2, 3, 3, 3, 3, 3, 3, 3, 7, 7, 13], [2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5], [2, 3, 3, 3, 3, 3, 3, 5, 5, 7, 13], [2, 3, 3, 3, 3, 3, 3, 5, 7, 7, 11], [2, 3, 3, 3, 3, 3, 3, 7, 23], [2, 3, 3, 3, 3, 3, 3, 11, 19], [2, 3, 3, 3, 3, 3, 3, 13, 17], [2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 13], [2, 3, 3, 3, 3, 3, 5, 5, 5, 7, 11], [2, 3, 3, 3, 3, 3, 5, 5, 23], [2, 3, 3, 3, 3, 3, 5, 7, 7, 7, 7], [2, 3, 3, 3, 3, 3, 5, 11, 17], [2, 3, 3, 3, 3, 3, 7, 7, 19], [2, 3, 3, 3, 3, 3, 7, 13, 13], [2, 3, 3, 3, 3, 3, 11, 11, 11], [2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 11], [2, 3, 3, 3, 3, 5, 5, 5, 7, 7, 7], [2, 3, 3, 3, 3, 5, 5, 7, 19], [2, 3, 3, 3, 3, 5, 5, 13, 13], [2, 3, 3, 3, 3, 5, 7, 7, 17], [2, 3, 3, 3, 3, 5, 7, 11, 13], [2, 3, 3, 3, 3, 7, 7, 11, 11], [2, 3, 3, 3, 3, 7, 29], [2, 3, 3, 3, 3, 13, 23], [2, 3, 3, 3, 3, 17, 19], [2, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7], [2, 3, 3, 3, 5, 5, 5, 5, 19], [2, 3, 3, 3, 5, 5, 5, 7, 17], [2, 3, 3, 3, 5, 5, 5, 11, 13], [2, 3, 3, 3, 5, 5, 7, 11, 11], [2, 3, 3, 3, 5, 5, 29], [2, 3, 3, 3, 5, 7, 7, 7, 13], [2, 3, 3, 3, 5, 11, 23], [2, 3, 3, 3, 5, 17, 17], [2, 3, 3, 3, 7, 7, 7, 7, 11], [2, 3, 3, 3, 7, 13, 19], [2, 3, 3, 3, 11, 11, 17], [2, 3, 3, 3, 13, 13, 13], [2, 3, 3, 5, 5, 5, 5, 5, 5, 5, 7], [2, 3, 3, 5, 5, 5, 5, 5, 17], [2, 3, 3, 5, 5, 5, 5, 11, 11], [2, 3, 3, 5, 5, 5, 7, 7, 13], [2, 3, 3, 5, 5, 7, 7, 7, 11], [2, 3, 3, 5, 5, 13, 19], [2, 3, 3, 5, 7, 7, 23], [2, 3, 3, 5, 7, 11, 19], [2, 3, 3, 5, 7, 13, 17], [2, 3, 3, 5, 11, 13, 13], [2, 3, 3, 7, 7, 7, 7, 7, 7], [2, 3, 3, 7, 7, 11, 17], [2, 3, 3, 7, 11, 11, 13], [2, 3, 3, 13, 29], [2, 3, 3, 19, 23], [2, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 3, 5, 5, 5, 5, 5, 7, 13], [2, 3, 5, 5, 5, 5, 7, 7, 11], [2, 3, 5, 5, 5, 7, 23], [2, 3, 5, 5, 5, 11, 19], [2, 3, 5, 5, 5, 13, 17], [2, 3, 5, 5, 7, 7, 7, 7, 7], [2, 3, 5, 5, 7, 11, 17], [2, 3, 5, 5, 11, 11, 13], [2, 3, 5, 7, 7, 7, 19], [2, 3, 5, 7, 7, 13, 13], [2, 3, 5, 7, 11, 11, 11], [2, 3, 5, 11, 29], [2, 3, 5, 17, 23], [2, 3, 7, 7, 7, 7, 17], [2, 3, 7, 7, 7, 11, 13], [2, 3, 7, 19, 19], [2, 3, 11, 11, 23], [2, 3, 11, 17, 17], [2, 3, 13, 13, 19], [2, 5, 5, 5, 5, 5, 5, 5, 13], [2, 5, 5, 5, 5, 5, 5, 7, 11], [2, 5, 5, 5, 5, 5, 23], [2, 5, 5, 5, 5, 7, 7, 7, 7], [2, 5, 5, 5, 5, 11, 17], [2, 5, 5, 5, 7, 7, 19], [2, 5, 5, 5, 7, 13, 13], [2, 5, 5, 5, 11, 11, 11], [2, 5, 5, 7, 7, 7, 17], [2, 5, 5, 7, 7, 11, 13], [2, 5, 5, 19, 19], [2, 5, 7, 7, 7, 11, 11], [2, 5, 7, 7, 29], [2, 5, 7, 13, 23], [2, 5, 7, 17, 19], [2, 5, 11, 13, 19], [2, 5, 13, 13, 17], [2, 7, 7, 7, 7, 7, 13], [2, 7, 7, 11, 23], [2, 7, 7, 17, 17], [2, 7, 11, 11, 19], [2, 7, 11, 13, 17], [2, 11, 11, 13, 13], [2, 19, 29], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 23], [3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 7, 19], [3, 3, 3, 3, 3, 3, 3, 3, 13, 13], [3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 7], [3, 3, 3, 3, 3, 3, 3, 5, 5, 19], [3, 3, 3, 3, 3, 3, 3, 5, 7, 17], [3, 3, 3, 3, 3, 3, 3, 5, 11, 13], [3, 3, 3, 3, 3, 3, 3, 7, 11, 11], [3, 3, 3, 3, 3, 3, 3, 29], [3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7], [3, 3, 3, 3, 3, 3, 5, 5, 5, 17], [3, 3, 3, 3, 3, 3, 5, 5, 11, 11], [3, 3, 3, 3, 3, 3, 5, 7, 7, 13], [3, 3, 3, 3, 3, 3, 7, 7, 7, 11], [3, 3, 3, 3, 3, 3, 13, 19], [3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [3, 3, 3, 3, 3, 5, 5, 5, 7, 13], [3, 3, 3, 3, 3, 5, 5, 7, 7, 11], [3, 3, 3, 3, 3, 5, 7, 23], [3, 3, 3, 3, 3, 5, 11, 19], [3, 3, 3, 3, 3, 5, 13, 17], [3, 3, 3, 3, 3, 7, 7, 7, 7, 7], [3, 3, 3, 3, 3, 7, 11, 17], [3, 3, 3, 3, 3, 11, 11, 13], [3, 3, 3, 3, 5, 5, 5, 5, 5, 13], [3, 3, 3, 3, 5, 5, 5, 5, 7, 11], [3, 3, 3, 3, 5, 5, 5, 23], [3, 3, 3, 3, 5, 5, 7, 7, 7, 7], [3, 3, 3, 3, 5, 5, 11, 17], [3, 3, 3, 3, 5, 7, 7, 19], [3, 3, 3, 3, 5, 7, 13, 13], [3, 3, 3, 3, 5, 11, 11, 11], [3, 3, 3, 3, 7, 7, 7, 17], [3, 3, 3, 3, 7, 7, 11, 13], [3, 3, 3, 3, 19, 19], [3, 3, 3, 5, 5, 5, 5, 5, 5, 11], [3, 3, 3, 5, 5, 5, 5, 7, 7, 7], [3, 3, 3, 5, 5, 5, 7, 19], [3, 3, 3, 5, 5, 5, 13, 13], [3, 3, 3, 5, 5, 7, 7, 17], [3, 3, 3, 5, 5, 7, 11, 13], [3, 3, 3, 5, 7, 7, 11, 11], [3, 3, 3, 5, 7, 29], [3, 3, 3, 5, 13, 23], [3, 3, 3, 5, 17, 19], [3, 3, 3, 7, 7, 7, 7, 13], [3, 3, 3, 7, 11, 23], [3, 3, 3, 7, 17, 17], [3, 3, 3, 11, 11, 19], [3, 3, 3, 11, 13, 17], [3, 3, 5, 5, 5, 5, 5, 5, 7, 7], [3, 3, 5, 5, 5, 5, 5, 19], [3, 3, 5, 5, 5, 5, 7, 17], [3, 3, 5, 5, 5, 5, 11, 13], [3, 3, 5, 5, 5, 7, 11, 11], [3, 3, 5, 5, 5, 29], [3, 3, 5, 5, 7, 7, 7, 13], [3, 3, 5, 5, 11, 23], [3, 3, 5, 5, 17, 17], [3, 3, 5, 7, 7, 7, 7, 11], [3, 3, 5, 7, 13, 19], [3, 3, 5, 11, 11, 17], [3, 3, 5, 13, 13, 13], [3, 3, 7, 7, 7, 23], [3, 3, 7, 7, 11, 19], [3, 3, 7, 7, 13, 17], [3, 3, 7, 11, 13, 13], [3, 3, 11, 11, 11, 11], [3, 5, 5, 5, 5, 5, 5, 5, 5, 7], [3, 5, 5, 5, 5, 5, 5, 17], [3, 5, 5, 5, 5, 5, 11, 11], [3, 5, 5, 5, 5, 7, 7, 13], [3, 5, 5, 5, 7, 7, 7, 11], [3, 5, 5, 5, 13, 19], [3, 5, 5, 7, 7, 23], [3, 5, 5, 7, 11, 19], [3, 5, 5, 7, 13, 17], [3, 5, 5, 11, 13, 13], [3, 5, 7, 7, 7, 7, 7, 7], [3, 5, 7, 7, 11, 17], [3, 5, 7, 11, 11, 13], [3, 5, 13, 29], [3, 5, 19, 23], [3, 7, 7, 7, 7, 19], [3, 7, 7, 7, 13, 13], [3, 7, 7, 11, 11, 11], [3, 7, 11, 29], [3, 7, 17, 23], [3, 11, 13, 23], [3, 11, 17, 19], [3, 13, 17, 17], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 7, 13], [5, 5, 5, 5, 5, 7, 7, 11], [5, 5, 5, 5, 7, 23], [5, 5, 5, 5, 11, 19], [5, 5, 5, 5, 13, 17], [5, 5, 5, 7, 7, 7, 7, 7], [5, 5, 5, 7, 11, 17], [5, 5, 5, 11, 11, 13], [5, 5, 7, 7, 7, 19], [5, 5, 7, 7, 13, 13], [5, 5, 7, 11, 11, 11], [5, 5, 11, 29], [5, 5, 17, 23], [5, 7, 7, 7, 7, 17], [5, 7, 7, 7, 11, 13], [5, 7, 19, 19], [5, 11, 11, 23], [5, 11, 17, 17], [5, 13, 13, 19], [7, 7, 7, 7, 11, 11], [7, 7, 7, 29], [7, 7, 13, 23], [7, 7, 17, 19], [7, 11, 13, 19], [7, 13, 13, 17], [11, 11, 11, 17], [11, 13, 13, 13]]\n assert 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 candidate(candidates = [18, 27, 36, 45, 54],target = 126) == [[18, 18, 18, 18, 18, 18, 18], [18, 18, 18, 18, 18, 36], [18, 18, 18, 18, 27, 27], [18, 18, 18, 18, 54], [18, 18, 18, 27, 45], [18, 18, 18, 36, 36], [18, 18, 27, 27, 36], [18, 18, 36, 54], [18, 18, 45, 45], [18, 27, 27, 27, 27], [18, 27, 27, 54], [18, 27, 36, 45], [18, 36, 36, 36], [18, 54, 54], [27, 27, 27, 45], [27, 27, 36, 36], [27, 45, 54], [36, 36, 54], [36, 45, 45]]\n assert candidate(candidates = [5, 10, 20, 25, 30, 35, 40],target = 70) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 30], [5, 5, 5, 5, 5, 5, 5, 10, 25], [5, 5, 5, 5, 5, 5, 5, 35], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 10, 10, 20], [5, 5, 5, 5, 5, 5, 10, 30], [5, 5, 5, 5, 5, 5, 20, 20], [5, 5, 5, 5, 5, 5, 40], [5, 5, 5, 5, 5, 10, 10, 25], [5, 5, 5, 5, 5, 10, 35], [5, 5, 5, 5, 5, 20, 25], [5, 5, 5, 5, 10, 10, 10, 10, 10], [5, 5, 5, 5, 10, 10, 10, 20], [5, 5, 5, 5, 10, 10, 30], [5, 5, 5, 5, 10, 20, 20], [5, 5, 5, 5, 10, 40], [5, 5, 5, 5, 20, 30], [5, 5, 5, 5, 25, 25], [5, 5, 5, 10, 10, 10, 25], [5, 5, 5, 10, 10, 35], [5, 5, 5, 10, 20, 25], [5, 5, 5, 20, 35], [5, 5, 5, 25, 30], [5, 5, 10, 10, 10, 10, 10, 10], [5, 5, 10, 10, 10, 10, 20], [5, 5, 10, 10, 10, 30], [5, 5, 10, 10, 20, 20], [5, 5, 10, 10, 40], [5, 5, 10, 20, 30], [5, 5, 10, 25, 25], [5, 5, 20, 20, 20], [5, 5, 20, 40], [5, 5, 25, 35], [5, 5, 30, 30], [5, 10, 10, 10, 10, 25], [5, 10, 10, 10, 35], [5, 10, 10, 20, 25], [5, 10, 20, 35], [5, 10, 25, 30], [5, 20, 20, 25], [5, 25, 40], [5, 30, 35], [10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 30], [10, 10, 10, 20, 20], [10, 10, 10, 40], [10, 10, 20, 30], [10, 10, 25, 25], [10, 20, 20, 20], [10, 20, 40], [10, 25, 35], [10, 30, 30], [20, 20, 30], [20, 25, 25], [30, 40], [35, 35]]\n assert candidate(candidates = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],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], [1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 9], [1, 1, 1, 1, 1, 1, 1, 1, 3, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 17], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 9], [1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 7], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 3, 15], [1, 1, 1, 1, 1, 1, 1, 5, 13], [1, 1, 1, 1, 1, 1, 1, 7, 11], [1, 1, 1, 1, 1, 1, 1, 9, 9], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 7], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 3, 3, 13], [1, 1, 1, 1, 1, 1, 3, 5, 11], [1, 1, 1, 1, 1, 1, 3, 7, 9], [1, 1, 1, 1, 1, 1, 5, 5, 9], [1, 1, 1, 1, 1, 1, 5, 7, 7], [1, 1, 1, 1, 1, 1, 19], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 3, 3, 3, 11], [1, 1, 1, 1, 1, 3, 3, 5, 9], [1, 1, 1, 1, 1, 3, 3, 7, 7], [1, 1, 1, 1, 1, 3, 5, 5, 7], [1, 1, 1, 1, 1, 3, 17], [1, 1, 1, 1, 1, 5, 5, 5, 5], [1, 1, 1, 1, 1, 5, 15], [1, 1, 1, 1, 1, 7, 13], [1, 1, 1, 1, 1, 9, 11], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 3, 3, 3, 3, 9], [1, 1, 1, 1, 3, 3, 3, 5, 7], [1, 1, 1, 1, 3, 3, 5, 5, 5], [1, 1, 1, 1, 3, 3, 15], [1, 1, 1, 1, 3, 5, 13], [1, 1, 1, 1, 3, 7, 11], [1, 1, 1, 1, 3, 9, 9], [1, 1, 1, 1, 5, 5, 11], [1, 1, 1, 1, 5, 7, 9], [1, 1, 1, 1, 7, 7, 7], [1, 1, 1, 3, 3, 3, 3, 3, 7], [1, 1, 1, 3, 3, 3, 3, 5, 5], [1, 1, 1, 3, 3, 3, 13], [1, 1, 1, 3, 3, 5, 11], [1, 1, 1, 3, 3, 7, 9], [1, 1, 1, 3, 5, 5, 9], [1, 1, 1, 3, 5, 7, 7], [1, 1, 1, 3, 19], [1, 1, 1, 5, 5, 5, 7], [1, 1, 1, 5, 17], [1, 1, 1, 7, 15], [1, 1, 1, 9, 13], [1, 1, 1, 11, 11], [1, 1, 3, 3, 3, 3, 3, 3, 5], [1, 1, 3, 3, 3, 3, 11], [1, 1, 3, 3, 3, 5, 9], [1, 1, 3, 3, 3, 7, 7], [1, 1, 3, 3, 5, 5, 7], [1, 1, 3, 3, 17], [1, 1, 3, 5, 5, 5, 5], [1, 1, 3, 5, 15], [1, 1, 3, 7, 13], [1, 1, 3, 9, 11], [1, 1, 5, 5, 13], [1, 1, 5, 7, 11], [1, 1, 5, 9, 9], [1, 1, 7, 7, 9], [1, 3, 3, 3, 3, 3, 3, 3, 3], [1, 3, 3, 3, 3, 3, 9], [1, 3, 3, 3, 3, 5, 7], [1, 3, 3, 3, 5, 5, 5], [1, 3, 3, 3, 15], [1, 3, 3, 5, 13], [1, 3, 3, 7, 11], [1, 3, 3, 9, 9], [1, 3, 5, 5, 11], [1, 3, 5, 7, 9], [1, 3, 7, 7, 7], [1, 5, 5, 5, 9], [1, 5, 5, 7, 7], [1, 5, 19], [1, 7, 17], [1, 9, 15], [1, 11, 13], [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, 3, 7, 9], [3, 3, 5, 5, 9], [3, 3, 5, 7, 7], [3, 3, 19], [3, 5, 5, 5, 7], [3, 5, 17], [3, 7, 15], [3, 9, 13], [3, 11, 11], [5, 5, 5, 5, 5], [5, 5, 15], [5, 7, 13], [5, 9, 11], [7, 7, 11], [7, 9, 9]]\n assert candidate(candidates = [8, 15, 7, 9, 10, 1],target = 31) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 8], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 15], [1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 9], [1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 8], [1, 1, 1, 1, 1, 1, 1, 1, 8, 15], [1, 1, 1, 1, 1, 1, 1, 7, 7, 10], [1, 1, 1, 1, 1, 1, 1, 7, 8, 9], [1, 1, 1, 1, 1, 1, 1, 8, 8, 8], [1, 1, 1, 1, 1, 1, 1, 9, 15], [1, 1, 1, 1, 1, 1, 7, 8, 10], [1, 1, 1, 1, 1, 1, 7, 9, 9], [1, 1, 1, 1, 1, 1, 8, 8, 9], [1, 1, 1, 1, 1, 1, 10, 15], [1, 1, 1, 1, 1, 7, 9, 10], [1, 1, 1, 1, 1, 8, 8, 10], [1, 1, 1, 1, 1, 8, 9, 9], [1, 1, 1, 1, 7, 10, 10], [1, 1, 1, 1, 8, 9, 10], [1, 1, 1, 1, 9, 9, 9], [1, 1, 1, 7, 7, 7, 7], [1, 1, 1, 8, 10, 10], [1, 1, 1, 9, 9, 10], [1, 1, 7, 7, 7, 8], [1, 1, 7, 7, 15], [1, 1, 9, 10, 10], [1, 7, 7, 7, 9], [1, 7, 7, 8, 8], [1, 7, 8, 15], [1, 10, 10, 10], [1, 15, 15], [7, 7, 7, 10], [7, 7, 8, 9], [7, 8, 8, 8], [7, 9, 15], [8, 8, 15]]\n assert candidate(candidates = [5, 10, 15, 20, 25],target = 50) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 10, 15], [5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 15, 15], [5, 5, 5, 10, 10, 15], [5, 5, 5, 10, 25], [5, 5, 5, 15, 20], [5, 5, 10, 10, 10, 10], [5, 5, 10, 10, 20], [5, 5, 10, 15, 15], [5, 5, 15, 25], [5, 5, 20, 20], [5, 10, 10, 10, 15], [5, 10, 10, 25], [5, 10, 15, 20], [5, 15, 15, 15], [5, 20, 25], [10, 10, 10, 10, 10], [10, 10, 10, 20], [10, 10, 15, 15], [10, 15, 25], [10, 20, 20], [15, 15, 20], [25, 25]]\n assert candidate(candidates = [7, 14, 21, 28, 35],target = 70) == [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 14], [7, 7, 7, 7, 7, 7, 7, 21], [7, 7, 7, 7, 7, 7, 14, 14], [7, 7, 7, 7, 7, 7, 28], [7, 7, 7, 7, 7, 14, 21], [7, 7, 7, 7, 7, 35], [7, 7, 7, 7, 14, 14, 14], [7, 7, 7, 7, 14, 28], [7, 7, 7, 7, 21, 21], [7, 7, 7, 14, 14, 21], [7, 7, 7, 14, 35], [7, 7, 7, 21, 28], [7, 7, 14, 14, 14, 14], [7, 7, 14, 14, 28], [7, 7, 14, 21, 21], [7, 7, 21, 35], [7, 7, 28, 28], [7, 14, 14, 14, 21], [7, 14, 14, 35], [7, 14, 21, 28], [7, 21, 21, 21], [7, 28, 35], [14, 14, 14, 14, 14], [14, 14, 14, 28], [14, 14, 21, 21], [14, 21, 35], [14, 28, 28], [21, 21, 28], [35, 35]]\n assert candidate(candidates = [6, 12, 18, 24, 30, 36],target = 60) == [[6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 12], [6, 6, 6, 6, 6, 6, 6, 18], [6, 6, 6, 6, 6, 6, 12, 12], [6, 6, 6, 6, 6, 6, 24], [6, 6, 6, 6, 6, 12, 18], [6, 6, 6, 6, 6, 30], [6, 6, 6, 6, 12, 12, 12], [6, 6, 6, 6, 12, 24], [6, 6, 6, 6, 18, 18], [6, 6, 6, 6, 36], [6, 6, 6, 12, 12, 18], [6, 6, 6, 12, 30], [6, 6, 6, 18, 24], [6, 6, 12, 12, 12, 12], [6, 6, 12, 12, 24], [6, 6, 12, 18, 18], [6, 6, 12, 36], [6, 6, 18, 30], [6, 6, 24, 24], [6, 12, 12, 12, 18], [6, 12, 12, 30], [6, 12, 18, 24], [6, 18, 18, 18], [6, 18, 36], [6, 24, 30], [12, 12, 12, 12, 12], [12, 12, 12, 24], [12, 12, 18, 18], [12, 12, 36], [12, 18, 30], [12, 24, 24], [18, 18, 24], [24, 36], [30, 30]]\n assert candidate(candidates = [29, 23, 17, 11, 5, 3, 1],target = 47) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 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, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 17], [1, 1, 1, 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, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5], [1, 1, 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, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 11], [1, 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, 17], [1, 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, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11, 11], [1, 1, 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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 11, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 17, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 29], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 23], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 11, 17], [1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 11, 11, 11], [1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 29], [1, 1, 1, 1, 1, 1, 1, 1, 5, 11, 23], [1, 1, 1, 1, 1, 1, 1, 1, 5, 17, 17], [1, 1, 1, 1, 1, 1, 1, 1, 11, 11, 17], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 17], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 11, 11], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 23], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 11, 17], [1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 29], [1, 1, 1, 1, 1, 1, 1, 3, 3, 11, 23], [1, 1, 1, 1, 1, 1, 1, 3, 3, 17, 17], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 11, 29], [1, 1, 1, 1, 1, 1, 1, 17, 23], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 17], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 23], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 11], [1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 29], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 5, 17], [1, 1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 11, 11], [1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 3, 5, 5, 5, 23], [1, 1, 1, 1, 1, 1, 3, 5, 5, 11, 17], [1, 1, 1, 1, 1, 1, 3, 5, 11, 11, 11], [1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 5, 11], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 5, 17], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 11, 11], [1, 1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 3, 3, 3, 5, 5, 23], [1, 1, 1, 1, 1, 3, 3, 3, 5, 11, 17], [1, 1, 1, 1, 1, 3, 3, 3, 11, 11, 11], [1, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 5, 11], [1, 1, 1, 1, 1, 3, 5, 5, 29], [1, 1, 1, 1, 1, 3, 5, 11, 23], [1, 1, 1, 1, 1, 3, 5, 17, 17], [1, 1, 1, 1, 1, 3, 11, 11, 17], [1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 17], [1, 1, 1, 1, 1, 5, 5, 5, 5, 11, 11], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 5, 17], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 11, 11], [1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [1, 1, 1, 1, 3, 3, 3, 3, 3, 5, 23], [1, 1, 1, 1, 3, 3, 3, 3, 3, 11, 17], [1, 1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 5, 11], [1, 1, 1, 1, 3, 3, 3, 5, 29], [1, 1, 1, 1, 3, 3, 3, 11, 23], [1, 1, 1, 1, 3, 3, 3, 17, 17], [1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 17], [1, 1, 1, 1, 3, 3, 5, 5, 5, 11, 11], [1, 1, 1, 1, 3, 5, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 1, 3, 11, 29], [1, 1, 1, 1, 3, 17, 23], [1, 1, 1, 1, 5, 5, 5, 5, 23], [1, 1, 1, 1, 5, 5, 5, 11, 17], [1, 1, 1, 1, 5, 5, 11, 11, 11], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 23], [1, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [1, 1, 1, 3, 3, 3, 3, 3, 29], [1, 1, 1, 3, 3, 3, 3, 5, 5, 5, 17], [1, 1, 1, 3, 3, 3, 3, 5, 5, 11, 11], [1, 1, 1, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [1, 1, 1, 3, 3, 5, 5, 5, 23], [1, 1, 1, 3, 3, 5, 5, 11, 17], [1, 1, 1, 3, 3, 5, 11, 11, 11], [1, 1, 1, 3, 5, 5, 5, 5, 5, 5, 11], [1, 1, 1, 5, 5, 5, 29], [1, 1, 1, 5, 5, 11, 23], [1, 1, 1, 5, 5, 17, 17], [1, 1, 1, 5, 11, 11, 17], [1, 1, 1, 11, 11, 11, 11], [1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 11], [1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 17], [1, 1, 3, 3, 3, 3, 3, 3, 5, 11, 11], [1, 1, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5], [1, 1, 3, 3, 3, 3, 5, 5, 23], [1, 1, 3, 3, 3, 3, 5, 11, 17], [1, 1, 3, 3, 3, 3, 11, 11, 11], [1, 1, 3, 3, 3, 5, 5, 5, 5, 5, 11], [1, 1, 3, 3, 5, 5, 29], [1, 1, 3, 3, 5, 11, 23], [1, 1, 3, 3, 5, 17, 17], [1, 1, 3, 3, 11, 11, 17], [1, 1, 3, 5, 5, 5, 5, 5, 17], [1, 1, 3, 5, 5, 5, 5, 11, 11], [1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5], [1, 1, 5, 11, 29], [1, 1, 5, 17, 23], [1, 1, 11, 11, 23], [1, 1, 11, 17, 17], [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 17], [1, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11], [1, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [1, 3, 3, 3, 3, 3, 3, 5, 23], [1, 3, 3, 3, 3, 3, 3, 11, 17], [1, 3, 3, 3, 3, 3, 5, 5, 5, 5, 11], [1, 3, 3, 3, 3, 5, 29], [1, 3, 3, 3, 3, 11, 23], [1, 3, 3, 3, 3, 17, 17], [1, 3, 3, 3, 5, 5, 5, 5, 17], [1, 3, 3, 3, 5, 5, 5, 11, 11], [1, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5], [1, 3, 3, 11, 29], [1, 3, 3, 17, 23], [1, 3, 5, 5, 5, 5, 23], [1, 3, 5, 5, 5, 11, 17], [1, 3, 5, 5, 11, 11, 11], [1, 5, 5, 5, 5, 5, 5, 5, 11], [1, 17, 29], [1, 23, 23], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 3, 3, 3, 3, 3, 23], [3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [3, 3, 3, 3, 3, 3, 29], [3, 3, 3, 3, 3, 5, 5, 5, 17], [3, 3, 3, 3, 3, 5, 5, 11, 11], [3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [3, 3, 3, 5, 5, 5, 23], [3, 3, 3, 5, 5, 11, 17], [3, 3, 3, 5, 11, 11, 11], [3, 3, 5, 5, 5, 5, 5, 5, 11], [3, 5, 5, 5, 29], [3, 5, 5, 11, 23], [3, 5, 5, 17, 17], [3, 5, 11, 11, 17], [3, 11, 11, 11, 11], [5, 5, 5, 5, 5, 5, 17], [5, 5, 5, 5, 5, 11, 11]]\n assert candidate(candidates = [5, 10, 15, 20, 25],target = 50) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 10, 15], [5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 15, 15], [5, 5, 5, 10, 10, 15], [5, 5, 5, 10, 25], [5, 5, 5, 15, 20], [5, 5, 10, 10, 10, 10], [5, 5, 10, 10, 20], [5, 5, 10, 15, 15], [5, 5, 15, 25], [5, 5, 20, 20], [5, 10, 10, 10, 15], [5, 10, 10, 25], [5, 10, 15, 20], [5, 15, 15, 15], [5, 20, 25], [10, 10, 10, 10, 10], [10, 10, 10, 20], [10, 10, 15, 15], [10, 15, 25], [10, 20, 20], [15, 15, 20], [25, 25]]\n assert candidate(candidates = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 150) == [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 30], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 40], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 30], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 50], [10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20], [10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 40], [10, 10, 10, 10, 10, 10, 10, 10, 10, 30, 30], [10, 10, 10, 10, 10, 10, 10, 10, 10, 60], [10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 30], [10, 10, 10, 10, 10, 10, 10, 10, 20, 50], [10, 10, 10, 10, 10, 10, 10, 10, 30, 40], [10, 10, 10, 10, 10, 10, 10, 10, 70], [10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20], [10, 10, 10, 10, 10, 10, 10, 20, 20, 40], [10, 10, 10, 10, 10, 10, 10, 20, 30, 30], [10, 10, 10, 10, 10, 10, 10, 20, 60], [10, 10, 10, 10, 10, 10, 10, 30, 50], [10, 10, 10, 10, 10, 10, 10, 40, 40], [10, 10, 10, 10, 10, 10, 10, 80], [10, 10, 10, 10, 10, 10, 20, 20, 20, 30], [10, 10, 10, 10, 10, 10, 20, 20, 50], [10, 10, 10, 10, 10, 10, 20, 30, 40], [10, 10, 10, 10, 10, 10, 20, 70], [10, 10, 10, 10, 10, 10, 30, 30, 30], [10, 10, 10, 10, 10, 10, 30, 60], [10, 10, 10, 10, 10, 10, 40, 50], [10, 10, 10, 10, 10, 10, 90], [10, 10, 10, 10, 10, 20, 20, 20, 20, 20], [10, 10, 10, 10, 10, 20, 20, 20, 40], [10, 10, 10, 10, 10, 20, 20, 30, 30], [10, 10, 10, 10, 10, 20, 20, 60], [10, 10, 10, 10, 10, 20, 30, 50], [10, 10, 10, 10, 10, 20, 40, 40], [10, 10, 10, 10, 10, 20, 80], [10, 10, 10, 10, 10, 30, 30, 40], [10, 10, 10, 10, 10, 30, 70], [10, 10, 10, 10, 10, 40, 60], [10, 10, 10, 10, 10, 50, 50], [10, 10, 10, 10, 10, 100], [10, 10, 10, 10, 20, 20, 20, 20, 30], [10, 10, 10, 10, 20, 20, 20, 50], [10, 10, 10, 10, 20, 20, 30, 40], [10, 10, 10, 10, 20, 20, 70], [10, 10, 10, 10, 20, 30, 30, 30], [10, 10, 10, 10, 20, 30, 60], [10, 10, 10, 10, 20, 40, 50], [10, 10, 10, 10, 20, 90], [10, 10, 10, 10, 30, 30, 50], [10, 10, 10, 10, 30, 40, 40], [10, 10, 10, 10, 30, 80], [10, 10, 10, 10, 40, 70], [10, 10, 10, 10, 50, 60], [10, 10, 10, 20, 20, 20, 20, 20, 20], [10, 10, 10, 20, 20, 20, 20, 40], [10, 10, 10, 20, 20, 20, 30, 30], [10, 10, 10, 20, 20, 20, 60], [10, 10, 10, 20, 20, 30, 50], [10, 10, 10, 20, 20, 40, 40], [10, 10, 10, 20, 20, 80], [10, 10, 10, 20, 30, 30, 40], [10, 10, 10, 20, 30, 70], [10, 10, 10, 20, 40, 60], [10, 10, 10, 20, 50, 50], [10, 10, 10, 20, 100], [10, 10, 10, 30, 30, 30, 30], [10, 10, 10, 30, 30, 60], [10, 10, 10, 30, 40, 50], [10, 10, 10, 30, 90], [10, 10, 10, 40, 40, 40], [10, 10, 10, 40, 80], [10, 10, 10, 50, 70], [10, 10, 10, 60, 60], [10, 10, 20, 20, 20, 20, 20, 30], [10, 10, 20, 20, 20, 20, 50], [10, 10, 20, 20, 20, 30, 40], [10, 10, 20, 20, 20, 70], [10, 10, 20, 20, 30, 30, 30], [10, 10, 20, 20, 30, 60], [10, 10, 20, 20, 40, 50], [10, 10, 20, 20, 90], [10, 10, 20, 30, 30, 50], [10, 10, 20, 30, 40, 40], [10, 10, 20, 30, 80], [10, 10, 20, 40, 70], [10, 10, 20, 50, 60], [10, 10, 30, 30, 30, 40], [10, 10, 30, 30, 70], [10, 10, 30, 40, 60], [10, 10, 30, 50, 50], [10, 10, 30, 100], [10, 10, 40, 40, 50], [10, 10, 40, 90], [10, 10, 50, 80], [10, 10, 60, 70], [10, 20, 20, 20, 20, 20, 20, 20], [10, 20, 20, 20, 20, 20, 40], [10, 20, 20, 20, 20, 30, 30], [10, 20, 20, 20, 20, 60], [10, 20, 20, 20, 30, 50], [10, 20, 20, 20, 40, 40], [10, 20, 20, 20, 80], [10, 20, 20, 30, 30, 40], [10, 20, 20, 30, 70], [10, 20, 20, 40, 60], [10, 20, 20, 50, 50], [10, 20, 20, 100], [10, 20, 30, 30, 30, 30], [10, 20, 30, 30, 60], [10, 20, 30, 40, 50], [10, 20, 30, 90], [10, 20, 40, 40, 40], [10, 20, 40, 80], [10, 20, 50, 70], [10, 20, 60, 60], [10, 30, 30, 30, 50], [10, 30, 30, 40, 40], [10, 30, 30, 80], [10, 30, 40, 70], [10, 30, 50, 60], [10, 40, 40, 60], [10, 40, 50, 50], [10, 40, 100], [10, 50, 90], [10, 60, 80], [10, 70, 70], [20, 20, 20, 20, 20, 20, 30], [20, 20, 20, 20, 20, 50], [20, 20, 20, 20, 30, 40], [20, 20, 20, 20, 70], [20, 20, 20, 30, 30, 30], [20, 20, 20, 30, 60], [20, 20, 20, 40, 50], [20, 20, 20, 90], [20, 20, 30, 30, 50], [20, 20, 30, 40, 40], [20, 20, 30, 80], [20, 20, 40, 70], [20, 20, 50, 60], [20, 30, 30, 30, 40], [20, 30, 30, 70], [20, 30, 40, 60], [20, 30, 50, 50], [20, 30, 100], [20, 40, 40, 50], [20, 40, 90], [20, 50, 80], [20, 60, 70], [30, 30, 30, 30, 30], [30, 30, 30, 60], [30, 30, 40, 50], [30, 30, 90], [30, 40, 40, 40], [30, 40, 80], [30, 50, 70], [30, 60, 60], [40, 40, 70], [40, 50, 60], [50, 50, 50], [50, 100], [60, 90], [70, 80]]\n assert 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 candidate(candidates = [8, 16, 32, 64, 128],target = 255) == []\n assert candidate(candidates = [3, 7, 11, 13, 17, 19, 23, 29],target = 50) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 23], [3, 3, 3, 3, 3, 3, 3, 3, 7, 19], [3, 3, 3, 3, 3, 3, 3, 3, 13, 13], [3, 3, 3, 3, 3, 3, 3, 7, 11, 11], [3, 3, 3, 3, 3, 3, 3, 29], [3, 3, 3, 3, 3, 3, 7, 7, 7, 11], [3, 3, 3, 3, 3, 3, 13, 19], [3, 3, 3, 3, 3, 7, 7, 7, 7, 7], [3, 3, 3, 3, 3, 7, 11, 17], [3, 3, 3, 3, 3, 11, 11, 13], [3, 3, 3, 3, 7, 7, 7, 17], [3, 3, 3, 3, 7, 7, 11, 13], [3, 3, 3, 3, 19, 19], [3, 3, 3, 7, 7, 7, 7, 13], [3, 3, 3, 7, 11, 23], [3, 3, 3, 7, 17, 17], [3, 3, 3, 11, 11, 19], [3, 3, 3, 11, 13, 17], [3, 3, 7, 7, 7, 23], [3, 3, 7, 7, 11, 19], [3, 3, 7, 7, 13, 17], [3, 3, 7, 11, 13, 13], [3, 3, 11, 11, 11, 11], [3, 7, 7, 7, 7, 19], [3, 7, 7, 7, 13, 13], [3, 7, 7, 11, 11, 11], [3, 7, 11, 29], [3, 7, 17, 23], [3, 11, 13, 23], [3, 11, 17, 19], [3, 13, 17, 17], [7, 7, 7, 7, 11, 11], [7, 7, 7, 29], [7, 7, 13, 23], [7, 7, 17, 19], [7, 11, 13, 19], [7, 13, 13, 17], [11, 11, 11, 17], [11, 13, 13, 13]]\n assert candidate(candidates = [11, 13, 17, 19, 23, 29],target = 50) == [[11, 11, 11, 17], [11, 13, 13, 13]]\n assert candidate(candidates = [2, 5, 10, 20, 50],target = 50) == [[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, 5, 5], [2, 2, 2, 2, 2, 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, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 20], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10, 10], [2, 2, 2, 2, 2, 5, 5, 5, 5, 20], [2, 2, 2, 2, 2, 5, 5, 10, 10, 10], [2, 2, 2, 2, 2, 5, 5, 10, 20], [2, 2, 2, 2, 2, 10, 10, 10, 10], [2, 2, 2, 2, 2, 10, 10, 20], [2, 2, 2, 2, 2, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 10, 20], [5, 5, 10, 10, 10, 10], [5, 5, 10, 10, 20], [5, 5, 20, 20], [10, 10, 10, 10, 10], [10, 10, 10, 20], [10, 20, 20], [50]]\n assert candidate(candidates = [3, 5, 7, 11, 13, 17, 19, 23],target = 50) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 23], [3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 7, 19], [3, 3, 3, 3, 3, 3, 3, 3, 13, 13], [3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 7], [3, 3, 3, 3, 3, 3, 3, 5, 5, 19], [3, 3, 3, 3, 3, 3, 3, 5, 7, 17], [3, 3, 3, 3, 3, 3, 3, 5, 11, 13], [3, 3, 3, 3, 3, 3, 3, 7, 11, 11], [3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7], [3, 3, 3, 3, 3, 3, 5, 5, 5, 17], [3, 3, 3, 3, 3, 3, 5, 5, 11, 11], [3, 3, 3, 3, 3, 3, 5, 7, 7, 13], [3, 3, 3, 3, 3, 3, 7, 7, 7, 11], [3, 3, 3, 3, 3, 3, 13, 19], [3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [3, 3, 3, 3, 3, 5, 5, 5, 7, 13], [3, 3, 3, 3, 3, 5, 5, 7, 7, 11], [3, 3, 3, 3, 3, 5, 7, 23], [3, 3, 3, 3, 3, 5, 11, 19], [3, 3, 3, 3, 3, 5, 13, 17], [3, 3, 3, 3, 3, 7, 7, 7, 7, 7], [3, 3, 3, 3, 3, 7, 11, 17], [3, 3, 3, 3, 3, 11, 11, 13], [3, 3, 3, 3, 5, 5, 5, 5, 5, 13], [3, 3, 3, 3, 5, 5, 5, 5, 7, 11], [3, 3, 3, 3, 5, 5, 5, 23], [3, 3, 3, 3, 5, 5, 7, 7, 7, 7], [3, 3, 3, 3, 5, 5, 11, 17], [3, 3, 3, 3, 5, 7, 7, 19], [3, 3, 3, 3, 5, 7, 13, 13], [3, 3, 3, 3, 5, 11, 11, 11], [3, 3, 3, 3, 7, 7, 7, 17], [3, 3, 3, 3, 7, 7, 11, 13], [3, 3, 3, 3, 19, 19], [3, 3, 3, 5, 5, 5, 5, 5, 5, 11], [3, 3, 3, 5, 5, 5, 5, 7, 7, 7], [3, 3, 3, 5, 5, 5, 7, 19], [3, 3, 3, 5, 5, 5, 13, 13], [3, 3, 3, 5, 5, 7, 7, 17], [3, 3, 3, 5, 5, 7, 11, 13], [3, 3, 3, 5, 7, 7, 11, 11], [3, 3, 3, 5, 13, 23], [3, 3, 3, 5, 17, 19], [3, 3, 3, 7, 7, 7, 7, 13], [3, 3, 3, 7, 11, 23], [3, 3, 3, 7, 17, 17], [3, 3, 3, 11, 11, 19], [3, 3, 3, 11, 13, 17], [3, 3, 5, 5, 5, 5, 5, 5, 7, 7], [3, 3, 5, 5, 5, 5, 5, 19], [3, 3, 5, 5, 5, 5, 7, 17], [3, 3, 5, 5, 5, 5, 11, 13], [3, 3, 5, 5, 5, 7, 11, 11], [3, 3, 5, 5, 7, 7, 7, 13], [3, 3, 5, 5, 11, 23], [3, 3, 5, 5, 17, 17], [3, 3, 5, 7, 7, 7, 7, 11], [3, 3, 5, 7, 13, 19], [3, 3, 5, 11, 11, 17], [3, 3, 5, 13, 13, 13], [3, 3, 7, 7, 7, 23], [3, 3, 7, 7, 11, 19], [3, 3, 7, 7, 13, 17], [3, 3, 7, 11, 13, 13], [3, 3, 11, 11, 11, 11], [3, 5, 5, 5, 5, 5, 5, 5, 5, 7], [3, 5, 5, 5, 5, 5, 5, 17], [3, 5, 5, 5, 5, 5, 11, 11], [3, 5, 5, 5, 5, 7, 7, 13], [3, 5, 5, 5, 7, 7, 7, 11], [3, 5, 5, 5, 13, 19], [3, 5, 5, 7, 7, 23], [3, 5, 5, 7, 11, 19], [3, 5, 5, 7, 13, 17], [3, 5, 5, 11, 13, 13], [3, 5, 7, 7, 7, 7, 7, 7], [3, 5, 7, 7, 11, 17], [3, 5, 7, 11, 11, 13], [3, 5, 19, 23], [3, 7, 7, 7, 7, 19], [3, 7, 7, 7, 13, 13], [3, 7, 7, 11, 11, 11], [3, 7, 17, 23], [3, 11, 13, 23], [3, 11, 17, 19], [3, 13, 17, 17], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 7, 13], [5, 5, 5, 5, 5, 7, 7, 11], [5, 5, 5, 5, 7, 23], [5, 5, 5, 5, 11, 19], [5, 5, 5, 5, 13, 17], [5, 5, 5, 7, 7, 7, 7, 7], [5, 5, 5, 7, 11, 17], [5, 5, 5, 11, 11, 13], [5, 5, 7, 7, 7, 19], [5, 5, 7, 7, 13, 13], [5, 5, 7, 11, 11, 11], [5, 5, 17, 23], [5, 7, 7, 7, 7, 17], [5, 7, 7, 7, 11, 13], [5, 7, 19, 19], [5, 11, 11, 23], [5, 11, 17, 17], [5, 13, 13, 19], [7, 7, 7, 7, 11, 11], [7, 7, 13, 23], [7, 7, 17, 19], [7, 11, 13, 19], [7, 13, 13, 17], [11, 11, 11, 17], [11, 13, 13, 13]]\n assert candidate(candidates = [11, 22, 33, 44, 55, 66, 77, 88, 99],target = 198) == [[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 55], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 22], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 66], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 55], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 77], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 22], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 33, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 66], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 55], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 44, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 88], [11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 55], [11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 33, 44], [11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 77], [11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 33, 33], [11, 11, 11, 11, 11, 11, 11, 11, 11, 33, 66], [11, 11, 11, 11, 11, 11, 11, 11, 11, 44, 55], [11, 11, 11, 11, 11, 11, 11, 11, 11, 99], [11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 22, 22], [11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 44], [11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 33, 33], [11, 11, 11, 11, 11, 11, 11, 11, 22, 22, 66], [11, 11, 11, 11, 11, 11, 11, 11, 22, 33, 55], [11, 11, 11, 11, 11, 11, 11, 11, 22, 44, 44], [11, 11, 11, 11, 11, 11, 11, 11, 22, 88], [11, 11, 11, 11, 11, 11, 11, 11, 33, 33, 44], [11, 11, 11, 11, 11, 11, 11, 11, 33, 77], [11, 11, 11, 11, 11, 11, 11, 11, 44, 66], [11, 11, 11, 11, 11, 11, 11, 11, 55, 55], [11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 22, 33], [11, 11, 11, 11, 11, 11, 11, 22, 22, 22, 55], [11, 11, 11, 11, 11, 11, 11, 22, 22, 33, 44], [11, 11, 11, 11, 11, 11, 11, 22, 22, 77], [11, 11, 11, 11, 11, 11, 11, 22, 33, 33, 33], [11, 11, 11, 11, 11, 11, 11, 22, 33, 66], [11, 11, 11, 11, 11, 11, 11, 22, 44, 55], [11, 11, 11, 11, 11, 11, 11, 22, 99], [11, 11, 11, 11, 11, 11, 11, 33, 33, 55], [11, 11, 11, 11, 11, 11, 11, 33, 44, 44], [11, 11, 11, 11, 11, 11, 11, 33, 88], [11, 11, 11, 11, 11, 11, 11, 44, 77], [11, 11, 11, 11, 11, 11, 11, 55, 66], [11, 11, 11, 11, 11, 11, 22, 22, 22, 22, 22, 22], [11, 11, 11, 11, 11, 11, 22, 22, 22, 22, 44], [11, 11, 11, 11, 11, 11, 22, 22, 22, 33, 33], [11, 11, 11, 11, 11, 11, 22, 22, 22, 66], [11, 11, 11, 11, 11, 11, 22, 22, 33, 55], [11, 11, 11, 11, 11, 11, 22, 22, 44, 44], [11, 11, 11, 11, 11, 11, 22, 22, 88], [11, 11, 11, 11, 11, 11, 22, 33, 33, 44], [11, 11, 11, 11, 11, 11, 22, 33, 77], [11, 11, 11, 11, 11, 11, 22, 44, 66], [11, 11, 11, 11, 11, 11, 22, 55, 55], [11, 11, 11, 11, 11, 11, 33, 33, 33, 33], [11, 11, 11, 11, 11, 11, 33, 33, 66], [11, 11, 11, 11, 11, 11, 33, 44, 55], [11, 11, 11, 11, 11, 11, 33, 99], [11, 11, 11, 11, 11, 11, 44, 44, 44], [11, 11, 11, 11, 11, 11, 44, 88], [11, 11, 11, 11, 11, 11, 55, 77], [11, 11, 11, 11, 11, 11, 66, 66], [11, 11, 11, 11, 11, 22, 22, 22, 22, 22, 33], [11, 11, 11, 11, 11, 22, 22, 22, 22, 55], [11, 11, 11, 11, 11, 22, 22, 22, 33, 44], [11, 11, 11, 11, 11, 22, 22, 22, 77], [11, 11, 11, 11, 11, 22, 22, 33, 33, 33], [11, 11, 11, 11, 11, 22, 22, 33, 66], [11, 11, 11, 11, 11, 22, 22, 44, 55], [11, 11, 11, 11, 11, 22, 22, 99], [11, 11, 11, 11, 11, 22, 33, 33, 55], [11, 11, 11, 11, 11, 22, 33, 44, 44], [11, 11, 11, 11, 11, 22, 33, 88], [11, 11, 11, 11, 11, 22, 44, 77], [11, 11, 11, 11, 11, 22, 55, 66], [11, 11, 11, 11, 11, 33, 33, 33, 44], [11, 11, 11, 11, 11, 33, 33, 77], [11, 11, 11, 11, 11, 33, 44, 66], [11, 11, 11, 11, 11, 33, 55, 55], [11, 11, 11, 11, 11, 44, 44, 55], [11, 11, 11, 11, 11, 44, 99], [11, 11, 11, 11, 11, 55, 88], [11, 11, 11, 11, 11, 66, 77], [11, 11, 11, 11, 22, 22, 22, 22, 22, 22, 22], [11, 11, 11, 11, 22, 22, 22, 22, 22, 44], [11, 11, 11, 11, 22, 22, 22, 22, 33, 33], [11, 11, 11, 11, 22, 22, 22, 22, 66], [11, 11, 11, 11, 22, 22, 22, 33, 55], [11, 11, 11, 11, 22, 22, 22, 44, 44], [11, 11, 11, 11, 22, 22, 22, 88], [11, 11, 11, 11, 22, 22, 33, 33, 44], [11, 11, 11, 11, 22, 22, 33, 77], [11, 11, 11, 11, 22, 22, 44, 66], [11, 11, 11, 11, 22, 22, 55, 55], [11, 11, 11, 11, 22, 33, 33, 33, 33], [11, 11, 11, 11, 22, 33, 33, 66], [11, 11, 11, 11, 22, 33, 44, 55], [11, 11, 11, 11, 22, 33, 99], [11, 11, 11, 11, 22, 44, 44, 44], [11, 11, 11, 11, 22, 44, 88], [11, 11, 11, 11, 22, 55, 77], [11, 11, 11, 11, 22, 66, 66], [11, 11, 11, 11, 33, 33, 33, 55], [11, 11, 11, 11, 33, 33, 44, 44], [11, 11, 11, 11, 33, 33, 88], [11, 11, 11, 11, 33, 44, 77], [11, 11, 11, 11, 33, 55, 66], [11, 11, 11, 11, 44, 44, 66], [11, 11, 11, 11, 44, 55, 55], [11, 11, 11, 11, 55, 99], [11, 11, 11, 11, 66, 88], [11, 11, 11, 11, 77, 77], [11, 11, 11, 22, 22, 22, 22, 22, 22, 33], [11, 11, 11, 22, 22, 22, 22, 22, 55], [11, 11, 11, 22, 22, 22, 22, 33, 44], [11, 11, 11, 22, 22, 22, 22, 77], [11, 11, 11, 22, 22, 22, 33, 33, 33], [11, 11, 11, 22, 22, 22, 33, 66], [11, 11, 11, 22, 22, 22, 44, 55], [11, 11, 11, 22, 22, 22, 99], [11, 11, 11, 22, 22, 33, 33, 55], [11, 11, 11, 22, 22, 33, 44, 44], [11, 11, 11, 22, 22, 33, 88], [11, 11, 11, 22, 22, 44, 77], [11, 11, 11, 22, 22, 55, 66], [11, 11, 11, 22, 33, 33, 33, 44], [11, 11, 11, 22, 33, 33, 77], [11, 11, 11, 22, 33, 44, 66], [11, 11, 11, 22, 33, 55, 55], [11, 11, 11, 22, 44, 44, 55], [11, 11, 11, 22, 44, 99], [11, 11, 11, 22, 55, 88], [11, 11, 11, 22, 66, 77], [11, 11, 11, 33, 33, 33, 33, 33], [11, 11, 11, 33, 33, 33, 66], [11, 11, 11, 33, 33, 44, 55], [11, 11, 11, 33, 33, 99], [11, 11, 11, 33, 44, 44, 44], [11, 11, 11, 33, 44, 88], [11, 11, 11, 33, 55, 77], [11, 11, 11, 33, 66, 66], [11, 11, 11, 44, 44, 77], [11, 11, 11, 44, 55, 66], [11, 11, 11, 55, 55, 55], [11, 11, 11, 66, 99], [11, 11, 11, 77, 88], [11, 11, 22, 22, 22, 22, 22, 22, 22, 22], [11, 11, 22, 22, 22, 22, 22, 22, 44], [11, 11, 22, 22, 22, 22, 22, 33, 33], [11, 11, 22, 22, 22, 22, 22, 66], [11, 11, 22, 22, 22, 22, 33, 55], [11, 11, 22, 22, 22, 22, 44, 44], [11, 11, 22, 22, 22, 22, 88], [11, 11, 22, 22, 22, 33, 33, 44], [11, 11, 22, 22, 22, 33, 77], [11, 11, 22, 22, 22, 44, 66], [11, 11, 22, 22, 22, 55, 55], [11, 11, 22, 22, 33, 33, 33, 33], [11, 11, 22, 22, 33, 33, 66], [11, 11, 22, 22, 33, 44, 55], [11, 11, 22, 22, 33, 99], [11, 11, 22, 22, 44, 44, 44], [11, 11, 22, 22, 44, 88], [11, 11, 22, 22, 55, 77], [11, 11, 22, 22, 66, 66], [11, 11, 22, 33, 33, 33, 55], [11, 11, 22, 33, 33, 44, 44], [11, 11, 22, 33, 33, 88], [11, 11, 22, 33, 44, 77], [11, 11, 22, 33, 55, 66], [11, 11, 22, 44, 44, 66], [11, 11, 22, 44, 55, 55], [11, 11, 22, 55, 99], [11, 11, 22, 66, 88], [11, 11, 22, 77, 77], [11, 11, 33, 33, 33, 33, 44], [11, 11, 33, 33, 33, 77], [11, 11, 33, 33, 44, 66], [11, 11, 33, 33, 55, 55], [11, 11, 33, 44, 44, 55], [11, 11, 33, 44, 99], [11, 11, 33, 55, 88], [11, 11, 33, 66, 77], [11, 11, 44, 44, 44, 44], [11, 11, 44, 44, 88], [11, 11, 44, 55, 77], [11, 11, 44, 66, 66], [11, 11, 55, 55, 66], [11, 11, 77, 99], [11, 11, 88, 88], [11, 22, 22, 22, 22, 22, 22, 22, 33], [11, 22, 22, 22, 22, 22, 22, 55], [11, 22, 22, 22, 22, 22, 33, 44], [11, 22, 22, 22, 22, 22, 77], [11, 22, 22, 22, 22, 33, 33, 33], [11, 22, 22, 22, 22, 33, 66], [11, 22, 22, 22, 22, 44, 55], [11, 22, 22, 22, 22, 99], [11, 22, 22, 22, 33, 33, 55], [11, 22, 22, 22, 33, 44, 44], [11, 22, 22, 22, 33, 88], [11, 22, 22, 22, 44, 77], [11, 22, 22, 22, 55, 66], [11, 22, 22, 33, 33, 33, 44], [11, 22, 22, 33, 33, 77], [11, 22, 22, 33, 44, 66], [11, 22, 22, 33, 55, 55], [11, 22, 22, 44, 44, 55], [11, 22, 22, 44, 99], [11, 22, 22, 55, 88], [11, 22, 22, 66, 77], [11, 22, 33, 33, 33, 33, 33], [11, 22, 33, 33, 33, 66], [11, 22, 33, 33, 44, 55], [11, 22, 33, 33, 99], [11, 22, 33, 44, 44, 44], [11, 22, 33, 44, 88], [11, 22, 33, 55, 77], [11, 22, 33, 66, 66], [11, 22, 44, 44, 77], [11, 22, 44, 55, 66], [11, 22, 55, 55, 55], [11, 22, 66, 99], [11, 22, 77, 88], [11, 33, 33, 33, 33, 55], [11, 33, 33, 33, 44, 44], [11, 33, 33, 33, 88], [11, 33, 33, 44, 77], [11, 33, 33, 55, 66], [11, 33, 44, 44, 66], [11, 33, 44, 55, 55], [11, 33, 55, 99], [11, 33, 66, 88], [11, 33, 77, 77], [11, 44, 44, 44, 55], [11, 44, 44, 99], [11, 44, 55, 88], [11, 44, 66, 77], [11, 55, 55, 77], [11, 55, 66, 66], [11, 88, 99], [22, 22, 22, 22, 22, 22, 22, 22, 22], [22, 22, 22, 22, 22, 22, 22, 44], [22, 22, 22, 22, 22, 22, 33, 33], [22, 22, 22, 22, 22, 22, 66], [22, 22, 22, 22, 22, 33, 55], [22, 22, 22, 22, 22, 44, 44], [22, 22, 22, 22, 22, 88], [22, 22, 22, 22, 33, 33, 44], [22, 22, 22, 22, 33, 77], [22, 22, 22, 22, 44, 66], [22, 22, 22, 22, 55, 55], [22, 22, 22, 33, 33, 33, 33], [22, 22, 22, 33, 33, 66], [22, 22, 22, 33, 44, 55], [22, 22, 22, 33, 99], [22, 22, 22, 44, 44, 44], [22, 22, 22, 44, 88], [22, 22, 22, 55, 77], [22, 22, 22, 66, 66], [22, 22, 33, 33, 33, 55], [22, 22, 33, 33, 44, 44], [22, 22, 33, 33, 88], [22, 22, 33, 44, 77], [22, 22, 33, 55, 66], [22, 22, 44, 44, 66], [22, 22, 44, 55, 55], [22, 22, 55, 99], [22, 22, 66, 88], [22, 22, 77, 77], [22, 33, 33, 33, 33, 44], [22, 33, 33, 33, 77], [22, 33, 33, 44, 66], [22, 33, 33, 55, 55], [22, 33, 44, 44, 55], [22, 33, 44, 99], [22, 33, 55, 88], [22, 33, 66, 77], [22, 44, 44, 44, 44], [22, 44, 44, 88], [22, 44, 55, 77], [22, 44, 66, 66], [22, 55, 55, 66], [22, 77, 99], [22, 88, 88], [33, 33, 33, 33, 33, 33], [33, 33, 33, 33, 66], [33, 33, 33, 44, 55], [33, 33, 33, 99], [33, 33, 44, 44, 44], [33, 33, 44, 88], [33, 33, 55, 77], [33, 33, 66, 66], [33, 44, 44, 77], [33, 44, 55, 66], [33, 55, 55, 55], [33, 66, 99], [33, 77, 88], [44, 44, 44, 66], [44, 44, 55, 55], [44, 55, 99], [44, 66, 88], [44, 77, 77], [55, 55, 88], [55, 66, 77], [66, 66, 66], [99, 99]]\n assert candidate(candidates = [13, 11, 7, 5, 2, 1],target = 30) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 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, 1, 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], [1, 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], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7], [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], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 7], [1, 1, 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, 1, 1, 1, 2, 2, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 7, 7], [1, 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, 2, 2, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 13], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 11], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 13], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 7, 11], [1, 1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 13], [1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 7], [1, 1, 1, 1, 1, 1, 1, 1, 11, 11], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 11], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 13], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 5], [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 5, 7], [1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 7, 7], [1, 1, 1, 1, 1, 1, 1, 2, 5, 5, 11], [1, 1, 1, 1, 1, 1, 1, 2, 7, 7, 7], [1, 1, 1, 1, 1, 1, 1, 5, 5, 13], [1, 1, 1, 1, 1, 1, 1, 5, 7, 11], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 5, 5], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 5, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 11], [1, 1, 1, 1, 1, 1, 2, 2, 2, 5, 13], [1, 1, 1, 1, 1, 1, 2, 2, 2, 7, 11], [1, 1, 1, 1, 1, 1, 2, 2, 5, 5, 5, 5], [1, 1, 1, 1, 1, 1, 2, 2, 7, 13], [1, 1, 1, 1, 1, 1, 2, 5, 5, 5, 7], [1, 1, 1, 1, 1, 1, 2, 11, 11], [1, 1, 1, 1, 1, 1, 5, 5, 7, 7], [1, 1, 1, 1, 1, 1, 11, 13], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 11], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 13], [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 5, 5, 5], [1, 1, 1, 1, 1, 2, 2, 2, 2, 5, 5, 7], [1, 1, 1, 1, 1, 2, 2, 2, 5, 7, 7], [1, 1, 1, 1, 1, 2, 2, 5, 5, 11], [1, 1, 1, 1, 1, 2, 2, 7, 7, 7], [1, 1, 1, 1, 1, 2, 5, 5, 13], [1, 1, 1, 1, 1, 2, 5, 7, 11], [1, 1, 1, 1, 1, 5, 5, 5, 5, 5], [1, 1, 1, 1, 1, 5, 7, 13], [1, 1, 1, 1, 1, 7, 7, 11], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 5, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 7, 7], [1, 1, 1, 1, 2, 2, 2, 2, 2, 5, 11], [1, 1, 1, 1, 2, 2, 2, 2, 5, 13], [1, 1, 1, 1, 2, 2, 2, 2, 7, 11], [1, 1, 1, 1, 2, 2, 2, 5, 5, 5, 5], [1, 1, 1, 1, 2, 2, 2, 7, 13], [1, 1, 1, 1, 2, 2, 5, 5, 5, 7], [1, 1, 1, 1, 2, 2, 11, 11], [1, 1, 1, 1, 2, 5, 5, 7, 7], [1, 1, 1, 1, 2, 11, 13], [1, 1, 1, 1, 5, 5, 5, 11], [1, 1, 1, 1, 5, 7, 7, 7], [1, 1, 1, 1, 13, 13], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 11], [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 13], [1, 1, 1, 2, 2, 2, 2, 2, 2, 5, 5, 5], [1, 1, 1, 2, 2, 2, 2, 2, 5, 5, 7], [1, 1, 1, 2, 2, 2, 2, 5, 7, 7], [1, 1, 1, 2, 2, 2, 5, 5, 11], [1, 1, 1, 2, 2, 2, 7, 7, 7], [1, 1, 1, 2, 2, 5, 5, 13], [1, 1, 1, 2, 2, 5, 7, 11], [1, 1, 1, 2, 5, 5, 5, 5, 5], [1, 1, 1, 2, 5, 7, 13], [1, 1, 1, 2, 7, 7, 11], [1, 1, 1, 5, 5, 5, 5, 7], [1, 1, 1, 5, 11, 11], [1, 1, 1, 7, 7, 13], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7], [1, 1, 2, 2, 2, 2, 2, 2, 2, 7, 7], [1, 1, 2, 2, 2, 2, 2, 2, 5, 11], [1, 1, 2, 2, 2, 2, 2, 5, 13], [1, 1, 2, 2, 2, 2, 2, 7, 11], [1, 1, 2, 2, 2, 2, 5, 5, 5, 5], [1, 1, 2, 2, 2, 2, 7, 13], [1, 1, 2, 2, 2, 5, 5, 5, 7], [1, 1, 2, 2, 2, 11, 11], [1, 1, 2, 2, 5, 5, 7, 7], [1, 1, 2, 2, 11, 13], [1, 1, 2, 5, 5, 5, 11], [1, 1, 2, 5, 7, 7, 7], [1, 1, 2, 13, 13], [1, 1, 5, 5, 5, 13], [1, 1, 5, 5, 7, 11], [1, 1, 7, 7, 7, 7], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11], [1, 2, 2, 2, 2, 2, 2, 2, 2, 13], [1, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5], [1, 2, 2, 2, 2, 2, 2, 5, 5, 7], [1, 2, 2, 2, 2, 2, 5, 7, 7], [1, 2, 2, 2, 2, 5, 5, 11], [1, 2, 2, 2, 2, 7, 7, 7], [1, 2, 2, 2, 5, 5, 13], [1, 2, 2, 2, 5, 7, 11], [1, 2, 2, 5, 5, 5, 5, 5], [1, 2, 2, 5, 7, 13], [1, 2, 2, 7, 7, 11], [1, 2, 5, 5, 5, 5, 7], [1, 2, 5, 11, 11], [1, 2, 7, 7, 13], [1, 5, 5, 5, 7, 7], [1, 5, 11, 13], [1, 7, 11, 11], [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, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 2, 2, 5, 11], [2, 2, 2, 2, 2, 2, 5, 13], [2, 2, 2, 2, 2, 2, 7, 11], [2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 7, 13], [2, 2, 2, 2, 5, 5, 5, 7], [2, 2, 2, 2, 11, 11], [2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 11, 13], [2, 2, 5, 5, 5, 11], [2, 2, 5, 7, 7, 7], [2, 2, 13, 13], [2, 5, 5, 5, 13], [2, 5, 5, 7, 11], [2, 7, 7, 7, 7], [5, 5, 5, 5, 5, 5], [5, 5, 7, 13], [5, 7, 7, 11]]\n assert candidate(candidates = [8, 16, 24, 32, 40, 48, 56, 64],target = 100) == []\n assert 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 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 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 candidate(candidates = [11, 13, 17, 19, 23, 29, 31, 37, 41, 43],target = 97) == [[11, 11, 11, 11, 11, 11, 31], [11, 11, 11, 11, 11, 13, 29], [11, 11, 11, 11, 11, 19, 23], [11, 11, 11, 11, 13, 17, 23], [11, 11, 11, 11, 17, 17, 19], [11, 11, 11, 13, 13, 19, 19], [11, 11, 11, 13, 17, 17, 17], [11, 11, 11, 23, 41], [11, 11, 13, 13, 13, 13, 23], [11, 11, 13, 13, 13, 17, 19], [11, 11, 13, 19, 43], [11, 11, 13, 31, 31], [11, 11, 17, 17, 41], [11, 11, 17, 29, 29], [11, 11, 19, 19, 37], [11, 11, 23, 23, 29], [11, 13, 13, 13, 13, 17, 17], [11, 13, 13, 17, 43], [11, 13, 13, 19, 41], [11, 13, 13, 23, 37], [11, 13, 13, 29, 31], [11, 13, 17, 19, 37], [11, 13, 19, 23, 31], [11, 17, 17, 23, 29], [11, 17, 19, 19, 31], [11, 17, 23, 23, 23], [11, 19, 19, 19, 29], [11, 43, 43], [13, 13, 13, 13, 13, 13, 19], [13, 13, 13, 17, 41], [13, 13, 13, 29, 29], [13, 13, 17, 17, 37], [13, 13, 17, 23, 31], [13, 13, 19, 23, 29], [13, 17, 17, 19, 31], [13, 17, 19, 19, 29], [13, 19, 19, 23, 23], [13, 41, 43], [17, 17, 17, 17, 29], [17, 17, 17, 23, 23], [17, 19, 19, 19, 23], [17, 37, 43], [19, 37, 41], [23, 31, 43], [23, 37, 37], [29, 31, 37]]\n assert 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 candidate(candidates = [1],target = 20) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]\n assert 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 candidate(candidates = [10, 20, 30, 40, 50],target = 100) == [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 10, 10, 30], [10, 10, 10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 10, 10, 40], [10, 10, 10, 10, 10, 20, 30], [10, 10, 10, 10, 10, 50], [10, 10, 10, 10, 20, 20, 20], [10, 10, 10, 10, 20, 40], [10, 10, 10, 10, 30, 30], [10, 10, 10, 20, 20, 30], [10, 10, 10, 20, 50], [10, 10, 10, 30, 40], [10, 10, 20, 20, 20, 20], [10, 10, 20, 20, 40], [10, 10, 20, 30, 30], [10, 10, 30, 50], [10, 10, 40, 40], [10, 20, 20, 20, 30], [10, 20, 20, 50], [10, 20, 30, 40], [10, 30, 30, 30], [10, 40, 50], [20, 20, 20, 20, 20], [20, 20, 20, 40], [20, 20, 30, 30], [20, 30, 50], [20, 40, 40], [30, 30, 40], [50, 50]]\n assert candidate(candidates = [9, 18, 27, 36, 45],target = 81) == [[9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 9, 9, 9, 9, 9, 9, 18], [9, 9, 9, 9, 9, 9, 27], [9, 9, 9, 9, 9, 18, 18], [9, 9, 9, 9, 9, 36], [9, 9, 9, 9, 18, 27], [9, 9, 9, 9, 45], [9, 9, 9, 18, 18, 18], [9, 9, 9, 18, 36], [9, 9, 9, 27, 27], [9, 9, 18, 18, 27], [9, 9, 18, 45], [9, 9, 27, 36], [9, 18, 18, 18, 18], [9, 18, 18, 36], [9, 18, 27, 27], [9, 27, 45], [9, 36, 36], [18, 18, 18, 27], [18, 18, 45], [18, 27, 36], [27, 27, 27], [36, 45]]\n assert candidate(candidates = [1, 2, 3, 4, 5],target = 12) == [[1, 1, 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, 3], [1, 1, 1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 1, 1, 5], [1, 1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 1, 2, 5], [1, 1, 1, 1, 1, 3, 4], [1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 4], [1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 4, 4], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 5], [1, 1, 1, 2, 3, 4], [1, 1, 1, 3, 3, 3], [1, 1, 1, 4, 5], [1, 1, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 4], [1, 1, 2, 2, 3, 3], [1, 1, 2, 3, 5], [1, 1, 2, 4, 4], [1, 1, 3, 3, 4], [1, 1, 5, 5], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 5], [1, 2, 2, 3, 4], [1, 2, 3, 3, 3], [1, 2, 4, 5], [1, 3, 3, 5], [1, 3, 4, 4], [2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 4], [2, 2, 2, 3, 3], [2, 2, 3, 5], [2, 2, 4, 4], [2, 3, 3, 4], [2, 5, 5], [3, 3, 3, 3], [3, 4, 5], [4, 4, 4]]\n assert candidate(candidates = [7, 14, 21, 28, 35, 42, 49],target = 98) == [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 28], [7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 21], [7, 7, 7, 7, 7, 7, 7, 7, 7, 35], [7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14], [7, 7, 7, 7, 7, 7, 7, 7, 14, 28], [7, 7, 7, 7, 7, 7, 7, 7, 21, 21], [7, 7, 7, 7, 7, 7, 7, 7, 42], [7, 7, 7, 7, 7, 7, 7, 14, 14, 21], [7, 7, 7, 7, 7, 7, 7, 14, 35], [7, 7, 7, 7, 7, 7, 7, 21, 28], [7, 7, 7, 7, 7, 7, 7, 49], [7, 7, 7, 7, 7, 7, 14, 14, 14, 14], [7, 7, 7, 7, 7, 7, 14, 14, 28], [7, 7, 7, 7, 7, 7, 14, 21, 21], [7, 7, 7, 7, 7, 7, 14, 42], [7, 7, 7, 7, 7, 7, 21, 35], [7, 7, 7, 7, 7, 7, 28, 28], [7, 7, 7, 7, 7, 14, 14, 14, 21], [7, 7, 7, 7, 7, 14, 14, 35], [7, 7, 7, 7, 7, 14, 21, 28], [7, 7, 7, 7, 7, 14, 49], [7, 7, 7, 7, 7, 21, 21, 21], [7, 7, 7, 7, 7, 21, 42], [7, 7, 7, 7, 7, 28, 35], [7, 7, 7, 7, 14, 14, 14, 14, 14], [7, 7, 7, 7, 14, 14, 14, 28], [7, 7, 7, 7, 14, 14, 21, 21], [7, 7, 7, 7, 14, 14, 42], [7, 7, 7, 7, 14, 21, 35], [7, 7, 7, 7, 14, 28, 28], [7, 7, 7, 7, 21, 21, 28], [7, 7, 7, 7, 21, 49], [7, 7, 7, 7, 28, 42], [7, 7, 7, 7, 35, 35], [7, 7, 7, 14, 14, 14, 14, 21], [7, 7, 7, 14, 14, 14, 35], [7, 7, 7, 14, 14, 21, 28], [7, 7, 7, 14, 14, 49], [7, 7, 7, 14, 21, 21, 21], [7, 7, 7, 14, 21, 42], [7, 7, 7, 14, 28, 35], [7, 7, 7, 21, 21, 35], [7, 7, 7, 21, 28, 28], [7, 7, 7, 28, 49], [7, 7, 7, 35, 42], [7, 7, 14, 14, 14, 14, 14, 14], [7, 7, 14, 14, 14, 14, 28], [7, 7, 14, 14, 14, 21, 21], [7, 7, 14, 14, 14, 42], [7, 7, 14, 14, 21, 35], [7, 7, 14, 14, 28, 28], [7, 7, 14, 21, 21, 28], [7, 7, 14, 21, 49], [7, 7, 14, 28, 42], [7, 7, 14, 35, 35], [7, 7, 21, 21, 21, 21], [7, 7, 21, 21, 42], [7, 7, 21, 28, 35], [7, 7, 28, 28, 28], [7, 7, 35, 49], [7, 7, 42, 42], [7, 14, 14, 14, 14, 14, 21], [7, 14, 14, 14, 14, 35], [7, 14, 14, 14, 21, 28], [7, 14, 14, 14, 49], [7, 14, 14, 21, 21, 21], [7, 14, 14, 21, 42], [7, 14, 14, 28, 35], [7, 14, 21, 21, 35], [7, 14, 21, 28, 28], [7, 14, 28, 49], [7, 14, 35, 42], [7, 21, 21, 21, 28], [7, 21, 21, 49], [7, 21, 28, 42], [7, 21, 35, 35], [7, 28, 28, 35], [7, 42, 49], [14, 14, 14, 14, 14, 14, 14], [14, 14, 14, 14, 14, 28], [14, 14, 14, 14, 21, 21], [14, 14, 14, 14, 42], [14, 14, 14, 21, 35], [14, 14, 14, 28, 28], [14, 14, 21, 21, 28], [14, 14, 21, 49], [14, 14, 28, 42], [14, 14, 35, 35], [14, 21, 21, 21, 21], [14, 21, 21, 42], [14, 21, 28, 35], [14, 28, 28, 28], [14, 35, 49], [14, 42, 42], [21, 21, 21, 35], [21, 21, 28, 28], [21, 28, 49], [21, 35, 42], [28, 28, 42], [28, 35, 35], [49, 49]]\n assert candidate(candidates = [3, 5, 7, 9, 11, 13, 15, 17, 19],target = 50) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 13], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 11], [3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 9], [3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 11], [3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7, 9], [3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 7, 7], [3, 3, 3, 3, 3, 3, 3, 3, 7, 19], [3, 3, 3, 3, 3, 3, 3, 3, 9, 17], [3, 3, 3, 3, 3, 3, 3, 3, 11, 15], [3, 3, 3, 3, 3, 3, 3, 3, 13, 13], [3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 9], [3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 7], [3, 3, 3, 3, 3, 3, 3, 5, 5, 19], [3, 3, 3, 3, 3, 3, 3, 5, 7, 17], [3, 3, 3, 3, 3, 3, 3, 5, 9, 15], [3, 3, 3, 3, 3, 3, 3, 5, 11, 13], [3, 3, 3, 3, 3, 3, 3, 7, 7, 15], [3, 3, 3, 3, 3, 3, 3, 7, 9, 13], [3, 3, 3, 3, 3, 3, 3, 7, 11, 11], [3, 3, 3, 3, 3, 3, 3, 9, 9, 11], [3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7], [3, 3, 3, 3, 3, 3, 5, 5, 5, 17], [3, 3, 3, 3, 3, 3, 5, 5, 7, 15], [3, 3, 3, 3, 3, 3, 5, 5, 9, 13], [3, 3, 3, 3, 3, 3, 5, 5, 11, 11], [3, 3, 3, 3, 3, 3, 5, 7, 7, 13], [3, 3, 3, 3, 3, 3, 5, 7, 9, 11], [3, 3, 3, 3, 3, 3, 5, 9, 9, 9], [3, 3, 3, 3, 3, 3, 7, 7, 7, 11], [3, 3, 3, 3, 3, 3, 7, 7, 9, 9], [3, 3, 3, 3, 3, 3, 13, 19], [3, 3, 3, 3, 3, 3, 15, 17], [3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 5], [3, 3, 3, 3, 3, 5, 5, 5, 5, 15], [3, 3, 3, 3, 3, 5, 5, 5, 7, 13], [3, 3, 3, 3, 3, 5, 5, 5, 9, 11], [3, 3, 3, 3, 3, 5, 5, 7, 7, 11], [3, 3, 3, 3, 3, 5, 5, 7, 9, 9], [3, 3, 3, 3, 3, 5, 7, 7, 7, 9], [3, 3, 3, 3, 3, 5, 11, 19], [3, 3, 3, 3, 3, 5, 13, 17], [3, 3, 3, 3, 3, 5, 15, 15], [3, 3, 3, 3, 3, 7, 7, 7, 7, 7], [3, 3, 3, 3, 3, 7, 9, 19], [3, 3, 3, 3, 3, 7, 11, 17], [3, 3, 3, 3, 3, 7, 13, 15], [3, 3, 3, 3, 3, 9, 9, 17], [3, 3, 3, 3, 3, 9, 11, 15], [3, 3, 3, 3, 3, 9, 13, 13], [3, 3, 3, 3, 3, 11, 11, 13], [3, 3, 3, 3, 5, 5, 5, 5, 5, 13], [3, 3, 3, 3, 5, 5, 5, 5, 7, 11], [3, 3, 3, 3, 5, 5, 5, 5, 9, 9], [3, 3, 3, 3, 5, 5, 5, 7, 7, 9], [3, 3, 3, 3, 5, 5, 7, 7, 7, 7], [3, 3, 3, 3, 5, 5, 9, 19], [3, 3, 3, 3, 5, 5, 11, 17], [3, 3, 3, 3, 5, 5, 13, 15], [3, 3, 3, 3, 5, 7, 7, 19], [3, 3, 3, 3, 5, 7, 9, 17], [3, 3, 3, 3, 5, 7, 11, 15], [3, 3, 3, 3, 5, 7, 13, 13], [3, 3, 3, 3, 5, 9, 9, 15], [3, 3, 3, 3, 5, 9, 11, 13], [3, 3, 3, 3, 5, 11, 11, 11], [3, 3, 3, 3, 7, 7, 7, 17], [3, 3, 3, 3, 7, 7, 9, 15], [3, 3, 3, 3, 7, 7, 11, 13], [3, 3, 3, 3, 7, 9, 9, 13], [3, 3, 3, 3, 7, 9, 11, 11], [3, 3, 3, 3, 9, 9, 9, 11], [3, 3, 3, 3, 19, 19], [3, 3, 3, 5, 5, 5, 5, 5, 5, 11], [3, 3, 3, 5, 5, 5, 5, 5, 7, 9], [3, 3, 3, 5, 5, 5, 5, 7, 7, 7], [3, 3, 3, 5, 5, 5, 7, 19], [3, 3, 3, 5, 5, 5, 9, 17], [3, 3, 3, 5, 5, 5, 11, 15], [3, 3, 3, 5, 5, 5, 13, 13], [3, 3, 3, 5, 5, 7, 7, 17], [3, 3, 3, 5, 5, 7, 9, 15], [3, 3, 3, 5, 5, 7, 11, 13], [3, 3, 3, 5, 5, 9, 9, 13], [3, 3, 3, 5, 5, 9, 11, 11], [3, 3, 3, 5, 7, 7, 7, 15], [3, 3, 3, 5, 7, 7, 9, 13], [3, 3, 3, 5, 7, 7, 11, 11], [3, 3, 3, 5, 7, 9, 9, 11], [3, 3, 3, 5, 9, 9, 9, 9], [3, 3, 3, 5, 17, 19], [3, 3, 3, 7, 7, 7, 7, 13], [3, 3, 3, 7, 7, 7, 9, 11], [3, 3, 3, 7, 7, 9, 9, 9], [3, 3, 3, 7, 15, 19], [3, 3, 3, 7, 17, 17], [3, 3, 3, 9, 13, 19], [3, 3, 3, 9, 15, 17], [3, 3, 3, 11, 11, 19], [3, 3, 3, 11, 13, 17], [3, 3, 3, 11, 15, 15], [3, 3, 3, 13, 13, 15], [3, 3, 5, 5, 5, 5, 5, 5, 5, 9], [3, 3, 5, 5, 5, 5, 5, 5, 7, 7], [3, 3, 5, 5, 5, 5, 5, 19], [3, 3, 5, 5, 5, 5, 7, 17], [3, 3, 5, 5, 5, 5, 9, 15], [3, 3, 5, 5, 5, 5, 11, 13], [3, 3, 5, 5, 5, 7, 7, 15], [3, 3, 5, 5, 5, 7, 9, 13], [3, 3, 5, 5, 5, 7, 11, 11], [3, 3, 5, 5, 5, 9, 9, 11], [3, 3, 5, 5, 7, 7, 7, 13], [3, 3, 5, 5, 7, 7, 9, 11], [3, 3, 5, 5, 7, 9, 9, 9], [3, 3, 5, 5, 15, 19], [3, 3, 5, 5, 17, 17], [3, 3, 5, 7, 7, 7, 7, 11], [3, 3, 5, 7, 7, 7, 9, 9], [3, 3, 5, 7, 13, 19], [3, 3, 5, 7, 15, 17], [3, 3, 5, 9, 11, 19], [3, 3, 5, 9, 13, 17], [3, 3, 5, 9, 15, 15], [3, 3, 5, 11, 11, 17], [3, 3, 5, 11, 13, 15], [3, 3, 5, 13, 13, 13], [3, 3, 7, 7, 7, 7, 7, 9], [3, 3, 7, 7, 11, 19], [3, 3, 7, 7, 13, 17], [3, 3, 7, 7, 15, 15], [3, 3, 7, 9, 9, 19], [3, 3, 7, 9, 11, 17], [3, 3, 7, 9, 13, 15], [3, 3, 7, 11, 11, 15], [3, 3, 7, 11, 13, 13], [3, 3, 9, 9, 9, 17], [3, 3, 9, 9, 11, 15], [3, 3, 9, 9, 13, 13], [3, 3, 9, 11, 11, 13], [3, 3, 11, 11, 11, 11], [3, 5, 5, 5, 5, 5, 5, 5, 5, 7], [3, 5, 5, 5, 5, 5, 5, 17], [3, 5, 5, 5, 5, 5, 7, 15], [3, 5, 5, 5, 5, 5, 9, 13], [3, 5, 5, 5, 5, 5, 11, 11], [3, 5, 5, 5, 5, 7, 7, 13], [3, 5, 5, 5, 5, 7, 9, 11], [3, 5, 5, 5, 5, 9, 9, 9], [3, 5, 5, 5, 7, 7, 7, 11], [3, 5, 5, 5, 7, 7, 9, 9], [3, 5, 5, 5, 13, 19], [3, 5, 5, 5, 15, 17], [3, 5, 5, 7, 7, 7, 7, 9], [3, 5, 5, 7, 11, 19], [3, 5, 5, 7, 13, 17], [3, 5, 5, 7, 15, 15], [3, 5, 5, 9, 9, 19], [3, 5, 5, 9, 11, 17], [3, 5, 5, 9, 13, 15], [3, 5, 5, 11, 11, 15], [3, 5, 5, 11, 13, 13], [3, 5, 7, 7, 7, 7, 7, 7], [3, 5, 7, 7, 9, 19], [3, 5, 7, 7, 11, 17], [3, 5, 7, 7, 13, 15], [3, 5, 7, 9, 9, 17], [3, 5, 7, 9, 11, 15], [3, 5, 7, 9, 13, 13], [3, 5, 7, 11, 11, 13], [3, 5, 9, 9, 9, 15], [3, 5, 9, 9, 11, 13], [3, 5, 9, 11, 11, 11], [3, 7, 7, 7, 7, 19], [3, 7, 7, 7, 9, 17], [3, 7, 7, 7, 11, 15], [3, 7, 7, 7, 13, 13], [3, 7, 7, 9, 9, 15], [3, 7, 7, 9, 11, 13], [3, 7, 7, 11, 11, 11], [3, 7, 9, 9, 9, 13], [3, 7, 9, 9, 11, 11], [3, 9, 9, 9, 9, 11], [3, 9, 19, 19], [3, 11, 17, 19], [3, 13, 15, 19], [3, 13, 17, 17], [3, 15, 15, 17], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 5, 5, 7, 13], [5, 5, 5, 5, 5, 5, 9, 11], [5, 5, 5, 5, 5, 7, 7, 11], [5, 5, 5, 5, 5, 7, 9, 9], [5, 5, 5, 5, 7, 7, 7, 9], [5, 5, 5, 5, 11, 19], [5, 5, 5, 5, 13, 17], [5, 5, 5, 5, 15, 15], [5, 5, 5, 7, 7, 7, 7, 7], [5, 5, 5, 7, 9, 19], [5, 5, 5, 7, 11, 17], [5, 5, 5, 7, 13, 15], [5, 5, 5, 9, 9, 17], [5, 5, 5, 9, 11, 15], [5, 5, 5, 9, 13, 13], [5, 5, 5, 11, 11, 13], [5, 5, 7, 7, 7, 19], [5, 5, 7, 7, 9, 17], [5, 5, 7, 7, 11, 15], [5, 5, 7, 7, 13, 13], [5, 5, 7, 9, 9, 15], [5, 5, 7, 9, 11, 13], [5, 5, 7, 11, 11, 11], [5, 5, 9, 9, 9, 13], [5, 5, 9, 9, 11, 11], [5, 7, 7, 7, 7, 17], [5, 7, 7, 7, 9, 15], [5, 7, 7, 7, 11, 13], [5, 7, 7, 9, 9, 13], [5, 7, 7, 9, 11, 11], [5, 7, 9, 9, 9, 11], [5, 7, 19, 19], [5, 9, 9, 9, 9, 9], [5, 9, 17, 19], [5, 11, 15, 19], [5, 11, 17, 17], [5, 13, 13, 19], [5, 13, 15, 17], [5, 15, 15, 15], [7, 7, 7, 7, 7, 15], [7, 7, 7, 7, 9, 13], [7, 7, 7, 7, 11, 11], [7, 7, 7, 9, 9, 11], [7, 7, 9, 9, 9, 9], [7, 7, 17, 19], [7, 9, 15, 19], [7, 9, 17, 17], [7, 11, 13, 19], [7, 11, 15, 17], [7, 13, 13, 17], [7, 13, 15, 15], [9, 9, 13, 19], [9, 9, 15, 17], [9, 11, 11, 19], [9, 11, 13, 17], [9, 11, 15, 15], [9, 13, 13, 15], [11, 11, 11, 17], [11, 11, 13, 15], [11, 13, 13, 13]]\n assert 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 candidate(candidates = [6, 12, 18, 24, 30, 36, 42],target = 126) == [[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, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 24, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 24, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 30, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 36], [6, 6, 6, 6, 6, 6, 6, 6, 6, 18, 24, 30], [6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 42], [6, 6, 6, 6, 6, 6, 6, 6, 6, 36, 36], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 18], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 30], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 42], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 18, 18], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 36], [6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 24, 30], [6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 18, 30], [6, 6, 6, 6, 6, 6, 6, 6, 12, 18, 24, 24], [6, 6, 6, 6, 6, 6, 6, 6, 12, 24, 42], [6, 6, 6, 6, 6, 6, 6, 6, 12, 30, 36], [6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 18, 24], [6, 6, 6, 6, 6, 6, 6, 6, 18, 18, 42], [6, 6, 6, 6, 6, 6, 6, 6, 18, 24, 36], [6, 6, 6, 6, 6, 6, 6, 6, 18, 30, 30], [6, 6, 6, 6, 6, 6, 6, 6, 24, 24, 30], [6, 6, 6, 6, 6, 6, 6, 6, 36, 42], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 24], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 18, 18], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 36], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 30], [6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 24, 24], [6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 18, 24], [6, 6, 6, 6, 6, 6, 6, 12, 12, 18, 42], [6, 6, 6, 6, 6, 6, 6, 12, 12, 24, 36], [6, 6, 6, 6, 6, 6, 6, 12, 12, 30, 30], [6, 6, 6, 6, 6, 6, 6, 12, 18, 18, 18, 18], [6, 6, 6, 6, 6, 6, 6, 12, 18, 18, 36], [6, 6, 6, 6, 6, 6, 6, 12, 18, 24, 30], [6, 6, 6, 6, 6, 6, 6, 12, 24, 24, 24], [6, 6, 6, 6, 6, 6, 6, 12, 30, 42], [6, 6, 6, 6, 6, 6, 6, 12, 36, 36], [6, 6, 6, 6, 6, 6, 6, 18, 18, 18, 30], [6, 6, 6, 6, 6, 6, 6, 18, 18, 24, 24], [6, 6, 6, 6, 6, 6, 6, 18, 24, 42], [6, 6, 6, 6, 6, 6, 6, 18, 30, 36], [6, 6, 6, 6, 6, 6, 6, 24, 24, 36], [6, 6, 6, 6, 6, 6, 6, 24, 30, 30], [6, 6, 6, 6, 6, 6, 6, 42, 42], [6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 18], [6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 30], [6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 18, 24], [6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 42], [6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 18, 18], [6, 6, 6, 6, 6, 6, 12, 12, 12, 18, 36], [6, 6, 6, 6, 6, 6, 12, 12, 12, 24, 30], [6, 6, 6, 6, 6, 6, 12, 12, 18, 18, 30], [6, 6, 6, 6, 6, 6, 12, 12, 18, 24, 24], [6, 6, 6, 6, 6, 6, 12, 12, 24, 42], [6, 6, 6, 6, 6, 6, 12, 12, 30, 36], [6, 6, 6, 6, 6, 6, 12, 18, 18, 18, 24], [6, 6, 6, 6, 6, 6, 12, 18, 18, 42], [6, 6, 6, 6, 6, 6, 12, 18, 24, 36], [6, 6, 6, 6, 6, 6, 12, 18, 30, 30], [6, 6, 6, 6, 6, 6, 12, 24, 24, 30], [6, 6, 6, 6, 6, 6, 12, 36, 42], [6, 6, 6, 6, 6, 6, 18, 18, 18, 18, 18], [6, 6, 6, 6, 6, 6, 18, 18, 18, 36], [6, 6, 6, 6, 6, 6, 18, 18, 24, 30], [6, 6, 6, 6, 6, 6, 18, 24, 24, 24], [6, 6, 6, 6, 6, 6, 18, 30, 42], [6, 6, 6, 6, 6, 6, 18, 36, 36], [6, 6, 6, 6, 6, 6, 24, 24, 42], [6, 6, 6, 6, 6, 6, 24, 30, 36], [6, 6, 6, 6, 6, 6, 30, 30, 30], [6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12], [6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 24], [6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 18, 18], [6, 6, 6, 6, 6, 12, 12, 12, 12, 12, 36], [6, 6, 6, 6, 6, 12, 12, 12, 12, 18, 30], [6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24], [6, 6, 6, 6, 6, 12, 12, 12, 18, 18, 24], [6, 6, 6, 6, 6, 12, 12, 12, 18, 42], [6, 6, 6, 6, 6, 12, 12, 12, 24, 36], [6, 6, 6, 6, 6, 12, 12, 12, 30, 30], [6, 6, 6, 6, 6, 12, 12, 18, 18, 18, 18], [6, 6, 6, 6, 6, 12, 12, 18, 18, 36], [6, 6, 6, 6, 6, 12, 12, 18, 24, 30], [6, 6, 6, 6, 6, 12, 12, 24, 24, 24], [6, 6, 6, 6, 6, 12, 12, 30, 42], [6, 6, 6, 6, 6, 12, 12, 36, 36], [6, 6, 6, 6, 6, 12, 18, 18, 18, 30], [6, 6, 6, 6, 6, 12, 18, 18, 24, 24], [6, 6, 6, 6, 6, 12, 18, 24, 42], [6, 6, 6, 6, 6, 12, 18, 30, 36], [6, 6, 6, 6, 6, 12, 24, 24, 36], [6, 6, 6, 6, 6, 12, 24, 30, 30], [6, 6, 6, 6, 6, 12, 42, 42], [6, 6, 6, 6, 6, 18, 18, 18, 18, 24], [6, 6, 6, 6, 6, 18, 18, 18, 42], [6, 6, 6, 6, 6, 18, 18, 24, 36], [6, 6, 6, 6, 6, 18, 18, 30, 30], [6, 6, 6, 6, 6, 18, 24, 24, 30], [6, 6, 6, 6, 6, 18, 36, 42], [6, 6, 6, 6, 6, 24, 24, 24, 24], [6, 6, 6, 6, 6, 24, 30, 42], [6, 6, 6, 6, 6, 24, 36, 36], [6, 6, 6, 6, 6, 30, 30, 36], [6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 18], [6, 6, 6, 6, 12, 12, 12, 12, 12, 12, 30], [6, 6, 6, 6, 12, 12, 12, 12, 12, 18, 24], [6, 6, 6, 6, 12, 12, 12, 12, 12, 42], [6, 6, 6, 6, 12, 12, 12, 12, 18, 18, 18], [6, 6, 6, 6, 12, 12, 12, 12, 18, 36], [6, 6, 6, 6, 12, 12, 12, 12, 24, 30], [6, 6, 6, 6, 12, 12, 12, 18, 18, 30], [6, 6, 6, 6, 12, 12, 12, 18, 24, 24], [6, 6, 6, 6, 12, 12, 12, 24, 42], [6, 6, 6, 6, 12, 12, 12, 30, 36], [6, 6, 6, 6, 12, 12, 18, 18, 18, 24], [6, 6, 6, 6, 12, 12, 18, 18, 42], [6, 6, 6, 6, 12, 12, 18, 24, 36], [6, 6, 6, 6, 12, 12, 18, 30, 30], [6, 6, 6, 6, 12, 12, 24, 24, 30], [6, 6, 6, 6, 12, 12, 36, 42], [6, 6, 6, 6, 12, 18, 18, 18, 18, 18], [6, 6, 6, 6, 12, 18, 18, 18, 36], [6, 6, 6, 6, 12, 18, 18, 24, 30], [6, 6, 6, 6, 12, 18, 24, 24, 24], [6, 6, 6, 6, 12, 18, 30, 42], [6, 6, 6, 6, 12, 18, 36, 36], [6, 6, 6, 6, 12, 24, 24, 42], [6, 6, 6, 6, 12, 24, 30, 36], [6, 6, 6, 6, 12, 30, 30, 30], [6, 6, 6, 6, 18, 18, 18, 18, 30], [6, 6, 6, 6, 18, 18, 18, 24, 24], [6, 6, 6, 6, 18, 18, 24, 42], [6, 6, 6, 6, 18, 18, 30, 36], [6, 6, 6, 6, 18, 24, 24, 36], [6, 6, 6, 6, 18, 24, 30, 30], [6, 6, 6, 6, 18, 42, 42], [6, 6, 6, 6, 24, 24, 24, 30], [6, 6, 6, 6, 24, 36, 42], [6, 6, 6, 6, 30, 30, 42], [6, 6, 6, 6, 30, 36, 36], [6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 12], [6, 6, 6, 12, 12, 12, 12, 12, 12, 12, 24], [6, 6, 6, 12, 12, 12, 12, 12, 12, 18, 18], [6, 6, 6, 12, 12, 12, 12, 12, 12, 36], [6, 6, 6, 12, 12, 12, 12, 12, 18, 30], [6, 6, 6, 12, 12, 12, 12, 12, 24, 24], [6, 6, 6, 12, 12, 12, 12, 18, 18, 24], [6, 6, 6, 12, 12, 12, 12, 18, 42], [6, 6, 6, 12, 12, 12, 12, 24, 36], [6, 6, 6, 12, 12, 12, 12, 30, 30], [6, 6, 6, 12, 12, 12, 18, 18, 18, 18], [6, 6, 6, 12, 12, 12, 18, 18, 36], [6, 6, 6, 12, 12, 12, 18, 24, 30], [6, 6, 6, 12, 12, 12, 24, 24, 24], [6, 6, 6, 12, 12, 12, 30, 42], [6, 6, 6, 12, 12, 12, 36, 36], [6, 6, 6, 12, 12, 18, 18, 18, 30], [6, 6, 6, 12, 12, 18, 18, 24, 24], [6, 6, 6, 12, 12, 18, 24, 42], [6, 6, 6, 12, 12, 18, 30, 36], [6, 6, 6, 12, 12, 24, 24, 36], [6, 6, 6, 12, 12, 24, 30, 30], [6, 6, 6, 12, 12, 42, 42], [6, 6, 6, 12, 18, 18, 18, 18, 24], [6, 6, 6, 12, 18, 18, 18, 42], [6, 6, 6, 12, 18, 18, 24, 36], [6, 6, 6, 12, 18, 18, 30, 30], [6, 6, 6, 12, 18, 24, 24, 30], [6, 6, 6, 12, 18, 36, 42], [6, 6, 6, 12, 24, 24, 24, 24], [6, 6, 6, 12, 24, 30, 42], [6, 6, 6, 12, 24, 36, 36], [6, 6, 6, 12, 30, 30, 36], [6, 6, 6, 18, 18, 18, 18, 18, 18], [6, 6, 6, 18, 18, 18, 18, 36], [6, 6, 6, 18, 18, 18, 24, 30], [6, 6, 6, 18, 18, 24, 24, 24], [6, 6, 6, 18, 18, 30, 42], [6, 6, 6, 18, 18, 36, 36], [6, 6, 6, 18, 24, 24, 42], [6, 6, 6, 18, 24, 30, 36], [6, 6, 6, 18, 30, 30, 30], [6, 6, 6, 24, 24, 24, 36], [6, 6, 6, 24, 24, 30, 30], [6, 6, 6, 24, 42, 42], [6, 6, 6, 30, 36, 42], [6, 6, 6, 36, 36, 36], [6, 6, 12, 12, 12, 12, 12, 12, 12, 12, 18], [6, 6, 12, 12, 12, 12, 12, 12, 12, 30], [6, 6, 12, 12, 12, 12, 12, 12, 18, 24], [6, 6, 12, 12, 12, 12, 12, 12, 42], [6, 6, 12, 12, 12, 12, 12, 18, 18, 18], [6, 6, 12, 12, 12, 12, 12, 18, 36], [6, 6, 12, 12, 12, 12, 12, 24, 30], [6, 6, 12, 12, 12, 12, 18, 18, 30], [6, 6, 12, 12, 12, 12, 18, 24, 24], [6, 6, 12, 12, 12, 12, 24, 42], [6, 6, 12, 12, 12, 12, 30, 36], [6, 6, 12, 12, 12, 18, 18, 18, 24], [6, 6, 12, 12, 12, 18, 18, 42], [6, 6, 12, 12, 12, 18, 24, 36], [6, 6, 12, 12, 12, 18, 30, 30], [6, 6, 12, 12, 12, 24, 24, 30], [6, 6, 12, 12, 12, 36, 42], [6, 6, 12, 12, 18, 18, 18, 18, 18], [6, 6, 12, 12, 18, 18, 18, 36], [6, 6, 12, 12, 18, 18, 24, 30], [6, 6, 12, 12, 18, 24, 24, 24], [6, 6, 12, 12, 18, 30, 42], [6, 6, 12, 12, 18, 36, 36], [6, 6, 12, 12, 24, 24, 42], [6, 6, 12, 12, 24, 30, 36], [6, 6, 12, 12, 30, 30, 30], [6, 6, 12, 18, 18, 18, 18, 30], [6, 6, 12, 18, 18, 18, 24, 24], [6, 6, 12, 18, 18, 24, 42], [6, 6, 12, 18, 18, 30, 36], [6, 6, 12, 18, 24, 24, 36], [6, 6, 12, 18, 24, 30, 30], [6, 6, 12, 18, 42, 42], [6, 6, 12, 24, 24, 24, 30], [6, 6, 12, 24, 36, 42], [6, 6, 12, 30, 30, 42], [6, 6, 12, 30, 36, 36], [6, 6, 18, 18, 18, 18, 18, 24], [6, 6, 18, 18, 18, 18, 42], [6, 6, 18, 18, 18, 24, 36], [6, 6, 18, 18, 18, 30, 30], [6, 6, 18, 18, 24, 24, 30], [6, 6, 18, 18, 36, 42], [6, 6, 18, 24, 24, 24, 24], [6, 6, 18, 24, 30, 42], [6, 6, 18, 24, 36, 36], [6, 6, 18, 30, 30, 36], [6, 6, 24, 24, 24, 42], [6, 6, 24, 24, 30, 36], [6, 6, 24, 30, 30, 30], [6, 6, 30, 42, 42], [6, 6, 36, 36, 42], [6, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12], [6, 12, 12, 12, 12, 12, 12, 12, 12, 24], [6, 12, 12, 12, 12, 12, 12, 12, 18, 18], [6, 12, 12, 12, 12, 12, 12, 12, 36], [6, 12, 12, 12, 12, 12, 12, 18, 30], [6, 12, 12, 12, 12, 12, 12, 24, 24], [6, 12, 12, 12, 12, 12, 18, 18, 24], [6, 12, 12, 12, 12, 12, 18, 42], [6, 12, 12, 12, 12, 12, 24, 36], [6, 12, 12, 12, 12, 12, 30, 30], [6, 12, 12, 12, 12, 18, 18, 18, 18], [6, 12, 12, 12, 12, 18, 18, 36], [6, 12, 12, 12, 12, 18, 24, 30], [6, 12, 12, 12, 12, 24, 24, 24], [6, 12, 12, 12, 12, 30, 42], [6, 12, 12, 12, 12, 36, 36], [6, 12, 12, 12, 18, 18, 18, 30], [6, 12, 12, 12, 18, 18, 24, 24], [6, 12, 12, 12, 18, 24, 42], [6, 12, 12, 12, 18, 30, 36], [6, 12, 12, 12, 24, 24, 36], [6, 12, 12, 12, 24, 30, 30], [6, 12, 12, 12, 42, 42], [6, 12, 12, 18, 18, 18, 18, 24], [6, 12, 12, 18, 18, 18, 42], [6, 12, 12, 18, 18, 24, 36], [6, 12, 12, 18, 18, 30, 30], [6, 12, 12, 18, 24, 24, 30], [6, 12, 12, 18, 36, 42], [6, 12, 12, 24, 24, 24, 24], [6, 12, 12, 24, 30, 42], [6, 12, 12, 24, 36, 36], [6, 12, 12, 30, 30, 36], [6, 12, 18, 18, 18, 18, 18, 18], [6, 12, 18, 18, 18, 18, 36], [6, 12, 18, 18, 18, 24, 30], [6, 12, 18, 18, 24, 24, 24], [6, 12, 18, 18, 30, 42], [6, 12, 18, 18, 36, 36], [6, 12, 18, 24, 24, 42], [6, 12, 18, 24, 30, 36], [6, 12, 18, 30, 30, 30], [6, 12, 24, 24, 24, 36], [6, 12, 24, 24, 30, 30], [6, 12, 24, 42, 42], [6, 12, 30, 36, 42], [6, 12, 36, 36, 36], [6, 18, 18, 18, 18, 18, 30], [6, 18, 18, 18, 18, 24, 24], [6, 18, 18, 18, 24, 42], [6, 18, 18, 18, 30, 36], [6, 18, 18, 24, 24, 36], [6, 18, 18, 24, 30, 30], [6, 18, 18, 42, 42], [6, 18, 24, 24, 24, 30], [6, 18, 24, 36, 42], [6, 18, 30, 30, 42], [6, 18, 30, 36, 36], [6, 24, 24, 24, 24, 24], [6, 24, 24, 30, 42], [6, 24, 24, 36, 36], [6, 24, 30, 30, 36], [6, 30, 30, 30, 30], [6, 36, 42, 42], [12, 12, 12, 12, 12, 12, 12, 12, 12, 18], [12, 12, 12, 12, 12, 12, 12, 12, 30], [12, 12, 12, 12, 12, 12, 12, 18, 24], [12, 12, 12, 12, 12, 12, 12, 42], [12, 12, 12, 12, 12, 12, 18, 18, 18], [12, 12, 12, 12, 12, 12, 18, 36], [12, 12, 12, 12, 12, 12, 24, 30], [12, 12, 12, 12, 12, 18, 18, 30], [12, 12, 12, 12, 12, 18, 24, 24], [12, 12, 12, 12, 12, 24, 42], [12, 12, 12, 12, 12, 30, 36], [12, 12, 12, 12, 18, 18, 18, 24], [12, 12, 12, 12, 18, 18, 42], [12, 12, 12, 12, 18, 24, 36], [12, 12, 12, 12, 18, 30, 30], [12, 12, 12, 12, 24, 24, 30], [12, 12, 12, 12, 36, 42], [12, 12, 12, 18, 18, 18, 18, 18], [12, 12, 12, 18, 18, 18, 36], [12, 12, 12, 18, 18, 24, 30], [12, 12, 12, 18, 24, 24, 24], [12, 12, 12, 18, 30, 42], [12, 12, 12, 18, 36, 36], [12, 12, 12, 24, 24, 42], [12, 12, 12, 24, 30, 36], [12, 12, 12, 30, 30, 30], [12, 12, 18, 18, 18, 18, 30], [12, 12, 18, 18, 18, 24, 24], [12, 12, 18, 18, 24, 42], [12, 12, 18, 18, 30, 36], [12, 12, 18, 24, 24, 36], [12, 12, 18, 24, 30, 30], [12, 12, 18, 42, 42], [12, 12, 24, 24, 24, 30], [12, 12, 24, 36, 42], [12, 12, 30, 30, 42], [12, 12, 30, 36, 36], [12, 18, 18, 18, 18, 18, 24], [12, 18, 18, 18, 18, 42], [12, 18, 18, 18, 24, 36], [12, 18, 18, 18, 30, 30], [12, 18, 18, 24, 24, 30], [12, 18, 18, 36, 42], [12, 18, 24, 24, 24, 24], [12, 18, 24, 30, 42], [12, 18, 24, 36, 36], [12, 18, 30, 30, 36], [12, 24, 24, 24, 42], [12, 24, 24, 30, 36], [12, 24, 30, 30, 30], [12, 30, 42, 42], [12, 36, 36, 42], [18, 18, 18, 18, 18, 18, 18], [18, 18, 18, 18, 18, 36], [18, 18, 18, 18, 24, 30], [18, 18, 18, 24, 24, 24], [18, 18, 18, 30, 42], [18, 18, 18, 36, 36], [18, 18, 24, 24, 42], [18, 18, 24, 30, 36], [18, 18, 30, 30, 30], [18, 24, 24, 24, 36], [18, 24, 24, 30, 30], [18, 24, 42, 42], [18, 30, 36, 42], [18, 36, 36, 36], [24, 24, 24, 24, 30], [24, 24, 36, 42], [24, 30, 30, 42], [24, 30, 36, 36], [30, 30, 30, 36], [42, 42, 42]]\n assert candidate(candidates = [2, 18, 34, 50, 66, 82],target = 100) == [[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, 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, 18], [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, 34], [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, 18, 18], [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, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 34], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 66], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 50], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 34, 34], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 34], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18], [2, 2, 2, 2, 2, 2, 2, 2, 2, 82], [2, 2, 2, 2, 2, 2, 2, 2, 18, 66], [2, 2, 2, 2, 2, 2, 2, 2, 34, 50], [2, 2, 2, 2, 2, 2, 2, 18, 18, 50], [2, 2, 2, 2, 2, 2, 2, 18, 34, 34], [2, 2, 2, 2, 2, 2, 18, 18, 18, 34], [2, 2, 2, 2, 2, 18, 18, 18, 18, 18], [18, 82], [34, 66], [50, 50]]\n assert candidate(candidates = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 45) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 15], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 12], [3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 9], [3, 3, 3, 3, 3, 3, 3, 3, 3, 18], [3, 3, 3, 3, 3, 3, 3, 3, 6, 6, 9], [3, 3, 3, 3, 3, 3, 3, 3, 6, 15], [3, 3, 3, 3, 3, 3, 3, 3, 9, 12], [3, 3, 3, 3, 3, 3, 3, 3, 21], [3, 3, 3, 3, 3, 3, 3, 6, 6, 6, 6], [3, 3, 3, 3, 3, 3, 3, 6, 6, 12], [3, 3, 3, 3, 3, 3, 3, 6, 9, 9], [3, 3, 3, 3, 3, 3, 3, 6, 18], [3, 3, 3, 3, 3, 3, 3, 9, 15], [3, 3, 3, 3, 3, 3, 3, 12, 12], [3, 3, 3, 3, 3, 3, 3, 24], [3, 3, 3, 3, 3, 3, 6, 6, 6, 9], [3, 3, 3, 3, 3, 3, 6, 6, 15], [3, 3, 3, 3, 3, 3, 6, 9, 12], [3, 3, 3, 3, 3, 3, 6, 21], [3, 3, 3, 3, 3, 3, 9, 9, 9], [3, 3, 3, 3, 3, 3, 9, 18], [3, 3, 3, 3, 3, 3, 12, 15], [3, 3, 3, 3, 3, 3, 27], [3, 3, 3, 3, 3, 6, 6, 6, 6, 6], [3, 3, 3, 3, 3, 6, 6, 6, 12], [3, 3, 3, 3, 3, 6, 6, 9, 9], [3, 3, 3, 3, 3, 6, 6, 18], [3, 3, 3, 3, 3, 6, 9, 15], [3, 3, 3, 3, 3, 6, 12, 12], [3, 3, 3, 3, 3, 6, 24], [3, 3, 3, 3, 3, 9, 9, 12], [3, 3, 3, 3, 3, 9, 21], [3, 3, 3, 3, 3, 12, 18], [3, 3, 3, 3, 3, 15, 15], [3, 3, 3, 3, 3, 30], [3, 3, 3, 3, 6, 6, 6, 6, 9], [3, 3, 3, 3, 6, 6, 6, 15], [3, 3, 3, 3, 6, 6, 9, 12], [3, 3, 3, 3, 6, 6, 21], [3, 3, 3, 3, 6, 9, 9, 9], [3, 3, 3, 3, 6, 9, 18], [3, 3, 3, 3, 6, 12, 15], [3, 3, 3, 3, 6, 27], [3, 3, 3, 3, 9, 9, 15], [3, 3, 3, 3, 9, 12, 12], [3, 3, 3, 3, 9, 24], [3, 3, 3, 3, 12, 21], [3, 3, 3, 3, 15, 18], [3, 3, 3, 6, 6, 6, 6, 6, 6], [3, 3, 3, 6, 6, 6, 6, 12], [3, 3, 3, 6, 6, 6, 9, 9], [3, 3, 3, 6, 6, 6, 18], [3, 3, 3, 6, 6, 9, 15], [3, 3, 3, 6, 6, 12, 12], [3, 3, 3, 6, 6, 24], [3, 3, 3, 6, 9, 9, 12], [3, 3, 3, 6, 9, 21], [3, 3, 3, 6, 12, 18], [3, 3, 3, 6, 15, 15], [3, 3, 3, 6, 30], [3, 3, 3, 9, 9, 9, 9], [3, 3, 3, 9, 9, 18], [3, 3, 3, 9, 12, 15], [3, 3, 3, 9, 27], [3, 3, 3, 12, 12, 12], [3, 3, 3, 12, 24], [3, 3, 3, 15, 21], [3, 3, 3, 18, 18], [3, 3, 6, 6, 6, 6, 6, 9], [3, 3, 6, 6, 6, 6, 15], [3, 3, 6, 6, 6, 9, 12], [3, 3, 6, 6, 6, 21], [3, 3, 6, 6, 9, 9, 9], [3, 3, 6, 6, 9, 18], [3, 3, 6, 6, 12, 15], [3, 3, 6, 6, 27], [3, 3, 6, 9, 9, 15], [3, 3, 6, 9, 12, 12], [3, 3, 6, 9, 24], [3, 3, 6, 12, 21], [3, 3, 6, 15, 18], [3, 3, 9, 9, 9, 12], [3, 3, 9, 9, 21], [3, 3, 9, 12, 18], [3, 3, 9, 15, 15], [3, 3, 9, 30], [3, 3, 12, 12, 15], [3, 3, 12, 27], [3, 3, 15, 24], [3, 3, 18, 21], [3, 6, 6, 6, 6, 6, 6, 6], [3, 6, 6, 6, 6, 6, 12], [3, 6, 6, 6, 6, 9, 9], [3, 6, 6, 6, 6, 18], [3, 6, 6, 6, 9, 15], [3, 6, 6, 6, 12, 12], [3, 6, 6, 6, 24], [3, 6, 6, 9, 9, 12], [3, 6, 6, 9, 21], [3, 6, 6, 12, 18], [3, 6, 6, 15, 15], [3, 6, 6, 30], [3, 6, 9, 9, 9, 9], [3, 6, 9, 9, 18], [3, 6, 9, 12, 15], [3, 6, 9, 27], [3, 6, 12, 12, 12], [3, 6, 12, 24], [3, 6, 15, 21], [3, 6, 18, 18], [3, 9, 9, 9, 15], [3, 9, 9, 12, 12], [3, 9, 9, 24], [3, 9, 12, 21], [3, 9, 15, 18], [3, 12, 12, 18], [3, 12, 15, 15], [3, 12, 30], [3, 15, 27], [3, 18, 24], [3, 21, 21], [6, 6, 6, 6, 6, 6, 9], [6, 6, 6, 6, 6, 15], [6, 6, 6, 6, 9, 12], [6, 6, 6, 6, 21], [6, 6, 6, 9, 9, 9], [6, 6, 6, 9, 18], [6, 6, 6, 12, 15], [6, 6, 6, 27], [6, 6, 9, 9, 15], [6, 6, 9, 12, 12], [6, 6, 9, 24], [6, 6, 12, 21], [6, 6, 15, 18], [6, 9, 9, 9, 12], [6, 9, 9, 21], [6, 9, 12, 18], [6, 9, 15, 15], [6, 9, 30], [6, 12, 12, 15], [6, 12, 27], [6, 15, 24], [6, 18, 21], [9, 9, 9, 9, 9], [9, 9, 9, 18], [9, 9, 12, 15], [9, 9, 27], [9, 12, 12, 12], [9, 12, 24], [9, 15, 21], [9, 18, 18], [12, 12, 21], [12, 15, 18], [15, 15, 15], [15, 30], [18, 27], [21, 24]]\n assert candidate(candidates = [5, 10, 15, 20, 25, 30, 35, 40],target = 80) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 30], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 20], [5, 5, 5, 5, 5, 5, 5, 5, 5, 35], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 20], [5, 5, 5, 5, 5, 5, 5, 5, 10, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5, 10, 30], [5, 5, 5, 5, 5, 5, 5, 5, 15, 25], [5, 5, 5, 5, 5, 5, 5, 5, 20, 20], [5, 5, 5, 5, 5, 5, 5, 5, 40], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 15], [5, 5, 5, 5, 5, 5, 5, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 10, 15, 20], [5, 5, 5, 5, 5, 5, 5, 10, 35], [5, 5, 5, 5, 5, 5, 5, 15, 15, 15], [5, 5, 5, 5, 5, 5, 5, 15, 30], [5, 5, 5, 5, 5, 5, 5, 20, 25], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 10, 10, 10, 20], [5, 5, 5, 5, 5, 5, 10, 10, 15, 15], [5, 5, 5, 5, 5, 5, 10, 10, 30], [5, 5, 5, 5, 5, 5, 10, 15, 25], [5, 5, 5, 5, 5, 5, 10, 20, 20], [5, 5, 5, 5, 5, 5, 10, 40], [5, 5, 5, 5, 5, 5, 15, 15, 20], [5, 5, 5, 5, 5, 5, 15, 35], [5, 5, 5, 5, 5, 5, 20, 30], [5, 5, 5, 5, 5, 5, 25, 25], [5, 5, 5, 5, 5, 10, 10, 10, 10, 15], [5, 5, 5, 5, 5, 10, 10, 10, 25], [5, 5, 5, 5, 5, 10, 10, 15, 20], [5, 5, 5, 5, 5, 10, 10, 35], [5, 5, 5, 5, 5, 10, 15, 15, 15], [5, 5, 5, 5, 5, 10, 15, 30], [5, 5, 5, 5, 5, 10, 20, 25], [5, 5, 5, 5, 5, 15, 15, 25], [5, 5, 5, 5, 5, 15, 20, 20], [5, 5, 5, 5, 5, 15, 40], [5, 5, 5, 5, 5, 20, 35], [5, 5, 5, 5, 5, 25, 30], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 10, 10, 10, 10, 20], [5, 5, 5, 5, 10, 10, 10, 15, 15], [5, 5, 5, 5, 10, 10, 10, 30], [5, 5, 5, 5, 10, 10, 15, 25], [5, 5, 5, 5, 10, 10, 20, 20], [5, 5, 5, 5, 10, 10, 40], [5, 5, 5, 5, 10, 15, 15, 20], [5, 5, 5, 5, 10, 15, 35], [5, 5, 5, 5, 10, 20, 30], [5, 5, 5, 5, 10, 25, 25], [5, 5, 5, 5, 15, 15, 15, 15], [5, 5, 5, 5, 15, 15, 30], [5, 5, 5, 5, 15, 20, 25], [5, 5, 5, 5, 20, 20, 20], [5, 5, 5, 5, 20, 40], [5, 5, 5, 5, 25, 35], [5, 5, 5, 5, 30, 30], [5, 5, 5, 10, 10, 10, 10, 10, 15], [5, 5, 5, 10, 10, 10, 10, 25], [5, 5, 5, 10, 10, 10, 15, 20], [5, 5, 5, 10, 10, 10, 35], [5, 5, 5, 10, 10, 15, 15, 15], [5, 5, 5, 10, 10, 15, 30], [5, 5, 5, 10, 10, 20, 25], [5, 5, 5, 10, 15, 15, 25], [5, 5, 5, 10, 15, 20, 20], [5, 5, 5, 10, 15, 40], [5, 5, 5, 10, 20, 35], [5, 5, 5, 10, 25, 30], [5, 5, 5, 15, 15, 15, 20], [5, 5, 5, 15, 15, 35], [5, 5, 5, 15, 20, 30], [5, 5, 5, 15, 25, 25], [5, 5, 5, 20, 20, 25], [5, 5, 5, 25, 40], [5, 5, 5, 30, 35], [5, 5, 10, 10, 10, 10, 10, 10, 10], [5, 5, 10, 10, 10, 10, 10, 20], [5, 5, 10, 10, 10, 10, 15, 15], [5, 5, 10, 10, 10, 10, 30], [5, 5, 10, 10, 10, 15, 25], [5, 5, 10, 10, 10, 20, 20], [5, 5, 10, 10, 10, 40], [5, 5, 10, 10, 15, 15, 20], [5, 5, 10, 10, 15, 35], [5, 5, 10, 10, 20, 30], [5, 5, 10, 10, 25, 25], [5, 5, 10, 15, 15, 15, 15], [5, 5, 10, 15, 15, 30], [5, 5, 10, 15, 20, 25], [5, 5, 10, 20, 20, 20], [5, 5, 10, 20, 40], [5, 5, 10, 25, 35], [5, 5, 10, 30, 30], [5, 5, 15, 15, 15, 25], [5, 5, 15, 15, 20, 20], [5, 5, 15, 15, 40], [5, 5, 15, 20, 35], [5, 5, 15, 25, 30], [5, 5, 20, 20, 30], [5, 5, 20, 25, 25], [5, 5, 30, 40], [5, 5, 35, 35], [5, 10, 10, 10, 10, 10, 10, 15], [5, 10, 10, 10, 10, 10, 25], [5, 10, 10, 10, 10, 15, 20], [5, 10, 10, 10, 10, 35], [5, 10, 10, 10, 15, 15, 15], [5, 10, 10, 10, 15, 30], [5, 10, 10, 10, 20, 25], [5, 10, 10, 15, 15, 25], [5, 10, 10, 15, 20, 20], [5, 10, 10, 15, 40], [5, 10, 10, 20, 35], [5, 10, 10, 25, 30], [5, 10, 15, 15, 15, 20], [5, 10, 15, 15, 35], [5, 10, 15, 20, 30], [5, 10, 15, 25, 25], [5, 10, 20, 20, 25], [5, 10, 25, 40], [5, 10, 30, 35], [5, 15, 15, 15, 15, 15], [5, 15, 15, 15, 30], [5, 15, 15, 20, 25], [5, 15, 20, 20, 20], [5, 15, 20, 40], [5, 15, 25, 35], [5, 15, 30, 30], [5, 20, 20, 35], [5, 20, 25, 30], [5, 25, 25, 25], [5, 35, 40], [10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 20], [10, 10, 10, 10, 10, 15, 15], [10, 10, 10, 10, 10, 30], [10, 10, 10, 10, 15, 25], [10, 10, 10, 10, 20, 20], [10, 10, 10, 10, 40], [10, 10, 10, 15, 15, 20], [10, 10, 10, 15, 35], [10, 10, 10, 20, 30], [10, 10, 10, 25, 25], [10, 10, 15, 15, 15, 15], [10, 10, 15, 15, 30], [10, 10, 15, 20, 25], [10, 10, 20, 20, 20], [10, 10, 20, 40], [10, 10, 25, 35], [10, 10, 30, 30], [10, 15, 15, 15, 25], [10, 15, 15, 20, 20], [10, 15, 15, 40], [10, 15, 20, 35], [10, 15, 25, 30], [10, 20, 20, 30], [10, 20, 25, 25], [10, 30, 40], [10, 35, 35], [15, 15, 15, 15, 20], [15, 15, 15, 35], [15, 15, 20, 30], [15, 15, 25, 25], [15, 20, 20, 25], [15, 25, 40], [15, 30, 35], [20, 20, 20, 20], [20, 20, 40], [20, 25, 35], [20, 30, 30], [25, 25, 30], [40, 40]]\n assert 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 candidate(candidates = [8, 16, 32, 64, 128, 256, 512],target = 511) == []\n assert candidate(candidates = [3, 6, 9, 12, 15],target = 100) == []\n assert candidate(candidates = [7, 14, 21, 28, 35, 42],target = 49) == [[7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 14], [7, 7, 7, 7, 21], [7, 7, 7, 14, 14], [7, 7, 7, 28], [7, 7, 14, 21], [7, 7, 35], [7, 14, 14, 14], [7, 14, 28], [7, 21, 21], [7, 42], [14, 14, 21], [14, 35], [21, 28]]\n assert 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 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 candidate(candidates = [5, 10, 25],target = 100) == [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25], [5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 25], [5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 5, 5, 10, 25, 25], [5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 25], [5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 5, 5, 10, 10, 25, 25], [5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 25], [5, 5, 5, 5, 5, 25, 25, 25], [5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 5, 5, 10, 10, 10, 25, 25], [5, 5, 5, 10, 10, 10, 10, 10, 10, 25], [5, 5, 5, 10, 25, 25, 25], [5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10], [5, 5, 10, 10, 10, 10, 25, 25], [5, 10, 10, 10, 10, 10, 10, 10, 25], [5, 10, 10, 25, 25, 25], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 25, 25], [25, 25, 25, 25]]\n assert 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 assert candidate(candidates = [18, 22, 24, 26, 30],target = 50) == [[24, 26]]\n assert candidate(candidates = [15, 18, 20, 25],target = 50) == [[15, 15, 20], [25, 25]]\n"}, "metadata": {"canonical_parameter_names": ["candidates", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> combinationSum(vector& candidates, int target) {", "container": "Solution", "callable": "combinationSum", "parameters": [{"name": "candidates", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "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.\nEach number in candidates may only be used once in the combination.\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\n \nConstraints:\n\n1 <= candidates.length <= 100\n1 <= candidates[i] <= 50\n1 <= target <= 30\n\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 = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],target = 100) == [[5, 10, 15, 20, 50], [5, 10, 15, 25, 45], [5, 10, 15, 30, 40], [5, 10, 20, 25, 40], [5, 10, 20, 30, 35], [5, 10, 35, 50], [5, 10, 40, 45], [5, 15, 20, 25, 35], [5, 15, 30, 50], [5, 15, 35, 45], [5, 20, 25, 50], [5, 20, 30, 45], [5, 20, 35, 40], [5, 25, 30, 40], [5, 45, 50], [10, 15, 20, 25, 30], [10, 15, 25, 50], [10, 15, 30, 45], [10, 15, 35, 40], [10, 20, 25, 45], [10, 20, 30, 40], [10, 25, 30, 35], [10, 40, 50], [15, 20, 25, 40], [15, 20, 30, 35], [15, 35, 50], [15, 40, 45], [20, 30, 50], [20, 35, 45], [25, 30, 45], [25, 35, 40]]\n assert candidate(candidates = [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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],target = 60) == [[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5], [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 7, 7], [4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 7, 7], [4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7], [4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6], [4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7], [4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6], [4, 4, 4, 4, 4, 4, 4, 4, 7, 7, 7, 7], [4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 7], [4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6], [4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 7, 7], [4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 7, 7], [4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6], [4, 4, 4, 4, 4, 4, 5, 5, 5, 7, 7, 7], [4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7], [4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 7], [4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6], [4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5], [4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7], [4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7], [4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6], [4, 4, 4, 4, 4, 5, 7, 7, 7, 7, 7], [4, 4, 4, 4, 4, 6, 6, 7, 7, 7, 7], [4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7], [4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7], [4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6], [4, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7], [4, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7], [4, 4, 4, 4, 6, 6, 6, 6, 6, 7, 7], [4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 7], [4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6], [4, 4, 4, 5, 5, 5, 5, 7, 7, 7, 7], [4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7], [4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7], [4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 7], [4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6], [4, 4, 4, 6, 7, 7, 7, 7, 7, 7], [4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7], [4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6], [4, 4, 5, 5, 5, 5, 5, 6, 7, 7, 7], [4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7], [4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7], [4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6], [4, 4, 5, 5, 7, 7, 7, 7, 7, 7], [4, 4, 5, 6, 6, 7, 7, 7, 7, 7], [4, 4, 6, 6, 6, 6, 7, 7, 7, 7], [4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6], [4, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7], [4, 5, 5, 5, 5, 5, 5, 6, 6, 7, 7], [4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7], [4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6], [4, 5, 5, 5, 6, 7, 7, 7, 7, 7], [4, 5, 5, 6, 6, 6, 7, 7, 7, 7], [4, 5, 6, 6, 6, 6, 6, 7, 7, 7], [4, 6, 6, 6, 6, 6, 6, 6, 7, 7], [4, 7, 7, 7, 7, 7, 7, 7, 7], [5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 7], [5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7], [5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6], [5, 5, 5, 5, 5, 7, 7, 7, 7, 7], [5, 5, 5, 5, 6, 6, 7, 7, 7, 7], [5, 5, 5, 6, 6, 6, 6, 7, 7, 7], [5, 5, 6, 6, 6, 6, 6, 6, 7, 7], [5, 6, 6, 6, 6, 6, 6, 6, 6, 7], [5, 6, 7, 7, 7, 7, 7, 7, 7], [6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 7, 7, 7, 7, 7, 7]]\n assert candidate(candidates = [2, 3, 6, 7, 10, 11, 13, 15, 18, 21, 22, 23, 24, 25, 27],target = 50) == [[2, 3, 6, 7, 10, 22], [2, 3, 6, 7, 11, 21], [2, 3, 6, 10, 11, 18], [2, 3, 6, 11, 13, 15], [2, 3, 6, 15, 24], [2, 3, 6, 18, 21], [2, 3, 7, 10, 13, 15], [2, 3, 7, 11, 27], [2, 3, 7, 13, 25], [2, 3, 7, 15, 23], [2, 3, 10, 11, 24], [2, 3, 10, 13, 22], [2, 3, 11, 13, 21], [2, 3, 18, 27], [2, 3, 21, 24], [2, 3, 22, 23], [2, 6, 7, 10, 25], [2, 6, 7, 11, 24], [2, 6, 7, 13, 22], [2, 6, 10, 11, 21], [2, 6, 11, 13, 18], [2, 6, 15, 27], [2, 6, 18, 24], [2, 7, 10, 13, 18], [2, 7, 18, 23], [2, 10, 11, 27], [2, 10, 13, 25], [2, 10, 15, 23], [2, 11, 13, 24], [2, 11, 15, 22], [2, 21, 27], [2, 23, 25], [3, 6, 7, 10, 11, 13], [3, 6, 7, 10, 24], [3, 6, 7, 11, 23], [3, 6, 7, 13, 21], [3, 6, 10, 13, 18], [3, 6, 18, 23], [3, 7, 13, 27], [3, 7, 15, 25], [3, 7, 18, 22], [3, 10, 13, 24], [3, 10, 15, 22], [3, 11, 13, 23], [3, 11, 15, 21], [3, 22, 25], [3, 23, 24], [6, 7, 10, 27], [6, 7, 13, 24], [6, 7, 15, 22], [6, 10, 11, 23], [6, 10, 13, 21], [6, 11, 15, 18], [6, 21, 23], [7, 10, 11, 22], [7, 10, 15, 18], [7, 18, 25], [7, 21, 22], [10, 13, 27], [10, 15, 25], [10, 18, 22], [11, 15, 24], [11, 18, 21], [13, 15, 22], [23, 27]]\n assert candidate(candidates = [10, 20, 30, 40, 50],target = 50) == [[10, 40], [20, 30], [50]]\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 = [15, 20, 1, 3, 8, 12, 3, 10],target = 33) == [[1, 12, 20], [3, 3, 12, 15], [3, 8, 10, 12], [3, 10, 20], [8, 10, 15]]\n assert candidate(candidates = [3, 3, 6, 6, 9, 9, 12, 12, 15, 15, 18, 18, 21, 21, 24, 24, 27, 27, 30, 30],target = 60) == [[3, 3, 6, 6, 9, 9, 12, 12], [3, 3, 6, 6, 9, 9, 24], [3, 3, 6, 6, 9, 12, 21], [3, 3, 6, 6, 9, 15, 18], [3, 3, 6, 6, 12, 12, 18], [3, 3, 6, 6, 12, 15, 15], [3, 3, 6, 6, 12, 30], [3, 3, 6, 6, 15, 27], [3, 3, 6, 6, 18, 24], [3, 3, 6, 6, 21, 21], [3, 3, 6, 9, 9, 12, 18], [3, 3, 6, 9, 9, 15, 15], [3, 3, 6, 9, 9, 30], [3, 3, 6, 9, 12, 12, 15], [3, 3, 6, 9, 12, 27], [3, 3, 6, 9, 15, 24], [3, 3, 6, 9, 18, 21], [3, 3, 6, 12, 12, 24], [3, 3, 6, 12, 15, 21], [3, 3, 6, 12, 18, 18], [3, 3, 6, 15, 15, 18], [3, 3, 6, 18, 30], [3, 3, 6, 21, 27], [3, 3, 6, 24, 24], [3, 3, 9, 9, 12, 24], [3, 3, 9, 9, 15, 21], [3, 3, 9, 9, 18, 18], [3, 3, 9, 12, 12, 21], [3, 3, 9, 12, 15, 18], [3, 3, 9, 15, 30], [3, 3, 9, 18, 27], [3, 3, 9, 21, 24], [3, 3, 12, 12, 15, 15], [3, 3, 12, 12, 30], [3, 3, 12, 15, 27], [3, 3, 12, 18, 24], [3, 3, 12, 21, 21], [3, 3, 15, 15, 24], [3, 3, 15, 18, 21], [3, 3, 24, 30], [3, 3, 27, 27], [3, 6, 6, 9, 9, 12, 15], [3, 6, 6, 9, 9, 27], [3, 6, 6, 9, 12, 24], [3, 6, 6, 9, 15, 21], [3, 6, 6, 9, 18, 18], [3, 6, 6, 12, 12, 21], [3, 6, 6, 12, 15, 18], [3, 6, 6, 15, 30], [3, 6, 6, 18, 27], [3, 6, 6, 21, 24], [3, 6, 9, 9, 12, 21], [3, 6, 9, 9, 15, 18], [3, 6, 9, 12, 12, 18], [3, 6, 9, 12, 15, 15], [3, 6, 9, 12, 30], [3, 6, 9, 15, 27], [3, 6, 9, 18, 24], [3, 6, 9, 21, 21], [3, 6, 12, 12, 27], [3, 6, 12, 15, 24], [3, 6, 12, 18, 21], [3, 6, 15, 15, 21], [3, 6, 15, 18, 18], [3, 6, 21, 30], [3, 6, 24, 27], [3, 9, 9, 12, 12, 15], [3, 9, 9, 12, 27], [3, 9, 9, 15, 24], [3, 9, 9, 18, 21], [3, 9, 12, 12, 24], [3, 9, 12, 15, 21], [3, 9, 12, 18, 18], [3, 9, 15, 15, 18], [3, 9, 18, 30], [3, 9, 21, 27], [3, 9, 24, 24], [3, 12, 12, 15, 18], [3, 12, 15, 30], [3, 12, 18, 27], [3, 12, 21, 24], [3, 15, 15, 27], [3, 15, 18, 24], [3, 15, 21, 21], [3, 18, 18, 21], [3, 27, 30], [6, 6, 9, 9, 12, 18], [6, 6, 9, 9, 15, 15], [6, 6, 9, 9, 30], [6, 6, 9, 12, 12, 15], [6, 6, 9, 12, 27], [6, 6, 9, 15, 24], [6, 6, 9, 18, 21], [6, 6, 12, 12, 24], [6, 6, 12, 15, 21], [6, 6, 12, 18, 18], [6, 6, 15, 15, 18], [6, 6, 18, 30], [6, 6, 21, 27], [6, 6, 24, 24], [6, 9, 9, 12, 24], [6, 9, 9, 15, 21], [6, 9, 9, 18, 18], [6, 9, 12, 12, 21], [6, 9, 12, 15, 18], [6, 9, 15, 30], [6, 9, 18, 27], [6, 9, 21, 24], [6, 12, 12, 15, 15], [6, 12, 12, 30], [6, 12, 15, 27], [6, 12, 18, 24], [6, 12, 21, 21], [6, 15, 15, 24], [6, 15, 18, 21], [6, 24, 30], [6, 27, 27], [9, 9, 12, 12, 18], [9, 9, 12, 15, 15], [9, 9, 12, 30], [9, 9, 15, 27], [9, 9, 18, 24], [9, 9, 21, 21], [9, 12, 12, 27], [9, 12, 15, 24], [9, 12, 18, 21], [9, 15, 15, 21], [9, 15, 18, 18], [9, 21, 30], [9, 24, 27], [12, 12, 15, 21], [12, 12, 18, 18], [12, 15, 15, 18], [12, 18, 30], [12, 21, 27], [12, 24, 24], [15, 15, 30], [15, 18, 27], [15, 21, 24], [18, 18, 24], [18, 21, 21], [30, 30]]\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, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],target = 50) == [[2, 4, 6, 8, 10, 20], [2, 4, 6, 8, 12, 18], [2, 4, 6, 8, 14, 16], [2, 4, 6, 8, 30], [2, 4, 6, 10, 12, 16], [2, 4, 6, 10, 28], [2, 4, 6, 12, 26], [2, 4, 6, 14, 24], [2, 4, 6, 16, 22], [2, 4, 6, 18, 20], [2, 4, 8, 10, 12, 14], [2, 4, 8, 10, 26], [2, 4, 8, 12, 24], [2, 4, 8, 14, 22], [2, 4, 8, 16, 20], [2, 4, 10, 12, 22], [2, 4, 10, 14, 20], [2, 4, 10, 16, 18], [2, 4, 12, 14, 18], [2, 4, 14, 30], [2, 4, 16, 28], [2, 4, 18, 26], [2, 4, 20, 24], [2, 6, 8, 10, 24], [2, 6, 8, 12, 22], [2, 6, 8, 14, 20], [2, 6, 8, 16, 18], [2, 6, 10, 12, 20], [2, 6, 10, 14, 18], [2, 6, 12, 14, 16], [2, 6, 12, 30], [2, 6, 14, 28], [2, 6, 16, 26], [2, 6, 18, 24], [2, 6, 20, 22], [2, 8, 10, 12, 18], [2, 8, 10, 14, 16], [2, 8, 10, 30], [2, 8, 12, 28], [2, 8, 14, 26], [2, 8, 16, 24], [2, 8, 18, 22], [2, 10, 12, 26], [2, 10, 14, 24], [2, 10, 16, 22], [2, 10, 18, 20], [2, 12, 14, 22], [2, 12, 16, 20], [2, 14, 16, 18], [2, 18, 30], [2, 20, 28], [2, 22, 26], [4, 6, 8, 10, 22], [4, 6, 8, 12, 20], [4, 6, 8, 14, 18], [4, 6, 10, 12, 18], [4, 6, 10, 14, 16], [4, 6, 10, 30], [4, 6, 12, 28], [4, 6, 14, 26], [4, 6, 16, 24], [4, 6, 18, 22], [4, 8, 10, 12, 16], [4, 8, 10, 28], [4, 8, 12, 26], [4, 8, 14, 24], [4, 8, 16, 22], [4, 8, 18, 20], [4, 10, 12, 24], [4, 10, 14, 22], [4, 10, 16, 20], [4, 12, 14, 20], [4, 12, 16, 18], [4, 16, 30], [4, 18, 28], [4, 20, 26], [4, 22, 24], [6, 8, 10, 12, 14], [6, 8, 10, 26], [6, 8, 12, 24], [6, 8, 14, 22], [6, 8, 16, 20], [6, 10, 12, 22], [6, 10, 14, 20], [6, 10, 16, 18], [6, 12, 14, 18], [6, 14, 30], [6, 16, 28], [6, 18, 26], [6, 20, 24], [8, 10, 12, 20], [8, 10, 14, 18], [8, 12, 14, 16], [8, 12, 30], [8, 14, 28], [8, 16, 26], [8, 18, 24], [8, 20, 22], [10, 12, 28], [10, 14, 26], [10, 16, 24], [10, 18, 22], [12, 14, 24], [12, 16, 22], [12, 18, 20], [14, 16, 20], [20, 30], [22, 28], [24, 26]]\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 = [10, 20, 30, 40, 50],target = 100) == [[10, 20, 30, 40], [10, 40, 50], [20, 30, 50]]\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 = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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 = 45) == [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]]\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 = [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 = 75) == [[1, 3, 5, 7, 9, 11, 39], [1, 3, 5, 7, 9, 13, 37], [1, 3, 5, 7, 9, 15, 35], [1, 3, 5, 7, 9, 17, 33], [1, 3, 5, 7, 9, 19, 31], [1, 3, 5, 7, 9, 21, 29], [1, 3, 5, 7, 9, 23, 27], [1, 3, 5, 7, 11, 13, 35], [1, 3, 5, 7, 11, 15, 33], [1, 3, 5, 7, 11, 17, 31], [1, 3, 5, 7, 11, 19, 29], [1, 3, 5, 7, 11, 21, 27], [1, 3, 5, 7, 11, 23, 25], [1, 3, 5, 7, 13, 15, 31], [1, 3, 5, 7, 13, 17, 29], [1, 3, 5, 7, 13, 19, 27], [1, 3, 5, 7, 13, 21, 25], [1, 3, 5, 7, 15, 17, 27], [1, 3, 5, 7, 15, 19, 25], [1, 3, 5, 7, 15, 21, 23], [1, 3, 5, 7, 17, 19, 23], [1, 3, 5, 9, 11, 13, 33], [1, 3, 5, 9, 11, 15, 31], [1, 3, 5, 9, 11, 17, 29], [1, 3, 5, 9, 11, 19, 27], [1, 3, 5, 9, 11, 21, 25], [1, 3, 5, 9, 13, 15, 29], [1, 3, 5, 9, 13, 17, 27], [1, 3, 5, 9, 13, 19, 25], [1, 3, 5, 9, 13, 21, 23], [1, 3, 5, 9, 15, 17, 25], [1, 3, 5, 9, 15, 19, 23], [1, 3, 5, 9, 17, 19, 21], [1, 3, 5, 11, 13, 15, 27], [1, 3, 5, 11, 13, 17, 25], [1, 3, 5, 11, 13, 19, 23], [1, 3, 5, 11, 15, 17, 23], [1, 3, 5, 11, 15, 19, 21], [1, 3, 5, 13, 15, 17, 21], [1, 3, 5, 17, 49], [1, 3, 5, 19, 47], [1, 3, 5, 21, 45], [1, 3, 5, 23, 43], [1, 3, 5, 25, 41], [1, 3, 5, 27, 39], [1, 3, 5, 29, 37], [1, 3, 5, 31, 35], [1, 3, 7, 9, 11, 13, 31], [1, 3, 7, 9, 11, 15, 29], [1, 3, 7, 9, 11, 17, 27], [1, 3, 7, 9, 11, 19, 25], [1, 3, 7, 9, 11, 21, 23], [1, 3, 7, 9, 13, 15, 27], [1, 3, 7, 9, 13, 17, 25], [1, 3, 7, 9, 13, 19, 23], [1, 3, 7, 9, 15, 17, 23], [1, 3, 7, 9, 15, 19, 21], [1, 3, 7, 11, 13, 15, 25], [1, 3, 7, 11, 13, 17, 23], [1, 3, 7, 11, 13, 19, 21], [1, 3, 7, 11, 15, 17, 21], [1, 3, 7, 13, 15, 17, 19], [1, 3, 7, 15, 49], [1, 3, 7, 17, 47], [1, 3, 7, 19, 45], [1, 3, 7, 21, 43], [1, 3, 7, 23, 41], [1, 3, 7, 25, 39], [1, 3, 7, 27, 37], [1, 3, 7, 29, 35], [1, 3, 7, 31, 33], [1, 3, 9, 11, 13, 15, 23], [1, 3, 9, 11, 13, 17, 21], [1, 3, 9, 11, 15, 17, 19], [1, 3, 9, 13, 49], [1, 3, 9, 15, 47], [1, 3, 9, 17, 45], [1, 3, 9, 19, 43], [1, 3, 9, 21, 41], [1, 3, 9, 23, 39], [1, 3, 9, 25, 37], [1, 3, 9, 27, 35], [1, 3, 9, 29, 33], [1, 3, 11, 13, 47], [1, 3, 11, 15, 45], [1, 3, 11, 17, 43], [1, 3, 11, 19, 41], [1, 3, 11, 21, 39], [1, 3, 11, 23, 37], [1, 3, 11, 25, 35], [1, 3, 11, 27, 33], [1, 3, 11, 29, 31], [1, 3, 13, 15, 43], [1, 3, 13, 17, 41], [1, 3, 13, 19, 39], [1, 3, 13, 21, 37], [1, 3, 13, 23, 35], [1, 3, 13, 25, 33], [1, 3, 13, 27, 31], [1, 3, 15, 17, 39], [1, 3, 15, 19, 37], [1, 3, 15, 21, 35], [1, 3, 15, 23, 33], [1, 3, 15, 25, 31], [1, 3, 15, 27, 29], [1, 3, 17, 19, 35], [1, 3, 17, 21, 33], [1, 3, 17, 23, 31], [1, 3, 17, 25, 29], [1, 3, 19, 21, 31], [1, 3, 19, 23, 29], [1, 3, 19, 25, 27], [1, 3, 21, 23, 27], [1, 5, 7, 9, 11, 13, 29], [1, 5, 7, 9, 11, 15, 27], [1, 5, 7, 9, 11, 17, 25], [1, 5, 7, 9, 11, 19, 23], [1, 5, 7, 9, 13, 15, 25], [1, 5, 7, 9, 13, 17, 23], [1, 5, 7, 9, 13, 19, 21], [1, 5, 7, 9, 15, 17, 21], [1, 5, 7, 11, 13, 15, 23], [1, 5, 7, 11, 13, 17, 21], [1, 5, 7, 11, 15, 17, 19], [1, 5, 7, 13, 49], [1, 5, 7, 15, 47], [1, 5, 7, 17, 45], [1, 5, 7, 19, 43], [1, 5, 7, 21, 41], [1, 5, 7, 23, 39], [1, 5, 7, 25, 37], [1, 5, 7, 27, 35], [1, 5, 7, 29, 33], [1, 5, 9, 11, 13, 15, 21], [1, 5, 9, 11, 13, 17, 19], [1, 5, 9, 11, 49], [1, 5, 9, 13, 47], [1, 5, 9, 15, 45], [1, 5, 9, 17, 43], [1, 5, 9, 19, 41], [1, 5, 9, 21, 39], [1, 5, 9, 23, 37], [1, 5, 9, 25, 35], [1, 5, 9, 27, 33], [1, 5, 9, 29, 31], [1, 5, 11, 13, 45], [1, 5, 11, 15, 43], [1, 5, 11, 17, 41], [1, 5, 11, 19, 39], [1, 5, 11, 21, 37], [1, 5, 11, 23, 35], [1, 5, 11, 25, 33], [1, 5, 11, 27, 31], [1, 5, 13, 15, 41], [1, 5, 13, 17, 39], [1, 5, 13, 19, 37], [1, 5, 13, 21, 35], [1, 5, 13, 23, 33], [1, 5, 13, 25, 31], [1, 5, 13, 27, 29], [1, 5, 15, 17, 37], [1, 5, 15, 19, 35], [1, 5, 15, 21, 33], [1, 5, 15, 23, 31], [1, 5, 15, 25, 29], [1, 5, 17, 19, 33], [1, 5, 17, 21, 31], [1, 5, 17, 23, 29], [1, 5, 17, 25, 27], [1, 5, 19, 21, 29], [1, 5, 19, 23, 27], [1, 5, 21, 23, 25], [1, 7, 9, 11, 13, 15, 19], [1, 7, 9, 11, 47], [1, 7, 9, 13, 45], [1, 7, 9, 15, 43], [1, 7, 9, 17, 41], [1, 7, 9, 19, 39], [1, 7, 9, 21, 37], [1, 7, 9, 23, 35], [1, 7, 9, 25, 33], [1, 7, 9, 27, 31], [1, 7, 11, 13, 43], [1, 7, 11, 15, 41], [1, 7, 11, 17, 39], [1, 7, 11, 19, 37], [1, 7, 11, 21, 35], [1, 7, 11, 23, 33], [1, 7, 11, 25, 31], [1, 7, 11, 27, 29], [1, 7, 13, 15, 39], [1, 7, 13, 17, 37], [1, 7, 13, 19, 35], [1, 7, 13, 21, 33], [1, 7, 13, 23, 31], [1, 7, 13, 25, 29], [1, 7, 15, 17, 35], [1, 7, 15, 19, 33], [1, 7, 15, 21, 31], [1, 7, 15, 23, 29], [1, 7, 15, 25, 27], [1, 7, 17, 19, 31], [1, 7, 17, 21, 29], [1, 7, 17, 23, 27], [1, 7, 19, 21, 27], [1, 7, 19, 23, 25], [1, 9, 11, 13, 41], [1, 9, 11, 15, 39], [1, 9, 11, 17, 37], [1, 9, 11, 19, 35], [1, 9, 11, 21, 33], [1, 9, 11, 23, 31], [1, 9, 11, 25, 29], [1, 9, 13, 15, 37], [1, 9, 13, 17, 35], [1, 9, 13, 19, 33], [1, 9, 13, 21, 31], [1, 9, 13, 23, 29], [1, 9, 13, 25, 27], [1, 9, 15, 17, 33], [1, 9, 15, 19, 31], [1, 9, 15, 21, 29], [1, 9, 15, 23, 27], [1, 9, 17, 19, 29], [1, 9, 17, 21, 27], [1, 9, 17, 23, 25], [1, 9, 19, 21, 25], [1, 11, 13, 15, 35], [1, 11, 13, 17, 33], [1, 11, 13, 19, 31], [1, 11, 13, 21, 29], [1, 11, 13, 23, 27], [1, 11, 15, 17, 31], [1, 11, 15, 19, 29], [1, 11, 15, 21, 27], [1, 11, 15, 23, 25], [1, 11, 17, 19, 27], [1, 11, 17, 21, 25], [1, 11, 19, 21, 23], [1, 13, 15, 17, 29], [1, 13, 15, 19, 27], [1, 13, 15, 21, 25], [1, 13, 17, 19, 25], [1, 13, 17, 21, 23], [1, 15, 17, 19, 23], [1, 25, 49], [1, 27, 47], [1, 29, 45], [1, 31, 43], [1, 33, 41], [1, 35, 39], [3, 5, 7, 9, 11, 13, 27], [3, 5, 7, 9, 11, 15, 25], [3, 5, 7, 9, 11, 17, 23], [3, 5, 7, 9, 11, 19, 21], [3, 5, 7, 9, 13, 15, 23], [3, 5, 7, 9, 13, 17, 21], [3, 5, 7, 9, 15, 17, 19], [3, 5, 7, 11, 13, 15, 21], [3, 5, 7, 11, 13, 17, 19], [3, 5, 7, 11, 49], [3, 5, 7, 13, 47], [3, 5, 7, 15, 45], [3, 5, 7, 17, 43], [3, 5, 7, 19, 41], [3, 5, 7, 21, 39], [3, 5, 7, 23, 37], [3, 5, 7, 25, 35], [3, 5, 7, 27, 33], [3, 5, 7, 29, 31], [3, 5, 9, 11, 13, 15, 19], [3, 5, 9, 11, 47], [3, 5, 9, 13, 45], [3, 5, 9, 15, 43], [3, 5, 9, 17, 41], [3, 5, 9, 19, 39], [3, 5, 9, 21, 37], [3, 5, 9, 23, 35], [3, 5, 9, 25, 33], [3, 5, 9, 27, 31], [3, 5, 11, 13, 43], [3, 5, 11, 15, 41], [3, 5, 11, 17, 39], [3, 5, 11, 19, 37], [3, 5, 11, 21, 35], [3, 5, 11, 23, 33], [3, 5, 11, 25, 31], [3, 5, 11, 27, 29], [3, 5, 13, 15, 39], [3, 5, 13, 17, 37], [3, 5, 13, 19, 35], [3, 5, 13, 21, 33], [3, 5, 13, 23, 31], [3, 5, 13, 25, 29], [3, 5, 15, 17, 35], [3, 5, 15, 19, 33], [3, 5, 15, 21, 31], [3, 5, 15, 23, 29], [3, 5, 15, 25, 27], [3, 5, 17, 19, 31], [3, 5, 17, 21, 29], [3, 5, 17, 23, 27], [3, 5, 19, 21, 27], [3, 5, 19, 23, 25], [3, 7, 9, 11, 13, 15, 17], [3, 7, 9, 11, 45], [3, 7, 9, 13, 43], [3, 7, 9, 15, 41], [3, 7, 9, 17, 39], [3, 7, 9, 19, 37], [3, 7, 9, 21, 35], [3, 7, 9, 23, 33], [3, 7, 9, 25, 31], [3, 7, 9, 27, 29], [3, 7, 11, 13, 41], [3, 7, 11, 15, 39], [3, 7, 11, 17, 37], [3, 7, 11, 19, 35], [3, 7, 11, 21, 33], [3, 7, 11, 23, 31], [3, 7, 11, 25, 29], [3, 7, 13, 15, 37], [3, 7, 13, 17, 35], [3, 7, 13, 19, 33], [3, 7, 13, 21, 31], [3, 7, 13, 23, 29], [3, 7, 13, 25, 27], [3, 7, 15, 17, 33], [3, 7, 15, 19, 31], [3, 7, 15, 21, 29], [3, 7, 15, 23, 27], [3, 7, 17, 19, 29], [3, 7, 17, 21, 27], [3, 7, 17, 23, 25], [3, 7, 19, 21, 25], [3, 9, 11, 13, 39], [3, 9, 11, 15, 37], [3, 9, 11, 17, 35], [3, 9, 11, 19, 33], [3, 9, 11, 21, 31], [3, 9, 11, 23, 29], [3, 9, 11, 25, 27], [3, 9, 13, 15, 35], [3, 9, 13, 17, 33], [3, 9, 13, 19, 31], [3, 9, 13, 21, 29], [3, 9, 13, 23, 27], [3, 9, 15, 17, 31], [3, 9, 15, 19, 29], [3, 9, 15, 21, 27], [3, 9, 15, 23, 25], [3, 9, 17, 19, 27], [3, 9, 17, 21, 25], [3, 9, 19, 21, 23], [3, 11, 13, 15, 33], [3, 11, 13, 17, 31], [3, 11, 13, 19, 29], [3, 11, 13, 21, 27], [3, 11, 13, 23, 25], [3, 11, 15, 17, 29], [3, 11, 15, 19, 27], [3, 11, 15, 21, 25], [3, 11, 17, 19, 25], [3, 11, 17, 21, 23], [3, 13, 15, 17, 27], [3, 13, 15, 19, 25], [3, 13, 15, 21, 23], [3, 13, 17, 19, 23], [3, 15, 17, 19, 21], [3, 23, 49], [3, 25, 47], [3, 27, 45], [3, 29, 43], [3, 31, 41], [3, 33, 39], [3, 35, 37], [5, 7, 9, 11, 43], [5, 7, 9, 13, 41], [5, 7, 9, 15, 39], [5, 7, 9, 17, 37], [5, 7, 9, 19, 35], [5, 7, 9, 21, 33], [5, 7, 9, 23, 31], [5, 7, 9, 25, 29], [5, 7, 11, 13, 39], [5, 7, 11, 15, 37], [5, 7, 11, 17, 35], [5, 7, 11, 19, 33], [5, 7, 11, 21, 31], [5, 7, 11, 23, 29], [5, 7, 11, 25, 27], [5, 7, 13, 15, 35], [5, 7, 13, 17, 33], [5, 7, 13, 19, 31], [5, 7, 13, 21, 29], [5, 7, 13, 23, 27], [5, 7, 15, 17, 31], [5, 7, 15, 19, 29], [5, 7, 15, 21, 27], [5, 7, 15, 23, 25], [5, 7, 17, 19, 27], [5, 7, 17, 21, 25], [5, 7, 19, 21, 23], [5, 9, 11, 13, 37], [5, 9, 11, 15, 35], [5, 9, 11, 17, 33], [5, 9, 11, 19, 31], [5, 9, 11, 21, 29], [5, 9, 11, 23, 27], [5, 9, 13, 15, 33], [5, 9, 13, 17, 31], [5, 9, 13, 19, 29], [5, 9, 13, 21, 27], [5, 9, 13, 23, 25], [5, 9, 15, 17, 29], [5, 9, 15, 19, 27], [5, 9, 15, 21, 25], [5, 9, 17, 19, 25], [5, 9, 17, 21, 23], [5, 11, 13, 15, 31], [5, 11, 13, 17, 29], [5, 11, 13, 19, 27], [5, 11, 13, 21, 25], [5, 11, 15, 17, 27], [5, 11, 15, 19, 25], [5, 11, 15, 21, 23], [5, 11, 17, 19, 23], [5, 13, 15, 17, 25], [5, 13, 15, 19, 23], [5, 13, 17, 19, 21], [5, 21, 49], [5, 23, 47], [5, 25, 45], [5, 27, 43], [5, 29, 41], [5, 31, 39], [5, 33, 37], [7, 9, 11, 13, 35], [7, 9, 11, 15, 33], [7, 9, 11, 17, 31], [7, 9, 11, 19, 29], [7, 9, 11, 21, 27], [7, 9, 11, 23, 25], [7, 9, 13, 15, 31], [7, 9, 13, 17, 29], [7, 9, 13, 19, 27], [7, 9, 13, 21, 25], [7, 9, 15, 17, 27], [7, 9, 15, 19, 25], [7, 9, 15, 21, 23], [7, 9, 17, 19, 23], [7, 11, 13, 15, 29], [7, 11, 13, 17, 27], [7, 11, 13, 19, 25], [7, 11, 13, 21, 23], [7, 11, 15, 17, 25], [7, 11, 15, 19, 23], [7, 11, 17, 19, 21], [7, 13, 15, 17, 23], [7, 13, 15, 19, 21], [7, 19, 49], [7, 21, 47], [7, 23, 45], [7, 25, 43], [7, 27, 41], [7, 29, 39], [7, 31, 37], [7, 33, 35], [9, 11, 13, 15, 27], [9, 11, 13, 17, 25], [9, 11, 13, 19, 23], [9, 11, 15, 17, 23], [9, 11, 15, 19, 21], [9, 13, 15, 17, 21], [9, 17, 49], [9, 19, 47], [9, 21, 45], [9, 23, 43], [9, 25, 41], [9, 27, 39], [9, 29, 37], [9, 31, 35], [11, 13, 15, 17, 19], [11, 15, 49], [11, 17, 47], [11, 19, 45], [11, 21, 43], [11, 23, 41], [11, 25, 39], [11, 27, 37], [11, 29, 35], [11, 31, 33], [13, 15, 47], [13, 17, 45], [13, 19, 43], [13, 21, 41], [13, 23, 39], [13, 25, 37], [13, 27, 35], [13, 29, 33], [15, 17, 43], [15, 19, 41], [15, 21, 39], [15, 23, 37], [15, 25, 35], [15, 27, 33], [15, 29, 31], [17, 19, 39], [17, 21, 37], [17, 23, 35], [17, 25, 33], [17, 27, 31], [19, 21, 35], [19, 23, 33], [19, 25, 31], [19, 27, 29], [21, 23, 31], [21, 25, 29], [23, 25, 27]]\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 = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],target = 56) == [[8, 8, 8, 8, 8, 8, 8]]\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 = [10, 15, 20, 25, 30, 35, 40],target = 60) == [[10, 15, 35], [10, 20, 30], [15, 20, 25], [20, 40], [25, 35]]\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, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 150) == [[10, 20, 30, 40, 50], [10, 20, 30, 90], [10, 20, 40, 80], [10, 20, 50, 70], [10, 30, 40, 70], [10, 30, 50, 60], [10, 40, 100], [10, 50, 90], [10, 60, 80], [20, 30, 40, 60], [20, 30, 100], [20, 40, 90], [20, 50, 80], [20, 60, 70], [30, 40, 80], [30, 50, 70], [40, 50, 60], [50, 100], [60, 90], [70, 80]]\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 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 150) == [[10, 20, 30, 40, 50], [10, 20, 30, 90], [10, 20, 40, 80], [10, 20, 50, 70], [10, 30, 40, 70], [10, 30, 50, 60], [10, 40, 100], [10, 50, 90], [10, 60, 80], [20, 30, 40, 60], [20, 30, 100], [20, 40, 90], [20, 50, 80], [20, 60, 70], [30, 40, 80], [30, 50, 70], [40, 50, 60], [50, 100], [60, 90], [70, 80]]\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, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],target = 45) == [[1, 3, 5, 7, 29], [1, 3, 5, 9, 27], [1, 3, 5, 11, 25], [1, 3, 5, 13, 23], [1, 3, 5, 15, 21], [1, 3, 5, 17, 19], [1, 3, 7, 9, 25], [1, 3, 7, 11, 23], [1, 3, 7, 13, 21], [1, 3, 7, 15, 19], [1, 3, 9, 11, 21], [1, 3, 9, 13, 19], [1, 3, 9, 15, 17], [1, 3, 11, 13, 17], [1, 5, 7, 9, 23], [1, 5, 7, 11, 21], [1, 5, 7, 13, 19], [1, 5, 7, 15, 17], [1, 5, 9, 11, 19], [1, 5, 9, 13, 17], [1, 5, 11, 13, 15], [1, 7, 9, 11, 17], [1, 7, 9, 13, 15], [1, 13, 31], [1, 15, 29], [1, 17, 27], [1, 19, 25], [1, 21, 23], [3, 5, 7, 9, 21], [3, 5, 7, 11, 19], [3, 5, 7, 13, 17], [3, 5, 9, 11, 17], [3, 5, 9, 13, 15], [3, 7, 9, 11, 15], [3, 11, 31], [3, 13, 29], [3, 15, 27], [3, 17, 25], [3, 19, 23], [5, 7, 9, 11, 13], [5, 9, 31], [5, 11, 29], [5, 13, 27], [5, 15, 25], [5, 17, 23], [5, 19, 21], [7, 9, 29], [7, 11, 27], [7, 13, 25], [7, 15, 23], [7, 17, 21], [9, 11, 25], [9, 13, 23], [9, 15, 21], [9, 17, 19], [11, 13, 21], [11, 15, 19], [13, 15, 17]]\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 = [3, 30, 3, 9, 4, 9, 8, 5, 5, 2, 18, 6, 3, 7, 15, 6, 4],target = 49) == [[2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 8], [2, 3, 3, 3, 4, 4, 5, 7, 9, 9], [2, 3, 3, 3, 4, 4, 5, 7, 18], [2, 3, 3, 3, 4, 4, 6, 6, 9, 9], [2, 3, 3, 3, 4, 4, 6, 6, 18], [2, 3, 3, 3, 4, 4, 6, 7, 8, 9], [2, 3, 3, 3, 4, 4, 6, 9, 15], [2, 3, 3, 3, 4, 4, 7, 8, 15], [2, 3, 3, 3, 4, 4, 30], [2, 3, 3, 3, 4, 5, 5, 6, 9, 9], [2, 3, 3, 3, 4, 5, 5, 6, 18], [2, 3, 3, 3, 4, 5, 5, 7, 8, 9], [2, 3, 3, 3, 4, 5, 5, 9, 15], [2, 3, 3, 3, 4, 5, 6, 6, 8, 9], [2, 3, 3, 3, 4, 5, 6, 8, 15], [2, 3, 3, 3, 4, 6, 6, 7, 15], [2, 3, 3, 3, 4, 7, 9, 18], [2, 3, 3, 3, 5, 5, 6, 6, 7, 9], [2, 3, 3, 3, 5, 5, 6, 7, 15], [2, 3, 3, 3, 5, 6, 9, 18], [2, 3, 3, 3, 5, 7, 8, 9, 9], [2, 3, 3, 3, 5, 7, 8, 18], [2, 3, 3, 3, 5, 9, 9, 15], [2, 3, 3, 3, 5, 15, 18], [2, 3, 3, 3, 6, 6, 8, 9, 9], [2, 3, 3, 3, 6, 6, 8, 18], [2, 3, 3, 3, 6, 8, 9, 15], [2, 3, 3, 3, 8, 30], [2, 3, 3, 4, 4, 5, 5, 6, 8, 9], [2, 3, 3, 4, 4, 5, 5, 8, 15], [2, 3, 3, 4, 4, 5, 6, 6, 7, 9], [2, 3, 3, 4, 4, 5, 6, 7, 15], [2, 3, 3, 4, 4, 6, 9, 18], [2, 3, 3, 4, 4, 7, 8, 9, 9], [2, 3, 3, 4, 4, 7, 8, 18], [2, 3, 3, 4, 4, 9, 9, 15], [2, 3, 3, 4, 4, 15, 18], [2, 3, 3, 4, 5, 5, 6, 6, 7, 8], [2, 3, 3, 4, 5, 5, 6, 6, 15], [2, 3, 3, 4, 5, 5, 9, 18], [2, 3, 3, 4, 5, 6, 8, 9, 9], [2, 3, 3, 4, 5, 6, 8, 18], [2, 3, 3, 4, 5, 8, 9, 15], [2, 3, 3, 4, 6, 6, 7, 9, 9], [2, 3, 3, 4, 6, 6, 7, 18], [2, 3, 3, 4, 6, 7, 9, 15], [2, 3, 3, 4, 7, 30], [2, 3, 3, 5, 5, 6, 7, 9, 9], [2, 3, 3, 5, 5, 6, 7, 18], [2, 3, 3, 5, 5, 7, 9, 15], [2, 3, 3, 5, 6, 6, 7, 8, 9], [2, 3, 3, 5, 6, 6, 9, 15], [2, 3, 3, 5, 6, 7, 8, 15], [2, 3, 3, 5, 6, 30], [2, 3, 3, 5, 9, 9, 18], [2, 3, 3, 6, 8, 9, 18], [2, 3, 3, 8, 9, 9, 15], [2, 3, 3, 8, 15, 18], [2, 3, 4, 4, 5, 5, 8, 9, 9], [2, 3, 4, 4, 5, 5, 8, 18], [2, 3, 4, 4, 5, 6, 7, 9, 9], [2, 3, 4, 4, 5, 6, 7, 18], [2, 3, 4, 4, 5, 7, 9, 15], [2, 3, 4, 4, 6, 6, 7, 8, 9], [2, 3, 4, 4, 6, 6, 9, 15], [2, 3, 4, 4, 6, 7, 8, 15], [2, 3, 4, 4, 6, 30], [2, 3, 4, 4, 9, 9, 18], [2, 3, 4, 5, 5, 6, 6, 9, 9], [2, 3, 4, 5, 5, 6, 6, 18], [2, 3, 4, 5, 5, 6, 7, 8, 9], [2, 3, 4, 5, 5, 6, 9, 15], [2, 3, 4, 5, 5, 7, 8, 15], [2, 3, 4, 5, 5, 30], [2, 3, 4, 5, 6, 6, 8, 15], [2, 3, 4, 5, 8, 9, 18], [2, 3, 4, 6, 7, 9, 18], [2, 3, 4, 7, 9, 9, 15], [2, 3, 4, 7, 15, 18], [2, 3, 5, 5, 6, 6, 7, 15], [2, 3, 5, 5, 7, 9, 18], [2, 3, 5, 6, 6, 9, 18], [2, 3, 5, 6, 7, 8, 9, 9], [2, 3, 5, 6, 7, 8, 18], [2, 3, 5, 6, 9, 9, 15], [2, 3, 5, 6, 15, 18], [2, 3, 5, 7, 8, 9, 15], [2, 3, 5, 9, 30], [2, 3, 6, 6, 8, 9, 15], [2, 3, 6, 8, 30], [2, 3, 8, 9, 9, 18], [2, 4, 4, 5, 5, 6, 6, 8, 9], [2, 4, 4, 5, 5, 6, 8, 15], [2, 4, 4, 5, 6, 6, 7, 15], [2, 4, 4, 5, 7, 9, 18], [2, 4, 4, 6, 6, 9, 18], [2, 4, 4, 6, 7, 8, 9, 9], [2, 4, 4, 6, 7, 8, 18], [2, 4, 4, 6, 9, 9, 15], [2, 4, 4, 6, 15, 18], [2, 4, 4, 7, 8, 9, 15], [2, 4, 4, 9, 30], [2, 4, 5, 5, 6, 9, 18], [2, 4, 5, 5, 7, 8, 9, 9], [2, 4, 5, 5, 7, 8, 18], [2, 4, 5, 5, 9, 9, 15], [2, 4, 5, 5, 15, 18], [2, 4, 5, 6, 6, 8, 9, 9], [2, 4, 5, 6, 6, 8, 18], [2, 4, 5, 6, 8, 9, 15], [2, 4, 5, 8, 30], [2, 4, 6, 6, 7, 9, 15], [2, 4, 6, 7, 30], [2, 4, 7, 9, 9, 18], [2, 5, 5, 6, 6, 7, 9, 9], [2, 5, 5, 6, 6, 7, 18], [2, 5, 5, 6, 7, 9, 15], [2, 5, 5, 7, 30], [2, 5, 6, 6, 7, 8, 15], [2, 5, 6, 6, 30], [2, 5, 6, 9, 9, 18], [2, 5, 7, 8, 9, 18], [2, 5, 9, 15, 18], [2, 6, 6, 8, 9, 18], [2, 6, 8, 9, 9, 15], [2, 6, 8, 15, 18], [2, 8, 9, 30], [3, 3, 3, 4, 4, 5, 5, 6, 7, 9], [3, 3, 3, 4, 4, 5, 5, 7, 15], [3, 3, 3, 4, 4, 5, 6, 6, 7, 8], [3, 3, 3, 4, 4, 5, 6, 6, 15], [3, 3, 3, 4, 4, 5, 9, 18], [3, 3, 3, 4, 4, 6, 8, 9, 9], [3, 3, 3, 4, 4, 6, 8, 18], [3, 3, 3, 4, 4, 8, 9, 15], [3, 3, 3, 4, 5, 5, 8, 9, 9], [3, 3, 3, 4, 5, 5, 8, 18], [3, 3, 3, 4, 5, 6, 7, 9, 9], [3, 3, 3, 4, 5, 6, 7, 18], [3, 3, 3, 4, 5, 7, 9, 15], [3, 3, 3, 4, 6, 6, 7, 8, 9], [3, 3, 3, 4, 6, 6, 9, 15], [3, 3, 3, 4, 6, 7, 8, 15], [3, 3, 3, 4, 6, 30], [3, 3, 3, 4, 9, 9, 18], [3, 3, 3, 5, 5, 6, 6, 9, 9], [3, 3, 3, 5, 5, 6, 6, 18], [3, 3, 3, 5, 5, 6, 7, 8, 9], [3, 3, 3, 5, 5, 6, 9, 15], [3, 3, 3, 5, 5, 7, 8, 15], [3, 3, 3, 5, 5, 30], [3, 3, 3, 5, 6, 6, 8, 15], [3, 3, 3, 5, 8, 9, 18], [3, 3, 3, 6, 7, 9, 18], [3, 3, 3, 7, 9, 9, 15], [3, 3, 3, 7, 15, 18], [3, 3, 4, 4, 5, 5, 7, 9, 9], [3, 3, 4, 4, 5, 5, 7, 18], [3, 3, 4, 4, 5, 6, 6, 9, 9], [3, 3, 4, 4, 5, 6, 6, 18], [3, 3, 4, 4, 5, 6, 7, 8, 9], [3, 3, 4, 4, 5, 6, 9, 15], [3, 3, 4, 4, 5, 7, 8, 15], [3, 3, 4, 4, 5, 30], [3, 3, 4, 4, 6, 6, 8, 15], [3, 3, 4, 4, 8, 9, 18], [3, 3, 4, 5, 5, 6, 6, 8, 9], [3, 3, 4, 5, 5, 6, 8, 15], [3, 3, 4, 5, 6, 6, 7, 15], [3, 3, 4, 5, 7, 9, 18], [3, 3, 4, 6, 6, 9, 18], [3, 3, 4, 6, 7, 8, 9, 9], [3, 3, 4, 6, 7, 8, 18], [3, 3, 4, 6, 9, 9, 15], [3, 3, 4, 6, 15, 18], [3, 3, 4, 7, 8, 9, 15], [3, 3, 4, 9, 30], [3, 3, 5, 5, 6, 9, 18], [3, 3, 5, 5, 7, 8, 9, 9], [3, 3, 5, 5, 7, 8, 18], [3, 3, 5, 5, 9, 9, 15], [3, 3, 5, 5, 15, 18], [3, 3, 5, 6, 6, 8, 9, 9], [3, 3, 5, 6, 6, 8, 18], [3, 3, 5, 6, 8, 9, 15], [3, 3, 5, 8, 30], [3, 3, 6, 6, 7, 9, 15], [3, 3, 6, 7, 30], [3, 3, 7, 9, 9, 18], [3, 4, 4, 5, 5, 6, 6, 7, 9], [3, 4, 4, 5, 5, 6, 7, 15], [3, 4, 4, 5, 6, 9, 18], [3, 4, 4, 5, 7, 8, 9, 9], [3, 4, 4, 5, 7, 8, 18], [3, 4, 4, 5, 9, 9, 15], [3, 4, 4, 5, 15, 18], [3, 4, 4, 6, 6, 8, 9, 9], [3, 4, 4, 6, 6, 8, 18], [3, 4, 4, 6, 8, 9, 15], [3, 4, 4, 8, 30], [3, 4, 5, 5, 6, 8, 9, 9], [3, 4, 5, 5, 6, 8, 18], [3, 4, 5, 5, 8, 9, 15], [3, 4, 5, 6, 6, 7, 9, 9], [3, 4, 5, 6, 6, 7, 18], [3, 4, 5, 6, 7, 9, 15], [3, 4, 5, 7, 30], [3, 4, 6, 6, 7, 8, 15], [3, 4, 6, 6, 30], [3, 4, 6, 9, 9, 18], [3, 4, 7, 8, 9, 18], [3, 4, 9, 15, 18], [3, 5, 5, 6, 6, 7, 8, 9], [3, 5, 5, 6, 6, 9, 15], [3, 5, 5, 6, 7, 8, 15], [3, 5, 5, 6, 30], [3, 5, 5, 9, 9, 18], [3, 5, 6, 8, 9, 18], [3, 5, 8, 9, 9, 15], [3, 5, 8, 15, 18], [3, 6, 6, 7, 9, 18], [3, 6, 7, 9, 9, 15], [3, 6, 7, 15, 18], [3, 7, 9, 30], [4, 4, 5, 5, 6, 7, 9, 9], [4, 4, 5, 5, 6, 7, 18], [4, 4, 5, 5, 7, 9, 15], [4, 4, 5, 6, 6, 7, 8, 9], [4, 4, 5, 6, 6, 9, 15], [4, 4, 5, 6, 7, 8, 15], [4, 4, 5, 6, 30], [4, 4, 5, 9, 9, 18], [4, 4, 6, 8, 9, 18], [4, 4, 8, 9, 9, 15], [4, 4, 8, 15, 18], [4, 5, 5, 6, 6, 8, 15], [4, 5, 5, 8, 9, 18], [4, 5, 6, 7, 9, 18], [4, 5, 7, 9, 9, 15], [4, 5, 7, 15, 18], [4, 6, 6, 7, 8, 9, 9], [4, 6, 6, 7, 8, 18], [4, 6, 6, 9, 9, 15], [4, 6, 6, 15, 18], [4, 6, 7, 8, 9, 15], [4, 6, 9, 30], [4, 7, 8, 30], [4, 15, 30], [5, 5, 6, 6, 9, 18], [5, 5, 6, 7, 8, 9, 9], [5, 5, 6, 7, 8, 18], [5, 5, 6, 9, 9, 15], [5, 5, 6, 15, 18], [5, 5, 7, 8, 9, 15], [5, 5, 9, 30], [5, 6, 6, 8, 9, 15], [5, 6, 8, 30], [5, 8, 9, 9, 18], [6, 6, 7, 30], [6, 7, 9, 9, 18], [7, 9, 15, 18]]\n assert candidate(candidates = [5, 10, 15, 20, 25, 30, 35],target = 70) == [[5, 10, 20, 35], [5, 10, 25, 30], [5, 15, 20, 30], [5, 30, 35], [10, 15, 20, 25], [10, 25, 35], [15, 20, 35], [15, 25, 30]]\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, 20, 30, 40, 50],target = 60) == [[10, 20, 30], [10, 50], [20, 40]]\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 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22],target = 40) == [[3, 4, 5, 6, 7, 15], [3, 4, 5, 6, 8, 14], [3, 4, 5, 6, 9, 13], [3, 4, 5, 6, 10, 12], [3, 4, 5, 6, 22], [3, 4, 5, 7, 8, 13], [3, 4, 5, 7, 9, 12], [3, 4, 5, 7, 10, 11], [3, 4, 5, 7, 21], [3, 4, 5, 8, 9, 11], [3, 4, 5, 8, 20], [3, 4, 5, 9, 19], [3, 4, 5, 10, 18], [3, 4, 5, 11, 17], [3, 4, 5, 12, 16], [3, 4, 5, 13, 15], [3, 4, 6, 7, 8, 12], [3, 4, 6, 7, 9, 11], [3, 4, 6, 7, 20], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 19], [3, 4, 6, 9, 18], [3, 4, 6, 10, 17], [3, 4, 6, 11, 16], [3, 4, 6, 12, 15], [3, 4, 6, 13, 14], [3, 4, 7, 8, 18], [3, 4, 7, 9, 17], [3, 4, 7, 10, 16], [3, 4, 7, 11, 15], [3, 4, 7, 12, 14], [3, 4, 8, 9, 16], [3, 4, 8, 10, 15], [3, 4, 8, 11, 14], [3, 4, 8, 12, 13], [3, 4, 9, 10, 14], [3, 4, 9, 11, 13], [3, 4, 10, 11, 12], [3, 4, 11, 22], [3, 4, 12, 21], [3, 4, 13, 20], [3, 4, 14, 19], [3, 4, 15, 18], [3, 4, 16, 17], [3, 5, 6, 7, 8, 11], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 19], [3, 5, 6, 8, 18], [3, 5, 6, 9, 17], [3, 5, 6, 10, 16], [3, 5, 6, 11, 15], [3, 5, 6, 12, 14], [3, 5, 7, 8, 17], [3, 5, 7, 9, 16], [3, 5, 7, 10, 15], [3, 5, 7, 11, 14], [3, 5, 7, 12, 13], [3, 5, 8, 9, 15], [3, 5, 8, 10, 14], [3, 5, 8, 11, 13], [3, 5, 9, 10, 13], [3, 5, 9, 11, 12], [3, 5, 10, 22], [3, 5, 11, 21], [3, 5, 12, 20], [3, 5, 13, 19], [3, 5, 14, 18], [3, 5, 15, 17], [3, 6, 7, 8, 16], [3, 6, 7, 9, 15], [3, 6, 7, 10, 14], [3, 6, 7, 11, 13], [3, 6, 8, 9, 14], [3, 6, 8, 10, 13], [3, 6, 8, 11, 12], [3, 6, 9, 10, 12], [3, 6, 9, 22], [3, 6, 10, 21], [3, 6, 11, 20], [3, 6, 12, 19], [3, 6, 13, 18], [3, 6, 14, 17], [3, 6, 15, 16], [3, 7, 8, 9, 13], [3, 7, 8, 10, 12], [3, 7, 8, 22], [3, 7, 9, 10, 11], [3, 7, 9, 21], [3, 7, 10, 20], [3, 7, 11, 19], [3, 7, 12, 18], [3, 7, 13, 17], [3, 7, 14, 16], [3, 8, 9, 20], [3, 8, 10, 19], [3, 8, 11, 18], [3, 8, 12, 17], [3, 8, 13, 16], [3, 8, 14, 15], [3, 9, 10, 18], [3, 9, 11, 17], [3, 9, 12, 16], [3, 9, 13, 15], [3, 10, 11, 16], [3, 10, 12, 15], [3, 10, 13, 14], [3, 11, 12, 14], [3, 15, 22], [3, 16, 21], [3, 17, 20], [3, 18, 19], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 18], [4, 5, 6, 8, 17], [4, 5, 6, 9, 16], [4, 5, 6, 10, 15], [4, 5, 6, 11, 14], [4, 5, 6, 12, 13], [4, 5, 7, 8, 16], [4, 5, 7, 9, 15], [4, 5, 7, 10, 14], [4, 5, 7, 11, 13], [4, 5, 8, 9, 14], [4, 5, 8, 10, 13], [4, 5, 8, 11, 12], [4, 5, 9, 10, 12], [4, 5, 9, 22], [4, 5, 10, 21], [4, 5, 11, 20], [4, 5, 12, 19], [4, 5, 13, 18], [4, 5, 14, 17], [4, 5, 15, 16], [4, 6, 7, 8, 15], [4, 6, 7, 9, 14], [4, 6, 7, 10, 13], [4, 6, 7, 11, 12], [4, 6, 8, 9, 13], [4, 6, 8, 10, 12], [4, 6, 8, 22], [4, 6, 9, 10, 11], [4, 6, 9, 21], [4, 6, 10, 20], [4, 6, 11, 19], [4, 6, 12, 18], [4, 6, 13, 17], [4, 6, 14, 16], [4, 7, 8, 9, 12], [4, 7, 8, 10, 11], [4, 7, 8, 21], [4, 7, 9, 20], [4, 7, 10, 19], [4, 7, 11, 18], [4, 7, 12, 17], [4, 7, 13, 16], [4, 7, 14, 15], [4, 8, 9, 19], [4, 8, 10, 18], [4, 8, 11, 17], [4, 8, 12, 16], [4, 8, 13, 15], [4, 9, 10, 17], [4, 9, 11, 16], [4, 9, 12, 15], [4, 9, 13, 14], [4, 10, 11, 15], [4, 10, 12, 14], [4, 11, 12, 13], [4, 14, 22], [4, 15, 21], [4, 16, 20], [4, 17, 19], [5, 6, 7, 8, 14], [5, 6, 7, 9, 13], [5, 6, 7, 10, 12], [5, 6, 7, 22], [5, 6, 8, 9, 12], [5, 6, 8, 10, 11], [5, 6, 8, 21], [5, 6, 9, 20], [5, 6, 10, 19], [5, 6, 11, 18], [5, 6, 12, 17], [5, 6, 13, 16], [5, 6, 14, 15], [5, 7, 8, 9, 11], [5, 7, 8, 20], [5, 7, 9, 19], [5, 7, 10, 18], [5, 7, 11, 17], [5, 7, 12, 16], [5, 7, 13, 15], [5, 8, 9, 18], [5, 8, 10, 17], [5, 8, 11, 16], [5, 8, 12, 15], [5, 8, 13, 14], [5, 9, 10, 16], [5, 9, 11, 15], [5, 9, 12, 14], [5, 10, 11, 14], [5, 10, 12, 13], [5, 13, 22], [5, 14, 21], [5, 15, 20], [5, 16, 19], [5, 17, 18], [6, 7, 8, 9, 10], [6, 7, 8, 19], [6, 7, 9, 18], [6, 7, 10, 17], [6, 7, 11, 16], [6, 7, 12, 15], [6, 7, 13, 14], [6, 8, 9, 17], [6, 8, 10, 16], [6, 8, 11, 15], [6, 8, 12, 14], [6, 9, 10, 15], [6, 9, 11, 14], [6, 9, 12, 13], [6, 10, 11, 13], [6, 12, 22], [6, 13, 21], [6, 14, 20], [6, 15, 19], [6, 16, 18], [7, 8, 9, 16], [7, 8, 10, 15], [7, 8, 11, 14], [7, 8, 12, 13], [7, 9, 10, 14], [7, 9, 11, 13], [7, 10, 11, 12], [7, 11, 22], [7, 12, 21], [7, 13, 20], [7, 14, 19], [7, 15, 18], [7, 16, 17], [8, 9, 10, 13], [8, 9, 11, 12], [8, 10, 22], [8, 11, 21], [8, 12, 20], [8, 13, 19], [8, 14, 18], [8, 15, 17], [9, 10, 21], [9, 11, 20], [9, 12, 19], [9, 13, 18], [9, 14, 17], [9, 15, 16], [10, 11, 19], [10, 12, 18], [10, 13, 17], [10, 14, 16], [11, 12, 17], [11, 13, 16], [11, 14, 15], [12, 13, 15], [18, 22], [19, 21]]\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, 20, 30, 40, 50, 60, 70, 80, 90],target = 100) == [[10, 20, 30, 40], [10, 20, 70], [10, 30, 60], [10, 40, 50], [10, 90], [20, 30, 50], [20, 80], [30, 70], [40, 60]]\n assert candidate(candidates = [10, 20, 30, 40, 50],target = 100) == [[10, 20, 30, 40], [10, 40, 50], [20, 30, 50]]\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 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 45) == [[5, 5, 5, 5, 5, 5, 5, 5, 5]]\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 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71],target = 100) == [[2, 3, 5, 7, 11, 13, 17, 19, 23], [2, 3, 5, 7, 11, 13, 59], [2, 3, 5, 7, 11, 19, 53], [2, 3, 5, 7, 11, 29, 43], [2, 3, 5, 7, 11, 31, 41], [2, 3, 5, 7, 13, 17, 53], [2, 3, 5, 7, 13, 23, 47], [2, 3, 5, 7, 13, 29, 41], [2, 3, 5, 7, 17, 19, 47], [2, 3, 5, 7, 17, 23, 43], [2, 3, 5, 7, 17, 29, 37], [2, 3, 5, 7, 19, 23, 41], [2, 3, 5, 7, 23, 29, 31], [2, 3, 5, 11, 13, 19, 47], [2, 3, 5, 11, 13, 23, 43], [2, 3, 5, 11, 13, 29, 37], [2, 3, 5, 11, 17, 19, 43], [2, 3, 5, 11, 19, 23, 37], [2, 3, 5, 11, 19, 29, 31], [2, 3, 5, 13, 17, 19, 41], [2, 3, 5, 13, 17, 23, 37], [2, 3, 5, 13, 17, 29, 31], [2, 3, 5, 17, 19, 23, 31], [2, 3, 5, 19, 71], [2, 3, 5, 23, 67], [2, 3, 5, 29, 61], [2, 3, 5, 31, 59], [2, 3, 5, 37, 53], [2, 3, 5, 43, 47], [2, 3, 7, 11, 13, 17, 47], [2, 3, 7, 11, 13, 23, 41], [2, 3, 7, 11, 17, 19, 41], [2, 3, 7, 11, 17, 23, 37], [2, 3, 7, 11, 17, 29, 31], [2, 3, 7, 17, 19, 23, 29], [2, 3, 7, 17, 71], [2, 3, 7, 29, 59], [2, 3, 7, 41, 47], [2, 3, 11, 13, 17, 23, 31], [2, 3, 11, 13, 19, 23, 29], [2, 3, 11, 13, 71], [2, 3, 11, 17, 67], [2, 3, 11, 23, 61], [2, 3, 11, 31, 53], [2, 3, 11, 37, 47], [2, 3, 11, 41, 43], [2, 3, 13, 23, 59], [2, 3, 13, 29, 53], [2, 3, 17, 19, 59], [2, 3, 17, 31, 47], [2, 3, 17, 37, 41], [2, 3, 19, 23, 53], [2, 3, 19, 29, 47], [2, 3, 23, 29, 43], [2, 3, 23, 31, 41], [2, 5, 7, 11, 13, 19, 43], [2, 5, 7, 13, 17, 19, 37], [2, 5, 7, 13, 19, 23, 31], [2, 5, 7, 19, 67], [2, 5, 11, 13, 17, 23, 29], [2, 5, 11, 23, 59], [2, 5, 11, 29, 53], [2, 5, 13, 19, 61], [2, 5, 13, 37, 43], [2, 5, 17, 23, 53], [2, 5, 17, 29, 47], [2, 5, 19, 31, 43], [2, 5, 23, 29, 41], [2, 7, 11, 13, 17, 19, 31], [2, 7, 11, 13, 67], [2, 7, 11, 19, 61], [2, 7, 11, 37, 43], [2, 7, 13, 17, 61], [2, 7, 13, 19, 59], [2, 7, 13, 31, 47], [2, 7, 13, 37, 41], [2, 7, 17, 31, 43], [2, 7, 19, 29, 43], [2, 7, 19, 31, 41], [2, 7, 23, 31, 37], [2, 11, 13, 31, 43], [2, 11, 17, 23, 47], [2, 11, 17, 29, 41], [2, 11, 19, 31, 37], [2, 13, 17, 31, 37], [2, 13, 19, 23, 43], [2, 13, 19, 29, 37], [2, 31, 67], [2, 37, 61], [3, 5, 7, 11, 13, 61], [3, 5, 7, 11, 31, 43], [3, 5, 7, 13, 19, 53], [3, 5, 7, 13, 29, 43], [3, 5, 7, 13, 31, 41], [3, 5, 7, 17, 31, 37], [3, 5, 7, 19, 23, 43], [3, 5, 7, 19, 29, 37], [3, 5, 11, 13, 31, 37], [3, 5, 11, 17, 23, 41], [3, 5, 13, 17, 19, 43], [3, 5, 13, 19, 23, 37], [3, 5, 13, 19, 29, 31], [3, 5, 31, 61], [3, 7, 11, 13, 19, 47], [3, 7, 11, 13, 23, 43], [3, 7, 11, 13, 29, 37], [3, 7, 11, 17, 19, 43], [3, 7, 11, 19, 23, 37], [3, 7, 11, 19, 29, 31], [3, 7, 13, 17, 19, 41], [3, 7, 13, 17, 23, 37], [3, 7, 13, 17, 29, 31], [3, 7, 17, 19, 23, 31], [3, 7, 19, 71], [3, 7, 23, 67], [3, 7, 29, 61], [3, 7, 31, 59], [3, 7, 37, 53], [3, 7, 43, 47], [3, 11, 13, 17, 19, 37], [3, 11, 13, 19, 23, 31], [3, 11, 19, 67], [3, 13, 17, 67], [3, 13, 23, 61], [3, 13, 31, 53], [3, 13, 37, 47], [3, 13, 41, 43], [3, 17, 19, 61], [3, 17, 37, 43], [3, 19, 31, 47], [3, 19, 37, 41], [3, 23, 31, 43], [3, 29, 31, 37], [5, 7, 11, 13, 17, 47], [5, 7, 11, 13, 23, 41], [5, 7, 11, 17, 19, 41], [5, 7, 11, 17, 23, 37], [5, 7, 11, 17, 29, 31], [5, 7, 17, 19, 23, 29], [5, 7, 17, 71], [5, 7, 29, 59], [5, 7, 41, 47], [5, 11, 13, 17, 23, 31], [5, 11, 13, 19, 23, 29], [5, 11, 13, 71], [5, 11, 17, 67], [5, 11, 23, 61], [5, 11, 31, 53], [5, 11, 37, 47], [5, 11, 41, 43], [5, 13, 23, 59], [5, 13, 29, 53], [5, 17, 19, 59], [5, 17, 31, 47], [5, 17, 37, 41], [5, 19, 23, 53], [5, 19, 29, 47], [5, 23, 29, 43], [5, 23, 31, 41], [7, 11, 13, 17, 23, 29], [7, 11, 23, 59], [7, 11, 29, 53], [7, 13, 19, 61], [7, 13, 37, 43], [7, 17, 23, 53], [7, 17, 29, 47], [7, 19, 31, 43], [7, 23, 29, 41], [11, 13, 17, 59], [11, 13, 23, 53], [11, 13, 29, 47], [11, 17, 19, 53], [11, 17, 29, 43], [11, 17, 31, 41], [11, 19, 23, 47], [11, 19, 29, 41], [11, 23, 29, 37], [13, 17, 23, 47], [13, 17, 29, 41], [13, 19, 31, 37], [17, 19, 23, 41], [17, 23, 29, 31], [29, 71], [41, 59], [47, 53]]\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"}, "metadata": {"canonical_parameter_names": ["candidates", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum2", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> combinationSum2(vector& candidates, int target) {", "container": "Solution", "callable": "combinationSum2", "parameters": [{"name": "candidates", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 105\n-231 <= nums[i] <= 231 - 1\n\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 = []) == 1\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().firstMissingPositive", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int firstMissingPositive(vector& nums) {", "container": "Solution", "callable": "firstMissingPositive", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\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\n \nConstraints:\n\nn == height.length\n1 <= n <= 2 * 104\n0 <= height[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["height"], "leetcode_dataset_entry_point": "Solution().trap", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int trap(vector& height) {", "container": "Solution", "callable": "trap", "parameters": [{"name": "height", "type": "vector&"}], "return_type": "int", "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.\nNote: You must not use any built-in BigInteger library or convert the inputs to integer directly.\n \nExample 1:\nInput: num1 = \"2\", num2 = \"3\"\nOutput: \"6\"\nExample 2:\nInput: num1 = \"123\", num2 = \"456\"\nOutput: \"56088\"\n\n \nConstraints:\n\n1 <= num1.length, num2.length <= 200\nnum1 and num2 consist of digits only.\nBoth num1 and num2 do not contain any leading zero, except the number 0 itself.\n\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"}, "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().multiply", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string multiply(string num1, string num2) {", "container": "Solution", "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\n \nConstraints:\n\n0 <= s.length, p.length <= 2000\ns contains only lowercase English letters.\np contains only lowercase English letters, '?' or '*'.\n\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 = \"hello_world\",p = \"he*o?wo*rld\") == 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 = \"pattern_matching\",p = \"p*a*t*t*e*r_*m*a*t*c*h*i*n*g\") == False\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 = \"nested_matching\",p = \"n*es*t*e*d_*m*a*t*c*h*i*n*g\") == 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"}, "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().isMatch", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isMatch(string s, string p) {", "container": "Solution", "callable": "isMatch", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "bool", "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 nums[0].\nEach element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at nums[i], you can jump to any nums[i + j] where:\n\n0 <= j <= nums[i] and\ni + j < n\n\nReturn the minimum number of jumps to reach nums[n - 1]. The test cases are generated such that you can reach nums[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\n \nConstraints:\n\n1 <= nums.length <= 104\n0 <= nums[i] <= 1000\nIt's guaranteed that you can reach nums[n - 1].\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().jump", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int jump(vector& nums) {", "container": "Solution", "callable": "jump", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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:\nInput: nums = [1,2,3]\nOutput: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\nExample 2:\nInput: nums = [0,1]\nOutput: [[0,1],[1,0]]\nExample 3:\nInput: nums = [1]\nOutput: [[1]]\n\n \nConstraints:\n\n1 <= nums.length <= 6\n-10 <= nums[i] <= 10\nAll the integers of nums are unique.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1]) == [[1]]\n assert candidate(nums = [10, -10, 20, 30, 40, 50]) == [[10, -10, 20, 30, 40, 50], [10, -10, 20, 30, 50, 40], [10, -10, 20, 40, 30, 50], [10, -10, 20, 40, 50, 30], [10, -10, 20, 50, 30, 40], [10, -10, 20, 50, 40, 30], [10, -10, 30, 20, 40, 50], [10, -10, 30, 20, 50, 40], [10, -10, 30, 40, 20, 50], [10, -10, 30, 40, 50, 20], [10, -10, 30, 50, 20, 40], [10, -10, 30, 50, 40, 20], [10, -10, 40, 20, 30, 50], [10, -10, 40, 20, 50, 30], [10, -10, 40, 30, 20, 50], [10, -10, 40, 30, 50, 20], [10, -10, 40, 50, 20, 30], [10, -10, 40, 50, 30, 20], [10, -10, 50, 20, 30, 40], [10, -10, 50, 20, 40, 30], [10, -10, 50, 30, 20, 40], [10, -10, 50, 30, 40, 20], [10, -10, 50, 40, 20, 30], [10, -10, 50, 40, 30, 20], [10, 20, -10, 30, 40, 50], [10, 20, -10, 30, 50, 40], [10, 20, -10, 40, 30, 50], [10, 20, -10, 40, 50, 30], [10, 20, -10, 50, 30, 40], [10, 20, -10, 50, 40, 30], [10, 20, 30, -10, 40, 50], [10, 20, 30, -10, 50, 40], [10, 20, 30, 40, -10, 50], [10, 20, 30, 40, 50, -10], [10, 20, 30, 50, -10, 40], [10, 20, 30, 50, 40, -10], [10, 20, 40, -10, 30, 50], [10, 20, 40, -10, 50, 30], [10, 20, 40, 30, -10, 50], [10, 20, 40, 30, 50, -10], [10, 20, 40, 50, -10, 30], [10, 20, 40, 50, 30, -10], [10, 20, 50, -10, 30, 40], [10, 20, 50, -10, 40, 30], [10, 20, 50, 30, -10, 40], [10, 20, 50, 30, 40, -10], [10, 20, 50, 40, -10, 30], [10, 20, 50, 40, 30, -10], [10, 30, -10, 20, 40, 50], [10, 30, -10, 20, 50, 40], [10, 30, -10, 40, 20, 50], [10, 30, -10, 40, 50, 20], [10, 30, -10, 50, 20, 40], [10, 30, -10, 50, 40, 20], [10, 30, 20, -10, 40, 50], [10, 30, 20, -10, 50, 40], [10, 30, 20, 40, -10, 50], [10, 30, 20, 40, 50, -10], [10, 30, 20, 50, -10, 40], [10, 30, 20, 50, 40, -10], [10, 30, 40, -10, 20, 50], [10, 30, 40, -10, 50, 20], [10, 30, 40, 20, -10, 50], [10, 30, 40, 20, 50, -10], [10, 30, 40, 50, -10, 20], [10, 30, 40, 50, 20, -10], [10, 30, 50, -10, 20, 40], [10, 30, 50, -10, 40, 20], [10, 30, 50, 20, -10, 40], [10, 30, 50, 20, 40, -10], [10, 30, 50, 40, -10, 20], [10, 30, 50, 40, 20, -10], [10, 40, -10, 20, 30, 50], [10, 40, -10, 20, 50, 30], [10, 40, -10, 30, 20, 50], [10, 40, -10, 30, 50, 20], [10, 40, -10, 50, 20, 30], [10, 40, -10, 50, 30, 20], [10, 40, 20, -10, 30, 50], [10, 40, 20, -10, 50, 30], [10, 40, 20, 30, -10, 50], [10, 40, 20, 30, 50, -10], [10, 40, 20, 50, -10, 30], [10, 40, 20, 50, 30, -10], [10, 40, 30, -10, 20, 50], [10, 40, 30, -10, 50, 20], [10, 40, 30, 20, -10, 50], [10, 40, 30, 20, 50, -10], [10, 40, 30, 50, -10, 20], [10, 40, 30, 50, 20, -10], [10, 40, 50, -10, 20, 30], [10, 40, 50, -10, 30, 20], [10, 40, 50, 20, -10, 30], [10, 40, 50, 20, 30, -10], [10, 40, 50, 30, -10, 20], [10, 40, 50, 30, 20, -10], [10, 50, -10, 20, 30, 40], [10, 50, -10, 20, 40, 30], [10, 50, -10, 30, 20, 40], [10, 50, -10, 30, 40, 20], [10, 50, -10, 40, 20, 30], [10, 50, -10, 40, 30, 20], [10, 50, 20, -10, 30, 40], [10, 50, 20, -10, 40, 30], [10, 50, 20, 30, -10, 40], [10, 50, 20, 30, 40, -10], [10, 50, 20, 40, -10, 30], [10, 50, 20, 40, 30, -10], [10, 50, 30, -10, 20, 40], [10, 50, 30, -10, 40, 20], [10, 50, 30, 20, -10, 40], [10, 50, 30, 20, 40, -10], [10, 50, 30, 40, -10, 20], [10, 50, 30, 40, 20, -10], [10, 50, 40, -10, 20, 30], [10, 50, 40, -10, 30, 20], [10, 50, 40, 20, -10, 30], [10, 50, 40, 20, 30, -10], [10, 50, 40, 30, -10, 20], [10, 50, 40, 30, 20, -10], [-10, 10, 20, 30, 40, 50], [-10, 10, 20, 30, 50, 40], [-10, 10, 20, 40, 30, 50], [-10, 10, 20, 40, 50, 30], [-10, 10, 20, 50, 30, 40], [-10, 10, 20, 50, 40, 30], [-10, 10, 30, 20, 40, 50], [-10, 10, 30, 20, 50, 40], [-10, 10, 30, 40, 20, 50], [-10, 10, 30, 40, 50, 20], [-10, 10, 30, 50, 20, 40], [-10, 10, 30, 50, 40, 20], [-10, 10, 40, 20, 30, 50], [-10, 10, 40, 20, 50, 30], [-10, 10, 40, 30, 20, 50], [-10, 10, 40, 30, 50, 20], [-10, 10, 40, 50, 20, 30], [-10, 10, 40, 50, 30, 20], [-10, 10, 50, 20, 30, 40], [-10, 10, 50, 20, 40, 30], [-10, 10, 50, 30, 20, 40], [-10, 10, 50, 30, 40, 20], [-10, 10, 50, 40, 20, 30], [-10, 10, 50, 40, 30, 20], [-10, 20, 10, 30, 40, 50], [-10, 20, 10, 30, 50, 40], [-10, 20, 10, 40, 30, 50], [-10, 20, 10, 40, 50, 30], [-10, 20, 10, 50, 30, 40], [-10, 20, 10, 50, 40, 30], [-10, 20, 30, 10, 40, 50], [-10, 20, 30, 10, 50, 40], [-10, 20, 30, 40, 10, 50], [-10, 20, 30, 40, 50, 10], [-10, 20, 30, 50, 10, 40], [-10, 20, 30, 50, 40, 10], [-10, 20, 40, 10, 30, 50], [-10, 20, 40, 10, 50, 30], [-10, 20, 40, 30, 10, 50], [-10, 20, 40, 30, 50, 10], [-10, 20, 40, 50, 10, 30], [-10, 20, 40, 50, 30, 10], [-10, 20, 50, 10, 30, 40], [-10, 20, 50, 10, 40, 30], [-10, 20, 50, 30, 10, 40], [-10, 20, 50, 30, 40, 10], [-10, 20, 50, 40, 10, 30], [-10, 20, 50, 40, 30, 10], [-10, 30, 10, 20, 40, 50], [-10, 30, 10, 20, 50, 40], [-10, 30, 10, 40, 20, 50], [-10, 30, 10, 40, 50, 20], [-10, 30, 10, 50, 20, 40], [-10, 30, 10, 50, 40, 20], [-10, 30, 20, 10, 40, 50], [-10, 30, 20, 10, 50, 40], [-10, 30, 20, 40, 10, 50], [-10, 30, 20, 40, 50, 10], [-10, 30, 20, 50, 10, 40], [-10, 30, 20, 50, 40, 10], [-10, 30, 40, 10, 20, 50], [-10, 30, 40, 10, 50, 20], [-10, 30, 40, 20, 10, 50], [-10, 30, 40, 20, 50, 10], [-10, 30, 40, 50, 10, 20], [-10, 30, 40, 50, 20, 10], [-10, 30, 50, 10, 20, 40], [-10, 30, 50, 10, 40, 20], [-10, 30, 50, 20, 10, 40], [-10, 30, 50, 20, 40, 10], [-10, 30, 50, 40, 10, 20], [-10, 30, 50, 40, 20, 10], [-10, 40, 10, 20, 30, 50], [-10, 40, 10, 20, 50, 30], [-10, 40, 10, 30, 20, 50], [-10, 40, 10, 30, 50, 20], [-10, 40, 10, 50, 20, 30], [-10, 40, 10, 50, 30, 20], [-10, 40, 20, 10, 30, 50], [-10, 40, 20, 10, 50, 30], [-10, 40, 20, 30, 10, 50], [-10, 40, 20, 30, 50, 10], [-10, 40, 20, 50, 10, 30], [-10, 40, 20, 50, 30, 10], [-10, 40, 30, 10, 20, 50], [-10, 40, 30, 10, 50, 20], [-10, 40, 30, 20, 10, 50], [-10, 40, 30, 20, 50, 10], [-10, 40, 30, 50, 10, 20], [-10, 40, 30, 50, 20, 10], [-10, 40, 50, 10, 20, 30], [-10, 40, 50, 10, 30, 20], [-10, 40, 50, 20, 10, 30], [-10, 40, 50, 20, 30, 10], [-10, 40, 50, 30, 10, 20], [-10, 40, 50, 30, 20, 10], [-10, 50, 10, 20, 30, 40], [-10, 50, 10, 20, 40, 30], [-10, 50, 10, 30, 20, 40], [-10, 50, 10, 30, 40, 20], [-10, 50, 10, 40, 20, 30], [-10, 50, 10, 40, 30, 20], [-10, 50, 20, 10, 30, 40], [-10, 50, 20, 10, 40, 30], [-10, 50, 20, 30, 10, 40], [-10, 50, 20, 30, 40, 10], [-10, 50, 20, 40, 10, 30], [-10, 50, 20, 40, 30, 10], [-10, 50, 30, 10, 20, 40], [-10, 50, 30, 10, 40, 20], [-10, 50, 30, 20, 10, 40], [-10, 50, 30, 20, 40, 10], [-10, 50, 30, 40, 10, 20], [-10, 50, 30, 40, 20, 10], [-10, 50, 40, 10, 20, 30], [-10, 50, 40, 10, 30, 20], [-10, 50, 40, 20, 10, 30], [-10, 50, 40, 20, 30, 10], [-10, 50, 40, 30, 10, 20], [-10, 50, 40, 30, 20, 10], [20, 10, -10, 30, 40, 50], [20, 10, -10, 30, 50, 40], [20, 10, -10, 40, 30, 50], [20, 10, -10, 40, 50, 30], [20, 10, -10, 50, 30, 40], [20, 10, -10, 50, 40, 30], [20, 10, 30, -10, 40, 50], [20, 10, 30, -10, 50, 40], [20, 10, 30, 40, -10, 50], [20, 10, 30, 40, 50, -10], [20, 10, 30, 50, -10, 40], [20, 10, 30, 50, 40, -10], [20, 10, 40, -10, 30, 50], [20, 10, 40, -10, 50, 30], [20, 10, 40, 30, -10, 50], [20, 10, 40, 30, 50, -10], [20, 10, 40, 50, -10, 30], [20, 10, 40, 50, 30, -10], [20, 10, 50, -10, 30, 40], [20, 10, 50, -10, 40, 30], [20, 10, 50, 30, -10, 40], [20, 10, 50, 30, 40, -10], [20, 10, 50, 40, -10, 30], [20, 10, 50, 40, 30, -10], [20, -10, 10, 30, 40, 50], [20, -10, 10, 30, 50, 40], [20, -10, 10, 40, 30, 50], [20, -10, 10, 40, 50, 30], [20, -10, 10, 50, 30, 40], [20, -10, 10, 50, 40, 30], [20, -10, 30, 10, 40, 50], [20, -10, 30, 10, 50, 40], [20, -10, 30, 40, 10, 50], [20, -10, 30, 40, 50, 10], [20, -10, 30, 50, 10, 40], [20, -10, 30, 50, 40, 10], [20, -10, 40, 10, 30, 50], [20, -10, 40, 10, 50, 30], [20, -10, 40, 30, 10, 50], [20, -10, 40, 30, 50, 10], [20, -10, 40, 50, 10, 30], [20, -10, 40, 50, 30, 10], [20, -10, 50, 10, 30, 40], [20, -10, 50, 10, 40, 30], [20, -10, 50, 30, 10, 40], [20, -10, 50, 30, 40, 10], [20, -10, 50, 40, 10, 30], [20, -10, 50, 40, 30, 10], [20, 30, 10, -10, 40, 50], [20, 30, 10, -10, 50, 40], [20, 30, 10, 40, -10, 50], [20, 30, 10, 40, 50, -10], [20, 30, 10, 50, -10, 40], [20, 30, 10, 50, 40, -10], [20, 30, -10, 10, 40, 50], [20, 30, -10, 10, 50, 40], [20, 30, -10, 40, 10, 50], [20, 30, -10, 40, 50, 10], [20, 30, -10, 50, 10, 40], [20, 30, -10, 50, 40, 10], [20, 30, 40, 10, -10, 50], [20, 30, 40, 10, 50, -10], [20, 30, 40, -10, 10, 50], [20, 30, 40, -10, 50, 10], [20, 30, 40, 50, 10, -10], [20, 30, 40, 50, -10, 10], [20, 30, 50, 10, -10, 40], [20, 30, 50, 10, 40, -10], [20, 30, 50, -10, 10, 40], [20, 30, 50, -10, 40, 10], [20, 30, 50, 40, 10, -10], [20, 30, 50, 40, -10, 10], [20, 40, 10, -10, 30, 50], [20, 40, 10, -10, 50, 30], [20, 40, 10, 30, -10, 50], [20, 40, 10, 30, 50, -10], [20, 40, 10, 50, -10, 30], [20, 40, 10, 50, 30, -10], [20, 40, -10, 10, 30, 50], [20, 40, -10, 10, 50, 30], [20, 40, -10, 30, 10, 50], [20, 40, -10, 30, 50, 10], [20, 40, -10, 50, 10, 30], [20, 40, -10, 50, 30, 10], [20, 40, 30, 10, -10, 50], [20, 40, 30, 10, 50, -10], [20, 40, 30, -10, 10, 50], [20, 40, 30, -10, 50, 10], [20, 40, 30, 50, 10, -10], [20, 40, 30, 50, -10, 10], [20, 40, 50, 10, -10, 30], [20, 40, 50, 10, 30, -10], [20, 40, 50, -10, 10, 30], [20, 40, 50, -10, 30, 10], [20, 40, 50, 30, 10, -10], [20, 40, 50, 30, -10, 10], [20, 50, 10, -10, 30, 40], [20, 50, 10, -10, 40, 30], [20, 50, 10, 30, -10, 40], [20, 50, 10, 30, 40, -10], [20, 50, 10, 40, -10, 30], [20, 50, 10, 40, 30, -10], [20, 50, -10, 10, 30, 40], [20, 50, -10, 10, 40, 30], [20, 50, -10, 30, 10, 40], [20, 50, -10, 30, 40, 10], [20, 50, -10, 40, 10, 30], [20, 50, -10, 40, 30, 10], [20, 50, 30, 10, -10, 40], [20, 50, 30, 10, 40, -10], [20, 50, 30, -10, 10, 40], [20, 50, 30, -10, 40, 10], [20, 50, 30, 40, 10, -10], [20, 50, 30, 40, -10, 10], [20, 50, 40, 10, -10, 30], [20, 50, 40, 10, 30, -10], [20, 50, 40, -10, 10, 30], [20, 50, 40, -10, 30, 10], [20, 50, 40, 30, 10, -10], [20, 50, 40, 30, -10, 10], [30, 10, -10, 20, 40, 50], [30, 10, -10, 20, 50, 40], [30, 10, -10, 40, 20, 50], [30, 10, -10, 40, 50, 20], [30, 10, -10, 50, 20, 40], [30, 10, -10, 50, 40, 20], [30, 10, 20, -10, 40, 50], [30, 10, 20, -10, 50, 40], [30, 10, 20, 40, -10, 50], [30, 10, 20, 40, 50, -10], [30, 10, 20, 50, -10, 40], [30, 10, 20, 50, 40, -10], [30, 10, 40, -10, 20, 50], [30, 10, 40, -10, 50, 20], [30, 10, 40, 20, -10, 50], [30, 10, 40, 20, 50, -10], [30, 10, 40, 50, -10, 20], [30, 10, 40, 50, 20, -10], [30, 10, 50, -10, 20, 40], [30, 10, 50, -10, 40, 20], [30, 10, 50, 20, -10, 40], [30, 10, 50, 20, 40, -10], [30, 10, 50, 40, -10, 20], [30, 10, 50, 40, 20, -10], [30, -10, 10, 20, 40, 50], [30, -10, 10, 20, 50, 40], [30, -10, 10, 40, 20, 50], [30, -10, 10, 40, 50, 20], [30, -10, 10, 50, 20, 40], [30, -10, 10, 50, 40, 20], [30, -10, 20, 10, 40, 50], [30, -10, 20, 10, 50, 40], [30, -10, 20, 40, 10, 50], [30, -10, 20, 40, 50, 10], [30, -10, 20, 50, 10, 40], [30, -10, 20, 50, 40, 10], [30, -10, 40, 10, 20, 50], [30, -10, 40, 10, 50, 20], [30, -10, 40, 20, 10, 50], [30, -10, 40, 20, 50, 10], [30, -10, 40, 50, 10, 20], [30, -10, 40, 50, 20, 10], [30, -10, 50, 10, 20, 40], [30, -10, 50, 10, 40, 20], [30, -10, 50, 20, 10, 40], [30, -10, 50, 20, 40, 10], [30, -10, 50, 40, 10, 20], [30, -10, 50, 40, 20, 10], [30, 20, 10, -10, 40, 50], [30, 20, 10, -10, 50, 40], [30, 20, 10, 40, -10, 50], [30, 20, 10, 40, 50, -10], [30, 20, 10, 50, -10, 40], [30, 20, 10, 50, 40, -10], [30, 20, -10, 10, 40, 50], [30, 20, -10, 10, 50, 40], [30, 20, -10, 40, 10, 50], [30, 20, -10, 40, 50, 10], [30, 20, -10, 50, 10, 40], [30, 20, -10, 50, 40, 10], [30, 20, 40, 10, -10, 50], [30, 20, 40, 10, 50, -10], [30, 20, 40, -10, 10, 50], [30, 20, 40, -10, 50, 10], [30, 20, 40, 50, 10, -10], [30, 20, 40, 50, -10, 10], [30, 20, 50, 10, -10, 40], [30, 20, 50, 10, 40, -10], [30, 20, 50, -10, 10, 40], [30, 20, 50, -10, 40, 10], [30, 20, 50, 40, 10, -10], [30, 20, 50, 40, -10, 10], [30, 40, 10, -10, 20, 50], [30, 40, 10, -10, 50, 20], [30, 40, 10, 20, -10, 50], [30, 40, 10, 20, 50, -10], [30, 40, 10, 50, -10, 20], [30, 40, 10, 50, 20, -10], [30, 40, -10, 10, 20, 50], [30, 40, -10, 10, 50, 20], [30, 40, -10, 20, 10, 50], [30, 40, -10, 20, 50, 10], [30, 40, -10, 50, 10, 20], [30, 40, -10, 50, 20, 10], [30, 40, 20, 10, -10, 50], [30, 40, 20, 10, 50, -10], [30, 40, 20, -10, 10, 50], [30, 40, 20, -10, 50, 10], [30, 40, 20, 50, 10, -10], [30, 40, 20, 50, -10, 10], [30, 40, 50, 10, -10, 20], [30, 40, 50, 10, 20, -10], [30, 40, 50, -10, 10, 20], [30, 40, 50, -10, 20, 10], [30, 40, 50, 20, 10, -10], [30, 40, 50, 20, -10, 10], [30, 50, 10, -10, 20, 40], [30, 50, 10, -10, 40, 20], [30, 50, 10, 20, -10, 40], [30, 50, 10, 20, 40, -10], [30, 50, 10, 40, -10, 20], [30, 50, 10, 40, 20, -10], [30, 50, -10, 10, 20, 40], [30, 50, -10, 10, 40, 20], [30, 50, -10, 20, 10, 40], [30, 50, -10, 20, 40, 10], [30, 50, -10, 40, 10, 20], [30, 50, -10, 40, 20, 10], [30, 50, 20, 10, -10, 40], [30, 50, 20, 10, 40, -10], [30, 50, 20, -10, 10, 40], [30, 50, 20, -10, 40, 10], [30, 50, 20, 40, 10, -10], [30, 50, 20, 40, -10, 10], [30, 50, 40, 10, -10, 20], [30, 50, 40, 10, 20, -10], [30, 50, 40, -10, 10, 20], [30, 50, 40, -10, 20, 10], [30, 50, 40, 20, 10, -10], [30, 50, 40, 20, -10, 10], [40, 10, -10, 20, 30, 50], [40, 10, -10, 20, 50, 30], [40, 10, -10, 30, 20, 50], [40, 10, -10, 30, 50, 20], [40, 10, -10, 50, 20, 30], [40, 10, -10, 50, 30, 20], [40, 10, 20, -10, 30, 50], [40, 10, 20, -10, 50, 30], [40, 10, 20, 30, -10, 50], [40, 10, 20, 30, 50, -10], [40, 10, 20, 50, -10, 30], [40, 10, 20, 50, 30, -10], [40, 10, 30, -10, 20, 50], [40, 10, 30, -10, 50, 20], [40, 10, 30, 20, -10, 50], [40, 10, 30, 20, 50, -10], [40, 10, 30, 50, -10, 20], [40, 10, 30, 50, 20, -10], [40, 10, 50, -10, 20, 30], [40, 10, 50, -10, 30, 20], [40, 10, 50, 20, -10, 30], [40, 10, 50, 20, 30, -10], [40, 10, 50, 30, -10, 20], [40, 10, 50, 30, 20, -10], [40, -10, 10, 20, 30, 50], [40, -10, 10, 20, 50, 30], [40, -10, 10, 30, 20, 50], [40, -10, 10, 30, 50, 20], [40, -10, 10, 50, 20, 30], [40, -10, 10, 50, 30, 20], [40, -10, 20, 10, 30, 50], [40, -10, 20, 10, 50, 30], [40, -10, 20, 30, 10, 50], [40, -10, 20, 30, 50, 10], [40, -10, 20, 50, 10, 30], [40, -10, 20, 50, 30, 10], [40, -10, 30, 10, 20, 50], [40, -10, 30, 10, 50, 20], [40, -10, 30, 20, 10, 50], [40, -10, 30, 20, 50, 10], [40, -10, 30, 50, 10, 20], [40, -10, 30, 50, 20, 10], [40, -10, 50, 10, 20, 30], [40, -10, 50, 10, 30, 20], [40, -10, 50, 20, 10, 30], [40, -10, 50, 20, 30, 10], [40, -10, 50, 30, 10, 20], [40, -10, 50, 30, 20, 10], [40, 20, 10, -10, 30, 50], [40, 20, 10, -10, 50, 30], [40, 20, 10, 30, -10, 50], [40, 20, 10, 30, 50, -10], [40, 20, 10, 50, -10, 30], [40, 20, 10, 50, 30, -10], [40, 20, -10, 10, 30, 50], [40, 20, -10, 10, 50, 30], [40, 20, -10, 30, 10, 50], [40, 20, -10, 30, 50, 10], [40, 20, -10, 50, 10, 30], [40, 20, -10, 50, 30, 10], [40, 20, 30, 10, -10, 50], [40, 20, 30, 10, 50, -10], [40, 20, 30, -10, 10, 50], [40, 20, 30, -10, 50, 10], [40, 20, 30, 50, 10, -10], [40, 20, 30, 50, -10, 10], [40, 20, 50, 10, -10, 30], [40, 20, 50, 10, 30, -10], [40, 20, 50, -10, 10, 30], [40, 20, 50, -10, 30, 10], [40, 20, 50, 30, 10, -10], [40, 20, 50, 30, -10, 10], [40, 30, 10, -10, 20, 50], [40, 30, 10, -10, 50, 20], [40, 30, 10, 20, -10, 50], [40, 30, 10, 20, 50, -10], [40, 30, 10, 50, -10, 20], [40, 30, 10, 50, 20, -10], [40, 30, -10, 10, 20, 50], [40, 30, -10, 10, 50, 20], [40, 30, -10, 20, 10, 50], [40, 30, -10, 20, 50, 10], [40, 30, -10, 50, 10, 20], [40, 30, -10, 50, 20, 10], [40, 30, 20, 10, -10, 50], [40, 30, 20, 10, 50, -10], [40, 30, 20, -10, 10, 50], [40, 30, 20, -10, 50, 10], [40, 30, 20, 50, 10, -10], [40, 30, 20, 50, -10, 10], [40, 30, 50, 10, -10, 20], [40, 30, 50, 10, 20, -10], [40, 30, 50, -10, 10, 20], [40, 30, 50, -10, 20, 10], [40, 30, 50, 20, 10, -10], [40, 30, 50, 20, -10, 10], [40, 50, 10, -10, 20, 30], [40, 50, 10, -10, 30, 20], [40, 50, 10, 20, -10, 30], [40, 50, 10, 20, 30, -10], [40, 50, 10, 30, -10, 20], [40, 50, 10, 30, 20, -10], [40, 50, -10, 10, 20, 30], [40, 50, -10, 10, 30, 20], [40, 50, -10, 20, 10, 30], [40, 50, -10, 20, 30, 10], [40, 50, -10, 30, 10, 20], [40, 50, -10, 30, 20, 10], [40, 50, 20, 10, -10, 30], [40, 50, 20, 10, 30, -10], [40, 50, 20, -10, 10, 30], [40, 50, 20, -10, 30, 10], [40, 50, 20, 30, 10, -10], [40, 50, 20, 30, -10, 10], [40, 50, 30, 10, -10, 20], [40, 50, 30, 10, 20, -10], [40, 50, 30, -10, 10, 20], [40, 50, 30, -10, 20, 10], [40, 50, 30, 20, 10, -10], [40, 50, 30, 20, -10, 10], [50, 10, -10, 20, 30, 40], [50, 10, -10, 20, 40, 30], [50, 10, -10, 30, 20, 40], [50, 10, -10, 30, 40, 20], [50, 10, -10, 40, 20, 30], [50, 10, -10, 40, 30, 20], [50, 10, 20, -10, 30, 40], [50, 10, 20, -10, 40, 30], [50, 10, 20, 30, -10, 40], [50, 10, 20, 30, 40, -10], [50, 10, 20, 40, -10, 30], [50, 10, 20, 40, 30, -10], [50, 10, 30, -10, 20, 40], [50, 10, 30, -10, 40, 20], [50, 10, 30, 20, -10, 40], [50, 10, 30, 20, 40, -10], [50, 10, 30, 40, -10, 20], [50, 10, 30, 40, 20, -10], [50, 10, 40, -10, 20, 30], [50, 10, 40, -10, 30, 20], [50, 10, 40, 20, -10, 30], [50, 10, 40, 20, 30, -10], [50, 10, 40, 30, -10, 20], [50, 10, 40, 30, 20, -10], [50, -10, 10, 20, 30, 40], [50, -10, 10, 20, 40, 30], [50, -10, 10, 30, 20, 40], [50, -10, 10, 30, 40, 20], [50, -10, 10, 40, 20, 30], [50, -10, 10, 40, 30, 20], [50, -10, 20, 10, 30, 40], [50, -10, 20, 10, 40, 30], [50, -10, 20, 30, 10, 40], [50, -10, 20, 30, 40, 10], [50, -10, 20, 40, 10, 30], [50, -10, 20, 40, 30, 10], [50, -10, 30, 10, 20, 40], [50, -10, 30, 10, 40, 20], [50, -10, 30, 20, 10, 40], [50, -10, 30, 20, 40, 10], [50, -10, 30, 40, 10, 20], [50, -10, 30, 40, 20, 10], [50, -10, 40, 10, 20, 30], [50, -10, 40, 10, 30, 20], [50, -10, 40, 20, 10, 30], [50, -10, 40, 20, 30, 10], [50, -10, 40, 30, 10, 20], [50, -10, 40, 30, 20, 10], [50, 20, 10, -10, 30, 40], [50, 20, 10, -10, 40, 30], [50, 20, 10, 30, -10, 40], [50, 20, 10, 30, 40, -10], [50, 20, 10, 40, -10, 30], [50, 20, 10, 40, 30, -10], [50, 20, -10, 10, 30, 40], [50, 20, -10, 10, 40, 30], [50, 20, -10, 30, 10, 40], [50, 20, -10, 30, 40, 10], [50, 20, -10, 40, 10, 30], [50, 20, -10, 40, 30, 10], [50, 20, 30, 10, -10, 40], [50, 20, 30, 10, 40, -10], [50, 20, 30, -10, 10, 40], [50, 20, 30, -10, 40, 10], [50, 20, 30, 40, 10, -10], [50, 20, 30, 40, -10, 10], [50, 20, 40, 10, -10, 30], [50, 20, 40, 10, 30, -10], [50, 20, 40, -10, 10, 30], [50, 20, 40, -10, 30, 10], [50, 20, 40, 30, 10, -10], [50, 20, 40, 30, -10, 10], [50, 30, 10, -10, 20, 40], [50, 30, 10, -10, 40, 20], [50, 30, 10, 20, -10, 40], [50, 30, 10, 20, 40, -10], [50, 30, 10, 40, -10, 20], [50, 30, 10, 40, 20, -10], [50, 30, -10, 10, 20, 40], [50, 30, -10, 10, 40, 20], [50, 30, -10, 20, 10, 40], [50, 30, -10, 20, 40, 10], [50, 30, -10, 40, 10, 20], [50, 30, -10, 40, 20, 10], [50, 30, 20, 10, -10, 40], [50, 30, 20, 10, 40, -10], [50, 30, 20, -10, 10, 40], [50, 30, 20, -10, 40, 10], [50, 30, 20, 40, 10, -10], [50, 30, 20, 40, -10, 10], [50, 30, 40, 10, -10, 20], [50, 30, 40, 10, 20, -10], [50, 30, 40, -10, 10, 20], [50, 30, 40, -10, 20, 10], [50, 30, 40, 20, 10, -10], [50, 30, 40, 20, -10, 10], [50, 40, 10, -10, 20, 30], [50, 40, 10, -10, 30, 20], [50, 40, 10, 20, -10, 30], [50, 40, 10, 20, 30, -10], [50, 40, 10, 30, -10, 20], [50, 40, 10, 30, 20, -10], [50, 40, -10, 10, 20, 30], [50, 40, -10, 10, 30, 20], [50, 40, -10, 20, 10, 30], [50, 40, -10, 20, 30, 10], [50, 40, -10, 30, 10, 20], [50, 40, -10, 30, 20, 10], [50, 40, 20, 10, -10, 30], [50, 40, 20, 10, 30, -10], [50, 40, 20, -10, 10, 30], [50, 40, 20, -10, 30, 10], [50, 40, 20, 30, 10, -10], [50, 40, 20, 30, -10, 10], [50, 40, 30, 10, -10, 20], [50, 40, 30, 10, 20, -10], [50, 40, 30, -10, 10, 20], [50, 40, 30, -10, 20, 10], [50, 40, 30, 20, 10, -10], [50, 40, 30, 20, -10, 10]]\n assert 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 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 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 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 candidate(nums = [2, 3, 5, 7, 11, 13]) == [[2, 3, 5, 7, 11, 13], [2, 3, 5, 7, 13, 11], [2, 3, 5, 11, 7, 13], [2, 3, 5, 11, 13, 7], [2, 3, 5, 13, 7, 11], [2, 3, 5, 13, 11, 7], [2, 3, 7, 5, 11, 13], [2, 3, 7, 5, 13, 11], [2, 3, 7, 11, 5, 13], [2, 3, 7, 11, 13, 5], [2, 3, 7, 13, 5, 11], [2, 3, 7, 13, 11, 5], [2, 3, 11, 5, 7, 13], [2, 3, 11, 5, 13, 7], [2, 3, 11, 7, 5, 13], [2, 3, 11, 7, 13, 5], [2, 3, 11, 13, 5, 7], [2, 3, 11, 13, 7, 5], [2, 3, 13, 5, 7, 11], [2, 3, 13, 5, 11, 7], [2, 3, 13, 7, 5, 11], [2, 3, 13, 7, 11, 5], [2, 3, 13, 11, 5, 7], [2, 3, 13, 11, 7, 5], [2, 5, 3, 7, 11, 13], [2, 5, 3, 7, 13, 11], [2, 5, 3, 11, 7, 13], [2, 5, 3, 11, 13, 7], [2, 5, 3, 13, 7, 11], [2, 5, 3, 13, 11, 7], [2, 5, 7, 3, 11, 13], [2, 5, 7, 3, 13, 11], [2, 5, 7, 11, 3, 13], [2, 5, 7, 11, 13, 3], [2, 5, 7, 13, 3, 11], [2, 5, 7, 13, 11, 3], [2, 5, 11, 3, 7, 13], [2, 5, 11, 3, 13, 7], [2, 5, 11, 7, 3, 13], [2, 5, 11, 7, 13, 3], [2, 5, 11, 13, 3, 7], [2, 5, 11, 13, 7, 3], [2, 5, 13, 3, 7, 11], [2, 5, 13, 3, 11, 7], [2, 5, 13, 7, 3, 11], [2, 5, 13, 7, 11, 3], [2, 5, 13, 11, 3, 7], [2, 5, 13, 11, 7, 3], [2, 7, 3, 5, 11, 13], [2, 7, 3, 5, 13, 11], [2, 7, 3, 11, 5, 13], [2, 7, 3, 11, 13, 5], [2, 7, 3, 13, 5, 11], [2, 7, 3, 13, 11, 5], [2, 7, 5, 3, 11, 13], [2, 7, 5, 3, 13, 11], [2, 7, 5, 11, 3, 13], [2, 7, 5, 11, 13, 3], [2, 7, 5, 13, 3, 11], [2, 7, 5, 13, 11, 3], [2, 7, 11, 3, 5, 13], [2, 7, 11, 3, 13, 5], [2, 7, 11, 5, 3, 13], [2, 7, 11, 5, 13, 3], [2, 7, 11, 13, 3, 5], [2, 7, 11, 13, 5, 3], [2, 7, 13, 3, 5, 11], [2, 7, 13, 3, 11, 5], [2, 7, 13, 5, 3, 11], [2, 7, 13, 5, 11, 3], [2, 7, 13, 11, 3, 5], [2, 7, 13, 11, 5, 3], [2, 11, 3, 5, 7, 13], [2, 11, 3, 5, 13, 7], [2, 11, 3, 7, 5, 13], [2, 11, 3, 7, 13, 5], [2, 11, 3, 13, 5, 7], [2, 11, 3, 13, 7, 5], [2, 11, 5, 3, 7, 13], [2, 11, 5, 3, 13, 7], [2, 11, 5, 7, 3, 13], [2, 11, 5, 7, 13, 3], [2, 11, 5, 13, 3, 7], [2, 11, 5, 13, 7, 3], [2, 11, 7, 3, 5, 13], [2, 11, 7, 3, 13, 5], [2, 11, 7, 5, 3, 13], [2, 11, 7, 5, 13, 3], [2, 11, 7, 13, 3, 5], [2, 11, 7, 13, 5, 3], [2, 11, 13, 3, 5, 7], [2, 11, 13, 3, 7, 5], [2, 11, 13, 5, 3, 7], [2, 11, 13, 5, 7, 3], [2, 11, 13, 7, 3, 5], [2, 11, 13, 7, 5, 3], [2, 13, 3, 5, 7, 11], [2, 13, 3, 5, 11, 7], [2, 13, 3, 7, 5, 11], [2, 13, 3, 7, 11, 5], [2, 13, 3, 11, 5, 7], [2, 13, 3, 11, 7, 5], [2, 13, 5, 3, 7, 11], [2, 13, 5, 3, 11, 7], [2, 13, 5, 7, 3, 11], [2, 13, 5, 7, 11, 3], [2, 13, 5, 11, 3, 7], [2, 13, 5, 11, 7, 3], [2, 13, 7, 3, 5, 11], [2, 13, 7, 3, 11, 5], [2, 13, 7, 5, 3, 11], [2, 13, 7, 5, 11, 3], [2, 13, 7, 11, 3, 5], [2, 13, 7, 11, 5, 3], [2, 13, 11, 3, 5, 7], [2, 13, 11, 3, 7, 5], [2, 13, 11, 5, 3, 7], [2, 13, 11, 5, 7, 3], [2, 13, 11, 7, 3, 5], [2, 13, 11, 7, 5, 3], [3, 2, 5, 7, 11, 13], [3, 2, 5, 7, 13, 11], [3, 2, 5, 11, 7, 13], [3, 2, 5, 11, 13, 7], [3, 2, 5, 13, 7, 11], [3, 2, 5, 13, 11, 7], [3, 2, 7, 5, 11, 13], [3, 2, 7, 5, 13, 11], [3, 2, 7, 11, 5, 13], [3, 2, 7, 11, 13, 5], [3, 2, 7, 13, 5, 11], [3, 2, 7, 13, 11, 5], [3, 2, 11, 5, 7, 13], [3, 2, 11, 5, 13, 7], [3, 2, 11, 7, 5, 13], [3, 2, 11, 7, 13, 5], [3, 2, 11, 13, 5, 7], [3, 2, 11, 13, 7, 5], [3, 2, 13, 5, 7, 11], [3, 2, 13, 5, 11, 7], [3, 2, 13, 7, 5, 11], [3, 2, 13, 7, 11, 5], [3, 2, 13, 11, 5, 7], [3, 2, 13, 11, 7, 5], [3, 5, 2, 7, 11, 13], [3, 5, 2, 7, 13, 11], [3, 5, 2, 11, 7, 13], [3, 5, 2, 11, 13, 7], [3, 5, 2, 13, 7, 11], [3, 5, 2, 13, 11, 7], [3, 5, 7, 2, 11, 13], [3, 5, 7, 2, 13, 11], [3, 5, 7, 11, 2, 13], [3, 5, 7, 11, 13, 2], [3, 5, 7, 13, 2, 11], [3, 5, 7, 13, 11, 2], [3, 5, 11, 2, 7, 13], [3, 5, 11, 2, 13, 7], [3, 5, 11, 7, 2, 13], [3, 5, 11, 7, 13, 2], [3, 5, 11, 13, 2, 7], [3, 5, 11, 13, 7, 2], [3, 5, 13, 2, 7, 11], [3, 5, 13, 2, 11, 7], [3, 5, 13, 7, 2, 11], [3, 5, 13, 7, 11, 2], [3, 5, 13, 11, 2, 7], [3, 5, 13, 11, 7, 2], [3, 7, 2, 5, 11, 13], [3, 7, 2, 5, 13, 11], [3, 7, 2, 11, 5, 13], [3, 7, 2, 11, 13, 5], [3, 7, 2, 13, 5, 11], [3, 7, 2, 13, 11, 5], [3, 7, 5, 2, 11, 13], [3, 7, 5, 2, 13, 11], [3, 7, 5, 11, 2, 13], [3, 7, 5, 11, 13, 2], [3, 7, 5, 13, 2, 11], [3, 7, 5, 13, 11, 2], [3, 7, 11, 2, 5, 13], [3, 7, 11, 2, 13, 5], [3, 7, 11, 5, 2, 13], [3, 7, 11, 5, 13, 2], [3, 7, 11, 13, 2, 5], [3, 7, 11, 13, 5, 2], [3, 7, 13, 2, 5, 11], [3, 7, 13, 2, 11, 5], [3, 7, 13, 5, 2, 11], [3, 7, 13, 5, 11, 2], [3, 7, 13, 11, 2, 5], [3, 7, 13, 11, 5, 2], [3, 11, 2, 5, 7, 13], [3, 11, 2, 5, 13, 7], [3, 11, 2, 7, 5, 13], [3, 11, 2, 7, 13, 5], [3, 11, 2, 13, 5, 7], [3, 11, 2, 13, 7, 5], [3, 11, 5, 2, 7, 13], [3, 11, 5, 2, 13, 7], [3, 11, 5, 7, 2, 13], [3, 11, 5, 7, 13, 2], [3, 11, 5, 13, 2, 7], [3, 11, 5, 13, 7, 2], [3, 11, 7, 2, 5, 13], [3, 11, 7, 2, 13, 5], [3, 11, 7, 5, 2, 13], [3, 11, 7, 5, 13, 2], [3, 11, 7, 13, 2, 5], [3, 11, 7, 13, 5, 2], [3, 11, 13, 2, 5, 7], [3, 11, 13, 2, 7, 5], [3, 11, 13, 5, 2, 7], [3, 11, 13, 5, 7, 2], [3, 11, 13, 7, 2, 5], [3, 11, 13, 7, 5, 2], [3, 13, 2, 5, 7, 11], [3, 13, 2, 5, 11, 7], [3, 13, 2, 7, 5, 11], [3, 13, 2, 7, 11, 5], [3, 13, 2, 11, 5, 7], [3, 13, 2, 11, 7, 5], [3, 13, 5, 2, 7, 11], [3, 13, 5, 2, 11, 7], [3, 13, 5, 7, 2, 11], [3, 13, 5, 7, 11, 2], [3, 13, 5, 11, 2, 7], [3, 13, 5, 11, 7, 2], [3, 13, 7, 2, 5, 11], [3, 13, 7, 2, 11, 5], [3, 13, 7, 5, 2, 11], [3, 13, 7, 5, 11, 2], [3, 13, 7, 11, 2, 5], [3, 13, 7, 11, 5, 2], [3, 13, 11, 2, 5, 7], [3, 13, 11, 2, 7, 5], [3, 13, 11, 5, 2, 7], [3, 13, 11, 5, 7, 2], [3, 13, 11, 7, 2, 5], [3, 13, 11, 7, 5, 2], [5, 2, 3, 7, 11, 13], [5, 2, 3, 7, 13, 11], [5, 2, 3, 11, 7, 13], [5, 2, 3, 11, 13, 7], [5, 2, 3, 13, 7, 11], [5, 2, 3, 13, 11, 7], [5, 2, 7, 3, 11, 13], [5, 2, 7, 3, 13, 11], [5, 2, 7, 11, 3, 13], [5, 2, 7, 11, 13, 3], [5, 2, 7, 13, 3, 11], [5, 2, 7, 13, 11, 3], [5, 2, 11, 3, 7, 13], [5, 2, 11, 3, 13, 7], [5, 2, 11, 7, 3, 13], [5, 2, 11, 7, 13, 3], [5, 2, 11, 13, 3, 7], [5, 2, 11, 13, 7, 3], [5, 2, 13, 3, 7, 11], [5, 2, 13, 3, 11, 7], [5, 2, 13, 7, 3, 11], [5, 2, 13, 7, 11, 3], [5, 2, 13, 11, 3, 7], [5, 2, 13, 11, 7, 3], [5, 3, 2, 7, 11, 13], [5, 3, 2, 7, 13, 11], [5, 3, 2, 11, 7, 13], [5, 3, 2, 11, 13, 7], [5, 3, 2, 13, 7, 11], [5, 3, 2, 13, 11, 7], [5, 3, 7, 2, 11, 13], [5, 3, 7, 2, 13, 11], [5, 3, 7, 11, 2, 13], [5, 3, 7, 11, 13, 2], [5, 3, 7, 13, 2, 11], [5, 3, 7, 13, 11, 2], [5, 3, 11, 2, 7, 13], [5, 3, 11, 2, 13, 7], [5, 3, 11, 7, 2, 13], [5, 3, 11, 7, 13, 2], [5, 3, 11, 13, 2, 7], [5, 3, 11, 13, 7, 2], [5, 3, 13, 2, 7, 11], [5, 3, 13, 2, 11, 7], [5, 3, 13, 7, 2, 11], [5, 3, 13, 7, 11, 2], [5, 3, 13, 11, 2, 7], [5, 3, 13, 11, 7, 2], [5, 7, 2, 3, 11, 13], [5, 7, 2, 3, 13, 11], [5, 7, 2, 11, 3, 13], [5, 7, 2, 11, 13, 3], [5, 7, 2, 13, 3, 11], [5, 7, 2, 13, 11, 3], [5, 7, 3, 2, 11, 13], [5, 7, 3, 2, 13, 11], [5, 7, 3, 11, 2, 13], [5, 7, 3, 11, 13, 2], [5, 7, 3, 13, 2, 11], [5, 7, 3, 13, 11, 2], [5, 7, 11, 2, 3, 13], [5, 7, 11, 2, 13, 3], [5, 7, 11, 3, 2, 13], [5, 7, 11, 3, 13, 2], [5, 7, 11, 13, 2, 3], [5, 7, 11, 13, 3, 2], [5, 7, 13, 2, 3, 11], [5, 7, 13, 2, 11, 3], [5, 7, 13, 3, 2, 11], [5, 7, 13, 3, 11, 2], [5, 7, 13, 11, 2, 3], [5, 7, 13, 11, 3, 2], [5, 11, 2, 3, 7, 13], [5, 11, 2, 3, 13, 7], [5, 11, 2, 7, 3, 13], [5, 11, 2, 7, 13, 3], [5, 11, 2, 13, 3, 7], [5, 11, 2, 13, 7, 3], [5, 11, 3, 2, 7, 13], [5, 11, 3, 2, 13, 7], [5, 11, 3, 7, 2, 13], [5, 11, 3, 7, 13, 2], [5, 11, 3, 13, 2, 7], [5, 11, 3, 13, 7, 2], [5, 11, 7, 2, 3, 13], [5, 11, 7, 2, 13, 3], [5, 11, 7, 3, 2, 13], [5, 11, 7, 3, 13, 2], [5, 11, 7, 13, 2, 3], [5, 11, 7, 13, 3, 2], [5, 11, 13, 2, 3, 7], [5, 11, 13, 2, 7, 3], [5, 11, 13, 3, 2, 7], [5, 11, 13, 3, 7, 2], [5, 11, 13, 7, 2, 3], [5, 11, 13, 7, 3, 2], [5, 13, 2, 3, 7, 11], [5, 13, 2, 3, 11, 7], [5, 13, 2, 7, 3, 11], [5, 13, 2, 7, 11, 3], [5, 13, 2, 11, 3, 7], [5, 13, 2, 11, 7, 3], [5, 13, 3, 2, 7, 11], [5, 13, 3, 2, 11, 7], [5, 13, 3, 7, 2, 11], [5, 13, 3, 7, 11, 2], [5, 13, 3, 11, 2, 7], [5, 13, 3, 11, 7, 2], [5, 13, 7, 2, 3, 11], [5, 13, 7, 2, 11, 3], [5, 13, 7, 3, 2, 11], [5, 13, 7, 3, 11, 2], [5, 13, 7, 11, 2, 3], [5, 13, 7, 11, 3, 2], [5, 13, 11, 2, 3, 7], [5, 13, 11, 2, 7, 3], [5, 13, 11, 3, 2, 7], [5, 13, 11, 3, 7, 2], [5, 13, 11, 7, 2, 3], [5, 13, 11, 7, 3, 2], [7, 2, 3, 5, 11, 13], [7, 2, 3, 5, 13, 11], [7, 2, 3, 11, 5, 13], [7, 2, 3, 11, 13, 5], [7, 2, 3, 13, 5, 11], [7, 2, 3, 13, 11, 5], [7, 2, 5, 3, 11, 13], [7, 2, 5, 3, 13, 11], [7, 2, 5, 11, 3, 13], [7, 2, 5, 11, 13, 3], [7, 2, 5, 13, 3, 11], [7, 2, 5, 13, 11, 3], [7, 2, 11, 3, 5, 13], [7, 2, 11, 3, 13, 5], [7, 2, 11, 5, 3, 13], [7, 2, 11, 5, 13, 3], [7, 2, 11, 13, 3, 5], [7, 2, 11, 13, 5, 3], [7, 2, 13, 3, 5, 11], [7, 2, 13, 3, 11, 5], [7, 2, 13, 5, 3, 11], [7, 2, 13, 5, 11, 3], [7, 2, 13, 11, 3, 5], [7, 2, 13, 11, 5, 3], [7, 3, 2, 5, 11, 13], [7, 3, 2, 5, 13, 11], [7, 3, 2, 11, 5, 13], [7, 3, 2, 11, 13, 5], [7, 3, 2, 13, 5, 11], [7, 3, 2, 13, 11, 5], [7, 3, 5, 2, 11, 13], [7, 3, 5, 2, 13, 11], [7, 3, 5, 11, 2, 13], [7, 3, 5, 11, 13, 2], [7, 3, 5, 13, 2, 11], [7, 3, 5, 13, 11, 2], [7, 3, 11, 2, 5, 13], [7, 3, 11, 2, 13, 5], [7, 3, 11, 5, 2, 13], [7, 3, 11, 5, 13, 2], [7, 3, 11, 13, 2, 5], [7, 3, 11, 13, 5, 2], [7, 3, 13, 2, 5, 11], [7, 3, 13, 2, 11, 5], [7, 3, 13, 5, 2, 11], [7, 3, 13, 5, 11, 2], [7, 3, 13, 11, 2, 5], [7, 3, 13, 11, 5, 2], [7, 5, 2, 3, 11, 13], [7, 5, 2, 3, 13, 11], [7, 5, 2, 11, 3, 13], [7, 5, 2, 11, 13, 3], [7, 5, 2, 13, 3, 11], [7, 5, 2, 13, 11, 3], [7, 5, 3, 2, 11, 13], [7, 5, 3, 2, 13, 11], [7, 5, 3, 11, 2, 13], [7, 5, 3, 11, 13, 2], [7, 5, 3, 13, 2, 11], [7, 5, 3, 13, 11, 2], [7, 5, 11, 2, 3, 13], [7, 5, 11, 2, 13, 3], [7, 5, 11, 3, 2, 13], [7, 5, 11, 3, 13, 2], [7, 5, 11, 13, 2, 3], [7, 5, 11, 13, 3, 2], [7, 5, 13, 2, 3, 11], [7, 5, 13, 2, 11, 3], [7, 5, 13, 3, 2, 11], [7, 5, 13, 3, 11, 2], [7, 5, 13, 11, 2, 3], [7, 5, 13, 11, 3, 2], [7, 11, 2, 3, 5, 13], [7, 11, 2, 3, 13, 5], [7, 11, 2, 5, 3, 13], [7, 11, 2, 5, 13, 3], [7, 11, 2, 13, 3, 5], [7, 11, 2, 13, 5, 3], [7, 11, 3, 2, 5, 13], [7, 11, 3, 2, 13, 5], [7, 11, 3, 5, 2, 13], [7, 11, 3, 5, 13, 2], [7, 11, 3, 13, 2, 5], [7, 11, 3, 13, 5, 2], [7, 11, 5, 2, 3, 13], [7, 11, 5, 2, 13, 3], [7, 11, 5, 3, 2, 13], [7, 11, 5, 3, 13, 2], [7, 11, 5, 13, 2, 3], [7, 11, 5, 13, 3, 2], [7, 11, 13, 2, 3, 5], [7, 11, 13, 2, 5, 3], [7, 11, 13, 3, 2, 5], [7, 11, 13, 3, 5, 2], [7, 11, 13, 5, 2, 3], [7, 11, 13, 5, 3, 2], [7, 13, 2, 3, 5, 11], [7, 13, 2, 3, 11, 5], [7, 13, 2, 5, 3, 11], [7, 13, 2, 5, 11, 3], [7, 13, 2, 11, 3, 5], [7, 13, 2, 11, 5, 3], [7, 13, 3, 2, 5, 11], [7, 13, 3, 2, 11, 5], [7, 13, 3, 5, 2, 11], [7, 13, 3, 5, 11, 2], [7, 13, 3, 11, 2, 5], [7, 13, 3, 11, 5, 2], [7, 13, 5, 2, 3, 11], [7, 13, 5, 2, 11, 3], [7, 13, 5, 3, 2, 11], [7, 13, 5, 3, 11, 2], [7, 13, 5, 11, 2, 3], [7, 13, 5, 11, 3, 2], [7, 13, 11, 2, 3, 5], [7, 13, 11, 2, 5, 3], [7, 13, 11, 3, 2, 5], [7, 13, 11, 3, 5, 2], [7, 13, 11, 5, 2, 3], [7, 13, 11, 5, 3, 2], [11, 2, 3, 5, 7, 13], [11, 2, 3, 5, 13, 7], [11, 2, 3, 7, 5, 13], [11, 2, 3, 7, 13, 5], [11, 2, 3, 13, 5, 7], [11, 2, 3, 13, 7, 5], [11, 2, 5, 3, 7, 13], [11, 2, 5, 3, 13, 7], [11, 2, 5, 7, 3, 13], [11, 2, 5, 7, 13, 3], [11, 2, 5, 13, 3, 7], [11, 2, 5, 13, 7, 3], [11, 2, 7, 3, 5, 13], [11, 2, 7, 3, 13, 5], [11, 2, 7, 5, 3, 13], [11, 2, 7, 5, 13, 3], [11, 2, 7, 13, 3, 5], [11, 2, 7, 13, 5, 3], [11, 2, 13, 3, 5, 7], [11, 2, 13, 3, 7, 5], [11, 2, 13, 5, 3, 7], [11, 2, 13, 5, 7, 3], [11, 2, 13, 7, 3, 5], [11, 2, 13, 7, 5, 3], [11, 3, 2, 5, 7, 13], [11, 3, 2, 5, 13, 7], [11, 3, 2, 7, 5, 13], [11, 3, 2, 7, 13, 5], [11, 3, 2, 13, 5, 7], [11, 3, 2, 13, 7, 5], [11, 3, 5, 2, 7, 13], [11, 3, 5, 2, 13, 7], [11, 3, 5, 7, 2, 13], [11, 3, 5, 7, 13, 2], [11, 3, 5, 13, 2, 7], [11, 3, 5, 13, 7, 2], [11, 3, 7, 2, 5, 13], [11, 3, 7, 2, 13, 5], [11, 3, 7, 5, 2, 13], [11, 3, 7, 5, 13, 2], [11, 3, 7, 13, 2, 5], [11, 3, 7, 13, 5, 2], [11, 3, 13, 2, 5, 7], [11, 3, 13, 2, 7, 5], [11, 3, 13, 5, 2, 7], [11, 3, 13, 5, 7, 2], [11, 3, 13, 7, 2, 5], [11, 3, 13, 7, 5, 2], [11, 5, 2, 3, 7, 13], [11, 5, 2, 3, 13, 7], [11, 5, 2, 7, 3, 13], [11, 5, 2, 7, 13, 3], [11, 5, 2, 13, 3, 7], [11, 5, 2, 13, 7, 3], [11, 5, 3, 2, 7, 13], [11, 5, 3, 2, 13, 7], [11, 5, 3, 7, 2, 13], [11, 5, 3, 7, 13, 2], [11, 5, 3, 13, 2, 7], [11, 5, 3, 13, 7, 2], [11, 5, 7, 2, 3, 13], [11, 5, 7, 2, 13, 3], [11, 5, 7, 3, 2, 13], [11, 5, 7, 3, 13, 2], [11, 5, 7, 13, 2, 3], [11, 5, 7, 13, 3, 2], [11, 5, 13, 2, 3, 7], [11, 5, 13, 2, 7, 3], [11, 5, 13, 3, 2, 7], [11, 5, 13, 3, 7, 2], [11, 5, 13, 7, 2, 3], [11, 5, 13, 7, 3, 2], [11, 7, 2, 3, 5, 13], [11, 7, 2, 3, 13, 5], [11, 7, 2, 5, 3, 13], [11, 7, 2, 5, 13, 3], [11, 7, 2, 13, 3, 5], [11, 7, 2, 13, 5, 3], [11, 7, 3, 2, 5, 13], [11, 7, 3, 2, 13, 5], [11, 7, 3, 5, 2, 13], [11, 7, 3, 5, 13, 2], [11, 7, 3, 13, 2, 5], [11, 7, 3, 13, 5, 2], [11, 7, 5, 2, 3, 13], [11, 7, 5, 2, 13, 3], [11, 7, 5, 3, 2, 13], [11, 7, 5, 3, 13, 2], [11, 7, 5, 13, 2, 3], [11, 7, 5, 13, 3, 2], [11, 7, 13, 2, 3, 5], [11, 7, 13, 2, 5, 3], [11, 7, 13, 3, 2, 5], [11, 7, 13, 3, 5, 2], [11, 7, 13, 5, 2, 3], [11, 7, 13, 5, 3, 2], [11, 13, 2, 3, 5, 7], [11, 13, 2, 3, 7, 5], [11, 13, 2, 5, 3, 7], [11, 13, 2, 5, 7, 3], [11, 13, 2, 7, 3, 5], [11, 13, 2, 7, 5, 3], [11, 13, 3, 2, 5, 7], [11, 13, 3, 2, 7, 5], [11, 13, 3, 5, 2, 7], [11, 13, 3, 5, 7, 2], [11, 13, 3, 7, 2, 5], [11, 13, 3, 7, 5, 2], [11, 13, 5, 2, 3, 7], [11, 13, 5, 2, 7, 3], [11, 13, 5, 3, 2, 7], [11, 13, 5, 3, 7, 2], [11, 13, 5, 7, 2, 3], [11, 13, 5, 7, 3, 2], [11, 13, 7, 2, 3, 5], [11, 13, 7, 2, 5, 3], [11, 13, 7, 3, 2, 5], [11, 13, 7, 3, 5, 2], [11, 13, 7, 5, 2, 3], [11, 13, 7, 5, 3, 2], [13, 2, 3, 5, 7, 11], [13, 2, 3, 5, 11, 7], [13, 2, 3, 7, 5, 11], [13, 2, 3, 7, 11, 5], [13, 2, 3, 11, 5, 7], [13, 2, 3, 11, 7, 5], [13, 2, 5, 3, 7, 11], [13, 2, 5, 3, 11, 7], [13, 2, 5, 7, 3, 11], [13, 2, 5, 7, 11, 3], [13, 2, 5, 11, 3, 7], [13, 2, 5, 11, 7, 3], [13, 2, 7, 3, 5, 11], [13, 2, 7, 3, 11, 5], [13, 2, 7, 5, 3, 11], [13, 2, 7, 5, 11, 3], [13, 2, 7, 11, 3, 5], [13, 2, 7, 11, 5, 3], [13, 2, 11, 3, 5, 7], [13, 2, 11, 3, 7, 5], [13, 2, 11, 5, 3, 7], [13, 2, 11, 5, 7, 3], [13, 2, 11, 7, 3, 5], [13, 2, 11, 7, 5, 3], [13, 3, 2, 5, 7, 11], [13, 3, 2, 5, 11, 7], [13, 3, 2, 7, 5, 11], [13, 3, 2, 7, 11, 5], [13, 3, 2, 11, 5, 7], [13, 3, 2, 11, 7, 5], [13, 3, 5, 2, 7, 11], [13, 3, 5, 2, 11, 7], [13, 3, 5, 7, 2, 11], [13, 3, 5, 7, 11, 2], [13, 3, 5, 11, 2, 7], [13, 3, 5, 11, 7, 2], [13, 3, 7, 2, 5, 11], [13, 3, 7, 2, 11, 5], [13, 3, 7, 5, 2, 11], [13, 3, 7, 5, 11, 2], [13, 3, 7, 11, 2, 5], [13, 3, 7, 11, 5, 2], [13, 3, 11, 2, 5, 7], [13, 3, 11, 2, 7, 5], [13, 3, 11, 5, 2, 7], [13, 3, 11, 5, 7, 2], [13, 3, 11, 7, 2, 5], [13, 3, 11, 7, 5, 2], [13, 5, 2, 3, 7, 11], [13, 5, 2, 3, 11, 7], [13, 5, 2, 7, 3, 11], [13, 5, 2, 7, 11, 3], [13, 5, 2, 11, 3, 7], [13, 5, 2, 11, 7, 3], [13, 5, 3, 2, 7, 11], [13, 5, 3, 2, 11, 7], [13, 5, 3, 7, 2, 11], [13, 5, 3, 7, 11, 2], [13, 5, 3, 11, 2, 7], [13, 5, 3, 11, 7, 2], [13, 5, 7, 2, 3, 11], [13, 5, 7, 2, 11, 3], [13, 5, 7, 3, 2, 11], [13, 5, 7, 3, 11, 2], [13, 5, 7, 11, 2, 3], [13, 5, 7, 11, 3, 2], [13, 5, 11, 2, 3, 7], [13, 5, 11, 2, 7, 3], [13, 5, 11, 3, 2, 7], [13, 5, 11, 3, 7, 2], [13, 5, 11, 7, 2, 3], [13, 5, 11, 7, 3, 2], [13, 7, 2, 3, 5, 11], [13, 7, 2, 3, 11, 5], [13, 7, 2, 5, 3, 11], [13, 7, 2, 5, 11, 3], [13, 7, 2, 11, 3, 5], [13, 7, 2, 11, 5, 3], [13, 7, 3, 2, 5, 11], [13, 7, 3, 2, 11, 5], [13, 7, 3, 5, 2, 11], [13, 7, 3, 5, 11, 2], [13, 7, 3, 11, 2, 5], [13, 7, 3, 11, 5, 2], [13, 7, 5, 2, 3, 11], [13, 7, 5, 2, 11, 3], [13, 7, 5, 3, 2, 11], [13, 7, 5, 3, 11, 2], [13, 7, 5, 11, 2, 3], [13, 7, 5, 11, 3, 2], [13, 7, 11, 2, 3, 5], [13, 7, 11, 2, 5, 3], [13, 7, 11, 3, 2, 5], [13, 7, 11, 3, 5, 2], [13, 7, 11, 5, 2, 3], [13, 7, 11, 5, 3, 2], [13, 11, 2, 3, 5, 7], [13, 11, 2, 3, 7, 5], [13, 11, 2, 5, 3, 7], [13, 11, 2, 5, 7, 3], [13, 11, 2, 7, 3, 5], [13, 11, 2, 7, 5, 3], [13, 11, 3, 2, 5, 7], [13, 11, 3, 2, 7, 5], [13, 11, 3, 5, 2, 7], [13, 11, 3, 5, 7, 2], [13, 11, 3, 7, 2, 5], [13, 11, 3, 7, 5, 2], [13, 11, 5, 2, 3, 7], [13, 11, 5, 2, 7, 3], [13, 11, 5, 3, 2, 7], [13, 11, 5, 3, 7, 2], [13, 11, 5, 7, 2, 3], [13, 11, 5, 7, 3, 2], [13, 11, 7, 2, 3, 5], [13, 11, 7, 2, 5, 3], [13, 11, 7, 3, 2, 5], [13, 11, 7, 3, 5, 2], [13, 11, 7, 5, 2, 3], [13, 11, 7, 5, 3, 2]]\n assert candidate(nums = [0, 1]) == [[0, 1], [1, 0]]\n assert 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 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 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 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 candidate(nums = [10, 20, 30, 40]) == [[10, 20, 30, 40], [10, 20, 40, 30], [10, 30, 20, 40], [10, 30, 40, 20], [10, 40, 20, 30], [10, 40, 30, 20], [20, 10, 30, 40], [20, 10, 40, 30], [20, 30, 10, 40], [20, 30, 40, 10], [20, 40, 10, 30], [20, 40, 30, 10], [30, 10, 20, 40], [30, 10, 40, 20], [30, 20, 10, 40], [30, 20, 40, 10], [30, 40, 10, 20], [30, 40, 20, 10], [40, 10, 20, 30], [40, 10, 30, 20], [40, 20, 10, 30], [40, 20, 30, 10], [40, 30, 10, 20], [40, 30, 20, 10]]\n assert candidate(nums = [5, 15, -5, 0, 25]) == [[5, 15, -5, 0, 25], [5, 15, -5, 25, 0], [5, 15, 0, -5, 25], [5, 15, 0, 25, -5], [5, 15, 25, -5, 0], [5, 15, 25, 0, -5], [5, -5, 15, 0, 25], [5, -5, 15, 25, 0], [5, -5, 0, 15, 25], [5, -5, 0, 25, 15], [5, -5, 25, 15, 0], [5, -5, 25, 0, 15], [5, 0, 15, -5, 25], [5, 0, 15, 25, -5], [5, 0, -5, 15, 25], [5, 0, -5, 25, 15], [5, 0, 25, 15, -5], [5, 0, 25, -5, 15], [5, 25, 15, -5, 0], [5, 25, 15, 0, -5], [5, 25, -5, 15, 0], [5, 25, -5, 0, 15], [5, 25, 0, 15, -5], [5, 25, 0, -5, 15], [15, 5, -5, 0, 25], [15, 5, -5, 25, 0], [15, 5, 0, -5, 25], [15, 5, 0, 25, -5], [15, 5, 25, -5, 0], [15, 5, 25, 0, -5], [15, -5, 5, 0, 25], [15, -5, 5, 25, 0], [15, -5, 0, 5, 25], [15, -5, 0, 25, 5], [15, -5, 25, 5, 0], [15, -5, 25, 0, 5], [15, 0, 5, -5, 25], [15, 0, 5, 25, -5], [15, 0, -5, 5, 25], [15, 0, -5, 25, 5], [15, 0, 25, 5, -5], [15, 0, 25, -5, 5], [15, 25, 5, -5, 0], [15, 25, 5, 0, -5], [15, 25, -5, 5, 0], [15, 25, -5, 0, 5], [15, 25, 0, 5, -5], [15, 25, 0, -5, 5], [-5, 5, 15, 0, 25], [-5, 5, 15, 25, 0], [-5, 5, 0, 15, 25], [-5, 5, 0, 25, 15], [-5, 5, 25, 15, 0], [-5, 5, 25, 0, 15], [-5, 15, 5, 0, 25], [-5, 15, 5, 25, 0], [-5, 15, 0, 5, 25], [-5, 15, 0, 25, 5], [-5, 15, 25, 5, 0], [-5, 15, 25, 0, 5], [-5, 0, 5, 15, 25], [-5, 0, 5, 25, 15], [-5, 0, 15, 5, 25], [-5, 0, 15, 25, 5], [-5, 0, 25, 5, 15], [-5, 0, 25, 15, 5], [-5, 25, 5, 15, 0], [-5, 25, 5, 0, 15], [-5, 25, 15, 5, 0], [-5, 25, 15, 0, 5], [-5, 25, 0, 5, 15], [-5, 25, 0, 15, 5], [0, 5, 15, -5, 25], [0, 5, 15, 25, -5], [0, 5, -5, 15, 25], [0, 5, -5, 25, 15], [0, 5, 25, 15, -5], [0, 5, 25, -5, 15], [0, 15, 5, -5, 25], [0, 15, 5, 25, -5], [0, 15, -5, 5, 25], [0, 15, -5, 25, 5], [0, 15, 25, 5, -5], [0, 15, 25, -5, 5], [0, -5, 5, 15, 25], [0, -5, 5, 25, 15], [0, -5, 15, 5, 25], [0, -5, 15, 25, 5], [0, -5, 25, 5, 15], [0, -5, 25, 15, 5], [0, 25, 5, 15, -5], [0, 25, 5, -5, 15], [0, 25, 15, 5, -5], [0, 25, 15, -5, 5], [0, 25, -5, 5, 15], [0, 25, -5, 15, 5], [25, 5, 15, -5, 0], [25, 5, 15, 0, -5], [25, 5, -5, 15, 0], [25, 5, -5, 0, 15], [25, 5, 0, 15, -5], [25, 5, 0, -5, 15], [25, 15, 5, -5, 0], [25, 15, 5, 0, -5], [25, 15, -5, 5, 0], [25, 15, -5, 0, 5], [25, 15, 0, 5, -5], [25, 15, 0, -5, 5], [25, -5, 5, 15, 0], [25, -5, 5, 0, 15], [25, -5, 15, 5, 0], [25, -5, 15, 0, 5], [25, -5, 0, 5, 15], [25, -5, 0, 15, 5], [25, 0, 5, 15, -5], [25, 0, 5, -5, 15], [25, 0, 15, 5, -5], [25, 0, 15, -5, 5], [25, 0, -5, 5, 15], [25, 0, -5, 15, 5]]\n assert 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 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 candidate(nums = [-10, -20, -30, -40, -50, -60]) == [[-10, -20, -30, -40, -50, -60], [-10, -20, -30, -40, -60, -50], [-10, -20, -30, -50, -40, -60], [-10, -20, -30, -50, -60, -40], [-10, -20, -30, -60, -40, -50], [-10, -20, -30, -60, -50, -40], [-10, -20, -40, -30, -50, -60], [-10, -20, -40, -30, -60, -50], [-10, -20, -40, -50, -30, -60], [-10, -20, -40, -50, -60, -30], [-10, -20, -40, -60, -30, -50], [-10, -20, -40, -60, -50, -30], [-10, -20, -50, -30, -40, -60], [-10, -20, -50, -30, -60, -40], [-10, -20, -50, -40, -30, -60], [-10, -20, -50, -40, -60, -30], [-10, -20, -50, -60, -30, -40], [-10, -20, -50, -60, -40, -30], [-10, -20, -60, -30, -40, -50], [-10, -20, -60, -30, -50, -40], [-10, -20, -60, -40, -30, -50], [-10, -20, -60, -40, -50, -30], [-10, -20, -60, -50, -30, -40], [-10, -20, -60, -50, -40, -30], [-10, -30, -20, -40, -50, -60], [-10, -30, -20, -40, -60, -50], [-10, -30, -20, -50, -40, -60], [-10, -30, -20, -50, -60, -40], [-10, -30, -20, -60, -40, -50], [-10, -30, -20, -60, -50, -40], [-10, -30, -40, -20, -50, -60], [-10, -30, -40, -20, -60, -50], [-10, -30, -40, -50, -20, -60], [-10, -30, -40, -50, -60, -20], [-10, -30, -40, -60, -20, -50], [-10, -30, -40, -60, -50, -20], [-10, -30, -50, -20, -40, -60], [-10, -30, -50, -20, -60, -40], [-10, -30, -50, -40, -20, -60], [-10, -30, -50, -40, -60, -20], [-10, -30, -50, -60, -20, -40], [-10, -30, -50, -60, -40, -20], [-10, -30, -60, -20, -40, -50], [-10, -30, -60, -20, -50, -40], [-10, -30, -60, -40, -20, -50], [-10, -30, -60, -40, -50, -20], [-10, -30, -60, -50, -20, -40], [-10, -30, -60, -50, -40, -20], [-10, -40, -20, -30, -50, -60], [-10, -40, -20, -30, -60, -50], [-10, -40, -20, -50, -30, -60], [-10, -40, -20, -50, -60, -30], [-10, -40, -20, -60, -30, -50], [-10, -40, -20, -60, -50, -30], [-10, -40, -30, -20, -50, -60], [-10, -40, -30, -20, -60, -50], [-10, -40, -30, -50, -20, -60], [-10, -40, -30, -50, -60, -20], [-10, -40, -30, -60, -20, -50], [-10, -40, -30, -60, -50, -20], [-10, -40, -50, -20, -30, -60], [-10, -40, -50, -20, -60, -30], [-10, -40, -50, -30, -20, -60], [-10, -40, -50, -30, -60, -20], [-10, -40, -50, -60, -20, -30], [-10, -40, -50, -60, -30, -20], [-10, -40, -60, -20, -30, -50], [-10, -40, -60, -20, -50, -30], [-10, -40, -60, -30, -20, -50], [-10, -40, -60, -30, -50, -20], [-10, -40, -60, -50, -20, -30], [-10, -40, -60, -50, -30, -20], [-10, -50, -20, -30, -40, -60], [-10, -50, -20, -30, -60, -40], [-10, -50, -20, -40, -30, -60], [-10, -50, -20, -40, -60, -30], [-10, -50, -20, -60, -30, -40], [-10, -50, -20, -60, -40, -30], [-10, -50, -30, -20, -40, -60], [-10, -50, -30, -20, -60, -40], [-10, -50, -30, -40, -20, -60], [-10, -50, -30, -40, -60, -20], [-10, -50, -30, -60, -20, -40], [-10, -50, -30, -60, -40, -20], [-10, -50, -40, -20, -30, -60], [-10, -50, -40, -20, -60, -30], [-10, -50, -40, -30, -20, -60], [-10, -50, -40, -30, -60, -20], [-10, -50, -40, -60, -20, -30], [-10, -50, -40, -60, -30, -20], [-10, -50, -60, -20, -30, -40], [-10, -50, -60, -20, -40, -30], [-10, -50, -60, -30, -20, -40], [-10, -50, -60, -30, -40, -20], [-10, -50, -60, -40, -20, -30], [-10, -50, -60, -40, -30, -20], [-10, -60, -20, -30, -40, -50], [-10, -60, -20, -30, -50, -40], [-10, -60, -20, -40, -30, -50], [-10, -60, -20, -40, -50, -30], [-10, -60, -20, -50, -30, -40], [-10, -60, -20, -50, -40, -30], [-10, -60, -30, -20, -40, -50], [-10, -60, -30, -20, -50, -40], [-10, -60, -30, -40, -20, -50], [-10, -60, -30, -40, -50, -20], [-10, -60, -30, -50, -20, -40], [-10, -60, -30, -50, -40, -20], [-10, -60, -40, -20, -30, -50], [-10, -60, -40, -20, -50, -30], [-10, -60, -40, -30, -20, -50], [-10, -60, -40, -30, -50, -20], [-10, -60, -40, -50, -20, -30], [-10, -60, -40, -50, -30, -20], [-10, -60, -50, -20, -30, -40], [-10, -60, -50, -20, -40, -30], [-10, -60, -50, -30, -20, -40], [-10, -60, -50, -30, -40, -20], [-10, -60, -50, -40, -20, -30], [-10, -60, -50, -40, -30, -20], [-20, -10, -30, -40, -50, -60], [-20, -10, -30, -40, -60, -50], [-20, -10, -30, -50, -40, -60], [-20, -10, -30, -50, -60, -40], [-20, -10, -30, -60, -40, -50], [-20, -10, -30, -60, -50, -40], [-20, -10, -40, -30, -50, -60], [-20, -10, -40, -30, -60, -50], [-20, -10, -40, -50, -30, -60], [-20, -10, -40, -50, -60, -30], [-20, -10, -40, -60, -30, -50], [-20, -10, -40, -60, -50, -30], [-20, -10, -50, -30, -40, -60], [-20, -10, -50, -30, -60, -40], [-20, -10, -50, -40, -30, -60], [-20, -10, -50, -40, -60, -30], [-20, -10, -50, -60, -30, -40], [-20, -10, -50, -60, -40, -30], [-20, -10, -60, -30, -40, -50], [-20, -10, -60, -30, -50, -40], [-20, -10, -60, -40, -30, -50], [-20, -10, -60, -40, -50, -30], [-20, -10, -60, -50, -30, -40], [-20, -10, -60, -50, -40, -30], [-20, -30, -10, -40, -50, -60], [-20, -30, -10, -40, -60, -50], [-20, -30, -10, -50, -40, -60], [-20, -30, -10, -50, -60, -40], [-20, -30, -10, -60, -40, -50], [-20, -30, -10, -60, -50, -40], [-20, -30, -40, -10, -50, -60], [-20, -30, -40, -10, -60, -50], [-20, -30, -40, -50, -10, -60], [-20, -30, -40, -50, -60, -10], [-20, -30, -40, -60, -10, -50], [-20, -30, -40, -60, -50, -10], [-20, -30, -50, -10, -40, -60], [-20, -30, -50, -10, -60, -40], [-20, -30, -50, -40, -10, -60], [-20, -30, -50, -40, -60, -10], [-20, -30, -50, -60, -10, -40], [-20, -30, -50, -60, -40, -10], [-20, -30, -60, -10, -40, -50], [-20, -30, -60, -10, -50, -40], [-20, -30, -60, -40, -10, -50], [-20, -30, -60, -40, -50, -10], [-20, -30, -60, -50, -10, -40], [-20, -30, -60, -50, -40, -10], [-20, -40, -10, -30, -50, -60], [-20, -40, -10, -30, -60, -50], [-20, -40, -10, -50, -30, -60], [-20, -40, -10, -50, -60, -30], [-20, -40, -10, -60, -30, -50], [-20, -40, -10, -60, -50, -30], [-20, -40, -30, -10, -50, -60], [-20, -40, -30, -10, -60, -50], [-20, -40, -30, -50, -10, -60], [-20, -40, -30, -50, -60, -10], [-20, -40, -30, -60, -10, -50], [-20, -40, -30, -60, -50, -10], [-20, -40, -50, -10, -30, -60], [-20, -40, -50, -10, -60, -30], [-20, -40, -50, -30, -10, -60], [-20, -40, -50, -30, -60, -10], [-20, -40, -50, -60, -10, -30], [-20, -40, -50, -60, -30, -10], [-20, -40, -60, -10, -30, -50], [-20, -40, -60, -10, -50, -30], [-20, -40, -60, -30, -10, -50], [-20, -40, -60, -30, -50, -10], [-20, -40, -60, -50, -10, -30], [-20, -40, -60, -50, -30, -10], [-20, -50, -10, -30, -40, -60], [-20, -50, -10, -30, -60, -40], [-20, -50, -10, -40, -30, -60], [-20, -50, -10, -40, -60, -30], [-20, -50, -10, -60, -30, -40], [-20, -50, -10, -60, -40, -30], [-20, -50, -30, -10, -40, -60], [-20, -50, -30, -10, -60, -40], [-20, -50, -30, -40, -10, -60], [-20, -50, -30, -40, -60, -10], [-20, -50, -30, -60, -10, -40], [-20, -50, -30, -60, -40, -10], [-20, -50, -40, -10, -30, -60], [-20, -50, -40, -10, -60, -30], [-20, -50, -40, -30, -10, -60], [-20, -50, -40, -30, -60, -10], [-20, -50, -40, -60, -10, -30], [-20, -50, -40, -60, -30, -10], [-20, -50, -60, -10, -30, -40], [-20, -50, -60, -10, -40, -30], [-20, -50, -60, -30, -10, -40], [-20, -50, -60, -30, -40, -10], [-20, -50, -60, -40, -10, -30], [-20, -50, -60, -40, -30, -10], [-20, -60, -10, -30, -40, -50], [-20, -60, -10, -30, -50, -40], [-20, -60, -10, -40, -30, -50], [-20, -60, -10, -40, -50, -30], [-20, -60, -10, -50, -30, -40], [-20, -60, -10, -50, -40, -30], [-20, -60, -30, -10, -40, -50], [-20, -60, -30, -10, -50, -40], [-20, -60, -30, -40, -10, -50], [-20, -60, -30, -40, -50, -10], [-20, -60, -30, -50, -10, -40], [-20, -60, -30, -50, -40, -10], [-20, -60, -40, -10, -30, -50], [-20, -60, -40, -10, -50, -30], [-20, -60, -40, -30, -10, -50], [-20, -60, -40, -30, -50, -10], [-20, -60, -40, -50, -10, -30], [-20, -60, -40, -50, -30, -10], [-20, -60, -50, -10, -30, -40], [-20, -60, -50, -10, -40, -30], [-20, -60, -50, -30, -10, -40], [-20, -60, -50, -30, -40, -10], [-20, -60, -50, -40, -10, -30], [-20, -60, -50, -40, -30, -10], [-30, -10, -20, -40, -50, -60], [-30, -10, -20, -40, -60, -50], [-30, -10, -20, -50, -40, -60], [-30, -10, -20, -50, -60, -40], [-30, -10, -20, -60, -40, -50], [-30, -10, -20, -60, -50, -40], [-30, -10, -40, -20, -50, -60], [-30, -10, -40, -20, -60, -50], [-30, -10, -40, -50, -20, -60], [-30, -10, -40, -50, -60, -20], [-30, -10, -40, -60, -20, -50], [-30, -10, -40, -60, -50, -20], [-30, -10, -50, -20, -40, -60], [-30, -10, -50, -20, -60, -40], [-30, -10, -50, -40, -20, -60], [-30, -10, -50, -40, -60, -20], [-30, -10, -50, -60, -20, -40], [-30, -10, -50, -60, -40, -20], [-30, -10, -60, -20, -40, -50], [-30, -10, -60, -20, -50, -40], [-30, -10, -60, -40, -20, -50], [-30, -10, -60, -40, -50, -20], [-30, -10, -60, -50, -20, -40], [-30, -10, -60, -50, -40, -20], [-30, -20, -10, -40, -50, -60], [-30, -20, -10, -40, -60, -50], [-30, -20, -10, -50, -40, -60], [-30, -20, -10, -50, -60, -40], [-30, -20, -10, -60, -40, -50], [-30, -20, -10, -60, -50, -40], [-30, -20, -40, -10, -50, -60], [-30, -20, -40, -10, -60, -50], [-30, -20, -40, -50, -10, -60], [-30, -20, -40, -50, -60, -10], [-30, -20, -40, -60, -10, -50], [-30, -20, -40, -60, -50, -10], [-30, -20, -50, -10, -40, -60], [-30, -20, -50, -10, -60, -40], [-30, -20, -50, -40, -10, -60], [-30, -20, -50, -40, -60, -10], [-30, -20, -50, -60, -10, -40], [-30, -20, -50, -60, -40, -10], [-30, -20, -60, -10, -40, -50], [-30, -20, -60, -10, -50, -40], [-30, -20, -60, -40, -10, -50], [-30, -20, -60, -40, -50, -10], [-30, -20, -60, -50, -10, -40], [-30, -20, -60, -50, -40, -10], [-30, -40, -10, -20, -50, -60], [-30, -40, -10, -20, -60, -50], [-30, -40, -10, -50, -20, -60], [-30, -40, -10, -50, -60, -20], [-30, -40, -10, -60, -20, -50], [-30, -40, -10, -60, -50, -20], [-30, -40, -20, -10, -50, -60], [-30, -40, -20, -10, -60, -50], [-30, -40, -20, -50, -10, -60], [-30, -40, -20, -50, -60, -10], [-30, -40, -20, -60, -10, -50], [-30, -40, -20, -60, -50, -10], [-30, -40, -50, -10, -20, -60], [-30, -40, -50, -10, -60, -20], [-30, -40, -50, -20, -10, -60], [-30, -40, -50, -20, -60, -10], [-30, -40, -50, -60, -10, -20], [-30, -40, -50, -60, -20, -10], [-30, -40, -60, -10, -20, -50], [-30, -40, -60, -10, -50, -20], [-30, -40, -60, -20, -10, -50], [-30, -40, -60, -20, -50, -10], [-30, -40, -60, -50, -10, -20], [-30, -40, -60, -50, -20, -10], [-30, -50, -10, -20, -40, -60], [-30, -50, -10, -20, -60, -40], [-30, -50, -10, -40, -20, -60], [-30, -50, -10, -40, -60, -20], [-30, -50, -10, -60, -20, -40], [-30, -50, -10, -60, -40, -20], [-30, -50, -20, -10, -40, -60], [-30, -50, -20, -10, -60, -40], [-30, -50, -20, -40, -10, -60], [-30, -50, -20, -40, -60, -10], [-30, -50, -20, -60, -10, -40], [-30, -50, -20, -60, -40, -10], [-30, -50, -40, -10, -20, -60], [-30, -50, -40, -10, -60, -20], [-30, -50, -40, -20, -10, -60], [-30, -50, -40, -20, -60, -10], [-30, -50, -40, -60, -10, -20], [-30, -50, -40, -60, -20, -10], [-30, -50, -60, -10, -20, -40], [-30, -50, -60, -10, -40, -20], [-30, -50, -60, -20, -10, -40], [-30, -50, -60, -20, -40, -10], [-30, -50, -60, -40, -10, -20], [-30, -50, -60, -40, -20, -10], [-30, -60, -10, -20, -40, -50], [-30, -60, -10, -20, -50, -40], [-30, -60, -10, -40, -20, -50], [-30, -60, -10, -40, -50, -20], [-30, -60, -10, -50, -20, -40], [-30, -60, -10, -50, -40, -20], [-30, -60, -20, -10, -40, -50], [-30, -60, -20, -10, -50, -40], [-30, -60, -20, -40, -10, -50], [-30, -60, -20, -40, -50, -10], [-30, -60, -20, -50, -10, -40], [-30, -60, -20, -50, -40, -10], [-30, -60, -40, -10, -20, -50], [-30, -60, -40, -10, -50, -20], [-30, -60, -40, -20, -10, -50], [-30, -60, -40, -20, -50, -10], [-30, -60, -40, -50, -10, -20], [-30, -60, -40, -50, -20, -10], [-30, -60, -50, -10, -20, -40], [-30, -60, -50, -10, -40, -20], [-30, -60, -50, -20, -10, -40], [-30, -60, -50, -20, -40, -10], [-30, -60, -50, -40, -10, -20], [-30, -60, -50, -40, -20, -10], [-40, -10, -20, -30, -50, -60], [-40, -10, -20, -30, -60, -50], [-40, -10, -20, -50, -30, -60], [-40, -10, -20, -50, -60, -30], [-40, -10, -20, -60, -30, -50], [-40, -10, -20, -60, -50, -30], [-40, -10, -30, -20, -50, -60], [-40, -10, -30, -20, -60, -50], [-40, -10, -30, -50, -20, -60], [-40, -10, -30, -50, -60, -20], [-40, -10, -30, -60, -20, -50], [-40, -10, -30, -60, -50, -20], [-40, -10, -50, -20, -30, -60], [-40, -10, -50, -20, -60, -30], [-40, -10, -50, -30, -20, -60], [-40, -10, -50, -30, -60, -20], [-40, -10, -50, -60, -20, -30], [-40, -10, -50, -60, -30, -20], [-40, -10, -60, -20, -30, -50], [-40, -10, -60, -20, -50, -30], [-40, -10, -60, -30, -20, -50], [-40, -10, -60, -30, -50, -20], [-40, -10, -60, -50, -20, -30], [-40, -10, -60, -50, -30, -20], [-40, -20, -10, -30, -50, -60], [-40, -20, -10, -30, -60, -50], [-40, -20, -10, -50, -30, -60], [-40, -20, -10, -50, -60, -30], [-40, -20, -10, -60, -30, -50], [-40, -20, -10, -60, -50, -30], [-40, -20, -30, -10, -50, -60], [-40, -20, -30, -10, -60, -50], [-40, -20, -30, -50, -10, -60], [-40, -20, -30, -50, -60, -10], [-40, -20, -30, -60, -10, -50], [-40, -20, -30, -60, -50, -10], [-40, -20, -50, -10, -30, -60], [-40, -20, -50, -10, -60, -30], [-40, -20, -50, -30, -10, -60], [-40, -20, -50, -30, -60, -10], [-40, -20, -50, -60, -10, -30], [-40, -20, -50, -60, -30, -10], [-40, -20, -60, -10, -30, -50], [-40, -20, -60, -10, -50, -30], [-40, -20, -60, -30, -10, -50], [-40, -20, -60, -30, -50, -10], [-40, -20, -60, -50, -10, -30], [-40, -20, -60, -50, -30, -10], [-40, -30, -10, -20, -50, -60], [-40, -30, -10, -20, -60, -50], [-40, -30, -10, -50, -20, -60], [-40, -30, -10, -50, -60, -20], [-40, -30, -10, -60, -20, -50], [-40, -30, -10, -60, -50, -20], [-40, -30, -20, -10, -50, -60], [-40, -30, -20, -10, -60, -50], [-40, -30, -20, -50, -10, -60], [-40, -30, -20, -50, -60, -10], [-40, -30, -20, -60, -10, -50], [-40, -30, -20, -60, -50, -10], [-40, -30, -50, -10, -20, -60], [-40, -30, -50, -10, -60, -20], [-40, -30, -50, -20, -10, -60], [-40, -30, -50, -20, -60, -10], [-40, -30, -50, -60, -10, -20], [-40, -30, -50, -60, -20, -10], [-40, -30, -60, -10, -20, -50], [-40, -30, -60, -10, -50, -20], [-40, -30, -60, -20, -10, -50], [-40, -30, -60, -20, -50, -10], [-40, -30, -60, -50, -10, -20], [-40, -30, -60, -50, -20, -10], [-40, -50, -10, -20, -30, -60], [-40, -50, -10, -20, -60, -30], [-40, -50, -10, -30, -20, -60], [-40, -50, -10, -30, -60, -20], [-40, -50, -10, -60, -20, -30], [-40, -50, -10, -60, -30, -20], [-40, -50, -20, -10, -30, -60], [-40, -50, -20, -10, -60, -30], [-40, -50, -20, -30, -10, -60], [-40, -50, -20, -30, -60, -10], [-40, -50, -20, -60, -10, -30], [-40, -50, -20, -60, -30, -10], [-40, -50, -30, -10, -20, -60], [-40, -50, -30, -10, -60, -20], [-40, -50, -30, -20, -10, -60], [-40, -50, -30, -20, -60, -10], [-40, -50, -30, -60, -10, -20], [-40, -50, -30, -60, -20, -10], [-40, -50, -60, -10, -20, -30], [-40, -50, -60, -10, -30, -20], [-40, -50, -60, -20, -10, -30], [-40, -50, -60, -20, -30, -10], [-40, -50, -60, -30, -10, -20], [-40, -50, -60, -30, -20, -10], [-40, -60, -10, -20, -30, -50], [-40, -60, -10, -20, -50, -30], [-40, -60, -10, -30, -20, -50], [-40, -60, -10, -30, -50, -20], [-40, -60, -10, -50, -20, -30], [-40, -60, -10, -50, -30, -20], [-40, -60, -20, -10, -30, -50], [-40, -60, -20, -10, -50, -30], [-40, -60, -20, -30, -10, -50], [-40, -60, -20, -30, -50, -10], [-40, -60, -20, -50, -10, -30], [-40, -60, -20, -50, -30, -10], [-40, -60, -30, -10, -20, -50], [-40, -60, -30, -10, -50, -20], [-40, -60, -30, -20, -10, -50], [-40, -60, -30, -20, -50, -10], [-40, -60, -30, -50, -10, -20], [-40, -60, -30, -50, -20, -10], [-40, -60, -50, -10, -20, -30], [-40, -60, -50, -10, -30, -20], [-40, -60, -50, -20, -10, -30], [-40, -60, -50, -20, -30, -10], [-40, -60, -50, -30, -10, -20], [-40, -60, -50, -30, -20, -10], [-50, -10, -20, -30, -40, -60], [-50, -10, -20, -30, -60, -40], [-50, -10, -20, -40, -30, -60], [-50, -10, -20, -40, -60, -30], [-50, -10, -20, -60, -30, -40], [-50, -10, -20, -60, -40, -30], [-50, -10, -30, -20, -40, -60], [-50, -10, -30, -20, -60, -40], [-50, -10, -30, -40, -20, -60], [-50, -10, -30, -40, -60, -20], [-50, -10, -30, -60, -20, -40], [-50, -10, -30, -60, -40, -20], [-50, -10, -40, -20, -30, -60], [-50, -10, -40, -20, -60, -30], [-50, -10, -40, -30, -20, -60], [-50, -10, -40, -30, -60, -20], [-50, -10, -40, -60, -20, -30], [-50, -10, -40, -60, -30, -20], [-50, -10, -60, -20, -30, -40], [-50, -10, -60, -20, -40, -30], [-50, -10, -60, -30, -20, -40], [-50, -10, -60, -30, -40, -20], [-50, -10, -60, -40, -20, -30], [-50, -10, -60, -40, -30, -20], [-50, -20, -10, -30, -40, -60], [-50, -20, -10, -30, -60, -40], [-50, -20, -10, -40, -30, -60], [-50, -20, -10, -40, -60, -30], [-50, -20, -10, -60, -30, -40], [-50, -20, -10, -60, -40, -30], [-50, -20, -30, -10, -40, -60], [-50, -20, -30, -10, -60, -40], [-50, -20, -30, -40, -10, -60], [-50, -20, -30, -40, -60, -10], [-50, -20, -30, -60, -10, -40], [-50, -20, -30, -60, -40, -10], [-50, -20, -40, -10, -30, -60], [-50, -20, -40, -10, -60, -30], [-50, -20, -40, -30, -10, -60], [-50, -20, -40, -30, -60, -10], [-50, -20, -40, -60, -10, -30], [-50, -20, -40, -60, -30, -10], [-50, -20, -60, -10, -30, -40], [-50, -20, -60, -10, -40, -30], [-50, -20, -60, -30, -10, -40], [-50, -20, -60, -30, -40, -10], [-50, -20, -60, -40, -10, -30], [-50, -20, -60, -40, -30, -10], [-50, -30, -10, -20, -40, -60], [-50, -30, -10, -20, -60, -40], [-50, -30, -10, -40, -20, -60], [-50, -30, -10, -40, -60, -20], [-50, -30, -10, -60, -20, -40], [-50, -30, -10, -60, -40, -20], [-50, -30, -20, -10, -40, -60], [-50, -30, -20, -10, -60, -40], [-50, -30, -20, -40, -10, -60], [-50, -30, -20, -40, -60, -10], [-50, -30, -20, -60, -10, -40], [-50, -30, -20, -60, -40, -10], [-50, -30, -40, -10, -20, -60], [-50, -30, -40, -10, -60, -20], [-50, -30, -40, -20, -10, -60], [-50, -30, -40, -20, -60, -10], [-50, -30, -40, -60, -10, -20], [-50, -30, -40, -60, -20, -10], [-50, -30, -60, -10, -20, -40], [-50, -30, -60, -10, -40, -20], [-50, -30, -60, -20, -10, -40], [-50, -30, -60, -20, -40, -10], [-50, -30, -60, -40, -10, -20], [-50, -30, -60, -40, -20, -10], [-50, -40, -10, -20, -30, -60], [-50, -40, -10, -20, -60, -30], [-50, -40, -10, -30, -20, -60], [-50, -40, -10, -30, -60, -20], [-50, -40, -10, -60, -20, -30], [-50, -40, -10, -60, -30, -20], [-50, -40, -20, -10, -30, -60], [-50, -40, -20, -10, -60, -30], [-50, -40, -20, -30, -10, -60], [-50, -40, -20, -30, -60, -10], [-50, -40, -20, -60, -10, -30], [-50, -40, -20, -60, -30, -10], [-50, -40, -30, -10, -20, -60], [-50, -40, -30, -10, -60, -20], [-50, -40, -30, -20, -10, -60], [-50, -40, -30, -20, -60, -10], [-50, -40, -30, -60, -10, -20], [-50, -40, -30, -60, -20, -10], [-50, -40, -60, -10, -20, -30], [-50, -40, -60, -10, -30, -20], [-50, -40, -60, -20, -10, -30], [-50, -40, -60, -20, -30, -10], [-50, -40, -60, -30, -10, -20], [-50, -40, -60, -30, -20, -10], [-50, -60, -10, -20, -30, -40], [-50, -60, -10, -20, -40, -30], [-50, -60, -10, -30, -20, -40], [-50, -60, -10, -30, -40, -20], [-50, -60, -10, -40, -20, -30], [-50, -60, -10, -40, -30, -20], [-50, -60, -20, -10, -30, -40], [-50, -60, -20, -10, -40, -30], [-50, -60, -20, -30, -10, -40], [-50, -60, -20, -30, -40, -10], [-50, -60, -20, -40, -10, -30], [-50, -60, -20, -40, -30, -10], [-50, -60, -30, -10, -20, -40], [-50, -60, -30, -10, -40, -20], [-50, -60, -30, -20, -10, -40], [-50, -60, -30, -20, -40, -10], [-50, -60, -30, -40, -10, -20], [-50, -60, -30, -40, -20, -10], [-50, -60, -40, -10, -20, -30], [-50, -60, -40, -10, -30, -20], [-50, -60, -40, -20, -10, -30], [-50, -60, -40, -20, -30, -10], [-50, -60, -40, -30, -10, -20], [-50, -60, -40, -30, -20, -10], [-60, -10, -20, -30, -40, -50], [-60, -10, -20, -30, -50, -40], [-60, -10, -20, -40, -30, -50], [-60, -10, -20, -40, -50, -30], [-60, -10, -20, -50, -30, -40], [-60, -10, -20, -50, -40, -30], [-60, -10, -30, -20, -40, -50], [-60, -10, -30, -20, -50, -40], [-60, -10, -30, -40, -20, -50], [-60, -10, -30, -40, -50, -20], [-60, -10, -30, -50, -20, -40], [-60, -10, -30, -50, -40, -20], [-60, -10, -40, -20, -30, -50], [-60, -10, -40, -20, -50, -30], [-60, -10, -40, -30, -20, -50], [-60, -10, -40, -30, -50, -20], [-60, -10, -40, -50, -20, -30], [-60, -10, -40, -50, -30, -20], [-60, -10, -50, -20, -30, -40], [-60, -10, -50, -20, -40, -30], [-60, -10, -50, -30, -20, -40], [-60, -10, -50, -30, -40, -20], [-60, -10, -50, -40, -20, -30], [-60, -10, -50, -40, -30, -20], [-60, -20, -10, -30, -40, -50], [-60, -20, -10, -30, -50, -40], [-60, -20, -10, -40, -30, -50], [-60, -20, -10, -40, -50, -30], [-60, -20, -10, -50, -30, -40], [-60, -20, -10, -50, -40, -30], [-60, -20, -30, -10, -40, -50], [-60, -20, -30, -10, -50, -40], [-60, -20, -30, -40, -10, -50], [-60, -20, -30, -40, -50, -10], [-60, -20, -30, -50, -10, -40], [-60, -20, -30, -50, -40, -10], [-60, -20, -40, -10, -30, -50], [-60, -20, -40, -10, -50, -30], [-60, -20, -40, -30, -10, -50], [-60, -20, -40, -30, -50, -10], [-60, -20, -40, -50, -10, -30], [-60, -20, -40, -50, -30, -10], [-60, -20, -50, -10, -30, -40], [-60, -20, -50, -10, -40, -30], [-60, -20, -50, -30, -10, -40], [-60, -20, -50, -30, -40, -10], [-60, -20, -50, -40, -10, -30], [-60, -20, -50, -40, -30, -10], [-60, -30, -10, -20, -40, -50], [-60, -30, -10, -20, -50, -40], [-60, -30, -10, -40, -20, -50], [-60, -30, -10, -40, -50, -20], [-60, -30, -10, -50, -20, -40], [-60, -30, -10, -50, -40, -20], [-60, -30, -20, -10, -40, -50], [-60, -30, -20, -10, -50, -40], [-60, -30, -20, -40, -10, -50], [-60, -30, -20, -40, -50, -10], [-60, -30, -20, -50, -10, -40], [-60, -30, -20, -50, -40, -10], [-60, -30, -40, -10, -20, -50], [-60, -30, -40, -10, -50, -20], [-60, -30, -40, -20, -10, -50], [-60, -30, -40, -20, -50, -10], [-60, -30, -40, -50, -10, -20], [-60, -30, -40, -50, -20, -10], [-60, -30, -50, -10, -20, -40], [-60, -30, -50, -10, -40, -20], [-60, -30, -50, -20, -10, -40], [-60, -30, -50, -20, -40, -10], [-60, -30, -50, -40, -10, -20], [-60, -30, -50, -40, -20, -10], [-60, -40, -10, -20, -30, -50], [-60, -40, -10, -20, -50, -30], [-60, -40, -10, -30, -20, -50], [-60, -40, -10, -30, -50, -20], [-60, -40, -10, -50, -20, -30], [-60, -40, -10, -50, -30, -20], [-60, -40, -20, -10, -30, -50], [-60, -40, -20, -10, -50, -30], [-60, -40, -20, -30, -10, -50], [-60, -40, -20, -30, -50, -10], [-60, -40, -20, -50, -10, -30], [-60, -40, -20, -50, -30, -10], [-60, -40, -30, -10, -20, -50], [-60, -40, -30, -10, -50, -20], [-60, -40, -30, -20, -10, -50], [-60, -40, -30, -20, -50, -10], [-60, -40, -30, -50, -10, -20], [-60, -40, -30, -50, -20, -10], [-60, -40, -50, -10, -20, -30], [-60, -40, -50, -10, -30, -20], [-60, -40, -50, -20, -10, -30], [-60, -40, -50, -20, -30, -10], [-60, -40, -50, -30, -10, -20], [-60, -40, -50, -30, -20, -10], [-60, -50, -10, -20, -30, -40], [-60, -50, -10, -20, -40, -30], [-60, -50, -10, -30, -20, -40], [-60, -50, -10, -30, -40, -20], [-60, -50, -10, -40, -20, -30], [-60, -50, -10, -40, -30, -20], [-60, -50, -20, -10, -30, -40], [-60, -50, -20, -10, -40, -30], [-60, -50, -20, -30, -10, -40], [-60, -50, -20, -30, -40, -10], [-60, -50, -20, -40, -10, -30], [-60, -50, -20, -40, -30, -10], [-60, -50, -30, -10, -20, -40], [-60, -50, -30, -10, -40, -20], [-60, -50, -30, -20, -10, -40], [-60, -50, -30, -20, -40, -10], [-60, -50, -30, -40, -10, -20], [-60, -50, -30, -40, -20, -10], [-60, -50, -40, -10, -20, -30], [-60, -50, -40, -10, -30, -20], [-60, -50, -40, -20, -10, -30], [-60, -50, -40, -20, -30, -10], [-60, -50, -40, -30, -10, -20], [-60, -50, -40, -30, -20, -10]]\n assert 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 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 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 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 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 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 candidate(nums = [10, 20, 30, 40, 50, 60]) == [[10, 20, 30, 40, 50, 60], [10, 20, 30, 40, 60, 50], [10, 20, 30, 50, 40, 60], [10, 20, 30, 50, 60, 40], [10, 20, 30, 60, 40, 50], [10, 20, 30, 60, 50, 40], [10, 20, 40, 30, 50, 60], [10, 20, 40, 30, 60, 50], [10, 20, 40, 50, 30, 60], [10, 20, 40, 50, 60, 30], [10, 20, 40, 60, 30, 50], [10, 20, 40, 60, 50, 30], [10, 20, 50, 30, 40, 60], [10, 20, 50, 30, 60, 40], [10, 20, 50, 40, 30, 60], [10, 20, 50, 40, 60, 30], [10, 20, 50, 60, 30, 40], [10, 20, 50, 60, 40, 30], [10, 20, 60, 30, 40, 50], [10, 20, 60, 30, 50, 40], [10, 20, 60, 40, 30, 50], [10, 20, 60, 40, 50, 30], [10, 20, 60, 50, 30, 40], [10, 20, 60, 50, 40, 30], [10, 30, 20, 40, 50, 60], [10, 30, 20, 40, 60, 50], [10, 30, 20, 50, 40, 60], [10, 30, 20, 50, 60, 40], [10, 30, 20, 60, 40, 50], [10, 30, 20, 60, 50, 40], [10, 30, 40, 20, 50, 60], [10, 30, 40, 20, 60, 50], [10, 30, 40, 50, 20, 60], [10, 30, 40, 50, 60, 20], [10, 30, 40, 60, 20, 50], [10, 30, 40, 60, 50, 20], [10, 30, 50, 20, 40, 60], [10, 30, 50, 20, 60, 40], [10, 30, 50, 40, 20, 60], [10, 30, 50, 40, 60, 20], [10, 30, 50, 60, 20, 40], [10, 30, 50, 60, 40, 20], [10, 30, 60, 20, 40, 50], [10, 30, 60, 20, 50, 40], [10, 30, 60, 40, 20, 50], [10, 30, 60, 40, 50, 20], [10, 30, 60, 50, 20, 40], [10, 30, 60, 50, 40, 20], [10, 40, 20, 30, 50, 60], [10, 40, 20, 30, 60, 50], [10, 40, 20, 50, 30, 60], [10, 40, 20, 50, 60, 30], [10, 40, 20, 60, 30, 50], [10, 40, 20, 60, 50, 30], [10, 40, 30, 20, 50, 60], [10, 40, 30, 20, 60, 50], [10, 40, 30, 50, 20, 60], [10, 40, 30, 50, 60, 20], [10, 40, 30, 60, 20, 50], [10, 40, 30, 60, 50, 20], [10, 40, 50, 20, 30, 60], [10, 40, 50, 20, 60, 30], [10, 40, 50, 30, 20, 60], [10, 40, 50, 30, 60, 20], [10, 40, 50, 60, 20, 30], [10, 40, 50, 60, 30, 20], [10, 40, 60, 20, 30, 50], [10, 40, 60, 20, 50, 30], [10, 40, 60, 30, 20, 50], [10, 40, 60, 30, 50, 20], [10, 40, 60, 50, 20, 30], [10, 40, 60, 50, 30, 20], [10, 50, 20, 30, 40, 60], [10, 50, 20, 30, 60, 40], [10, 50, 20, 40, 30, 60], [10, 50, 20, 40, 60, 30], [10, 50, 20, 60, 30, 40], [10, 50, 20, 60, 40, 30], [10, 50, 30, 20, 40, 60], [10, 50, 30, 20, 60, 40], [10, 50, 30, 40, 20, 60], [10, 50, 30, 40, 60, 20], [10, 50, 30, 60, 20, 40], [10, 50, 30, 60, 40, 20], [10, 50, 40, 20, 30, 60], [10, 50, 40, 20, 60, 30], [10, 50, 40, 30, 20, 60], [10, 50, 40, 30, 60, 20], [10, 50, 40, 60, 20, 30], [10, 50, 40, 60, 30, 20], [10, 50, 60, 20, 30, 40], [10, 50, 60, 20, 40, 30], [10, 50, 60, 30, 20, 40], [10, 50, 60, 30, 40, 20], [10, 50, 60, 40, 20, 30], [10, 50, 60, 40, 30, 20], [10, 60, 20, 30, 40, 50], [10, 60, 20, 30, 50, 40], [10, 60, 20, 40, 30, 50], [10, 60, 20, 40, 50, 30], [10, 60, 20, 50, 30, 40], [10, 60, 20, 50, 40, 30], [10, 60, 30, 20, 40, 50], [10, 60, 30, 20, 50, 40], [10, 60, 30, 40, 20, 50], [10, 60, 30, 40, 50, 20], [10, 60, 30, 50, 20, 40], [10, 60, 30, 50, 40, 20], [10, 60, 40, 20, 30, 50], [10, 60, 40, 20, 50, 30], [10, 60, 40, 30, 20, 50], [10, 60, 40, 30, 50, 20], [10, 60, 40, 50, 20, 30], [10, 60, 40, 50, 30, 20], [10, 60, 50, 20, 30, 40], [10, 60, 50, 20, 40, 30], [10, 60, 50, 30, 20, 40], [10, 60, 50, 30, 40, 20], [10, 60, 50, 40, 20, 30], [10, 60, 50, 40, 30, 20], [20, 10, 30, 40, 50, 60], [20, 10, 30, 40, 60, 50], [20, 10, 30, 50, 40, 60], [20, 10, 30, 50, 60, 40], [20, 10, 30, 60, 40, 50], [20, 10, 30, 60, 50, 40], [20, 10, 40, 30, 50, 60], [20, 10, 40, 30, 60, 50], [20, 10, 40, 50, 30, 60], [20, 10, 40, 50, 60, 30], [20, 10, 40, 60, 30, 50], [20, 10, 40, 60, 50, 30], [20, 10, 50, 30, 40, 60], [20, 10, 50, 30, 60, 40], [20, 10, 50, 40, 30, 60], [20, 10, 50, 40, 60, 30], [20, 10, 50, 60, 30, 40], [20, 10, 50, 60, 40, 30], [20, 10, 60, 30, 40, 50], [20, 10, 60, 30, 50, 40], [20, 10, 60, 40, 30, 50], [20, 10, 60, 40, 50, 30], [20, 10, 60, 50, 30, 40], [20, 10, 60, 50, 40, 30], [20, 30, 10, 40, 50, 60], [20, 30, 10, 40, 60, 50], [20, 30, 10, 50, 40, 60], [20, 30, 10, 50, 60, 40], [20, 30, 10, 60, 40, 50], [20, 30, 10, 60, 50, 40], [20, 30, 40, 10, 50, 60], [20, 30, 40, 10, 60, 50], [20, 30, 40, 50, 10, 60], [20, 30, 40, 50, 60, 10], [20, 30, 40, 60, 10, 50], [20, 30, 40, 60, 50, 10], [20, 30, 50, 10, 40, 60], [20, 30, 50, 10, 60, 40], [20, 30, 50, 40, 10, 60], [20, 30, 50, 40, 60, 10], [20, 30, 50, 60, 10, 40], [20, 30, 50, 60, 40, 10], [20, 30, 60, 10, 40, 50], [20, 30, 60, 10, 50, 40], [20, 30, 60, 40, 10, 50], [20, 30, 60, 40, 50, 10], [20, 30, 60, 50, 10, 40], [20, 30, 60, 50, 40, 10], [20, 40, 10, 30, 50, 60], [20, 40, 10, 30, 60, 50], [20, 40, 10, 50, 30, 60], [20, 40, 10, 50, 60, 30], [20, 40, 10, 60, 30, 50], [20, 40, 10, 60, 50, 30], [20, 40, 30, 10, 50, 60], [20, 40, 30, 10, 60, 50], [20, 40, 30, 50, 10, 60], [20, 40, 30, 50, 60, 10], [20, 40, 30, 60, 10, 50], [20, 40, 30, 60, 50, 10], [20, 40, 50, 10, 30, 60], [20, 40, 50, 10, 60, 30], [20, 40, 50, 30, 10, 60], [20, 40, 50, 30, 60, 10], [20, 40, 50, 60, 10, 30], [20, 40, 50, 60, 30, 10], [20, 40, 60, 10, 30, 50], [20, 40, 60, 10, 50, 30], [20, 40, 60, 30, 10, 50], [20, 40, 60, 30, 50, 10], [20, 40, 60, 50, 10, 30], [20, 40, 60, 50, 30, 10], [20, 50, 10, 30, 40, 60], [20, 50, 10, 30, 60, 40], [20, 50, 10, 40, 30, 60], [20, 50, 10, 40, 60, 30], [20, 50, 10, 60, 30, 40], [20, 50, 10, 60, 40, 30], [20, 50, 30, 10, 40, 60], [20, 50, 30, 10, 60, 40], [20, 50, 30, 40, 10, 60], [20, 50, 30, 40, 60, 10], [20, 50, 30, 60, 10, 40], [20, 50, 30, 60, 40, 10], [20, 50, 40, 10, 30, 60], [20, 50, 40, 10, 60, 30], [20, 50, 40, 30, 10, 60], [20, 50, 40, 30, 60, 10], [20, 50, 40, 60, 10, 30], [20, 50, 40, 60, 30, 10], [20, 50, 60, 10, 30, 40], [20, 50, 60, 10, 40, 30], [20, 50, 60, 30, 10, 40], [20, 50, 60, 30, 40, 10], [20, 50, 60, 40, 10, 30], [20, 50, 60, 40, 30, 10], [20, 60, 10, 30, 40, 50], [20, 60, 10, 30, 50, 40], [20, 60, 10, 40, 30, 50], [20, 60, 10, 40, 50, 30], [20, 60, 10, 50, 30, 40], [20, 60, 10, 50, 40, 30], [20, 60, 30, 10, 40, 50], [20, 60, 30, 10, 50, 40], [20, 60, 30, 40, 10, 50], [20, 60, 30, 40, 50, 10], [20, 60, 30, 50, 10, 40], [20, 60, 30, 50, 40, 10], [20, 60, 40, 10, 30, 50], [20, 60, 40, 10, 50, 30], [20, 60, 40, 30, 10, 50], [20, 60, 40, 30, 50, 10], [20, 60, 40, 50, 10, 30], [20, 60, 40, 50, 30, 10], [20, 60, 50, 10, 30, 40], [20, 60, 50, 10, 40, 30], [20, 60, 50, 30, 10, 40], [20, 60, 50, 30, 40, 10], [20, 60, 50, 40, 10, 30], [20, 60, 50, 40, 30, 10], [30, 10, 20, 40, 50, 60], [30, 10, 20, 40, 60, 50], [30, 10, 20, 50, 40, 60], [30, 10, 20, 50, 60, 40], [30, 10, 20, 60, 40, 50], [30, 10, 20, 60, 50, 40], [30, 10, 40, 20, 50, 60], [30, 10, 40, 20, 60, 50], [30, 10, 40, 50, 20, 60], [30, 10, 40, 50, 60, 20], [30, 10, 40, 60, 20, 50], [30, 10, 40, 60, 50, 20], [30, 10, 50, 20, 40, 60], [30, 10, 50, 20, 60, 40], [30, 10, 50, 40, 20, 60], [30, 10, 50, 40, 60, 20], [30, 10, 50, 60, 20, 40], [30, 10, 50, 60, 40, 20], [30, 10, 60, 20, 40, 50], [30, 10, 60, 20, 50, 40], [30, 10, 60, 40, 20, 50], [30, 10, 60, 40, 50, 20], [30, 10, 60, 50, 20, 40], [30, 10, 60, 50, 40, 20], [30, 20, 10, 40, 50, 60], [30, 20, 10, 40, 60, 50], [30, 20, 10, 50, 40, 60], [30, 20, 10, 50, 60, 40], [30, 20, 10, 60, 40, 50], [30, 20, 10, 60, 50, 40], [30, 20, 40, 10, 50, 60], [30, 20, 40, 10, 60, 50], [30, 20, 40, 50, 10, 60], [30, 20, 40, 50, 60, 10], [30, 20, 40, 60, 10, 50], [30, 20, 40, 60, 50, 10], [30, 20, 50, 10, 40, 60], [30, 20, 50, 10, 60, 40], [30, 20, 50, 40, 10, 60], [30, 20, 50, 40, 60, 10], [30, 20, 50, 60, 10, 40], [30, 20, 50, 60, 40, 10], [30, 20, 60, 10, 40, 50], [30, 20, 60, 10, 50, 40], [30, 20, 60, 40, 10, 50], [30, 20, 60, 40, 50, 10], [30, 20, 60, 50, 10, 40], [30, 20, 60, 50, 40, 10], [30, 40, 10, 20, 50, 60], [30, 40, 10, 20, 60, 50], [30, 40, 10, 50, 20, 60], [30, 40, 10, 50, 60, 20], [30, 40, 10, 60, 20, 50], [30, 40, 10, 60, 50, 20], [30, 40, 20, 10, 50, 60], [30, 40, 20, 10, 60, 50], [30, 40, 20, 50, 10, 60], [30, 40, 20, 50, 60, 10], [30, 40, 20, 60, 10, 50], [30, 40, 20, 60, 50, 10], [30, 40, 50, 10, 20, 60], [30, 40, 50, 10, 60, 20], [30, 40, 50, 20, 10, 60], [30, 40, 50, 20, 60, 10], [30, 40, 50, 60, 10, 20], [30, 40, 50, 60, 20, 10], [30, 40, 60, 10, 20, 50], [30, 40, 60, 10, 50, 20], [30, 40, 60, 20, 10, 50], [30, 40, 60, 20, 50, 10], [30, 40, 60, 50, 10, 20], [30, 40, 60, 50, 20, 10], [30, 50, 10, 20, 40, 60], [30, 50, 10, 20, 60, 40], [30, 50, 10, 40, 20, 60], [30, 50, 10, 40, 60, 20], [30, 50, 10, 60, 20, 40], [30, 50, 10, 60, 40, 20], [30, 50, 20, 10, 40, 60], [30, 50, 20, 10, 60, 40], [30, 50, 20, 40, 10, 60], [30, 50, 20, 40, 60, 10], [30, 50, 20, 60, 10, 40], [30, 50, 20, 60, 40, 10], [30, 50, 40, 10, 20, 60], [30, 50, 40, 10, 60, 20], [30, 50, 40, 20, 10, 60], [30, 50, 40, 20, 60, 10], [30, 50, 40, 60, 10, 20], [30, 50, 40, 60, 20, 10], [30, 50, 60, 10, 20, 40], [30, 50, 60, 10, 40, 20], [30, 50, 60, 20, 10, 40], [30, 50, 60, 20, 40, 10], [30, 50, 60, 40, 10, 20], [30, 50, 60, 40, 20, 10], [30, 60, 10, 20, 40, 50], [30, 60, 10, 20, 50, 40], [30, 60, 10, 40, 20, 50], [30, 60, 10, 40, 50, 20], [30, 60, 10, 50, 20, 40], [30, 60, 10, 50, 40, 20], [30, 60, 20, 10, 40, 50], [30, 60, 20, 10, 50, 40], [30, 60, 20, 40, 10, 50], [30, 60, 20, 40, 50, 10], [30, 60, 20, 50, 10, 40], [30, 60, 20, 50, 40, 10], [30, 60, 40, 10, 20, 50], [30, 60, 40, 10, 50, 20], [30, 60, 40, 20, 10, 50], [30, 60, 40, 20, 50, 10], [30, 60, 40, 50, 10, 20], [30, 60, 40, 50, 20, 10], [30, 60, 50, 10, 20, 40], [30, 60, 50, 10, 40, 20], [30, 60, 50, 20, 10, 40], [30, 60, 50, 20, 40, 10], [30, 60, 50, 40, 10, 20], [30, 60, 50, 40, 20, 10], [40, 10, 20, 30, 50, 60], [40, 10, 20, 30, 60, 50], [40, 10, 20, 50, 30, 60], [40, 10, 20, 50, 60, 30], [40, 10, 20, 60, 30, 50], [40, 10, 20, 60, 50, 30], [40, 10, 30, 20, 50, 60], [40, 10, 30, 20, 60, 50], [40, 10, 30, 50, 20, 60], [40, 10, 30, 50, 60, 20], [40, 10, 30, 60, 20, 50], [40, 10, 30, 60, 50, 20], [40, 10, 50, 20, 30, 60], [40, 10, 50, 20, 60, 30], [40, 10, 50, 30, 20, 60], [40, 10, 50, 30, 60, 20], [40, 10, 50, 60, 20, 30], [40, 10, 50, 60, 30, 20], [40, 10, 60, 20, 30, 50], [40, 10, 60, 20, 50, 30], [40, 10, 60, 30, 20, 50], [40, 10, 60, 30, 50, 20], [40, 10, 60, 50, 20, 30], [40, 10, 60, 50, 30, 20], [40, 20, 10, 30, 50, 60], [40, 20, 10, 30, 60, 50], [40, 20, 10, 50, 30, 60], [40, 20, 10, 50, 60, 30], [40, 20, 10, 60, 30, 50], [40, 20, 10, 60, 50, 30], [40, 20, 30, 10, 50, 60], [40, 20, 30, 10, 60, 50], [40, 20, 30, 50, 10, 60], [40, 20, 30, 50, 60, 10], [40, 20, 30, 60, 10, 50], [40, 20, 30, 60, 50, 10], [40, 20, 50, 10, 30, 60], [40, 20, 50, 10, 60, 30], [40, 20, 50, 30, 10, 60], [40, 20, 50, 30, 60, 10], [40, 20, 50, 60, 10, 30], [40, 20, 50, 60, 30, 10], [40, 20, 60, 10, 30, 50], [40, 20, 60, 10, 50, 30], [40, 20, 60, 30, 10, 50], [40, 20, 60, 30, 50, 10], [40, 20, 60, 50, 10, 30], [40, 20, 60, 50, 30, 10], [40, 30, 10, 20, 50, 60], [40, 30, 10, 20, 60, 50], [40, 30, 10, 50, 20, 60], [40, 30, 10, 50, 60, 20], [40, 30, 10, 60, 20, 50], [40, 30, 10, 60, 50, 20], [40, 30, 20, 10, 50, 60], [40, 30, 20, 10, 60, 50], [40, 30, 20, 50, 10, 60], [40, 30, 20, 50, 60, 10], [40, 30, 20, 60, 10, 50], [40, 30, 20, 60, 50, 10], [40, 30, 50, 10, 20, 60], [40, 30, 50, 10, 60, 20], [40, 30, 50, 20, 10, 60], [40, 30, 50, 20, 60, 10], [40, 30, 50, 60, 10, 20], [40, 30, 50, 60, 20, 10], [40, 30, 60, 10, 20, 50], [40, 30, 60, 10, 50, 20], [40, 30, 60, 20, 10, 50], [40, 30, 60, 20, 50, 10], [40, 30, 60, 50, 10, 20], [40, 30, 60, 50, 20, 10], [40, 50, 10, 20, 30, 60], [40, 50, 10, 20, 60, 30], [40, 50, 10, 30, 20, 60], [40, 50, 10, 30, 60, 20], [40, 50, 10, 60, 20, 30], [40, 50, 10, 60, 30, 20], [40, 50, 20, 10, 30, 60], [40, 50, 20, 10, 60, 30], [40, 50, 20, 30, 10, 60], [40, 50, 20, 30, 60, 10], [40, 50, 20, 60, 10, 30], [40, 50, 20, 60, 30, 10], [40, 50, 30, 10, 20, 60], [40, 50, 30, 10, 60, 20], [40, 50, 30, 20, 10, 60], [40, 50, 30, 20, 60, 10], [40, 50, 30, 60, 10, 20], [40, 50, 30, 60, 20, 10], [40, 50, 60, 10, 20, 30], [40, 50, 60, 10, 30, 20], [40, 50, 60, 20, 10, 30], [40, 50, 60, 20, 30, 10], [40, 50, 60, 30, 10, 20], [40, 50, 60, 30, 20, 10], [40, 60, 10, 20, 30, 50], [40, 60, 10, 20, 50, 30], [40, 60, 10, 30, 20, 50], [40, 60, 10, 30, 50, 20], [40, 60, 10, 50, 20, 30], [40, 60, 10, 50, 30, 20], [40, 60, 20, 10, 30, 50], [40, 60, 20, 10, 50, 30], [40, 60, 20, 30, 10, 50], [40, 60, 20, 30, 50, 10], [40, 60, 20, 50, 10, 30], [40, 60, 20, 50, 30, 10], [40, 60, 30, 10, 20, 50], [40, 60, 30, 10, 50, 20], [40, 60, 30, 20, 10, 50], [40, 60, 30, 20, 50, 10], [40, 60, 30, 50, 10, 20], [40, 60, 30, 50, 20, 10], [40, 60, 50, 10, 20, 30], [40, 60, 50, 10, 30, 20], [40, 60, 50, 20, 10, 30], [40, 60, 50, 20, 30, 10], [40, 60, 50, 30, 10, 20], [40, 60, 50, 30, 20, 10], [50, 10, 20, 30, 40, 60], [50, 10, 20, 30, 60, 40], [50, 10, 20, 40, 30, 60], [50, 10, 20, 40, 60, 30], [50, 10, 20, 60, 30, 40], [50, 10, 20, 60, 40, 30], [50, 10, 30, 20, 40, 60], [50, 10, 30, 20, 60, 40], [50, 10, 30, 40, 20, 60], [50, 10, 30, 40, 60, 20], [50, 10, 30, 60, 20, 40], [50, 10, 30, 60, 40, 20], [50, 10, 40, 20, 30, 60], [50, 10, 40, 20, 60, 30], [50, 10, 40, 30, 20, 60], [50, 10, 40, 30, 60, 20], [50, 10, 40, 60, 20, 30], [50, 10, 40, 60, 30, 20], [50, 10, 60, 20, 30, 40], [50, 10, 60, 20, 40, 30], [50, 10, 60, 30, 20, 40], [50, 10, 60, 30, 40, 20], [50, 10, 60, 40, 20, 30], [50, 10, 60, 40, 30, 20], [50, 20, 10, 30, 40, 60], [50, 20, 10, 30, 60, 40], [50, 20, 10, 40, 30, 60], [50, 20, 10, 40, 60, 30], [50, 20, 10, 60, 30, 40], [50, 20, 10, 60, 40, 30], [50, 20, 30, 10, 40, 60], [50, 20, 30, 10, 60, 40], [50, 20, 30, 40, 10, 60], [50, 20, 30, 40, 60, 10], [50, 20, 30, 60, 10, 40], [50, 20, 30, 60, 40, 10], [50, 20, 40, 10, 30, 60], [50, 20, 40, 10, 60, 30], [50, 20, 40, 30, 10, 60], [50, 20, 40, 30, 60, 10], [50, 20, 40, 60, 10, 30], [50, 20, 40, 60, 30, 10], [50, 20, 60, 10, 30, 40], [50, 20, 60, 10, 40, 30], [50, 20, 60, 30, 10, 40], [50, 20, 60, 30, 40, 10], [50, 20, 60, 40, 10, 30], [50, 20, 60, 40, 30, 10], [50, 30, 10, 20, 40, 60], [50, 30, 10, 20, 60, 40], [50, 30, 10, 40, 20, 60], [50, 30, 10, 40, 60, 20], [50, 30, 10, 60, 20, 40], [50, 30, 10, 60, 40, 20], [50, 30, 20, 10, 40, 60], [50, 30, 20, 10, 60, 40], [50, 30, 20, 40, 10, 60], [50, 30, 20, 40, 60, 10], [50, 30, 20, 60, 10, 40], [50, 30, 20, 60, 40, 10], [50, 30, 40, 10, 20, 60], [50, 30, 40, 10, 60, 20], [50, 30, 40, 20, 10, 60], [50, 30, 40, 20, 60, 10], [50, 30, 40, 60, 10, 20], [50, 30, 40, 60, 20, 10], [50, 30, 60, 10, 20, 40], [50, 30, 60, 10, 40, 20], [50, 30, 60, 20, 10, 40], [50, 30, 60, 20, 40, 10], [50, 30, 60, 40, 10, 20], [50, 30, 60, 40, 20, 10], [50, 40, 10, 20, 30, 60], [50, 40, 10, 20, 60, 30], [50, 40, 10, 30, 20, 60], [50, 40, 10, 30, 60, 20], [50, 40, 10, 60, 20, 30], [50, 40, 10, 60, 30, 20], [50, 40, 20, 10, 30, 60], [50, 40, 20, 10, 60, 30], [50, 40, 20, 30, 10, 60], [50, 40, 20, 30, 60, 10], [50, 40, 20, 60, 10, 30], [50, 40, 20, 60, 30, 10], [50, 40, 30, 10, 20, 60], [50, 40, 30, 10, 60, 20], [50, 40, 30, 20, 10, 60], [50, 40, 30, 20, 60, 10], [50, 40, 30, 60, 10, 20], [50, 40, 30, 60, 20, 10], [50, 40, 60, 10, 20, 30], [50, 40, 60, 10, 30, 20], [50, 40, 60, 20, 10, 30], [50, 40, 60, 20, 30, 10], [50, 40, 60, 30, 10, 20], [50, 40, 60, 30, 20, 10], [50, 60, 10, 20, 30, 40], [50, 60, 10, 20, 40, 30], [50, 60, 10, 30, 20, 40], [50, 60, 10, 30, 40, 20], [50, 60, 10, 40, 20, 30], [50, 60, 10, 40, 30, 20], [50, 60, 20, 10, 30, 40], [50, 60, 20, 10, 40, 30], [50, 60, 20, 30, 10, 40], [50, 60, 20, 30, 40, 10], [50, 60, 20, 40, 10, 30], [50, 60, 20, 40, 30, 10], [50, 60, 30, 10, 20, 40], [50, 60, 30, 10, 40, 20], [50, 60, 30, 20, 10, 40], [50, 60, 30, 20, 40, 10], [50, 60, 30, 40, 10, 20], [50, 60, 30, 40, 20, 10], [50, 60, 40, 10, 20, 30], [50, 60, 40, 10, 30, 20], [50, 60, 40, 20, 10, 30], [50, 60, 40, 20, 30, 10], [50, 60, 40, 30, 10, 20], [50, 60, 40, 30, 20, 10], [60, 10, 20, 30, 40, 50], [60, 10, 20, 30, 50, 40], [60, 10, 20, 40, 30, 50], [60, 10, 20, 40, 50, 30], [60, 10, 20, 50, 30, 40], [60, 10, 20, 50, 40, 30], [60, 10, 30, 20, 40, 50], [60, 10, 30, 20, 50, 40], [60, 10, 30, 40, 20, 50], [60, 10, 30, 40, 50, 20], [60, 10, 30, 50, 20, 40], [60, 10, 30, 50, 40, 20], [60, 10, 40, 20, 30, 50], [60, 10, 40, 20, 50, 30], [60, 10, 40, 30, 20, 50], [60, 10, 40, 30, 50, 20], [60, 10, 40, 50, 20, 30], [60, 10, 40, 50, 30, 20], [60, 10, 50, 20, 30, 40], [60, 10, 50, 20, 40, 30], [60, 10, 50, 30, 20, 40], [60, 10, 50, 30, 40, 20], [60, 10, 50, 40, 20, 30], [60, 10, 50, 40, 30, 20], [60, 20, 10, 30, 40, 50], [60, 20, 10, 30, 50, 40], [60, 20, 10, 40, 30, 50], [60, 20, 10, 40, 50, 30], [60, 20, 10, 50, 30, 40], [60, 20, 10, 50, 40, 30], [60, 20, 30, 10, 40, 50], [60, 20, 30, 10, 50, 40], [60, 20, 30, 40, 10, 50], [60, 20, 30, 40, 50, 10], [60, 20, 30, 50, 10, 40], [60, 20, 30, 50, 40, 10], [60, 20, 40, 10, 30, 50], [60, 20, 40, 10, 50, 30], [60, 20, 40, 30, 10, 50], [60, 20, 40, 30, 50, 10], [60, 20, 40, 50, 10, 30], [60, 20, 40, 50, 30, 10], [60, 20, 50, 10, 30, 40], [60, 20, 50, 10, 40, 30], [60, 20, 50, 30, 10, 40], [60, 20, 50, 30, 40, 10], [60, 20, 50, 40, 10, 30], [60, 20, 50, 40, 30, 10], [60, 30, 10, 20, 40, 50], [60, 30, 10, 20, 50, 40], [60, 30, 10, 40, 20, 50], [60, 30, 10, 40, 50, 20], [60, 30, 10, 50, 20, 40], [60, 30, 10, 50, 40, 20], [60, 30, 20, 10, 40, 50], [60, 30, 20, 10, 50, 40], [60, 30, 20, 40, 10, 50], [60, 30, 20, 40, 50, 10], [60, 30, 20, 50, 10, 40], [60, 30, 20, 50, 40, 10], [60, 30, 40, 10, 20, 50], [60, 30, 40, 10, 50, 20], [60, 30, 40, 20, 10, 50], [60, 30, 40, 20, 50, 10], [60, 30, 40, 50, 10, 20], [60, 30, 40, 50, 20, 10], [60, 30, 50, 10, 20, 40], [60, 30, 50, 10, 40, 20], [60, 30, 50, 20, 10, 40], [60, 30, 50, 20, 40, 10], [60, 30, 50, 40, 10, 20], [60, 30, 50, 40, 20, 10], [60, 40, 10, 20, 30, 50], [60, 40, 10, 20, 50, 30], [60, 40, 10, 30, 20, 50], [60, 40, 10, 30, 50, 20], [60, 40, 10, 50, 20, 30], [60, 40, 10, 50, 30, 20], [60, 40, 20, 10, 30, 50], [60, 40, 20, 10, 50, 30], [60, 40, 20, 30, 10, 50], [60, 40, 20, 30, 50, 10], [60, 40, 20, 50, 10, 30], [60, 40, 20, 50, 30, 10], [60, 40, 30, 10, 20, 50], [60, 40, 30, 10, 50, 20], [60, 40, 30, 20, 10, 50], [60, 40, 30, 20, 50, 10], [60, 40, 30, 50, 10, 20], [60, 40, 30, 50, 20, 10], [60, 40, 50, 10, 20, 30], [60, 40, 50, 10, 30, 20], [60, 40, 50, 20, 10, 30], [60, 40, 50, 20, 30, 10], [60, 40, 50, 30, 10, 20], [60, 40, 50, 30, 20, 10], [60, 50, 10, 20, 30, 40], [60, 50, 10, 20, 40, 30], [60, 50, 10, 30, 20, 40], [60, 50, 10, 30, 40, 20], [60, 50, 10, 40, 20, 30], [60, 50, 10, 40, 30, 20], [60, 50, 20, 10, 30, 40], [60, 50, 20, 10, 40, 30], [60, 50, 20, 30, 10, 40], [60, 50, 20, 30, 40, 10], [60, 50, 20, 40, 10, 30], [60, 50, 20, 40, 30, 10], [60, 50, 30, 10, 20, 40], [60, 50, 30, 10, 40, 20], [60, 50, 30, 20, 10, 40], [60, 50, 30, 20, 40, 10], [60, 50, 30, 40, 10, 20], [60, 50, 30, 40, 20, 10], [60, 50, 40, 10, 20, 30], [60, 50, 40, 10, 30, 20], [60, 50, 40, 20, 10, 30], [60, 50, 40, 20, 30, 10], [60, 50, 40, 30, 10, 20], [60, 50, 40, 30, 20, 10]]\n assert candidate(nums = [7, 14, 21, 28, 35, 42]) == [[7, 14, 21, 28, 35, 42], [7, 14, 21, 28, 42, 35], [7, 14, 21, 35, 28, 42], [7, 14, 21, 35, 42, 28], [7, 14, 21, 42, 28, 35], [7, 14, 21, 42, 35, 28], [7, 14, 28, 21, 35, 42], [7, 14, 28, 21, 42, 35], [7, 14, 28, 35, 21, 42], [7, 14, 28, 35, 42, 21], [7, 14, 28, 42, 21, 35], [7, 14, 28, 42, 35, 21], [7, 14, 35, 21, 28, 42], [7, 14, 35, 21, 42, 28], [7, 14, 35, 28, 21, 42], [7, 14, 35, 28, 42, 21], [7, 14, 35, 42, 21, 28], [7, 14, 35, 42, 28, 21], [7, 14, 42, 21, 28, 35], [7, 14, 42, 21, 35, 28], [7, 14, 42, 28, 21, 35], [7, 14, 42, 28, 35, 21], [7, 14, 42, 35, 21, 28], [7, 14, 42, 35, 28, 21], [7, 21, 14, 28, 35, 42], [7, 21, 14, 28, 42, 35], [7, 21, 14, 35, 28, 42], [7, 21, 14, 35, 42, 28], [7, 21, 14, 42, 28, 35], [7, 21, 14, 42, 35, 28], [7, 21, 28, 14, 35, 42], [7, 21, 28, 14, 42, 35], [7, 21, 28, 35, 14, 42], [7, 21, 28, 35, 42, 14], [7, 21, 28, 42, 14, 35], [7, 21, 28, 42, 35, 14], [7, 21, 35, 14, 28, 42], [7, 21, 35, 14, 42, 28], [7, 21, 35, 28, 14, 42], [7, 21, 35, 28, 42, 14], [7, 21, 35, 42, 14, 28], [7, 21, 35, 42, 28, 14], [7, 21, 42, 14, 28, 35], [7, 21, 42, 14, 35, 28], [7, 21, 42, 28, 14, 35], [7, 21, 42, 28, 35, 14], [7, 21, 42, 35, 14, 28], [7, 21, 42, 35, 28, 14], [7, 28, 14, 21, 35, 42], [7, 28, 14, 21, 42, 35], [7, 28, 14, 35, 21, 42], [7, 28, 14, 35, 42, 21], [7, 28, 14, 42, 21, 35], [7, 28, 14, 42, 35, 21], [7, 28, 21, 14, 35, 42], [7, 28, 21, 14, 42, 35], [7, 28, 21, 35, 14, 42], [7, 28, 21, 35, 42, 14], [7, 28, 21, 42, 14, 35], [7, 28, 21, 42, 35, 14], [7, 28, 35, 14, 21, 42], [7, 28, 35, 14, 42, 21], [7, 28, 35, 21, 14, 42], [7, 28, 35, 21, 42, 14], [7, 28, 35, 42, 14, 21], [7, 28, 35, 42, 21, 14], [7, 28, 42, 14, 21, 35], [7, 28, 42, 14, 35, 21], [7, 28, 42, 21, 14, 35], [7, 28, 42, 21, 35, 14], [7, 28, 42, 35, 14, 21], [7, 28, 42, 35, 21, 14], [7, 35, 14, 21, 28, 42], [7, 35, 14, 21, 42, 28], [7, 35, 14, 28, 21, 42], [7, 35, 14, 28, 42, 21], [7, 35, 14, 42, 21, 28], [7, 35, 14, 42, 28, 21], [7, 35, 21, 14, 28, 42], [7, 35, 21, 14, 42, 28], [7, 35, 21, 28, 14, 42], [7, 35, 21, 28, 42, 14], [7, 35, 21, 42, 14, 28], [7, 35, 21, 42, 28, 14], [7, 35, 28, 14, 21, 42], [7, 35, 28, 14, 42, 21], [7, 35, 28, 21, 14, 42], [7, 35, 28, 21, 42, 14], [7, 35, 28, 42, 14, 21], [7, 35, 28, 42, 21, 14], [7, 35, 42, 14, 21, 28], [7, 35, 42, 14, 28, 21], [7, 35, 42, 21, 14, 28], [7, 35, 42, 21, 28, 14], [7, 35, 42, 28, 14, 21], [7, 35, 42, 28, 21, 14], [7, 42, 14, 21, 28, 35], [7, 42, 14, 21, 35, 28], [7, 42, 14, 28, 21, 35], [7, 42, 14, 28, 35, 21], [7, 42, 14, 35, 21, 28], [7, 42, 14, 35, 28, 21], [7, 42, 21, 14, 28, 35], [7, 42, 21, 14, 35, 28], [7, 42, 21, 28, 14, 35], [7, 42, 21, 28, 35, 14], [7, 42, 21, 35, 14, 28], [7, 42, 21, 35, 28, 14], [7, 42, 28, 14, 21, 35], [7, 42, 28, 14, 35, 21], [7, 42, 28, 21, 14, 35], [7, 42, 28, 21, 35, 14], [7, 42, 28, 35, 14, 21], [7, 42, 28, 35, 21, 14], [7, 42, 35, 14, 21, 28], [7, 42, 35, 14, 28, 21], [7, 42, 35, 21, 14, 28], [7, 42, 35, 21, 28, 14], [7, 42, 35, 28, 14, 21], [7, 42, 35, 28, 21, 14], [14, 7, 21, 28, 35, 42], [14, 7, 21, 28, 42, 35], [14, 7, 21, 35, 28, 42], [14, 7, 21, 35, 42, 28], [14, 7, 21, 42, 28, 35], [14, 7, 21, 42, 35, 28], [14, 7, 28, 21, 35, 42], [14, 7, 28, 21, 42, 35], [14, 7, 28, 35, 21, 42], [14, 7, 28, 35, 42, 21], [14, 7, 28, 42, 21, 35], [14, 7, 28, 42, 35, 21], [14, 7, 35, 21, 28, 42], [14, 7, 35, 21, 42, 28], [14, 7, 35, 28, 21, 42], [14, 7, 35, 28, 42, 21], [14, 7, 35, 42, 21, 28], [14, 7, 35, 42, 28, 21], [14, 7, 42, 21, 28, 35], [14, 7, 42, 21, 35, 28], [14, 7, 42, 28, 21, 35], [14, 7, 42, 28, 35, 21], [14, 7, 42, 35, 21, 28], [14, 7, 42, 35, 28, 21], [14, 21, 7, 28, 35, 42], [14, 21, 7, 28, 42, 35], [14, 21, 7, 35, 28, 42], [14, 21, 7, 35, 42, 28], [14, 21, 7, 42, 28, 35], [14, 21, 7, 42, 35, 28], [14, 21, 28, 7, 35, 42], [14, 21, 28, 7, 42, 35], [14, 21, 28, 35, 7, 42], [14, 21, 28, 35, 42, 7], [14, 21, 28, 42, 7, 35], [14, 21, 28, 42, 35, 7], [14, 21, 35, 7, 28, 42], [14, 21, 35, 7, 42, 28], [14, 21, 35, 28, 7, 42], [14, 21, 35, 28, 42, 7], [14, 21, 35, 42, 7, 28], [14, 21, 35, 42, 28, 7], [14, 21, 42, 7, 28, 35], [14, 21, 42, 7, 35, 28], [14, 21, 42, 28, 7, 35], [14, 21, 42, 28, 35, 7], [14, 21, 42, 35, 7, 28], [14, 21, 42, 35, 28, 7], [14, 28, 7, 21, 35, 42], [14, 28, 7, 21, 42, 35], [14, 28, 7, 35, 21, 42], [14, 28, 7, 35, 42, 21], [14, 28, 7, 42, 21, 35], [14, 28, 7, 42, 35, 21], [14, 28, 21, 7, 35, 42], [14, 28, 21, 7, 42, 35], [14, 28, 21, 35, 7, 42], [14, 28, 21, 35, 42, 7], [14, 28, 21, 42, 7, 35], [14, 28, 21, 42, 35, 7], [14, 28, 35, 7, 21, 42], [14, 28, 35, 7, 42, 21], [14, 28, 35, 21, 7, 42], [14, 28, 35, 21, 42, 7], [14, 28, 35, 42, 7, 21], [14, 28, 35, 42, 21, 7], [14, 28, 42, 7, 21, 35], [14, 28, 42, 7, 35, 21], [14, 28, 42, 21, 7, 35], [14, 28, 42, 21, 35, 7], [14, 28, 42, 35, 7, 21], [14, 28, 42, 35, 21, 7], [14, 35, 7, 21, 28, 42], [14, 35, 7, 21, 42, 28], [14, 35, 7, 28, 21, 42], [14, 35, 7, 28, 42, 21], [14, 35, 7, 42, 21, 28], [14, 35, 7, 42, 28, 21], [14, 35, 21, 7, 28, 42], [14, 35, 21, 7, 42, 28], [14, 35, 21, 28, 7, 42], [14, 35, 21, 28, 42, 7], [14, 35, 21, 42, 7, 28], [14, 35, 21, 42, 28, 7], [14, 35, 28, 7, 21, 42], [14, 35, 28, 7, 42, 21], [14, 35, 28, 21, 7, 42], [14, 35, 28, 21, 42, 7], [14, 35, 28, 42, 7, 21], [14, 35, 28, 42, 21, 7], [14, 35, 42, 7, 21, 28], [14, 35, 42, 7, 28, 21], [14, 35, 42, 21, 7, 28], [14, 35, 42, 21, 28, 7], [14, 35, 42, 28, 7, 21], [14, 35, 42, 28, 21, 7], [14, 42, 7, 21, 28, 35], [14, 42, 7, 21, 35, 28], [14, 42, 7, 28, 21, 35], [14, 42, 7, 28, 35, 21], [14, 42, 7, 35, 21, 28], [14, 42, 7, 35, 28, 21], [14, 42, 21, 7, 28, 35], [14, 42, 21, 7, 35, 28], [14, 42, 21, 28, 7, 35], [14, 42, 21, 28, 35, 7], [14, 42, 21, 35, 7, 28], [14, 42, 21, 35, 28, 7], [14, 42, 28, 7, 21, 35], [14, 42, 28, 7, 35, 21], [14, 42, 28, 21, 7, 35], [14, 42, 28, 21, 35, 7], [14, 42, 28, 35, 7, 21], [14, 42, 28, 35, 21, 7], [14, 42, 35, 7, 21, 28], [14, 42, 35, 7, 28, 21], [14, 42, 35, 21, 7, 28], [14, 42, 35, 21, 28, 7], [14, 42, 35, 28, 7, 21], [14, 42, 35, 28, 21, 7], [21, 7, 14, 28, 35, 42], [21, 7, 14, 28, 42, 35], [21, 7, 14, 35, 28, 42], [21, 7, 14, 35, 42, 28], [21, 7, 14, 42, 28, 35], [21, 7, 14, 42, 35, 28], [21, 7, 28, 14, 35, 42], [21, 7, 28, 14, 42, 35], [21, 7, 28, 35, 14, 42], [21, 7, 28, 35, 42, 14], [21, 7, 28, 42, 14, 35], [21, 7, 28, 42, 35, 14], [21, 7, 35, 14, 28, 42], [21, 7, 35, 14, 42, 28], [21, 7, 35, 28, 14, 42], [21, 7, 35, 28, 42, 14], [21, 7, 35, 42, 14, 28], [21, 7, 35, 42, 28, 14], [21, 7, 42, 14, 28, 35], [21, 7, 42, 14, 35, 28], [21, 7, 42, 28, 14, 35], [21, 7, 42, 28, 35, 14], [21, 7, 42, 35, 14, 28], [21, 7, 42, 35, 28, 14], [21, 14, 7, 28, 35, 42], [21, 14, 7, 28, 42, 35], [21, 14, 7, 35, 28, 42], [21, 14, 7, 35, 42, 28], [21, 14, 7, 42, 28, 35], [21, 14, 7, 42, 35, 28], [21, 14, 28, 7, 35, 42], [21, 14, 28, 7, 42, 35], [21, 14, 28, 35, 7, 42], [21, 14, 28, 35, 42, 7], [21, 14, 28, 42, 7, 35], [21, 14, 28, 42, 35, 7], [21, 14, 35, 7, 28, 42], [21, 14, 35, 7, 42, 28], [21, 14, 35, 28, 7, 42], [21, 14, 35, 28, 42, 7], [21, 14, 35, 42, 7, 28], [21, 14, 35, 42, 28, 7], [21, 14, 42, 7, 28, 35], [21, 14, 42, 7, 35, 28], [21, 14, 42, 28, 7, 35], [21, 14, 42, 28, 35, 7], [21, 14, 42, 35, 7, 28], [21, 14, 42, 35, 28, 7], [21, 28, 7, 14, 35, 42], [21, 28, 7, 14, 42, 35], [21, 28, 7, 35, 14, 42], [21, 28, 7, 35, 42, 14], [21, 28, 7, 42, 14, 35], [21, 28, 7, 42, 35, 14], [21, 28, 14, 7, 35, 42], [21, 28, 14, 7, 42, 35], [21, 28, 14, 35, 7, 42], [21, 28, 14, 35, 42, 7], [21, 28, 14, 42, 7, 35], [21, 28, 14, 42, 35, 7], [21, 28, 35, 7, 14, 42], [21, 28, 35, 7, 42, 14], [21, 28, 35, 14, 7, 42], [21, 28, 35, 14, 42, 7], [21, 28, 35, 42, 7, 14], [21, 28, 35, 42, 14, 7], [21, 28, 42, 7, 14, 35], [21, 28, 42, 7, 35, 14], [21, 28, 42, 14, 7, 35], [21, 28, 42, 14, 35, 7], [21, 28, 42, 35, 7, 14], [21, 28, 42, 35, 14, 7], [21, 35, 7, 14, 28, 42], [21, 35, 7, 14, 42, 28], [21, 35, 7, 28, 14, 42], [21, 35, 7, 28, 42, 14], [21, 35, 7, 42, 14, 28], [21, 35, 7, 42, 28, 14], [21, 35, 14, 7, 28, 42], [21, 35, 14, 7, 42, 28], [21, 35, 14, 28, 7, 42], [21, 35, 14, 28, 42, 7], [21, 35, 14, 42, 7, 28], [21, 35, 14, 42, 28, 7], [21, 35, 28, 7, 14, 42], [21, 35, 28, 7, 42, 14], [21, 35, 28, 14, 7, 42], [21, 35, 28, 14, 42, 7], [21, 35, 28, 42, 7, 14], [21, 35, 28, 42, 14, 7], [21, 35, 42, 7, 14, 28], [21, 35, 42, 7, 28, 14], [21, 35, 42, 14, 7, 28], [21, 35, 42, 14, 28, 7], [21, 35, 42, 28, 7, 14], [21, 35, 42, 28, 14, 7], [21, 42, 7, 14, 28, 35], [21, 42, 7, 14, 35, 28], [21, 42, 7, 28, 14, 35], [21, 42, 7, 28, 35, 14], [21, 42, 7, 35, 14, 28], [21, 42, 7, 35, 28, 14], [21, 42, 14, 7, 28, 35], [21, 42, 14, 7, 35, 28], [21, 42, 14, 28, 7, 35], [21, 42, 14, 28, 35, 7], [21, 42, 14, 35, 7, 28], [21, 42, 14, 35, 28, 7], [21, 42, 28, 7, 14, 35], [21, 42, 28, 7, 35, 14], [21, 42, 28, 14, 7, 35], [21, 42, 28, 14, 35, 7], [21, 42, 28, 35, 7, 14], [21, 42, 28, 35, 14, 7], [21, 42, 35, 7, 14, 28], [21, 42, 35, 7, 28, 14], [21, 42, 35, 14, 7, 28], [21, 42, 35, 14, 28, 7], [21, 42, 35, 28, 7, 14], [21, 42, 35, 28, 14, 7], [28, 7, 14, 21, 35, 42], [28, 7, 14, 21, 42, 35], [28, 7, 14, 35, 21, 42], [28, 7, 14, 35, 42, 21], [28, 7, 14, 42, 21, 35], [28, 7, 14, 42, 35, 21], [28, 7, 21, 14, 35, 42], [28, 7, 21, 14, 42, 35], [28, 7, 21, 35, 14, 42], [28, 7, 21, 35, 42, 14], [28, 7, 21, 42, 14, 35], [28, 7, 21, 42, 35, 14], [28, 7, 35, 14, 21, 42], [28, 7, 35, 14, 42, 21], [28, 7, 35, 21, 14, 42], [28, 7, 35, 21, 42, 14], [28, 7, 35, 42, 14, 21], [28, 7, 35, 42, 21, 14], [28, 7, 42, 14, 21, 35], [28, 7, 42, 14, 35, 21], [28, 7, 42, 21, 14, 35], [28, 7, 42, 21, 35, 14], [28, 7, 42, 35, 14, 21], [28, 7, 42, 35, 21, 14], [28, 14, 7, 21, 35, 42], [28, 14, 7, 21, 42, 35], [28, 14, 7, 35, 21, 42], [28, 14, 7, 35, 42, 21], [28, 14, 7, 42, 21, 35], [28, 14, 7, 42, 35, 21], [28, 14, 21, 7, 35, 42], [28, 14, 21, 7, 42, 35], [28, 14, 21, 35, 7, 42], [28, 14, 21, 35, 42, 7], [28, 14, 21, 42, 7, 35], [28, 14, 21, 42, 35, 7], [28, 14, 35, 7, 21, 42], [28, 14, 35, 7, 42, 21], [28, 14, 35, 21, 7, 42], [28, 14, 35, 21, 42, 7], [28, 14, 35, 42, 7, 21], [28, 14, 35, 42, 21, 7], [28, 14, 42, 7, 21, 35], [28, 14, 42, 7, 35, 21], [28, 14, 42, 21, 7, 35], [28, 14, 42, 21, 35, 7], [28, 14, 42, 35, 7, 21], [28, 14, 42, 35, 21, 7], [28, 21, 7, 14, 35, 42], [28, 21, 7, 14, 42, 35], [28, 21, 7, 35, 14, 42], [28, 21, 7, 35, 42, 14], [28, 21, 7, 42, 14, 35], [28, 21, 7, 42, 35, 14], [28, 21, 14, 7, 35, 42], [28, 21, 14, 7, 42, 35], [28, 21, 14, 35, 7, 42], [28, 21, 14, 35, 42, 7], [28, 21, 14, 42, 7, 35], [28, 21, 14, 42, 35, 7], [28, 21, 35, 7, 14, 42], [28, 21, 35, 7, 42, 14], [28, 21, 35, 14, 7, 42], [28, 21, 35, 14, 42, 7], [28, 21, 35, 42, 7, 14], [28, 21, 35, 42, 14, 7], [28, 21, 42, 7, 14, 35], [28, 21, 42, 7, 35, 14], [28, 21, 42, 14, 7, 35], [28, 21, 42, 14, 35, 7], [28, 21, 42, 35, 7, 14], [28, 21, 42, 35, 14, 7], [28, 35, 7, 14, 21, 42], [28, 35, 7, 14, 42, 21], [28, 35, 7, 21, 14, 42], [28, 35, 7, 21, 42, 14], [28, 35, 7, 42, 14, 21], [28, 35, 7, 42, 21, 14], [28, 35, 14, 7, 21, 42], [28, 35, 14, 7, 42, 21], [28, 35, 14, 21, 7, 42], [28, 35, 14, 21, 42, 7], [28, 35, 14, 42, 7, 21], [28, 35, 14, 42, 21, 7], [28, 35, 21, 7, 14, 42], [28, 35, 21, 7, 42, 14], [28, 35, 21, 14, 7, 42], [28, 35, 21, 14, 42, 7], [28, 35, 21, 42, 7, 14], [28, 35, 21, 42, 14, 7], [28, 35, 42, 7, 14, 21], [28, 35, 42, 7, 21, 14], [28, 35, 42, 14, 7, 21], [28, 35, 42, 14, 21, 7], [28, 35, 42, 21, 7, 14], [28, 35, 42, 21, 14, 7], [28, 42, 7, 14, 21, 35], [28, 42, 7, 14, 35, 21], [28, 42, 7, 21, 14, 35], [28, 42, 7, 21, 35, 14], [28, 42, 7, 35, 14, 21], [28, 42, 7, 35, 21, 14], [28, 42, 14, 7, 21, 35], [28, 42, 14, 7, 35, 21], [28, 42, 14, 21, 7, 35], [28, 42, 14, 21, 35, 7], [28, 42, 14, 35, 7, 21], [28, 42, 14, 35, 21, 7], [28, 42, 21, 7, 14, 35], [28, 42, 21, 7, 35, 14], [28, 42, 21, 14, 7, 35], [28, 42, 21, 14, 35, 7], [28, 42, 21, 35, 7, 14], [28, 42, 21, 35, 14, 7], [28, 42, 35, 7, 14, 21], [28, 42, 35, 7, 21, 14], [28, 42, 35, 14, 7, 21], [28, 42, 35, 14, 21, 7], [28, 42, 35, 21, 7, 14], [28, 42, 35, 21, 14, 7], [35, 7, 14, 21, 28, 42], [35, 7, 14, 21, 42, 28], [35, 7, 14, 28, 21, 42], [35, 7, 14, 28, 42, 21], [35, 7, 14, 42, 21, 28], [35, 7, 14, 42, 28, 21], [35, 7, 21, 14, 28, 42], [35, 7, 21, 14, 42, 28], [35, 7, 21, 28, 14, 42], [35, 7, 21, 28, 42, 14], [35, 7, 21, 42, 14, 28], [35, 7, 21, 42, 28, 14], [35, 7, 28, 14, 21, 42], [35, 7, 28, 14, 42, 21], [35, 7, 28, 21, 14, 42], [35, 7, 28, 21, 42, 14], [35, 7, 28, 42, 14, 21], [35, 7, 28, 42, 21, 14], [35, 7, 42, 14, 21, 28], [35, 7, 42, 14, 28, 21], [35, 7, 42, 21, 14, 28], [35, 7, 42, 21, 28, 14], [35, 7, 42, 28, 14, 21], [35, 7, 42, 28, 21, 14], [35, 14, 7, 21, 28, 42], [35, 14, 7, 21, 42, 28], [35, 14, 7, 28, 21, 42], [35, 14, 7, 28, 42, 21], [35, 14, 7, 42, 21, 28], [35, 14, 7, 42, 28, 21], [35, 14, 21, 7, 28, 42], [35, 14, 21, 7, 42, 28], [35, 14, 21, 28, 7, 42], [35, 14, 21, 28, 42, 7], [35, 14, 21, 42, 7, 28], [35, 14, 21, 42, 28, 7], [35, 14, 28, 7, 21, 42], [35, 14, 28, 7, 42, 21], [35, 14, 28, 21, 7, 42], [35, 14, 28, 21, 42, 7], [35, 14, 28, 42, 7, 21], [35, 14, 28, 42, 21, 7], [35, 14, 42, 7, 21, 28], [35, 14, 42, 7, 28, 21], [35, 14, 42, 21, 7, 28], [35, 14, 42, 21, 28, 7], [35, 14, 42, 28, 7, 21], [35, 14, 42, 28, 21, 7], [35, 21, 7, 14, 28, 42], [35, 21, 7, 14, 42, 28], [35, 21, 7, 28, 14, 42], [35, 21, 7, 28, 42, 14], [35, 21, 7, 42, 14, 28], [35, 21, 7, 42, 28, 14], [35, 21, 14, 7, 28, 42], [35, 21, 14, 7, 42, 28], [35, 21, 14, 28, 7, 42], [35, 21, 14, 28, 42, 7], [35, 21, 14, 42, 7, 28], [35, 21, 14, 42, 28, 7], [35, 21, 28, 7, 14, 42], [35, 21, 28, 7, 42, 14], [35, 21, 28, 14, 7, 42], [35, 21, 28, 14, 42, 7], [35, 21, 28, 42, 7, 14], [35, 21, 28, 42, 14, 7], [35, 21, 42, 7, 14, 28], [35, 21, 42, 7, 28, 14], [35, 21, 42, 14, 7, 28], [35, 21, 42, 14, 28, 7], [35, 21, 42, 28, 7, 14], [35, 21, 42, 28, 14, 7], [35, 28, 7, 14, 21, 42], [35, 28, 7, 14, 42, 21], [35, 28, 7, 21, 14, 42], [35, 28, 7, 21, 42, 14], [35, 28, 7, 42, 14, 21], [35, 28, 7, 42, 21, 14], [35, 28, 14, 7, 21, 42], [35, 28, 14, 7, 42, 21], [35, 28, 14, 21, 7, 42], [35, 28, 14, 21, 42, 7], [35, 28, 14, 42, 7, 21], [35, 28, 14, 42, 21, 7], [35, 28, 21, 7, 14, 42], [35, 28, 21, 7, 42, 14], [35, 28, 21, 14, 7, 42], [35, 28, 21, 14, 42, 7], [35, 28, 21, 42, 7, 14], [35, 28, 21, 42, 14, 7], [35, 28, 42, 7, 14, 21], [35, 28, 42, 7, 21, 14], [35, 28, 42, 14, 7, 21], [35, 28, 42, 14, 21, 7], [35, 28, 42, 21, 7, 14], [35, 28, 42, 21, 14, 7], [35, 42, 7, 14, 21, 28], [35, 42, 7, 14, 28, 21], [35, 42, 7, 21, 14, 28], [35, 42, 7, 21, 28, 14], [35, 42, 7, 28, 14, 21], [35, 42, 7, 28, 21, 14], [35, 42, 14, 7, 21, 28], [35, 42, 14, 7, 28, 21], [35, 42, 14, 21, 7, 28], [35, 42, 14, 21, 28, 7], [35, 42, 14, 28, 7, 21], [35, 42, 14, 28, 21, 7], [35, 42, 21, 7, 14, 28], [35, 42, 21, 7, 28, 14], [35, 42, 21, 14, 7, 28], [35, 42, 21, 14, 28, 7], [35, 42, 21, 28, 7, 14], [35, 42, 21, 28, 14, 7], [35, 42, 28, 7, 14, 21], [35, 42, 28, 7, 21, 14], [35, 42, 28, 14, 7, 21], [35, 42, 28, 14, 21, 7], [35, 42, 28, 21, 7, 14], [35, 42, 28, 21, 14, 7], [42, 7, 14, 21, 28, 35], [42, 7, 14, 21, 35, 28], [42, 7, 14, 28, 21, 35], [42, 7, 14, 28, 35, 21], [42, 7, 14, 35, 21, 28], [42, 7, 14, 35, 28, 21], [42, 7, 21, 14, 28, 35], [42, 7, 21, 14, 35, 28], [42, 7, 21, 28, 14, 35], [42, 7, 21, 28, 35, 14], [42, 7, 21, 35, 14, 28], [42, 7, 21, 35, 28, 14], [42, 7, 28, 14, 21, 35], [42, 7, 28, 14, 35, 21], [42, 7, 28, 21, 14, 35], [42, 7, 28, 21, 35, 14], [42, 7, 28, 35, 14, 21], [42, 7, 28, 35, 21, 14], [42, 7, 35, 14, 21, 28], [42, 7, 35, 14, 28, 21], [42, 7, 35, 21, 14, 28], [42, 7, 35, 21, 28, 14], [42, 7, 35, 28, 14, 21], [42, 7, 35, 28, 21, 14], [42, 14, 7, 21, 28, 35], [42, 14, 7, 21, 35, 28], [42, 14, 7, 28, 21, 35], [42, 14, 7, 28, 35, 21], [42, 14, 7, 35, 21, 28], [42, 14, 7, 35, 28, 21], [42, 14, 21, 7, 28, 35], [42, 14, 21, 7, 35, 28], [42, 14, 21, 28, 7, 35], [42, 14, 21, 28, 35, 7], [42, 14, 21, 35, 7, 28], [42, 14, 21, 35, 28, 7], [42, 14, 28, 7, 21, 35], [42, 14, 28, 7, 35, 21], [42, 14, 28, 21, 7, 35], [42, 14, 28, 21, 35, 7], [42, 14, 28, 35, 7, 21], [42, 14, 28, 35, 21, 7], [42, 14, 35, 7, 21, 28], [42, 14, 35, 7, 28, 21], [42, 14, 35, 21, 7, 28], [42, 14, 35, 21, 28, 7], [42, 14, 35, 28, 7, 21], [42, 14, 35, 28, 21, 7], [42, 21, 7, 14, 28, 35], [42, 21, 7, 14, 35, 28], [42, 21, 7, 28, 14, 35], [42, 21, 7, 28, 35, 14], [42, 21, 7, 35, 14, 28], [42, 21, 7, 35, 28, 14], [42, 21, 14, 7, 28, 35], [42, 21, 14, 7, 35, 28], [42, 21, 14, 28, 7, 35], [42, 21, 14, 28, 35, 7], [42, 21, 14, 35, 7, 28], [42, 21, 14, 35, 28, 7], [42, 21, 28, 7, 14, 35], [42, 21, 28, 7, 35, 14], [42, 21, 28, 14, 7, 35], [42, 21, 28, 14, 35, 7], [42, 21, 28, 35, 7, 14], [42, 21, 28, 35, 14, 7], [42, 21, 35, 7, 14, 28], [42, 21, 35, 7, 28, 14], [42, 21, 35, 14, 7, 28], [42, 21, 35, 14, 28, 7], [42, 21, 35, 28, 7, 14], [42, 21, 35, 28, 14, 7], [42, 28, 7, 14, 21, 35], [42, 28, 7, 14, 35, 21], [42, 28, 7, 21, 14, 35], [42, 28, 7, 21, 35, 14], [42, 28, 7, 35, 14, 21], [42, 28, 7, 35, 21, 14], [42, 28, 14, 7, 21, 35], [42, 28, 14, 7, 35, 21], [42, 28, 14, 21, 7, 35], [42, 28, 14, 21, 35, 7], [42, 28, 14, 35, 7, 21], [42, 28, 14, 35, 21, 7], [42, 28, 21, 7, 14, 35], [42, 28, 21, 7, 35, 14], [42, 28, 21, 14, 7, 35], [42, 28, 21, 14, 35, 7], [42, 28, 21, 35, 7, 14], [42, 28, 21, 35, 14, 7], [42, 28, 35, 7, 14, 21], [42, 28, 35, 7, 21, 14], [42, 28, 35, 14, 7, 21], [42, 28, 35, 14, 21, 7], [42, 28, 35, 21, 7, 14], [42, 28, 35, 21, 14, 7], [42, 35, 7, 14, 21, 28], [42, 35, 7, 14, 28, 21], [42, 35, 7, 21, 14, 28], [42, 35, 7, 21, 28, 14], [42, 35, 7, 28, 14, 21], [42, 35, 7, 28, 21, 14], [42, 35, 14, 7, 21, 28], [42, 35, 14, 7, 28, 21], [42, 35, 14, 21, 7, 28], [42, 35, 14, 21, 28, 7], [42, 35, 14, 28, 7, 21], [42, 35, 14, 28, 21, 7], [42, 35, 21, 7, 14, 28], [42, 35, 21, 7, 28, 14], [42, 35, 21, 14, 7, 28], [42, 35, 21, 14, 28, 7], [42, 35, 21, 28, 7, 14], [42, 35, 21, 28, 14, 7], [42, 35, 28, 7, 14, 21], [42, 35, 28, 7, 21, 14], [42, 35, 28, 14, 7, 21], [42, 35, 28, 14, 21, 7], [42, 35, 28, 21, 7, 14], [42, 35, 28, 21, 14, 7]]\n assert 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 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 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 candidate(nums = [7, 14, 21, 28, 35]) == [[7, 14, 21, 28, 35], [7, 14, 21, 35, 28], [7, 14, 28, 21, 35], [7, 14, 28, 35, 21], [7, 14, 35, 21, 28], [7, 14, 35, 28, 21], [7, 21, 14, 28, 35], [7, 21, 14, 35, 28], [7, 21, 28, 14, 35], [7, 21, 28, 35, 14], [7, 21, 35, 14, 28], [7, 21, 35, 28, 14], [7, 28, 14, 21, 35], [7, 28, 14, 35, 21], [7, 28, 21, 14, 35], [7, 28, 21, 35, 14], [7, 28, 35, 14, 21], [7, 28, 35, 21, 14], [7, 35, 14, 21, 28], [7, 35, 14, 28, 21], [7, 35, 21, 14, 28], [7, 35, 21, 28, 14], [7, 35, 28, 14, 21], [7, 35, 28, 21, 14], [14, 7, 21, 28, 35], [14, 7, 21, 35, 28], [14, 7, 28, 21, 35], [14, 7, 28, 35, 21], [14, 7, 35, 21, 28], [14, 7, 35, 28, 21], [14, 21, 7, 28, 35], [14, 21, 7, 35, 28], [14, 21, 28, 7, 35], [14, 21, 28, 35, 7], [14, 21, 35, 7, 28], [14, 21, 35, 28, 7], [14, 28, 7, 21, 35], [14, 28, 7, 35, 21], [14, 28, 21, 7, 35], [14, 28, 21, 35, 7], [14, 28, 35, 7, 21], [14, 28, 35, 21, 7], [14, 35, 7, 21, 28], [14, 35, 7, 28, 21], [14, 35, 21, 7, 28], [14, 35, 21, 28, 7], [14, 35, 28, 7, 21], [14, 35, 28, 21, 7], [21, 7, 14, 28, 35], [21, 7, 14, 35, 28], [21, 7, 28, 14, 35], [21, 7, 28, 35, 14], [21, 7, 35, 14, 28], [21, 7, 35, 28, 14], [21, 14, 7, 28, 35], [21, 14, 7, 35, 28], [21, 14, 28, 7, 35], [21, 14, 28, 35, 7], [21, 14, 35, 7, 28], [21, 14, 35, 28, 7], [21, 28, 7, 14, 35], [21, 28, 7, 35, 14], [21, 28, 14, 7, 35], [21, 28, 14, 35, 7], [21, 28, 35, 7, 14], [21, 28, 35, 14, 7], [21, 35, 7, 14, 28], [21, 35, 7, 28, 14], [21, 35, 14, 7, 28], [21, 35, 14, 28, 7], [21, 35, 28, 7, 14], [21, 35, 28, 14, 7], [28, 7, 14, 21, 35], [28, 7, 14, 35, 21], [28, 7, 21, 14, 35], [28, 7, 21, 35, 14], [28, 7, 35, 14, 21], [28, 7, 35, 21, 14], [28, 14, 7, 21, 35], [28, 14, 7, 35, 21], [28, 14, 21, 7, 35], [28, 14, 21, 35, 7], [28, 14, 35, 7, 21], [28, 14, 35, 21, 7], [28, 21, 7, 14, 35], [28, 21, 7, 35, 14], [28, 21, 14, 7, 35], [28, 21, 14, 35, 7], [28, 21, 35, 7, 14], [28, 21, 35, 14, 7], [28, 35, 7, 14, 21], [28, 35, 7, 21, 14], [28, 35, 14, 7, 21], [28, 35, 14, 21, 7], [28, 35, 21, 7, 14], [28, 35, 21, 14, 7], [35, 7, 14, 21, 28], [35, 7, 14, 28, 21], [35, 7, 21, 14, 28], [35, 7, 21, 28, 14], [35, 7, 28, 14, 21], [35, 7, 28, 21, 14], [35, 14, 7, 21, 28], [35, 14, 7, 28, 21], [35, 14, 21, 7, 28], [35, 14, 21, 28, 7], [35, 14, 28, 7, 21], [35, 14, 28, 21, 7], [35, 21, 7, 14, 28], [35, 21, 7, 28, 14], [35, 21, 14, 7, 28], [35, 21, 14, 28, 7], [35, 21, 28, 7, 14], [35, 21, 28, 14, 7], [35, 28, 7, 14, 21], [35, 28, 7, 21, 14], [35, 28, 14, 7, 21], [35, 28, 14, 21, 7], [35, 28, 21, 7, 14], [35, 28, 21, 14, 7]]\n assert 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 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 candidate(nums = [100, 50, 25, 12, 6, 3]) == [[100, 50, 25, 12, 6, 3], [100, 50, 25, 12, 3, 6], [100, 50, 25, 6, 12, 3], [100, 50, 25, 6, 3, 12], [100, 50, 25, 3, 12, 6], [100, 50, 25, 3, 6, 12], [100, 50, 12, 25, 6, 3], [100, 50, 12, 25, 3, 6], [100, 50, 12, 6, 25, 3], [100, 50, 12, 6, 3, 25], [100, 50, 12, 3, 25, 6], [100, 50, 12, 3, 6, 25], [100, 50, 6, 25, 12, 3], [100, 50, 6, 25, 3, 12], [100, 50, 6, 12, 25, 3], [100, 50, 6, 12, 3, 25], [100, 50, 6, 3, 25, 12], [100, 50, 6, 3, 12, 25], [100, 50, 3, 25, 12, 6], [100, 50, 3, 25, 6, 12], [100, 50, 3, 12, 25, 6], [100, 50, 3, 12, 6, 25], [100, 50, 3, 6, 25, 12], [100, 50, 3, 6, 12, 25], [100, 25, 50, 12, 6, 3], [100, 25, 50, 12, 3, 6], [100, 25, 50, 6, 12, 3], [100, 25, 50, 6, 3, 12], [100, 25, 50, 3, 12, 6], [100, 25, 50, 3, 6, 12], [100, 25, 12, 50, 6, 3], [100, 25, 12, 50, 3, 6], [100, 25, 12, 6, 50, 3], [100, 25, 12, 6, 3, 50], [100, 25, 12, 3, 50, 6], [100, 25, 12, 3, 6, 50], [100, 25, 6, 50, 12, 3], [100, 25, 6, 50, 3, 12], [100, 25, 6, 12, 50, 3], [100, 25, 6, 12, 3, 50], [100, 25, 6, 3, 50, 12], [100, 25, 6, 3, 12, 50], [100, 25, 3, 50, 12, 6], [100, 25, 3, 50, 6, 12], [100, 25, 3, 12, 50, 6], [100, 25, 3, 12, 6, 50], [100, 25, 3, 6, 50, 12], [100, 25, 3, 6, 12, 50], [100, 12, 50, 25, 6, 3], [100, 12, 50, 25, 3, 6], [100, 12, 50, 6, 25, 3], [100, 12, 50, 6, 3, 25], [100, 12, 50, 3, 25, 6], [100, 12, 50, 3, 6, 25], [100, 12, 25, 50, 6, 3], [100, 12, 25, 50, 3, 6], [100, 12, 25, 6, 50, 3], [100, 12, 25, 6, 3, 50], [100, 12, 25, 3, 50, 6], [100, 12, 25, 3, 6, 50], [100, 12, 6, 50, 25, 3], [100, 12, 6, 50, 3, 25], [100, 12, 6, 25, 50, 3], [100, 12, 6, 25, 3, 50], [100, 12, 6, 3, 50, 25], [100, 12, 6, 3, 25, 50], [100, 12, 3, 50, 25, 6], [100, 12, 3, 50, 6, 25], [100, 12, 3, 25, 50, 6], [100, 12, 3, 25, 6, 50], [100, 12, 3, 6, 50, 25], [100, 12, 3, 6, 25, 50], [100, 6, 50, 25, 12, 3], [100, 6, 50, 25, 3, 12], [100, 6, 50, 12, 25, 3], [100, 6, 50, 12, 3, 25], [100, 6, 50, 3, 25, 12], [100, 6, 50, 3, 12, 25], [100, 6, 25, 50, 12, 3], [100, 6, 25, 50, 3, 12], [100, 6, 25, 12, 50, 3], [100, 6, 25, 12, 3, 50], [100, 6, 25, 3, 50, 12], [100, 6, 25, 3, 12, 50], [100, 6, 12, 50, 25, 3], [100, 6, 12, 50, 3, 25], [100, 6, 12, 25, 50, 3], [100, 6, 12, 25, 3, 50], [100, 6, 12, 3, 50, 25], [100, 6, 12, 3, 25, 50], [100, 6, 3, 50, 25, 12], [100, 6, 3, 50, 12, 25], [100, 6, 3, 25, 50, 12], [100, 6, 3, 25, 12, 50], [100, 6, 3, 12, 50, 25], [100, 6, 3, 12, 25, 50], [100, 3, 50, 25, 12, 6], [100, 3, 50, 25, 6, 12], [100, 3, 50, 12, 25, 6], [100, 3, 50, 12, 6, 25], [100, 3, 50, 6, 25, 12], [100, 3, 50, 6, 12, 25], [100, 3, 25, 50, 12, 6], [100, 3, 25, 50, 6, 12], [100, 3, 25, 12, 50, 6], [100, 3, 25, 12, 6, 50], [100, 3, 25, 6, 50, 12], [100, 3, 25, 6, 12, 50], [100, 3, 12, 50, 25, 6], [100, 3, 12, 50, 6, 25], [100, 3, 12, 25, 50, 6], [100, 3, 12, 25, 6, 50], [100, 3, 12, 6, 50, 25], [100, 3, 12, 6, 25, 50], [100, 3, 6, 50, 25, 12], [100, 3, 6, 50, 12, 25], [100, 3, 6, 25, 50, 12], [100, 3, 6, 25, 12, 50], [100, 3, 6, 12, 50, 25], [100, 3, 6, 12, 25, 50], [50, 100, 25, 12, 6, 3], [50, 100, 25, 12, 3, 6], [50, 100, 25, 6, 12, 3], [50, 100, 25, 6, 3, 12], [50, 100, 25, 3, 12, 6], [50, 100, 25, 3, 6, 12], [50, 100, 12, 25, 6, 3], [50, 100, 12, 25, 3, 6], [50, 100, 12, 6, 25, 3], [50, 100, 12, 6, 3, 25], [50, 100, 12, 3, 25, 6], [50, 100, 12, 3, 6, 25], [50, 100, 6, 25, 12, 3], [50, 100, 6, 25, 3, 12], [50, 100, 6, 12, 25, 3], [50, 100, 6, 12, 3, 25], [50, 100, 6, 3, 25, 12], [50, 100, 6, 3, 12, 25], [50, 100, 3, 25, 12, 6], [50, 100, 3, 25, 6, 12], [50, 100, 3, 12, 25, 6], [50, 100, 3, 12, 6, 25], [50, 100, 3, 6, 25, 12], [50, 100, 3, 6, 12, 25], [50, 25, 100, 12, 6, 3], [50, 25, 100, 12, 3, 6], [50, 25, 100, 6, 12, 3], [50, 25, 100, 6, 3, 12], [50, 25, 100, 3, 12, 6], [50, 25, 100, 3, 6, 12], [50, 25, 12, 100, 6, 3], [50, 25, 12, 100, 3, 6], [50, 25, 12, 6, 100, 3], [50, 25, 12, 6, 3, 100], [50, 25, 12, 3, 100, 6], [50, 25, 12, 3, 6, 100], [50, 25, 6, 100, 12, 3], [50, 25, 6, 100, 3, 12], [50, 25, 6, 12, 100, 3], [50, 25, 6, 12, 3, 100], [50, 25, 6, 3, 100, 12], [50, 25, 6, 3, 12, 100], [50, 25, 3, 100, 12, 6], [50, 25, 3, 100, 6, 12], [50, 25, 3, 12, 100, 6], [50, 25, 3, 12, 6, 100], [50, 25, 3, 6, 100, 12], [50, 25, 3, 6, 12, 100], [50, 12, 100, 25, 6, 3], [50, 12, 100, 25, 3, 6], [50, 12, 100, 6, 25, 3], [50, 12, 100, 6, 3, 25], [50, 12, 100, 3, 25, 6], [50, 12, 100, 3, 6, 25], [50, 12, 25, 100, 6, 3], [50, 12, 25, 100, 3, 6], [50, 12, 25, 6, 100, 3], [50, 12, 25, 6, 3, 100], [50, 12, 25, 3, 100, 6], [50, 12, 25, 3, 6, 100], [50, 12, 6, 100, 25, 3], [50, 12, 6, 100, 3, 25], [50, 12, 6, 25, 100, 3], [50, 12, 6, 25, 3, 100], [50, 12, 6, 3, 100, 25], [50, 12, 6, 3, 25, 100], [50, 12, 3, 100, 25, 6], [50, 12, 3, 100, 6, 25], [50, 12, 3, 25, 100, 6], [50, 12, 3, 25, 6, 100], [50, 12, 3, 6, 100, 25], [50, 12, 3, 6, 25, 100], [50, 6, 100, 25, 12, 3], [50, 6, 100, 25, 3, 12], [50, 6, 100, 12, 25, 3], [50, 6, 100, 12, 3, 25], [50, 6, 100, 3, 25, 12], [50, 6, 100, 3, 12, 25], [50, 6, 25, 100, 12, 3], [50, 6, 25, 100, 3, 12], [50, 6, 25, 12, 100, 3], [50, 6, 25, 12, 3, 100], [50, 6, 25, 3, 100, 12], [50, 6, 25, 3, 12, 100], [50, 6, 12, 100, 25, 3], [50, 6, 12, 100, 3, 25], [50, 6, 12, 25, 100, 3], [50, 6, 12, 25, 3, 100], [50, 6, 12, 3, 100, 25], [50, 6, 12, 3, 25, 100], [50, 6, 3, 100, 25, 12], [50, 6, 3, 100, 12, 25], [50, 6, 3, 25, 100, 12], [50, 6, 3, 25, 12, 100], [50, 6, 3, 12, 100, 25], [50, 6, 3, 12, 25, 100], [50, 3, 100, 25, 12, 6], [50, 3, 100, 25, 6, 12], [50, 3, 100, 12, 25, 6], [50, 3, 100, 12, 6, 25], [50, 3, 100, 6, 25, 12], [50, 3, 100, 6, 12, 25], [50, 3, 25, 100, 12, 6], [50, 3, 25, 100, 6, 12], [50, 3, 25, 12, 100, 6], [50, 3, 25, 12, 6, 100], [50, 3, 25, 6, 100, 12], [50, 3, 25, 6, 12, 100], [50, 3, 12, 100, 25, 6], [50, 3, 12, 100, 6, 25], [50, 3, 12, 25, 100, 6], [50, 3, 12, 25, 6, 100], [50, 3, 12, 6, 100, 25], [50, 3, 12, 6, 25, 100], [50, 3, 6, 100, 25, 12], [50, 3, 6, 100, 12, 25], [50, 3, 6, 25, 100, 12], [50, 3, 6, 25, 12, 100], [50, 3, 6, 12, 100, 25], [50, 3, 6, 12, 25, 100], [25, 100, 50, 12, 6, 3], [25, 100, 50, 12, 3, 6], [25, 100, 50, 6, 12, 3], [25, 100, 50, 6, 3, 12], [25, 100, 50, 3, 12, 6], [25, 100, 50, 3, 6, 12], [25, 100, 12, 50, 6, 3], [25, 100, 12, 50, 3, 6], [25, 100, 12, 6, 50, 3], [25, 100, 12, 6, 3, 50], [25, 100, 12, 3, 50, 6], [25, 100, 12, 3, 6, 50], [25, 100, 6, 50, 12, 3], [25, 100, 6, 50, 3, 12], [25, 100, 6, 12, 50, 3], [25, 100, 6, 12, 3, 50], [25, 100, 6, 3, 50, 12], [25, 100, 6, 3, 12, 50], [25, 100, 3, 50, 12, 6], [25, 100, 3, 50, 6, 12], [25, 100, 3, 12, 50, 6], [25, 100, 3, 12, 6, 50], [25, 100, 3, 6, 50, 12], [25, 100, 3, 6, 12, 50], [25, 50, 100, 12, 6, 3], [25, 50, 100, 12, 3, 6], [25, 50, 100, 6, 12, 3], [25, 50, 100, 6, 3, 12], [25, 50, 100, 3, 12, 6], [25, 50, 100, 3, 6, 12], [25, 50, 12, 100, 6, 3], [25, 50, 12, 100, 3, 6], [25, 50, 12, 6, 100, 3], [25, 50, 12, 6, 3, 100], [25, 50, 12, 3, 100, 6], [25, 50, 12, 3, 6, 100], [25, 50, 6, 100, 12, 3], [25, 50, 6, 100, 3, 12], [25, 50, 6, 12, 100, 3], [25, 50, 6, 12, 3, 100], [25, 50, 6, 3, 100, 12], [25, 50, 6, 3, 12, 100], [25, 50, 3, 100, 12, 6], [25, 50, 3, 100, 6, 12], [25, 50, 3, 12, 100, 6], [25, 50, 3, 12, 6, 100], [25, 50, 3, 6, 100, 12], [25, 50, 3, 6, 12, 100], [25, 12, 100, 50, 6, 3], [25, 12, 100, 50, 3, 6], [25, 12, 100, 6, 50, 3], [25, 12, 100, 6, 3, 50], [25, 12, 100, 3, 50, 6], [25, 12, 100, 3, 6, 50], [25, 12, 50, 100, 6, 3], [25, 12, 50, 100, 3, 6], [25, 12, 50, 6, 100, 3], [25, 12, 50, 6, 3, 100], [25, 12, 50, 3, 100, 6], [25, 12, 50, 3, 6, 100], [25, 12, 6, 100, 50, 3], [25, 12, 6, 100, 3, 50], [25, 12, 6, 50, 100, 3], [25, 12, 6, 50, 3, 100], [25, 12, 6, 3, 100, 50], [25, 12, 6, 3, 50, 100], [25, 12, 3, 100, 50, 6], [25, 12, 3, 100, 6, 50], [25, 12, 3, 50, 100, 6], [25, 12, 3, 50, 6, 100], [25, 12, 3, 6, 100, 50], [25, 12, 3, 6, 50, 100], [25, 6, 100, 50, 12, 3], [25, 6, 100, 50, 3, 12], [25, 6, 100, 12, 50, 3], [25, 6, 100, 12, 3, 50], [25, 6, 100, 3, 50, 12], [25, 6, 100, 3, 12, 50], [25, 6, 50, 100, 12, 3], [25, 6, 50, 100, 3, 12], [25, 6, 50, 12, 100, 3], [25, 6, 50, 12, 3, 100], [25, 6, 50, 3, 100, 12], [25, 6, 50, 3, 12, 100], [25, 6, 12, 100, 50, 3], [25, 6, 12, 100, 3, 50], [25, 6, 12, 50, 100, 3], [25, 6, 12, 50, 3, 100], [25, 6, 12, 3, 100, 50], [25, 6, 12, 3, 50, 100], [25, 6, 3, 100, 50, 12], [25, 6, 3, 100, 12, 50], [25, 6, 3, 50, 100, 12], [25, 6, 3, 50, 12, 100], [25, 6, 3, 12, 100, 50], [25, 6, 3, 12, 50, 100], [25, 3, 100, 50, 12, 6], [25, 3, 100, 50, 6, 12], [25, 3, 100, 12, 50, 6], [25, 3, 100, 12, 6, 50], [25, 3, 100, 6, 50, 12], [25, 3, 100, 6, 12, 50], [25, 3, 50, 100, 12, 6], [25, 3, 50, 100, 6, 12], [25, 3, 50, 12, 100, 6], [25, 3, 50, 12, 6, 100], [25, 3, 50, 6, 100, 12], [25, 3, 50, 6, 12, 100], [25, 3, 12, 100, 50, 6], [25, 3, 12, 100, 6, 50], [25, 3, 12, 50, 100, 6], [25, 3, 12, 50, 6, 100], [25, 3, 12, 6, 100, 50], [25, 3, 12, 6, 50, 100], [25, 3, 6, 100, 50, 12], [25, 3, 6, 100, 12, 50], [25, 3, 6, 50, 100, 12], [25, 3, 6, 50, 12, 100], [25, 3, 6, 12, 100, 50], [25, 3, 6, 12, 50, 100], [12, 100, 50, 25, 6, 3], [12, 100, 50, 25, 3, 6], [12, 100, 50, 6, 25, 3], [12, 100, 50, 6, 3, 25], [12, 100, 50, 3, 25, 6], [12, 100, 50, 3, 6, 25], [12, 100, 25, 50, 6, 3], [12, 100, 25, 50, 3, 6], [12, 100, 25, 6, 50, 3], [12, 100, 25, 6, 3, 50], [12, 100, 25, 3, 50, 6], [12, 100, 25, 3, 6, 50], [12, 100, 6, 50, 25, 3], [12, 100, 6, 50, 3, 25], [12, 100, 6, 25, 50, 3], [12, 100, 6, 25, 3, 50], [12, 100, 6, 3, 50, 25], [12, 100, 6, 3, 25, 50], [12, 100, 3, 50, 25, 6], [12, 100, 3, 50, 6, 25], [12, 100, 3, 25, 50, 6], [12, 100, 3, 25, 6, 50], [12, 100, 3, 6, 50, 25], [12, 100, 3, 6, 25, 50], [12, 50, 100, 25, 6, 3], [12, 50, 100, 25, 3, 6], [12, 50, 100, 6, 25, 3], [12, 50, 100, 6, 3, 25], [12, 50, 100, 3, 25, 6], [12, 50, 100, 3, 6, 25], [12, 50, 25, 100, 6, 3], [12, 50, 25, 100, 3, 6], [12, 50, 25, 6, 100, 3], [12, 50, 25, 6, 3, 100], [12, 50, 25, 3, 100, 6], [12, 50, 25, 3, 6, 100], [12, 50, 6, 100, 25, 3], [12, 50, 6, 100, 3, 25], [12, 50, 6, 25, 100, 3], [12, 50, 6, 25, 3, 100], [12, 50, 6, 3, 100, 25], [12, 50, 6, 3, 25, 100], [12, 50, 3, 100, 25, 6], [12, 50, 3, 100, 6, 25], [12, 50, 3, 25, 100, 6], [12, 50, 3, 25, 6, 100], [12, 50, 3, 6, 100, 25], [12, 50, 3, 6, 25, 100], [12, 25, 100, 50, 6, 3], [12, 25, 100, 50, 3, 6], [12, 25, 100, 6, 50, 3], [12, 25, 100, 6, 3, 50], [12, 25, 100, 3, 50, 6], [12, 25, 100, 3, 6, 50], [12, 25, 50, 100, 6, 3], [12, 25, 50, 100, 3, 6], [12, 25, 50, 6, 100, 3], [12, 25, 50, 6, 3, 100], [12, 25, 50, 3, 100, 6], [12, 25, 50, 3, 6, 100], [12, 25, 6, 100, 50, 3], [12, 25, 6, 100, 3, 50], [12, 25, 6, 50, 100, 3], [12, 25, 6, 50, 3, 100], [12, 25, 6, 3, 100, 50], [12, 25, 6, 3, 50, 100], [12, 25, 3, 100, 50, 6], [12, 25, 3, 100, 6, 50], [12, 25, 3, 50, 100, 6], [12, 25, 3, 50, 6, 100], [12, 25, 3, 6, 100, 50], [12, 25, 3, 6, 50, 100], [12, 6, 100, 50, 25, 3], [12, 6, 100, 50, 3, 25], [12, 6, 100, 25, 50, 3], [12, 6, 100, 25, 3, 50], [12, 6, 100, 3, 50, 25], [12, 6, 100, 3, 25, 50], [12, 6, 50, 100, 25, 3], [12, 6, 50, 100, 3, 25], [12, 6, 50, 25, 100, 3], [12, 6, 50, 25, 3, 100], [12, 6, 50, 3, 100, 25], [12, 6, 50, 3, 25, 100], [12, 6, 25, 100, 50, 3], [12, 6, 25, 100, 3, 50], [12, 6, 25, 50, 100, 3], [12, 6, 25, 50, 3, 100], [12, 6, 25, 3, 100, 50], [12, 6, 25, 3, 50, 100], [12, 6, 3, 100, 50, 25], [12, 6, 3, 100, 25, 50], [12, 6, 3, 50, 100, 25], [12, 6, 3, 50, 25, 100], [12, 6, 3, 25, 100, 50], [12, 6, 3, 25, 50, 100], [12, 3, 100, 50, 25, 6], [12, 3, 100, 50, 6, 25], [12, 3, 100, 25, 50, 6], [12, 3, 100, 25, 6, 50], [12, 3, 100, 6, 50, 25], [12, 3, 100, 6, 25, 50], [12, 3, 50, 100, 25, 6], [12, 3, 50, 100, 6, 25], [12, 3, 50, 25, 100, 6], [12, 3, 50, 25, 6, 100], [12, 3, 50, 6, 100, 25], [12, 3, 50, 6, 25, 100], [12, 3, 25, 100, 50, 6], [12, 3, 25, 100, 6, 50], [12, 3, 25, 50, 100, 6], [12, 3, 25, 50, 6, 100], [12, 3, 25, 6, 100, 50], [12, 3, 25, 6, 50, 100], [12, 3, 6, 100, 50, 25], [12, 3, 6, 100, 25, 50], [12, 3, 6, 50, 100, 25], [12, 3, 6, 50, 25, 100], [12, 3, 6, 25, 100, 50], [12, 3, 6, 25, 50, 100], [6, 100, 50, 25, 12, 3], [6, 100, 50, 25, 3, 12], [6, 100, 50, 12, 25, 3], [6, 100, 50, 12, 3, 25], [6, 100, 50, 3, 25, 12], [6, 100, 50, 3, 12, 25], [6, 100, 25, 50, 12, 3], [6, 100, 25, 50, 3, 12], [6, 100, 25, 12, 50, 3], [6, 100, 25, 12, 3, 50], [6, 100, 25, 3, 50, 12], [6, 100, 25, 3, 12, 50], [6, 100, 12, 50, 25, 3], [6, 100, 12, 50, 3, 25], [6, 100, 12, 25, 50, 3], [6, 100, 12, 25, 3, 50], [6, 100, 12, 3, 50, 25], [6, 100, 12, 3, 25, 50], [6, 100, 3, 50, 25, 12], [6, 100, 3, 50, 12, 25], [6, 100, 3, 25, 50, 12], [6, 100, 3, 25, 12, 50], [6, 100, 3, 12, 50, 25], [6, 100, 3, 12, 25, 50], [6, 50, 100, 25, 12, 3], [6, 50, 100, 25, 3, 12], [6, 50, 100, 12, 25, 3], [6, 50, 100, 12, 3, 25], [6, 50, 100, 3, 25, 12], [6, 50, 100, 3, 12, 25], [6, 50, 25, 100, 12, 3], [6, 50, 25, 100, 3, 12], [6, 50, 25, 12, 100, 3], [6, 50, 25, 12, 3, 100], [6, 50, 25, 3, 100, 12], [6, 50, 25, 3, 12, 100], [6, 50, 12, 100, 25, 3], [6, 50, 12, 100, 3, 25], [6, 50, 12, 25, 100, 3], [6, 50, 12, 25, 3, 100], [6, 50, 12, 3, 100, 25], [6, 50, 12, 3, 25, 100], [6, 50, 3, 100, 25, 12], [6, 50, 3, 100, 12, 25], [6, 50, 3, 25, 100, 12], [6, 50, 3, 25, 12, 100], [6, 50, 3, 12, 100, 25], [6, 50, 3, 12, 25, 100], [6, 25, 100, 50, 12, 3], [6, 25, 100, 50, 3, 12], [6, 25, 100, 12, 50, 3], [6, 25, 100, 12, 3, 50], [6, 25, 100, 3, 50, 12], [6, 25, 100, 3, 12, 50], [6, 25, 50, 100, 12, 3], [6, 25, 50, 100, 3, 12], [6, 25, 50, 12, 100, 3], [6, 25, 50, 12, 3, 100], [6, 25, 50, 3, 100, 12], [6, 25, 50, 3, 12, 100], [6, 25, 12, 100, 50, 3], [6, 25, 12, 100, 3, 50], [6, 25, 12, 50, 100, 3], [6, 25, 12, 50, 3, 100], [6, 25, 12, 3, 100, 50], [6, 25, 12, 3, 50, 100], [6, 25, 3, 100, 50, 12], [6, 25, 3, 100, 12, 50], [6, 25, 3, 50, 100, 12], [6, 25, 3, 50, 12, 100], [6, 25, 3, 12, 100, 50], [6, 25, 3, 12, 50, 100], [6, 12, 100, 50, 25, 3], [6, 12, 100, 50, 3, 25], [6, 12, 100, 25, 50, 3], [6, 12, 100, 25, 3, 50], [6, 12, 100, 3, 50, 25], [6, 12, 100, 3, 25, 50], [6, 12, 50, 100, 25, 3], [6, 12, 50, 100, 3, 25], [6, 12, 50, 25, 100, 3], [6, 12, 50, 25, 3, 100], [6, 12, 50, 3, 100, 25], [6, 12, 50, 3, 25, 100], [6, 12, 25, 100, 50, 3], [6, 12, 25, 100, 3, 50], [6, 12, 25, 50, 100, 3], [6, 12, 25, 50, 3, 100], [6, 12, 25, 3, 100, 50], [6, 12, 25, 3, 50, 100], [6, 12, 3, 100, 50, 25], [6, 12, 3, 100, 25, 50], [6, 12, 3, 50, 100, 25], [6, 12, 3, 50, 25, 100], [6, 12, 3, 25, 100, 50], [6, 12, 3, 25, 50, 100], [6, 3, 100, 50, 25, 12], [6, 3, 100, 50, 12, 25], [6, 3, 100, 25, 50, 12], [6, 3, 100, 25, 12, 50], [6, 3, 100, 12, 50, 25], [6, 3, 100, 12, 25, 50], [6, 3, 50, 100, 25, 12], [6, 3, 50, 100, 12, 25], [6, 3, 50, 25, 100, 12], [6, 3, 50, 25, 12, 100], [6, 3, 50, 12, 100, 25], [6, 3, 50, 12, 25, 100], [6, 3, 25, 100, 50, 12], [6, 3, 25, 100, 12, 50], [6, 3, 25, 50, 100, 12], [6, 3, 25, 50, 12, 100], [6, 3, 25, 12, 100, 50], [6, 3, 25, 12, 50, 100], [6, 3, 12, 100, 50, 25], [6, 3, 12, 100, 25, 50], [6, 3, 12, 50, 100, 25], [6, 3, 12, 50, 25, 100], [6, 3, 12, 25, 100, 50], [6, 3, 12, 25, 50, 100], [3, 100, 50, 25, 12, 6], [3, 100, 50, 25, 6, 12], [3, 100, 50, 12, 25, 6], [3, 100, 50, 12, 6, 25], [3, 100, 50, 6, 25, 12], [3, 100, 50, 6, 12, 25], [3, 100, 25, 50, 12, 6], [3, 100, 25, 50, 6, 12], [3, 100, 25, 12, 50, 6], [3, 100, 25, 12, 6, 50], [3, 100, 25, 6, 50, 12], [3, 100, 25, 6, 12, 50], [3, 100, 12, 50, 25, 6], [3, 100, 12, 50, 6, 25], [3, 100, 12, 25, 50, 6], [3, 100, 12, 25, 6, 50], [3, 100, 12, 6, 50, 25], [3, 100, 12, 6, 25, 50], [3, 100, 6, 50, 25, 12], [3, 100, 6, 50, 12, 25], [3, 100, 6, 25, 50, 12], [3, 100, 6, 25, 12, 50], [3, 100, 6, 12, 50, 25], [3, 100, 6, 12, 25, 50], [3, 50, 100, 25, 12, 6], [3, 50, 100, 25, 6, 12], [3, 50, 100, 12, 25, 6], [3, 50, 100, 12, 6, 25], [3, 50, 100, 6, 25, 12], [3, 50, 100, 6, 12, 25], [3, 50, 25, 100, 12, 6], [3, 50, 25, 100, 6, 12], [3, 50, 25, 12, 100, 6], [3, 50, 25, 12, 6, 100], [3, 50, 25, 6, 100, 12], [3, 50, 25, 6, 12, 100], [3, 50, 12, 100, 25, 6], [3, 50, 12, 100, 6, 25], [3, 50, 12, 25, 100, 6], [3, 50, 12, 25, 6, 100], [3, 50, 12, 6, 100, 25], [3, 50, 12, 6, 25, 100], [3, 50, 6, 100, 25, 12], [3, 50, 6, 100, 12, 25], [3, 50, 6, 25, 100, 12], [3, 50, 6, 25, 12, 100], [3, 50, 6, 12, 100, 25], [3, 50, 6, 12, 25, 100], [3, 25, 100, 50, 12, 6], [3, 25, 100, 50, 6, 12], [3, 25, 100, 12, 50, 6], [3, 25, 100, 12, 6, 50], [3, 25, 100, 6, 50, 12], [3, 25, 100, 6, 12, 50], [3, 25, 50, 100, 12, 6], [3, 25, 50, 100, 6, 12], [3, 25, 50, 12, 100, 6], [3, 25, 50, 12, 6, 100], [3, 25, 50, 6, 100, 12], [3, 25, 50, 6, 12, 100], [3, 25, 12, 100, 50, 6], [3, 25, 12, 100, 6, 50], [3, 25, 12, 50, 100, 6], [3, 25, 12, 50, 6, 100], [3, 25, 12, 6, 100, 50], [3, 25, 12, 6, 50, 100], [3, 25, 6, 100, 50, 12], [3, 25, 6, 100, 12, 50], [3, 25, 6, 50, 100, 12], [3, 25, 6, 50, 12, 100], [3, 25, 6, 12, 100, 50], [3, 25, 6, 12, 50, 100], [3, 12, 100, 50, 25, 6], [3, 12, 100, 50, 6, 25], [3, 12, 100, 25, 50, 6], [3, 12, 100, 25, 6, 50], [3, 12, 100, 6, 50, 25], [3, 12, 100, 6, 25, 50], [3, 12, 50, 100, 25, 6], [3, 12, 50, 100, 6, 25], [3, 12, 50, 25, 100, 6], [3, 12, 50, 25, 6, 100], [3, 12, 50, 6, 100, 25], [3, 12, 50, 6, 25, 100], [3, 12, 25, 100, 50, 6], [3, 12, 25, 100, 6, 50], [3, 12, 25, 50, 100, 6], [3, 12, 25, 50, 6, 100], [3, 12, 25, 6, 100, 50], [3, 12, 25, 6, 50, 100], [3, 12, 6, 100, 50, 25], [3, 12, 6, 100, 25, 50], [3, 12, 6, 50, 100, 25], [3, 12, 6, 50, 25, 100], [3, 12, 6, 25, 100, 50], [3, 12, 6, 25, 50, 100], [3, 6, 100, 50, 25, 12], [3, 6, 100, 50, 12, 25], [3, 6, 100, 25, 50, 12], [3, 6, 100, 25, 12, 50], [3, 6, 100, 12, 50, 25], [3, 6, 100, 12, 25, 50], [3, 6, 50, 100, 25, 12], [3, 6, 50, 100, 12, 25], [3, 6, 50, 25, 100, 12], [3, 6, 50, 25, 12, 100], [3, 6, 50, 12, 100, 25], [3, 6, 50, 12, 25, 100], [3, 6, 25, 100, 50, 12], [3, 6, 25, 100, 12, 50], [3, 6, 25, 50, 100, 12], [3, 6, 25, 50, 12, 100], [3, 6, 25, 12, 100, 50], [3, 6, 25, 12, 50, 100], [3, 6, 12, 100, 50, 25], [3, 6, 12, 100, 25, 50], [3, 6, 12, 50, 100, 25], [3, 6, 12, 50, 25, 100], [3, 6, 12, 25, 100, 50], [3, 6, 12, 25, 50, 100]]\n assert 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 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 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 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 candidate(nums = [100, 200, 300, 400, 500, 600]) == [[100, 200, 300, 400, 500, 600], [100, 200, 300, 400, 600, 500], [100, 200, 300, 500, 400, 600], [100, 200, 300, 500, 600, 400], [100, 200, 300, 600, 400, 500], [100, 200, 300, 600, 500, 400], [100, 200, 400, 300, 500, 600], [100, 200, 400, 300, 600, 500], [100, 200, 400, 500, 300, 600], [100, 200, 400, 500, 600, 300], [100, 200, 400, 600, 300, 500], [100, 200, 400, 600, 500, 300], [100, 200, 500, 300, 400, 600], [100, 200, 500, 300, 600, 400], [100, 200, 500, 400, 300, 600], [100, 200, 500, 400, 600, 300], [100, 200, 500, 600, 300, 400], [100, 200, 500, 600, 400, 300], [100, 200, 600, 300, 400, 500], [100, 200, 600, 300, 500, 400], [100, 200, 600, 400, 300, 500], [100, 200, 600, 400, 500, 300], [100, 200, 600, 500, 300, 400], [100, 200, 600, 500, 400, 300], [100, 300, 200, 400, 500, 600], [100, 300, 200, 400, 600, 500], [100, 300, 200, 500, 400, 600], [100, 300, 200, 500, 600, 400], [100, 300, 200, 600, 400, 500], [100, 300, 200, 600, 500, 400], [100, 300, 400, 200, 500, 600], [100, 300, 400, 200, 600, 500], [100, 300, 400, 500, 200, 600], [100, 300, 400, 500, 600, 200], [100, 300, 400, 600, 200, 500], [100, 300, 400, 600, 500, 200], [100, 300, 500, 200, 400, 600], [100, 300, 500, 200, 600, 400], [100, 300, 500, 400, 200, 600], [100, 300, 500, 400, 600, 200], [100, 300, 500, 600, 200, 400], [100, 300, 500, 600, 400, 200], [100, 300, 600, 200, 400, 500], [100, 300, 600, 200, 500, 400], [100, 300, 600, 400, 200, 500], [100, 300, 600, 400, 500, 200], [100, 300, 600, 500, 200, 400], [100, 300, 600, 500, 400, 200], [100, 400, 200, 300, 500, 600], [100, 400, 200, 300, 600, 500], [100, 400, 200, 500, 300, 600], [100, 400, 200, 500, 600, 300], [100, 400, 200, 600, 300, 500], [100, 400, 200, 600, 500, 300], [100, 400, 300, 200, 500, 600], [100, 400, 300, 200, 600, 500], [100, 400, 300, 500, 200, 600], [100, 400, 300, 500, 600, 200], [100, 400, 300, 600, 200, 500], [100, 400, 300, 600, 500, 200], [100, 400, 500, 200, 300, 600], [100, 400, 500, 200, 600, 300], [100, 400, 500, 300, 200, 600], [100, 400, 500, 300, 600, 200], [100, 400, 500, 600, 200, 300], [100, 400, 500, 600, 300, 200], [100, 400, 600, 200, 300, 500], [100, 400, 600, 200, 500, 300], [100, 400, 600, 300, 200, 500], [100, 400, 600, 300, 500, 200], [100, 400, 600, 500, 200, 300], [100, 400, 600, 500, 300, 200], [100, 500, 200, 300, 400, 600], [100, 500, 200, 300, 600, 400], [100, 500, 200, 400, 300, 600], [100, 500, 200, 400, 600, 300], [100, 500, 200, 600, 300, 400], [100, 500, 200, 600, 400, 300], [100, 500, 300, 200, 400, 600], [100, 500, 300, 200, 600, 400], [100, 500, 300, 400, 200, 600], [100, 500, 300, 400, 600, 200], [100, 500, 300, 600, 200, 400], [100, 500, 300, 600, 400, 200], [100, 500, 400, 200, 300, 600], [100, 500, 400, 200, 600, 300], [100, 500, 400, 300, 200, 600], [100, 500, 400, 300, 600, 200], [100, 500, 400, 600, 200, 300], [100, 500, 400, 600, 300, 200], [100, 500, 600, 200, 300, 400], [100, 500, 600, 200, 400, 300], [100, 500, 600, 300, 200, 400], [100, 500, 600, 300, 400, 200], [100, 500, 600, 400, 200, 300], [100, 500, 600, 400, 300, 200], [100, 600, 200, 300, 400, 500], [100, 600, 200, 300, 500, 400], [100, 600, 200, 400, 300, 500], [100, 600, 200, 400, 500, 300], [100, 600, 200, 500, 300, 400], [100, 600, 200, 500, 400, 300], [100, 600, 300, 200, 400, 500], [100, 600, 300, 200, 500, 400], [100, 600, 300, 400, 200, 500], [100, 600, 300, 400, 500, 200], [100, 600, 300, 500, 200, 400], [100, 600, 300, 500, 400, 200], [100, 600, 400, 200, 300, 500], [100, 600, 400, 200, 500, 300], [100, 600, 400, 300, 200, 500], [100, 600, 400, 300, 500, 200], [100, 600, 400, 500, 200, 300], [100, 600, 400, 500, 300, 200], [100, 600, 500, 200, 300, 400], [100, 600, 500, 200, 400, 300], [100, 600, 500, 300, 200, 400], [100, 600, 500, 300, 400, 200], [100, 600, 500, 400, 200, 300], [100, 600, 500, 400, 300, 200], [200, 100, 300, 400, 500, 600], [200, 100, 300, 400, 600, 500], [200, 100, 300, 500, 400, 600], [200, 100, 300, 500, 600, 400], [200, 100, 300, 600, 400, 500], [200, 100, 300, 600, 500, 400], [200, 100, 400, 300, 500, 600], [200, 100, 400, 300, 600, 500], [200, 100, 400, 500, 300, 600], [200, 100, 400, 500, 600, 300], [200, 100, 400, 600, 300, 500], [200, 100, 400, 600, 500, 300], [200, 100, 500, 300, 400, 600], [200, 100, 500, 300, 600, 400], [200, 100, 500, 400, 300, 600], [200, 100, 500, 400, 600, 300], [200, 100, 500, 600, 300, 400], [200, 100, 500, 600, 400, 300], [200, 100, 600, 300, 400, 500], [200, 100, 600, 300, 500, 400], [200, 100, 600, 400, 300, 500], [200, 100, 600, 400, 500, 300], [200, 100, 600, 500, 300, 400], [200, 100, 600, 500, 400, 300], [200, 300, 100, 400, 500, 600], [200, 300, 100, 400, 600, 500], [200, 300, 100, 500, 400, 600], [200, 300, 100, 500, 600, 400], [200, 300, 100, 600, 400, 500], [200, 300, 100, 600, 500, 400], [200, 300, 400, 100, 500, 600], [200, 300, 400, 100, 600, 500], [200, 300, 400, 500, 100, 600], [200, 300, 400, 500, 600, 100], [200, 300, 400, 600, 100, 500], [200, 300, 400, 600, 500, 100], [200, 300, 500, 100, 400, 600], [200, 300, 500, 100, 600, 400], [200, 300, 500, 400, 100, 600], [200, 300, 500, 400, 600, 100], [200, 300, 500, 600, 100, 400], [200, 300, 500, 600, 400, 100], [200, 300, 600, 100, 400, 500], [200, 300, 600, 100, 500, 400], [200, 300, 600, 400, 100, 500], [200, 300, 600, 400, 500, 100], [200, 300, 600, 500, 100, 400], [200, 300, 600, 500, 400, 100], [200, 400, 100, 300, 500, 600], [200, 400, 100, 300, 600, 500], [200, 400, 100, 500, 300, 600], [200, 400, 100, 500, 600, 300], [200, 400, 100, 600, 300, 500], [200, 400, 100, 600, 500, 300], [200, 400, 300, 100, 500, 600], [200, 400, 300, 100, 600, 500], [200, 400, 300, 500, 100, 600], [200, 400, 300, 500, 600, 100], [200, 400, 300, 600, 100, 500], [200, 400, 300, 600, 500, 100], [200, 400, 500, 100, 300, 600], [200, 400, 500, 100, 600, 300], [200, 400, 500, 300, 100, 600], [200, 400, 500, 300, 600, 100], [200, 400, 500, 600, 100, 300], [200, 400, 500, 600, 300, 100], [200, 400, 600, 100, 300, 500], [200, 400, 600, 100, 500, 300], [200, 400, 600, 300, 100, 500], [200, 400, 600, 300, 500, 100], [200, 400, 600, 500, 100, 300], [200, 400, 600, 500, 300, 100], [200, 500, 100, 300, 400, 600], [200, 500, 100, 300, 600, 400], [200, 500, 100, 400, 300, 600], [200, 500, 100, 400, 600, 300], [200, 500, 100, 600, 300, 400], [200, 500, 100, 600, 400, 300], [200, 500, 300, 100, 400, 600], [200, 500, 300, 100, 600, 400], [200, 500, 300, 400, 100, 600], [200, 500, 300, 400, 600, 100], [200, 500, 300, 600, 100, 400], [200, 500, 300, 600, 400, 100], [200, 500, 400, 100, 300, 600], [200, 500, 400, 100, 600, 300], [200, 500, 400, 300, 100, 600], [200, 500, 400, 300, 600, 100], [200, 500, 400, 600, 100, 300], [200, 500, 400, 600, 300, 100], [200, 500, 600, 100, 300, 400], [200, 500, 600, 100, 400, 300], [200, 500, 600, 300, 100, 400], [200, 500, 600, 300, 400, 100], [200, 500, 600, 400, 100, 300], [200, 500, 600, 400, 300, 100], [200, 600, 100, 300, 400, 500], [200, 600, 100, 300, 500, 400], [200, 600, 100, 400, 300, 500], [200, 600, 100, 400, 500, 300], [200, 600, 100, 500, 300, 400], [200, 600, 100, 500, 400, 300], [200, 600, 300, 100, 400, 500], [200, 600, 300, 100, 500, 400], [200, 600, 300, 400, 100, 500], [200, 600, 300, 400, 500, 100], [200, 600, 300, 500, 100, 400], [200, 600, 300, 500, 400, 100], [200, 600, 400, 100, 300, 500], [200, 600, 400, 100, 500, 300], [200, 600, 400, 300, 100, 500], [200, 600, 400, 300, 500, 100], [200, 600, 400, 500, 100, 300], [200, 600, 400, 500, 300, 100], [200, 600, 500, 100, 300, 400], [200, 600, 500, 100, 400, 300], [200, 600, 500, 300, 100, 400], [200, 600, 500, 300, 400, 100], [200, 600, 500, 400, 100, 300], [200, 600, 500, 400, 300, 100], [300, 100, 200, 400, 500, 600], [300, 100, 200, 400, 600, 500], [300, 100, 200, 500, 400, 600], [300, 100, 200, 500, 600, 400], [300, 100, 200, 600, 400, 500], [300, 100, 200, 600, 500, 400], [300, 100, 400, 200, 500, 600], [300, 100, 400, 200, 600, 500], [300, 100, 400, 500, 200, 600], [300, 100, 400, 500, 600, 200], [300, 100, 400, 600, 200, 500], [300, 100, 400, 600, 500, 200], [300, 100, 500, 200, 400, 600], [300, 100, 500, 200, 600, 400], [300, 100, 500, 400, 200, 600], [300, 100, 500, 400, 600, 200], [300, 100, 500, 600, 200, 400], [300, 100, 500, 600, 400, 200], [300, 100, 600, 200, 400, 500], [300, 100, 600, 200, 500, 400], [300, 100, 600, 400, 200, 500], [300, 100, 600, 400, 500, 200], [300, 100, 600, 500, 200, 400], [300, 100, 600, 500, 400, 200], [300, 200, 100, 400, 500, 600], [300, 200, 100, 400, 600, 500], [300, 200, 100, 500, 400, 600], [300, 200, 100, 500, 600, 400], [300, 200, 100, 600, 400, 500], [300, 200, 100, 600, 500, 400], [300, 200, 400, 100, 500, 600], [300, 200, 400, 100, 600, 500], [300, 200, 400, 500, 100, 600], [300, 200, 400, 500, 600, 100], [300, 200, 400, 600, 100, 500], [300, 200, 400, 600, 500, 100], [300, 200, 500, 100, 400, 600], [300, 200, 500, 100, 600, 400], [300, 200, 500, 400, 100, 600], [300, 200, 500, 400, 600, 100], [300, 200, 500, 600, 100, 400], [300, 200, 500, 600, 400, 100], [300, 200, 600, 100, 400, 500], [300, 200, 600, 100, 500, 400], [300, 200, 600, 400, 100, 500], [300, 200, 600, 400, 500, 100], [300, 200, 600, 500, 100, 400], [300, 200, 600, 500, 400, 100], [300, 400, 100, 200, 500, 600], [300, 400, 100, 200, 600, 500], [300, 400, 100, 500, 200, 600], [300, 400, 100, 500, 600, 200], [300, 400, 100, 600, 200, 500], [300, 400, 100, 600, 500, 200], [300, 400, 200, 100, 500, 600], [300, 400, 200, 100, 600, 500], [300, 400, 200, 500, 100, 600], [300, 400, 200, 500, 600, 100], [300, 400, 200, 600, 100, 500], [300, 400, 200, 600, 500, 100], [300, 400, 500, 100, 200, 600], [300, 400, 500, 100, 600, 200], [300, 400, 500, 200, 100, 600], [300, 400, 500, 200, 600, 100], [300, 400, 500, 600, 100, 200], [300, 400, 500, 600, 200, 100], [300, 400, 600, 100, 200, 500], [300, 400, 600, 100, 500, 200], [300, 400, 600, 200, 100, 500], [300, 400, 600, 200, 500, 100], [300, 400, 600, 500, 100, 200], [300, 400, 600, 500, 200, 100], [300, 500, 100, 200, 400, 600], [300, 500, 100, 200, 600, 400], [300, 500, 100, 400, 200, 600], [300, 500, 100, 400, 600, 200], [300, 500, 100, 600, 200, 400], [300, 500, 100, 600, 400, 200], [300, 500, 200, 100, 400, 600], [300, 500, 200, 100, 600, 400], [300, 500, 200, 400, 100, 600], [300, 500, 200, 400, 600, 100], [300, 500, 200, 600, 100, 400], [300, 500, 200, 600, 400, 100], [300, 500, 400, 100, 200, 600], [300, 500, 400, 100, 600, 200], [300, 500, 400, 200, 100, 600], [300, 500, 400, 200, 600, 100], [300, 500, 400, 600, 100, 200], [300, 500, 400, 600, 200, 100], [300, 500, 600, 100, 200, 400], [300, 500, 600, 100, 400, 200], [300, 500, 600, 200, 100, 400], [300, 500, 600, 200, 400, 100], [300, 500, 600, 400, 100, 200], [300, 500, 600, 400, 200, 100], [300, 600, 100, 200, 400, 500], [300, 600, 100, 200, 500, 400], [300, 600, 100, 400, 200, 500], [300, 600, 100, 400, 500, 200], [300, 600, 100, 500, 200, 400], [300, 600, 100, 500, 400, 200], [300, 600, 200, 100, 400, 500], [300, 600, 200, 100, 500, 400], [300, 600, 200, 400, 100, 500], [300, 600, 200, 400, 500, 100], [300, 600, 200, 500, 100, 400], [300, 600, 200, 500, 400, 100], [300, 600, 400, 100, 200, 500], [300, 600, 400, 100, 500, 200], [300, 600, 400, 200, 100, 500], [300, 600, 400, 200, 500, 100], [300, 600, 400, 500, 100, 200], [300, 600, 400, 500, 200, 100], [300, 600, 500, 100, 200, 400], [300, 600, 500, 100, 400, 200], [300, 600, 500, 200, 100, 400], [300, 600, 500, 200, 400, 100], [300, 600, 500, 400, 100, 200], [300, 600, 500, 400, 200, 100], [400, 100, 200, 300, 500, 600], [400, 100, 200, 300, 600, 500], [400, 100, 200, 500, 300, 600], [400, 100, 200, 500, 600, 300], [400, 100, 200, 600, 300, 500], [400, 100, 200, 600, 500, 300], [400, 100, 300, 200, 500, 600], [400, 100, 300, 200, 600, 500], [400, 100, 300, 500, 200, 600], [400, 100, 300, 500, 600, 200], [400, 100, 300, 600, 200, 500], [400, 100, 300, 600, 500, 200], [400, 100, 500, 200, 300, 600], [400, 100, 500, 200, 600, 300], [400, 100, 500, 300, 200, 600], [400, 100, 500, 300, 600, 200], [400, 100, 500, 600, 200, 300], [400, 100, 500, 600, 300, 200], [400, 100, 600, 200, 300, 500], [400, 100, 600, 200, 500, 300], [400, 100, 600, 300, 200, 500], [400, 100, 600, 300, 500, 200], [400, 100, 600, 500, 200, 300], [400, 100, 600, 500, 300, 200], [400, 200, 100, 300, 500, 600], [400, 200, 100, 300, 600, 500], [400, 200, 100, 500, 300, 600], [400, 200, 100, 500, 600, 300], [400, 200, 100, 600, 300, 500], [400, 200, 100, 600, 500, 300], [400, 200, 300, 100, 500, 600], [400, 200, 300, 100, 600, 500], [400, 200, 300, 500, 100, 600], [400, 200, 300, 500, 600, 100], [400, 200, 300, 600, 100, 500], [400, 200, 300, 600, 500, 100], [400, 200, 500, 100, 300, 600], [400, 200, 500, 100, 600, 300], [400, 200, 500, 300, 100, 600], [400, 200, 500, 300, 600, 100], [400, 200, 500, 600, 100, 300], [400, 200, 500, 600, 300, 100], [400, 200, 600, 100, 300, 500], [400, 200, 600, 100, 500, 300], [400, 200, 600, 300, 100, 500], [400, 200, 600, 300, 500, 100], [400, 200, 600, 500, 100, 300], [400, 200, 600, 500, 300, 100], [400, 300, 100, 200, 500, 600], [400, 300, 100, 200, 600, 500], [400, 300, 100, 500, 200, 600], [400, 300, 100, 500, 600, 200], [400, 300, 100, 600, 200, 500], [400, 300, 100, 600, 500, 200], [400, 300, 200, 100, 500, 600], [400, 300, 200, 100, 600, 500], [400, 300, 200, 500, 100, 600], [400, 300, 200, 500, 600, 100], [400, 300, 200, 600, 100, 500], [400, 300, 200, 600, 500, 100], [400, 300, 500, 100, 200, 600], [400, 300, 500, 100, 600, 200], [400, 300, 500, 200, 100, 600], [400, 300, 500, 200, 600, 100], [400, 300, 500, 600, 100, 200], [400, 300, 500, 600, 200, 100], [400, 300, 600, 100, 200, 500], [400, 300, 600, 100, 500, 200], [400, 300, 600, 200, 100, 500], [400, 300, 600, 200, 500, 100], [400, 300, 600, 500, 100, 200], [400, 300, 600, 500, 200, 100], [400, 500, 100, 200, 300, 600], [400, 500, 100, 200, 600, 300], [400, 500, 100, 300, 200, 600], [400, 500, 100, 300, 600, 200], [400, 500, 100, 600, 200, 300], [400, 500, 100, 600, 300, 200], [400, 500, 200, 100, 300, 600], [400, 500, 200, 100, 600, 300], [400, 500, 200, 300, 100, 600], [400, 500, 200, 300, 600, 100], [400, 500, 200, 600, 100, 300], [400, 500, 200, 600, 300, 100], [400, 500, 300, 100, 200, 600], [400, 500, 300, 100, 600, 200], [400, 500, 300, 200, 100, 600], [400, 500, 300, 200, 600, 100], [400, 500, 300, 600, 100, 200], [400, 500, 300, 600, 200, 100], [400, 500, 600, 100, 200, 300], [400, 500, 600, 100, 300, 200], [400, 500, 600, 200, 100, 300], [400, 500, 600, 200, 300, 100], [400, 500, 600, 300, 100, 200], [400, 500, 600, 300, 200, 100], [400, 600, 100, 200, 300, 500], [400, 600, 100, 200, 500, 300], [400, 600, 100, 300, 200, 500], [400, 600, 100, 300, 500, 200], [400, 600, 100, 500, 200, 300], [400, 600, 100, 500, 300, 200], [400, 600, 200, 100, 300, 500], [400, 600, 200, 100, 500, 300], [400, 600, 200, 300, 100, 500], [400, 600, 200, 300, 500, 100], [400, 600, 200, 500, 100, 300], [400, 600, 200, 500, 300, 100], [400, 600, 300, 100, 200, 500], [400, 600, 300, 100, 500, 200], [400, 600, 300, 200, 100, 500], [400, 600, 300, 200, 500, 100], [400, 600, 300, 500, 100, 200], [400, 600, 300, 500, 200, 100], [400, 600, 500, 100, 200, 300], [400, 600, 500, 100, 300, 200], [400, 600, 500, 200, 100, 300], [400, 600, 500, 200, 300, 100], [400, 600, 500, 300, 100, 200], [400, 600, 500, 300, 200, 100], [500, 100, 200, 300, 400, 600], [500, 100, 200, 300, 600, 400], [500, 100, 200, 400, 300, 600], [500, 100, 200, 400, 600, 300], [500, 100, 200, 600, 300, 400], [500, 100, 200, 600, 400, 300], [500, 100, 300, 200, 400, 600], [500, 100, 300, 200, 600, 400], [500, 100, 300, 400, 200, 600], [500, 100, 300, 400, 600, 200], [500, 100, 300, 600, 200, 400], [500, 100, 300, 600, 400, 200], [500, 100, 400, 200, 300, 600], [500, 100, 400, 200, 600, 300], [500, 100, 400, 300, 200, 600], [500, 100, 400, 300, 600, 200], [500, 100, 400, 600, 200, 300], [500, 100, 400, 600, 300, 200], [500, 100, 600, 200, 300, 400], [500, 100, 600, 200, 400, 300], [500, 100, 600, 300, 200, 400], [500, 100, 600, 300, 400, 200], [500, 100, 600, 400, 200, 300], [500, 100, 600, 400, 300, 200], [500, 200, 100, 300, 400, 600], [500, 200, 100, 300, 600, 400], [500, 200, 100, 400, 300, 600], [500, 200, 100, 400, 600, 300], [500, 200, 100, 600, 300, 400], [500, 200, 100, 600, 400, 300], [500, 200, 300, 100, 400, 600], [500, 200, 300, 100, 600, 400], [500, 200, 300, 400, 100, 600], [500, 200, 300, 400, 600, 100], [500, 200, 300, 600, 100, 400], [500, 200, 300, 600, 400, 100], [500, 200, 400, 100, 300, 600], [500, 200, 400, 100, 600, 300], [500, 200, 400, 300, 100, 600], [500, 200, 400, 300, 600, 100], [500, 200, 400, 600, 100, 300], [500, 200, 400, 600, 300, 100], [500, 200, 600, 100, 300, 400], [500, 200, 600, 100, 400, 300], [500, 200, 600, 300, 100, 400], [500, 200, 600, 300, 400, 100], [500, 200, 600, 400, 100, 300], [500, 200, 600, 400, 300, 100], [500, 300, 100, 200, 400, 600], [500, 300, 100, 200, 600, 400], [500, 300, 100, 400, 200, 600], [500, 300, 100, 400, 600, 200], [500, 300, 100, 600, 200, 400], [500, 300, 100, 600, 400, 200], [500, 300, 200, 100, 400, 600], [500, 300, 200, 100, 600, 400], [500, 300, 200, 400, 100, 600], [500, 300, 200, 400, 600, 100], [500, 300, 200, 600, 100, 400], [500, 300, 200, 600, 400, 100], [500, 300, 400, 100, 200, 600], [500, 300, 400, 100, 600, 200], [500, 300, 400, 200, 100, 600], [500, 300, 400, 200, 600, 100], [500, 300, 400, 600, 100, 200], [500, 300, 400, 600, 200, 100], [500, 300, 600, 100, 200, 400], [500, 300, 600, 100, 400, 200], [500, 300, 600, 200, 100, 400], [500, 300, 600, 200, 400, 100], [500, 300, 600, 400, 100, 200], [500, 300, 600, 400, 200, 100], [500, 400, 100, 200, 300, 600], [500, 400, 100, 200, 600, 300], [500, 400, 100, 300, 200, 600], [500, 400, 100, 300, 600, 200], [500, 400, 100, 600, 200, 300], [500, 400, 100, 600, 300, 200], [500, 400, 200, 100, 300, 600], [500, 400, 200, 100, 600, 300], [500, 400, 200, 300, 100, 600], [500, 400, 200, 300, 600, 100], [500, 400, 200, 600, 100, 300], [500, 400, 200, 600, 300, 100], [500, 400, 300, 100, 200, 600], [500, 400, 300, 100, 600, 200], [500, 400, 300, 200, 100, 600], [500, 400, 300, 200, 600, 100], [500, 400, 300, 600, 100, 200], [500, 400, 300, 600, 200, 100], [500, 400, 600, 100, 200, 300], [500, 400, 600, 100, 300, 200], [500, 400, 600, 200, 100, 300], [500, 400, 600, 200, 300, 100], [500, 400, 600, 300, 100, 200], [500, 400, 600, 300, 200, 100], [500, 600, 100, 200, 300, 400], [500, 600, 100, 200, 400, 300], [500, 600, 100, 300, 200, 400], [500, 600, 100, 300, 400, 200], [500, 600, 100, 400, 200, 300], [500, 600, 100, 400, 300, 200], [500, 600, 200, 100, 300, 400], [500, 600, 200, 100, 400, 300], [500, 600, 200, 300, 100, 400], [500, 600, 200, 300, 400, 100], [500, 600, 200, 400, 100, 300], [500, 600, 200, 400, 300, 100], [500, 600, 300, 100, 200, 400], [500, 600, 300, 100, 400, 200], [500, 600, 300, 200, 100, 400], [500, 600, 300, 200, 400, 100], [500, 600, 300, 400, 100, 200], [500, 600, 300, 400, 200, 100], [500, 600, 400, 100, 200, 300], [500, 600, 400, 100, 300, 200], [500, 600, 400, 200, 100, 300], [500, 600, 400, 200, 300, 100], [500, 600, 400, 300, 100, 200], [500, 600, 400, 300, 200, 100], [600, 100, 200, 300, 400, 500], [600, 100, 200, 300, 500, 400], [600, 100, 200, 400, 300, 500], [600, 100, 200, 400, 500, 300], [600, 100, 200, 500, 300, 400], [600, 100, 200, 500, 400, 300], [600, 100, 300, 200, 400, 500], [600, 100, 300, 200, 500, 400], [600, 100, 300, 400, 200, 500], [600, 100, 300, 400, 500, 200], [600, 100, 300, 500, 200, 400], [600, 100, 300, 500, 400, 200], [600, 100, 400, 200, 300, 500], [600, 100, 400, 200, 500, 300], [600, 100, 400, 300, 200, 500], [600, 100, 400, 300, 500, 200], [600, 100, 400, 500, 200, 300], [600, 100, 400, 500, 300, 200], [600, 100, 500, 200, 300, 400], [600, 100, 500, 200, 400, 300], [600, 100, 500, 300, 200, 400], [600, 100, 500, 300, 400, 200], [600, 100, 500, 400, 200, 300], [600, 100, 500, 400, 300, 200], [600, 200, 100, 300, 400, 500], [600, 200, 100, 300, 500, 400], [600, 200, 100, 400, 300, 500], [600, 200, 100, 400, 500, 300], [600, 200, 100, 500, 300, 400], [600, 200, 100, 500, 400, 300], [600, 200, 300, 100, 400, 500], [600, 200, 300, 100, 500, 400], [600, 200, 300, 400, 100, 500], [600, 200, 300, 400, 500, 100], [600, 200, 300, 500, 100, 400], [600, 200, 300, 500, 400, 100], [600, 200, 400, 100, 300, 500], [600, 200, 400, 100, 500, 300], [600, 200, 400, 300, 100, 500], [600, 200, 400, 300, 500, 100], [600, 200, 400, 500, 100, 300], [600, 200, 400, 500, 300, 100], [600, 200, 500, 100, 300, 400], [600, 200, 500, 100, 400, 300], [600, 200, 500, 300, 100, 400], [600, 200, 500, 300, 400, 100], [600, 200, 500, 400, 100, 300], [600, 200, 500, 400, 300, 100], [600, 300, 100, 200, 400, 500], [600, 300, 100, 200, 500, 400], [600, 300, 100, 400, 200, 500], [600, 300, 100, 400, 500, 200], [600, 300, 100, 500, 200, 400], [600, 300, 100, 500, 400, 200], [600, 300, 200, 100, 400, 500], [600, 300, 200, 100, 500, 400], [600, 300, 200, 400, 100, 500], [600, 300, 200, 400, 500, 100], [600, 300, 200, 500, 100, 400], [600, 300, 200, 500, 400, 100], [600, 300, 400, 100, 200, 500], [600, 300, 400, 100, 500, 200], [600, 300, 400, 200, 100, 500], [600, 300, 400, 200, 500, 100], [600, 300, 400, 500, 100, 200], [600, 300, 400, 500, 200, 100], [600, 300, 500, 100, 200, 400], [600, 300, 500, 100, 400, 200], [600, 300, 500, 200, 100, 400], [600, 300, 500, 200, 400, 100], [600, 300, 500, 400, 100, 200], [600, 300, 500, 400, 200, 100], [600, 400, 100, 200, 300, 500], [600, 400, 100, 200, 500, 300], [600, 400, 100, 300, 200, 500], [600, 400, 100, 300, 500, 200], [600, 400, 100, 500, 200, 300], [600, 400, 100, 500, 300, 200], [600, 400, 200, 100, 300, 500], [600, 400, 200, 100, 500, 300], [600, 400, 200, 300, 100, 500], [600, 400, 200, 300, 500, 100], [600, 400, 200, 500, 100, 300], [600, 400, 200, 500, 300, 100], [600, 400, 300, 100, 200, 500], [600, 400, 300, 100, 500, 200], [600, 400, 300, 200, 100, 500], [600, 400, 300, 200, 500, 100], [600, 400, 300, 500, 100, 200], [600, 400, 300, 500, 200, 100], [600, 400, 500, 100, 200, 300], [600, 400, 500, 100, 300, 200], [600, 400, 500, 200, 100, 300], [600, 400, 500, 200, 300, 100], [600, 400, 500, 300, 100, 200], [600, 400, 500, 300, 200, 100], [600, 500, 100, 200, 300, 400], [600, 500, 100, 200, 400, 300], [600, 500, 100, 300, 200, 400], [600, 500, 100, 300, 400, 200], [600, 500, 100, 400, 200, 300], [600, 500, 100, 400, 300, 200], [600, 500, 200, 100, 300, 400], [600, 500, 200, 100, 400, 300], [600, 500, 200, 300, 100, 400], [600, 500, 200, 300, 400, 100], [600, 500, 200, 400, 100, 300], [600, 500, 200, 400, 300, 100], [600, 500, 300, 100, 200, 400], [600, 500, 300, 100, 400, 200], [600, 500, 300, 200, 100, 400], [600, 500, 300, 200, 400, 100], [600, 500, 300, 400, 100, 200], [600, 500, 300, 400, 200, 100], [600, 500, 400, 100, 200, 300], [600, 500, 400, 100, 300, 200], [600, 500, 400, 200, 100, 300], [600, 500, 400, 200, 300, 100], [600, 500, 400, 300, 100, 200], [600, 500, 400, 300, 200, 100]]\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000]) == [[1, 10, 100, 1000, 10000, 100000], [1, 10, 100, 1000, 100000, 10000], [1, 10, 100, 10000, 1000, 100000], [1, 10, 100, 10000, 100000, 1000], [1, 10, 100, 100000, 1000, 10000], [1, 10, 100, 100000, 10000, 1000], [1, 10, 1000, 100, 10000, 100000], [1, 10, 1000, 100, 100000, 10000], [1, 10, 1000, 10000, 100, 100000], [1, 10, 1000, 10000, 100000, 100], [1, 10, 1000, 100000, 100, 10000], [1, 10, 1000, 100000, 10000, 100], [1, 10, 10000, 100, 1000, 100000], [1, 10, 10000, 100, 100000, 1000], [1, 10, 10000, 1000, 100, 100000], [1, 10, 10000, 1000, 100000, 100], [1, 10, 10000, 100000, 100, 1000], [1, 10, 10000, 100000, 1000, 100], [1, 10, 100000, 100, 1000, 10000], [1, 10, 100000, 100, 10000, 1000], [1, 10, 100000, 1000, 100, 10000], [1, 10, 100000, 1000, 10000, 100], [1, 10, 100000, 10000, 100, 1000], [1, 10, 100000, 10000, 1000, 100], [1, 100, 10, 1000, 10000, 100000], [1, 100, 10, 1000, 100000, 10000], [1, 100, 10, 10000, 1000, 100000], [1, 100, 10, 10000, 100000, 1000], [1, 100, 10, 100000, 1000, 10000], [1, 100, 10, 100000, 10000, 1000], [1, 100, 1000, 10, 10000, 100000], [1, 100, 1000, 10, 100000, 10000], [1, 100, 1000, 10000, 10, 100000], [1, 100, 1000, 10000, 100000, 10], [1, 100, 1000, 100000, 10, 10000], [1, 100, 1000, 100000, 10000, 10], [1, 100, 10000, 10, 1000, 100000], [1, 100, 10000, 10, 100000, 1000], [1, 100, 10000, 1000, 10, 100000], [1, 100, 10000, 1000, 100000, 10], [1, 100, 10000, 100000, 10, 1000], [1, 100, 10000, 100000, 1000, 10], [1, 100, 100000, 10, 1000, 10000], [1, 100, 100000, 10, 10000, 1000], [1, 100, 100000, 1000, 10, 10000], [1, 100, 100000, 1000, 10000, 10], [1, 100, 100000, 10000, 10, 1000], [1, 100, 100000, 10000, 1000, 10], [1, 1000, 10, 100, 10000, 100000], [1, 1000, 10, 100, 100000, 10000], [1, 1000, 10, 10000, 100, 100000], [1, 1000, 10, 10000, 100000, 100], [1, 1000, 10, 100000, 100, 10000], [1, 1000, 10, 100000, 10000, 100], [1, 1000, 100, 10, 10000, 100000], [1, 1000, 100, 10, 100000, 10000], [1, 1000, 100, 10000, 10, 100000], [1, 1000, 100, 10000, 100000, 10], [1, 1000, 100, 100000, 10, 10000], [1, 1000, 100, 100000, 10000, 10], [1, 1000, 10000, 10, 100, 100000], [1, 1000, 10000, 10, 100000, 100], [1, 1000, 10000, 100, 10, 100000], [1, 1000, 10000, 100, 100000, 10], [1, 1000, 10000, 100000, 10, 100], [1, 1000, 10000, 100000, 100, 10], [1, 1000, 100000, 10, 100, 10000], [1, 1000, 100000, 10, 10000, 100], [1, 1000, 100000, 100, 10, 10000], [1, 1000, 100000, 100, 10000, 10], [1, 1000, 100000, 10000, 10, 100], [1, 1000, 100000, 10000, 100, 10], [1, 10000, 10, 100, 1000, 100000], [1, 10000, 10, 100, 100000, 1000], [1, 10000, 10, 1000, 100, 100000], [1, 10000, 10, 1000, 100000, 100], [1, 10000, 10, 100000, 100, 1000], [1, 10000, 10, 100000, 1000, 100], [1, 10000, 100, 10, 1000, 100000], [1, 10000, 100, 10, 100000, 1000], [1, 10000, 100, 1000, 10, 100000], [1, 10000, 100, 1000, 100000, 10], [1, 10000, 100, 100000, 10, 1000], [1, 10000, 100, 100000, 1000, 10], [1, 10000, 1000, 10, 100, 100000], [1, 10000, 1000, 10, 100000, 100], [1, 10000, 1000, 100, 10, 100000], [1, 10000, 1000, 100, 100000, 10], [1, 10000, 1000, 100000, 10, 100], [1, 10000, 1000, 100000, 100, 10], [1, 10000, 100000, 10, 100, 1000], [1, 10000, 100000, 10, 1000, 100], [1, 10000, 100000, 100, 10, 1000], [1, 10000, 100000, 100, 1000, 10], [1, 10000, 100000, 1000, 10, 100], [1, 10000, 100000, 1000, 100, 10], [1, 100000, 10, 100, 1000, 10000], [1, 100000, 10, 100, 10000, 1000], [1, 100000, 10, 1000, 100, 10000], [1, 100000, 10, 1000, 10000, 100], [1, 100000, 10, 10000, 100, 1000], [1, 100000, 10, 10000, 1000, 100], [1, 100000, 100, 10, 1000, 10000], [1, 100000, 100, 10, 10000, 1000], [1, 100000, 100, 1000, 10, 10000], [1, 100000, 100, 1000, 10000, 10], [1, 100000, 100, 10000, 10, 1000], [1, 100000, 100, 10000, 1000, 10], [1, 100000, 1000, 10, 100, 10000], [1, 100000, 1000, 10, 10000, 100], [1, 100000, 1000, 100, 10, 10000], [1, 100000, 1000, 100, 10000, 10], [1, 100000, 1000, 10000, 10, 100], [1, 100000, 1000, 10000, 100, 10], [1, 100000, 10000, 10, 100, 1000], [1, 100000, 10000, 10, 1000, 100], [1, 100000, 10000, 100, 10, 1000], [1, 100000, 10000, 100, 1000, 10], [1, 100000, 10000, 1000, 10, 100], [1, 100000, 10000, 1000, 100, 10], [10, 1, 100, 1000, 10000, 100000], [10, 1, 100, 1000, 100000, 10000], [10, 1, 100, 10000, 1000, 100000], [10, 1, 100, 10000, 100000, 1000], [10, 1, 100, 100000, 1000, 10000], [10, 1, 100, 100000, 10000, 1000], [10, 1, 1000, 100, 10000, 100000], [10, 1, 1000, 100, 100000, 10000], [10, 1, 1000, 10000, 100, 100000], [10, 1, 1000, 10000, 100000, 100], [10, 1, 1000, 100000, 100, 10000], [10, 1, 1000, 100000, 10000, 100], [10, 1, 10000, 100, 1000, 100000], [10, 1, 10000, 100, 100000, 1000], [10, 1, 10000, 1000, 100, 100000], [10, 1, 10000, 1000, 100000, 100], [10, 1, 10000, 100000, 100, 1000], [10, 1, 10000, 100000, 1000, 100], [10, 1, 100000, 100, 1000, 10000], [10, 1, 100000, 100, 10000, 1000], [10, 1, 100000, 1000, 100, 10000], [10, 1, 100000, 1000, 10000, 100], [10, 1, 100000, 10000, 100, 1000], [10, 1, 100000, 10000, 1000, 100], [10, 100, 1, 1000, 10000, 100000], [10, 100, 1, 1000, 100000, 10000], [10, 100, 1, 10000, 1000, 100000], [10, 100, 1, 10000, 100000, 1000], [10, 100, 1, 100000, 1000, 10000], [10, 100, 1, 100000, 10000, 1000], [10, 100, 1000, 1, 10000, 100000], [10, 100, 1000, 1, 100000, 10000], [10, 100, 1000, 10000, 1, 100000], [10, 100, 1000, 10000, 100000, 1], [10, 100, 1000, 100000, 1, 10000], [10, 100, 1000, 100000, 10000, 1], [10, 100, 10000, 1, 1000, 100000], [10, 100, 10000, 1, 100000, 1000], [10, 100, 10000, 1000, 1, 100000], [10, 100, 10000, 1000, 100000, 1], [10, 100, 10000, 100000, 1, 1000], [10, 100, 10000, 100000, 1000, 1], [10, 100, 100000, 1, 1000, 10000], [10, 100, 100000, 1, 10000, 1000], [10, 100, 100000, 1000, 1, 10000], [10, 100, 100000, 1000, 10000, 1], [10, 100, 100000, 10000, 1, 1000], [10, 100, 100000, 10000, 1000, 1], [10, 1000, 1, 100, 10000, 100000], [10, 1000, 1, 100, 100000, 10000], [10, 1000, 1, 10000, 100, 100000], [10, 1000, 1, 10000, 100000, 100], [10, 1000, 1, 100000, 100, 10000], [10, 1000, 1, 100000, 10000, 100], [10, 1000, 100, 1, 10000, 100000], [10, 1000, 100, 1, 100000, 10000], [10, 1000, 100, 10000, 1, 100000], [10, 1000, 100, 10000, 100000, 1], [10, 1000, 100, 100000, 1, 10000], [10, 1000, 100, 100000, 10000, 1], [10, 1000, 10000, 1, 100, 100000], [10, 1000, 10000, 1, 100000, 100], [10, 1000, 10000, 100, 1, 100000], [10, 1000, 10000, 100, 100000, 1], [10, 1000, 10000, 100000, 1, 100], [10, 1000, 10000, 100000, 100, 1], [10, 1000, 100000, 1, 100, 10000], [10, 1000, 100000, 1, 10000, 100], [10, 1000, 100000, 100, 1, 10000], [10, 1000, 100000, 100, 10000, 1], [10, 1000, 100000, 10000, 1, 100], [10, 1000, 100000, 10000, 100, 1], [10, 10000, 1, 100, 1000, 100000], [10, 10000, 1, 100, 100000, 1000], [10, 10000, 1, 1000, 100, 100000], [10, 10000, 1, 1000, 100000, 100], [10, 10000, 1, 100000, 100, 1000], [10, 10000, 1, 100000, 1000, 100], [10, 10000, 100, 1, 1000, 100000], [10, 10000, 100, 1, 100000, 1000], [10, 10000, 100, 1000, 1, 100000], [10, 10000, 100, 1000, 100000, 1], [10, 10000, 100, 100000, 1, 1000], [10, 10000, 100, 100000, 1000, 1], [10, 10000, 1000, 1, 100, 100000], [10, 10000, 1000, 1, 100000, 100], [10, 10000, 1000, 100, 1, 100000], [10, 10000, 1000, 100, 100000, 1], [10, 10000, 1000, 100000, 1, 100], [10, 10000, 1000, 100000, 100, 1], [10, 10000, 100000, 1, 100, 1000], [10, 10000, 100000, 1, 1000, 100], [10, 10000, 100000, 100, 1, 1000], [10, 10000, 100000, 100, 1000, 1], [10, 10000, 100000, 1000, 1, 100], [10, 10000, 100000, 1000, 100, 1], [10, 100000, 1, 100, 1000, 10000], [10, 100000, 1, 100, 10000, 1000], [10, 100000, 1, 1000, 100, 10000], [10, 100000, 1, 1000, 10000, 100], [10, 100000, 1, 10000, 100, 1000], [10, 100000, 1, 10000, 1000, 100], [10, 100000, 100, 1, 1000, 10000], [10, 100000, 100, 1, 10000, 1000], [10, 100000, 100, 1000, 1, 10000], [10, 100000, 100, 1000, 10000, 1], [10, 100000, 100, 10000, 1, 1000], [10, 100000, 100, 10000, 1000, 1], [10, 100000, 1000, 1, 100, 10000], [10, 100000, 1000, 1, 10000, 100], [10, 100000, 1000, 100, 1, 10000], [10, 100000, 1000, 100, 10000, 1], [10, 100000, 1000, 10000, 1, 100], [10, 100000, 1000, 10000, 100, 1], [10, 100000, 10000, 1, 100, 1000], [10, 100000, 10000, 1, 1000, 100], [10, 100000, 10000, 100, 1, 1000], [10, 100000, 10000, 100, 1000, 1], [10, 100000, 10000, 1000, 1, 100], [10, 100000, 10000, 1000, 100, 1], [100, 1, 10, 1000, 10000, 100000], [100, 1, 10, 1000, 100000, 10000], [100, 1, 10, 10000, 1000, 100000], [100, 1, 10, 10000, 100000, 1000], [100, 1, 10, 100000, 1000, 10000], [100, 1, 10, 100000, 10000, 1000], [100, 1, 1000, 10, 10000, 100000], [100, 1, 1000, 10, 100000, 10000], [100, 1, 1000, 10000, 10, 100000], [100, 1, 1000, 10000, 100000, 10], [100, 1, 1000, 100000, 10, 10000], [100, 1, 1000, 100000, 10000, 10], [100, 1, 10000, 10, 1000, 100000], [100, 1, 10000, 10, 100000, 1000], [100, 1, 10000, 1000, 10, 100000], [100, 1, 10000, 1000, 100000, 10], [100, 1, 10000, 100000, 10, 1000], [100, 1, 10000, 100000, 1000, 10], [100, 1, 100000, 10, 1000, 10000], [100, 1, 100000, 10, 10000, 1000], [100, 1, 100000, 1000, 10, 10000], [100, 1, 100000, 1000, 10000, 10], [100, 1, 100000, 10000, 10, 1000], [100, 1, 100000, 10000, 1000, 10], [100, 10, 1, 1000, 10000, 100000], [100, 10, 1, 1000, 100000, 10000], [100, 10, 1, 10000, 1000, 100000], [100, 10, 1, 10000, 100000, 1000], [100, 10, 1, 100000, 1000, 10000], [100, 10, 1, 100000, 10000, 1000], [100, 10, 1000, 1, 10000, 100000], [100, 10, 1000, 1, 100000, 10000], [100, 10, 1000, 10000, 1, 100000], [100, 10, 1000, 10000, 100000, 1], [100, 10, 1000, 100000, 1, 10000], [100, 10, 1000, 100000, 10000, 1], [100, 10, 10000, 1, 1000, 100000], [100, 10, 10000, 1, 100000, 1000], [100, 10, 10000, 1000, 1, 100000], [100, 10, 10000, 1000, 100000, 1], [100, 10, 10000, 100000, 1, 1000], [100, 10, 10000, 100000, 1000, 1], [100, 10, 100000, 1, 1000, 10000], [100, 10, 100000, 1, 10000, 1000], [100, 10, 100000, 1000, 1, 10000], [100, 10, 100000, 1000, 10000, 1], [100, 10, 100000, 10000, 1, 1000], [100, 10, 100000, 10000, 1000, 1], [100, 1000, 1, 10, 10000, 100000], [100, 1000, 1, 10, 100000, 10000], [100, 1000, 1, 10000, 10, 100000], [100, 1000, 1, 10000, 100000, 10], [100, 1000, 1, 100000, 10, 10000], [100, 1000, 1, 100000, 10000, 10], [100, 1000, 10, 1, 10000, 100000], [100, 1000, 10, 1, 100000, 10000], [100, 1000, 10, 10000, 1, 100000], [100, 1000, 10, 10000, 100000, 1], [100, 1000, 10, 100000, 1, 10000], [100, 1000, 10, 100000, 10000, 1], [100, 1000, 10000, 1, 10, 100000], [100, 1000, 10000, 1, 100000, 10], [100, 1000, 10000, 10, 1, 100000], [100, 1000, 10000, 10, 100000, 1], [100, 1000, 10000, 100000, 1, 10], [100, 1000, 10000, 100000, 10, 1], [100, 1000, 100000, 1, 10, 10000], [100, 1000, 100000, 1, 10000, 10], [100, 1000, 100000, 10, 1, 10000], [100, 1000, 100000, 10, 10000, 1], [100, 1000, 100000, 10000, 1, 10], [100, 1000, 100000, 10000, 10, 1], [100, 10000, 1, 10, 1000, 100000], [100, 10000, 1, 10, 100000, 1000], [100, 10000, 1, 1000, 10, 100000], [100, 10000, 1, 1000, 100000, 10], [100, 10000, 1, 100000, 10, 1000], [100, 10000, 1, 100000, 1000, 10], [100, 10000, 10, 1, 1000, 100000], [100, 10000, 10, 1, 100000, 1000], [100, 10000, 10, 1000, 1, 100000], [100, 10000, 10, 1000, 100000, 1], [100, 10000, 10, 100000, 1, 1000], [100, 10000, 10, 100000, 1000, 1], [100, 10000, 1000, 1, 10, 100000], [100, 10000, 1000, 1, 100000, 10], [100, 10000, 1000, 10, 1, 100000], [100, 10000, 1000, 10, 100000, 1], [100, 10000, 1000, 100000, 1, 10], [100, 10000, 1000, 100000, 10, 1], [100, 10000, 100000, 1, 10, 1000], [100, 10000, 100000, 1, 1000, 10], [100, 10000, 100000, 10, 1, 1000], [100, 10000, 100000, 10, 1000, 1], [100, 10000, 100000, 1000, 1, 10], [100, 10000, 100000, 1000, 10, 1], [100, 100000, 1, 10, 1000, 10000], [100, 100000, 1, 10, 10000, 1000], [100, 100000, 1, 1000, 10, 10000], [100, 100000, 1, 1000, 10000, 10], [100, 100000, 1, 10000, 10, 1000], [100, 100000, 1, 10000, 1000, 10], [100, 100000, 10, 1, 1000, 10000], [100, 100000, 10, 1, 10000, 1000], [100, 100000, 10, 1000, 1, 10000], [100, 100000, 10, 1000, 10000, 1], [100, 100000, 10, 10000, 1, 1000], [100, 100000, 10, 10000, 1000, 1], [100, 100000, 1000, 1, 10, 10000], [100, 100000, 1000, 1, 10000, 10], [100, 100000, 1000, 10, 1, 10000], [100, 100000, 1000, 10, 10000, 1], [100, 100000, 1000, 10000, 1, 10], [100, 100000, 1000, 10000, 10, 1], [100, 100000, 10000, 1, 10, 1000], [100, 100000, 10000, 1, 1000, 10], [100, 100000, 10000, 10, 1, 1000], [100, 100000, 10000, 10, 1000, 1], [100, 100000, 10000, 1000, 1, 10], [100, 100000, 10000, 1000, 10, 1], [1000, 1, 10, 100, 10000, 100000], [1000, 1, 10, 100, 100000, 10000], [1000, 1, 10, 10000, 100, 100000], [1000, 1, 10, 10000, 100000, 100], [1000, 1, 10, 100000, 100, 10000], [1000, 1, 10, 100000, 10000, 100], [1000, 1, 100, 10, 10000, 100000], [1000, 1, 100, 10, 100000, 10000], [1000, 1, 100, 10000, 10, 100000], [1000, 1, 100, 10000, 100000, 10], [1000, 1, 100, 100000, 10, 10000], [1000, 1, 100, 100000, 10000, 10], [1000, 1, 10000, 10, 100, 100000], [1000, 1, 10000, 10, 100000, 100], [1000, 1, 10000, 100, 10, 100000], [1000, 1, 10000, 100, 100000, 10], [1000, 1, 10000, 100000, 10, 100], [1000, 1, 10000, 100000, 100, 10], [1000, 1, 100000, 10, 100, 10000], [1000, 1, 100000, 10, 10000, 100], [1000, 1, 100000, 100, 10, 10000], [1000, 1, 100000, 100, 10000, 10], [1000, 1, 100000, 10000, 10, 100], [1000, 1, 100000, 10000, 100, 10], [1000, 10, 1, 100, 10000, 100000], [1000, 10, 1, 100, 100000, 10000], [1000, 10, 1, 10000, 100, 100000], [1000, 10, 1, 10000, 100000, 100], [1000, 10, 1, 100000, 100, 10000], [1000, 10, 1, 100000, 10000, 100], [1000, 10, 100, 1, 10000, 100000], [1000, 10, 100, 1, 100000, 10000], [1000, 10, 100, 10000, 1, 100000], [1000, 10, 100, 10000, 100000, 1], [1000, 10, 100, 100000, 1, 10000], [1000, 10, 100, 100000, 10000, 1], [1000, 10, 10000, 1, 100, 100000], [1000, 10, 10000, 1, 100000, 100], [1000, 10, 10000, 100, 1, 100000], [1000, 10, 10000, 100, 100000, 1], [1000, 10, 10000, 100000, 1, 100], [1000, 10, 10000, 100000, 100, 1], [1000, 10, 100000, 1, 100, 10000], [1000, 10, 100000, 1, 10000, 100], [1000, 10, 100000, 100, 1, 10000], [1000, 10, 100000, 100, 10000, 1], [1000, 10, 100000, 10000, 1, 100], [1000, 10, 100000, 10000, 100, 1], [1000, 100, 1, 10, 10000, 100000], [1000, 100, 1, 10, 100000, 10000], [1000, 100, 1, 10000, 10, 100000], [1000, 100, 1, 10000, 100000, 10], [1000, 100, 1, 100000, 10, 10000], [1000, 100, 1, 100000, 10000, 10], [1000, 100, 10, 1, 10000, 100000], [1000, 100, 10, 1, 100000, 10000], [1000, 100, 10, 10000, 1, 100000], [1000, 100, 10, 10000, 100000, 1], [1000, 100, 10, 100000, 1, 10000], [1000, 100, 10, 100000, 10000, 1], [1000, 100, 10000, 1, 10, 100000], [1000, 100, 10000, 1, 100000, 10], [1000, 100, 10000, 10, 1, 100000], [1000, 100, 10000, 10, 100000, 1], [1000, 100, 10000, 100000, 1, 10], [1000, 100, 10000, 100000, 10, 1], [1000, 100, 100000, 1, 10, 10000], [1000, 100, 100000, 1, 10000, 10], [1000, 100, 100000, 10, 1, 10000], [1000, 100, 100000, 10, 10000, 1], [1000, 100, 100000, 10000, 1, 10], [1000, 100, 100000, 10000, 10, 1], [1000, 10000, 1, 10, 100, 100000], [1000, 10000, 1, 10, 100000, 100], [1000, 10000, 1, 100, 10, 100000], [1000, 10000, 1, 100, 100000, 10], [1000, 10000, 1, 100000, 10, 100], [1000, 10000, 1, 100000, 100, 10], [1000, 10000, 10, 1, 100, 100000], [1000, 10000, 10, 1, 100000, 100], [1000, 10000, 10, 100, 1, 100000], [1000, 10000, 10, 100, 100000, 1], [1000, 10000, 10, 100000, 1, 100], [1000, 10000, 10, 100000, 100, 1], [1000, 10000, 100, 1, 10, 100000], [1000, 10000, 100, 1, 100000, 10], [1000, 10000, 100, 10, 1, 100000], [1000, 10000, 100, 10, 100000, 1], [1000, 10000, 100, 100000, 1, 10], [1000, 10000, 100, 100000, 10, 1], [1000, 10000, 100000, 1, 10, 100], [1000, 10000, 100000, 1, 100, 10], [1000, 10000, 100000, 10, 1, 100], [1000, 10000, 100000, 10, 100, 1], [1000, 10000, 100000, 100, 1, 10], [1000, 10000, 100000, 100, 10, 1], [1000, 100000, 1, 10, 100, 10000], [1000, 100000, 1, 10, 10000, 100], [1000, 100000, 1, 100, 10, 10000], [1000, 100000, 1, 100, 10000, 10], [1000, 100000, 1, 10000, 10, 100], [1000, 100000, 1, 10000, 100, 10], [1000, 100000, 10, 1, 100, 10000], [1000, 100000, 10, 1, 10000, 100], [1000, 100000, 10, 100, 1, 10000], [1000, 100000, 10, 100, 10000, 1], [1000, 100000, 10, 10000, 1, 100], [1000, 100000, 10, 10000, 100, 1], [1000, 100000, 100, 1, 10, 10000], [1000, 100000, 100, 1, 10000, 10], [1000, 100000, 100, 10, 1, 10000], [1000, 100000, 100, 10, 10000, 1], [1000, 100000, 100, 10000, 1, 10], [1000, 100000, 100, 10000, 10, 1], [1000, 100000, 10000, 1, 10, 100], [1000, 100000, 10000, 1, 100, 10], [1000, 100000, 10000, 10, 1, 100], [1000, 100000, 10000, 10, 100, 1], [1000, 100000, 10000, 100, 1, 10], [1000, 100000, 10000, 100, 10, 1], [10000, 1, 10, 100, 1000, 100000], [10000, 1, 10, 100, 100000, 1000], [10000, 1, 10, 1000, 100, 100000], [10000, 1, 10, 1000, 100000, 100], [10000, 1, 10, 100000, 100, 1000], [10000, 1, 10, 100000, 1000, 100], [10000, 1, 100, 10, 1000, 100000], [10000, 1, 100, 10, 100000, 1000], [10000, 1, 100, 1000, 10, 100000], [10000, 1, 100, 1000, 100000, 10], [10000, 1, 100, 100000, 10, 1000], [10000, 1, 100, 100000, 1000, 10], [10000, 1, 1000, 10, 100, 100000], [10000, 1, 1000, 10, 100000, 100], [10000, 1, 1000, 100, 10, 100000], [10000, 1, 1000, 100, 100000, 10], [10000, 1, 1000, 100000, 10, 100], [10000, 1, 1000, 100000, 100, 10], [10000, 1, 100000, 10, 100, 1000], [10000, 1, 100000, 10, 1000, 100], [10000, 1, 100000, 100, 10, 1000], [10000, 1, 100000, 100, 1000, 10], [10000, 1, 100000, 1000, 10, 100], [10000, 1, 100000, 1000, 100, 10], [10000, 10, 1, 100, 1000, 100000], [10000, 10, 1, 100, 100000, 1000], [10000, 10, 1, 1000, 100, 100000], [10000, 10, 1, 1000, 100000, 100], [10000, 10, 1, 100000, 100, 1000], [10000, 10, 1, 100000, 1000, 100], [10000, 10, 100, 1, 1000, 100000], [10000, 10, 100, 1, 100000, 1000], [10000, 10, 100, 1000, 1, 100000], [10000, 10, 100, 1000, 100000, 1], [10000, 10, 100, 100000, 1, 1000], [10000, 10, 100, 100000, 1000, 1], [10000, 10, 1000, 1, 100, 100000], [10000, 10, 1000, 1, 100000, 100], [10000, 10, 1000, 100, 1, 100000], [10000, 10, 1000, 100, 100000, 1], [10000, 10, 1000, 100000, 1, 100], [10000, 10, 1000, 100000, 100, 1], [10000, 10, 100000, 1, 100, 1000], [10000, 10, 100000, 1, 1000, 100], [10000, 10, 100000, 100, 1, 1000], [10000, 10, 100000, 100, 1000, 1], [10000, 10, 100000, 1000, 1, 100], [10000, 10, 100000, 1000, 100, 1], [10000, 100, 1, 10, 1000, 100000], [10000, 100, 1, 10, 100000, 1000], [10000, 100, 1, 1000, 10, 100000], [10000, 100, 1, 1000, 100000, 10], [10000, 100, 1, 100000, 10, 1000], [10000, 100, 1, 100000, 1000, 10], [10000, 100, 10, 1, 1000, 100000], [10000, 100, 10, 1, 100000, 1000], [10000, 100, 10, 1000, 1, 100000], [10000, 100, 10, 1000, 100000, 1], [10000, 100, 10, 100000, 1, 1000], [10000, 100, 10, 100000, 1000, 1], [10000, 100, 1000, 1, 10, 100000], [10000, 100, 1000, 1, 100000, 10], [10000, 100, 1000, 10, 1, 100000], [10000, 100, 1000, 10, 100000, 1], [10000, 100, 1000, 100000, 1, 10], [10000, 100, 1000, 100000, 10, 1], [10000, 100, 100000, 1, 10, 1000], [10000, 100, 100000, 1, 1000, 10], [10000, 100, 100000, 10, 1, 1000], [10000, 100, 100000, 10, 1000, 1], [10000, 100, 100000, 1000, 1, 10], [10000, 100, 100000, 1000, 10, 1], [10000, 1000, 1, 10, 100, 100000], [10000, 1000, 1, 10, 100000, 100], [10000, 1000, 1, 100, 10, 100000], [10000, 1000, 1, 100, 100000, 10], [10000, 1000, 1, 100000, 10, 100], [10000, 1000, 1, 100000, 100, 10], [10000, 1000, 10, 1, 100, 100000], [10000, 1000, 10, 1, 100000, 100], [10000, 1000, 10, 100, 1, 100000], [10000, 1000, 10, 100, 100000, 1], [10000, 1000, 10, 100000, 1, 100], [10000, 1000, 10, 100000, 100, 1], [10000, 1000, 100, 1, 10, 100000], [10000, 1000, 100, 1, 100000, 10], [10000, 1000, 100, 10, 1, 100000], [10000, 1000, 100, 10, 100000, 1], [10000, 1000, 100, 100000, 1, 10], [10000, 1000, 100, 100000, 10, 1], [10000, 1000, 100000, 1, 10, 100], [10000, 1000, 100000, 1, 100, 10], [10000, 1000, 100000, 10, 1, 100], [10000, 1000, 100000, 10, 100, 1], [10000, 1000, 100000, 100, 1, 10], [10000, 1000, 100000, 100, 10, 1], [10000, 100000, 1, 10, 100, 1000], [10000, 100000, 1, 10, 1000, 100], [10000, 100000, 1, 100, 10, 1000], [10000, 100000, 1, 100, 1000, 10], [10000, 100000, 1, 1000, 10, 100], [10000, 100000, 1, 1000, 100, 10], [10000, 100000, 10, 1, 100, 1000], [10000, 100000, 10, 1, 1000, 100], [10000, 100000, 10, 100, 1, 1000], [10000, 100000, 10, 100, 1000, 1], [10000, 100000, 10, 1000, 1, 100], [10000, 100000, 10, 1000, 100, 1], [10000, 100000, 100, 1, 10, 1000], [10000, 100000, 100, 1, 1000, 10], [10000, 100000, 100, 10, 1, 1000], [10000, 100000, 100, 10, 1000, 1], [10000, 100000, 100, 1000, 1, 10], [10000, 100000, 100, 1000, 10, 1], [10000, 100000, 1000, 1, 10, 100], [10000, 100000, 1000, 1, 100, 10], [10000, 100000, 1000, 10, 1, 100], [10000, 100000, 1000, 10, 100, 1], [10000, 100000, 1000, 100, 1, 10], [10000, 100000, 1000, 100, 10, 1], [100000, 1, 10, 100, 1000, 10000], [100000, 1, 10, 100, 10000, 1000], [100000, 1, 10, 1000, 100, 10000], [100000, 1, 10, 1000, 10000, 100], [100000, 1, 10, 10000, 100, 1000], [100000, 1, 10, 10000, 1000, 100], [100000, 1, 100, 10, 1000, 10000], [100000, 1, 100, 10, 10000, 1000], [100000, 1, 100, 1000, 10, 10000], [100000, 1, 100, 1000, 10000, 10], [100000, 1, 100, 10000, 10, 1000], [100000, 1, 100, 10000, 1000, 10], [100000, 1, 1000, 10, 100, 10000], [100000, 1, 1000, 10, 10000, 100], [100000, 1, 1000, 100, 10, 10000], [100000, 1, 1000, 100, 10000, 10], [100000, 1, 1000, 10000, 10, 100], [100000, 1, 1000, 10000, 100, 10], [100000, 1, 10000, 10, 100, 1000], [100000, 1, 10000, 10, 1000, 100], [100000, 1, 10000, 100, 10, 1000], [100000, 1, 10000, 100, 1000, 10], [100000, 1, 10000, 1000, 10, 100], [100000, 1, 10000, 1000, 100, 10], [100000, 10, 1, 100, 1000, 10000], [100000, 10, 1, 100, 10000, 1000], [100000, 10, 1, 1000, 100, 10000], [100000, 10, 1, 1000, 10000, 100], [100000, 10, 1, 10000, 100, 1000], [100000, 10, 1, 10000, 1000, 100], [100000, 10, 100, 1, 1000, 10000], [100000, 10, 100, 1, 10000, 1000], [100000, 10, 100, 1000, 1, 10000], [100000, 10, 100, 1000, 10000, 1], [100000, 10, 100, 10000, 1, 1000], [100000, 10, 100, 10000, 1000, 1], [100000, 10, 1000, 1, 100, 10000], [100000, 10, 1000, 1, 10000, 100], [100000, 10, 1000, 100, 1, 10000], [100000, 10, 1000, 100, 10000, 1], [100000, 10, 1000, 10000, 1, 100], [100000, 10, 1000, 10000, 100, 1], [100000, 10, 10000, 1, 100, 1000], [100000, 10, 10000, 1, 1000, 100], [100000, 10, 10000, 100, 1, 1000], [100000, 10, 10000, 100, 1000, 1], [100000, 10, 10000, 1000, 1, 100], [100000, 10, 10000, 1000, 100, 1], [100000, 100, 1, 10, 1000, 10000], [100000, 100, 1, 10, 10000, 1000], [100000, 100, 1, 1000, 10, 10000], [100000, 100, 1, 1000, 10000, 10], [100000, 100, 1, 10000, 10, 1000], [100000, 100, 1, 10000, 1000, 10], [100000, 100, 10, 1, 1000, 10000], [100000, 100, 10, 1, 10000, 1000], [100000, 100, 10, 1000, 1, 10000], [100000, 100, 10, 1000, 10000, 1], [100000, 100, 10, 10000, 1, 1000], [100000, 100, 10, 10000, 1000, 1], [100000, 100, 1000, 1, 10, 10000], [100000, 100, 1000, 1, 10000, 10], [100000, 100, 1000, 10, 1, 10000], [100000, 100, 1000, 10, 10000, 1], [100000, 100, 1000, 10000, 1, 10], [100000, 100, 1000, 10000, 10, 1], [100000, 100, 10000, 1, 10, 1000], [100000, 100, 10000, 1, 1000, 10], [100000, 100, 10000, 10, 1, 1000], [100000, 100, 10000, 10, 1000, 1], [100000, 100, 10000, 1000, 1, 10], [100000, 100, 10000, 1000, 10, 1], [100000, 1000, 1, 10, 100, 10000], [100000, 1000, 1, 10, 10000, 100], [100000, 1000, 1, 100, 10, 10000], [100000, 1000, 1, 100, 10000, 10], [100000, 1000, 1, 10000, 10, 100], [100000, 1000, 1, 10000, 100, 10], [100000, 1000, 10, 1, 100, 10000], [100000, 1000, 10, 1, 10000, 100], [100000, 1000, 10, 100, 1, 10000], [100000, 1000, 10, 100, 10000, 1], [100000, 1000, 10, 10000, 1, 100], [100000, 1000, 10, 10000, 100, 1], [100000, 1000, 100, 1, 10, 10000], [100000, 1000, 100, 1, 10000, 10], [100000, 1000, 100, 10, 1, 10000], [100000, 1000, 100, 10, 10000, 1], [100000, 1000, 100, 10000, 1, 10], [100000, 1000, 100, 10000, 10, 1], [100000, 1000, 10000, 1, 10, 100], [100000, 1000, 10000, 1, 100, 10], [100000, 1000, 10000, 10, 1, 100], [100000, 1000, 10000, 10, 100, 1], [100000, 1000, 10000, 100, 1, 10], [100000, 1000, 10000, 100, 10, 1], [100000, 10000, 1, 10, 100, 1000], [100000, 10000, 1, 10, 1000, 100], [100000, 10000, 1, 100, 10, 1000], [100000, 10000, 1, 100, 1000, 10], [100000, 10000, 1, 1000, 10, 100], [100000, 10000, 1, 1000, 100, 10], [100000, 10000, 10, 1, 100, 1000], [100000, 10000, 10, 1, 1000, 100], [100000, 10000, 10, 100, 1, 1000], [100000, 10000, 10, 100, 1000, 1], [100000, 10000, 10, 1000, 1, 100], [100000, 10000, 10, 1000, 100, 1], [100000, 10000, 100, 1, 10, 1000], [100000, 10000, 100, 1, 1000, 10], [100000, 10000, 100, 10, 1, 1000], [100000, 10000, 100, 10, 1000, 1], [100000, 10000, 100, 1000, 1, 10], [100000, 10000, 100, 1000, 10, 1], [100000, 10000, 1000, 1, 10, 100], [100000, 10000, 1000, 1, 100, 10], [100000, 10000, 1000, 10, 1, 100], [100000, 10000, 1000, 10, 100, 1], [100000, 10000, 1000, 100, 1, 10], [100000, 10000, 1000, 100, 10, 1]]\n assert candidate(nums = [2, 4, 6, 8, 10, 12]) == [[2, 4, 6, 8, 10, 12], [2, 4, 6, 8, 12, 10], [2, 4, 6, 10, 8, 12], [2, 4, 6, 10, 12, 8], [2, 4, 6, 12, 8, 10], [2, 4, 6, 12, 10, 8], [2, 4, 8, 6, 10, 12], [2, 4, 8, 6, 12, 10], [2, 4, 8, 10, 6, 12], [2, 4, 8, 10, 12, 6], [2, 4, 8, 12, 6, 10], [2, 4, 8, 12, 10, 6], [2, 4, 10, 6, 8, 12], [2, 4, 10, 6, 12, 8], [2, 4, 10, 8, 6, 12], [2, 4, 10, 8, 12, 6], [2, 4, 10, 12, 6, 8], [2, 4, 10, 12, 8, 6], [2, 4, 12, 6, 8, 10], [2, 4, 12, 6, 10, 8], [2, 4, 12, 8, 6, 10], [2, 4, 12, 8, 10, 6], [2, 4, 12, 10, 6, 8], [2, 4, 12, 10, 8, 6], [2, 6, 4, 8, 10, 12], [2, 6, 4, 8, 12, 10], [2, 6, 4, 10, 8, 12], [2, 6, 4, 10, 12, 8], [2, 6, 4, 12, 8, 10], [2, 6, 4, 12, 10, 8], [2, 6, 8, 4, 10, 12], [2, 6, 8, 4, 12, 10], [2, 6, 8, 10, 4, 12], [2, 6, 8, 10, 12, 4], [2, 6, 8, 12, 4, 10], [2, 6, 8, 12, 10, 4], [2, 6, 10, 4, 8, 12], [2, 6, 10, 4, 12, 8], [2, 6, 10, 8, 4, 12], [2, 6, 10, 8, 12, 4], [2, 6, 10, 12, 4, 8], [2, 6, 10, 12, 8, 4], [2, 6, 12, 4, 8, 10], [2, 6, 12, 4, 10, 8], [2, 6, 12, 8, 4, 10], [2, 6, 12, 8, 10, 4], [2, 6, 12, 10, 4, 8], [2, 6, 12, 10, 8, 4], [2, 8, 4, 6, 10, 12], [2, 8, 4, 6, 12, 10], [2, 8, 4, 10, 6, 12], [2, 8, 4, 10, 12, 6], [2, 8, 4, 12, 6, 10], [2, 8, 4, 12, 10, 6], [2, 8, 6, 4, 10, 12], [2, 8, 6, 4, 12, 10], [2, 8, 6, 10, 4, 12], [2, 8, 6, 10, 12, 4], [2, 8, 6, 12, 4, 10], [2, 8, 6, 12, 10, 4], [2, 8, 10, 4, 6, 12], [2, 8, 10, 4, 12, 6], [2, 8, 10, 6, 4, 12], [2, 8, 10, 6, 12, 4], [2, 8, 10, 12, 4, 6], [2, 8, 10, 12, 6, 4], [2, 8, 12, 4, 6, 10], [2, 8, 12, 4, 10, 6], [2, 8, 12, 6, 4, 10], [2, 8, 12, 6, 10, 4], [2, 8, 12, 10, 4, 6], [2, 8, 12, 10, 6, 4], [2, 10, 4, 6, 8, 12], [2, 10, 4, 6, 12, 8], [2, 10, 4, 8, 6, 12], [2, 10, 4, 8, 12, 6], [2, 10, 4, 12, 6, 8], [2, 10, 4, 12, 8, 6], [2, 10, 6, 4, 8, 12], [2, 10, 6, 4, 12, 8], [2, 10, 6, 8, 4, 12], [2, 10, 6, 8, 12, 4], [2, 10, 6, 12, 4, 8], [2, 10, 6, 12, 8, 4], [2, 10, 8, 4, 6, 12], [2, 10, 8, 4, 12, 6], [2, 10, 8, 6, 4, 12], [2, 10, 8, 6, 12, 4], [2, 10, 8, 12, 4, 6], [2, 10, 8, 12, 6, 4], [2, 10, 12, 4, 6, 8], [2, 10, 12, 4, 8, 6], [2, 10, 12, 6, 4, 8], [2, 10, 12, 6, 8, 4], [2, 10, 12, 8, 4, 6], [2, 10, 12, 8, 6, 4], [2, 12, 4, 6, 8, 10], [2, 12, 4, 6, 10, 8], [2, 12, 4, 8, 6, 10], [2, 12, 4, 8, 10, 6], [2, 12, 4, 10, 6, 8], [2, 12, 4, 10, 8, 6], [2, 12, 6, 4, 8, 10], [2, 12, 6, 4, 10, 8], [2, 12, 6, 8, 4, 10], [2, 12, 6, 8, 10, 4], [2, 12, 6, 10, 4, 8], [2, 12, 6, 10, 8, 4], [2, 12, 8, 4, 6, 10], [2, 12, 8, 4, 10, 6], [2, 12, 8, 6, 4, 10], [2, 12, 8, 6, 10, 4], [2, 12, 8, 10, 4, 6], [2, 12, 8, 10, 6, 4], [2, 12, 10, 4, 6, 8], [2, 12, 10, 4, 8, 6], [2, 12, 10, 6, 4, 8], [2, 12, 10, 6, 8, 4], [2, 12, 10, 8, 4, 6], [2, 12, 10, 8, 6, 4], [4, 2, 6, 8, 10, 12], [4, 2, 6, 8, 12, 10], [4, 2, 6, 10, 8, 12], [4, 2, 6, 10, 12, 8], [4, 2, 6, 12, 8, 10], [4, 2, 6, 12, 10, 8], [4, 2, 8, 6, 10, 12], [4, 2, 8, 6, 12, 10], [4, 2, 8, 10, 6, 12], [4, 2, 8, 10, 12, 6], [4, 2, 8, 12, 6, 10], [4, 2, 8, 12, 10, 6], [4, 2, 10, 6, 8, 12], [4, 2, 10, 6, 12, 8], [4, 2, 10, 8, 6, 12], [4, 2, 10, 8, 12, 6], [4, 2, 10, 12, 6, 8], [4, 2, 10, 12, 8, 6], [4, 2, 12, 6, 8, 10], [4, 2, 12, 6, 10, 8], [4, 2, 12, 8, 6, 10], [4, 2, 12, 8, 10, 6], [4, 2, 12, 10, 6, 8], [4, 2, 12, 10, 8, 6], [4, 6, 2, 8, 10, 12], [4, 6, 2, 8, 12, 10], [4, 6, 2, 10, 8, 12], [4, 6, 2, 10, 12, 8], [4, 6, 2, 12, 8, 10], [4, 6, 2, 12, 10, 8], [4, 6, 8, 2, 10, 12], [4, 6, 8, 2, 12, 10], [4, 6, 8, 10, 2, 12], [4, 6, 8, 10, 12, 2], [4, 6, 8, 12, 2, 10], [4, 6, 8, 12, 10, 2], [4, 6, 10, 2, 8, 12], [4, 6, 10, 2, 12, 8], [4, 6, 10, 8, 2, 12], [4, 6, 10, 8, 12, 2], [4, 6, 10, 12, 2, 8], [4, 6, 10, 12, 8, 2], [4, 6, 12, 2, 8, 10], [4, 6, 12, 2, 10, 8], [4, 6, 12, 8, 2, 10], [4, 6, 12, 8, 10, 2], [4, 6, 12, 10, 2, 8], [4, 6, 12, 10, 8, 2], [4, 8, 2, 6, 10, 12], [4, 8, 2, 6, 12, 10], [4, 8, 2, 10, 6, 12], [4, 8, 2, 10, 12, 6], [4, 8, 2, 12, 6, 10], [4, 8, 2, 12, 10, 6], [4, 8, 6, 2, 10, 12], [4, 8, 6, 2, 12, 10], [4, 8, 6, 10, 2, 12], [4, 8, 6, 10, 12, 2], [4, 8, 6, 12, 2, 10], [4, 8, 6, 12, 10, 2], [4, 8, 10, 2, 6, 12], [4, 8, 10, 2, 12, 6], [4, 8, 10, 6, 2, 12], [4, 8, 10, 6, 12, 2], [4, 8, 10, 12, 2, 6], [4, 8, 10, 12, 6, 2], [4, 8, 12, 2, 6, 10], [4, 8, 12, 2, 10, 6], [4, 8, 12, 6, 2, 10], [4, 8, 12, 6, 10, 2], [4, 8, 12, 10, 2, 6], [4, 8, 12, 10, 6, 2], [4, 10, 2, 6, 8, 12], [4, 10, 2, 6, 12, 8], [4, 10, 2, 8, 6, 12], [4, 10, 2, 8, 12, 6], [4, 10, 2, 12, 6, 8], [4, 10, 2, 12, 8, 6], [4, 10, 6, 2, 8, 12], [4, 10, 6, 2, 12, 8], [4, 10, 6, 8, 2, 12], [4, 10, 6, 8, 12, 2], [4, 10, 6, 12, 2, 8], [4, 10, 6, 12, 8, 2], [4, 10, 8, 2, 6, 12], [4, 10, 8, 2, 12, 6], [4, 10, 8, 6, 2, 12], [4, 10, 8, 6, 12, 2], [4, 10, 8, 12, 2, 6], [4, 10, 8, 12, 6, 2], [4, 10, 12, 2, 6, 8], [4, 10, 12, 2, 8, 6], [4, 10, 12, 6, 2, 8], [4, 10, 12, 6, 8, 2], [4, 10, 12, 8, 2, 6], [4, 10, 12, 8, 6, 2], [4, 12, 2, 6, 8, 10], [4, 12, 2, 6, 10, 8], [4, 12, 2, 8, 6, 10], [4, 12, 2, 8, 10, 6], [4, 12, 2, 10, 6, 8], [4, 12, 2, 10, 8, 6], [4, 12, 6, 2, 8, 10], [4, 12, 6, 2, 10, 8], [4, 12, 6, 8, 2, 10], [4, 12, 6, 8, 10, 2], [4, 12, 6, 10, 2, 8], [4, 12, 6, 10, 8, 2], [4, 12, 8, 2, 6, 10], [4, 12, 8, 2, 10, 6], [4, 12, 8, 6, 2, 10], [4, 12, 8, 6, 10, 2], [4, 12, 8, 10, 2, 6], [4, 12, 8, 10, 6, 2], [4, 12, 10, 2, 6, 8], [4, 12, 10, 2, 8, 6], [4, 12, 10, 6, 2, 8], [4, 12, 10, 6, 8, 2], [4, 12, 10, 8, 2, 6], [4, 12, 10, 8, 6, 2], [6, 2, 4, 8, 10, 12], [6, 2, 4, 8, 12, 10], [6, 2, 4, 10, 8, 12], [6, 2, 4, 10, 12, 8], [6, 2, 4, 12, 8, 10], [6, 2, 4, 12, 10, 8], [6, 2, 8, 4, 10, 12], [6, 2, 8, 4, 12, 10], [6, 2, 8, 10, 4, 12], [6, 2, 8, 10, 12, 4], [6, 2, 8, 12, 4, 10], [6, 2, 8, 12, 10, 4], [6, 2, 10, 4, 8, 12], [6, 2, 10, 4, 12, 8], [6, 2, 10, 8, 4, 12], [6, 2, 10, 8, 12, 4], [6, 2, 10, 12, 4, 8], [6, 2, 10, 12, 8, 4], [6, 2, 12, 4, 8, 10], [6, 2, 12, 4, 10, 8], [6, 2, 12, 8, 4, 10], [6, 2, 12, 8, 10, 4], [6, 2, 12, 10, 4, 8], [6, 2, 12, 10, 8, 4], [6, 4, 2, 8, 10, 12], [6, 4, 2, 8, 12, 10], [6, 4, 2, 10, 8, 12], [6, 4, 2, 10, 12, 8], [6, 4, 2, 12, 8, 10], [6, 4, 2, 12, 10, 8], [6, 4, 8, 2, 10, 12], [6, 4, 8, 2, 12, 10], [6, 4, 8, 10, 2, 12], [6, 4, 8, 10, 12, 2], [6, 4, 8, 12, 2, 10], [6, 4, 8, 12, 10, 2], [6, 4, 10, 2, 8, 12], [6, 4, 10, 2, 12, 8], [6, 4, 10, 8, 2, 12], [6, 4, 10, 8, 12, 2], [6, 4, 10, 12, 2, 8], [6, 4, 10, 12, 8, 2], [6, 4, 12, 2, 8, 10], [6, 4, 12, 2, 10, 8], [6, 4, 12, 8, 2, 10], [6, 4, 12, 8, 10, 2], [6, 4, 12, 10, 2, 8], [6, 4, 12, 10, 8, 2], [6, 8, 2, 4, 10, 12], [6, 8, 2, 4, 12, 10], [6, 8, 2, 10, 4, 12], [6, 8, 2, 10, 12, 4], [6, 8, 2, 12, 4, 10], [6, 8, 2, 12, 10, 4], [6, 8, 4, 2, 10, 12], [6, 8, 4, 2, 12, 10], [6, 8, 4, 10, 2, 12], [6, 8, 4, 10, 12, 2], [6, 8, 4, 12, 2, 10], [6, 8, 4, 12, 10, 2], [6, 8, 10, 2, 4, 12], [6, 8, 10, 2, 12, 4], [6, 8, 10, 4, 2, 12], [6, 8, 10, 4, 12, 2], [6, 8, 10, 12, 2, 4], [6, 8, 10, 12, 4, 2], [6, 8, 12, 2, 4, 10], [6, 8, 12, 2, 10, 4], [6, 8, 12, 4, 2, 10], [6, 8, 12, 4, 10, 2], [6, 8, 12, 10, 2, 4], [6, 8, 12, 10, 4, 2], [6, 10, 2, 4, 8, 12], [6, 10, 2, 4, 12, 8], [6, 10, 2, 8, 4, 12], [6, 10, 2, 8, 12, 4], [6, 10, 2, 12, 4, 8], [6, 10, 2, 12, 8, 4], [6, 10, 4, 2, 8, 12], [6, 10, 4, 2, 12, 8], [6, 10, 4, 8, 2, 12], [6, 10, 4, 8, 12, 2], [6, 10, 4, 12, 2, 8], [6, 10, 4, 12, 8, 2], [6, 10, 8, 2, 4, 12], [6, 10, 8, 2, 12, 4], [6, 10, 8, 4, 2, 12], [6, 10, 8, 4, 12, 2], [6, 10, 8, 12, 2, 4], [6, 10, 8, 12, 4, 2], [6, 10, 12, 2, 4, 8], [6, 10, 12, 2, 8, 4], [6, 10, 12, 4, 2, 8], [6, 10, 12, 4, 8, 2], [6, 10, 12, 8, 2, 4], [6, 10, 12, 8, 4, 2], [6, 12, 2, 4, 8, 10], [6, 12, 2, 4, 10, 8], [6, 12, 2, 8, 4, 10], [6, 12, 2, 8, 10, 4], [6, 12, 2, 10, 4, 8], [6, 12, 2, 10, 8, 4], [6, 12, 4, 2, 8, 10], [6, 12, 4, 2, 10, 8], [6, 12, 4, 8, 2, 10], [6, 12, 4, 8, 10, 2], [6, 12, 4, 10, 2, 8], [6, 12, 4, 10, 8, 2], [6, 12, 8, 2, 4, 10], [6, 12, 8, 2, 10, 4], [6, 12, 8, 4, 2, 10], [6, 12, 8, 4, 10, 2], [6, 12, 8, 10, 2, 4], [6, 12, 8, 10, 4, 2], [6, 12, 10, 2, 4, 8], [6, 12, 10, 2, 8, 4], [6, 12, 10, 4, 2, 8], [6, 12, 10, 4, 8, 2], [6, 12, 10, 8, 2, 4], [6, 12, 10, 8, 4, 2], [8, 2, 4, 6, 10, 12], [8, 2, 4, 6, 12, 10], [8, 2, 4, 10, 6, 12], [8, 2, 4, 10, 12, 6], [8, 2, 4, 12, 6, 10], [8, 2, 4, 12, 10, 6], [8, 2, 6, 4, 10, 12], [8, 2, 6, 4, 12, 10], [8, 2, 6, 10, 4, 12], [8, 2, 6, 10, 12, 4], [8, 2, 6, 12, 4, 10], [8, 2, 6, 12, 10, 4], [8, 2, 10, 4, 6, 12], [8, 2, 10, 4, 12, 6], [8, 2, 10, 6, 4, 12], [8, 2, 10, 6, 12, 4], [8, 2, 10, 12, 4, 6], [8, 2, 10, 12, 6, 4], [8, 2, 12, 4, 6, 10], [8, 2, 12, 4, 10, 6], [8, 2, 12, 6, 4, 10], [8, 2, 12, 6, 10, 4], [8, 2, 12, 10, 4, 6], [8, 2, 12, 10, 6, 4], [8, 4, 2, 6, 10, 12], [8, 4, 2, 6, 12, 10], [8, 4, 2, 10, 6, 12], [8, 4, 2, 10, 12, 6], [8, 4, 2, 12, 6, 10], [8, 4, 2, 12, 10, 6], [8, 4, 6, 2, 10, 12], [8, 4, 6, 2, 12, 10], [8, 4, 6, 10, 2, 12], [8, 4, 6, 10, 12, 2], [8, 4, 6, 12, 2, 10], [8, 4, 6, 12, 10, 2], [8, 4, 10, 2, 6, 12], [8, 4, 10, 2, 12, 6], [8, 4, 10, 6, 2, 12], [8, 4, 10, 6, 12, 2], [8, 4, 10, 12, 2, 6], [8, 4, 10, 12, 6, 2], [8, 4, 12, 2, 6, 10], [8, 4, 12, 2, 10, 6], [8, 4, 12, 6, 2, 10], [8, 4, 12, 6, 10, 2], [8, 4, 12, 10, 2, 6], [8, 4, 12, 10, 6, 2], [8, 6, 2, 4, 10, 12], [8, 6, 2, 4, 12, 10], [8, 6, 2, 10, 4, 12], [8, 6, 2, 10, 12, 4], [8, 6, 2, 12, 4, 10], [8, 6, 2, 12, 10, 4], [8, 6, 4, 2, 10, 12], [8, 6, 4, 2, 12, 10], [8, 6, 4, 10, 2, 12], [8, 6, 4, 10, 12, 2], [8, 6, 4, 12, 2, 10], [8, 6, 4, 12, 10, 2], [8, 6, 10, 2, 4, 12], [8, 6, 10, 2, 12, 4], [8, 6, 10, 4, 2, 12], [8, 6, 10, 4, 12, 2], [8, 6, 10, 12, 2, 4], [8, 6, 10, 12, 4, 2], [8, 6, 12, 2, 4, 10], [8, 6, 12, 2, 10, 4], [8, 6, 12, 4, 2, 10], [8, 6, 12, 4, 10, 2], [8, 6, 12, 10, 2, 4], [8, 6, 12, 10, 4, 2], [8, 10, 2, 4, 6, 12], [8, 10, 2, 4, 12, 6], [8, 10, 2, 6, 4, 12], [8, 10, 2, 6, 12, 4], [8, 10, 2, 12, 4, 6], [8, 10, 2, 12, 6, 4], [8, 10, 4, 2, 6, 12], [8, 10, 4, 2, 12, 6], [8, 10, 4, 6, 2, 12], [8, 10, 4, 6, 12, 2], [8, 10, 4, 12, 2, 6], [8, 10, 4, 12, 6, 2], [8, 10, 6, 2, 4, 12], [8, 10, 6, 2, 12, 4], [8, 10, 6, 4, 2, 12], [8, 10, 6, 4, 12, 2], [8, 10, 6, 12, 2, 4], [8, 10, 6, 12, 4, 2], [8, 10, 12, 2, 4, 6], [8, 10, 12, 2, 6, 4], [8, 10, 12, 4, 2, 6], [8, 10, 12, 4, 6, 2], [8, 10, 12, 6, 2, 4], [8, 10, 12, 6, 4, 2], [8, 12, 2, 4, 6, 10], [8, 12, 2, 4, 10, 6], [8, 12, 2, 6, 4, 10], [8, 12, 2, 6, 10, 4], [8, 12, 2, 10, 4, 6], [8, 12, 2, 10, 6, 4], [8, 12, 4, 2, 6, 10], [8, 12, 4, 2, 10, 6], [8, 12, 4, 6, 2, 10], [8, 12, 4, 6, 10, 2], [8, 12, 4, 10, 2, 6], [8, 12, 4, 10, 6, 2], [8, 12, 6, 2, 4, 10], [8, 12, 6, 2, 10, 4], [8, 12, 6, 4, 2, 10], [8, 12, 6, 4, 10, 2], [8, 12, 6, 10, 2, 4], [8, 12, 6, 10, 4, 2], [8, 12, 10, 2, 4, 6], [8, 12, 10, 2, 6, 4], [8, 12, 10, 4, 2, 6], [8, 12, 10, 4, 6, 2], [8, 12, 10, 6, 2, 4], [8, 12, 10, 6, 4, 2], [10, 2, 4, 6, 8, 12], [10, 2, 4, 6, 12, 8], [10, 2, 4, 8, 6, 12], [10, 2, 4, 8, 12, 6], [10, 2, 4, 12, 6, 8], [10, 2, 4, 12, 8, 6], [10, 2, 6, 4, 8, 12], [10, 2, 6, 4, 12, 8], [10, 2, 6, 8, 4, 12], [10, 2, 6, 8, 12, 4], [10, 2, 6, 12, 4, 8], [10, 2, 6, 12, 8, 4], [10, 2, 8, 4, 6, 12], [10, 2, 8, 4, 12, 6], [10, 2, 8, 6, 4, 12], [10, 2, 8, 6, 12, 4], [10, 2, 8, 12, 4, 6], [10, 2, 8, 12, 6, 4], [10, 2, 12, 4, 6, 8], [10, 2, 12, 4, 8, 6], [10, 2, 12, 6, 4, 8], [10, 2, 12, 6, 8, 4], [10, 2, 12, 8, 4, 6], [10, 2, 12, 8, 6, 4], [10, 4, 2, 6, 8, 12], [10, 4, 2, 6, 12, 8], [10, 4, 2, 8, 6, 12], [10, 4, 2, 8, 12, 6], [10, 4, 2, 12, 6, 8], [10, 4, 2, 12, 8, 6], [10, 4, 6, 2, 8, 12], [10, 4, 6, 2, 12, 8], [10, 4, 6, 8, 2, 12], [10, 4, 6, 8, 12, 2], [10, 4, 6, 12, 2, 8], [10, 4, 6, 12, 8, 2], [10, 4, 8, 2, 6, 12], [10, 4, 8, 2, 12, 6], [10, 4, 8, 6, 2, 12], [10, 4, 8, 6, 12, 2], [10, 4, 8, 12, 2, 6], [10, 4, 8, 12, 6, 2], [10, 4, 12, 2, 6, 8], [10, 4, 12, 2, 8, 6], [10, 4, 12, 6, 2, 8], [10, 4, 12, 6, 8, 2], [10, 4, 12, 8, 2, 6], [10, 4, 12, 8, 6, 2], [10, 6, 2, 4, 8, 12], [10, 6, 2, 4, 12, 8], [10, 6, 2, 8, 4, 12], [10, 6, 2, 8, 12, 4], [10, 6, 2, 12, 4, 8], [10, 6, 2, 12, 8, 4], [10, 6, 4, 2, 8, 12], [10, 6, 4, 2, 12, 8], [10, 6, 4, 8, 2, 12], [10, 6, 4, 8, 12, 2], [10, 6, 4, 12, 2, 8], [10, 6, 4, 12, 8, 2], [10, 6, 8, 2, 4, 12], [10, 6, 8, 2, 12, 4], [10, 6, 8, 4, 2, 12], [10, 6, 8, 4, 12, 2], [10, 6, 8, 12, 2, 4], [10, 6, 8, 12, 4, 2], [10, 6, 12, 2, 4, 8], [10, 6, 12, 2, 8, 4], [10, 6, 12, 4, 2, 8], [10, 6, 12, 4, 8, 2], [10, 6, 12, 8, 2, 4], [10, 6, 12, 8, 4, 2], [10, 8, 2, 4, 6, 12], [10, 8, 2, 4, 12, 6], [10, 8, 2, 6, 4, 12], [10, 8, 2, 6, 12, 4], [10, 8, 2, 12, 4, 6], [10, 8, 2, 12, 6, 4], [10, 8, 4, 2, 6, 12], [10, 8, 4, 2, 12, 6], [10, 8, 4, 6, 2, 12], [10, 8, 4, 6, 12, 2], [10, 8, 4, 12, 2, 6], [10, 8, 4, 12, 6, 2], [10, 8, 6, 2, 4, 12], [10, 8, 6, 2, 12, 4], [10, 8, 6, 4, 2, 12], [10, 8, 6, 4, 12, 2], [10, 8, 6, 12, 2, 4], [10, 8, 6, 12, 4, 2], [10, 8, 12, 2, 4, 6], [10, 8, 12, 2, 6, 4], [10, 8, 12, 4, 2, 6], [10, 8, 12, 4, 6, 2], [10, 8, 12, 6, 2, 4], [10, 8, 12, 6, 4, 2], [10, 12, 2, 4, 6, 8], [10, 12, 2, 4, 8, 6], [10, 12, 2, 6, 4, 8], [10, 12, 2, 6, 8, 4], [10, 12, 2, 8, 4, 6], [10, 12, 2, 8, 6, 4], [10, 12, 4, 2, 6, 8], [10, 12, 4, 2, 8, 6], [10, 12, 4, 6, 2, 8], [10, 12, 4, 6, 8, 2], [10, 12, 4, 8, 2, 6], [10, 12, 4, 8, 6, 2], [10, 12, 6, 2, 4, 8], [10, 12, 6, 2, 8, 4], [10, 12, 6, 4, 2, 8], [10, 12, 6, 4, 8, 2], [10, 12, 6, 8, 2, 4], [10, 12, 6, 8, 4, 2], [10, 12, 8, 2, 4, 6], [10, 12, 8, 2, 6, 4], [10, 12, 8, 4, 2, 6], [10, 12, 8, 4, 6, 2], [10, 12, 8, 6, 2, 4], [10, 12, 8, 6, 4, 2], [12, 2, 4, 6, 8, 10], [12, 2, 4, 6, 10, 8], [12, 2, 4, 8, 6, 10], [12, 2, 4, 8, 10, 6], [12, 2, 4, 10, 6, 8], [12, 2, 4, 10, 8, 6], [12, 2, 6, 4, 8, 10], [12, 2, 6, 4, 10, 8], [12, 2, 6, 8, 4, 10], [12, 2, 6, 8, 10, 4], [12, 2, 6, 10, 4, 8], [12, 2, 6, 10, 8, 4], [12, 2, 8, 4, 6, 10], [12, 2, 8, 4, 10, 6], [12, 2, 8, 6, 4, 10], [12, 2, 8, 6, 10, 4], [12, 2, 8, 10, 4, 6], [12, 2, 8, 10, 6, 4], [12, 2, 10, 4, 6, 8], [12, 2, 10, 4, 8, 6], [12, 2, 10, 6, 4, 8], [12, 2, 10, 6, 8, 4], [12, 2, 10, 8, 4, 6], [12, 2, 10, 8, 6, 4], [12, 4, 2, 6, 8, 10], [12, 4, 2, 6, 10, 8], [12, 4, 2, 8, 6, 10], [12, 4, 2, 8, 10, 6], [12, 4, 2, 10, 6, 8], [12, 4, 2, 10, 8, 6], [12, 4, 6, 2, 8, 10], [12, 4, 6, 2, 10, 8], [12, 4, 6, 8, 2, 10], [12, 4, 6, 8, 10, 2], [12, 4, 6, 10, 2, 8], [12, 4, 6, 10, 8, 2], [12, 4, 8, 2, 6, 10], [12, 4, 8, 2, 10, 6], [12, 4, 8, 6, 2, 10], [12, 4, 8, 6, 10, 2], [12, 4, 8, 10, 2, 6], [12, 4, 8, 10, 6, 2], [12, 4, 10, 2, 6, 8], [12, 4, 10, 2, 8, 6], [12, 4, 10, 6, 2, 8], [12, 4, 10, 6, 8, 2], [12, 4, 10, 8, 2, 6], [12, 4, 10, 8, 6, 2], [12, 6, 2, 4, 8, 10], [12, 6, 2, 4, 10, 8], [12, 6, 2, 8, 4, 10], [12, 6, 2, 8, 10, 4], [12, 6, 2, 10, 4, 8], [12, 6, 2, 10, 8, 4], [12, 6, 4, 2, 8, 10], [12, 6, 4, 2, 10, 8], [12, 6, 4, 8, 2, 10], [12, 6, 4, 8, 10, 2], [12, 6, 4, 10, 2, 8], [12, 6, 4, 10, 8, 2], [12, 6, 8, 2, 4, 10], [12, 6, 8, 2, 10, 4], [12, 6, 8, 4, 2, 10], [12, 6, 8, 4, 10, 2], [12, 6, 8, 10, 2, 4], [12, 6, 8, 10, 4, 2], [12, 6, 10, 2, 4, 8], [12, 6, 10, 2, 8, 4], [12, 6, 10, 4, 2, 8], [12, 6, 10, 4, 8, 2], [12, 6, 10, 8, 2, 4], [12, 6, 10, 8, 4, 2], [12, 8, 2, 4, 6, 10], [12, 8, 2, 4, 10, 6], [12, 8, 2, 6, 4, 10], [12, 8, 2, 6, 10, 4], [12, 8, 2, 10, 4, 6], [12, 8, 2, 10, 6, 4], [12, 8, 4, 2, 6, 10], [12, 8, 4, 2, 10, 6], [12, 8, 4, 6, 2, 10], [12, 8, 4, 6, 10, 2], [12, 8, 4, 10, 2, 6], [12, 8, 4, 10, 6, 2], [12, 8, 6, 2, 4, 10], [12, 8, 6, 2, 10, 4], [12, 8, 6, 4, 2, 10], [12, 8, 6, 4, 10, 2], [12, 8, 6, 10, 2, 4], [12, 8, 6, 10, 4, 2], [12, 8, 10, 2, 4, 6], [12, 8, 10, 2, 6, 4], [12, 8, 10, 4, 2, 6], [12, 8, 10, 4, 6, 2], [12, 8, 10, 6, 2, 4], [12, 8, 10, 6, 4, 2], [12, 10, 2, 4, 6, 8], [12, 10, 2, 4, 8, 6], [12, 10, 2, 6, 4, 8], [12, 10, 2, 6, 8, 4], [12, 10, 2, 8, 4, 6], [12, 10, 2, 8, 6, 4], [12, 10, 4, 2, 6, 8], [12, 10, 4, 2, 8, 6], [12, 10, 4, 6, 2, 8], [12, 10, 4, 6, 8, 2], [12, 10, 4, 8, 2, 6], [12, 10, 4, 8, 6, 2], [12, 10, 6, 2, 4, 8], [12, 10, 6, 2, 8, 4], [12, 10, 6, 4, 2, 8], [12, 10, 6, 4, 8, 2], [12, 10, 6, 8, 2, 4], [12, 10, 6, 8, 4, 2], [12, 10, 8, 2, 4, 6], [12, 10, 8, 2, 6, 4], [12, 10, 8, 4, 2, 6], [12, 10, 8, 4, 6, 2], [12, 10, 8, 6, 2, 4], [12, 10, 8, 6, 4, 2]]\n assert 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 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 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 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 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 candidate(nums = [0]) == [[0]]\n assert 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 candidate(nums = [10, 20, 30, 40, 50]) == [[10, 20, 30, 40, 50], [10, 20, 30, 50, 40], [10, 20, 40, 30, 50], [10, 20, 40, 50, 30], [10, 20, 50, 30, 40], [10, 20, 50, 40, 30], [10, 30, 20, 40, 50], [10, 30, 20, 50, 40], [10, 30, 40, 20, 50], [10, 30, 40, 50, 20], [10, 30, 50, 20, 40], [10, 30, 50, 40, 20], [10, 40, 20, 30, 50], [10, 40, 20, 50, 30], [10, 40, 30, 20, 50], [10, 40, 30, 50, 20], [10, 40, 50, 20, 30], [10, 40, 50, 30, 20], [10, 50, 20, 30, 40], [10, 50, 20, 40, 30], [10, 50, 30, 20, 40], [10, 50, 30, 40, 20], [10, 50, 40, 20, 30], [10, 50, 40, 30, 20], [20, 10, 30, 40, 50], [20, 10, 30, 50, 40], [20, 10, 40, 30, 50], [20, 10, 40, 50, 30], [20, 10, 50, 30, 40], [20, 10, 50, 40, 30], [20, 30, 10, 40, 50], [20, 30, 10, 50, 40], [20, 30, 40, 10, 50], [20, 30, 40, 50, 10], [20, 30, 50, 10, 40], [20, 30, 50, 40, 10], [20, 40, 10, 30, 50], [20, 40, 10, 50, 30], [20, 40, 30, 10, 50], [20, 40, 30, 50, 10], [20, 40, 50, 10, 30], [20, 40, 50, 30, 10], [20, 50, 10, 30, 40], [20, 50, 10, 40, 30], [20, 50, 30, 10, 40], [20, 50, 30, 40, 10], [20, 50, 40, 10, 30], [20, 50, 40, 30, 10], [30, 10, 20, 40, 50], [30, 10, 20, 50, 40], [30, 10, 40, 20, 50], [30, 10, 40, 50, 20], [30, 10, 50, 20, 40], [30, 10, 50, 40, 20], [30, 20, 10, 40, 50], [30, 20, 10, 50, 40], [30, 20, 40, 10, 50], [30, 20, 40, 50, 10], [30, 20, 50, 10, 40], [30, 20, 50, 40, 10], [30, 40, 10, 20, 50], [30, 40, 10, 50, 20], [30, 40, 20, 10, 50], [30, 40, 20, 50, 10], [30, 40, 50, 10, 20], [30, 40, 50, 20, 10], [30, 50, 10, 20, 40], [30, 50, 10, 40, 20], [30, 50, 20, 10, 40], [30, 50, 20, 40, 10], [30, 50, 40, 10, 20], [30, 50, 40, 20, 10], [40, 10, 20, 30, 50], [40, 10, 20, 50, 30], [40, 10, 30, 20, 50], [40, 10, 30, 50, 20], [40, 10, 50, 20, 30], [40, 10, 50, 30, 20], [40, 20, 10, 30, 50], [40, 20, 10, 50, 30], [40, 20, 30, 10, 50], [40, 20, 30, 50, 10], [40, 20, 50, 10, 30], [40, 20, 50, 30, 10], [40, 30, 10, 20, 50], [40, 30, 10, 50, 20], [40, 30, 20, 10, 50], [40, 30, 20, 50, 10], [40, 30, 50, 10, 20], [40, 30, 50, 20, 10], [40, 50, 10, 20, 30], [40, 50, 10, 30, 20], [40, 50, 20, 10, 30], [40, 50, 20, 30, 10], [40, 50, 30, 10, 20], [40, 50, 30, 20, 10], [50, 10, 20, 30, 40], [50, 10, 20, 40, 30], [50, 10, 30, 20, 40], [50, 10, 30, 40, 20], [50, 10, 40, 20, 30], [50, 10, 40, 30, 20], [50, 20, 10, 30, 40], [50, 20, 10, 40, 30], [50, 20, 30, 10, 40], [50, 20, 30, 40, 10], [50, 20, 40, 10, 30], [50, 20, 40, 30, 10], [50, 30, 10, 20, 40], [50, 30, 10, 40, 20], [50, 30, 20, 10, 40], [50, 30, 20, 40, 10], [50, 30, 40, 10, 20], [50, 30, 40, 20, 10], [50, 40, 10, 20, 30], [50, 40, 10, 30, 20], [50, 40, 20, 10, 30], [50, 40, 20, 30, 10], [50, 40, 30, 10, 20], [50, 40, 30, 20, 10]]\n assert candidate(nums = [11, 22, 33, 44, 55, 66]) == [[11, 22, 33, 44, 55, 66], [11, 22, 33, 44, 66, 55], [11, 22, 33, 55, 44, 66], [11, 22, 33, 55, 66, 44], [11, 22, 33, 66, 44, 55], [11, 22, 33, 66, 55, 44], [11, 22, 44, 33, 55, 66], [11, 22, 44, 33, 66, 55], [11, 22, 44, 55, 33, 66], [11, 22, 44, 55, 66, 33], [11, 22, 44, 66, 33, 55], [11, 22, 44, 66, 55, 33], [11, 22, 55, 33, 44, 66], [11, 22, 55, 33, 66, 44], [11, 22, 55, 44, 33, 66], [11, 22, 55, 44, 66, 33], [11, 22, 55, 66, 33, 44], [11, 22, 55, 66, 44, 33], [11, 22, 66, 33, 44, 55], [11, 22, 66, 33, 55, 44], [11, 22, 66, 44, 33, 55], [11, 22, 66, 44, 55, 33], [11, 22, 66, 55, 33, 44], [11, 22, 66, 55, 44, 33], [11, 33, 22, 44, 55, 66], [11, 33, 22, 44, 66, 55], [11, 33, 22, 55, 44, 66], [11, 33, 22, 55, 66, 44], [11, 33, 22, 66, 44, 55], [11, 33, 22, 66, 55, 44], [11, 33, 44, 22, 55, 66], [11, 33, 44, 22, 66, 55], [11, 33, 44, 55, 22, 66], [11, 33, 44, 55, 66, 22], [11, 33, 44, 66, 22, 55], [11, 33, 44, 66, 55, 22], [11, 33, 55, 22, 44, 66], [11, 33, 55, 22, 66, 44], [11, 33, 55, 44, 22, 66], [11, 33, 55, 44, 66, 22], [11, 33, 55, 66, 22, 44], [11, 33, 55, 66, 44, 22], [11, 33, 66, 22, 44, 55], [11, 33, 66, 22, 55, 44], [11, 33, 66, 44, 22, 55], [11, 33, 66, 44, 55, 22], [11, 33, 66, 55, 22, 44], [11, 33, 66, 55, 44, 22], [11, 44, 22, 33, 55, 66], [11, 44, 22, 33, 66, 55], [11, 44, 22, 55, 33, 66], [11, 44, 22, 55, 66, 33], [11, 44, 22, 66, 33, 55], [11, 44, 22, 66, 55, 33], [11, 44, 33, 22, 55, 66], [11, 44, 33, 22, 66, 55], [11, 44, 33, 55, 22, 66], [11, 44, 33, 55, 66, 22], [11, 44, 33, 66, 22, 55], [11, 44, 33, 66, 55, 22], [11, 44, 55, 22, 33, 66], [11, 44, 55, 22, 66, 33], [11, 44, 55, 33, 22, 66], [11, 44, 55, 33, 66, 22], [11, 44, 55, 66, 22, 33], [11, 44, 55, 66, 33, 22], [11, 44, 66, 22, 33, 55], [11, 44, 66, 22, 55, 33], [11, 44, 66, 33, 22, 55], [11, 44, 66, 33, 55, 22], [11, 44, 66, 55, 22, 33], [11, 44, 66, 55, 33, 22], [11, 55, 22, 33, 44, 66], [11, 55, 22, 33, 66, 44], [11, 55, 22, 44, 33, 66], [11, 55, 22, 44, 66, 33], [11, 55, 22, 66, 33, 44], [11, 55, 22, 66, 44, 33], [11, 55, 33, 22, 44, 66], [11, 55, 33, 22, 66, 44], [11, 55, 33, 44, 22, 66], [11, 55, 33, 44, 66, 22], [11, 55, 33, 66, 22, 44], [11, 55, 33, 66, 44, 22], [11, 55, 44, 22, 33, 66], [11, 55, 44, 22, 66, 33], [11, 55, 44, 33, 22, 66], [11, 55, 44, 33, 66, 22], [11, 55, 44, 66, 22, 33], [11, 55, 44, 66, 33, 22], [11, 55, 66, 22, 33, 44], [11, 55, 66, 22, 44, 33], [11, 55, 66, 33, 22, 44], [11, 55, 66, 33, 44, 22], [11, 55, 66, 44, 22, 33], [11, 55, 66, 44, 33, 22], [11, 66, 22, 33, 44, 55], [11, 66, 22, 33, 55, 44], [11, 66, 22, 44, 33, 55], [11, 66, 22, 44, 55, 33], [11, 66, 22, 55, 33, 44], [11, 66, 22, 55, 44, 33], [11, 66, 33, 22, 44, 55], [11, 66, 33, 22, 55, 44], [11, 66, 33, 44, 22, 55], [11, 66, 33, 44, 55, 22], [11, 66, 33, 55, 22, 44], [11, 66, 33, 55, 44, 22], [11, 66, 44, 22, 33, 55], [11, 66, 44, 22, 55, 33], [11, 66, 44, 33, 22, 55], [11, 66, 44, 33, 55, 22], [11, 66, 44, 55, 22, 33], [11, 66, 44, 55, 33, 22], [11, 66, 55, 22, 33, 44], [11, 66, 55, 22, 44, 33], [11, 66, 55, 33, 22, 44], [11, 66, 55, 33, 44, 22], [11, 66, 55, 44, 22, 33], [11, 66, 55, 44, 33, 22], [22, 11, 33, 44, 55, 66], [22, 11, 33, 44, 66, 55], [22, 11, 33, 55, 44, 66], [22, 11, 33, 55, 66, 44], [22, 11, 33, 66, 44, 55], [22, 11, 33, 66, 55, 44], [22, 11, 44, 33, 55, 66], [22, 11, 44, 33, 66, 55], [22, 11, 44, 55, 33, 66], [22, 11, 44, 55, 66, 33], [22, 11, 44, 66, 33, 55], [22, 11, 44, 66, 55, 33], [22, 11, 55, 33, 44, 66], [22, 11, 55, 33, 66, 44], [22, 11, 55, 44, 33, 66], [22, 11, 55, 44, 66, 33], [22, 11, 55, 66, 33, 44], [22, 11, 55, 66, 44, 33], [22, 11, 66, 33, 44, 55], [22, 11, 66, 33, 55, 44], [22, 11, 66, 44, 33, 55], [22, 11, 66, 44, 55, 33], [22, 11, 66, 55, 33, 44], [22, 11, 66, 55, 44, 33], [22, 33, 11, 44, 55, 66], [22, 33, 11, 44, 66, 55], [22, 33, 11, 55, 44, 66], [22, 33, 11, 55, 66, 44], [22, 33, 11, 66, 44, 55], [22, 33, 11, 66, 55, 44], [22, 33, 44, 11, 55, 66], [22, 33, 44, 11, 66, 55], [22, 33, 44, 55, 11, 66], [22, 33, 44, 55, 66, 11], [22, 33, 44, 66, 11, 55], [22, 33, 44, 66, 55, 11], [22, 33, 55, 11, 44, 66], [22, 33, 55, 11, 66, 44], [22, 33, 55, 44, 11, 66], [22, 33, 55, 44, 66, 11], [22, 33, 55, 66, 11, 44], [22, 33, 55, 66, 44, 11], [22, 33, 66, 11, 44, 55], [22, 33, 66, 11, 55, 44], [22, 33, 66, 44, 11, 55], [22, 33, 66, 44, 55, 11], [22, 33, 66, 55, 11, 44], [22, 33, 66, 55, 44, 11], [22, 44, 11, 33, 55, 66], [22, 44, 11, 33, 66, 55], [22, 44, 11, 55, 33, 66], [22, 44, 11, 55, 66, 33], [22, 44, 11, 66, 33, 55], [22, 44, 11, 66, 55, 33], [22, 44, 33, 11, 55, 66], [22, 44, 33, 11, 66, 55], [22, 44, 33, 55, 11, 66], [22, 44, 33, 55, 66, 11], [22, 44, 33, 66, 11, 55], [22, 44, 33, 66, 55, 11], [22, 44, 55, 11, 33, 66], [22, 44, 55, 11, 66, 33], [22, 44, 55, 33, 11, 66], [22, 44, 55, 33, 66, 11], [22, 44, 55, 66, 11, 33], [22, 44, 55, 66, 33, 11], [22, 44, 66, 11, 33, 55], [22, 44, 66, 11, 55, 33], [22, 44, 66, 33, 11, 55], [22, 44, 66, 33, 55, 11], [22, 44, 66, 55, 11, 33], [22, 44, 66, 55, 33, 11], [22, 55, 11, 33, 44, 66], [22, 55, 11, 33, 66, 44], [22, 55, 11, 44, 33, 66], [22, 55, 11, 44, 66, 33], [22, 55, 11, 66, 33, 44], [22, 55, 11, 66, 44, 33], [22, 55, 33, 11, 44, 66], [22, 55, 33, 11, 66, 44], [22, 55, 33, 44, 11, 66], [22, 55, 33, 44, 66, 11], [22, 55, 33, 66, 11, 44], [22, 55, 33, 66, 44, 11], [22, 55, 44, 11, 33, 66], [22, 55, 44, 11, 66, 33], [22, 55, 44, 33, 11, 66], [22, 55, 44, 33, 66, 11], [22, 55, 44, 66, 11, 33], [22, 55, 44, 66, 33, 11], [22, 55, 66, 11, 33, 44], [22, 55, 66, 11, 44, 33], [22, 55, 66, 33, 11, 44], [22, 55, 66, 33, 44, 11], [22, 55, 66, 44, 11, 33], [22, 55, 66, 44, 33, 11], [22, 66, 11, 33, 44, 55], [22, 66, 11, 33, 55, 44], [22, 66, 11, 44, 33, 55], [22, 66, 11, 44, 55, 33], [22, 66, 11, 55, 33, 44], [22, 66, 11, 55, 44, 33], [22, 66, 33, 11, 44, 55], [22, 66, 33, 11, 55, 44], [22, 66, 33, 44, 11, 55], [22, 66, 33, 44, 55, 11], [22, 66, 33, 55, 11, 44], [22, 66, 33, 55, 44, 11], [22, 66, 44, 11, 33, 55], [22, 66, 44, 11, 55, 33], [22, 66, 44, 33, 11, 55], [22, 66, 44, 33, 55, 11], [22, 66, 44, 55, 11, 33], [22, 66, 44, 55, 33, 11], [22, 66, 55, 11, 33, 44], [22, 66, 55, 11, 44, 33], [22, 66, 55, 33, 11, 44], [22, 66, 55, 33, 44, 11], [22, 66, 55, 44, 11, 33], [22, 66, 55, 44, 33, 11], [33, 11, 22, 44, 55, 66], [33, 11, 22, 44, 66, 55], [33, 11, 22, 55, 44, 66], [33, 11, 22, 55, 66, 44], [33, 11, 22, 66, 44, 55], [33, 11, 22, 66, 55, 44], [33, 11, 44, 22, 55, 66], [33, 11, 44, 22, 66, 55], [33, 11, 44, 55, 22, 66], [33, 11, 44, 55, 66, 22], [33, 11, 44, 66, 22, 55], [33, 11, 44, 66, 55, 22], [33, 11, 55, 22, 44, 66], [33, 11, 55, 22, 66, 44], [33, 11, 55, 44, 22, 66], [33, 11, 55, 44, 66, 22], [33, 11, 55, 66, 22, 44], [33, 11, 55, 66, 44, 22], [33, 11, 66, 22, 44, 55], [33, 11, 66, 22, 55, 44], [33, 11, 66, 44, 22, 55], [33, 11, 66, 44, 55, 22], [33, 11, 66, 55, 22, 44], [33, 11, 66, 55, 44, 22], [33, 22, 11, 44, 55, 66], [33, 22, 11, 44, 66, 55], [33, 22, 11, 55, 44, 66], [33, 22, 11, 55, 66, 44], [33, 22, 11, 66, 44, 55], [33, 22, 11, 66, 55, 44], [33, 22, 44, 11, 55, 66], [33, 22, 44, 11, 66, 55], [33, 22, 44, 55, 11, 66], [33, 22, 44, 55, 66, 11], [33, 22, 44, 66, 11, 55], [33, 22, 44, 66, 55, 11], [33, 22, 55, 11, 44, 66], [33, 22, 55, 11, 66, 44], [33, 22, 55, 44, 11, 66], [33, 22, 55, 44, 66, 11], [33, 22, 55, 66, 11, 44], [33, 22, 55, 66, 44, 11], [33, 22, 66, 11, 44, 55], [33, 22, 66, 11, 55, 44], [33, 22, 66, 44, 11, 55], [33, 22, 66, 44, 55, 11], [33, 22, 66, 55, 11, 44], [33, 22, 66, 55, 44, 11], [33, 44, 11, 22, 55, 66], [33, 44, 11, 22, 66, 55], [33, 44, 11, 55, 22, 66], [33, 44, 11, 55, 66, 22], [33, 44, 11, 66, 22, 55], [33, 44, 11, 66, 55, 22], [33, 44, 22, 11, 55, 66], [33, 44, 22, 11, 66, 55], [33, 44, 22, 55, 11, 66], [33, 44, 22, 55, 66, 11], [33, 44, 22, 66, 11, 55], [33, 44, 22, 66, 55, 11], [33, 44, 55, 11, 22, 66], [33, 44, 55, 11, 66, 22], [33, 44, 55, 22, 11, 66], [33, 44, 55, 22, 66, 11], [33, 44, 55, 66, 11, 22], [33, 44, 55, 66, 22, 11], [33, 44, 66, 11, 22, 55], [33, 44, 66, 11, 55, 22], [33, 44, 66, 22, 11, 55], [33, 44, 66, 22, 55, 11], [33, 44, 66, 55, 11, 22], [33, 44, 66, 55, 22, 11], [33, 55, 11, 22, 44, 66], [33, 55, 11, 22, 66, 44], [33, 55, 11, 44, 22, 66], [33, 55, 11, 44, 66, 22], [33, 55, 11, 66, 22, 44], [33, 55, 11, 66, 44, 22], [33, 55, 22, 11, 44, 66], [33, 55, 22, 11, 66, 44], [33, 55, 22, 44, 11, 66], [33, 55, 22, 44, 66, 11], [33, 55, 22, 66, 11, 44], [33, 55, 22, 66, 44, 11], [33, 55, 44, 11, 22, 66], [33, 55, 44, 11, 66, 22], [33, 55, 44, 22, 11, 66], [33, 55, 44, 22, 66, 11], [33, 55, 44, 66, 11, 22], [33, 55, 44, 66, 22, 11], [33, 55, 66, 11, 22, 44], [33, 55, 66, 11, 44, 22], [33, 55, 66, 22, 11, 44], [33, 55, 66, 22, 44, 11], [33, 55, 66, 44, 11, 22], [33, 55, 66, 44, 22, 11], [33, 66, 11, 22, 44, 55], [33, 66, 11, 22, 55, 44], [33, 66, 11, 44, 22, 55], [33, 66, 11, 44, 55, 22], [33, 66, 11, 55, 22, 44], [33, 66, 11, 55, 44, 22], [33, 66, 22, 11, 44, 55], [33, 66, 22, 11, 55, 44], [33, 66, 22, 44, 11, 55], [33, 66, 22, 44, 55, 11], [33, 66, 22, 55, 11, 44], [33, 66, 22, 55, 44, 11], [33, 66, 44, 11, 22, 55], [33, 66, 44, 11, 55, 22], [33, 66, 44, 22, 11, 55], [33, 66, 44, 22, 55, 11], [33, 66, 44, 55, 11, 22], [33, 66, 44, 55, 22, 11], [33, 66, 55, 11, 22, 44], [33, 66, 55, 11, 44, 22], [33, 66, 55, 22, 11, 44], [33, 66, 55, 22, 44, 11], [33, 66, 55, 44, 11, 22], [33, 66, 55, 44, 22, 11], [44, 11, 22, 33, 55, 66], [44, 11, 22, 33, 66, 55], [44, 11, 22, 55, 33, 66], [44, 11, 22, 55, 66, 33], [44, 11, 22, 66, 33, 55], [44, 11, 22, 66, 55, 33], [44, 11, 33, 22, 55, 66], [44, 11, 33, 22, 66, 55], [44, 11, 33, 55, 22, 66], [44, 11, 33, 55, 66, 22], [44, 11, 33, 66, 22, 55], [44, 11, 33, 66, 55, 22], [44, 11, 55, 22, 33, 66], [44, 11, 55, 22, 66, 33], [44, 11, 55, 33, 22, 66], [44, 11, 55, 33, 66, 22], [44, 11, 55, 66, 22, 33], [44, 11, 55, 66, 33, 22], [44, 11, 66, 22, 33, 55], [44, 11, 66, 22, 55, 33], [44, 11, 66, 33, 22, 55], [44, 11, 66, 33, 55, 22], [44, 11, 66, 55, 22, 33], [44, 11, 66, 55, 33, 22], [44, 22, 11, 33, 55, 66], [44, 22, 11, 33, 66, 55], [44, 22, 11, 55, 33, 66], [44, 22, 11, 55, 66, 33], [44, 22, 11, 66, 33, 55], [44, 22, 11, 66, 55, 33], [44, 22, 33, 11, 55, 66], [44, 22, 33, 11, 66, 55], [44, 22, 33, 55, 11, 66], [44, 22, 33, 55, 66, 11], [44, 22, 33, 66, 11, 55], [44, 22, 33, 66, 55, 11], [44, 22, 55, 11, 33, 66], [44, 22, 55, 11, 66, 33], [44, 22, 55, 33, 11, 66], [44, 22, 55, 33, 66, 11], [44, 22, 55, 66, 11, 33], [44, 22, 55, 66, 33, 11], [44, 22, 66, 11, 33, 55], [44, 22, 66, 11, 55, 33], [44, 22, 66, 33, 11, 55], [44, 22, 66, 33, 55, 11], [44, 22, 66, 55, 11, 33], [44, 22, 66, 55, 33, 11], [44, 33, 11, 22, 55, 66], [44, 33, 11, 22, 66, 55], [44, 33, 11, 55, 22, 66], [44, 33, 11, 55, 66, 22], [44, 33, 11, 66, 22, 55], [44, 33, 11, 66, 55, 22], [44, 33, 22, 11, 55, 66], [44, 33, 22, 11, 66, 55], [44, 33, 22, 55, 11, 66], [44, 33, 22, 55, 66, 11], [44, 33, 22, 66, 11, 55], [44, 33, 22, 66, 55, 11], [44, 33, 55, 11, 22, 66], [44, 33, 55, 11, 66, 22], [44, 33, 55, 22, 11, 66], [44, 33, 55, 22, 66, 11], [44, 33, 55, 66, 11, 22], [44, 33, 55, 66, 22, 11], [44, 33, 66, 11, 22, 55], [44, 33, 66, 11, 55, 22], [44, 33, 66, 22, 11, 55], [44, 33, 66, 22, 55, 11], [44, 33, 66, 55, 11, 22], [44, 33, 66, 55, 22, 11], [44, 55, 11, 22, 33, 66], [44, 55, 11, 22, 66, 33], [44, 55, 11, 33, 22, 66], [44, 55, 11, 33, 66, 22], [44, 55, 11, 66, 22, 33], [44, 55, 11, 66, 33, 22], [44, 55, 22, 11, 33, 66], [44, 55, 22, 11, 66, 33], [44, 55, 22, 33, 11, 66], [44, 55, 22, 33, 66, 11], [44, 55, 22, 66, 11, 33], [44, 55, 22, 66, 33, 11], [44, 55, 33, 11, 22, 66], [44, 55, 33, 11, 66, 22], [44, 55, 33, 22, 11, 66], [44, 55, 33, 22, 66, 11], [44, 55, 33, 66, 11, 22], [44, 55, 33, 66, 22, 11], [44, 55, 66, 11, 22, 33], [44, 55, 66, 11, 33, 22], [44, 55, 66, 22, 11, 33], [44, 55, 66, 22, 33, 11], [44, 55, 66, 33, 11, 22], [44, 55, 66, 33, 22, 11], [44, 66, 11, 22, 33, 55], [44, 66, 11, 22, 55, 33], [44, 66, 11, 33, 22, 55], [44, 66, 11, 33, 55, 22], [44, 66, 11, 55, 22, 33], [44, 66, 11, 55, 33, 22], [44, 66, 22, 11, 33, 55], [44, 66, 22, 11, 55, 33], [44, 66, 22, 33, 11, 55], [44, 66, 22, 33, 55, 11], [44, 66, 22, 55, 11, 33], [44, 66, 22, 55, 33, 11], [44, 66, 33, 11, 22, 55], [44, 66, 33, 11, 55, 22], [44, 66, 33, 22, 11, 55], [44, 66, 33, 22, 55, 11], [44, 66, 33, 55, 11, 22], [44, 66, 33, 55, 22, 11], [44, 66, 55, 11, 22, 33], [44, 66, 55, 11, 33, 22], [44, 66, 55, 22, 11, 33], [44, 66, 55, 22, 33, 11], [44, 66, 55, 33, 11, 22], [44, 66, 55, 33, 22, 11], [55, 11, 22, 33, 44, 66], [55, 11, 22, 33, 66, 44], [55, 11, 22, 44, 33, 66], [55, 11, 22, 44, 66, 33], [55, 11, 22, 66, 33, 44], [55, 11, 22, 66, 44, 33], [55, 11, 33, 22, 44, 66], [55, 11, 33, 22, 66, 44], [55, 11, 33, 44, 22, 66], [55, 11, 33, 44, 66, 22], [55, 11, 33, 66, 22, 44], [55, 11, 33, 66, 44, 22], [55, 11, 44, 22, 33, 66], [55, 11, 44, 22, 66, 33], [55, 11, 44, 33, 22, 66], [55, 11, 44, 33, 66, 22], [55, 11, 44, 66, 22, 33], [55, 11, 44, 66, 33, 22], [55, 11, 66, 22, 33, 44], [55, 11, 66, 22, 44, 33], [55, 11, 66, 33, 22, 44], [55, 11, 66, 33, 44, 22], [55, 11, 66, 44, 22, 33], [55, 11, 66, 44, 33, 22], [55, 22, 11, 33, 44, 66], [55, 22, 11, 33, 66, 44], [55, 22, 11, 44, 33, 66], [55, 22, 11, 44, 66, 33], [55, 22, 11, 66, 33, 44], [55, 22, 11, 66, 44, 33], [55, 22, 33, 11, 44, 66], [55, 22, 33, 11, 66, 44], [55, 22, 33, 44, 11, 66], [55, 22, 33, 44, 66, 11], [55, 22, 33, 66, 11, 44], [55, 22, 33, 66, 44, 11], [55, 22, 44, 11, 33, 66], [55, 22, 44, 11, 66, 33], [55, 22, 44, 33, 11, 66], [55, 22, 44, 33, 66, 11], [55, 22, 44, 66, 11, 33], [55, 22, 44, 66, 33, 11], [55, 22, 66, 11, 33, 44], [55, 22, 66, 11, 44, 33], [55, 22, 66, 33, 11, 44], [55, 22, 66, 33, 44, 11], [55, 22, 66, 44, 11, 33], [55, 22, 66, 44, 33, 11], [55, 33, 11, 22, 44, 66], [55, 33, 11, 22, 66, 44], [55, 33, 11, 44, 22, 66], [55, 33, 11, 44, 66, 22], [55, 33, 11, 66, 22, 44], [55, 33, 11, 66, 44, 22], [55, 33, 22, 11, 44, 66], [55, 33, 22, 11, 66, 44], [55, 33, 22, 44, 11, 66], [55, 33, 22, 44, 66, 11], [55, 33, 22, 66, 11, 44], [55, 33, 22, 66, 44, 11], [55, 33, 44, 11, 22, 66], [55, 33, 44, 11, 66, 22], [55, 33, 44, 22, 11, 66], [55, 33, 44, 22, 66, 11], [55, 33, 44, 66, 11, 22], [55, 33, 44, 66, 22, 11], [55, 33, 66, 11, 22, 44], [55, 33, 66, 11, 44, 22], [55, 33, 66, 22, 11, 44], [55, 33, 66, 22, 44, 11], [55, 33, 66, 44, 11, 22], [55, 33, 66, 44, 22, 11], [55, 44, 11, 22, 33, 66], [55, 44, 11, 22, 66, 33], [55, 44, 11, 33, 22, 66], [55, 44, 11, 33, 66, 22], [55, 44, 11, 66, 22, 33], [55, 44, 11, 66, 33, 22], [55, 44, 22, 11, 33, 66], [55, 44, 22, 11, 66, 33], [55, 44, 22, 33, 11, 66], [55, 44, 22, 33, 66, 11], [55, 44, 22, 66, 11, 33], [55, 44, 22, 66, 33, 11], [55, 44, 33, 11, 22, 66], [55, 44, 33, 11, 66, 22], [55, 44, 33, 22, 11, 66], [55, 44, 33, 22, 66, 11], [55, 44, 33, 66, 11, 22], [55, 44, 33, 66, 22, 11], [55, 44, 66, 11, 22, 33], [55, 44, 66, 11, 33, 22], [55, 44, 66, 22, 11, 33], [55, 44, 66, 22, 33, 11], [55, 44, 66, 33, 11, 22], [55, 44, 66, 33, 22, 11], [55, 66, 11, 22, 33, 44], [55, 66, 11, 22, 44, 33], [55, 66, 11, 33, 22, 44], [55, 66, 11, 33, 44, 22], [55, 66, 11, 44, 22, 33], [55, 66, 11, 44, 33, 22], [55, 66, 22, 11, 33, 44], [55, 66, 22, 11, 44, 33], [55, 66, 22, 33, 11, 44], [55, 66, 22, 33, 44, 11], [55, 66, 22, 44, 11, 33], [55, 66, 22, 44, 33, 11], [55, 66, 33, 11, 22, 44], [55, 66, 33, 11, 44, 22], [55, 66, 33, 22, 11, 44], [55, 66, 33, 22, 44, 11], [55, 66, 33, 44, 11, 22], [55, 66, 33, 44, 22, 11], [55, 66, 44, 11, 22, 33], [55, 66, 44, 11, 33, 22], [55, 66, 44, 22, 11, 33], [55, 66, 44, 22, 33, 11], [55, 66, 44, 33, 11, 22], [55, 66, 44, 33, 22, 11], [66, 11, 22, 33, 44, 55], [66, 11, 22, 33, 55, 44], [66, 11, 22, 44, 33, 55], [66, 11, 22, 44, 55, 33], [66, 11, 22, 55, 33, 44], [66, 11, 22, 55, 44, 33], [66, 11, 33, 22, 44, 55], [66, 11, 33, 22, 55, 44], [66, 11, 33, 44, 22, 55], [66, 11, 33, 44, 55, 22], [66, 11, 33, 55, 22, 44], [66, 11, 33, 55, 44, 22], [66, 11, 44, 22, 33, 55], [66, 11, 44, 22, 55, 33], [66, 11, 44, 33, 22, 55], [66, 11, 44, 33, 55, 22], [66, 11, 44, 55, 22, 33], [66, 11, 44, 55, 33, 22], [66, 11, 55, 22, 33, 44], [66, 11, 55, 22, 44, 33], [66, 11, 55, 33, 22, 44], [66, 11, 55, 33, 44, 22], [66, 11, 55, 44, 22, 33], [66, 11, 55, 44, 33, 22], [66, 22, 11, 33, 44, 55], [66, 22, 11, 33, 55, 44], [66, 22, 11, 44, 33, 55], [66, 22, 11, 44, 55, 33], [66, 22, 11, 55, 33, 44], [66, 22, 11, 55, 44, 33], [66, 22, 33, 11, 44, 55], [66, 22, 33, 11, 55, 44], [66, 22, 33, 44, 11, 55], [66, 22, 33, 44, 55, 11], [66, 22, 33, 55, 11, 44], [66, 22, 33, 55, 44, 11], [66, 22, 44, 11, 33, 55], [66, 22, 44, 11, 55, 33], [66, 22, 44, 33, 11, 55], [66, 22, 44, 33, 55, 11], [66, 22, 44, 55, 11, 33], [66, 22, 44, 55, 33, 11], [66, 22, 55, 11, 33, 44], [66, 22, 55, 11, 44, 33], [66, 22, 55, 33, 11, 44], [66, 22, 55, 33, 44, 11], [66, 22, 55, 44, 11, 33], [66, 22, 55, 44, 33, 11], [66, 33, 11, 22, 44, 55], [66, 33, 11, 22, 55, 44], [66, 33, 11, 44, 22, 55], [66, 33, 11, 44, 55, 22], [66, 33, 11, 55, 22, 44], [66, 33, 11, 55, 44, 22], [66, 33, 22, 11, 44, 55], [66, 33, 22, 11, 55, 44], [66, 33, 22, 44, 11, 55], [66, 33, 22, 44, 55, 11], [66, 33, 22, 55, 11, 44], [66, 33, 22, 55, 44, 11], [66, 33, 44, 11, 22, 55], [66, 33, 44, 11, 55, 22], [66, 33, 44, 22, 11, 55], [66, 33, 44, 22, 55, 11], [66, 33, 44, 55, 11, 22], [66, 33, 44, 55, 22, 11], [66, 33, 55, 11, 22, 44], [66, 33, 55, 11, 44, 22], [66, 33, 55, 22, 11, 44], [66, 33, 55, 22, 44, 11], [66, 33, 55, 44, 11, 22], [66, 33, 55, 44, 22, 11], [66, 44, 11, 22, 33, 55], [66, 44, 11, 22, 55, 33], [66, 44, 11, 33, 22, 55], [66, 44, 11, 33, 55, 22], [66, 44, 11, 55, 22, 33], [66, 44, 11, 55, 33, 22], [66, 44, 22, 11, 33, 55], [66, 44, 22, 11, 55, 33], [66, 44, 22, 33, 11, 55], [66, 44, 22, 33, 55, 11], [66, 44, 22, 55, 11, 33], [66, 44, 22, 55, 33, 11], [66, 44, 33, 11, 22, 55], [66, 44, 33, 11, 55, 22], [66, 44, 33, 22, 11, 55], [66, 44, 33, 22, 55, 11], [66, 44, 33, 55, 11, 22], [66, 44, 33, 55, 22, 11], [66, 44, 55, 11, 22, 33], [66, 44, 55, 11, 33, 22], [66, 44, 55, 22, 11, 33], [66, 44, 55, 22, 33, 11], [66, 44, 55, 33, 11, 22], [66, 44, 55, 33, 22, 11], [66, 55, 11, 22, 33, 44], [66, 55, 11, 22, 44, 33], [66, 55, 11, 33, 22, 44], [66, 55, 11, 33, 44, 22], [66, 55, 11, 44, 22, 33], [66, 55, 11, 44, 33, 22], [66, 55, 22, 11, 33, 44], [66, 55, 22, 11, 44, 33], [66, 55, 22, 33, 11, 44], [66, 55, 22, 33, 44, 11], [66, 55, 22, 44, 11, 33], [66, 55, 22, 44, 33, 11], [66, 55, 33, 11, 22, 44], [66, 55, 33, 11, 44, 22], [66, 55, 33, 22, 11, 44], [66, 55, 33, 22, 44, 11], [66, 55, 33, 44, 11, 22], [66, 55, 33, 44, 22, 11], [66, 55, 44, 11, 22, 33], [66, 55, 44, 11, 33, 22], [66, 55, 44, 22, 11, 33], [66, 55, 44, 22, 33, 11], [66, 55, 44, 33, 11, 22], [66, 55, 44, 33, 22, 11]]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [100, 200, 300, -100, -200, -300]) == [[100, 200, 300, -100, -200, -300], [100, 200, 300, -100, -300, -200], [100, 200, 300, -200, -100, -300], [100, 200, 300, -200, -300, -100], [100, 200, 300, -300, -100, -200], [100, 200, 300, -300, -200, -100], [100, 200, -100, 300, -200, -300], [100, 200, -100, 300, -300, -200], [100, 200, -100, -200, 300, -300], [100, 200, -100, -200, -300, 300], [100, 200, -100, -300, 300, -200], [100, 200, -100, -300, -200, 300], [100, 200, -200, 300, -100, -300], [100, 200, -200, 300, -300, -100], [100, 200, -200, -100, 300, -300], [100, 200, -200, -100, -300, 300], [100, 200, -200, -300, 300, -100], [100, 200, -200, -300, -100, 300], [100, 200, -300, 300, -100, -200], [100, 200, -300, 300, -200, -100], [100, 200, -300, -100, 300, -200], [100, 200, -300, -100, -200, 300], [100, 200, -300, -200, 300, -100], [100, 200, -300, -200, -100, 300], [100, 300, 200, -100, -200, -300], [100, 300, 200, -100, -300, -200], [100, 300, 200, -200, -100, -300], [100, 300, 200, -200, -300, -100], [100, 300, 200, -300, -100, -200], [100, 300, 200, -300, -200, -100], [100, 300, -100, 200, -200, -300], [100, 300, -100, 200, -300, -200], [100, 300, -100, -200, 200, -300], [100, 300, -100, -200, -300, 200], [100, 300, -100, -300, 200, -200], [100, 300, -100, -300, -200, 200], [100, 300, -200, 200, -100, -300], [100, 300, -200, 200, -300, -100], [100, 300, -200, -100, 200, -300], [100, 300, -200, -100, -300, 200], [100, 300, -200, -300, 200, -100], [100, 300, -200, -300, -100, 200], [100, 300, -300, 200, -100, -200], [100, 300, -300, 200, -200, -100], [100, 300, -300, -100, 200, -200], [100, 300, -300, -100, -200, 200], [100, 300, -300, -200, 200, -100], [100, 300, -300, -200, -100, 200], [100, -100, 200, 300, -200, -300], [100, -100, 200, 300, -300, -200], [100, -100, 200, -200, 300, -300], [100, -100, 200, -200, -300, 300], [100, -100, 200, -300, 300, -200], [100, -100, 200, -300, -200, 300], [100, -100, 300, 200, -200, -300], [100, -100, 300, 200, -300, -200], [100, -100, 300, -200, 200, -300], [100, -100, 300, -200, -300, 200], [100, -100, 300, -300, 200, -200], [100, -100, 300, -300, -200, 200], [100, -100, -200, 200, 300, -300], [100, -100, -200, 200, -300, 300], [100, -100, -200, 300, 200, -300], [100, -100, -200, 300, -300, 200], [100, -100, -200, -300, 200, 300], [100, -100, -200, -300, 300, 200], [100, -100, -300, 200, 300, -200], [100, -100, -300, 200, -200, 300], [100, -100, -300, 300, 200, -200], [100, -100, -300, 300, -200, 200], [100, -100, -300, -200, 200, 300], [100, -100, -300, -200, 300, 200], [100, -200, 200, 300, -100, -300], [100, -200, 200, 300, -300, -100], [100, -200, 200, -100, 300, -300], [100, -200, 200, -100, -300, 300], [100, -200, 200, -300, 300, -100], [100, -200, 200, -300, -100, 300], [100, -200, 300, 200, -100, -300], [100, -200, 300, 200, -300, -100], [100, -200, 300, -100, 200, -300], [100, -200, 300, -100, -300, 200], [100, -200, 300, -300, 200, -100], [100, -200, 300, -300, -100, 200], [100, -200, -100, 200, 300, -300], [100, -200, -100, 200, -300, 300], [100, -200, -100, 300, 200, -300], [100, -200, -100, 300, -300, 200], [100, -200, -100, -300, 200, 300], [100, -200, -100, -300, 300, 200], [100, -200, -300, 200, 300, -100], [100, -200, -300, 200, -100, 300], [100, -200, -300, 300, 200, -100], [100, -200, -300, 300, -100, 200], [100, -200, -300, -100, 200, 300], [100, -200, -300, -100, 300, 200], [100, -300, 200, 300, -100, -200], [100, -300, 200, 300, -200, -100], [100, -300, 200, -100, 300, -200], [100, -300, 200, -100, -200, 300], [100, -300, 200, -200, 300, -100], [100, -300, 200, -200, -100, 300], [100, -300, 300, 200, -100, -200], [100, -300, 300, 200, -200, -100], [100, -300, 300, -100, 200, -200], [100, -300, 300, -100, -200, 200], [100, -300, 300, -200, 200, -100], [100, -300, 300, -200, -100, 200], [100, -300, -100, 200, 300, -200], [100, -300, -100, 200, -200, 300], [100, -300, -100, 300, 200, -200], [100, -300, -100, 300, -200, 200], [100, -300, -100, -200, 200, 300], [100, -300, -100, -200, 300, 200], [100, -300, -200, 200, 300, -100], [100, -300, -200, 200, -100, 300], [100, -300, -200, 300, 200, -100], [100, -300, -200, 300, -100, 200], [100, -300, -200, -100, 200, 300], [100, -300, -200, -100, 300, 200], [200, 100, 300, -100, -200, -300], [200, 100, 300, -100, -300, -200], [200, 100, 300, -200, -100, -300], [200, 100, 300, -200, -300, -100], [200, 100, 300, -300, -100, -200], [200, 100, 300, -300, -200, -100], [200, 100, -100, 300, -200, -300], [200, 100, -100, 300, -300, -200], [200, 100, -100, -200, 300, -300], [200, 100, -100, -200, -300, 300], [200, 100, -100, -300, 300, -200], [200, 100, -100, -300, -200, 300], [200, 100, -200, 300, -100, -300], [200, 100, -200, 300, -300, -100], [200, 100, -200, -100, 300, -300], [200, 100, -200, -100, -300, 300], [200, 100, -200, -300, 300, -100], [200, 100, -200, -300, -100, 300], [200, 100, -300, 300, -100, -200], [200, 100, -300, 300, -200, -100], [200, 100, -300, -100, 300, -200], [200, 100, -300, -100, -200, 300], [200, 100, -300, -200, 300, -100], [200, 100, -300, -200, -100, 300], [200, 300, 100, -100, -200, -300], [200, 300, 100, -100, -300, -200], [200, 300, 100, -200, -100, -300], [200, 300, 100, -200, -300, -100], [200, 300, 100, -300, -100, -200], [200, 300, 100, -300, -200, -100], [200, 300, -100, 100, -200, -300], [200, 300, -100, 100, -300, -200], [200, 300, -100, -200, 100, -300], [200, 300, -100, -200, -300, 100], [200, 300, -100, -300, 100, -200], [200, 300, -100, -300, -200, 100], [200, 300, -200, 100, -100, -300], [200, 300, -200, 100, -300, -100], [200, 300, -200, -100, 100, -300], [200, 300, -200, -100, -300, 100], [200, 300, -200, -300, 100, -100], [200, 300, -200, -300, -100, 100], [200, 300, -300, 100, -100, -200], [200, 300, -300, 100, -200, -100], [200, 300, -300, -100, 100, -200], [200, 300, -300, -100, -200, 100], [200, 300, -300, -200, 100, -100], [200, 300, -300, -200, -100, 100], [200, -100, 100, 300, -200, -300], [200, -100, 100, 300, -300, -200], [200, -100, 100, -200, 300, -300], [200, -100, 100, -200, -300, 300], [200, -100, 100, -300, 300, -200], [200, -100, 100, -300, -200, 300], [200, -100, 300, 100, -200, -300], [200, -100, 300, 100, -300, -200], [200, -100, 300, -200, 100, -300], [200, -100, 300, -200, -300, 100], [200, -100, 300, -300, 100, -200], [200, -100, 300, -300, -200, 100], [200, -100, -200, 100, 300, -300], [200, -100, -200, 100, -300, 300], [200, -100, -200, 300, 100, -300], [200, -100, -200, 300, -300, 100], [200, -100, -200, -300, 100, 300], [200, -100, -200, -300, 300, 100], [200, -100, -300, 100, 300, -200], [200, -100, -300, 100, -200, 300], [200, -100, -300, 300, 100, -200], [200, -100, -300, 300, -200, 100], [200, -100, -300, -200, 100, 300], [200, -100, -300, -200, 300, 100], [200, -200, 100, 300, -100, -300], [200, -200, 100, 300, -300, -100], [200, -200, 100, -100, 300, -300], [200, -200, 100, -100, -300, 300], [200, -200, 100, -300, 300, -100], [200, -200, 100, -300, -100, 300], [200, -200, 300, 100, -100, -300], [200, -200, 300, 100, -300, -100], [200, -200, 300, -100, 100, -300], [200, -200, 300, -100, -300, 100], [200, -200, 300, -300, 100, -100], [200, -200, 300, -300, -100, 100], [200, -200, -100, 100, 300, -300], [200, -200, -100, 100, -300, 300], [200, -200, -100, 300, 100, -300], [200, -200, -100, 300, -300, 100], [200, -200, -100, -300, 100, 300], [200, -200, -100, -300, 300, 100], [200, -200, -300, 100, 300, -100], [200, -200, -300, 100, -100, 300], [200, -200, -300, 300, 100, -100], [200, -200, -300, 300, -100, 100], [200, -200, -300, -100, 100, 300], [200, -200, -300, -100, 300, 100], [200, -300, 100, 300, -100, -200], [200, -300, 100, 300, -200, -100], [200, -300, 100, -100, 300, -200], [200, -300, 100, -100, -200, 300], [200, -300, 100, -200, 300, -100], [200, -300, 100, -200, -100, 300], [200, -300, 300, 100, -100, -200], [200, -300, 300, 100, -200, -100], [200, -300, 300, -100, 100, -200], [200, -300, 300, -100, -200, 100], [200, -300, 300, -200, 100, -100], [200, -300, 300, -200, -100, 100], [200, -300, -100, 100, 300, -200], [200, -300, -100, 100, -200, 300], [200, -300, -100, 300, 100, -200], [200, -300, -100, 300, -200, 100], [200, -300, -100, -200, 100, 300], [200, -300, -100, -200, 300, 100], [200, -300, -200, 100, 300, -100], [200, -300, -200, 100, -100, 300], [200, -300, -200, 300, 100, -100], [200, -300, -200, 300, -100, 100], [200, -300, -200, -100, 100, 300], [200, -300, -200, -100, 300, 100], [300, 100, 200, -100, -200, -300], [300, 100, 200, -100, -300, -200], [300, 100, 200, -200, -100, -300], [300, 100, 200, -200, -300, -100], [300, 100, 200, -300, -100, -200], [300, 100, 200, -300, -200, -100], [300, 100, -100, 200, -200, -300], [300, 100, -100, 200, -300, -200], [300, 100, -100, -200, 200, -300], [300, 100, -100, -200, -300, 200], [300, 100, -100, -300, 200, -200], [300, 100, -100, -300, -200, 200], [300, 100, -200, 200, -100, -300], [300, 100, -200, 200, -300, -100], [300, 100, -200, -100, 200, -300], [300, 100, -200, -100, -300, 200], [300, 100, -200, -300, 200, -100], [300, 100, -200, -300, -100, 200], [300, 100, -300, 200, -100, -200], [300, 100, -300, 200, -200, -100], [300, 100, -300, -100, 200, -200], [300, 100, -300, -100, -200, 200], [300, 100, -300, -200, 200, -100], [300, 100, -300, -200, -100, 200], [300, 200, 100, -100, -200, -300], [300, 200, 100, -100, -300, -200], [300, 200, 100, -200, -100, -300], [300, 200, 100, -200, -300, -100], [300, 200, 100, -300, -100, -200], [300, 200, 100, -300, -200, -100], [300, 200, -100, 100, -200, -300], [300, 200, -100, 100, -300, -200], [300, 200, -100, -200, 100, -300], [300, 200, -100, -200, -300, 100], [300, 200, -100, -300, 100, -200], [300, 200, -100, -300, -200, 100], [300, 200, -200, 100, -100, -300], [300, 200, -200, 100, -300, -100], [300, 200, -200, -100, 100, -300], [300, 200, -200, -100, -300, 100], [300, 200, -200, -300, 100, -100], [300, 200, -200, -300, -100, 100], [300, 200, -300, 100, -100, -200], [300, 200, -300, 100, -200, -100], [300, 200, -300, -100, 100, -200], [300, 200, -300, -100, -200, 100], [300, 200, -300, -200, 100, -100], [300, 200, -300, -200, -100, 100], [300, -100, 100, 200, -200, -300], [300, -100, 100, 200, -300, -200], [300, -100, 100, -200, 200, -300], [300, -100, 100, -200, -300, 200], [300, -100, 100, -300, 200, -200], [300, -100, 100, -300, -200, 200], [300, -100, 200, 100, -200, -300], [300, -100, 200, 100, -300, -200], [300, -100, 200, -200, 100, -300], [300, -100, 200, -200, -300, 100], [300, -100, 200, -300, 100, -200], [300, -100, 200, -300, -200, 100], [300, -100, -200, 100, 200, -300], [300, -100, -200, 100, -300, 200], [300, -100, -200, 200, 100, -300], [300, -100, -200, 200, -300, 100], [300, -100, -200, -300, 100, 200], [300, -100, -200, -300, 200, 100], [300, -100, -300, 100, 200, -200], [300, -100, -300, 100, -200, 200], [300, -100, -300, 200, 100, -200], [300, -100, -300, 200, -200, 100], [300, -100, -300, -200, 100, 200], [300, -100, -300, -200, 200, 100], [300, -200, 100, 200, -100, -300], [300, -200, 100, 200, -300, -100], [300, -200, 100, -100, 200, -300], [300, -200, 100, -100, -300, 200], [300, -200, 100, -300, 200, -100], [300, -200, 100, -300, -100, 200], [300, -200, 200, 100, -100, -300], [300, -200, 200, 100, -300, -100], [300, -200, 200, -100, 100, -300], [300, -200, 200, -100, -300, 100], [300, -200, 200, -300, 100, -100], [300, -200, 200, -300, -100, 100], [300, -200, -100, 100, 200, -300], [300, -200, -100, 100, -300, 200], [300, -200, -100, 200, 100, -300], [300, -200, -100, 200, -300, 100], [300, -200, -100, -300, 100, 200], [300, -200, -100, -300, 200, 100], [300, -200, -300, 100, 200, -100], [300, -200, -300, 100, -100, 200], [300, -200, -300, 200, 100, -100], [300, -200, -300, 200, -100, 100], [300, -200, -300, -100, 100, 200], [300, -200, -300, -100, 200, 100], [300, -300, 100, 200, -100, -200], [300, -300, 100, 200, -200, -100], [300, -300, 100, -100, 200, -200], [300, -300, 100, -100, -200, 200], [300, -300, 100, -200, 200, -100], [300, -300, 100, -200, -100, 200], [300, -300, 200, 100, -100, -200], [300, -300, 200, 100, -200, -100], [300, -300, 200, -100, 100, -200], [300, -300, 200, -100, -200, 100], [300, -300, 200, -200, 100, -100], [300, -300, 200, -200, -100, 100], [300, -300, -100, 100, 200, -200], [300, -300, -100, 100, -200, 200], [300, -300, -100, 200, 100, -200], [300, -300, -100, 200, -200, 100], [300, -300, -100, -200, 100, 200], [300, -300, -100, -200, 200, 100], [300, -300, -200, 100, 200, -100], [300, -300, -200, 100, -100, 200], [300, -300, -200, 200, 100, -100], [300, -300, -200, 200, -100, 100], [300, -300, -200, -100, 100, 200], [300, -300, -200, -100, 200, 100], [-100, 100, 200, 300, -200, -300], [-100, 100, 200, 300, -300, -200], [-100, 100, 200, -200, 300, -300], [-100, 100, 200, -200, -300, 300], [-100, 100, 200, -300, 300, -200], [-100, 100, 200, -300, -200, 300], [-100, 100, 300, 200, -200, -300], [-100, 100, 300, 200, -300, -200], [-100, 100, 300, -200, 200, -300], [-100, 100, 300, -200, -300, 200], [-100, 100, 300, -300, 200, -200], [-100, 100, 300, -300, -200, 200], [-100, 100, -200, 200, 300, -300], [-100, 100, -200, 200, -300, 300], [-100, 100, -200, 300, 200, -300], [-100, 100, -200, 300, -300, 200], [-100, 100, -200, -300, 200, 300], [-100, 100, -200, -300, 300, 200], [-100, 100, -300, 200, 300, -200], [-100, 100, -300, 200, -200, 300], [-100, 100, -300, 300, 200, -200], [-100, 100, -300, 300, -200, 200], [-100, 100, -300, -200, 200, 300], [-100, 100, -300, -200, 300, 200], [-100, 200, 100, 300, -200, -300], [-100, 200, 100, 300, -300, -200], [-100, 200, 100, -200, 300, -300], [-100, 200, 100, -200, -300, 300], [-100, 200, 100, -300, 300, -200], [-100, 200, 100, -300, -200, 300], [-100, 200, 300, 100, -200, -300], [-100, 200, 300, 100, -300, -200], [-100, 200, 300, -200, 100, -300], [-100, 200, 300, -200, -300, 100], [-100, 200, 300, -300, 100, -200], [-100, 200, 300, -300, -200, 100], [-100, 200, -200, 100, 300, -300], [-100, 200, -200, 100, -300, 300], [-100, 200, -200, 300, 100, -300], [-100, 200, -200, 300, -300, 100], [-100, 200, -200, -300, 100, 300], [-100, 200, -200, -300, 300, 100], [-100, 200, -300, 100, 300, -200], [-100, 200, -300, 100, -200, 300], [-100, 200, -300, 300, 100, -200], [-100, 200, -300, 300, -200, 100], [-100, 200, -300, -200, 100, 300], [-100, 200, -300, -200, 300, 100], [-100, 300, 100, 200, -200, -300], [-100, 300, 100, 200, -300, -200], [-100, 300, 100, -200, 200, -300], [-100, 300, 100, -200, -300, 200], [-100, 300, 100, -300, 200, -200], [-100, 300, 100, -300, -200, 200], [-100, 300, 200, 100, -200, -300], [-100, 300, 200, 100, -300, -200], [-100, 300, 200, -200, 100, -300], [-100, 300, 200, -200, -300, 100], [-100, 300, 200, -300, 100, -200], [-100, 300, 200, -300, -200, 100], [-100, 300, -200, 100, 200, -300], [-100, 300, -200, 100, -300, 200], [-100, 300, -200, 200, 100, -300], [-100, 300, -200, 200, -300, 100], [-100, 300, -200, -300, 100, 200], [-100, 300, -200, -300, 200, 100], [-100, 300, -300, 100, 200, -200], [-100, 300, -300, 100, -200, 200], [-100, 300, -300, 200, 100, -200], [-100, 300, -300, 200, -200, 100], [-100, 300, -300, -200, 100, 200], [-100, 300, -300, -200, 200, 100], [-100, -200, 100, 200, 300, -300], [-100, -200, 100, 200, -300, 300], [-100, -200, 100, 300, 200, -300], [-100, -200, 100, 300, -300, 200], [-100, -200, 100, -300, 200, 300], [-100, -200, 100, -300, 300, 200], [-100, -200, 200, 100, 300, -300], [-100, -200, 200, 100, -300, 300], [-100, -200, 200, 300, 100, -300], [-100, -200, 200, 300, -300, 100], [-100, -200, 200, -300, 100, 300], [-100, -200, 200, -300, 300, 100], [-100, -200, 300, 100, 200, -300], [-100, -200, 300, 100, -300, 200], [-100, -200, 300, 200, 100, -300], [-100, -200, 300, 200, -300, 100], [-100, -200, 300, -300, 100, 200], [-100, -200, 300, -300, 200, 100], [-100, -200, -300, 100, 200, 300], [-100, -200, -300, 100, 300, 200], [-100, -200, -300, 200, 100, 300], [-100, -200, -300, 200, 300, 100], [-100, -200, -300, 300, 100, 200], [-100, -200, -300, 300, 200, 100], [-100, -300, 100, 200, 300, -200], [-100, -300, 100, 200, -200, 300], [-100, -300, 100, 300, 200, -200], [-100, -300, 100, 300, -200, 200], [-100, -300, 100, -200, 200, 300], [-100, -300, 100, -200, 300, 200], [-100, -300, 200, 100, 300, -200], [-100, -300, 200, 100, -200, 300], [-100, -300, 200, 300, 100, -200], [-100, -300, 200, 300, -200, 100], [-100, -300, 200, -200, 100, 300], [-100, -300, 200, -200, 300, 100], [-100, -300, 300, 100, 200, -200], [-100, -300, 300, 100, -200, 200], [-100, -300, 300, 200, 100, -200], [-100, -300, 300, 200, -200, 100], [-100, -300, 300, -200, 100, 200], [-100, -300, 300, -200, 200, 100], [-100, -300, -200, 100, 200, 300], [-100, -300, -200, 100, 300, 200], [-100, -300, -200, 200, 100, 300], [-100, -300, -200, 200, 300, 100], [-100, -300, -200, 300, 100, 200], [-100, -300, -200, 300, 200, 100], [-200, 100, 200, 300, -100, -300], [-200, 100, 200, 300, -300, -100], [-200, 100, 200, -100, 300, -300], [-200, 100, 200, -100, -300, 300], [-200, 100, 200, -300, 300, -100], [-200, 100, 200, -300, -100, 300], [-200, 100, 300, 200, -100, -300], [-200, 100, 300, 200, -300, -100], [-200, 100, 300, -100, 200, -300], [-200, 100, 300, -100, -300, 200], [-200, 100, 300, -300, 200, -100], [-200, 100, 300, -300, -100, 200], [-200, 100, -100, 200, 300, -300], [-200, 100, -100, 200, -300, 300], [-200, 100, -100, 300, 200, -300], [-200, 100, -100, 300, -300, 200], [-200, 100, -100, -300, 200, 300], [-200, 100, -100, -300, 300, 200], [-200, 100, -300, 200, 300, -100], [-200, 100, -300, 200, -100, 300], [-200, 100, -300, 300, 200, -100], [-200, 100, -300, 300, -100, 200], [-200, 100, -300, -100, 200, 300], [-200, 100, -300, -100, 300, 200], [-200, 200, 100, 300, -100, -300], [-200, 200, 100, 300, -300, -100], [-200, 200, 100, -100, 300, -300], [-200, 200, 100, -100, -300, 300], [-200, 200, 100, -300, 300, -100], [-200, 200, 100, -300, -100, 300], [-200, 200, 300, 100, -100, -300], [-200, 200, 300, 100, -300, -100], [-200, 200, 300, -100, 100, -300], [-200, 200, 300, -100, -300, 100], [-200, 200, 300, -300, 100, -100], [-200, 200, 300, -300, -100, 100], [-200, 200, -100, 100, 300, -300], [-200, 200, -100, 100, -300, 300], [-200, 200, -100, 300, 100, -300], [-200, 200, -100, 300, -300, 100], [-200, 200, -100, -300, 100, 300], [-200, 200, -100, -300, 300, 100], [-200, 200, -300, 100, 300, -100], [-200, 200, -300, 100, -100, 300], [-200, 200, -300, 300, 100, -100], [-200, 200, -300, 300, -100, 100], [-200, 200, -300, -100, 100, 300], [-200, 200, -300, -100, 300, 100], [-200, 300, 100, 200, -100, -300], [-200, 300, 100, 200, -300, -100], [-200, 300, 100, -100, 200, -300], [-200, 300, 100, -100, -300, 200], [-200, 300, 100, -300, 200, -100], [-200, 300, 100, -300, -100, 200], [-200, 300, 200, 100, -100, -300], [-200, 300, 200, 100, -300, -100], [-200, 300, 200, -100, 100, -300], [-200, 300, 200, -100, -300, 100], [-200, 300, 200, -300, 100, -100], [-200, 300, 200, -300, -100, 100], [-200, 300, -100, 100, 200, -300], [-200, 300, -100, 100, -300, 200], [-200, 300, -100, 200, 100, -300], [-200, 300, -100, 200, -300, 100], [-200, 300, -100, -300, 100, 200], [-200, 300, -100, -300, 200, 100], [-200, 300, -300, 100, 200, -100], [-200, 300, -300, 100, -100, 200], [-200, 300, -300, 200, 100, -100], [-200, 300, -300, 200, -100, 100], [-200, 300, -300, -100, 100, 200], [-200, 300, -300, -100, 200, 100], [-200, -100, 100, 200, 300, -300], [-200, -100, 100, 200, -300, 300], [-200, -100, 100, 300, 200, -300], [-200, -100, 100, 300, -300, 200], [-200, -100, 100, -300, 200, 300], [-200, -100, 100, -300, 300, 200], [-200, -100, 200, 100, 300, -300], [-200, -100, 200, 100, -300, 300], [-200, -100, 200, 300, 100, -300], [-200, -100, 200, 300, -300, 100], [-200, -100, 200, -300, 100, 300], [-200, -100, 200, -300, 300, 100], [-200, -100, 300, 100, 200, -300], [-200, -100, 300, 100, -300, 200], [-200, -100, 300, 200, 100, -300], [-200, -100, 300, 200, -300, 100], [-200, -100, 300, -300, 100, 200], [-200, -100, 300, -300, 200, 100], [-200, -100, -300, 100, 200, 300], [-200, -100, -300, 100, 300, 200], [-200, -100, -300, 200, 100, 300], [-200, -100, -300, 200, 300, 100], [-200, -100, -300, 300, 100, 200], [-200, -100, -300, 300, 200, 100], [-200, -300, 100, 200, 300, -100], [-200, -300, 100, 200, -100, 300], [-200, -300, 100, 300, 200, -100], [-200, -300, 100, 300, -100, 200], [-200, -300, 100, -100, 200, 300], [-200, -300, 100, -100, 300, 200], [-200, -300, 200, 100, 300, -100], [-200, -300, 200, 100, -100, 300], [-200, -300, 200, 300, 100, -100], [-200, -300, 200, 300, -100, 100], [-200, -300, 200, -100, 100, 300], [-200, -300, 200, -100, 300, 100], [-200, -300, 300, 100, 200, -100], [-200, -300, 300, 100, -100, 200], [-200, -300, 300, 200, 100, -100], [-200, -300, 300, 200, -100, 100], [-200, -300, 300, -100, 100, 200], [-200, -300, 300, -100, 200, 100], [-200, -300, -100, 100, 200, 300], [-200, -300, -100, 100, 300, 200], [-200, -300, -100, 200, 100, 300], [-200, -300, -100, 200, 300, 100], [-200, -300, -100, 300, 100, 200], [-200, -300, -100, 300, 200, 100], [-300, 100, 200, 300, -100, -200], [-300, 100, 200, 300, -200, -100], [-300, 100, 200, -100, 300, -200], [-300, 100, 200, -100, -200, 300], [-300, 100, 200, -200, 300, -100], [-300, 100, 200, -200, -100, 300], [-300, 100, 300, 200, -100, -200], [-300, 100, 300, 200, -200, -100], [-300, 100, 300, -100, 200, -200], [-300, 100, 300, -100, -200, 200], [-300, 100, 300, -200, 200, -100], [-300, 100, 300, -200, -100, 200], [-300, 100, -100, 200, 300, -200], [-300, 100, -100, 200, -200, 300], [-300, 100, -100, 300, 200, -200], [-300, 100, -100, 300, -200, 200], [-300, 100, -100, -200, 200, 300], [-300, 100, -100, -200, 300, 200], [-300, 100, -200, 200, 300, -100], [-300, 100, -200, 200, -100, 300], [-300, 100, -200, 300, 200, -100], [-300, 100, -200, 300, -100, 200], [-300, 100, -200, -100, 200, 300], [-300, 100, -200, -100, 300, 200], [-300, 200, 100, 300, -100, -200], [-300, 200, 100, 300, -200, -100], [-300, 200, 100, -100, 300, -200], [-300, 200, 100, -100, -200, 300], [-300, 200, 100, -200, 300, -100], [-300, 200, 100, -200, -100, 300], [-300, 200, 300, 100, -100, -200], [-300, 200, 300, 100, -200, -100], [-300, 200, 300, -100, 100, -200], [-300, 200, 300, -100, -200, 100], [-300, 200, 300, -200, 100, -100], [-300, 200, 300, -200, -100, 100], [-300, 200, -100, 100, 300, -200], [-300, 200, -100, 100, -200, 300], [-300, 200, -100, 300, 100, -200], [-300, 200, -100, 300, -200, 100], [-300, 200, -100, -200, 100, 300], [-300, 200, -100, -200, 300, 100], [-300, 200, -200, 100, 300, -100], [-300, 200, -200, 100, -100, 300], [-300, 200, -200, 300, 100, -100], [-300, 200, -200, 300, -100, 100], [-300, 200, -200, -100, 100, 300], [-300, 200, -200, -100, 300, 100], [-300, 300, 100, 200, -100, -200], [-300, 300, 100, 200, -200, -100], [-300, 300, 100, -100, 200, -200], [-300, 300, 100, -100, -200, 200], [-300, 300, 100, -200, 200, -100], [-300, 300, 100, -200, -100, 200], [-300, 300, 200, 100, -100, -200], [-300, 300, 200, 100, -200, -100], [-300, 300, 200, -100, 100, -200], [-300, 300, 200, -100, -200, 100], [-300, 300, 200, -200, 100, -100], [-300, 300, 200, -200, -100, 100], [-300, 300, -100, 100, 200, -200], [-300, 300, -100, 100, -200, 200], [-300, 300, -100, 200, 100, -200], [-300, 300, -100, 200, -200, 100], [-300, 300, -100, -200, 100, 200], [-300, 300, -100, -200, 200, 100], [-300, 300, -200, 100, 200, -100], [-300, 300, -200, 100, -100, 200], [-300, 300, -200, 200, 100, -100], [-300, 300, -200, 200, -100, 100], [-300, 300, -200, -100, 100, 200], [-300, 300, -200, -100, 200, 100], [-300, -100, 100, 200, 300, -200], [-300, -100, 100, 200, -200, 300], [-300, -100, 100, 300, 200, -200], [-300, -100, 100, 300, -200, 200], [-300, -100, 100, -200, 200, 300], [-300, -100, 100, -200, 300, 200], [-300, -100, 200, 100, 300, -200], [-300, -100, 200, 100, -200, 300], [-300, -100, 200, 300, 100, -200], [-300, -100, 200, 300, -200, 100], [-300, -100, 200, -200, 100, 300], [-300, -100, 200, -200, 300, 100], [-300, -100, 300, 100, 200, -200], [-300, -100, 300, 100, -200, 200], [-300, -100, 300, 200, 100, -200], [-300, -100, 300, 200, -200, 100], [-300, -100, 300, -200, 100, 200], [-300, -100, 300, -200, 200, 100], [-300, -100, -200, 100, 200, 300], [-300, -100, -200, 100, 300, 200], [-300, -100, -200, 200, 100, 300], [-300, -100, -200, 200, 300, 100], [-300, -100, -200, 300, 100, 200], [-300, -100, -200, 300, 200, 100], [-300, -200, 100, 200, 300, -100], [-300, -200, 100, 200, -100, 300], [-300, -200, 100, 300, 200, -100], [-300, -200, 100, 300, -100, 200], [-300, -200, 100, -100, 200, 300], [-300, -200, 100, -100, 300, 200], [-300, -200, 200, 100, 300, -100], [-300, -200, 200, 100, -100, 300], [-300, -200, 200, 300, 100, -100], [-300, -200, 200, 300, -100, 100], [-300, -200, 200, -100, 100, 300], [-300, -200, 200, -100, 300, 100], [-300, -200, 300, 100, 200, -100], [-300, -200, 300, 100, -100, 200], [-300, -200, 300, 200, 100, -100], [-300, -200, 300, 200, -100, 100], [-300, -200, 300, -100, 100, 200], [-300, -200, 300, -100, 200, 100], [-300, -200, -100, 100, 200, 300], [-300, -200, -100, 100, 300, 200], [-300, -200, -100, 200, 100, 300], [-300, -200, -100, 200, 300, 100], [-300, -200, -100, 300, 100, 200], [-300, -200, -100, 300, 200, 100]]\n assert 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 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 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().permute", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> permute(vector& nums) {", "container": "Solution", "callable": "permute", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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\n \nConstraints:\n\n1 <= nums.length <= 8\n-10 <= nums[i] <= 10\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 candidate(nums = [1, 1, 1, 1]) == [[1, 1, 1, 1]]\n assert candidate(nums = [1, 1, 1]) == [[1, 1, 1]]\n assert 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 candidate(nums = [3, 3, 0, 3]) == [[0, 3, 3, 3], [3, 0, 3, 3], [3, 3, 0, 3], [3, 3, 3, 0]]\n assert 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 candidate(nums = [1]) == [[1]]\n assert candidate(nums = [4, 4, 4]) == [[4, 4, 4]]\n assert candidate(nums = [1, 2, 2]) == [[1, 2, 2], [2, 1, 2], [2, 2, 1]]\n assert candidate(nums = [1, 1, 1, 2]) == [[1, 1, 1, 2], [1, 1, 2, 1], [1, 2, 1, 1], [2, 1, 1, 1]]\n assert candidate(nums = [1, 1, 2]) == [[1, 1, 2], [1, 2, 1], [2, 1, 1]]\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7]) == [[7, 7, 7, 7, 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]]\n assert 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 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 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 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 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 candidate(nums = [0, 1, 1]) == [[0, 1, 1], [1, 0, 1], [1, 1, 0]]\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, 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 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 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 candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10]) == [[10, 10, 10, 10, 10, 10, 10, 10]]\n assert candidate(nums = [6, 6, 6, 6, 6, 6, 6]) == [[6, 6, 6, 6, 6, 6, 6]]\n assert 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 candidate(nums = [6, 6, 6, 6, 6, 6, 6, 6]) == [[6, 6, 6, 6, 6, 6, 6, 6]]\n assert 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 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 candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8]) == [[8, 8, 8, 8, 8, 8, 8, 8]]\n assert 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 candidate(nums = [4, 4, 4, 4, 4]) == [[4, 4, 4, 4, 4]]\n assert 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 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 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 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 candidate(nums = [5, 5, 5, 5]) == [[5, 5, 5, 5]]\n assert 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 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 candidate(nums = [4, 4, 4, 4]) == [[4, 4, 4, 4]]\n assert 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 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 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 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 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 candidate(nums = [4, 4, 4, 4]) == [[4, 4, 4, 4]]\n assert 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 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 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 candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8]) == [[8, 8, 8, 8, 8, 8, 8, 8]]\n assert 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 candidate(nums = [-5, -5, -5, -5, -5]) == [[-5, -5, -5, -5, -5]]\n assert 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 candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == [[1, 1, 1, 1, 1, 1, 1, 1]]\n assert 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 candidate(nums = [10, 20, 10, 20, 30, 30, 30]) == [[10, 10, 20, 20, 30, 30, 30], [10, 10, 20, 30, 20, 30, 30], [10, 10, 20, 30, 30, 20, 30], [10, 10, 20, 30, 30, 30, 20], [10, 10, 30, 20, 20, 30, 30], [10, 10, 30, 20, 30, 20, 30], [10, 10, 30, 20, 30, 30, 20], [10, 10, 30, 30, 20, 20, 30], [10, 10, 30, 30, 20, 30, 20], [10, 10, 30, 30, 30, 20, 20], [10, 20, 10, 20, 30, 30, 30], [10, 20, 10, 30, 20, 30, 30], [10, 20, 10, 30, 30, 20, 30], [10, 20, 10, 30, 30, 30, 20], [10, 20, 20, 10, 30, 30, 30], [10, 20, 20, 30, 10, 30, 30], [10, 20, 20, 30, 30, 10, 30], [10, 20, 20, 30, 30, 30, 10], [10, 20, 30, 10, 20, 30, 30], [10, 20, 30, 10, 30, 20, 30], [10, 20, 30, 10, 30, 30, 20], [10, 20, 30, 20, 10, 30, 30], [10, 20, 30, 20, 30, 10, 30], [10, 20, 30, 20, 30, 30, 10], [10, 20, 30, 30, 10, 20, 30], [10, 20, 30, 30, 10, 30, 20], [10, 20, 30, 30, 20, 10, 30], [10, 20, 30, 30, 20, 30, 10], [10, 20, 30, 30, 30, 10, 20], [10, 20, 30, 30, 30, 20, 10], [10, 30, 10, 20, 20, 30, 30], [10, 30, 10, 20, 30, 20, 30], [10, 30, 10, 20, 30, 30, 20], [10, 30, 10, 30, 20, 20, 30], [10, 30, 10, 30, 20, 30, 20], [10, 30, 10, 30, 30, 20, 20], [10, 30, 20, 10, 20, 30, 30], [10, 30, 20, 10, 30, 20, 30], [10, 30, 20, 10, 30, 30, 20], [10, 30, 20, 20, 10, 30, 30], [10, 30, 20, 20, 30, 10, 30], [10, 30, 20, 20, 30, 30, 10], [10, 30, 20, 30, 10, 20, 30], [10, 30, 20, 30, 10, 30, 20], [10, 30, 20, 30, 20, 10, 30], [10, 30, 20, 30, 20, 30, 10], [10, 30, 20, 30, 30, 10, 20], [10, 30, 20, 30, 30, 20, 10], [10, 30, 30, 10, 20, 20, 30], [10, 30, 30, 10, 20, 30, 20], [10, 30, 30, 10, 30, 20, 20], [10, 30, 30, 20, 10, 20, 30], [10, 30, 30, 20, 10, 30, 20], [10, 30, 30, 20, 20, 10, 30], [10, 30, 30, 20, 20, 30, 10], [10, 30, 30, 20, 30, 10, 20], [10, 30, 30, 20, 30, 20, 10], [10, 30, 30, 30, 10, 20, 20], [10, 30, 30, 30, 20, 10, 20], [10, 30, 30, 30, 20, 20, 10], [20, 10, 10, 20, 30, 30, 30], [20, 10, 10, 30, 20, 30, 30], [20, 10, 10, 30, 30, 20, 30], [20, 10, 10, 30, 30, 30, 20], [20, 10, 20, 10, 30, 30, 30], [20, 10, 20, 30, 10, 30, 30], [20, 10, 20, 30, 30, 10, 30], [20, 10, 20, 30, 30, 30, 10], [20, 10, 30, 10, 20, 30, 30], [20, 10, 30, 10, 30, 20, 30], [20, 10, 30, 10, 30, 30, 20], [20, 10, 30, 20, 10, 30, 30], [20, 10, 30, 20, 30, 10, 30], [20, 10, 30, 20, 30, 30, 10], [20, 10, 30, 30, 10, 20, 30], [20, 10, 30, 30, 10, 30, 20], [20, 10, 30, 30, 20, 10, 30], [20, 10, 30, 30, 20, 30, 10], [20, 10, 30, 30, 30, 10, 20], [20, 10, 30, 30, 30, 20, 10], [20, 20, 10, 10, 30, 30, 30], [20, 20, 10, 30, 10, 30, 30], [20, 20, 10, 30, 30, 10, 30], [20, 20, 10, 30, 30, 30, 10], [20, 20, 30, 10, 10, 30, 30], [20, 20, 30, 10, 30, 10, 30], [20, 20, 30, 10, 30, 30, 10], [20, 20, 30, 30, 10, 10, 30], [20, 20, 30, 30, 10, 30, 10], [20, 20, 30, 30, 30, 10, 10], [20, 30, 10, 10, 20, 30, 30], [20, 30, 10, 10, 30, 20, 30], [20, 30, 10, 10, 30, 30, 20], [20, 30, 10, 20, 10, 30, 30], [20, 30, 10, 20, 30, 10, 30], [20, 30, 10, 20, 30, 30, 10], [20, 30, 10, 30, 10, 20, 30], [20, 30, 10, 30, 10, 30, 20], [20, 30, 10, 30, 20, 10, 30], [20, 30, 10, 30, 20, 30, 10], [20, 30, 10, 30, 30, 10, 20], [20, 30, 10, 30, 30, 20, 10], [20, 30, 20, 10, 10, 30, 30], [20, 30, 20, 10, 30, 10, 30], [20, 30, 20, 10, 30, 30, 10], [20, 30, 20, 30, 10, 10, 30], [20, 30, 20, 30, 10, 30, 10], [20, 30, 20, 30, 30, 10, 10], [20, 30, 30, 10, 10, 20, 30], [20, 30, 30, 10, 10, 30, 20], [20, 30, 30, 10, 20, 10, 30], [20, 30, 30, 10, 20, 30, 10], [20, 30, 30, 10, 30, 10, 20], [20, 30, 30, 10, 30, 20, 10], [20, 30, 30, 20, 10, 10, 30], [20, 30, 30, 20, 10, 30, 10], [20, 30, 30, 20, 30, 10, 10], [20, 30, 30, 30, 10, 10, 20], [20, 30, 30, 30, 10, 20, 10], [20, 30, 30, 30, 20, 10, 10], [30, 10, 10, 20, 20, 30, 30], [30, 10, 10, 20, 30, 20, 30], [30, 10, 10, 20, 30, 30, 20], [30, 10, 10, 30, 20, 20, 30], [30, 10, 10, 30, 20, 30, 20], [30, 10, 10, 30, 30, 20, 20], [30, 10, 20, 10, 20, 30, 30], [30, 10, 20, 10, 30, 20, 30], [30, 10, 20, 10, 30, 30, 20], [30, 10, 20, 20, 10, 30, 30], [30, 10, 20, 20, 30, 10, 30], [30, 10, 20, 20, 30, 30, 10], [30, 10, 20, 30, 10, 20, 30], [30, 10, 20, 30, 10, 30, 20], [30, 10, 20, 30, 20, 10, 30], [30, 10, 20, 30, 20, 30, 10], [30, 10, 20, 30, 30, 10, 20], [30, 10, 20, 30, 30, 20, 10], [30, 10, 30, 10, 20, 20, 30], [30, 10, 30, 10, 20, 30, 20], [30, 10, 30, 10, 30, 20, 20], [30, 10, 30, 20, 10, 20, 30], [30, 10, 30, 20, 10, 30, 20], [30, 10, 30, 20, 20, 10, 30], [30, 10, 30, 20, 20, 30, 10], [30, 10, 30, 20, 30, 10, 20], [30, 10, 30, 20, 30, 20, 10], [30, 10, 30, 30, 10, 20, 20], [30, 10, 30, 30, 20, 10, 20], [30, 10, 30, 30, 20, 20, 10], [30, 20, 10, 10, 20, 30, 30], [30, 20, 10, 10, 30, 20, 30], [30, 20, 10, 10, 30, 30, 20], [30, 20, 10, 20, 10, 30, 30], [30, 20, 10, 20, 30, 10, 30], [30, 20, 10, 20, 30, 30, 10], [30, 20, 10, 30, 10, 20, 30], [30, 20, 10, 30, 10, 30, 20], [30, 20, 10, 30, 20, 10, 30], [30, 20, 10, 30, 20, 30, 10], [30, 20, 10, 30, 30, 10, 20], [30, 20, 10, 30, 30, 20, 10], [30, 20, 20, 10, 10, 30, 30], [30, 20, 20, 10, 30, 10, 30], [30, 20, 20, 10, 30, 30, 10], [30, 20, 20, 30, 10, 10, 30], [30, 20, 20, 30, 10, 30, 10], [30, 20, 20, 30, 30, 10, 10], [30, 20, 30, 10, 10, 20, 30], [30, 20, 30, 10, 10, 30, 20], [30, 20, 30, 10, 20, 10, 30], [30, 20, 30, 10, 20, 30, 10], [30, 20, 30, 10, 30, 10, 20], [30, 20, 30, 10, 30, 20, 10], [30, 20, 30, 20, 10, 10, 30], [30, 20, 30, 20, 10, 30, 10], [30, 20, 30, 20, 30, 10, 10], [30, 20, 30, 30, 10, 10, 20], [30, 20, 30, 30, 10, 20, 10], [30, 20, 30, 30, 20, 10, 10], [30, 30, 10, 10, 20, 20, 30], [30, 30, 10, 10, 20, 30, 20], [30, 30, 10, 10, 30, 20, 20], [30, 30, 10, 20, 10, 20, 30], [30, 30, 10, 20, 10, 30, 20], [30, 30, 10, 20, 20, 10, 30], [30, 30, 10, 20, 20, 30, 10], [30, 30, 10, 20, 30, 10, 20], [30, 30, 10, 20, 30, 20, 10], [30, 30, 10, 30, 10, 20, 20], [30, 30, 10, 30, 20, 10, 20], [30, 30, 10, 30, 20, 20, 10], [30, 30, 20, 10, 10, 20, 30], [30, 30, 20, 10, 10, 30, 20], [30, 30, 20, 10, 20, 10, 30], [30, 30, 20, 10, 20, 30, 10], [30, 30, 20, 10, 30, 10, 20], [30, 30, 20, 10, 30, 20, 10], [30, 30, 20, 20, 10, 10, 30], [30, 30, 20, 20, 10, 30, 10], [30, 30, 20, 20, 30, 10, 10], [30, 30, 20, 30, 10, 10, 20], [30, 30, 20, 30, 10, 20, 10], [30, 30, 20, 30, 20, 10, 10], [30, 30, 30, 10, 10, 20, 20], [30, 30, 30, 10, 20, 10, 20], [30, 30, 30, 10, 20, 20, 10], [30, 30, 30, 20, 10, 10, 20], [30, 30, 30, 20, 10, 20, 10], [30, 30, 30, 20, 20, 10, 10]]\n assert 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 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 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 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 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 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 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 candidate(nums = [5, 5, 5, 5, 5]) == [[5, 5, 5, 5, 5]]\n assert 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 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 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 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 candidate(nums = [5, 5, 5, 5, 5, 5]) == [[5, 5, 5, 5, 5, 5]]\n assert 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 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 candidate(nums = [5, 5, 5, 5, 5, 5, 5]) == [[5, 5, 5, 5, 5, 5, 5]]\n assert 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().permuteUnique", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> permuteUnique(vector& nums) {", "container": "Solution", "callable": "permuteUnique", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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\nThere is no string in strs that can be rearranged to form \"bat\".\nThe strings \"nat\" and \"tan\" are anagrams as they can be rearranged to form each other.\nThe strings \"ate\", \"eat\", and \"tea\" are anagrams as they can be rearranged to form each other.\n\n\nExample 2:\n\nInput: strs = [\"\"]\nOutput: [[\"\"]]\n\nExample 3:\n\nInput: strs = [\"a\"]\nOutput: [[\"a\"]]\n\n \nConstraints:\n\n1 <= strs.length <= 104\n0 <= strs[i].length <= 100\nstrs[i] consists of lowercase English letters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(strs = ['a', 'b', 'c', 'd', 'e']) == [['a'], ['b'], ['c'], ['d'], ['e']]\n assert candidate(strs = ['abc', 'bca', 'cab', 'xyz', 'zyx', 'yxz']) == [['abc', 'bca', 'cab'], ['xyz', 'zyx', 'yxz']]\n assert candidate(strs = ['abc', 'def', 'ghi', 'jkl']) == [['abc'], ['def'], ['ghi'], ['jkl']]\n assert candidate(strs = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']) == [['abc', 'acb', 'bac', 'bca', 'cab', 'cba']]\n assert candidate(strs = ['eat', 'tea', 'tan', 'ate', 'nat', 'bat']) == [['eat', 'tea', 'ate'], ['tan', 'nat'], ['bat']]\n assert candidate(strs = ['listen', 'silent', 'enlist']) == [['listen', 'silent', 'enlist']]\n assert candidate(strs = ['a']) == [['a']]\n assert candidate(strs = ['aabb', 'bbaa', 'abab', 'baab', 'baba', 'abba', 'aaaa', 'bbbb']) == [['aabb', 'bbaa', 'abab', 'baab', 'baba', 'abba'], ['aaaa'], ['bbbb']]\n assert candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl']) == [['listen', 'silent', 'enlist'], ['google', 'gooegl']]\n assert candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art']) == [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art']]\n assert candidate(strs = ['abc', 'bac', 'cab', 'bca', 'acb', 'cba']) == [['abc', 'bac', 'cab', 'bca', 'acb', 'cba']]\n assert candidate(strs = ['dormitory', 'dirtyroom', 'conversation', 'voicesranton', 'listen', 'silent']) == [['dormitory', 'dirtyroom'], ['conversation', 'voicesranton'], ['listen', 'silent']]\n assert candidate(strs = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']) == [['a'], ['b'], ['c'], ['d'], ['e'], ['f'], ['g'], ['h'], ['i'], ['j']]\n assert candidate(strs = ['hello', 'world', 'hold', 'olelh', 'dlrow', 'owrld']) == [['hello', 'olelh'], ['world', 'dlrow', 'owrld'], ['hold']]\n assert candidate(strs = ['dormitory', 'dirtyroom', 'conversation', 'voicesranton', 'schoolmaster', 'theclassroom']) == [['dormitory', 'dirtyroom'], ['conversation', 'voicesranton'], ['schoolmaster', 'theclassroom']]\n assert candidate(strs = ['hello', 'bello', 'olelh', 'world', 'dlrow', 'dlorw', 'droll']) == [['hello', 'olelh'], ['bello'], ['world', 'dlrow', 'dlorw'], ['droll']]\n assert candidate(strs = ['']) == [['']]\n assert candidate(strs = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'cba', 'bca', 'bac', 'acb', 'cab', 'abc']) == [['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba'], ['cba', 'bca', 'bac', 'acb', 'cab', 'abc']]\n assert 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 candidate(strs = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl', 'qrstuvwxyzaabcdefghijklmnop', 'hgfedcbazyxwvutsrqponmlkjijklmnopqrstuvwxyzabcde']) == [['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl'], ['qrstuvwxyzaabcdefghijklmnop'], ['hgfedcbazyxwvutsrqponmlkjijklmnopqrstuvwxyzabcde']]\n assert 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 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 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 candidate(strs = ['dusty', 'study', 'night', 'thing', 'delta', 'tigon', 'state', 'taste', 'date', 'rated']) == [['dusty', 'study'], ['night', 'thing'], ['delta'], ['tigon'], ['state', 'taste'], ['date'], ['rated']]\n assert candidate(strs = ['aabbcc', 'abcabc', 'baccab', 'acbbac', 'cabbaa', 'aabbcc', 'abcabc']) == [['aabbcc', 'abcabc', 'baccab', 'acbbac', 'aabbcc', 'abcabc'], ['cabbaa']]\n assert 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 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 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 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 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 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 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 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 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 candidate(strs = ['python', 'typhon', 'hypton', 'pythno', 'ypthon', 'thypno', 'hypnot', 'hypnotize', 'notphyno', 'nothpyin', ' hypnot', 'hypnotic', 'hypnothize', 'hypnothise', 'notthpyin', 'pythonic', 'typhonian', 'pythongod', 'hypno', 'hypnosis', 'hypnotherapy', 'hypnagogia', 'hypnoid']) == [['python', 'typhon', 'hypton', 'pythno', 'ypthon', 'thypno', 'hypnot'], ['hypnotize'], ['notphyno'], ['nothpyin'], [' hypnot'], ['hypnotic', 'pythonic'], ['hypnothize'], ['hypnothise'], ['notthpyin'], ['typhonian'], ['pythongod'], ['hypno'], ['hypnosis'], ['hypnotherapy'], ['hypnagogia'], ['hypnoid']]\n assert candidate(strs = ['abcde', 'edcba', 'bcdea', 'decba', 'bacde', 'cabde', 'eabcd', 'acbde', 'dbcea', 'adbce']) == [['abcde', 'edcba', 'bcdea', 'decba', 'bacde', 'cabde', 'eabcd', 'acbde', 'dbcea', 'adbce']]\n assert 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 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 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 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 candidate(strs = ['abcd', 'dcba', 'abcd', 'cdab', 'bdac', 'cabd', 'bacd', 'abcd', 'dcba', 'abcd']) == [['abcd', 'dcba', 'abcd', 'cdab', 'bdac', 'cabd', 'bacd', 'abcd', 'dcba', 'abcd']]\n assert 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 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 candidate(strs = ['anagram', 'nagaram', 'margana', 'anagrama', 'anagram', 'anagram', 'granama', 'nagaramm']) == [['anagram', 'nagaram', 'margana', 'anagram', 'anagram', 'granama'], ['anagrama'], ['nagaramm']]\n assert 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 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 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 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 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 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 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 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 candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl', 'inlets', 'banana', 'anabna', 'xyz', 'zyx']) == [['listen', 'silent', 'enlist', 'inlets'], ['google', 'gooegl'], ['banana', 'anabna'], ['xyz', 'zyx']]\n assert candidate(strs = ['abcd', 'dcba', 'abcd', 'abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'abcd']) == [['abcd', 'dcba', 'abcd', 'abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'abcd']]\n assert 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 candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art', 'elbow', 'below']) == [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art'], ['elbow', 'below']]\n assert candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl', 'abc', 'cab', 'bac']) == [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['abc', 'cab', 'bac']]\n assert 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 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 candidate(strs = ['hello', 'ohell', 'lohel', 'ollhe', 'elohl', '', '', '', 'a', 'a', 'a', 'a', 'a']) == [['hello', 'ohell', 'lohel', 'ollhe', 'elohl'], ['', '', ''], ['a', 'a', 'a', 'a', 'a']]\n assert 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 candidate(strs = ['aabbcc', 'abcabc', 'aabbbc', 'aacbbc', 'aabcc', 'abcacb', 'abacbc', 'bbaacc', 'abccba', 'bcaacb']) == [['aabbcc', 'abcabc', 'aacbbc', 'abcacb', 'abacbc', 'bbaacc', 'abccba', 'bcaacb'], ['aabbbc'], ['aabcc']]\n assert candidate(strs = ['listen', 'silent', 'enlist', 'google', 'gooegl', 'inlets', 'banana']) == [['listen', 'silent', 'enlist', 'inlets'], ['google', 'gooegl'], ['banana']]\n assert candidate(strs = ['abcde', 'edcba', 'bcdea', 'decab', 'cabed', 'edbac', 'baced', 'deabc', 'ebadc', 'acbed']) == [['abcde', 'edcba', 'bcdea', 'decab', 'cabed', 'edbac', 'baced', 'deabc', 'ebadc', 'acbed']]\n assert 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 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 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 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 candidate(strs = ['dusty', 'study', 'night', 'thing', 'sight', 'fling', 'tying', 'sting', 'dusty']) == [['dusty', 'study', 'dusty'], ['night', 'thing'], ['sight'], ['fling'], ['tying'], ['sting']]\n"}, "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().groupAnagrams", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> groupAnagrams(vector& strs) {", "container": "Solution", "callable": "groupAnagrams", "parameters": [{"name": "strs", "type": "vector&"}], "return_type": "vector>", "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., xn).\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/22 = 1/4 = 0.25\n\n \nConstraints:\n\n-100.0 < x < 100.0\n-231 <= n <= 231-1\nn is an integer.\nEither x is not zero or n > 0.\n-104 <= xn <= 104\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = 3.0,n = 0) == 1\n assert candidate(x = 10.0,n = -3) == 0.001\n assert candidate(x = 5.0,n = 1) == 5.0\n assert candidate(x = 2.0,n = -2) == 0.25\n assert candidate(x = 0.1,n = 2) == 0.010000000000000002\n assert candidate(x = 1.5,n = 5) == 7.59375\n assert candidate(x = 2.1,n = 3) == 9.261000000000001\n assert candidate(x = 2.0,n = -1) == 0.5\n assert candidate(x = 0.5,n = 4) == 0.0625\n assert candidate(x = 2.0,n = 10) == 1024.0\n assert candidate(x = 0.99,n = 100) == 0.3660323412732289\n assert candidate(x = 1.0,n = -1000000) == 1.0\n assert candidate(x = 2.5,n = -5) == 0.01024\n assert candidate(x = 10.0,n = 5) == 100000.0\n assert candidate(x = -1.0,n = 2147483647) == -1.0\n assert candidate(x = -2.0,n = 12) == 4096.0\n assert candidate(x = 1.23456,n = 789) == 1.5963462056225718e+72\n assert candidate(x = 3.14,n = 7) == 3009.5913952479914\n assert candidate(x = -2.0,n = -3) == -0.125\n assert candidate(x = -1.0,n = 1000001) == -1.0\n assert candidate(x = 0.1,n = 10) == 1.0000000000000011e-10\n assert candidate(x = 0.1,n = 20) == 1.0000000000000022e-20\n assert candidate(x = 0.99999,n = -10000) == 1.1051714706643663\n assert candidate(x = -1.5,n = 2) == 2.25\n assert candidate(x = -0.5,n = 4) == 0.0625\n assert candidate(x = -0.5,n = 6) == 0.015625\n assert candidate(x = -1.0,n = -2147483648) == 1.0\n assert candidate(x = 9.87654,n = -321) == 0.0\n assert candidate(x = 2.5,n = 100) == 6.223015277861143e+39\n assert candidate(x = 10.0,n = 10) == 10000000000.0\n assert candidate(x = 1.0,n = 1000000) == 1.0\n assert candidate(x = 5.0,n = -3) == 0.008\n assert candidate(x = 1.0,n = -2147483648) == 1.0\n assert candidate(x = 1.0,n = 0) == 1\n assert candidate(x = 10.0,n = 2147483647) == inf\n assert candidate(x = 99.99999,n = 10) == 9.999990000004497e+19\n assert candidate(x = -0.5,n = 8) == 0.00390625\n assert candidate(x = 2.0,n = -1000) == 9.332636185032189e-302\n assert candidate(x = 2.0,n = 0) == 1\n assert candidate(x = 2.5,n = -3) == 0.064\n assert candidate(x = 10.0,n = 1000) == inf\n assert candidate(x = 0.99999,n = 1000) == 0.990049784246398\n assert candidate(x = -3.0,n = 4) == 81.0\n assert candidate(x = -3.0,n = -3) == -0.037037037037037035\n assert candidate(x = 0.1,n = -5) == 99999.99999999994\n assert candidate(x = 2.5,n = 20) == 90949470.17729282\n assert candidate(x = 1.00001,n = -1000000) == 4.5402199796741926e-05\n assert candidate(x = 0.1,n = -3) == 999.9999999999998\n assert candidate(x = -0.5,n = 3) == -0.125\n assert candidate(x = 1.73205,n = 12) == 728.9959212545092\n assert candidate(x = 10.0,n = 1) == 10.0\n assert candidate(x = -2.0,n = 4) == 16.0\n assert candidate(x = 0.1,n = 100) == 1.0000000000000108e-100\n assert candidate(x = 2.0,n = 2147483647) == inf\n assert candidate(x = 1e-05,n = 10000) == 0.0\n assert candidate(x = 0.0,n = 0) == 1\n assert candidate(x = 0.5,n = -5) == 32.0\n assert candidate(x = 3.0,n = 20) == 3486784401.0\n assert candidate(x = 3.0,n = 15) == 14348907.0\n assert candidate(x = 1.00001,n = 1000) == 1.0100501165820832\n assert candidate(x = 1.5,n = 2147483646) == inf\n assert candidate(x = 10.0,n = 100) == 1.0000000000000002e+100\n assert candidate(x = 2.0,n = -2147483648) == 0.0\n assert candidate(x = 1e-05,n = 1000000) == 0.0\n assert candidate(x = -1.0,n = 2147483646) == 1.0\n assert candidate(x = 1.5,n = 20) == 3325.256730079651\n assert candidate(x = -2.0,n = 3) == -8.0\n assert candidate(x = 1.2,n = -5) == 0.4018775720164609\n assert candidate(x = 0.1,n = -10) == 9999999999.999989\n assert candidate(x = 1.0,n = -1000) == 1.0\n assert candidate(x = 2.0,n = 100000000) == inf\n assert candidate(x = -2.0,n = 11) == -2048.0\n assert candidate(x = 3.5,n = 15) == 144884079.28292847\n assert candidate(x = 0.5,n = -10) == 1024.0\n assert candidate(x = 1.41421,n = 50) == 33550206.11671562\n assert candidate(x = 3.0,n = 13) == 1594323.0\n assert candidate(x = 0.99999,n = 1000000) == 4.539765980992338e-05\n assert candidate(x = 5.0,n = 0) == 1\n assert candidate(x = 2.0,n = -10) == 0.0009765625\n assert candidate(x = 1.0,n = -5) == 1.0\n assert candidate(x = 1.00001,n = -1000) == 0.9900498832512471\n assert candidate(x = -1.5,n = 5) == -7.59375\n assert candidate(x = 1.0,n = 2147483647) == 1.0\n"}, "metadata": {"canonical_parameter_names": ["x", "n"], "leetcode_dataset_entry_point": "Solution().myPow", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "double myPow(double x, int n) {", "container": "Solution", "callable": "myPow", "parameters": [{"name": "x", "type": "double"}, {"name": "n", "type": "int"}], "return_type": "double", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 51, "task_id": "n-queens", "difficulty": "Hard", "problem_description": "The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.\nGiven an integer n, return all distinct solutions to the n-queens puzzle. You may return the answer in any order.\nEach solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space, respectively.\n \nExample 1:\n\n\nInput: n = 4\nOutput: [[\".Q..\",\"...Q\",\"Q...\",\"..Q.\"],[\"..Q.\",\"Q...\",\"...Q\",\".Q..\"]]\nExplanation: There exist two distinct solutions to the 4-queens puzzle as shown above\n\nExample 2:\n\nInput: n = 1\nOutput: [[\"Q\"]]\n\n \nConstraints:\n\n1 <= n <= 9\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == [['Q.......', '....Q...', '.......Q', '.....Q..', '..Q.....', '......Q.', '.Q......', '...Q....'], ['Q.......', '.....Q..', '.......Q', '..Q.....', '......Q.', '...Q....', '.Q......', '....Q...'], ['Q.......', '......Q.', '...Q....', '.....Q..', '.......Q', '.Q......', '....Q...', '..Q.....'], ['Q.......', '......Q.', '....Q...', '.......Q', '.Q......', '...Q....', '.....Q..', '..Q.....'], ['.Q......', '...Q....', '.....Q..', '.......Q', '..Q.....', 'Q.......', '......Q.', '....Q...'], ['.Q......', '....Q...', '......Q.', 'Q.......', '..Q.....', '.......Q', '.....Q..', '...Q....'], ['.Q......', '....Q...', '......Q.', '...Q....', 'Q.......', '.......Q', '.....Q..', '..Q.....'], ['.Q......', '.....Q..', 'Q.......', '......Q.', '...Q....', '.......Q', '..Q.....', '....Q...'], ['.Q......', '.....Q..', '.......Q', '..Q.....', 'Q.......', '...Q....', '......Q.', '....Q...'], ['.Q......', '......Q.', '..Q.....', '.....Q..', '.......Q', '....Q...', 'Q.......', '...Q....'], ['.Q......', '......Q.', '....Q...', '.......Q', 'Q.......', '...Q....', '.....Q..', '..Q.....'], ['.Q......', '.......Q', '.....Q..', 'Q.......', '..Q.....', '....Q...', '......Q.', '...Q....'], ['..Q.....', 'Q.......', '......Q.', '....Q...', '.......Q', '.Q......', '...Q....', '.....Q..'], ['..Q.....', '....Q...', '.Q......', '.......Q', 'Q.......', '......Q.', '...Q....', '.....Q..'], ['..Q.....', '....Q...', '.Q......', '.......Q', '.....Q..', '...Q....', '......Q.', 'Q.......'], ['..Q.....', '....Q...', '......Q.', 'Q.......', '...Q....', '.Q......', '.......Q', '.....Q..'], ['..Q.....', '....Q...', '.......Q', '...Q....', 'Q.......', '......Q.', '.Q......', '.....Q..'], ['..Q.....', '.....Q..', '.Q......', '....Q...', '.......Q', 'Q.......', '......Q.', '...Q....'], ['..Q.....', '.....Q..', '.Q......', '......Q.', 'Q.......', '...Q....', '.......Q', '....Q...'], ['..Q.....', '.....Q..', '.Q......', '......Q.', '....Q...', 'Q.......', '.......Q', '...Q....'], ['..Q.....', '.....Q..', '...Q....', 'Q.......', '.......Q', '....Q...', '......Q.', '.Q......'], ['..Q.....', '.....Q..', '...Q....', '.Q......', '.......Q', '....Q...', '......Q.', 'Q.......'], ['..Q.....', '.....Q..', '.......Q', 'Q.......', '...Q....', '......Q.', '....Q...', '.Q......'], ['..Q.....', '.....Q..', '.......Q', 'Q.......', '....Q...', '......Q.', '.Q......', '...Q....'], ['..Q.....', '.....Q..', '.......Q', '.Q......', '...Q....', 'Q.......', '......Q.', '....Q...'], ['..Q.....', '......Q.', '.Q......', '.......Q', '....Q...', 'Q.......', '...Q....', '.....Q..'], ['..Q.....', '......Q.', '.Q......', '.......Q', '.....Q..', '...Q....', 'Q.......', '....Q...'], ['..Q.....', '.......Q', '...Q....', '......Q.', 'Q.......', '.....Q..', '.Q......', '....Q...'], ['...Q....', 'Q.......', '....Q...', '.......Q', '.Q......', '......Q.', '..Q.....', '.....Q..'], ['...Q....', 'Q.......', '....Q...', '.......Q', '.....Q..', '..Q.....', '......Q.', '.Q......'], ['...Q....', '.Q......', '....Q...', '.......Q', '.....Q..', 'Q.......', '..Q.....', '......Q.'], ['...Q....', '.Q......', '......Q.', '..Q.....', '.....Q..', '.......Q', 'Q.......', '....Q...'], ['...Q....', '.Q......', '......Q.', '..Q.....', '.....Q..', '.......Q', '....Q...', 'Q.......'], ['...Q....', '.Q......', '......Q.', '....Q...', 'Q.......', '.......Q', '.....Q..', '..Q.....'], ['...Q....', '.Q......', '.......Q', '....Q...', '......Q.', 'Q.......', '..Q.....', '.....Q..'], ['...Q....', '.Q......', '.......Q', '.....Q..', 'Q.......', '..Q.....', '....Q...', '......Q.'], ['...Q....', '.....Q..', 'Q.......', '....Q...', '.Q......', '.......Q', '..Q.....', '......Q.'], ['...Q....', '.....Q..', '.......Q', '.Q......', '......Q.', 'Q.......', '..Q.....', '....Q...'], ['...Q....', '.....Q..', '.......Q', '..Q.....', 'Q.......', '......Q.', '....Q...', '.Q......'], ['...Q....', '......Q.', 'Q.......', '.......Q', '....Q...', '.Q......', '.....Q..', '..Q.....'], ['...Q....', '......Q.', '..Q.....', '.......Q', '.Q......', '....Q...', 'Q.......', '.....Q..'], ['...Q....', '......Q.', '....Q...', '.Q......', '.....Q..', 'Q.......', '..Q.....', '.......Q'], ['...Q....', '......Q.', '....Q...', '..Q.....', 'Q.......', '.....Q..', '.......Q', '.Q......'], ['...Q....', '.......Q', 'Q.......', '..Q.....', '.....Q..', '.Q......', '......Q.', '....Q...'], ['...Q....', '.......Q', 'Q.......', '....Q...', '......Q.', '.Q......', '.....Q..', '..Q.....'], ['...Q....', '.......Q', '....Q...', '..Q.....', 'Q.......', '......Q.', '.Q......', '.....Q..'], ['....Q...', 'Q.......', '...Q....', '.....Q..', '.......Q', '.Q......', '......Q.', '..Q.....'], ['....Q...', 'Q.......', '.......Q', '...Q....', '.Q......', '......Q.', '..Q.....', '.....Q..'], ['....Q...', 'Q.......', '.......Q', '.....Q..', '..Q.....', '......Q.', '.Q......', '...Q....'], ['....Q...', '.Q......', '...Q....', '.....Q..', '.......Q', '..Q.....', 'Q.......', '......Q.'], ['....Q...', '.Q......', '...Q....', '......Q.', '..Q.....', '.......Q', '.....Q..', 'Q.......'], ['....Q...', '.Q......', '.....Q..', 'Q.......', '......Q.', '...Q....', '.......Q', '..Q.....'], ['....Q...', '.Q......', '.......Q', 'Q.......', '...Q....', '......Q.', '..Q.....', '.....Q..'], ['....Q...', '..Q.....', 'Q.......', '.....Q..', '.......Q', '.Q......', '...Q....', '......Q.'], ['....Q...', '..Q.....', 'Q.......', '......Q.', '.Q......', '.......Q', '.....Q..', '...Q....'], ['....Q...', '..Q.....', '.......Q', '...Q....', '......Q.', 'Q.......', '.....Q..', '.Q......'], ['....Q...', '......Q.', 'Q.......', '..Q.....', '.......Q', '.....Q..', '...Q....', '.Q......'], ['....Q...', '......Q.', 'Q.......', '...Q....', '.Q......', '.......Q', '.....Q..', '..Q.....'], ['....Q...', '......Q.', '.Q......', '...Q....', '.......Q', 'Q.......', '..Q.....', '.....Q..'], ['....Q...', '......Q.', '.Q......', '.....Q..', '..Q.....', 'Q.......', '...Q....', '.......Q'], ['....Q...', '......Q.', '.Q......', '.....Q..', '..Q.....', 'Q.......', '.......Q', '...Q....'], ['....Q...', '......Q.', '...Q....', 'Q.......', '..Q.....', '.......Q', '.....Q..', '.Q......'], ['....Q...', '.......Q', '...Q....', 'Q.......', '..Q.....', '.....Q..', '.Q......', '......Q.'], ['....Q...', '.......Q', '...Q....', 'Q.......', '......Q.', '.Q......', '.....Q..', '..Q.....'], ['.....Q..', 'Q.......', '....Q...', '.Q......', '.......Q', '..Q.....', '......Q.', '...Q....'], ['.....Q..', '.Q......', '......Q.', 'Q.......', '..Q.....', '....Q...', '.......Q', '...Q....'], ['.....Q..', '.Q......', '......Q.', 'Q.......', '...Q....', '.......Q', '....Q...', '..Q.....'], ['.....Q..', '..Q.....', 'Q.......', '......Q.', '....Q...', '.......Q', '.Q......', '...Q....'], ['.....Q..', '..Q.....', 'Q.......', '.......Q', '...Q....', '.Q......', '......Q.', '....Q...'], ['.....Q..', '..Q.....', 'Q.......', '.......Q', '....Q...', '.Q......', '...Q....', '......Q.'], ['.....Q..', '..Q.....', '....Q...', '......Q.', 'Q.......', '...Q....', '.Q......', '.......Q'], ['.....Q..', '..Q.....', '....Q...', '.......Q', 'Q.......', '...Q....', '.Q......', '......Q.'], ['.....Q..', '..Q.....', '......Q.', '.Q......', '...Q....', '.......Q', 'Q.......', '....Q...'], ['.....Q..', '..Q.....', '......Q.', '.Q......', '.......Q', '....Q...', 'Q.......', '...Q....'], ['.....Q..', '..Q.....', '......Q.', '...Q....', 'Q.......', '.......Q', '.Q......', '....Q...'], ['.....Q..', '...Q....', 'Q.......', '....Q...', '.......Q', '.Q......', '......Q.', '..Q.....'], ['.....Q..', '...Q....', '.Q......', '.......Q', '....Q...', '......Q.', 'Q.......', '..Q.....'], ['.....Q..', '...Q....', '......Q.', 'Q.......', '..Q.....', '....Q...', '.Q......', '.......Q'], ['.....Q..', '...Q....', '......Q.', 'Q.......', '.......Q', '.Q......', '....Q...', '..Q.....'], ['.....Q..', '.......Q', '.Q......', '...Q....', 'Q.......', '......Q.', '....Q...', '..Q.....'], ['......Q.', 'Q.......', '..Q.....', '.......Q', '.....Q..', '...Q....', '.Q......', '....Q...'], ['......Q.', '.Q......', '...Q....', 'Q.......', '.......Q', '....Q...', '..Q.....', '.....Q..'], ['......Q.', '.Q......', '.....Q..', '..Q.....', 'Q.......', '...Q....', '.......Q', '....Q...'], ['......Q.', '..Q.....', 'Q.......', '.....Q..', '.......Q', '....Q...', '.Q......', '...Q....'], ['......Q.', '..Q.....', '.......Q', '.Q......', '....Q...', 'Q.......', '.....Q..', '...Q....'], ['......Q.', '...Q....', '.Q......', '....Q...', '.......Q', 'Q.......', '..Q.....', '.....Q..'], ['......Q.', '...Q....', '.Q......', '.......Q', '.....Q..', 'Q.......', '..Q.....', '....Q...'], ['......Q.', '....Q...', '..Q.....', 'Q.......', '.....Q..', '.......Q', '.Q......', '...Q....'], ['.......Q', '.Q......', '...Q....', 'Q.......', '......Q.', '....Q...', '..Q.....', '.....Q..'], ['.......Q', '.Q......', '....Q...', '..Q.....', 'Q.......', '......Q.', '...Q....', '.....Q..'], ['.......Q', '..Q.....', 'Q.......', '.....Q..', '.Q......', '....Q...', '......Q.', '...Q....'], ['.......Q', '...Q....', 'Q.......', '..Q.....', '.....Q..', '.Q......', '......Q.', '....Q...']]\n assert candidate(n = 3) == []\n assert candidate(n = 4) == [['.Q..', '...Q', 'Q...', '..Q.'], ['..Q.', 'Q...', '...Q', '.Q..']]\n assert candidate(n = 6) == [['.Q....', '...Q..', '.....Q', 'Q.....', '..Q...', '....Q.'], ['..Q...', '.....Q', '.Q....', '....Q.', 'Q.....', '...Q..'], ['...Q..', 'Q.....', '....Q.', '.Q....', '.....Q', '..Q...'], ['....Q.', '..Q...', 'Q.....', '.....Q', '...Q..', '.Q....']]\n assert candidate(n = 2) == []\n assert candidate(n = 1) == [['Q']]\n assert candidate(n = 7) == [['Q......', '..Q....', '....Q..', '......Q', '.Q.....', '...Q...', '.....Q.'], ['Q......', '...Q...', '......Q', '..Q....', '.....Q.', '.Q.....', '....Q..'], ['Q......', '....Q..', '.Q.....', '.....Q.', '..Q....', '......Q', '...Q...'], ['Q......', '.....Q.', '...Q...', '.Q.....', '......Q', '....Q..', '..Q....'], ['.Q.....', '...Q...', 'Q......', '......Q', '....Q..', '..Q....', '.....Q.'], ['.Q.....', '...Q...', '.....Q.', 'Q......', '..Q....', '....Q..', '......Q'], ['.Q.....', '....Q..', 'Q......', '...Q...', '......Q', '..Q....', '.....Q.'], ['.Q.....', '....Q..', '..Q....', 'Q......', '......Q', '...Q...', '.....Q.'], ['.Q.....', '....Q..', '......Q', '...Q...', 'Q......', '..Q....', '.....Q.'], ['.Q.....', '.....Q.', '..Q....', '......Q', '...Q...', 'Q......', '....Q..'], ['.Q.....', '......Q', '....Q..', '..Q....', 'Q......', '.....Q.', '...Q...'], ['..Q....', 'Q......', '.....Q.', '.Q.....', '....Q..', '......Q', '...Q...'], ['..Q....', 'Q......', '.....Q.', '...Q...', '.Q.....', '......Q', '....Q..'], ['..Q....', '....Q..', '......Q', '.Q.....', '...Q...', '.....Q.', 'Q......'], ['..Q....', '.....Q.', '.Q.....', '....Q..', 'Q......', '...Q...', '......Q'], ['..Q....', '......Q', '.Q.....', '...Q...', '.....Q.', 'Q......', '....Q..'], ['..Q....', '......Q', '...Q...', 'Q......', '....Q..', '.Q.....', '.....Q.'], ['...Q...', 'Q......', '..Q....', '.....Q.', '.Q.....', '......Q', '....Q..'], ['...Q...', 'Q......', '....Q..', '.Q.....', '.....Q.', '..Q....', '......Q'], ['...Q...', '.Q.....', '......Q', '....Q..', '..Q....', 'Q......', '.....Q.'], ['...Q...', '.....Q.', 'Q......', '..Q....', '....Q..', '......Q', '.Q.....'], ['...Q...', '......Q', '..Q....', '.....Q.', '.Q.....', '....Q..', 'Q......'], ['...Q...', '......Q', '....Q..', '.Q.....', '.....Q.', 'Q......', '..Q....'], ['....Q..', 'Q......', '...Q...', '......Q', '..Q....', '.....Q.', '.Q.....'], ['....Q..', 'Q......', '.....Q.', '...Q...', '.Q.....', '......Q', '..Q....'], ['....Q..', '.Q.....', '.....Q.', '..Q....', '......Q', '...Q...', 'Q......'], ['....Q..', '..Q....', 'Q......', '.....Q.', '...Q...', '.Q.....', '......Q'], ['....Q..', '......Q', '.Q.....', '...Q...', '.....Q.', 'Q......', '..Q....'], ['....Q..', '......Q', '.Q.....', '.....Q.', '..Q....', 'Q......', '...Q...'], ['.....Q.', 'Q......', '..Q....', '....Q..', '......Q', '.Q.....', '...Q...'], ['.....Q.', '.Q.....', '....Q..', 'Q......', '...Q...', '......Q', '..Q....'], ['.....Q.', '..Q....', 'Q......', '...Q...', '......Q', '....Q..', '.Q.....'], ['.....Q.', '..Q....', '....Q..', '......Q', 'Q......', '...Q...', '.Q.....'], ['.....Q.', '..Q....', '......Q', '...Q...', 'Q......', '....Q..', '.Q.....'], ['.....Q.', '...Q...', '.Q.....', '......Q', '....Q..', '..Q....', 'Q......'], ['.....Q.', '...Q...', '......Q', 'Q......', '..Q....', '....Q..', '.Q.....'], ['......Q', '.Q.....', '...Q...', '.....Q.', 'Q......', '..Q....', '....Q..'], ['......Q', '..Q....', '.....Q.', '.Q.....', '....Q..', 'Q......', '...Q...'], ['......Q', '...Q...', 'Q......', '....Q..', '.Q.....', '.....Q.', '..Q....'], ['......Q', '....Q..', '..Q....', 'Q......', '.....Q.', '...Q...', '.Q.....']]\n assert candidate(n = 5) == [['Q....', '..Q..', '....Q', '.Q...', '...Q.'], ['Q....', '...Q.', '.Q...', '....Q', '..Q..'], ['.Q...', '...Q.', 'Q....', '..Q..', '....Q'], ['.Q...', '....Q', '..Q..', 'Q....', '...Q.'], ['..Q..', 'Q....', '...Q.', '.Q...', '....Q'], ['..Q..', '....Q', '.Q...', '...Q.', 'Q....'], ['...Q.', 'Q....', '..Q..', '....Q', '.Q...'], ['...Q.', '.Q...', '....Q', '..Q..', 'Q....'], ['....Q', '.Q...', '...Q.', 'Q....', '..Q..'], ['....Q', '..Q..', 'Q....', '...Q.', '.Q...']]\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().solveNQueens", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> solveNQueens(int n) {", "container": "Solution", "callable": "solveNQueens", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 52, "task_id": "n-queens-ii", "difficulty": "Hard", "problem_description": "The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.\nGiven an integer n, return the number of distinct solutions to the n-queens puzzle.\n \nExample 1:\n\n\nInput: n = 4\nOutput: 2\nExplanation: There are two distinct solutions to the 4-queens puzzle as shown.\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\n \nConstraints:\n\n1 <= n <= 9\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == 92\n assert candidate(n = 3) == 0\n assert candidate(n = 4) == 2\n assert candidate(n = 9) == 352\n assert candidate(n = 6) == 4\n assert candidate(n = 2) == 0\n assert candidate(n = 1) == 1\n assert candidate(n = 7) == 40\n assert candidate(n = 5) == 10\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().totalNQueens", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int totalNQueens(int n) {", "container": "Solution", "callable": "totalNQueens", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= nums.length <= 105\n-104 <= nums[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxSubArray", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxSubArray(vector& nums) {", "container": "Solution", "callable": "maxSubArray", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\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\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\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= m, n <= 10\n-100 <= matrix[i][j] <= 100\n\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], [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, 11, 12, 24, 36, 48, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 37, 25, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 35, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 26, 27, 28, 29, 30, 31, 32, 33, 34]\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]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 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, 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, 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]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 89, 78, 67, 56, 45, 34, 23, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 32, 43, 54, 65, 76, 87, 98, 97, 96, 95, 94, 93, 92, 91, 90, 79, 68, 57, 46, 35, 24, 25, 26, 27, 28, 29, 30, 31, 42, 53, 64, 75, 86, 85, 84, 83, 82, 81, 80, 69, 58, 47, 36, 37, 38, 39, 40, 41, 52, 63, 74, 73, 72, 71, 70, 59, 48, 49, 50, 51, 62, 61, 60]\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 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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n"}, "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().spiralOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector spiralOrder(vector>& matrix) {", "container": "Solution", "callable": "spiralOrder", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 104\n0 <= nums[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().canJump", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canJump(vector& nums) {", "container": "Solution", "callable": "canJump", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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] = [starti, endi], 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\n \nConstraints:\n\n1 <= intervals.length <= 104\nintervals[i].length == 2\n0 <= starti <= endi <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().merge", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> merge(vector>& intervals) {", "container": "Solution", "callable": "merge", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "vector>", "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] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. You are also given an interval newInterval = [start, end] that represents the start and end of another interval.\nInsert newInterval into intervals such that intervals is still sorted in ascending order by starti and intervals still does not have any overlapping intervals (merge overlapping intervals if necessary).\nReturn intervals after the insertion.\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\n \nConstraints:\n\n0 <= intervals.length <= 104\nintervals[i].length == 2\n0 <= starti <= endi <= 105\nintervals is sorted by starti in ascending order.\nnewInterval.length == 2\n0 <= start <= end <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["intervals", "newInterval"], "leetcode_dataset_entry_point": "Solution().insert", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> insert(vector>& intervals, vector& newInterval) {", "container": "Solution", "callable": "insert", "parameters": [{"name": "intervals", "type": "vector>&"}, {"name": "newInterval", "type": "vector&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 58, "task_id": "length-of-last-word", "difficulty": "Easy", "problem_description": "Given a string s consisting of words and spaces, return the length of the last word in the string.\nA word is a maximal substring consisting of non-space characters only.\n \nExample 1:\n\nInput: s = \"Hello World\"\nOutput: 5\nExplanation: The last word is \"World\" with length 5.\n\nExample 2:\n\nInput: s = \" fly me to the moon \"\nOutput: 4\nExplanation: The last word is \"moon\" with length 4.\n\nExample 3:\n\nInput: s = \"luffy is still joyboy\"\nOutput: 6\nExplanation: The last word is \"joyboy\" with length 6.\n\n \nConstraints:\n\n1 <= s.length <= 104\ns consists of only English letters and spaces ' '.\nThere will be at least one word in s.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"Hello World\") == 5\n assert candidate(s = \" fly me to the moon \") == 4\n assert candidate(s = \"luffy is still joyboy\") == 6\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().lengthOfLastWord", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int lengthOfLastWord(string s) {", "container": "Solution", "callable": "lengthOfLastWord", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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 n2 in spiral order.\n \nExample 1:\n\n\nInput: n = 3\nOutput: [[1,2,3],[8,9,4],[7,6,5]]\n\nExample 2:\n\nInput: n = 1\nOutput: [[1]]\n\n \nConstraints:\n\n1 <= n <= 20\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().generateMatrix", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> generateMatrix(int n) {", "container": "Solution", "callable": "generateMatrix", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector>", "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.\nBy listing and labeling all of the permutations in order, we get the following sequence for n = 3:\n\n\"123\"\n\"132\"\n\"213\"\n\"231\"\n\"312\"\n\"321\"\n\nGiven n and k, return the kth permutation sequence.\n \nExample 1:\nInput: n = 3, k = 3\nOutput: \"213\"\nExample 2:\nInput: n = 4, k = 9\nOutput: \"2314\"\nExample 3:\nInput: n = 3, k = 1\nOutput: \"123\"\n\n \nConstraints:\n\n1 <= n <= 9\n1 <= k <= n!\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"}, "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().getPermutation", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string getPermutation(int n, int k) {", "container": "Solution", "callable": "getPermutation", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 61, "task_id": "rotate-list", "difficulty": "Medium", "problem_description": "Given the head of a linked list, rotate the list to the right by k places.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5], k = 2\nOutput: [4,5,1,2,3]\n\nExample 2:\n\n\nInput: head = [0,1,2], k = 4\nOutput: [2,0,1]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 500].\n-100 <= Node.val <= 100\n0 <= k <= 2 * 109\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([-100, 100, 0]),k = 1), list_node([0, -100, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),k = 9), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([0, 1, 2]),k = 4), list_node([2, 0, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),k = 5), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2]),k = 0), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 3), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),k = 2), list_node([4, 5, 1, 2, 3]))\n assert candidate(head = list_node([]),k = 0) == None\n assert is_same_list(candidate(head = list_node([1, 2]),k = 3), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([1]),k = 0), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 6), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2]),k = 1), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([-1, 0, 1]),k = 1), list_node([1, -1, 0]))\n assert is_same_list(candidate(head = list_node([1]),k = 1), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),k = 10), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),k = 3), list_node([7, 8, 9, 1, 2, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 0), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),k = 7), list_node([2, 1, 5, 4, 3]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),k = 25), list_node([60, 70, 80, 90, 100, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([1]),k = 100), list_node([1]))\n assert is_same_list(candidate(head = list_node([7, 6, 5, 4, 3, 2, 1]),k = 10), list_node([3, 2, 1, 7, 6, 5, 4]))\n assert is_same_list(candidate(head = list_node([1, 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 = 0), list_node([1, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),k = 15), list_node([4, 5, 6, 7, 8, 9, 1, 2, 3]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),k = 11), list_node([20, 2, 4, 6, 8, 10, 12, 14, 16, 18]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 5), list_node([16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5]),k = 2), list_node([-4, -5, -1, -2, -3]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 3), list_node([3, 2, 1, 10, 9, 8, 7, 6, 5, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 20), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 15), list_node([6, 7, 8, 9, 10, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 500), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),k = 100), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([0]),k = 500), list_node([0]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]),k = 9), list_node([8, 7, 6, 5, 4, 3, 2, 1, 0, 9]))\n assert is_same_list(candidate(head = list_node([3, 1, 2]),k = 3), list_node([3, 1, 2]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),k = 15), list_node([60, 70, 80, 90, 100, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),k = 1), list_node([1, 5, 4, 3, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 0), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),k = 501), list_node([100, 10, 20, 30, 40, 50, 60, 70, 80, 90]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),k = 5), list_node([-6, -7, -8, -9, -10, -1, -2, -3, -4, -5]))\n assert is_same_list(candidate(head = list_node([0]),k = 0), list_node([0]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50]),k = 1000000000), list_node([10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),k = 5), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([7, 1, 3, 9, 2, 5, 8, 6]),k = 3), list_node([5, 8, 6, 7, 1, 3, 9, 2]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 4294967295), list_node([3, 2, 1, 9, 8, 7, 6, 5, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 9), list_node([7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60]),k = 600000000), list_node([10, 20, 30, 40, 50, 60]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),k = 15), list_node([-6, -7, -8, -9, -10, -1, -2, -3, -4, -5]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]),k = 19), list_node([3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 1]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 2, 3, 8, 4, 7, 6]),k = 3), list_node([4, 7, 6, 5, 1, 9, 2, 3, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 25), list_node([6, 7, 8, 9, 10, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1]),k = 1000000000), list_node([1]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 9), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),k = 10), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),k = 19), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([7, 7, 7, 7, 7]),k = 10), list_node([7, 7, 7, 7, 7]))\n assert is_same_list(candidate(head = list_node([1, 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), list_node([1, 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(head = list_node([]),k = 3) == None\n assert is_same_list(candidate(head = list_node([-1, 0, 1, -2, 2, -3, 3]),k = 7), list_node([-1, 0, 1, -2, 2, -3, 3]))\n assert is_same_list(candidate(head = list_node([1]),k = 10), list_node([1]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),k = 2), list_node([2, 1, 5, 4, 3]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),k = 10), list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert candidate(head = list_node([]),k = 1) == None\n assert is_same_list(candidate(head = list_node([100, -100, 50, -50, 25, -25, 12, -12]),k = 10), list_node([12, -12, 100, -100, 50, -50, 25, -25]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 2147483647), list_node([3, 1, 2]))\n assert is_same_list(candidate(head = list_node([1]),k = 1000), list_node([1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),k = 8), list_node([-3, -4, -5, -6, -7, -8, -9, -10, -1, -2]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 7), list_node([7, 6, 5, 4, 3, 2, 1, 9, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 11), list_node([10, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5]),k = 0), list_node([5]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),k = 3), list_node([3, 2, 1, 5, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 18), list_node([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 100), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 19), list_node([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5]),k = 7), list_node([-4, -5, -1, -2, -3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 1), list_node([10, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 5), list_node([6, 7, 8, 9, 10, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5, 6, 7, 8, 9, 10, 11]),k = 500000000), list_node([9, 10, 11, 5, 6, 7, 8]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),k = 5), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 3), list_node([8, 9, 10, 1, 2, 3, 4, 5, 6, 7]))\n assert is_same_list(candidate(head = list_node([2, 1]),k = 1), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),k = 21), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 20), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-100, 100, -50, 50, -25, 25]),k = 2), list_node([-25, 25, -100, 100, -50, 50]))\n assert is_same_list(candidate(head = list_node([-100, 0, 100]),k = 2), list_node([0, 100, -100]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),k = 9), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([9, 9, 9, 9, 9]),k = 10), list_node([9, 9, 9, 9, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),k = 7), list_node([9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8]))\n assert is_same_list(candidate(head = list_node([5]),k = 1000000000), list_node([5]))\n assert candidate(head = list_node([]),k = 5) == None\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),k = 20), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]),k = 13), list_node([6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 2, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),k = 7), list_node([6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),k = 10), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),k = 9), list_node([2, 3, 4, 5, 6, 7, 8, 9, 10, 1]))\n assert is_same_list(candidate(head = list_node([-100, 0, 100]),k = 1), list_node([100, -100, 0]))\n assert is_same_list(candidate(head = list_node([3, 3, 3, 3, 3]),k = 10), list_node([3, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),k = 15), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6]))\n assert is_same_list(candidate(head = list_node([10, -20, 30, -40, 50]),k = 3), list_node([30, -40, 50, 10, -20]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),k = 50), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),k = 3), list_node([-8, -9, -10, -1, -2, -3, -4, -5, -6, -7]))\n"}, "metadata": {"canonical_parameter_names": ["head", "k"], "leetcode_dataset_entry_point": "Solution().rotateRight", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* rotateRight(ListNode* head, int k) {", "container": "Solution", "callable": "rotateRight", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "k", "type": "int"}], "return_type": "ListNode*", "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.\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.\nThe test cases are generated so that the answer will be less than or equal to 2 * 109.\n \nExample 1:\n\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\n \nConstraints:\n\n1 <= m, n <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(m = 20,n = 30) == 11541847896480\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 = 30,n = 20) == 11541847896480\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 = 40,n = 30) == 13750991318793417920\n assert candidate(m = 67,n = 33) == 65814642035034133075191231\n assert candidate(m = 30,n = 30) == 30067266499541040\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 = 30,n = 40) == 13750991318793417920\n assert candidate(m = 99,n = 99) == 5716592448890534420436582360196242777068052430850904489000\n assert candidate(m = 25,n = 75) == 45931679871275969889300\n assert candidate(m = 90,n = 10) == 1573664496040\n assert candidate(m = 75,n = 75) == 23362265873332749085315221863910685052043000\n assert candidate(m = 30,n = 25) == 779255311989700\n assert candidate(m = 75,n = 25) == 45931679871275969889300\n assert candidate(m = 30,n = 70) == 6230496325796261023265040\n assert candidate(m = 100,n = 5) == 4421275\n assert candidate(m = 80,n = 80) == 23156006494021191956342707682359261381151378400\n assert candidate(m = 40,n = 10) == 1677106640\n assert candidate(m = 80,n = 20) == 86623575014757120480\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 = 10,n = 90) == 1573664496040\n assert candidate(m = 60,n = 60) == 24356699707654619143838606602026720\n assert candidate(m = 2,n = 99) == 99\n assert candidate(m = 1,n = 99) == 1\n assert candidate(m = 45,n = 35) == 14429347509452441488650\n assert candidate(m = 55,n = 45) == 15362117803534044899180148240\n assert candidate(m = 50,n = 2) == 50\n assert candidate(m = 60,n = 40) == 3332420398982499757882998720\n assert candidate(m = 50,n = 50) == 25477612258980856902730428600\n assert candidate(m = 100,n = 100) == 22750883079422934966181954039568885395604168260154104734000\n assert candidate(m = 15,n = 5) == 3060\n assert candidate(m = 99,n = 100) == 11375441539711467483090977019784442697802084130077052367000\n assert candidate(m = 20,n = 80) == 86623575014757120480\n assert candidate(m = 15,n = 20) == 818809200\n assert candidate(m = 45,n = 55) == 15362117803534044899180148240\n assert candidate(m = 25,n = 25) == 32247603683100\n assert candidate(m = 2,n = 50) == 50\n assert candidate(m = 40,n = 60) == 3332420398982499757882998720\n assert candidate(m = 50,n = 1) == 1\n assert candidate(m = 70,n = 30) == 6230496325796261023265040\n assert candidate(m = 15,n = 25) == 9669554100\n assert candidate(m = 33,n = 67) == 65814642035034133075191231\n assert candidate(m = 35,n = 45) == 14429347509452441488650\n"}, "metadata": {"canonical_parameter_names": ["m", "n"], "leetcode_dataset_entry_point": "Solution().uniquePaths", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int uniquePaths(int m, int n) {", "container": "Solution", "callable": "uniquePaths", "parameters": [{"name": "m", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "int", "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.\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.\nReturn the number of possible unique paths that the robot can take to reach the bottom-right corner.\nThe testcases are generated so that the answer will be less than or equal to 2 * 109.\n \nExample 1:\n\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\n\nInput: obstacleGrid = [[0,1],[0,0]]\nOutput: 1\n\n \nConstraints:\n\nm == obstacleGrid.length\nn == obstacleGrid[i].length\n1 <= m, n <= 100\nobstacleGrid[i][j] is 0 or 1.\n\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"}, "metadata": {"canonical_parameter_names": ["obstacleGrid"], "leetcode_dataset_entry_point": "Solution().uniquePathsWithObstacles", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int uniquePathsWithObstacles(vector>& obstacleGrid) {", "container": "Solution", "callable": "uniquePathsWithObstacles", "parameters": [{"name": "obstacleGrid", "type": "vector>&"}], "return_type": "int", "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.\nNote: You can only move either down or right at any point in time.\n \nExample 1:\n\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\n \nConstraints:\n\nm == grid.length\nn == grid[i].length\n1 <= m, n <= 200\n0 <= grid[i][j] <= 200\n\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 = [[100, 200, 150], [50, 100, 125], [175, 200, 250], [225, 150, 300]]) == 900\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 = [[1, 100, 200, 300, 400], [1, 1, 1, 1, 1], [100, 100, 100, 100, 100], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == 108\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 = [[100, 200, 300], [400, 500, 600], [700, 800, 900]]) == 2100\n assert candidate(grid = [[5, 3, 2, 7], [8, 6, 4, 3], [1, 2, 6, 5], [9, 7, 4, 8]]) == 30\n"}, "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().minPathSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minPathSum(vector>& grid) {", "container": "Solution", "callable": "minPathSum", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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.\n\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\".\nFormally, a valid number is defined using one of the following definitions:\n\nAn integer number followed by an optional exponent.\nA decimal number followed by an optional exponent.\n\nAn integer number is defined with an optional sign '-' or '+' followed by digits.\nA decimal number is defined with an optional sign '-' or '+' followed by one of the following definitions:\n\nDigits followed by a dot '.'.\nDigits followed by a dot '.' followed by digits.\nA dot '.' followed by digits.\n\nAn exponent is defined with an exponent notation 'e' or 'E' followed by an integer number.\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\n \nConstraints:\n\n1 <= s.length <= 20\ns consists of only English letters (both uppercase and lowercase), digits (0-9), plus '+', minus '-', or dot '.'.\n\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.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16\") == False\n assert candidate(s = \"1..\") == False\n assert candidate(s = \"-0.000000000000000001E-1\") == True\n assert candidate(s = \"-e\") == False\n assert candidate(s = \"1+1e1\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e-15\") == False\n assert candidate(s = \"1e+1.e-\") == False\n assert candidate(s = \"1.23456789012345678901234567890E+10\") == True\n assert candidate(s = \"+.0000000000000000001\") == True\n assert candidate(s = \"12345678901234567890.12345678901234567890\") == True\n assert candidate(s = \"1.2.3\") == False\n assert candidate(s = \"3.14159265358979323846\") == True\n assert candidate(s = \"1E1E1\") == False\n assert candidate(s = \"1.2e+2e3\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e-12\") == 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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e-13\") == False\n assert candidate(s = \"1e+1.e+2e3\") == False\n assert candidate(s = \"1.e+2e+3e-4\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e+18e+19e+20\") == False\n assert candidate(s = \"1e+1.e+.3\") == False\n assert candidate(s = \"+1000000000000000000000000000000.0\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e+18e-19\") == 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.e+2e+3e+4e+5e+6e+7e+8e-9\") == False\n assert candidate(s = \"1.e2.3\") == False\n assert candidate(s = \"-0.000000000000000000e-1234567890\") == True\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.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e-18\") == False\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+2e+3e+4e+5e+6e+7e+8e+9e-10\") == False\n assert candidate(s = \"1.e+2e3\") == False\n assert candidate(s = \"1.e-+2\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e+18\") == 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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17\") == 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 = \"3.1415926535897932384626433832795\") == True\n assert candidate(s = \"0.000000000000000000e0\") == True\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 = \"1.0000000000000000000e-1\") == 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 = \"12345.67890E+12345.67890\") == False\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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11\") == 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 = \"-2.71828182845904523536028747135266249775724709369999E+0\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9\") == False\n assert candidate(s = \"-1E-10\") == True\n assert candidate(s = \".e1\") == False\n assert candidate(s = \"-0.000000000000000000e-0\") == True\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 = \"0.123456789012345678901234567890\") == True\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 = \"-12345678901234567890.12345678901234567890\") == True\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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e-14\") == False\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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e-17\") == False\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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13\") == False\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 = \"9.99999999999999999999999999999e+99\") == 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 = \"1.e+2e+3e+4e+5e+6e+7e-8\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e-11\") == False\n assert candidate(s = \"5.\") == True\n assert candidate(s = \"0.000000000000000000e-0\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15\") == False\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 = \"-0.00000000000000000000000000001\") == True\n assert candidate(s = \"-5.55555555555555555555555555555E-55\") == True\n assert candidate(s = \"1e+1.2\") == False\n assert candidate(s = \"0000000000000000000.000000000000000000\") == True\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 = \"2.71828182845904523536028747135266249775724709369999E+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 = \"-12345678901234567890E-1234567890\") == True\n assert candidate(s = ('-.',)) == 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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14\") == False\n assert candidate(s = \".0\") == True\n assert candidate(s = \"-12345678901234567890.1234567890\") == True\n assert candidate(s = \"00000.00000e+00000\") == True\n assert candidate(s = \"1e.+2\") == False\n assert candidate(s = \"123.4567890123456789e+987654321.0\") == False\n assert candidate(s = \"1.234567890123456789\") == True\n assert candidate(s = \"-0.000000000000000000E+00000\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12\") == False\n assert candidate(s = \"12345678901234567890e-1234567890\") == 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 = \"1.e+2e+3e+4e+5e+6e+7e+8\") == False\n assert candidate(s = \"12345678901234567890E+1234567890\") == True\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 = \"999999999999999999e-1\") == 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 = \"0.000000000000000000e+0\") == True\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 = \"+.1234567890123456789e+10\") == True\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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e+18e+19e-20\") == False\n assert candidate(s = \".e-\") == False\n assert candidate(s = \"1.23.45\") == False\n assert candidate(s = \"1000000000000000000.0\") == True\n assert candidate(s = \"-1.23456789E+987654321\") == True\n assert candidate(s = \"-.0000000000000000001\") == True\n assert candidate(s = \"1.e+2.e3\") == False\n assert candidate(s = \"+0.000000000000000000e+0\") == True\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 = \"-9876543210e+987654321\") == True\n assert candidate(s = \"-.e-2\") == False\n assert candidate(s = \"1.e+-2\") == False\n assert candidate(s = \"123456789012345678901234567890.\") == True\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.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e-16\") == 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 = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10e+11e+12e+13e+14e+15e+16e+17e+18e+19\") == False\n assert candidate(s = \"123.e+10\") == True\n assert candidate(s = \"1.e+2.3e4\") == False\n assert candidate(s = \"-1.0000000000000000000e-1\") == True\n assert candidate(s = \"-123.4567890123456789E+123456789\") == True\n assert candidate(s = \"-9.99999999999999999999999999999e-99\") == True\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 = \".1234567890123456789E-987654321\") == True\n assert candidate(s = \".e+\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7e+8e+9e+10\") == 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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().isNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isNumber(string s) {", "container": "Solution", "callable": "isNumber", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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 ith 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.\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\n \nConstraints:\n\n1 <= digits.length <= 100\n0 <= digits[i] <= 9\ndigits does not contain any leading 0's.\n\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"}, "metadata": {"canonical_parameter_names": ["digits"], "leetcode_dataset_entry_point": "Solution().plusOne", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector plusOne(vector& digits) {", "container": "Solution", "callable": "plusOne", "parameters": [{"name": "digits", "type": "vector&"}], "return_type": "vector", "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:\nInput: a = \"11\", b = \"1\"\nOutput: \"100\"\nExample 2:\nInput: a = \"1010\", b = \"1011\"\nOutput: \"10101\"\n\n \nConstraints:\n\n1 <= a.length, b.length <= 104\na and b consist only of '0' or '1' characters.\nEach string does not contain leading zeros except for the zero itself.\n\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"}, "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().addBinary", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string addBinary(string a, string b) {", "container": "Solution", "callable": "addBinary", "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.\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.\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.\nFor the last line of text, it should be left-justified, and no extra space is inserted between words.\nNote:\n\nA word is defined as a character sequence consisting of non-space characters only.\nEach word's length is guaranteed to be greater than 0 and not exceed maxWidth.\nThe input array words contains at least one word.\n\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]\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.\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\n1 <= words.length <= 300\n1 <= words[i].length <= 20\nwords[i] consists of only English letters and symbols.\n1 <= maxWidth <= 100\nwords[i].length <= maxWidth\n\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 = ['OneWordHereIsVeryLongIndeedAndItWillCauseSomeIssuesWithTheAlgorithmIfNotHandledProperly'],maxWidth = 50) == ['OneWordHereIsVeryLongIndeedAndItWillCauseSomeIssuesWithTheAlgorithmIfNotHandledProperly']\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 = ['word'],maxWidth = 1) == ['word']\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 = ['LongWord1234567890', 'Short', 'AnotherLongWord1234567', 'Tiny', 'Word'],maxWidth = 25) == ['LongWord1234567890 Short', 'AnotherLongWord1234567 ', 'Tiny Word ']\n assert candidate(words = ['We', 'are', 'now', 'a', 'great', 'nation', '', 'must', 'make', 'amends', 'that', 'we', 'have', 'wronged', 'visitors', 'from', 'other', 'lands'],maxWidth = 12) == ['We are now a', 'great nation', ' must make', 'amends that', 'we have', 'wronged ', 'visitors ', 'from other', 'lands ']\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 = ['One', 'word', 'in', 'each', 'line'],maxWidth = 1) == ['One', 'word', 'in', 'each', 'line']\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 = ['SingleLongWordThatExceedsTheMaxWidthAndNeedsToBeHandledProperly'],maxWidth = 30) == ['SingleLongWordThatExceedsTheMaxWidthAndNeedsToBeHandledProperly']\n assert candidate(words = ['Pneumonoultramicroscopicsilicovolcanoconiosis'],maxWidth = 40) == ['Pneumonoultramicroscopicsilicovolcanoconiosis']\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"}, "metadata": {"canonical_parameter_names": ["words", "maxWidth"], "leetcode_dataset_entry_point": "Solution().fullJustify", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector fullJustify(vector& words, int maxWidth) {", "container": "Solution", "callable": "fullJustify", "parameters": [{"name": "words", "type": "vector&"}, {"name": "maxWidth", "type": "int"}], "return_type": "vector", "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.\nYou must not use any built-in exponent function or operator.\n\nFor example, do not use pow(x, 0.5) in c++ or x ** 0.5 in python.\n\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\n \nConstraints:\n\n0 <= x <= 231 - 1\n\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 = 1234567890123456789) == 1111111106\n assert candidate(x = 40000000000) == 200000\n assert candidate(x = 18014398509481984) == 134217728\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 = 4294967296) == 65536\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 = 18446744073709551615) == 4294967295\n assert candidate(x = 16777215) == 4095\n assert candidate(x = 1000000) == 1000\n assert candidate(x = 18014398509481983) == 134217727\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 = 141421356237) == 376060\n assert candidate(x = 10000) == 100\n assert candidate(x = 4294967295) == 65535\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 = 1234567890123456788) == 1111111106\n assert candidate(x = 4096) == 64\n assert candidate(x = 196) == 14\n assert candidate(x = 9223372036854775807) == 3037000499\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 assert candidate(x = 36028797018963968) == 189812531\n"}, "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().mySqrt", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int mySqrt(int x) {", "container": "Solution", "callable": "mySqrt", "parameters": [{"name": "x", "type": "int"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= n <= 45\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().climbStairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int climbStairs(int n) {", "container": "Solution", "callable": "climbStairs", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\nThe rules of a Unix-style file system are as follows:\n\nA single period '.' represents the current directory.\nA double period '..' represents the previous/parent directory.\nMultiple consecutive slashes such as '//' and '///' are treated as a single slash '/'.\nAny 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\nThe path must start with a single slash '/'.\nDirectories within the path must be separated by exactly one slash '/'.\nThe path must not end with a slash '/', unless it is the root directory.\nThe 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\n \nConstraints:\n\n1 <= path.length <= 3000\npath consists of English letters, digits, period '.', slash '/' or '_'.\npath is a valid absolute Unix path.\n\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"}, "metadata": {"canonical_parameter_names": ["path"], "leetcode_dataset_entry_point": "Solution().simplifyPath", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string simplifyPath(string path) {", "container": "Solution", "callable": "simplifyPath", "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.\nYou have the following three operations permitted on a word:\n\nInsert a character\nDelete a character\nReplace a character\n\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\n \nConstraints:\n\n0 <= word1.length, word2.length <= 500\nword1 and word2 consist of lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["word1", "word2"], "leetcode_dataset_entry_point": "Solution().minDistance", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minDistance(string word1, string word2) {", "container": "Solution", "callable": "minDistance", "parameters": [{"name": "word1", "type": "string"}, {"name": "word2", "type": "string"}], "return_type": "int", "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\nEach row is sorted in non-decreasing order.\nThe 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.\nYou must write a solution in O(log(m * n)) time complexity.\n \nExample 1:\n\n\nInput: matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3\nOutput: true\n\nExample 2:\n\n\nInput: matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13\nOutput: false\n\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= m, n <= 100\n-104 <= matrix[i][j], target <= 104\n\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 = [[10000, 10001, 10002], [10003, 10004, 10005], [10006, 10007, 10008]],target = 10004) == True\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"}, "metadata": {"canonical_parameter_names": ["matrix", "target"], "leetcode_dataset_entry_point": "Solution().searchMatrix", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool searchMatrix(vector>& matrix, int target) {", "container": "Solution", "callable": "searchMatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "target", "type": "int"}], "return_type": "bool", "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 \"\".\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\n \nConstraints:\n\nm == s.length\nn == t.length\n1 <= m, n <= 105\ns and t consist of uppercase and lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().minWindow", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string minWindow(string s, string t) {", "container": "Solution", "callable": "minWindow", "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].\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\n \nConstraints:\n\n1 <= n <= 20\n1 <= k <= n\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 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 candidate(n = 1,k = 1) == [[1]]\n assert candidate(n = 4,k = 2) == [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]]\n assert candidate(n = 6,k = 1) == [[1], [2], [3], [4], [5], [6]]\n assert 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 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 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 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 candidate(n = 9,k = 9) == [[1, 2, 3, 4, 5, 6, 7, 8, 9]]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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"}, "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().combine", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> combine(int n, int k) {", "container": "Solution", "callable": "combine", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "vector>", "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).\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\n \nConstraints:\n\n1 <= nums.length <= 10\n-10 <= nums[i] <= 10\nAll the numbers of nums are unique.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 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 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 candidate(nums = [-2, -3, -1]) == [[], [-1], [-3], [-3, -1], [-2], [-2, -1], [-2, -3], [-2, -3, -1]]\n assert 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 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 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 candidate(nums = [10]) == [[], [10]]\n assert candidate(nums = [1]) == [[], [1]]\n assert candidate(nums = [-5, 0, 5]) == [[], [5], [0], [0, 5], [-5], [-5, 5], [-5, 0], [-5, 0, 5]]\n assert 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 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 candidate(nums = [1, 3, 5, 7, 9, 11]) == [[], [11], [9], [9, 11], [7], [7, 11], [7, 9], [7, 9, 11], [5], [5, 11], [5, 9], [5, 9, 11], [5, 7], [5, 7, 11], [5, 7, 9], [5, 7, 9, 11], [3], [3, 11], [3, 9], [3, 9, 11], [3, 7], [3, 7, 11], [3, 7, 9], [3, 7, 9, 11], [3, 5], [3, 5, 11], [3, 5, 9], [3, 5, 9, 11], [3, 5, 7], [3, 5, 7, 11], [3, 5, 7, 9], [3, 5, 7, 9, 11], [1], [1, 11], [1, 9], [1, 9, 11], [1, 7], [1, 7, 11], [1, 7, 9], [1, 7, 9, 11], [1, 5], [1, 5, 11], [1, 5, 9], [1, 5, 9, 11], [1, 5, 7], [1, 5, 7, 11], [1, 5, 7, 9], [1, 5, 7, 9, 11], [1, 3], [1, 3, 11], [1, 3, 9], [1, 3, 9, 11], [1, 3, 7], [1, 3, 7, 11], [1, 3, 7, 9], [1, 3, 7, 9, 11], [1, 3, 5], [1, 3, 5, 11], [1, 3, 5, 9], [1, 3, 5, 9, 11], [1, 3, 5, 7], [1, 3, 5, 7, 11], [1, 3, 5, 7, 9], [1, 3, 5, 7, 9, 11]]\n assert candidate(nums = [5, -1, 4]) == [[], [4], [-1], [-1, 4], [5], [5, 4], [5, -1], [5, -1, 4]]\n assert candidate(nums = [0]) == [[], [0]]\n assert candidate(nums = [-10, 10]) == [[], [10], [-10], [-10, 10]]\n assert candidate(nums = [5, 10, 15]) == [[], [15], [10], [10, 15], [5], [5, 15], [5, 10], [5, 10, 15]]\n assert candidate(nums = [5, -1, 2]) == [[], [2], [-1], [-1, 2], [5], [5, 2], [5, -1], [5, -1, 2]]\n assert 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 candidate(nums = [1, 2]) == [[], [2], [1], [1, 2]]\n assert candidate(nums = [10, -10, 0]) == [[], [0], [-10], [-10, 0], [10], [10, 0], [10, -10], [10, -10, 0]]\n assert candidate(nums = [1, 2, 3]) == [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3]]\n assert candidate(nums = [5, -1, 3]) == [[], [3], [-1], [-1, 3], [5], [5, 3], [5, -1], [5, -1, 3]]\n assert candidate(nums = [7]) == [[], [7]]\n assert 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 candidate(nums = [3, 1, 2]) == [[], [2], [1], [1, 2], [3], [3, 2], [3, 1], [3, 1, 2]]\n assert candidate(nums = [-1, 0, 1]) == [[], [1], [0], [0, 1], [-1], [-1, 1], [-1, 0], [-1, 0, 1]]\n assert 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 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 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 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 candidate(nums = [1, 10, 100, 1000, 10000]) == [[], [10000], [1000], [1000, 10000], [100], [100, 10000], [100, 1000], [100, 1000, 10000], [10], [10, 10000], [10, 1000], [10, 1000, 10000], [10, 100], [10, 100, 10000], [10, 100, 1000], [10, 100, 1000, 10000], [1], [1, 10000], [1, 1000], [1, 1000, 10000], [1, 100], [1, 100, 10000], [1, 100, 1000], [1, 100, 1000, 10000], [1, 10], [1, 10, 10000], [1, 10, 1000], [1, 10, 1000, 10000], [1, 10, 100], [1, 10, 100, 10000], [1, 10, 100, 1000], [1, 10, 100, 1000, 10000]]\n assert 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 candidate(nums = [5, 10, 15, 20, 25, 30, 35]) == [[], [35], [30], [30, 35], [25], [25, 35], [25, 30], [25, 30, 35], [20], [20, 35], [20, 30], [20, 30, 35], [20, 25], [20, 25, 35], [20, 25, 30], [20, 25, 30, 35], [15], [15, 35], [15, 30], [15, 30, 35], [15, 25], [15, 25, 35], [15, 25, 30], [15, 25, 30, 35], [15, 20], [15, 20, 35], [15, 20, 30], [15, 20, 30, 35], [15, 20, 25], [15, 20, 25, 35], [15, 20, 25, 30], [15, 20, 25, 30, 35], [10], [10, 35], [10, 30], [10, 30, 35], [10, 25], [10, 25, 35], [10, 25, 30], [10, 25, 30, 35], [10, 20], [10, 20, 35], [10, 20, 30], [10, 20, 30, 35], [10, 20, 25], [10, 20, 25, 35], [10, 20, 25, 30], [10, 20, 25, 30, 35], [10, 15], [10, 15, 35], [10, 15, 30], [10, 15, 30, 35], [10, 15, 25], [10, 15, 25, 35], [10, 15, 25, 30], [10, 15, 25, 30, 35], [10, 15, 20], [10, 15, 20, 35], [10, 15, 20, 30], [10, 15, 20, 30, 35], [10, 15, 20, 25], [10, 15, 20, 25, 35], [10, 15, 20, 25, 30], [10, 15, 20, 25, 30, 35], [5], [5, 35], [5, 30], [5, 30, 35], [5, 25], [5, 25, 35], [5, 25, 30], [5, 25, 30, 35], [5, 20], [5, 20, 35], [5, 20, 30], [5, 20, 30, 35], [5, 20, 25], [5, 20, 25, 35], [5, 20, 25, 30], [5, 20, 25, 30, 35], [5, 15], [5, 15, 35], [5, 15, 30], [5, 15, 30, 35], [5, 15, 25], [5, 15, 25, 35], [5, 15, 25, 30], [5, 15, 25, 30, 35], [5, 15, 20], [5, 15, 20, 35], [5, 15, 20, 30], [5, 15, 20, 30, 35], [5, 15, 20, 25], [5, 15, 20, 25, 35], [5, 15, 20, 25, 30], [5, 15, 20, 25, 30, 35], [5, 10], [5, 10, 35], [5, 10, 30], [5, 10, 30, 35], [5, 10, 25], [5, 10, 25, 35], [5, 10, 25, 30], [5, 10, 25, 30, 35], [5, 10, 20], [5, 10, 20, 35], [5, 10, 20, 30], [5, 10, 20, 30, 35], [5, 10, 20, 25], [5, 10, 20, 25, 35], [5, 10, 20, 25, 30], [5, 10, 20, 25, 30, 35], [5, 10, 15], [5, 10, 15, 35], [5, 10, 15, 30], [5, 10, 15, 30, 35], [5, 10, 15, 25], [5, 10, 15, 25, 35], [5, 10, 15, 25, 30], [5, 10, 15, 25, 30, 35], [5, 10, 15, 20], [5, 10, 15, 20, 35], [5, 10, 15, 20, 30], [5, 10, 15, 20, 30, 35], [5, 10, 15, 20, 25], [5, 10, 15, 20, 25, 35], [5, 10, 15, 20, 25, 30], [5, 10, 15, 20, 25, 30, 35]]\n assert candidate(nums = [1, 11, 21, 31, 41, 51, 61, 71, 81, 91]) == [[], [91], [81], [81, 91], [71], [71, 91], [71, 81], [71, 81, 91], [61], [61, 91], [61, 81], [61, 81, 91], [61, 71], [61, 71, 91], [61, 71, 81], [61, 71, 81, 91], [51], [51, 91], [51, 81], [51, 81, 91], [51, 71], [51, 71, 91], [51, 71, 81], [51, 71, 81, 91], [51, 61], [51, 61, 91], [51, 61, 81], [51, 61, 81, 91], [51, 61, 71], [51, 61, 71, 91], [51, 61, 71, 81], [51, 61, 71, 81, 91], [41], [41, 91], [41, 81], [41, 81, 91], [41, 71], [41, 71, 91], [41, 71, 81], [41, 71, 81, 91], [41, 61], [41, 61, 91], [41, 61, 81], [41, 61, 81, 91], [41, 61, 71], [41, 61, 71, 91], [41, 61, 71, 81], [41, 61, 71, 81, 91], [41, 51], [41, 51, 91], [41, 51, 81], [41, 51, 81, 91], [41, 51, 71], [41, 51, 71, 91], [41, 51, 71, 81], [41, 51, 71, 81, 91], [41, 51, 61], [41, 51, 61, 91], [41, 51, 61, 81], [41, 51, 61, 81, 91], [41, 51, 61, 71], [41, 51, 61, 71, 91], [41, 51, 61, 71, 81], [41, 51, 61, 71, 81, 91], [31], [31, 91], [31, 81], [31, 81, 91], [31, 71], [31, 71, 91], [31, 71, 81], [31, 71, 81, 91], [31, 61], [31, 61, 91], [31, 61, 81], [31, 61, 81, 91], [31, 61, 71], [31, 61, 71, 91], [31, 61, 71, 81], [31, 61, 71, 81, 91], [31, 51], [31, 51, 91], [31, 51, 81], [31, 51, 81, 91], [31, 51, 71], [31, 51, 71, 91], [31, 51, 71, 81], [31, 51, 71, 81, 91], [31, 51, 61], [31, 51, 61, 91], [31, 51, 61, 81], [31, 51, 61, 81, 91], [31, 51, 61, 71], [31, 51, 61, 71, 91], [31, 51, 61, 71, 81], [31, 51, 61, 71, 81, 91], [31, 41], [31, 41, 91], [31, 41, 81], [31, 41, 81, 91], [31, 41, 71], [31, 41, 71, 91], [31, 41, 71, 81], [31, 41, 71, 81, 91], [31, 41, 61], [31, 41, 61, 91], [31, 41, 61, 81], [31, 41, 61, 81, 91], [31, 41, 61, 71], [31, 41, 61, 71, 91], [31, 41, 61, 71, 81], [31, 41, 61, 71, 81, 91], [31, 41, 51], [31, 41, 51, 91], [31, 41, 51, 81], [31, 41, 51, 81, 91], [31, 41, 51, 71], [31, 41, 51, 71, 91], [31, 41, 51, 71, 81], [31, 41, 51, 71, 81, 91], [31, 41, 51, 61], [31, 41, 51, 61, 91], [31, 41, 51, 61, 81], [31, 41, 51, 61, 81, 91], [31, 41, 51, 61, 71], [31, 41, 51, 61, 71, 91], [31, 41, 51, 61, 71, 81], [31, 41, 51, 61, 71, 81, 91], [21], [21, 91], [21, 81], [21, 81, 91], [21, 71], [21, 71, 91], [21, 71, 81], [21, 71, 81, 91], [21, 61], [21, 61, 91], [21, 61, 81], [21, 61, 81, 91], [21, 61, 71], [21, 61, 71, 91], [21, 61, 71, 81], [21, 61, 71, 81, 91], [21, 51], [21, 51, 91], [21, 51, 81], [21, 51, 81, 91], [21, 51, 71], [21, 51, 71, 91], [21, 51, 71, 81], [21, 51, 71, 81, 91], [21, 51, 61], [21, 51, 61, 91], [21, 51, 61, 81], [21, 51, 61, 81, 91], [21, 51, 61, 71], [21, 51, 61, 71, 91], [21, 51, 61, 71, 81], [21, 51, 61, 71, 81, 91], [21, 41], [21, 41, 91], [21, 41, 81], [21, 41, 81, 91], [21, 41, 71], [21, 41, 71, 91], [21, 41, 71, 81], [21, 41, 71, 81, 91], [21, 41, 61], [21, 41, 61, 91], [21, 41, 61, 81], [21, 41, 61, 81, 91], [21, 41, 61, 71], [21, 41, 61, 71, 91], [21, 41, 61, 71, 81], [21, 41, 61, 71, 81, 91], [21, 41, 51], [21, 41, 51, 91], [21, 41, 51, 81], [21, 41, 51, 81, 91], [21, 41, 51, 71], [21, 41, 51, 71, 91], [21, 41, 51, 71, 81], [21, 41, 51, 71, 81, 91], [21, 41, 51, 61], [21, 41, 51, 61, 91], [21, 41, 51, 61, 81], [21, 41, 51, 61, 81, 91], [21, 41, 51, 61, 71], [21, 41, 51, 61, 71, 91], [21, 41, 51, 61, 71, 81], [21, 41, 51, 61, 71, 81, 91], [21, 31], [21, 31, 91], [21, 31, 81], [21, 31, 81, 91], [21, 31, 71], [21, 31, 71, 91], [21, 31, 71, 81], [21, 31, 71, 81, 91], [21, 31, 61], [21, 31, 61, 91], [21, 31, 61, 81], [21, 31, 61, 81, 91], [21, 31, 61, 71], [21, 31, 61, 71, 91], [21, 31, 61, 71, 81], [21, 31, 61, 71, 81, 91], [21, 31, 51], [21, 31, 51, 91], [21, 31, 51, 81], [21, 31, 51, 81, 91], [21, 31, 51, 71], [21, 31, 51, 71, 91], [21, 31, 51, 71, 81], [21, 31, 51, 71, 81, 91], [21, 31, 51, 61], [21, 31, 51, 61, 91], [21, 31, 51, 61, 81], [21, 31, 51, 61, 81, 91], [21, 31, 51, 61, 71], [21, 31, 51, 61, 71, 91], [21, 31, 51, 61, 71, 81], [21, 31, 51, 61, 71, 81, 91], [21, 31, 41], [21, 31, 41, 91], [21, 31, 41, 81], [21, 31, 41, 81, 91], [21, 31, 41, 71], [21, 31, 41, 71, 91], [21, 31, 41, 71, 81], [21, 31, 41, 71, 81, 91], [21, 31, 41, 61], [21, 31, 41, 61, 91], [21, 31, 41, 61, 81], [21, 31, 41, 61, 81, 91], [21, 31, 41, 61, 71], [21, 31, 41, 61, 71, 91], [21, 31, 41, 61, 71, 81], [21, 31, 41, 61, 71, 81, 91], [21, 31, 41, 51], [21, 31, 41, 51, 91], [21, 31, 41, 51, 81], [21, 31, 41, 51, 81, 91], [21, 31, 41, 51, 71], [21, 31, 41, 51, 71, 91], [21, 31, 41, 51, 71, 81], [21, 31, 41, 51, 71, 81, 91], [21, 31, 41, 51, 61], [21, 31, 41, 51, 61, 91], [21, 31, 41, 51, 61, 81], [21, 31, 41, 51, 61, 81, 91], [21, 31, 41, 51, 61, 71], [21, 31, 41, 51, 61, 71, 91], [21, 31, 41, 51, 61, 71, 81], [21, 31, 41, 51, 61, 71, 81, 91], [11], [11, 91], [11, 81], [11, 81, 91], [11, 71], [11, 71, 91], [11, 71, 81], [11, 71, 81, 91], [11, 61], [11, 61, 91], [11, 61, 81], [11, 61, 81, 91], [11, 61, 71], [11, 61, 71, 91], [11, 61, 71, 81], [11, 61, 71, 81, 91], [11, 51], [11, 51, 91], [11, 51, 81], [11, 51, 81, 91], [11, 51, 71], [11, 51, 71, 91], [11, 51, 71, 81], [11, 51, 71, 81, 91], [11, 51, 61], [11, 51, 61, 91], [11, 51, 61, 81], [11, 51, 61, 81, 91], [11, 51, 61, 71], [11, 51, 61, 71, 91], [11, 51, 61, 71, 81], [11, 51, 61, 71, 81, 91], [11, 41], [11, 41, 91], [11, 41, 81], [11, 41, 81, 91], [11, 41, 71], [11, 41, 71, 91], [11, 41, 71, 81], [11, 41, 71, 81, 91], [11, 41, 61], [11, 41, 61, 91], [11, 41, 61, 81], [11, 41, 61, 81, 91], [11, 41, 61, 71], [11, 41, 61, 71, 91], [11, 41, 61, 71, 81], [11, 41, 61, 71, 81, 91], [11, 41, 51], [11, 41, 51, 91], [11, 41, 51, 81], [11, 41, 51, 81, 91], [11, 41, 51, 71], [11, 41, 51, 71, 91], [11, 41, 51, 71, 81], [11, 41, 51, 71, 81, 91], [11, 41, 51, 61], [11, 41, 51, 61, 91], [11, 41, 51, 61, 81], [11, 41, 51, 61, 81, 91], [11, 41, 51, 61, 71], [11, 41, 51, 61, 71, 91], [11, 41, 51, 61, 71, 81], [11, 41, 51, 61, 71, 81, 91], [11, 31], [11, 31, 91], [11, 31, 81], [11, 31, 81, 91], [11, 31, 71], [11, 31, 71, 91], [11, 31, 71, 81], [11, 31, 71, 81, 91], [11, 31, 61], [11, 31, 61, 91], [11, 31, 61, 81], [11, 31, 61, 81, 91], [11, 31, 61, 71], [11, 31, 61, 71, 91], [11, 31, 61, 71, 81], [11, 31, 61, 71, 81, 91], [11, 31, 51], [11, 31, 51, 91], [11, 31, 51, 81], [11, 31, 51, 81, 91], [11, 31, 51, 71], [11, 31, 51, 71, 91], [11, 31, 51, 71, 81], [11, 31, 51, 71, 81, 91], [11, 31, 51, 61], [11, 31, 51, 61, 91], [11, 31, 51, 61, 81], [11, 31, 51, 61, 81, 91], [11, 31, 51, 61, 71], [11, 31, 51, 61, 71, 91], [11, 31, 51, 61, 71, 81], [11, 31, 51, 61, 71, 81, 91], [11, 31, 41], [11, 31, 41, 91], [11, 31, 41, 81], [11, 31, 41, 81, 91], [11, 31, 41, 71], [11, 31, 41, 71, 91], [11, 31, 41, 71, 81], [11, 31, 41, 71, 81, 91], [11, 31, 41, 61], [11, 31, 41, 61, 91], [11, 31, 41, 61, 81], [11, 31, 41, 61, 81, 91], [11, 31, 41, 61, 71], [11, 31, 41, 61, 71, 91], [11, 31, 41, 61, 71, 81], [11, 31, 41, 61, 71, 81, 91], [11, 31, 41, 51], [11, 31, 41, 51, 91], [11, 31, 41, 51, 81], [11, 31, 41, 51, 81, 91], [11, 31, 41, 51, 71], [11, 31, 41, 51, 71, 91], [11, 31, 41, 51, 71, 81], [11, 31, 41, 51, 71, 81, 91], [11, 31, 41, 51, 61], [11, 31, 41, 51, 61, 91], [11, 31, 41, 51, 61, 81], [11, 31, 41, 51, 61, 81, 91], [11, 31, 41, 51, 61, 71], [11, 31, 41, 51, 61, 71, 91], [11, 31, 41, 51, 61, 71, 81], [11, 31, 41, 51, 61, 71, 81, 91], [11, 21], [11, 21, 91], [11, 21, 81], [11, 21, 81, 91], [11, 21, 71], [11, 21, 71, 91], [11, 21, 71, 81], [11, 21, 71, 81, 91], [11, 21, 61], [11, 21, 61, 91], [11, 21, 61, 81], [11, 21, 61, 81, 91], [11, 21, 61, 71], [11, 21, 61, 71, 91], [11, 21, 61, 71, 81], [11, 21, 61, 71, 81, 91], [11, 21, 51], [11, 21, 51, 91], [11, 21, 51, 81], [11, 21, 51, 81, 91], [11, 21, 51, 71], [11, 21, 51, 71, 91], [11, 21, 51, 71, 81], [11, 21, 51, 71, 81, 91], [11, 21, 51, 61], [11, 21, 51, 61, 91], [11, 21, 51, 61, 81], [11, 21, 51, 61, 81, 91], [11, 21, 51, 61, 71], [11, 21, 51, 61, 71, 91], [11, 21, 51, 61, 71, 81], [11, 21, 51, 61, 71, 81, 91], [11, 21, 41], [11, 21, 41, 91], [11, 21, 41, 81], [11, 21, 41, 81, 91], [11, 21, 41, 71], [11, 21, 41, 71, 91], [11, 21, 41, 71, 81], [11, 21, 41, 71, 81, 91], [11, 21, 41, 61], [11, 21, 41, 61, 91], [11, 21, 41, 61, 81], [11, 21, 41, 61, 81, 91], [11, 21, 41, 61, 71], [11, 21, 41, 61, 71, 91], [11, 21, 41, 61, 71, 81], [11, 21, 41, 61, 71, 81, 91], [11, 21, 41, 51], [11, 21, 41, 51, 91], [11, 21, 41, 51, 81], [11, 21, 41, 51, 81, 91], [11, 21, 41, 51, 71], [11, 21, 41, 51, 71, 91], [11, 21, 41, 51, 71, 81], [11, 21, 41, 51, 71, 81, 91], [11, 21, 41, 51, 61], [11, 21, 41, 51, 61, 91], [11, 21, 41, 51, 61, 81], [11, 21, 41, 51, 61, 81, 91], [11, 21, 41, 51, 61, 71], [11, 21, 41, 51, 61, 71, 91], [11, 21, 41, 51, 61, 71, 81], [11, 21, 41, 51, 61, 71, 81, 91], [11, 21, 31], [11, 21, 31, 91], [11, 21, 31, 81], [11, 21, 31, 81, 91], [11, 21, 31, 71], [11, 21, 31, 71, 91], [11, 21, 31, 71, 81], [11, 21, 31, 71, 81, 91], [11, 21, 31, 61], [11, 21, 31, 61, 91], [11, 21, 31, 61, 81], [11, 21, 31, 61, 81, 91], [11, 21, 31, 61, 71], [11, 21, 31, 61, 71, 91], [11, 21, 31, 61, 71, 81], [11, 21, 31, 61, 71, 81, 91], [11, 21, 31, 51], [11, 21, 31, 51, 91], [11, 21, 31, 51, 81], [11, 21, 31, 51, 81, 91], [11, 21, 31, 51, 71], [11, 21, 31, 51, 71, 91], [11, 21, 31, 51, 71, 81], [11, 21, 31, 51, 71, 81, 91], [11, 21, 31, 51, 61], [11, 21, 31, 51, 61, 91], [11, 21, 31, 51, 61, 81], [11, 21, 31, 51, 61, 81, 91], [11, 21, 31, 51, 61, 71], [11, 21, 31, 51, 61, 71, 91], [11, 21, 31, 51, 61, 71, 81], [11, 21, 31, 51, 61, 71, 81, 91], [11, 21, 31, 41], [11, 21, 31, 41, 91], [11, 21, 31, 41, 81], [11, 21, 31, 41, 81, 91], [11, 21, 31, 41, 71], [11, 21, 31, 41, 71, 91], [11, 21, 31, 41, 71, 81], [11, 21, 31, 41, 71, 81, 91], [11, 21, 31, 41, 61], [11, 21, 31, 41, 61, 91], [11, 21, 31, 41, 61, 81], [11, 21, 31, 41, 61, 81, 91], [11, 21, 31, 41, 61, 71], [11, 21, 31, 41, 61, 71, 91], [11, 21, 31, 41, 61, 71, 81], [11, 21, 31, 41, 61, 71, 81, 91], [11, 21, 31, 41, 51], [11, 21, 31, 41, 51, 91], [11, 21, 31, 41, 51, 81], [11, 21, 31, 41, 51, 81, 91], [11, 21, 31, 41, 51, 71], [11, 21, 31, 41, 51, 71, 91], [11, 21, 31, 41, 51, 71, 81], [11, 21, 31, 41, 51, 71, 81, 91], [11, 21, 31, 41, 51, 61], [11, 21, 31, 41, 51, 61, 91], [11, 21, 31, 41, 51, 61, 81], [11, 21, 31, 41, 51, 61, 81, 91], [11, 21, 31, 41, 51, 61, 71], [11, 21, 31, 41, 51, 61, 71, 91], [11, 21, 31, 41, 51, 61, 71, 81], [11, 21, 31, 41, 51, 61, 71, 81, 91], [1], [1, 91], [1, 81], [1, 81, 91], [1, 71], [1, 71, 91], [1, 71, 81], [1, 71, 81, 91], [1, 61], [1, 61, 91], [1, 61, 81], [1, 61, 81, 91], [1, 61, 71], [1, 61, 71, 91], [1, 61, 71, 81], [1, 61, 71, 81, 91], [1, 51], [1, 51, 91], [1, 51, 81], [1, 51, 81, 91], [1, 51, 71], [1, 51, 71, 91], [1, 51, 71, 81], [1, 51, 71, 81, 91], [1, 51, 61], [1, 51, 61, 91], [1, 51, 61, 81], [1, 51, 61, 81, 91], [1, 51, 61, 71], [1, 51, 61, 71, 91], [1, 51, 61, 71, 81], [1, 51, 61, 71, 81, 91], [1, 41], [1, 41, 91], [1, 41, 81], [1, 41, 81, 91], [1, 41, 71], [1, 41, 71, 91], [1, 41, 71, 81], [1, 41, 71, 81, 91], [1, 41, 61], [1, 41, 61, 91], [1, 41, 61, 81], [1, 41, 61, 81, 91], [1, 41, 61, 71], [1, 41, 61, 71, 91], [1, 41, 61, 71, 81], [1, 41, 61, 71, 81, 91], [1, 41, 51], [1, 41, 51, 91], [1, 41, 51, 81], [1, 41, 51, 81, 91], [1, 41, 51, 71], [1, 41, 51, 71, 91], [1, 41, 51, 71, 81], [1, 41, 51, 71, 81, 91], [1, 41, 51, 61], [1, 41, 51, 61, 91], [1, 41, 51, 61, 81], [1, 41, 51, 61, 81, 91], [1, 41, 51, 61, 71], [1, 41, 51, 61, 71, 91], [1, 41, 51, 61, 71, 81], [1, 41, 51, 61, 71, 81, 91], [1, 31], [1, 31, 91], [1, 31, 81], [1, 31, 81, 91], [1, 31, 71], [1, 31, 71, 91], [1, 31, 71, 81], [1, 31, 71, 81, 91], [1, 31, 61], [1, 31, 61, 91], [1, 31, 61, 81], [1, 31, 61, 81, 91], [1, 31, 61, 71], [1, 31, 61, 71, 91], [1, 31, 61, 71, 81], [1, 31, 61, 71, 81, 91], [1, 31, 51], [1, 31, 51, 91], [1, 31, 51, 81], [1, 31, 51, 81, 91], [1, 31, 51, 71], [1, 31, 51, 71, 91], [1, 31, 51, 71, 81], [1, 31, 51, 71, 81, 91], [1, 31, 51, 61], [1, 31, 51, 61, 91], [1, 31, 51, 61, 81], [1, 31, 51, 61, 81, 91], [1, 31, 51, 61, 71], [1, 31, 51, 61, 71, 91], [1, 31, 51, 61, 71, 81], [1, 31, 51, 61, 71, 81, 91], [1, 31, 41], [1, 31, 41, 91], [1, 31, 41, 81], [1, 31, 41, 81, 91], [1, 31, 41, 71], [1, 31, 41, 71, 91], [1, 31, 41, 71, 81], [1, 31, 41, 71, 81, 91], [1, 31, 41, 61], [1, 31, 41, 61, 91], [1, 31, 41, 61, 81], [1, 31, 41, 61, 81, 91], [1, 31, 41, 61, 71], [1, 31, 41, 61, 71, 91], [1, 31, 41, 61, 71, 81], [1, 31, 41, 61, 71, 81, 91], [1, 31, 41, 51], [1, 31, 41, 51, 91], [1, 31, 41, 51, 81], [1, 31, 41, 51, 81, 91], [1, 31, 41, 51, 71], [1, 31, 41, 51, 71, 91], [1, 31, 41, 51, 71, 81], [1, 31, 41, 51, 71, 81, 91], [1, 31, 41, 51, 61], [1, 31, 41, 51, 61, 91], [1, 31, 41, 51, 61, 81], [1, 31, 41, 51, 61, 81, 91], [1, 31, 41, 51, 61, 71], [1, 31, 41, 51, 61, 71, 91], [1, 31, 41, 51, 61, 71, 81], [1, 31, 41, 51, 61, 71, 81, 91], [1, 21], [1, 21, 91], [1, 21, 81], [1, 21, 81, 91], [1, 21, 71], [1, 21, 71, 91], [1, 21, 71, 81], [1, 21, 71, 81, 91], [1, 21, 61], [1, 21, 61, 91], [1, 21, 61, 81], [1, 21, 61, 81, 91], [1, 21, 61, 71], [1, 21, 61, 71, 91], [1, 21, 61, 71, 81], [1, 21, 61, 71, 81, 91], [1, 21, 51], [1, 21, 51, 91], [1, 21, 51, 81], [1, 21, 51, 81, 91], [1, 21, 51, 71], [1, 21, 51, 71, 91], [1, 21, 51, 71, 81], [1, 21, 51, 71, 81, 91], [1, 21, 51, 61], [1, 21, 51, 61, 91], [1, 21, 51, 61, 81], [1, 21, 51, 61, 81, 91], [1, 21, 51, 61, 71], [1, 21, 51, 61, 71, 91], [1, 21, 51, 61, 71, 81], [1, 21, 51, 61, 71, 81, 91], [1, 21, 41], [1, 21, 41, 91], [1, 21, 41, 81], [1, 21, 41, 81, 91], [1, 21, 41, 71], [1, 21, 41, 71, 91], [1, 21, 41, 71, 81], [1, 21, 41, 71, 81, 91], [1, 21, 41, 61], [1, 21, 41, 61, 91], [1, 21, 41, 61, 81], [1, 21, 41, 61, 81, 91], [1, 21, 41, 61, 71], [1, 21, 41, 61, 71, 91], [1, 21, 41, 61, 71, 81], [1, 21, 41, 61, 71, 81, 91], [1, 21, 41, 51], [1, 21, 41, 51, 91], [1, 21, 41, 51, 81], [1, 21, 41, 51, 81, 91], [1, 21, 41, 51, 71], [1, 21, 41, 51, 71, 91], [1, 21, 41, 51, 71, 81], [1, 21, 41, 51, 71, 81, 91], [1, 21, 41, 51, 61], [1, 21, 41, 51, 61, 91], [1, 21, 41, 51, 61, 81], [1, 21, 41, 51, 61, 81, 91], [1, 21, 41, 51, 61, 71], [1, 21, 41, 51, 61, 71, 91], [1, 21, 41, 51, 61, 71, 81], [1, 21, 41, 51, 61, 71, 81, 91], [1, 21, 31], [1, 21, 31, 91], [1, 21, 31, 81], [1, 21, 31, 81, 91], [1, 21, 31, 71], [1, 21, 31, 71, 91], [1, 21, 31, 71, 81], [1, 21, 31, 71, 81, 91], [1, 21, 31, 61], [1, 21, 31, 61, 91], [1, 21, 31, 61, 81], [1, 21, 31, 61, 81, 91], [1, 21, 31, 61, 71], [1, 21, 31, 61, 71, 91], [1, 21, 31, 61, 71, 81], [1, 21, 31, 61, 71, 81, 91], [1, 21, 31, 51], [1, 21, 31, 51, 91], [1, 21, 31, 51, 81], [1, 21, 31, 51, 81, 91], [1, 21, 31, 51, 71], [1, 21, 31, 51, 71, 91], [1, 21, 31, 51, 71, 81], [1, 21, 31, 51, 71, 81, 91], [1, 21, 31, 51, 61], [1, 21, 31, 51, 61, 91], [1, 21, 31, 51, 61, 81], [1, 21, 31, 51, 61, 81, 91], [1, 21, 31, 51, 61, 71], [1, 21, 31, 51, 61, 71, 91], [1, 21, 31, 51, 61, 71, 81], [1, 21, 31, 51, 61, 71, 81, 91], [1, 21, 31, 41], [1, 21, 31, 41, 91], [1, 21, 31, 41, 81], [1, 21, 31, 41, 81, 91], [1, 21, 31, 41, 71], [1, 21, 31, 41, 71, 91], [1, 21, 31, 41, 71, 81], [1, 21, 31, 41, 71, 81, 91], [1, 21, 31, 41, 61], [1, 21, 31, 41, 61, 91], [1, 21, 31, 41, 61, 81], [1, 21, 31, 41, 61, 81, 91], [1, 21, 31, 41, 61, 71], [1, 21, 31, 41, 61, 71, 91], [1, 21, 31, 41, 61, 71, 81], [1, 21, 31, 41, 61, 71, 81, 91], [1, 21, 31, 41, 51], [1, 21, 31, 41, 51, 91], [1, 21, 31, 41, 51, 81], [1, 21, 31, 41, 51, 81, 91], [1, 21, 31, 41, 51, 71], [1, 21, 31, 41, 51, 71, 91], [1, 21, 31, 41, 51, 71, 81], [1, 21, 31, 41, 51, 71, 81, 91], [1, 21, 31, 41, 51, 61], [1, 21, 31, 41, 51, 61, 91], [1, 21, 31, 41, 51, 61, 81], [1, 21, 31, 41, 51, 61, 81, 91], [1, 21, 31, 41, 51, 61, 71], [1, 21, 31, 41, 51, 61, 71, 91], [1, 21, 31, 41, 51, 61, 71, 81], [1, 21, 31, 41, 51, 61, 71, 81, 91], [1, 11], [1, 11, 91], [1, 11, 81], [1, 11, 81, 91], [1, 11, 71], [1, 11, 71, 91], [1, 11, 71, 81], [1, 11, 71, 81, 91], [1, 11, 61], [1, 11, 61, 91], [1, 11, 61, 81], [1, 11, 61, 81, 91], [1, 11, 61, 71], [1, 11, 61, 71, 91], [1, 11, 61, 71, 81], [1, 11, 61, 71, 81, 91], [1, 11, 51], [1, 11, 51, 91], [1, 11, 51, 81], [1, 11, 51, 81, 91], [1, 11, 51, 71], [1, 11, 51, 71, 91], [1, 11, 51, 71, 81], [1, 11, 51, 71, 81, 91], [1, 11, 51, 61], [1, 11, 51, 61, 91], [1, 11, 51, 61, 81], [1, 11, 51, 61, 81, 91], [1, 11, 51, 61, 71], [1, 11, 51, 61, 71, 91], [1, 11, 51, 61, 71, 81], [1, 11, 51, 61, 71, 81, 91], [1, 11, 41], [1, 11, 41, 91], [1, 11, 41, 81], [1, 11, 41, 81, 91], [1, 11, 41, 71], [1, 11, 41, 71, 91], [1, 11, 41, 71, 81], [1, 11, 41, 71, 81, 91], [1, 11, 41, 61], [1, 11, 41, 61, 91], [1, 11, 41, 61, 81], [1, 11, 41, 61, 81, 91], [1, 11, 41, 61, 71], [1, 11, 41, 61, 71, 91], [1, 11, 41, 61, 71, 81], [1, 11, 41, 61, 71, 81, 91], [1, 11, 41, 51], [1, 11, 41, 51, 91], [1, 11, 41, 51, 81], [1, 11, 41, 51, 81, 91], [1, 11, 41, 51, 71], [1, 11, 41, 51, 71, 91], [1, 11, 41, 51, 71, 81], [1, 11, 41, 51, 71, 81, 91], [1, 11, 41, 51, 61], [1, 11, 41, 51, 61, 91], [1, 11, 41, 51, 61, 81], [1, 11, 41, 51, 61, 81, 91], [1, 11, 41, 51, 61, 71], [1, 11, 41, 51, 61, 71, 91], [1, 11, 41, 51, 61, 71, 81], [1, 11, 41, 51, 61, 71, 81, 91], [1, 11, 31], [1, 11, 31, 91], [1, 11, 31, 81], [1, 11, 31, 81, 91], [1, 11, 31, 71], [1, 11, 31, 71, 91], [1, 11, 31, 71, 81], [1, 11, 31, 71, 81, 91], [1, 11, 31, 61], [1, 11, 31, 61, 91], [1, 11, 31, 61, 81], [1, 11, 31, 61, 81, 91], [1, 11, 31, 61, 71], [1, 11, 31, 61, 71, 91], [1, 11, 31, 61, 71, 81], [1, 11, 31, 61, 71, 81, 91], [1, 11, 31, 51], [1, 11, 31, 51, 91], [1, 11, 31, 51, 81], [1, 11, 31, 51, 81, 91], [1, 11, 31, 51, 71], [1, 11, 31, 51, 71, 91], [1, 11, 31, 51, 71, 81], [1, 11, 31, 51, 71, 81, 91], [1, 11, 31, 51, 61], [1, 11, 31, 51, 61, 91], [1, 11, 31, 51, 61, 81], [1, 11, 31, 51, 61, 81, 91], [1, 11, 31, 51, 61, 71], [1, 11, 31, 51, 61, 71, 91], [1, 11, 31, 51, 61, 71, 81], [1, 11, 31, 51, 61, 71, 81, 91], [1, 11, 31, 41], [1, 11, 31, 41, 91], [1, 11, 31, 41, 81], [1, 11, 31, 41, 81, 91], [1, 11, 31, 41, 71], [1, 11, 31, 41, 71, 91], [1, 11, 31, 41, 71, 81], [1, 11, 31, 41, 71, 81, 91], [1, 11, 31, 41, 61], [1, 11, 31, 41, 61, 91], [1, 11, 31, 41, 61, 81], [1, 11, 31, 41, 61, 81, 91], [1, 11, 31, 41, 61, 71], [1, 11, 31, 41, 61, 71, 91], [1, 11, 31, 41, 61, 71, 81], [1, 11, 31, 41, 61, 71, 81, 91], [1, 11, 31, 41, 51], [1, 11, 31, 41, 51, 91], [1, 11, 31, 41, 51, 81], [1, 11, 31, 41, 51, 81, 91], [1, 11, 31, 41, 51, 71], [1, 11, 31, 41, 51, 71, 91], [1, 11, 31, 41, 51, 71, 81], [1, 11, 31, 41, 51, 71, 81, 91], [1, 11, 31, 41, 51, 61], [1, 11, 31, 41, 51, 61, 91], [1, 11, 31, 41, 51, 61, 81], [1, 11, 31, 41, 51, 61, 81, 91], [1, 11, 31, 41, 51, 61, 71], [1, 11, 31, 41, 51, 61, 71, 91], [1, 11, 31, 41, 51, 61, 71, 81], [1, 11, 31, 41, 51, 61, 71, 81, 91], [1, 11, 21], [1, 11, 21, 91], [1, 11, 21, 81], [1, 11, 21, 81, 91], [1, 11, 21, 71], [1, 11, 21, 71, 91], [1, 11, 21, 71, 81], [1, 11, 21, 71, 81, 91], [1, 11, 21, 61], [1, 11, 21, 61, 91], [1, 11, 21, 61, 81], [1, 11, 21, 61, 81, 91], [1, 11, 21, 61, 71], [1, 11, 21, 61, 71, 91], [1, 11, 21, 61, 71, 81], [1, 11, 21, 61, 71, 81, 91], [1, 11, 21, 51], [1, 11, 21, 51, 91], [1, 11, 21, 51, 81], [1, 11, 21, 51, 81, 91], [1, 11, 21, 51, 71], [1, 11, 21, 51, 71, 91], [1, 11, 21, 51, 71, 81], [1, 11, 21, 51, 71, 81, 91], [1, 11, 21, 51, 61], [1, 11, 21, 51, 61, 91], [1, 11, 21, 51, 61, 81], [1, 11, 21, 51, 61, 81, 91], [1, 11, 21, 51, 61, 71], [1, 11, 21, 51, 61, 71, 91], [1, 11, 21, 51, 61, 71, 81], [1, 11, 21, 51, 61, 71, 81, 91], [1, 11, 21, 41], [1, 11, 21, 41, 91], [1, 11, 21, 41, 81], [1, 11, 21, 41, 81, 91], [1, 11, 21, 41, 71], [1, 11, 21, 41, 71, 91], [1, 11, 21, 41, 71, 81], [1, 11, 21, 41, 71, 81, 91], [1, 11, 21, 41, 61], [1, 11, 21, 41, 61, 91], [1, 11, 21, 41, 61, 81], [1, 11, 21, 41, 61, 81, 91], [1, 11, 21, 41, 61, 71], [1, 11, 21, 41, 61, 71, 91], [1, 11, 21, 41, 61, 71, 81], [1, 11, 21, 41, 61, 71, 81, 91], [1, 11, 21, 41, 51], [1, 11, 21, 41, 51, 91], [1, 11, 21, 41, 51, 81], [1, 11, 21, 41, 51, 81, 91], [1, 11, 21, 41, 51, 71], [1, 11, 21, 41, 51, 71, 91], [1, 11, 21, 41, 51, 71, 81], [1, 11, 21, 41, 51, 71, 81, 91], [1, 11, 21, 41, 51, 61], [1, 11, 21, 41, 51, 61, 91], [1, 11, 21, 41, 51, 61, 81], [1, 11, 21, 41, 51, 61, 81, 91], [1, 11, 21, 41, 51, 61, 71], [1, 11, 21, 41, 51, 61, 71, 91], [1, 11, 21, 41, 51, 61, 71, 81], [1, 11, 21, 41, 51, 61, 71, 81, 91], [1, 11, 21, 31], [1, 11, 21, 31, 91], [1, 11, 21, 31, 81], [1, 11, 21, 31, 81, 91], [1, 11, 21, 31, 71], [1, 11, 21, 31, 71, 91], [1, 11, 21, 31, 71, 81], [1, 11, 21, 31, 71, 81, 91], [1, 11, 21, 31, 61], [1, 11, 21, 31, 61, 91], [1, 11, 21, 31, 61, 81], [1, 11, 21, 31, 61, 81, 91], [1, 11, 21, 31, 61, 71], [1, 11, 21, 31, 61, 71, 91], [1, 11, 21, 31, 61, 71, 81], [1, 11, 21, 31, 61, 71, 81, 91], [1, 11, 21, 31, 51], [1, 11, 21, 31, 51, 91], [1, 11, 21, 31, 51, 81], [1, 11, 21, 31, 51, 81, 91], [1, 11, 21, 31, 51, 71], [1, 11, 21, 31, 51, 71, 91], [1, 11, 21, 31, 51, 71, 81], [1, 11, 21, 31, 51, 71, 81, 91], [1, 11, 21, 31, 51, 61], [1, 11, 21, 31, 51, 61, 91], [1, 11, 21, 31, 51, 61, 81], [1, 11, 21, 31, 51, 61, 81, 91], [1, 11, 21, 31, 51, 61, 71], [1, 11, 21, 31, 51, 61, 71, 91], [1, 11, 21, 31, 51, 61, 71, 81], [1, 11, 21, 31, 51, 61, 71, 81, 91], [1, 11, 21, 31, 41], [1, 11, 21, 31, 41, 91], [1, 11, 21, 31, 41, 81], [1, 11, 21, 31, 41, 81, 91], [1, 11, 21, 31, 41, 71], [1, 11, 21, 31, 41, 71, 91], [1, 11, 21, 31, 41, 71, 81], [1, 11, 21, 31, 41, 71, 81, 91], [1, 11, 21, 31, 41, 61], [1, 11, 21, 31, 41, 61, 91], [1, 11, 21, 31, 41, 61, 81], [1, 11, 21, 31, 41, 61, 81, 91], [1, 11, 21, 31, 41, 61, 71], [1, 11, 21, 31, 41, 61, 71, 91], [1, 11, 21, 31, 41, 61, 71, 81], [1, 11, 21, 31, 41, 61, 71, 81, 91], [1, 11, 21, 31, 41, 51], [1, 11, 21, 31, 41, 51, 91], [1, 11, 21, 31, 41, 51, 81], [1, 11, 21, 31, 41, 51, 81, 91], [1, 11, 21, 31, 41, 51, 71], [1, 11, 21, 31, 41, 51, 71, 91], [1, 11, 21, 31, 41, 51, 71, 81], [1, 11, 21, 31, 41, 51, 71, 81, 91], [1, 11, 21, 31, 41, 51, 61], [1, 11, 21, 31, 41, 51, 61, 91], [1, 11, 21, 31, 41, 51, 61, 81], [1, 11, 21, 31, 41, 51, 61, 81, 91], [1, 11, 21, 31, 41, 51, 61, 71], [1, 11, 21, 31, 41, 51, 61, 71, 91], [1, 11, 21, 31, 41, 51, 61, 71, 81], [1, 11, 21, 31, 41, 51, 61, 71, 81, 91]]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == [[], [1000], [900], [900, 1000], [800], [800, 1000], [800, 900], [800, 900, 1000], [700], [700, 1000], [700, 900], [700, 900, 1000], [700, 800], [700, 800, 1000], [700, 800, 900], [700, 800, 900, 1000], [600], [600, 1000], [600, 900], [600, 900, 1000], [600, 800], [600, 800, 1000], [600, 800, 900], [600, 800, 900, 1000], [600, 700], [600, 700, 1000], [600, 700, 900], [600, 700, 900, 1000], [600, 700, 800], [600, 700, 800, 1000], [600, 700, 800, 900], [600, 700, 800, 900, 1000], [500], [500, 1000], [500, 900], [500, 900, 1000], [500, 800], [500, 800, 1000], [500, 800, 900], [500, 800, 900, 1000], [500, 700], [500, 700, 1000], [500, 700, 900], [500, 700, 900, 1000], [500, 700, 800], [500, 700, 800, 1000], [500, 700, 800, 900], [500, 700, 800, 900, 1000], [500, 600], [500, 600, 1000], [500, 600, 900], [500, 600, 900, 1000], [500, 600, 800], [500, 600, 800, 1000], [500, 600, 800, 900], [500, 600, 800, 900, 1000], [500, 600, 700], [500, 600, 700, 1000], [500, 600, 700, 900], [500, 600, 700, 900, 1000], [500, 600, 700, 800], [500, 600, 700, 800, 1000], [500, 600, 700, 800, 900], [500, 600, 700, 800, 900, 1000], [400], [400, 1000], [400, 900], [400, 900, 1000], [400, 800], [400, 800, 1000], [400, 800, 900], [400, 800, 900, 1000], [400, 700], [400, 700, 1000], [400, 700, 900], [400, 700, 900, 1000], [400, 700, 800], [400, 700, 800, 1000], [400, 700, 800, 900], [400, 700, 800, 900, 1000], [400, 600], [400, 600, 1000], [400, 600, 900], [400, 600, 900, 1000], [400, 600, 800], [400, 600, 800, 1000], [400, 600, 800, 900], [400, 600, 800, 900, 1000], [400, 600, 700], [400, 600, 700, 1000], [400, 600, 700, 900], [400, 600, 700, 900, 1000], [400, 600, 700, 800], [400, 600, 700, 800, 1000], [400, 600, 700, 800, 900], [400, 600, 700, 800, 900, 1000], [400, 500], [400, 500, 1000], [400, 500, 900], [400, 500, 900, 1000], [400, 500, 800], [400, 500, 800, 1000], [400, 500, 800, 900], [400, 500, 800, 900, 1000], [400, 500, 700], [400, 500, 700, 1000], [400, 500, 700, 900], [400, 500, 700, 900, 1000], [400, 500, 700, 800], [400, 500, 700, 800, 1000], [400, 500, 700, 800, 900], [400, 500, 700, 800, 900, 1000], [400, 500, 600], [400, 500, 600, 1000], [400, 500, 600, 900], [400, 500, 600, 900, 1000], [400, 500, 600, 800], [400, 500, 600, 800, 1000], [400, 500, 600, 800, 900], [400, 500, 600, 800, 900, 1000], [400, 500, 600, 700], [400, 500, 600, 700, 1000], [400, 500, 600, 700, 900], [400, 500, 600, 700, 900, 1000], [400, 500, 600, 700, 800], [400, 500, 600, 700, 800, 1000], [400, 500, 600, 700, 800, 900], [400, 500, 600, 700, 800, 900, 1000], [300], [300, 1000], [300, 900], [300, 900, 1000], [300, 800], [300, 800, 1000], [300, 800, 900], [300, 800, 900, 1000], [300, 700], [300, 700, 1000], [300, 700, 900], [300, 700, 900, 1000], [300, 700, 800], [300, 700, 800, 1000], [300, 700, 800, 900], [300, 700, 800, 900, 1000], [300, 600], [300, 600, 1000], [300, 600, 900], [300, 600, 900, 1000], [300, 600, 800], [300, 600, 800, 1000], [300, 600, 800, 900], [300, 600, 800, 900, 1000], [300, 600, 700], [300, 600, 700, 1000], [300, 600, 700, 900], [300, 600, 700, 900, 1000], [300, 600, 700, 800], [300, 600, 700, 800, 1000], [300, 600, 700, 800, 900], [300, 600, 700, 800, 900, 1000], [300, 500], [300, 500, 1000], [300, 500, 900], [300, 500, 900, 1000], [300, 500, 800], [300, 500, 800, 1000], [300, 500, 800, 900], [300, 500, 800, 900, 1000], [300, 500, 700], [300, 500, 700, 1000], [300, 500, 700, 900], [300, 500, 700, 900, 1000], [300, 500, 700, 800], [300, 500, 700, 800, 1000], [300, 500, 700, 800, 900], [300, 500, 700, 800, 900, 1000], [300, 500, 600], [300, 500, 600, 1000], [300, 500, 600, 900], [300, 500, 600, 900, 1000], [300, 500, 600, 800], [300, 500, 600, 800, 1000], [300, 500, 600, 800, 900], [300, 500, 600, 800, 900, 1000], [300, 500, 600, 700], [300, 500, 600, 700, 1000], [300, 500, 600, 700, 900], [300, 500, 600, 700, 900, 1000], [300, 500, 600, 700, 800], [300, 500, 600, 700, 800, 1000], [300, 500, 600, 700, 800, 900], [300, 500, 600, 700, 800, 900, 1000], [300, 400], [300, 400, 1000], [300, 400, 900], [300, 400, 900, 1000], [300, 400, 800], [300, 400, 800, 1000], [300, 400, 800, 900], [300, 400, 800, 900, 1000], [300, 400, 700], [300, 400, 700, 1000], [300, 400, 700, 900], [300, 400, 700, 900, 1000], [300, 400, 700, 800], [300, 400, 700, 800, 1000], [300, 400, 700, 800, 900], [300, 400, 700, 800, 900, 1000], [300, 400, 600], [300, 400, 600, 1000], [300, 400, 600, 900], [300, 400, 600, 900, 1000], [300, 400, 600, 800], [300, 400, 600, 800, 1000], [300, 400, 600, 800, 900], [300, 400, 600, 800, 900, 1000], [300, 400, 600, 700], [300, 400, 600, 700, 1000], [300, 400, 600, 700, 900], [300, 400, 600, 700, 900, 1000], [300, 400, 600, 700, 800], [300, 400, 600, 700, 800, 1000], [300, 400, 600, 700, 800, 900], [300, 400, 600, 700, 800, 900, 1000], [300, 400, 500], [300, 400, 500, 1000], [300, 400, 500, 900], [300, 400, 500, 900, 1000], [300, 400, 500, 800], [300, 400, 500, 800, 1000], [300, 400, 500, 800, 900], [300, 400, 500, 800, 900, 1000], [300, 400, 500, 700], [300, 400, 500, 700, 1000], [300, 400, 500, 700, 900], [300, 400, 500, 700, 900, 1000], [300, 400, 500, 700, 800], [300, 400, 500, 700, 800, 1000], [300, 400, 500, 700, 800, 900], [300, 400, 500, 700, 800, 900, 1000], [300, 400, 500, 600], [300, 400, 500, 600, 1000], [300, 400, 500, 600, 900], [300, 400, 500, 600, 900, 1000], [300, 400, 500, 600, 800], [300, 400, 500, 600, 800, 1000], [300, 400, 500, 600, 800, 900], [300, 400, 500, 600, 800, 900, 1000], [300, 400, 500, 600, 700], [300, 400, 500, 600, 700, 1000], [300, 400, 500, 600, 700, 900], [300, 400, 500, 600, 700, 900, 1000], [300, 400, 500, 600, 700, 800], [300, 400, 500, 600, 700, 800, 1000], [300, 400, 500, 600, 700, 800, 900], [300, 400, 500, 600, 700, 800, 900, 1000], [200], [200, 1000], [200, 900], [200, 900, 1000], [200, 800], [200, 800, 1000], [200, 800, 900], [200, 800, 900, 1000], [200, 700], [200, 700, 1000], [200, 700, 900], [200, 700, 900, 1000], [200, 700, 800], [200, 700, 800, 1000], [200, 700, 800, 900], [200, 700, 800, 900, 1000], [200, 600], [200, 600, 1000], [200, 600, 900], [200, 600, 900, 1000], [200, 600, 800], [200, 600, 800, 1000], [200, 600, 800, 900], [200, 600, 800, 900, 1000], [200, 600, 700], [200, 600, 700, 1000], [200, 600, 700, 900], [200, 600, 700, 900, 1000], [200, 600, 700, 800], [200, 600, 700, 800, 1000], [200, 600, 700, 800, 900], [200, 600, 700, 800, 900, 1000], [200, 500], [200, 500, 1000], [200, 500, 900], [200, 500, 900, 1000], [200, 500, 800], [200, 500, 800, 1000], [200, 500, 800, 900], [200, 500, 800, 900, 1000], [200, 500, 700], [200, 500, 700, 1000], [200, 500, 700, 900], [200, 500, 700, 900, 1000], [200, 500, 700, 800], [200, 500, 700, 800, 1000], [200, 500, 700, 800, 900], [200, 500, 700, 800, 900, 1000], [200, 500, 600], [200, 500, 600, 1000], [200, 500, 600, 900], [200, 500, 600, 900, 1000], [200, 500, 600, 800], [200, 500, 600, 800, 1000], [200, 500, 600, 800, 900], [200, 500, 600, 800, 900, 1000], [200, 500, 600, 700], [200, 500, 600, 700, 1000], [200, 500, 600, 700, 900], [200, 500, 600, 700, 900, 1000], [200, 500, 600, 700, 800], [200, 500, 600, 700, 800, 1000], [200, 500, 600, 700, 800, 900], [200, 500, 600, 700, 800, 900, 1000], [200, 400], [200, 400, 1000], [200, 400, 900], [200, 400, 900, 1000], [200, 400, 800], [200, 400, 800, 1000], [200, 400, 800, 900], [200, 400, 800, 900, 1000], [200, 400, 700], [200, 400, 700, 1000], [200, 400, 700, 900], [200, 400, 700, 900, 1000], [200, 400, 700, 800], [200, 400, 700, 800, 1000], [200, 400, 700, 800, 900], [200, 400, 700, 800, 900, 1000], [200, 400, 600], [200, 400, 600, 1000], [200, 400, 600, 900], [200, 400, 600, 900, 1000], [200, 400, 600, 800], [200, 400, 600, 800, 1000], [200, 400, 600, 800, 900], [200, 400, 600, 800, 900, 1000], [200, 400, 600, 700], [200, 400, 600, 700, 1000], [200, 400, 600, 700, 900], [200, 400, 600, 700, 900, 1000], [200, 400, 600, 700, 800], [200, 400, 600, 700, 800, 1000], [200, 400, 600, 700, 800, 900], [200, 400, 600, 700, 800, 900, 1000], [200, 400, 500], [200, 400, 500, 1000], [200, 400, 500, 900], [200, 400, 500, 900, 1000], [200, 400, 500, 800], [200, 400, 500, 800, 1000], [200, 400, 500, 800, 900], [200, 400, 500, 800, 900, 1000], [200, 400, 500, 700], [200, 400, 500, 700, 1000], [200, 400, 500, 700, 900], [200, 400, 500, 700, 900, 1000], [200, 400, 500, 700, 800], [200, 400, 500, 700, 800, 1000], [200, 400, 500, 700, 800, 900], [200, 400, 500, 700, 800, 900, 1000], [200, 400, 500, 600], [200, 400, 500, 600, 1000], [200, 400, 500, 600, 900], [200, 400, 500, 600, 900, 1000], [200, 400, 500, 600, 800], [200, 400, 500, 600, 800, 1000], [200, 400, 500, 600, 800, 900], [200, 400, 500, 600, 800, 900, 1000], [200, 400, 500, 600, 700], [200, 400, 500, 600, 700, 1000], [200, 400, 500, 600, 700, 900], [200, 400, 500, 600, 700, 900, 1000], [200, 400, 500, 600, 700, 800], [200, 400, 500, 600, 700, 800, 1000], [200, 400, 500, 600, 700, 800, 900], [200, 400, 500, 600, 700, 800, 900, 1000], [200, 300], [200, 300, 1000], [200, 300, 900], [200, 300, 900, 1000], [200, 300, 800], [200, 300, 800, 1000], [200, 300, 800, 900], [200, 300, 800, 900, 1000], [200, 300, 700], [200, 300, 700, 1000], [200, 300, 700, 900], [200, 300, 700, 900, 1000], [200, 300, 700, 800], [200, 300, 700, 800, 1000], [200, 300, 700, 800, 900], [200, 300, 700, 800, 900, 1000], [200, 300, 600], [200, 300, 600, 1000], [200, 300, 600, 900], [200, 300, 600, 900, 1000], [200, 300, 600, 800], [200, 300, 600, 800, 1000], [200, 300, 600, 800, 900], [200, 300, 600, 800, 900, 1000], [200, 300, 600, 700], [200, 300, 600, 700, 1000], [200, 300, 600, 700, 900], [200, 300, 600, 700, 900, 1000], [200, 300, 600, 700, 800], [200, 300, 600, 700, 800, 1000], [200, 300, 600, 700, 800, 900], [200, 300, 600, 700, 800, 900, 1000], [200, 300, 500], [200, 300, 500, 1000], [200, 300, 500, 900], [200, 300, 500, 900, 1000], [200, 300, 500, 800], [200, 300, 500, 800, 1000], [200, 300, 500, 800, 900], [200, 300, 500, 800, 900, 1000], [200, 300, 500, 700], [200, 300, 500, 700, 1000], [200, 300, 500, 700, 900], [200, 300, 500, 700, 900, 1000], [200, 300, 500, 700, 800], [200, 300, 500, 700, 800, 1000], [200, 300, 500, 700, 800, 900], [200, 300, 500, 700, 800, 900, 1000], [200, 300, 500, 600], [200, 300, 500, 600, 1000], [200, 300, 500, 600, 900], [200, 300, 500, 600, 900, 1000], [200, 300, 500, 600, 800], [200, 300, 500, 600, 800, 1000], [200, 300, 500, 600, 800, 900], [200, 300, 500, 600, 800, 900, 1000], [200, 300, 500, 600, 700], [200, 300, 500, 600, 700, 1000], [200, 300, 500, 600, 700, 900], [200, 300, 500, 600, 700, 900, 1000], [200, 300, 500, 600, 700, 800], [200, 300, 500, 600, 700, 800, 1000], [200, 300, 500, 600, 700, 800, 900], [200, 300, 500, 600, 700, 800, 900, 1000], [200, 300, 400], [200, 300, 400, 1000], [200, 300, 400, 900], [200, 300, 400, 900, 1000], [200, 300, 400, 800], [200, 300, 400, 800, 1000], [200, 300, 400, 800, 900], [200, 300, 400, 800, 900, 1000], [200, 300, 400, 700], [200, 300, 400, 700, 1000], [200, 300, 400, 700, 900], [200, 300, 400, 700, 900, 1000], [200, 300, 400, 700, 800], [200, 300, 400, 700, 800, 1000], [200, 300, 400, 700, 800, 900], [200, 300, 400, 700, 800, 900, 1000], [200, 300, 400, 600], [200, 300, 400, 600, 1000], [200, 300, 400, 600, 900], [200, 300, 400, 600, 900, 1000], [200, 300, 400, 600, 800], [200, 300, 400, 600, 800, 1000], [200, 300, 400, 600, 800, 900], [200, 300, 400, 600, 800, 900, 1000], [200, 300, 400, 600, 700], [200, 300, 400, 600, 700, 1000], [200, 300, 400, 600, 700, 900], [200, 300, 400, 600, 700, 900, 1000], [200, 300, 400, 600, 700, 800], [200, 300, 400, 600, 700, 800, 1000], [200, 300, 400, 600, 700, 800, 900], [200, 300, 400, 600, 700, 800, 900, 1000], [200, 300, 400, 500], [200, 300, 400, 500, 1000], [200, 300, 400, 500, 900], [200, 300, 400, 500, 900, 1000], [200, 300, 400, 500, 800], [200, 300, 400, 500, 800, 1000], [200, 300, 400, 500, 800, 900], [200, 300, 400, 500, 800, 900, 1000], [200, 300, 400, 500, 700], [200, 300, 400, 500, 700, 1000], [200, 300, 400, 500, 700, 900], [200, 300, 400, 500, 700, 900, 1000], [200, 300, 400, 500, 700, 800], [200, 300, 400, 500, 700, 800, 1000], [200, 300, 400, 500, 700, 800, 900], [200, 300, 400, 500, 700, 800, 900, 1000], [200, 300, 400, 500, 600], [200, 300, 400, 500, 600, 1000], [200, 300, 400, 500, 600, 900], [200, 300, 400, 500, 600, 900, 1000], [200, 300, 400, 500, 600, 800], [200, 300, 400, 500, 600, 800, 1000], [200, 300, 400, 500, 600, 800, 900], [200, 300, 400, 500, 600, 800, 900, 1000], [200, 300, 400, 500, 600, 700], [200, 300, 400, 500, 600, 700, 1000], [200, 300, 400, 500, 600, 700, 900], [200, 300, 400, 500, 600, 700, 900, 1000], [200, 300, 400, 500, 600, 700, 800], [200, 300, 400, 500, 600, 700, 800, 1000], [200, 300, 400, 500, 600, 700, 800, 900], [200, 300, 400, 500, 600, 700, 800, 900, 1000], [100], [100, 1000], [100, 900], [100, 900, 1000], [100, 800], [100, 800, 1000], [100, 800, 900], [100, 800, 900, 1000], [100, 700], [100, 700, 1000], [100, 700, 900], [100, 700, 900, 1000], [100, 700, 800], [100, 700, 800, 1000], [100, 700, 800, 900], [100, 700, 800, 900, 1000], [100, 600], [100, 600, 1000], [100, 600, 900], [100, 600, 900, 1000], [100, 600, 800], [100, 600, 800, 1000], [100, 600, 800, 900], [100, 600, 800, 900, 1000], [100, 600, 700], [100, 600, 700, 1000], [100, 600, 700, 900], [100, 600, 700, 900, 1000], [100, 600, 700, 800], [100, 600, 700, 800, 1000], [100, 600, 700, 800, 900], [100, 600, 700, 800, 900, 1000], [100, 500], [100, 500, 1000], [100, 500, 900], [100, 500, 900, 1000], [100, 500, 800], [100, 500, 800, 1000], [100, 500, 800, 900], [100, 500, 800, 900, 1000], [100, 500, 700], [100, 500, 700, 1000], [100, 500, 700, 900], [100, 500, 700, 900, 1000], [100, 500, 700, 800], [100, 500, 700, 800, 1000], [100, 500, 700, 800, 900], [100, 500, 700, 800, 900, 1000], [100, 500, 600], [100, 500, 600, 1000], [100, 500, 600, 900], [100, 500, 600, 900, 1000], [100, 500, 600, 800], [100, 500, 600, 800, 1000], [100, 500, 600, 800, 900], [100, 500, 600, 800, 900, 1000], [100, 500, 600, 700], [100, 500, 600, 700, 1000], [100, 500, 600, 700, 900], [100, 500, 600, 700, 900, 1000], [100, 500, 600, 700, 800], [100, 500, 600, 700, 800, 1000], [100, 500, 600, 700, 800, 900], [100, 500, 600, 700, 800, 900, 1000], [100, 400], [100, 400, 1000], [100, 400, 900], [100, 400, 900, 1000], [100, 400, 800], [100, 400, 800, 1000], [100, 400, 800, 900], [100, 400, 800, 900, 1000], [100, 400, 700], [100, 400, 700, 1000], [100, 400, 700, 900], [100, 400, 700, 900, 1000], [100, 400, 700, 800], [100, 400, 700, 800, 1000], [100, 400, 700, 800, 900], [100, 400, 700, 800, 900, 1000], [100, 400, 600], [100, 400, 600, 1000], [100, 400, 600, 900], [100, 400, 600, 900, 1000], [100, 400, 600, 800], [100, 400, 600, 800, 1000], [100, 400, 600, 800, 900], [100, 400, 600, 800, 900, 1000], [100, 400, 600, 700], [100, 400, 600, 700, 1000], [100, 400, 600, 700, 900], [100, 400, 600, 700, 900, 1000], [100, 400, 600, 700, 800], [100, 400, 600, 700, 800, 1000], [100, 400, 600, 700, 800, 900], [100, 400, 600, 700, 800, 900, 1000], [100, 400, 500], [100, 400, 500, 1000], [100, 400, 500, 900], [100, 400, 500, 900, 1000], [100, 400, 500, 800], [100, 400, 500, 800, 1000], [100, 400, 500, 800, 900], [100, 400, 500, 800, 900, 1000], [100, 400, 500, 700], [100, 400, 500, 700, 1000], [100, 400, 500, 700, 900], [100, 400, 500, 700, 900, 1000], [100, 400, 500, 700, 800], [100, 400, 500, 700, 800, 1000], [100, 400, 500, 700, 800, 900], [100, 400, 500, 700, 800, 900, 1000], [100, 400, 500, 600], [100, 400, 500, 600, 1000], [100, 400, 500, 600, 900], [100, 400, 500, 600, 900, 1000], [100, 400, 500, 600, 800], [100, 400, 500, 600, 800, 1000], [100, 400, 500, 600, 800, 900], [100, 400, 500, 600, 800, 900, 1000], [100, 400, 500, 600, 700], [100, 400, 500, 600, 700, 1000], [100, 400, 500, 600, 700, 900], [100, 400, 500, 600, 700, 900, 1000], [100, 400, 500, 600, 700, 800], [100, 400, 500, 600, 700, 800, 1000], [100, 400, 500, 600, 700, 800, 900], [100, 400, 500, 600, 700, 800, 900, 1000], [100, 300], [100, 300, 1000], [100, 300, 900], [100, 300, 900, 1000], [100, 300, 800], [100, 300, 800, 1000], [100, 300, 800, 900], [100, 300, 800, 900, 1000], [100, 300, 700], [100, 300, 700, 1000], [100, 300, 700, 900], [100, 300, 700, 900, 1000], [100, 300, 700, 800], [100, 300, 700, 800, 1000], [100, 300, 700, 800, 900], [100, 300, 700, 800, 900, 1000], [100, 300, 600], [100, 300, 600, 1000], [100, 300, 600, 900], [100, 300, 600, 900, 1000], [100, 300, 600, 800], [100, 300, 600, 800, 1000], [100, 300, 600, 800, 900], [100, 300, 600, 800, 900, 1000], [100, 300, 600, 700], [100, 300, 600, 700, 1000], [100, 300, 600, 700, 900], [100, 300, 600, 700, 900, 1000], [100, 300, 600, 700, 800], [100, 300, 600, 700, 800, 1000], [100, 300, 600, 700, 800, 900], [100, 300, 600, 700, 800, 900, 1000], [100, 300, 500], [100, 300, 500, 1000], [100, 300, 500, 900], [100, 300, 500, 900, 1000], [100, 300, 500, 800], [100, 300, 500, 800, 1000], [100, 300, 500, 800, 900], [100, 300, 500, 800, 900, 1000], [100, 300, 500, 700], [100, 300, 500, 700, 1000], [100, 300, 500, 700, 900], [100, 300, 500, 700, 900, 1000], [100, 300, 500, 700, 800], [100, 300, 500, 700, 800, 1000], [100, 300, 500, 700, 800, 900], [100, 300, 500, 700, 800, 900, 1000], [100, 300, 500, 600], [100, 300, 500, 600, 1000], [100, 300, 500, 600, 900], [100, 300, 500, 600, 900, 1000], [100, 300, 500, 600, 800], [100, 300, 500, 600, 800, 1000], [100, 300, 500, 600, 800, 900], [100, 300, 500, 600, 800, 900, 1000], [100, 300, 500, 600, 700], [100, 300, 500, 600, 700, 1000], [100, 300, 500, 600, 700, 900], [100, 300, 500, 600, 700, 900, 1000], [100, 300, 500, 600, 700, 800], [100, 300, 500, 600, 700, 800, 1000], [100, 300, 500, 600, 700, 800, 900], [100, 300, 500, 600, 700, 800, 900, 1000], [100, 300, 400], [100, 300, 400, 1000], [100, 300, 400, 900], [100, 300, 400, 900, 1000], [100, 300, 400, 800], [100, 300, 400, 800, 1000], [100, 300, 400, 800, 900], [100, 300, 400, 800, 900, 1000], [100, 300, 400, 700], [100, 300, 400, 700, 1000], [100, 300, 400, 700, 900], [100, 300, 400, 700, 900, 1000], [100, 300, 400, 700, 800], [100, 300, 400, 700, 800, 1000], [100, 300, 400, 700, 800, 900], [100, 300, 400, 700, 800, 900, 1000], [100, 300, 400, 600], [100, 300, 400, 600, 1000], [100, 300, 400, 600, 900], [100, 300, 400, 600, 900, 1000], [100, 300, 400, 600, 800], [100, 300, 400, 600, 800, 1000], [100, 300, 400, 600, 800, 900], [100, 300, 400, 600, 800, 900, 1000], [100, 300, 400, 600, 700], [100, 300, 400, 600, 700, 1000], [100, 300, 400, 600, 700, 900], [100, 300, 400, 600, 700, 900, 1000], [100, 300, 400, 600, 700, 800], [100, 300, 400, 600, 700, 800, 1000], [100, 300, 400, 600, 700, 800, 900], [100, 300, 400, 600, 700, 800, 900, 1000], [100, 300, 400, 500], [100, 300, 400, 500, 1000], [100, 300, 400, 500, 900], [100, 300, 400, 500, 900, 1000], [100, 300, 400, 500, 800], [100, 300, 400, 500, 800, 1000], [100, 300, 400, 500, 800, 900], [100, 300, 400, 500, 800, 900, 1000], [100, 300, 400, 500, 700], [100, 300, 400, 500, 700, 1000], [100, 300, 400, 500, 700, 900], [100, 300, 400, 500, 700, 900, 1000], [100, 300, 400, 500, 700, 800], [100, 300, 400, 500, 700, 800, 1000], [100, 300, 400, 500, 700, 800, 900], [100, 300, 400, 500, 700, 800, 900, 1000], [100, 300, 400, 500, 600], [100, 300, 400, 500, 600, 1000], [100, 300, 400, 500, 600, 900], [100, 300, 400, 500, 600, 900, 1000], [100, 300, 400, 500, 600, 800], [100, 300, 400, 500, 600, 800, 1000], [100, 300, 400, 500, 600, 800, 900], [100, 300, 400, 500, 600, 800, 900, 1000], [100, 300, 400, 500, 600, 700], [100, 300, 400, 500, 600, 700, 1000], [100, 300, 400, 500, 600, 700, 900], [100, 300, 400, 500, 600, 700, 900, 1000], [100, 300, 400, 500, 600, 700, 800], [100, 300, 400, 500, 600, 700, 800, 1000], [100, 300, 400, 500, 600, 700, 800, 900], [100, 300, 400, 500, 600, 700, 800, 900, 1000], [100, 200], [100, 200, 1000], [100, 200, 900], [100, 200, 900, 1000], [100, 200, 800], [100, 200, 800, 1000], [100, 200, 800, 900], [100, 200, 800, 900, 1000], [100, 200, 700], [100, 200, 700, 1000], [100, 200, 700, 900], [100, 200, 700, 900, 1000], [100, 200, 700, 800], [100, 200, 700, 800, 1000], [100, 200, 700, 800, 900], [100, 200, 700, 800, 900, 1000], [100, 200, 600], [100, 200, 600, 1000], [100, 200, 600, 900], [100, 200, 600, 900, 1000], [100, 200, 600, 800], [100, 200, 600, 800, 1000], [100, 200, 600, 800, 900], [100, 200, 600, 800, 900, 1000], [100, 200, 600, 700], [100, 200, 600, 700, 1000], [100, 200, 600, 700, 900], [100, 200, 600, 700, 900, 1000], [100, 200, 600, 700, 800], [100, 200, 600, 700, 800, 1000], [100, 200, 600, 700, 800, 900], [100, 200, 600, 700, 800, 900, 1000], [100, 200, 500], [100, 200, 500, 1000], [100, 200, 500, 900], [100, 200, 500, 900, 1000], [100, 200, 500, 800], [100, 200, 500, 800, 1000], [100, 200, 500, 800, 900], [100, 200, 500, 800, 900, 1000], [100, 200, 500, 700], [100, 200, 500, 700, 1000], [100, 200, 500, 700, 900], [100, 200, 500, 700, 900, 1000], [100, 200, 500, 700, 800], [100, 200, 500, 700, 800, 1000], [100, 200, 500, 700, 800, 900], [100, 200, 500, 700, 800, 900, 1000], [100, 200, 500, 600], [100, 200, 500, 600, 1000], [100, 200, 500, 600, 900], [100, 200, 500, 600, 900, 1000], [100, 200, 500, 600, 800], [100, 200, 500, 600, 800, 1000], [100, 200, 500, 600, 800, 900], [100, 200, 500, 600, 800, 900, 1000], [100, 200, 500, 600, 700], [100, 200, 500, 600, 700, 1000], [100, 200, 500, 600, 700, 900], [100, 200, 500, 600, 700, 900, 1000], [100, 200, 500, 600, 700, 800], [100, 200, 500, 600, 700, 800, 1000], [100, 200, 500, 600, 700, 800, 900], [100, 200, 500, 600, 700, 800, 900, 1000], [100, 200, 400], [100, 200, 400, 1000], [100, 200, 400, 900], [100, 200, 400, 900, 1000], [100, 200, 400, 800], [100, 200, 400, 800, 1000], [100, 200, 400, 800, 900], [100, 200, 400, 800, 900, 1000], [100, 200, 400, 700], [100, 200, 400, 700, 1000], [100, 200, 400, 700, 900], [100, 200, 400, 700, 900, 1000], [100, 200, 400, 700, 800], [100, 200, 400, 700, 800, 1000], [100, 200, 400, 700, 800, 900], [100, 200, 400, 700, 800, 900, 1000], [100, 200, 400, 600], [100, 200, 400, 600, 1000], [100, 200, 400, 600, 900], [100, 200, 400, 600, 900, 1000], [100, 200, 400, 600, 800], [100, 200, 400, 600, 800, 1000], [100, 200, 400, 600, 800, 900], [100, 200, 400, 600, 800, 900, 1000], [100, 200, 400, 600, 700], [100, 200, 400, 600, 700, 1000], [100, 200, 400, 600, 700, 900], [100, 200, 400, 600, 700, 900, 1000], [100, 200, 400, 600, 700, 800], [100, 200, 400, 600, 700, 800, 1000], [100, 200, 400, 600, 700, 800, 900], [100, 200, 400, 600, 700, 800, 900, 1000], [100, 200, 400, 500], [100, 200, 400, 500, 1000], [100, 200, 400, 500, 900], [100, 200, 400, 500, 900, 1000], [100, 200, 400, 500, 800], [100, 200, 400, 500, 800, 1000], [100, 200, 400, 500, 800, 900], [100, 200, 400, 500, 800, 900, 1000], [100, 200, 400, 500, 700], [100, 200, 400, 500, 700, 1000], [100, 200, 400, 500, 700, 900], [100, 200, 400, 500, 700, 900, 1000], [100, 200, 400, 500, 700, 800], [100, 200, 400, 500, 700, 800, 1000], [100, 200, 400, 500, 700, 800, 900], [100, 200, 400, 500, 700, 800, 900, 1000], [100, 200, 400, 500, 600], [100, 200, 400, 500, 600, 1000], [100, 200, 400, 500, 600, 900], [100, 200, 400, 500, 600, 900, 1000], [100, 200, 400, 500, 600, 800], [100, 200, 400, 500, 600, 800, 1000], [100, 200, 400, 500, 600, 800, 900], [100, 200, 400, 500, 600, 800, 900, 1000], [100, 200, 400, 500, 600, 700], [100, 200, 400, 500, 600, 700, 1000], [100, 200, 400, 500, 600, 700, 900], [100, 200, 400, 500, 600, 700, 900, 1000], [100, 200, 400, 500, 600, 700, 800], [100, 200, 400, 500, 600, 700, 800, 1000], [100, 200, 400, 500, 600, 700, 800, 900], [100, 200, 400, 500, 600, 700, 800, 900, 1000], [100, 200, 300], [100, 200, 300, 1000], [100, 200, 300, 900], [100, 200, 300, 900, 1000], [100, 200, 300, 800], [100, 200, 300, 800, 1000], [100, 200, 300, 800, 900], [100, 200, 300, 800, 900, 1000], [100, 200, 300, 700], [100, 200, 300, 700, 1000], [100, 200, 300, 700, 900], [100, 200, 300, 700, 900, 1000], [100, 200, 300, 700, 800], [100, 200, 300, 700, 800, 1000], [100, 200, 300, 700, 800, 900], [100, 200, 300, 700, 800, 900, 1000], [100, 200, 300, 600], [100, 200, 300, 600, 1000], [100, 200, 300, 600, 900], [100, 200, 300, 600, 900, 1000], [100, 200, 300, 600, 800], [100, 200, 300, 600, 800, 1000], [100, 200, 300, 600, 800, 900], [100, 200, 300, 600, 800, 900, 1000], [100, 200, 300, 600, 700], [100, 200, 300, 600, 700, 1000], [100, 200, 300, 600, 700, 900], [100, 200, 300, 600, 700, 900, 1000], [100, 200, 300, 600, 700, 800], [100, 200, 300, 600, 700, 800, 1000], [100, 200, 300, 600, 700, 800, 900], [100, 200, 300, 600, 700, 800, 900, 1000], [100, 200, 300, 500], [100, 200, 300, 500, 1000], [100, 200, 300, 500, 900], [100, 200, 300, 500, 900, 1000], [100, 200, 300, 500, 800], [100, 200, 300, 500, 800, 1000], [100, 200, 300, 500, 800, 900], [100, 200, 300, 500, 800, 900, 1000], [100, 200, 300, 500, 700], [100, 200, 300, 500, 700, 1000], [100, 200, 300, 500, 700, 900], [100, 200, 300, 500, 700, 900, 1000], [100, 200, 300, 500, 700, 800], [100, 200, 300, 500, 700, 800, 1000], [100, 200, 300, 500, 700, 800, 900], [100, 200, 300, 500, 700, 800, 900, 1000], [100, 200, 300, 500, 600], [100, 200, 300, 500, 600, 1000], [100, 200, 300, 500, 600, 900], [100, 200, 300, 500, 600, 900, 1000], [100, 200, 300, 500, 600, 800], [100, 200, 300, 500, 600, 800, 1000], [100, 200, 300, 500, 600, 800, 900], [100, 200, 300, 500, 600, 800, 900, 1000], [100, 200, 300, 500, 600, 700], [100, 200, 300, 500, 600, 700, 1000], [100, 200, 300, 500, 600, 700, 900], [100, 200, 300, 500, 600, 700, 900, 1000], [100, 200, 300, 500, 600, 700, 800], [100, 200, 300, 500, 600, 700, 800, 1000], [100, 200, 300, 500, 600, 700, 800, 900], [100, 200, 300, 500, 600, 700, 800, 900, 1000], [100, 200, 300, 400], [100, 200, 300, 400, 1000], [100, 200, 300, 400, 900], [100, 200, 300, 400, 900, 1000], [100, 200, 300, 400, 800], [100, 200, 300, 400, 800, 1000], [100, 200, 300, 400, 800, 900], [100, 200, 300, 400, 800, 900, 1000], [100, 200, 300, 400, 700], [100, 200, 300, 400, 700, 1000], [100, 200, 300, 400, 700, 900], [100, 200, 300, 400, 700, 900, 1000], [100, 200, 300, 400, 700, 800], [100, 200, 300, 400, 700, 800, 1000], [100, 200, 300, 400, 700, 800, 900], [100, 200, 300, 400, 700, 800, 900, 1000], [100, 200, 300, 400, 600], [100, 200, 300, 400, 600, 1000], [100, 200, 300, 400, 600, 900], [100, 200, 300, 400, 600, 900, 1000], [100, 200, 300, 400, 600, 800], [100, 200, 300, 400, 600, 800, 1000], [100, 200, 300, 400, 600, 800, 900], [100, 200, 300, 400, 600, 800, 900, 1000], [100, 200, 300, 400, 600, 700], [100, 200, 300, 400, 600, 700, 1000], [100, 200, 300, 400, 600, 700, 900], [100, 200, 300, 400, 600, 700, 900, 1000], [100, 200, 300, 400, 600, 700, 800], [100, 200, 300, 400, 600, 700, 800, 1000], [100, 200, 300, 400, 600, 700, 800, 900], [100, 200, 300, 400, 600, 700, 800, 900, 1000], [100, 200, 300, 400, 500], [100, 200, 300, 400, 500, 1000], [100, 200, 300, 400, 500, 900], [100, 200, 300, 400, 500, 900, 1000], [100, 200, 300, 400, 500, 800], [100, 200, 300, 400, 500, 800, 1000], [100, 200, 300, 400, 500, 800, 900], [100, 200, 300, 400, 500, 800, 900, 1000], [100, 200, 300, 400, 500, 700], [100, 200, 300, 400, 500, 700, 1000], [100, 200, 300, 400, 500, 700, 900], [100, 200, 300, 400, 500, 700, 900, 1000], [100, 200, 300, 400, 500, 700, 800], [100, 200, 300, 400, 500, 700, 800, 1000], [100, 200, 300, 400, 500, 700, 800, 900], [100, 200, 300, 400, 500, 700, 800, 900, 1000], [100, 200, 300, 400, 500, 600], [100, 200, 300, 400, 500, 600, 1000], [100, 200, 300, 400, 500, 600, 900], [100, 200, 300, 400, 500, 600, 900, 1000], [100, 200, 300, 400, 500, 600, 800], [100, 200, 300, 400, 500, 600, 800, 1000], [100, 200, 300, 400, 500, 600, 800, 900], [100, 200, 300, 400, 500, 600, 800, 900, 1000], [100, 200, 300, 400, 500, 600, 700], [100, 200, 300, 400, 500, 600, 700, 1000], [100, 200, 300, 400, 500, 600, 700, 900], [100, 200, 300, 400, 500, 600, 700, 900, 1000], [100, 200, 300, 400, 500, 600, 700, 800], [100, 200, 300, 400, 500, 600, 700, 800, 1000], [100, 200, 300, 400, 500, 600, 700, 800, 900], [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]]\n assert candidate(nums = [10, 20, 30, 40, 50, 60]) == [[], [60], [50], [50, 60], [40], [40, 60], [40, 50], [40, 50, 60], [30], [30, 60], [30, 50], [30, 50, 60], [30, 40], [30, 40, 60], [30, 40, 50], [30, 40, 50, 60], [20], [20, 60], [20, 50], [20, 50, 60], [20, 40], [20, 40, 60], [20, 40, 50], [20, 40, 50, 60], [20, 30], [20, 30, 60], [20, 30, 50], [20, 30, 50, 60], [20, 30, 40], [20, 30, 40, 60], [20, 30, 40, 50], [20, 30, 40, 50, 60], [10], [10, 60], [10, 50], [10, 50, 60], [10, 40], [10, 40, 60], [10, 40, 50], [10, 40, 50, 60], [10, 30], [10, 30, 60], [10, 30, 50], [10, 30, 50, 60], [10, 30, 40], [10, 30, 40, 60], [10, 30, 40, 50], [10, 30, 40, 50, 60], [10, 20], [10, 20, 60], [10, 20, 50], [10, 20, 50, 60], [10, 20, 40], [10, 20, 40, 60], [10, 20, 40, 50], [10, 20, 40, 50, 60], [10, 20, 30], [10, 20, 30, 60], [10, 20, 30, 50], [10, 20, 30, 50, 60], [10, 20, 30, 40], [10, 20, 30, 40, 60], [10, 20, 30, 40, 50], [10, 20, 30, 40, 50, 60]]\n assert candidate(nums = [-2, 0, 2, 4, 6, 8, 10, 12, 14, 16]) == [[], [16], [14], [14, 16], [12], [12, 16], [12, 14], [12, 14, 16], [10], [10, 16], [10, 14], [10, 14, 16], [10, 12], [10, 12, 16], [10, 12, 14], [10, 12, 14, 16], [8], [8, 16], [8, 14], [8, 14, 16], [8, 12], [8, 12, 16], [8, 12, 14], [8, 12, 14, 16], [8, 10], [8, 10, 16], [8, 10, 14], [8, 10, 14, 16], [8, 10, 12], [8, 10, 12, 16], [8, 10, 12, 14], [8, 10, 12, 14, 16], [6], [6, 16], [6, 14], [6, 14, 16], [6, 12], [6, 12, 16], [6, 12, 14], [6, 12, 14, 16], [6, 10], [6, 10, 16], [6, 10, 14], [6, 10, 14, 16], [6, 10, 12], [6, 10, 12, 16], [6, 10, 12, 14], [6, 10, 12, 14, 16], [6, 8], [6, 8, 16], [6, 8, 14], [6, 8, 14, 16], [6, 8, 12], [6, 8, 12, 16], [6, 8, 12, 14], [6, 8, 12, 14, 16], [6, 8, 10], [6, 8, 10, 16], [6, 8, 10, 14], [6, 8, 10, 14, 16], [6, 8, 10, 12], [6, 8, 10, 12, 16], [6, 8, 10, 12, 14], [6, 8, 10, 12, 14, 16], [4], [4, 16], [4, 14], [4, 14, 16], [4, 12], [4, 12, 16], [4, 12, 14], [4, 12, 14, 16], [4, 10], [4, 10, 16], [4, 10, 14], [4, 10, 14, 16], [4, 10, 12], [4, 10, 12, 16], [4, 10, 12, 14], [4, 10, 12, 14, 16], [4, 8], [4, 8, 16], [4, 8, 14], [4, 8, 14, 16], [4, 8, 12], [4, 8, 12, 16], [4, 8, 12, 14], [4, 8, 12, 14, 16], [4, 8, 10], [4, 8, 10, 16], [4, 8, 10, 14], [4, 8, 10, 14, 16], [4, 8, 10, 12], [4, 8, 10, 12, 16], [4, 8, 10, 12, 14], [4, 8, 10, 12, 14, 16], [4, 6], [4, 6, 16], [4, 6, 14], [4, 6, 14, 16], [4, 6, 12], [4, 6, 12, 16], [4, 6, 12, 14], [4, 6, 12, 14, 16], [4, 6, 10], [4, 6, 10, 16], [4, 6, 10, 14], [4, 6, 10, 14, 16], [4, 6, 10, 12], [4, 6, 10, 12, 16], [4, 6, 10, 12, 14], [4, 6, 10, 12, 14, 16], [4, 6, 8], [4, 6, 8, 16], [4, 6, 8, 14], [4, 6, 8, 14, 16], [4, 6, 8, 12], [4, 6, 8, 12, 16], [4, 6, 8, 12, 14], [4, 6, 8, 12, 14, 16], [4, 6, 8, 10], [4, 6, 8, 10, 16], [4, 6, 8, 10, 14], [4, 6, 8, 10, 14, 16], [4, 6, 8, 10, 12], [4, 6, 8, 10, 12, 16], [4, 6, 8, 10, 12, 14], [4, 6, 8, 10, 12, 14, 16], [2], [2, 16], [2, 14], [2, 14, 16], [2, 12], [2, 12, 16], [2, 12, 14], [2, 12, 14, 16], [2, 10], [2, 10, 16], [2, 10, 14], [2, 10, 14, 16], [2, 10, 12], [2, 10, 12, 16], [2, 10, 12, 14], [2, 10, 12, 14, 16], [2, 8], [2, 8, 16], [2, 8, 14], [2, 8, 14, 16], [2, 8, 12], [2, 8, 12, 16], [2, 8, 12, 14], [2, 8, 12, 14, 16], [2, 8, 10], [2, 8, 10, 16], [2, 8, 10, 14], [2, 8, 10, 14, 16], [2, 8, 10, 12], [2, 8, 10, 12, 16], [2, 8, 10, 12, 14], [2, 8, 10, 12, 14, 16], [2, 6], [2, 6, 16], [2, 6, 14], [2, 6, 14, 16], [2, 6, 12], [2, 6, 12, 16], [2, 6, 12, 14], [2, 6, 12, 14, 16], [2, 6, 10], [2, 6, 10, 16], [2, 6, 10, 14], [2, 6, 10, 14, 16], [2, 6, 10, 12], [2, 6, 10, 12, 16], [2, 6, 10, 12, 14], [2, 6, 10, 12, 14, 16], [2, 6, 8], [2, 6, 8, 16], [2, 6, 8, 14], [2, 6, 8, 14, 16], [2, 6, 8, 12], [2, 6, 8, 12, 16], [2, 6, 8, 12, 14], [2, 6, 8, 12, 14, 16], [2, 6, 8, 10], [2, 6, 8, 10, 16], [2, 6, 8, 10, 14], [2, 6, 8, 10, 14, 16], [2, 6, 8, 10, 12], [2, 6, 8, 10, 12, 16], [2, 6, 8, 10, 12, 14], [2, 6, 8, 10, 12, 14, 16], [2, 4], [2, 4, 16], [2, 4, 14], [2, 4, 14, 16], [2, 4, 12], [2, 4, 12, 16], [2, 4, 12, 14], [2, 4, 12, 14, 16], [2, 4, 10], [2, 4, 10, 16], [2, 4, 10, 14], [2, 4, 10, 14, 16], [2, 4, 10, 12], [2, 4, 10, 12, 16], [2, 4, 10, 12, 14], [2, 4, 10, 12, 14, 16], [2, 4, 8], [2, 4, 8, 16], [2, 4, 8, 14], [2, 4, 8, 14, 16], [2, 4, 8, 12], [2, 4, 8, 12, 16], [2, 4, 8, 12, 14], [2, 4, 8, 12, 14, 16], [2, 4, 8, 10], [2, 4, 8, 10, 16], [2, 4, 8, 10, 14], [2, 4, 8, 10, 14, 16], [2, 4, 8, 10, 12], [2, 4, 8, 10, 12, 16], [2, 4, 8, 10, 12, 14], [2, 4, 8, 10, 12, 14, 16], [2, 4, 6], [2, 4, 6, 16], [2, 4, 6, 14], [2, 4, 6, 14, 16], [2, 4, 6, 12], [2, 4, 6, 12, 16], [2, 4, 6, 12, 14], [2, 4, 6, 12, 14, 16], [2, 4, 6, 10], [2, 4, 6, 10, 16], [2, 4, 6, 10, 14], [2, 4, 6, 10, 14, 16], [2, 4, 6, 10, 12], [2, 4, 6, 10, 12, 16], [2, 4, 6, 10, 12, 14], [2, 4, 6, 10, 12, 14, 16], [2, 4, 6, 8], [2, 4, 6, 8, 16], [2, 4, 6, 8, 14], [2, 4, 6, 8, 14, 16], [2, 4, 6, 8, 12], [2, 4, 6, 8, 12, 16], [2, 4, 6, 8, 12, 14], [2, 4, 6, 8, 12, 14, 16], [2, 4, 6, 8, 10], [2, 4, 6, 8, 10, 16], [2, 4, 6, 8, 10, 14], [2, 4, 6, 8, 10, 14, 16], [2, 4, 6, 8, 10, 12], [2, 4, 6, 8, 10, 12, 16], [2, 4, 6, 8, 10, 12, 14], [2, 4, 6, 8, 10, 12, 14, 16], [0], [0, 16], [0, 14], [0, 14, 16], [0, 12], [0, 12, 16], [0, 12, 14], [0, 12, 14, 16], [0, 10], [0, 10, 16], [0, 10, 14], [0, 10, 14, 16], [0, 10, 12], [0, 10, 12, 16], [0, 10, 12, 14], [0, 10, 12, 14, 16], [0, 8], [0, 8, 16], [0, 8, 14], [0, 8, 14, 16], [0, 8, 12], [0, 8, 12, 16], [0, 8, 12, 14], [0, 8, 12, 14, 16], [0, 8, 10], [0, 8, 10, 16], [0, 8, 10, 14], [0, 8, 10, 14, 16], [0, 8, 10, 12], [0, 8, 10, 12, 16], [0, 8, 10, 12, 14], [0, 8, 10, 12, 14, 16], [0, 6], [0, 6, 16], [0, 6, 14], [0, 6, 14, 16], [0, 6, 12], [0, 6, 12, 16], [0, 6, 12, 14], [0, 6, 12, 14, 16], [0, 6, 10], [0, 6, 10, 16], [0, 6, 10, 14], [0, 6, 10, 14, 16], [0, 6, 10, 12], [0, 6, 10, 12, 16], [0, 6, 10, 12, 14], [0, 6, 10, 12, 14, 16], [0, 6, 8], [0, 6, 8, 16], [0, 6, 8, 14], [0, 6, 8, 14, 16], [0, 6, 8, 12], [0, 6, 8, 12, 16], [0, 6, 8, 12, 14], [0, 6, 8, 12, 14, 16], [0, 6, 8, 10], [0, 6, 8, 10, 16], [0, 6, 8, 10, 14], [0, 6, 8, 10, 14, 16], [0, 6, 8, 10, 12], [0, 6, 8, 10, 12, 16], [0, 6, 8, 10, 12, 14], [0, 6, 8, 10, 12, 14, 16], [0, 4], [0, 4, 16], [0, 4, 14], [0, 4, 14, 16], [0, 4, 12], [0, 4, 12, 16], [0, 4, 12, 14], [0, 4, 12, 14, 16], [0, 4, 10], [0, 4, 10, 16], [0, 4, 10, 14], [0, 4, 10, 14, 16], [0, 4, 10, 12], [0, 4, 10, 12, 16], [0, 4, 10, 12, 14], [0, 4, 10, 12, 14, 16], [0, 4, 8], [0, 4, 8, 16], [0, 4, 8, 14], [0, 4, 8, 14, 16], [0, 4, 8, 12], [0, 4, 8, 12, 16], [0, 4, 8, 12, 14], [0, 4, 8, 12, 14, 16], [0, 4, 8, 10], [0, 4, 8, 10, 16], [0, 4, 8, 10, 14], [0, 4, 8, 10, 14, 16], [0, 4, 8, 10, 12], [0, 4, 8, 10, 12, 16], [0, 4, 8, 10, 12, 14], [0, 4, 8, 10, 12, 14, 16], [0, 4, 6], [0, 4, 6, 16], [0, 4, 6, 14], [0, 4, 6, 14, 16], [0, 4, 6, 12], [0, 4, 6, 12, 16], [0, 4, 6, 12, 14], [0, 4, 6, 12, 14, 16], [0, 4, 6, 10], [0, 4, 6, 10, 16], [0, 4, 6, 10, 14], [0, 4, 6, 10, 14, 16], [0, 4, 6, 10, 12], [0, 4, 6, 10, 12, 16], [0, 4, 6, 10, 12, 14], [0, 4, 6, 10, 12, 14, 16], [0, 4, 6, 8], [0, 4, 6, 8, 16], [0, 4, 6, 8, 14], [0, 4, 6, 8, 14, 16], [0, 4, 6, 8, 12], [0, 4, 6, 8, 12, 16], [0, 4, 6, 8, 12, 14], [0, 4, 6, 8, 12, 14, 16], [0, 4, 6, 8, 10], [0, 4, 6, 8, 10, 16], [0, 4, 6, 8, 10, 14], [0, 4, 6, 8, 10, 14, 16], [0, 4, 6, 8, 10, 12], [0, 4, 6, 8, 10, 12, 16], [0, 4, 6, 8, 10, 12, 14], [0, 4, 6, 8, 10, 12, 14, 16], [0, 2], [0, 2, 16], [0, 2, 14], [0, 2, 14, 16], [0, 2, 12], [0, 2, 12, 16], [0, 2, 12, 14], [0, 2, 12, 14, 16], [0, 2, 10], [0, 2, 10, 16], [0, 2, 10, 14], [0, 2, 10, 14, 16], [0, 2, 10, 12], [0, 2, 10, 12, 16], [0, 2, 10, 12, 14], [0, 2, 10, 12, 14, 16], [0, 2, 8], [0, 2, 8, 16], [0, 2, 8, 14], [0, 2, 8, 14, 16], [0, 2, 8, 12], [0, 2, 8, 12, 16], [0, 2, 8, 12, 14], [0, 2, 8, 12, 14, 16], [0, 2, 8, 10], [0, 2, 8, 10, 16], [0, 2, 8, 10, 14], [0, 2, 8, 10, 14, 16], [0, 2, 8, 10, 12], [0, 2, 8, 10, 12, 16], [0, 2, 8, 10, 12, 14], [0, 2, 8, 10, 12, 14, 16], [0, 2, 6], [0, 2, 6, 16], [0, 2, 6, 14], [0, 2, 6, 14, 16], [0, 2, 6, 12], [0, 2, 6, 12, 16], [0, 2, 6, 12, 14], [0, 2, 6, 12, 14, 16], [0, 2, 6, 10], [0, 2, 6, 10, 16], [0, 2, 6, 10, 14], [0, 2, 6, 10, 14, 16], [0, 2, 6, 10, 12], [0, 2, 6, 10, 12, 16], [0, 2, 6, 10, 12, 14], [0, 2, 6, 10, 12, 14, 16], [0, 2, 6, 8], [0, 2, 6, 8, 16], [0, 2, 6, 8, 14], [0, 2, 6, 8, 14, 16], [0, 2, 6, 8, 12], [0, 2, 6, 8, 12, 16], [0, 2, 6, 8, 12, 14], [0, 2, 6, 8, 12, 14, 16], [0, 2, 6, 8, 10], [0, 2, 6, 8, 10, 16], [0, 2, 6, 8, 10, 14], [0, 2, 6, 8, 10, 14, 16], [0, 2, 6, 8, 10, 12], [0, 2, 6, 8, 10, 12, 16], [0, 2, 6, 8, 10, 12, 14], [0, 2, 6, 8, 10, 12, 14, 16], [0, 2, 4], [0, 2, 4, 16], [0, 2, 4, 14], [0, 2, 4, 14, 16], [0, 2, 4, 12], [0, 2, 4, 12, 16], [0, 2, 4, 12, 14], [0, 2, 4, 12, 14, 16], [0, 2, 4, 10], [0, 2, 4, 10, 16], [0, 2, 4, 10, 14], [0, 2, 4, 10, 14, 16], [0, 2, 4, 10, 12], [0, 2, 4, 10, 12, 16], [0, 2, 4, 10, 12, 14], [0, 2, 4, 10, 12, 14, 16], [0, 2, 4, 8], [0, 2, 4, 8, 16], [0, 2, 4, 8, 14], [0, 2, 4, 8, 14, 16], [0, 2, 4, 8, 12], [0, 2, 4, 8, 12, 16], [0, 2, 4, 8, 12, 14], [0, 2, 4, 8, 12, 14, 16], [0, 2, 4, 8, 10], [0, 2, 4, 8, 10, 16], [0, 2, 4, 8, 10, 14], [0, 2, 4, 8, 10, 14, 16], [0, 2, 4, 8, 10, 12], [0, 2, 4, 8, 10, 12, 16], [0, 2, 4, 8, 10, 12, 14], [0, 2, 4, 8, 10, 12, 14, 16], [0, 2, 4, 6], [0, 2, 4, 6, 16], [0, 2, 4, 6, 14], [0, 2, 4, 6, 14, 16], [0, 2, 4, 6, 12], [0, 2, 4, 6, 12, 16], [0, 2, 4, 6, 12, 14], [0, 2, 4, 6, 12, 14, 16], [0, 2, 4, 6, 10], [0, 2, 4, 6, 10, 16], [0, 2, 4, 6, 10, 14], [0, 2, 4, 6, 10, 14, 16], [0, 2, 4, 6, 10, 12], [0, 2, 4, 6, 10, 12, 16], [0, 2, 4, 6, 10, 12, 14], [0, 2, 4, 6, 10, 12, 14, 16], [0, 2, 4, 6, 8], [0, 2, 4, 6, 8, 16], [0, 2, 4, 6, 8, 14], [0, 2, 4, 6, 8, 14, 16], [0, 2, 4, 6, 8, 12], [0, 2, 4, 6, 8, 12, 16], [0, 2, 4, 6, 8, 12, 14], [0, 2, 4, 6, 8, 12, 14, 16], [0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 8, 10, 16], [0, 2, 4, 6, 8, 10, 14], [0, 2, 4, 6, 8, 10, 14, 16], [0, 2, 4, 6, 8, 10, 12], [0, 2, 4, 6, 8, 10, 12, 16], [0, 2, 4, 6, 8, 10, 12, 14], [0, 2, 4, 6, 8, 10, 12, 14, 16], [-2], [-2, 16], [-2, 14], [-2, 14, 16], [-2, 12], [-2, 12, 16], [-2, 12, 14], [-2, 12, 14, 16], [-2, 10], [-2, 10, 16], [-2, 10, 14], [-2, 10, 14, 16], [-2, 10, 12], [-2, 10, 12, 16], [-2, 10, 12, 14], [-2, 10, 12, 14, 16], [-2, 8], [-2, 8, 16], [-2, 8, 14], [-2, 8, 14, 16], [-2, 8, 12], [-2, 8, 12, 16], [-2, 8, 12, 14], [-2, 8, 12, 14, 16], [-2, 8, 10], [-2, 8, 10, 16], [-2, 8, 10, 14], [-2, 8, 10, 14, 16], [-2, 8, 10, 12], [-2, 8, 10, 12, 16], [-2, 8, 10, 12, 14], [-2, 8, 10, 12, 14, 16], [-2, 6], [-2, 6, 16], [-2, 6, 14], [-2, 6, 14, 16], [-2, 6, 12], [-2, 6, 12, 16], [-2, 6, 12, 14], [-2, 6, 12, 14, 16], [-2, 6, 10], [-2, 6, 10, 16], [-2, 6, 10, 14], [-2, 6, 10, 14, 16], [-2, 6, 10, 12], [-2, 6, 10, 12, 16], [-2, 6, 10, 12, 14], [-2, 6, 10, 12, 14, 16], [-2, 6, 8], [-2, 6, 8, 16], [-2, 6, 8, 14], [-2, 6, 8, 14, 16], [-2, 6, 8, 12], [-2, 6, 8, 12, 16], [-2, 6, 8, 12, 14], [-2, 6, 8, 12, 14, 16], [-2, 6, 8, 10], [-2, 6, 8, 10, 16], [-2, 6, 8, 10, 14], [-2, 6, 8, 10, 14, 16], [-2, 6, 8, 10, 12], [-2, 6, 8, 10, 12, 16], [-2, 6, 8, 10, 12, 14], [-2, 6, 8, 10, 12, 14, 16], [-2, 4], [-2, 4, 16], [-2, 4, 14], [-2, 4, 14, 16], [-2, 4, 12], [-2, 4, 12, 16], [-2, 4, 12, 14], [-2, 4, 12, 14, 16], [-2, 4, 10], [-2, 4, 10, 16], [-2, 4, 10, 14], [-2, 4, 10, 14, 16], [-2, 4, 10, 12], [-2, 4, 10, 12, 16], [-2, 4, 10, 12, 14], [-2, 4, 10, 12, 14, 16], [-2, 4, 8], [-2, 4, 8, 16], [-2, 4, 8, 14], [-2, 4, 8, 14, 16], [-2, 4, 8, 12], [-2, 4, 8, 12, 16], [-2, 4, 8, 12, 14], [-2, 4, 8, 12, 14, 16], [-2, 4, 8, 10], [-2, 4, 8, 10, 16], [-2, 4, 8, 10, 14], [-2, 4, 8, 10, 14, 16], [-2, 4, 8, 10, 12], [-2, 4, 8, 10, 12, 16], [-2, 4, 8, 10, 12, 14], [-2, 4, 8, 10, 12, 14, 16], [-2, 4, 6], [-2, 4, 6, 16], [-2, 4, 6, 14], [-2, 4, 6, 14, 16], [-2, 4, 6, 12], [-2, 4, 6, 12, 16], [-2, 4, 6, 12, 14], [-2, 4, 6, 12, 14, 16], [-2, 4, 6, 10], [-2, 4, 6, 10, 16], [-2, 4, 6, 10, 14], [-2, 4, 6, 10, 14, 16], [-2, 4, 6, 10, 12], [-2, 4, 6, 10, 12, 16], [-2, 4, 6, 10, 12, 14], [-2, 4, 6, 10, 12, 14, 16], [-2, 4, 6, 8], [-2, 4, 6, 8, 16], [-2, 4, 6, 8, 14], [-2, 4, 6, 8, 14, 16], [-2, 4, 6, 8, 12], [-2, 4, 6, 8, 12, 16], [-2, 4, 6, 8, 12, 14], [-2, 4, 6, 8, 12, 14, 16], [-2, 4, 6, 8, 10], [-2, 4, 6, 8, 10, 16], [-2, 4, 6, 8, 10, 14], [-2, 4, 6, 8, 10, 14, 16], [-2, 4, 6, 8, 10, 12], [-2, 4, 6, 8, 10, 12, 16], [-2, 4, 6, 8, 10, 12, 14], [-2, 4, 6, 8, 10, 12, 14, 16], [-2, 2], [-2, 2, 16], [-2, 2, 14], [-2, 2, 14, 16], [-2, 2, 12], [-2, 2, 12, 16], [-2, 2, 12, 14], [-2, 2, 12, 14, 16], [-2, 2, 10], [-2, 2, 10, 16], [-2, 2, 10, 14], [-2, 2, 10, 14, 16], [-2, 2, 10, 12], [-2, 2, 10, 12, 16], [-2, 2, 10, 12, 14], [-2, 2, 10, 12, 14, 16], [-2, 2, 8], [-2, 2, 8, 16], [-2, 2, 8, 14], [-2, 2, 8, 14, 16], [-2, 2, 8, 12], [-2, 2, 8, 12, 16], [-2, 2, 8, 12, 14], [-2, 2, 8, 12, 14, 16], [-2, 2, 8, 10], [-2, 2, 8, 10, 16], [-2, 2, 8, 10, 14], [-2, 2, 8, 10, 14, 16], [-2, 2, 8, 10, 12], [-2, 2, 8, 10, 12, 16], [-2, 2, 8, 10, 12, 14], [-2, 2, 8, 10, 12, 14, 16], [-2, 2, 6], [-2, 2, 6, 16], [-2, 2, 6, 14], [-2, 2, 6, 14, 16], [-2, 2, 6, 12], [-2, 2, 6, 12, 16], [-2, 2, 6, 12, 14], [-2, 2, 6, 12, 14, 16], [-2, 2, 6, 10], [-2, 2, 6, 10, 16], [-2, 2, 6, 10, 14], [-2, 2, 6, 10, 14, 16], [-2, 2, 6, 10, 12], [-2, 2, 6, 10, 12, 16], [-2, 2, 6, 10, 12, 14], [-2, 2, 6, 10, 12, 14, 16], [-2, 2, 6, 8], [-2, 2, 6, 8, 16], [-2, 2, 6, 8, 14], [-2, 2, 6, 8, 14, 16], [-2, 2, 6, 8, 12], [-2, 2, 6, 8, 12, 16], [-2, 2, 6, 8, 12, 14], [-2, 2, 6, 8, 12, 14, 16], [-2, 2, 6, 8, 10], [-2, 2, 6, 8, 10, 16], [-2, 2, 6, 8, 10, 14], [-2, 2, 6, 8, 10, 14, 16], [-2, 2, 6, 8, 10, 12], [-2, 2, 6, 8, 10, 12, 16], [-2, 2, 6, 8, 10, 12, 14], [-2, 2, 6, 8, 10, 12, 14, 16], [-2, 2, 4], [-2, 2, 4, 16], [-2, 2, 4, 14], [-2, 2, 4, 14, 16], [-2, 2, 4, 12], [-2, 2, 4, 12, 16], [-2, 2, 4, 12, 14], [-2, 2, 4, 12, 14, 16], [-2, 2, 4, 10], [-2, 2, 4, 10, 16], [-2, 2, 4, 10, 14], [-2, 2, 4, 10, 14, 16], [-2, 2, 4, 10, 12], [-2, 2, 4, 10, 12, 16], [-2, 2, 4, 10, 12, 14], [-2, 2, 4, 10, 12, 14, 16], [-2, 2, 4, 8], [-2, 2, 4, 8, 16], [-2, 2, 4, 8, 14], [-2, 2, 4, 8, 14, 16], [-2, 2, 4, 8, 12], [-2, 2, 4, 8, 12, 16], [-2, 2, 4, 8, 12, 14], [-2, 2, 4, 8, 12, 14, 16], [-2, 2, 4, 8, 10], [-2, 2, 4, 8, 10, 16], [-2, 2, 4, 8, 10, 14], [-2, 2, 4, 8, 10, 14, 16], [-2, 2, 4, 8, 10, 12], [-2, 2, 4, 8, 10, 12, 16], [-2, 2, 4, 8, 10, 12, 14], [-2, 2, 4, 8, 10, 12, 14, 16], [-2, 2, 4, 6], [-2, 2, 4, 6, 16], [-2, 2, 4, 6, 14], [-2, 2, 4, 6, 14, 16], [-2, 2, 4, 6, 12], [-2, 2, 4, 6, 12, 16], [-2, 2, 4, 6, 12, 14], [-2, 2, 4, 6, 12, 14, 16], [-2, 2, 4, 6, 10], [-2, 2, 4, 6, 10, 16], [-2, 2, 4, 6, 10, 14], [-2, 2, 4, 6, 10, 14, 16], [-2, 2, 4, 6, 10, 12], [-2, 2, 4, 6, 10, 12, 16], [-2, 2, 4, 6, 10, 12, 14], [-2, 2, 4, 6, 10, 12, 14, 16], [-2, 2, 4, 6, 8], [-2, 2, 4, 6, 8, 16], [-2, 2, 4, 6, 8, 14], [-2, 2, 4, 6, 8, 14, 16], [-2, 2, 4, 6, 8, 12], [-2, 2, 4, 6, 8, 12, 16], [-2, 2, 4, 6, 8, 12, 14], [-2, 2, 4, 6, 8, 12, 14, 16], [-2, 2, 4, 6, 8, 10], [-2, 2, 4, 6, 8, 10, 16], [-2, 2, 4, 6, 8, 10, 14], [-2, 2, 4, 6, 8, 10, 14, 16], [-2, 2, 4, 6, 8, 10, 12], [-2, 2, 4, 6, 8, 10, 12, 16], [-2, 2, 4, 6, 8, 10, 12, 14], [-2, 2, 4, 6, 8, 10, 12, 14, 16], [-2, 0], [-2, 0, 16], [-2, 0, 14], [-2, 0, 14, 16], [-2, 0, 12], [-2, 0, 12, 16], [-2, 0, 12, 14], [-2, 0, 12, 14, 16], [-2, 0, 10], [-2, 0, 10, 16], [-2, 0, 10, 14], [-2, 0, 10, 14, 16], [-2, 0, 10, 12], [-2, 0, 10, 12, 16], [-2, 0, 10, 12, 14], [-2, 0, 10, 12, 14, 16], [-2, 0, 8], [-2, 0, 8, 16], [-2, 0, 8, 14], [-2, 0, 8, 14, 16], [-2, 0, 8, 12], [-2, 0, 8, 12, 16], [-2, 0, 8, 12, 14], [-2, 0, 8, 12, 14, 16], [-2, 0, 8, 10], [-2, 0, 8, 10, 16], [-2, 0, 8, 10, 14], [-2, 0, 8, 10, 14, 16], [-2, 0, 8, 10, 12], [-2, 0, 8, 10, 12, 16], [-2, 0, 8, 10, 12, 14], [-2, 0, 8, 10, 12, 14, 16], [-2, 0, 6], [-2, 0, 6, 16], [-2, 0, 6, 14], [-2, 0, 6, 14, 16], [-2, 0, 6, 12], [-2, 0, 6, 12, 16], [-2, 0, 6, 12, 14], [-2, 0, 6, 12, 14, 16], [-2, 0, 6, 10], [-2, 0, 6, 10, 16], [-2, 0, 6, 10, 14], [-2, 0, 6, 10, 14, 16], [-2, 0, 6, 10, 12], [-2, 0, 6, 10, 12, 16], [-2, 0, 6, 10, 12, 14], [-2, 0, 6, 10, 12, 14, 16], [-2, 0, 6, 8], [-2, 0, 6, 8, 16], [-2, 0, 6, 8, 14], [-2, 0, 6, 8, 14, 16], [-2, 0, 6, 8, 12], [-2, 0, 6, 8, 12, 16], [-2, 0, 6, 8, 12, 14], [-2, 0, 6, 8, 12, 14, 16], [-2, 0, 6, 8, 10], [-2, 0, 6, 8, 10, 16], [-2, 0, 6, 8, 10, 14], [-2, 0, 6, 8, 10, 14, 16], [-2, 0, 6, 8, 10, 12], [-2, 0, 6, 8, 10, 12, 16], [-2, 0, 6, 8, 10, 12, 14], [-2, 0, 6, 8, 10, 12, 14, 16], [-2, 0, 4], [-2, 0, 4, 16], [-2, 0, 4, 14], [-2, 0, 4, 14, 16], [-2, 0, 4, 12], [-2, 0, 4, 12, 16], [-2, 0, 4, 12, 14], [-2, 0, 4, 12, 14, 16], [-2, 0, 4, 10], [-2, 0, 4, 10, 16], [-2, 0, 4, 10, 14], [-2, 0, 4, 10, 14, 16], [-2, 0, 4, 10, 12], [-2, 0, 4, 10, 12, 16], [-2, 0, 4, 10, 12, 14], [-2, 0, 4, 10, 12, 14, 16], [-2, 0, 4, 8], [-2, 0, 4, 8, 16], [-2, 0, 4, 8, 14], [-2, 0, 4, 8, 14, 16], [-2, 0, 4, 8, 12], [-2, 0, 4, 8, 12, 16], [-2, 0, 4, 8, 12, 14], [-2, 0, 4, 8, 12, 14, 16], [-2, 0, 4, 8, 10], [-2, 0, 4, 8, 10, 16], [-2, 0, 4, 8, 10, 14], [-2, 0, 4, 8, 10, 14, 16], [-2, 0, 4, 8, 10, 12], [-2, 0, 4, 8, 10, 12, 16], [-2, 0, 4, 8, 10, 12, 14], [-2, 0, 4, 8, 10, 12, 14, 16], [-2, 0, 4, 6], [-2, 0, 4, 6, 16], [-2, 0, 4, 6, 14], [-2, 0, 4, 6, 14, 16], [-2, 0, 4, 6, 12], [-2, 0, 4, 6, 12, 16], [-2, 0, 4, 6, 12, 14], [-2, 0, 4, 6, 12, 14, 16], [-2, 0, 4, 6, 10], [-2, 0, 4, 6, 10, 16], [-2, 0, 4, 6, 10, 14], [-2, 0, 4, 6, 10, 14, 16], [-2, 0, 4, 6, 10, 12], [-2, 0, 4, 6, 10, 12, 16], [-2, 0, 4, 6, 10, 12, 14], [-2, 0, 4, 6, 10, 12, 14, 16], [-2, 0, 4, 6, 8], [-2, 0, 4, 6, 8, 16], [-2, 0, 4, 6, 8, 14], [-2, 0, 4, 6, 8, 14, 16], [-2, 0, 4, 6, 8, 12], [-2, 0, 4, 6, 8, 12, 16], [-2, 0, 4, 6, 8, 12, 14], [-2, 0, 4, 6, 8, 12, 14, 16], [-2, 0, 4, 6, 8, 10], [-2, 0, 4, 6, 8, 10, 16], [-2, 0, 4, 6, 8, 10, 14], [-2, 0, 4, 6, 8, 10, 14, 16], [-2, 0, 4, 6, 8, 10, 12], [-2, 0, 4, 6, 8, 10, 12, 16], [-2, 0, 4, 6, 8, 10, 12, 14], [-2, 0, 4, 6, 8, 10, 12, 14, 16], [-2, 0, 2], [-2, 0, 2, 16], [-2, 0, 2, 14], [-2, 0, 2, 14, 16], [-2, 0, 2, 12], [-2, 0, 2, 12, 16], [-2, 0, 2, 12, 14], [-2, 0, 2, 12, 14, 16], [-2, 0, 2, 10], [-2, 0, 2, 10, 16], [-2, 0, 2, 10, 14], [-2, 0, 2, 10, 14, 16], [-2, 0, 2, 10, 12], [-2, 0, 2, 10, 12, 16], [-2, 0, 2, 10, 12, 14], [-2, 0, 2, 10, 12, 14, 16], [-2, 0, 2, 8], [-2, 0, 2, 8, 16], [-2, 0, 2, 8, 14], [-2, 0, 2, 8, 14, 16], [-2, 0, 2, 8, 12], [-2, 0, 2, 8, 12, 16], [-2, 0, 2, 8, 12, 14], [-2, 0, 2, 8, 12, 14, 16], [-2, 0, 2, 8, 10], [-2, 0, 2, 8, 10, 16], [-2, 0, 2, 8, 10, 14], [-2, 0, 2, 8, 10, 14, 16], [-2, 0, 2, 8, 10, 12], [-2, 0, 2, 8, 10, 12, 16], [-2, 0, 2, 8, 10, 12, 14], [-2, 0, 2, 8, 10, 12, 14, 16], [-2, 0, 2, 6], [-2, 0, 2, 6, 16], [-2, 0, 2, 6, 14], [-2, 0, 2, 6, 14, 16], [-2, 0, 2, 6, 12], [-2, 0, 2, 6, 12, 16], [-2, 0, 2, 6, 12, 14], [-2, 0, 2, 6, 12, 14, 16], [-2, 0, 2, 6, 10], [-2, 0, 2, 6, 10, 16], [-2, 0, 2, 6, 10, 14], [-2, 0, 2, 6, 10, 14, 16], [-2, 0, 2, 6, 10, 12], [-2, 0, 2, 6, 10, 12, 16], [-2, 0, 2, 6, 10, 12, 14], [-2, 0, 2, 6, 10, 12, 14, 16], [-2, 0, 2, 6, 8], [-2, 0, 2, 6, 8, 16], [-2, 0, 2, 6, 8, 14], [-2, 0, 2, 6, 8, 14, 16], [-2, 0, 2, 6, 8, 12], [-2, 0, 2, 6, 8, 12, 16], [-2, 0, 2, 6, 8, 12, 14], [-2, 0, 2, 6, 8, 12, 14, 16], [-2, 0, 2, 6, 8, 10], [-2, 0, 2, 6, 8, 10, 16], [-2, 0, 2, 6, 8, 10, 14], [-2, 0, 2, 6, 8, 10, 14, 16], [-2, 0, 2, 6, 8, 10, 12], [-2, 0, 2, 6, 8, 10, 12, 16], [-2, 0, 2, 6, 8, 10, 12, 14], [-2, 0, 2, 6, 8, 10, 12, 14, 16], [-2, 0, 2, 4], [-2, 0, 2, 4, 16], [-2, 0, 2, 4, 14], [-2, 0, 2, 4, 14, 16], [-2, 0, 2, 4, 12], [-2, 0, 2, 4, 12, 16], [-2, 0, 2, 4, 12, 14], [-2, 0, 2, 4, 12, 14, 16], [-2, 0, 2, 4, 10], [-2, 0, 2, 4, 10, 16], [-2, 0, 2, 4, 10, 14], [-2, 0, 2, 4, 10, 14, 16], [-2, 0, 2, 4, 10, 12], [-2, 0, 2, 4, 10, 12, 16], [-2, 0, 2, 4, 10, 12, 14], [-2, 0, 2, 4, 10, 12, 14, 16], [-2, 0, 2, 4, 8], [-2, 0, 2, 4, 8, 16], [-2, 0, 2, 4, 8, 14], [-2, 0, 2, 4, 8, 14, 16], [-2, 0, 2, 4, 8, 12], [-2, 0, 2, 4, 8, 12, 16], [-2, 0, 2, 4, 8, 12, 14], [-2, 0, 2, 4, 8, 12, 14, 16], [-2, 0, 2, 4, 8, 10], [-2, 0, 2, 4, 8, 10, 16], [-2, 0, 2, 4, 8, 10, 14], [-2, 0, 2, 4, 8, 10, 14, 16], [-2, 0, 2, 4, 8, 10, 12], [-2, 0, 2, 4, 8, 10, 12, 16], [-2, 0, 2, 4, 8, 10, 12, 14], [-2, 0, 2, 4, 8, 10, 12, 14, 16], [-2, 0, 2, 4, 6], [-2, 0, 2, 4, 6, 16], [-2, 0, 2, 4, 6, 14], [-2, 0, 2, 4, 6, 14, 16], [-2, 0, 2, 4, 6, 12], [-2, 0, 2, 4, 6, 12, 16], [-2, 0, 2, 4, 6, 12, 14], [-2, 0, 2, 4, 6, 12, 14, 16], [-2, 0, 2, 4, 6, 10], [-2, 0, 2, 4, 6, 10, 16], [-2, 0, 2, 4, 6, 10, 14], [-2, 0, 2, 4, 6, 10, 14, 16], [-2, 0, 2, 4, 6, 10, 12], [-2, 0, 2, 4, 6, 10, 12, 16], [-2, 0, 2, 4, 6, 10, 12, 14], [-2, 0, 2, 4, 6, 10, 12, 14, 16], [-2, 0, 2, 4, 6, 8], [-2, 0, 2, 4, 6, 8, 16], [-2, 0, 2, 4, 6, 8, 14], [-2, 0, 2, 4, 6, 8, 14, 16], [-2, 0, 2, 4, 6, 8, 12], [-2, 0, 2, 4, 6, 8, 12, 16], [-2, 0, 2, 4, 6, 8, 12, 14], [-2, 0, 2, 4, 6, 8, 12, 14, 16], [-2, 0, 2, 4, 6, 8, 10], [-2, 0, 2, 4, 6, 8, 10, 16], [-2, 0, 2, 4, 6, 8, 10, 14], [-2, 0, 2, 4, 6, 8, 10, 14, 16], [-2, 0, 2, 4, 6, 8, 10, 12], [-2, 0, 2, 4, 6, 8, 10, 12, 16], [-2, 0, 2, 4, 6, 8, 10, 12, 14], [-2, 0, 2, 4, 6, 8, 10, 12, 14, 16]]\n assert 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 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 candidate(nums = [-10, -20, -30, -40, -50, -60, -70]) == [[], [-70], [-60], [-60, -70], [-50], [-50, -70], [-50, -60], [-50, -60, -70], [-40], [-40, -70], [-40, -60], [-40, -60, -70], [-40, -50], [-40, -50, -70], [-40, -50, -60], [-40, -50, -60, -70], [-30], [-30, -70], [-30, -60], [-30, -60, -70], [-30, -50], [-30, -50, -70], [-30, -50, -60], [-30, -50, -60, -70], [-30, -40], [-30, -40, -70], [-30, -40, -60], [-30, -40, -60, -70], [-30, -40, -50], [-30, -40, -50, -70], [-30, -40, -50, -60], [-30, -40, -50, -60, -70], [-20], [-20, -70], [-20, -60], [-20, -60, -70], [-20, -50], [-20, -50, -70], [-20, -50, -60], [-20, -50, -60, -70], [-20, -40], [-20, -40, -70], [-20, -40, -60], [-20, -40, -60, -70], [-20, -40, -50], [-20, -40, -50, -70], [-20, -40, -50, -60], [-20, -40, -50, -60, -70], [-20, -30], [-20, -30, -70], [-20, -30, -60], [-20, -30, -60, -70], [-20, -30, -50], [-20, -30, -50, -70], [-20, -30, -50, -60], [-20, -30, -50, -60, -70], [-20, -30, -40], [-20, -30, -40, -70], [-20, -30, -40, -60], [-20, -30, -40, -60, -70], [-20, -30, -40, -50], [-20, -30, -40, -50, -70], [-20, -30, -40, -50, -60], [-20, -30, -40, -50, -60, -70], [-10], [-10, -70], [-10, -60], [-10, -60, -70], [-10, -50], [-10, -50, -70], [-10, -50, -60], [-10, -50, -60, -70], [-10, -40], [-10, -40, -70], [-10, -40, -60], [-10, -40, -60, -70], [-10, -40, -50], [-10, -40, -50, -70], [-10, -40, -50, -60], [-10, -40, -50, -60, -70], [-10, -30], [-10, -30, -70], [-10, -30, -60], [-10, -30, -60, -70], [-10, -30, -50], [-10, -30, -50, -70], [-10, -30, -50, -60], [-10, -30, -50, -60, -70], [-10, -30, -40], [-10, -30, -40, -70], [-10, -30, -40, -60], [-10, -30, -40, -60, -70], [-10, -30, -40, -50], [-10, -30, -40, -50, -70], [-10, -30, -40, -50, -60], [-10, -30, -40, -50, -60, -70], [-10, -20], [-10, -20, -70], [-10, -20, -60], [-10, -20, -60, -70], [-10, -20, -50], [-10, -20, -50, -70], [-10, -20, -50, -60], [-10, -20, -50, -60, -70], [-10, -20, -40], [-10, -20, -40, -70], [-10, -20, -40, -60], [-10, -20, -40, -60, -70], [-10, -20, -40, -50], [-10, -20, -40, -50, -70], [-10, -20, -40, -50, -60], [-10, -20, -40, -50, -60, -70], [-10, -20, -30], [-10, -20, -30, -70], [-10, -20, -30, -60], [-10, -20, -30, -60, -70], [-10, -20, -30, -50], [-10, -20, -30, -50, -70], [-10, -20, -30, -50, -60], [-10, -20, -30, -50, -60, -70], [-10, -20, -30, -40], [-10, -20, -30, -40, -70], [-10, -20, -30, -40, -60], [-10, -20, -30, -40, -60, -70], [-10, -20, -30, -40, -50], [-10, -20, -30, -40, -50, -70], [-10, -20, -30, -40, -50, -60], [-10, -20, -30, -40, -50, -60, -70]]\n assert 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 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 candidate(nums = [7, 14, 21, 28, 35]) == [[], [35], [28], [28, 35], [21], [21, 35], [21, 28], [21, 28, 35], [14], [14, 35], [14, 28], [14, 28, 35], [14, 21], [14, 21, 35], [14, 21, 28], [14, 21, 28, 35], [7], [7, 35], [7, 28], [7, 28, 35], [7, 21], [7, 21, 35], [7, 21, 28], [7, 21, 28, 35], [7, 14], [7, 14, 35], [7, 14, 28], [7, 14, 28, 35], [7, 14, 21], [7, 14, 21, 35], [7, 14, 21, 28], [7, 14, 21, 28, 35]]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == [[], [19], [17], [17, 19], [15], [15, 19], [15, 17], [15, 17, 19], [13], [13, 19], [13, 17], [13, 17, 19], [13, 15], [13, 15, 19], [13, 15, 17], [13, 15, 17, 19], [11], [11, 19], [11, 17], [11, 17, 19], [11, 15], [11, 15, 19], [11, 15, 17], [11, 15, 17, 19], [11, 13], [11, 13, 19], [11, 13, 17], [11, 13, 17, 19], [11, 13, 15], [11, 13, 15, 19], [11, 13, 15, 17], [11, 13, 15, 17, 19], [9], [9, 19], [9, 17], [9, 17, 19], [9, 15], [9, 15, 19], [9, 15, 17], [9, 15, 17, 19], [9, 13], [9, 13, 19], [9, 13, 17], [9, 13, 17, 19], [9, 13, 15], [9, 13, 15, 19], [9, 13, 15, 17], [9, 13, 15, 17, 19], [9, 11], [9, 11, 19], [9, 11, 17], [9, 11, 17, 19], [9, 11, 15], [9, 11, 15, 19], [9, 11, 15, 17], [9, 11, 15, 17, 19], [9, 11, 13], [9, 11, 13, 19], [9, 11, 13, 17], [9, 11, 13, 17, 19], [9, 11, 13, 15], [9, 11, 13, 15, 19], [9, 11, 13, 15, 17], [9, 11, 13, 15, 17, 19], [7], [7, 19], [7, 17], [7, 17, 19], [7, 15], [7, 15, 19], [7, 15, 17], [7, 15, 17, 19], [7, 13], [7, 13, 19], [7, 13, 17], [7, 13, 17, 19], [7, 13, 15], [7, 13, 15, 19], [7, 13, 15, 17], [7, 13, 15, 17, 19], [7, 11], [7, 11, 19], [7, 11, 17], [7, 11, 17, 19], [7, 11, 15], [7, 11, 15, 19], [7, 11, 15, 17], [7, 11, 15, 17, 19], [7, 11, 13], [7, 11, 13, 19], [7, 11, 13, 17], [7, 11, 13, 17, 19], [7, 11, 13, 15], [7, 11, 13, 15, 19], [7, 11, 13, 15, 17], [7, 11, 13, 15, 17, 19], [7, 9], [7, 9, 19], [7, 9, 17], [7, 9, 17, 19], [7, 9, 15], [7, 9, 15, 19], [7, 9, 15, 17], [7, 9, 15, 17, 19], [7, 9, 13], [7, 9, 13, 19], [7, 9, 13, 17], [7, 9, 13, 17, 19], [7, 9, 13, 15], [7, 9, 13, 15, 19], [7, 9, 13, 15, 17], [7, 9, 13, 15, 17, 19], [7, 9, 11], [7, 9, 11, 19], [7, 9, 11, 17], [7, 9, 11, 17, 19], [7, 9, 11, 15], [7, 9, 11, 15, 19], [7, 9, 11, 15, 17], [7, 9, 11, 15, 17, 19], [7, 9, 11, 13], [7, 9, 11, 13, 19], [7, 9, 11, 13, 17], [7, 9, 11, 13, 17, 19], [7, 9, 11, 13, 15], [7, 9, 11, 13, 15, 19], [7, 9, 11, 13, 15, 17], [7, 9, 11, 13, 15, 17, 19], [5], [5, 19], [5, 17], [5, 17, 19], [5, 15], [5, 15, 19], [5, 15, 17], [5, 15, 17, 19], [5, 13], [5, 13, 19], [5, 13, 17], [5, 13, 17, 19], [5, 13, 15], [5, 13, 15, 19], [5, 13, 15, 17], [5, 13, 15, 17, 19], [5, 11], [5, 11, 19], [5, 11, 17], [5, 11, 17, 19], [5, 11, 15], [5, 11, 15, 19], [5, 11, 15, 17], [5, 11, 15, 17, 19], [5, 11, 13], [5, 11, 13, 19], [5, 11, 13, 17], [5, 11, 13, 17, 19], [5, 11, 13, 15], [5, 11, 13, 15, 19], [5, 11, 13, 15, 17], [5, 11, 13, 15, 17, 19], [5, 9], [5, 9, 19], [5, 9, 17], [5, 9, 17, 19], [5, 9, 15], [5, 9, 15, 19], [5, 9, 15, 17], [5, 9, 15, 17, 19], [5, 9, 13], [5, 9, 13, 19], [5, 9, 13, 17], [5, 9, 13, 17, 19], [5, 9, 13, 15], [5, 9, 13, 15, 19], [5, 9, 13, 15, 17], [5, 9, 13, 15, 17, 19], [5, 9, 11], [5, 9, 11, 19], [5, 9, 11, 17], [5, 9, 11, 17, 19], [5, 9, 11, 15], [5, 9, 11, 15, 19], [5, 9, 11, 15, 17], [5, 9, 11, 15, 17, 19], [5, 9, 11, 13], [5, 9, 11, 13, 19], [5, 9, 11, 13, 17], [5, 9, 11, 13, 17, 19], [5, 9, 11, 13, 15], [5, 9, 11, 13, 15, 19], [5, 9, 11, 13, 15, 17], [5, 9, 11, 13, 15, 17, 19], [5, 7], [5, 7, 19], [5, 7, 17], [5, 7, 17, 19], [5, 7, 15], [5, 7, 15, 19], [5, 7, 15, 17], [5, 7, 15, 17, 19], [5, 7, 13], [5, 7, 13, 19], [5, 7, 13, 17], [5, 7, 13, 17, 19], [5, 7, 13, 15], [5, 7, 13, 15, 19], [5, 7, 13, 15, 17], [5, 7, 13, 15, 17, 19], [5, 7, 11], [5, 7, 11, 19], [5, 7, 11, 17], [5, 7, 11, 17, 19], [5, 7, 11, 15], [5, 7, 11, 15, 19], [5, 7, 11, 15, 17], [5, 7, 11, 15, 17, 19], [5, 7, 11, 13], [5, 7, 11, 13, 19], [5, 7, 11, 13, 17], [5, 7, 11, 13, 17, 19], [5, 7, 11, 13, 15], [5, 7, 11, 13, 15, 19], [5, 7, 11, 13, 15, 17], [5, 7, 11, 13, 15, 17, 19], [5, 7, 9], [5, 7, 9, 19], [5, 7, 9, 17], [5, 7, 9, 17, 19], [5, 7, 9, 15], [5, 7, 9, 15, 19], [5, 7, 9, 15, 17], [5, 7, 9, 15, 17, 19], [5, 7, 9, 13], [5, 7, 9, 13, 19], [5, 7, 9, 13, 17], [5, 7, 9, 13, 17, 19], [5, 7, 9, 13, 15], [5, 7, 9, 13, 15, 19], [5, 7, 9, 13, 15, 17], [5, 7, 9, 13, 15, 17, 19], [5, 7, 9, 11], [5, 7, 9, 11, 19], [5, 7, 9, 11, 17], [5, 7, 9, 11, 17, 19], [5, 7, 9, 11, 15], [5, 7, 9, 11, 15, 19], [5, 7, 9, 11, 15, 17], [5, 7, 9, 11, 15, 17, 19], [5, 7, 9, 11, 13], [5, 7, 9, 11, 13, 19], [5, 7, 9, 11, 13, 17], [5, 7, 9, 11, 13, 17, 19], [5, 7, 9, 11, 13, 15], [5, 7, 9, 11, 13, 15, 19], [5, 7, 9, 11, 13, 15, 17], [5, 7, 9, 11, 13, 15, 17, 19], [3], [3, 19], [3, 17], [3, 17, 19], [3, 15], [3, 15, 19], [3, 15, 17], [3, 15, 17, 19], [3, 13], [3, 13, 19], [3, 13, 17], [3, 13, 17, 19], [3, 13, 15], [3, 13, 15, 19], [3, 13, 15, 17], [3, 13, 15, 17, 19], [3, 11], [3, 11, 19], [3, 11, 17], [3, 11, 17, 19], [3, 11, 15], [3, 11, 15, 19], [3, 11, 15, 17], [3, 11, 15, 17, 19], [3, 11, 13], [3, 11, 13, 19], [3, 11, 13, 17], [3, 11, 13, 17, 19], [3, 11, 13, 15], [3, 11, 13, 15, 19], [3, 11, 13, 15, 17], [3, 11, 13, 15, 17, 19], [3, 9], [3, 9, 19], [3, 9, 17], [3, 9, 17, 19], [3, 9, 15], [3, 9, 15, 19], [3, 9, 15, 17], [3, 9, 15, 17, 19], [3, 9, 13], [3, 9, 13, 19], [3, 9, 13, 17], [3, 9, 13, 17, 19], [3, 9, 13, 15], [3, 9, 13, 15, 19], [3, 9, 13, 15, 17], [3, 9, 13, 15, 17, 19], [3, 9, 11], [3, 9, 11, 19], [3, 9, 11, 17], [3, 9, 11, 17, 19], [3, 9, 11, 15], [3, 9, 11, 15, 19], [3, 9, 11, 15, 17], [3, 9, 11, 15, 17, 19], [3, 9, 11, 13], [3, 9, 11, 13, 19], [3, 9, 11, 13, 17], [3, 9, 11, 13, 17, 19], [3, 9, 11, 13, 15], [3, 9, 11, 13, 15, 19], [3, 9, 11, 13, 15, 17], [3, 9, 11, 13, 15, 17, 19], [3, 7], [3, 7, 19], [3, 7, 17], [3, 7, 17, 19], [3, 7, 15], [3, 7, 15, 19], [3, 7, 15, 17], [3, 7, 15, 17, 19], [3, 7, 13], [3, 7, 13, 19], [3, 7, 13, 17], [3, 7, 13, 17, 19], [3, 7, 13, 15], [3, 7, 13, 15, 19], [3, 7, 13, 15, 17], [3, 7, 13, 15, 17, 19], [3, 7, 11], [3, 7, 11, 19], [3, 7, 11, 17], [3, 7, 11, 17, 19], [3, 7, 11, 15], [3, 7, 11, 15, 19], [3, 7, 11, 15, 17], [3, 7, 11, 15, 17, 19], [3, 7, 11, 13], [3, 7, 11, 13, 19], [3, 7, 11, 13, 17], [3, 7, 11, 13, 17, 19], [3, 7, 11, 13, 15], [3, 7, 11, 13, 15, 19], [3, 7, 11, 13, 15, 17], [3, 7, 11, 13, 15, 17, 19], [3, 7, 9], [3, 7, 9, 19], [3, 7, 9, 17], [3, 7, 9, 17, 19], [3, 7, 9, 15], [3, 7, 9, 15, 19], [3, 7, 9, 15, 17], [3, 7, 9, 15, 17, 19], [3, 7, 9, 13], [3, 7, 9, 13, 19], [3, 7, 9, 13, 17], [3, 7, 9, 13, 17, 19], [3, 7, 9, 13, 15], [3, 7, 9, 13, 15, 19], [3, 7, 9, 13, 15, 17], [3, 7, 9, 13, 15, 17, 19], [3, 7, 9, 11], [3, 7, 9, 11, 19], [3, 7, 9, 11, 17], [3, 7, 9, 11, 17, 19], [3, 7, 9, 11, 15], [3, 7, 9, 11, 15, 19], [3, 7, 9, 11, 15, 17], [3, 7, 9, 11, 15, 17, 19], [3, 7, 9, 11, 13], [3, 7, 9, 11, 13, 19], [3, 7, 9, 11, 13, 17], [3, 7, 9, 11, 13, 17, 19], [3, 7, 9, 11, 13, 15], [3, 7, 9, 11, 13, 15, 19], [3, 7, 9, 11, 13, 15, 17], [3, 7, 9, 11, 13, 15, 17, 19], [3, 5], [3, 5, 19], [3, 5, 17], [3, 5, 17, 19], [3, 5, 15], [3, 5, 15, 19], [3, 5, 15, 17], [3, 5, 15, 17, 19], [3, 5, 13], [3, 5, 13, 19], [3, 5, 13, 17], [3, 5, 13, 17, 19], [3, 5, 13, 15], [3, 5, 13, 15, 19], [3, 5, 13, 15, 17], [3, 5, 13, 15, 17, 19], [3, 5, 11], [3, 5, 11, 19], [3, 5, 11, 17], [3, 5, 11, 17, 19], [3, 5, 11, 15], [3, 5, 11, 15, 19], [3, 5, 11, 15, 17], [3, 5, 11, 15, 17, 19], [3, 5, 11, 13], [3, 5, 11, 13, 19], [3, 5, 11, 13, 17], [3, 5, 11, 13, 17, 19], [3, 5, 11, 13, 15], [3, 5, 11, 13, 15, 19], [3, 5, 11, 13, 15, 17], [3, 5, 11, 13, 15, 17, 19], [3, 5, 9], [3, 5, 9, 19], [3, 5, 9, 17], [3, 5, 9, 17, 19], [3, 5, 9, 15], [3, 5, 9, 15, 19], [3, 5, 9, 15, 17], [3, 5, 9, 15, 17, 19], [3, 5, 9, 13], [3, 5, 9, 13, 19], [3, 5, 9, 13, 17], [3, 5, 9, 13, 17, 19], [3, 5, 9, 13, 15], [3, 5, 9, 13, 15, 19], [3, 5, 9, 13, 15, 17], [3, 5, 9, 13, 15, 17, 19], [3, 5, 9, 11], [3, 5, 9, 11, 19], [3, 5, 9, 11, 17], [3, 5, 9, 11, 17, 19], [3, 5, 9, 11, 15], [3, 5, 9, 11, 15, 19], [3, 5, 9, 11, 15, 17], [3, 5, 9, 11, 15, 17, 19], [3, 5, 9, 11, 13], [3, 5, 9, 11, 13, 19], [3, 5, 9, 11, 13, 17], [3, 5, 9, 11, 13, 17, 19], [3, 5, 9, 11, 13, 15], [3, 5, 9, 11, 13, 15, 19], [3, 5, 9, 11, 13, 15, 17], [3, 5, 9, 11, 13, 15, 17, 19], [3, 5, 7], [3, 5, 7, 19], [3, 5, 7, 17], [3, 5, 7, 17, 19], [3, 5, 7, 15], [3, 5, 7, 15, 19], [3, 5, 7, 15, 17], [3, 5, 7, 15, 17, 19], [3, 5, 7, 13], [3, 5, 7, 13, 19], [3, 5, 7, 13, 17], [3, 5, 7, 13, 17, 19], [3, 5, 7, 13, 15], [3, 5, 7, 13, 15, 19], [3, 5, 7, 13, 15, 17], [3, 5, 7, 13, 15, 17, 19], [3, 5, 7, 11], [3, 5, 7, 11, 19], [3, 5, 7, 11, 17], [3, 5, 7, 11, 17, 19], [3, 5, 7, 11, 15], [3, 5, 7, 11, 15, 19], [3, 5, 7, 11, 15, 17], [3, 5, 7, 11, 15, 17, 19], [3, 5, 7, 11, 13], [3, 5, 7, 11, 13, 19], [3, 5, 7, 11, 13, 17], [3, 5, 7, 11, 13, 17, 19], [3, 5, 7, 11, 13, 15], [3, 5, 7, 11, 13, 15, 19], [3, 5, 7, 11, 13, 15, 17], [3, 5, 7, 11, 13, 15, 17, 19], [3, 5, 7, 9], [3, 5, 7, 9, 19], [3, 5, 7, 9, 17], [3, 5, 7, 9, 17, 19], [3, 5, 7, 9, 15], [3, 5, 7, 9, 15, 19], [3, 5, 7, 9, 15, 17], [3, 5, 7, 9, 15, 17, 19], [3, 5, 7, 9, 13], [3, 5, 7, 9, 13, 19], [3, 5, 7, 9, 13, 17], [3, 5, 7, 9, 13, 17, 19], [3, 5, 7, 9, 13, 15], [3, 5, 7, 9, 13, 15, 19], [3, 5, 7, 9, 13, 15, 17], [3, 5, 7, 9, 13, 15, 17, 19], [3, 5, 7, 9, 11], [3, 5, 7, 9, 11, 19], [3, 5, 7, 9, 11, 17], [3, 5, 7, 9, 11, 17, 19], [3, 5, 7, 9, 11, 15], [3, 5, 7, 9, 11, 15, 19], [3, 5, 7, 9, 11, 15, 17], [3, 5, 7, 9, 11, 15, 17, 19], [3, 5, 7, 9, 11, 13], [3, 5, 7, 9, 11, 13, 19], [3, 5, 7, 9, 11, 13, 17], [3, 5, 7, 9, 11, 13, 17, 19], [3, 5, 7, 9, 11, 13, 15], [3, 5, 7, 9, 11, 13, 15, 19], [3, 5, 7, 9, 11, 13, 15, 17], [3, 5, 7, 9, 11, 13, 15, 17, 19], [1], [1, 19], [1, 17], [1, 17, 19], [1, 15], [1, 15, 19], [1, 15, 17], [1, 15, 17, 19], [1, 13], [1, 13, 19], [1, 13, 17], [1, 13, 17, 19], [1, 13, 15], [1, 13, 15, 19], [1, 13, 15, 17], [1, 13, 15, 17, 19], [1, 11], [1, 11, 19], [1, 11, 17], [1, 11, 17, 19], [1, 11, 15], [1, 11, 15, 19], [1, 11, 15, 17], [1, 11, 15, 17, 19], [1, 11, 13], [1, 11, 13, 19], [1, 11, 13, 17], [1, 11, 13, 17, 19], [1, 11, 13, 15], [1, 11, 13, 15, 19], [1, 11, 13, 15, 17], [1, 11, 13, 15, 17, 19], [1, 9], [1, 9, 19], [1, 9, 17], [1, 9, 17, 19], [1, 9, 15], [1, 9, 15, 19], [1, 9, 15, 17], [1, 9, 15, 17, 19], [1, 9, 13], [1, 9, 13, 19], [1, 9, 13, 17], [1, 9, 13, 17, 19], [1, 9, 13, 15], [1, 9, 13, 15, 19], [1, 9, 13, 15, 17], [1, 9, 13, 15, 17, 19], [1, 9, 11], [1, 9, 11, 19], [1, 9, 11, 17], [1, 9, 11, 17, 19], [1, 9, 11, 15], [1, 9, 11, 15, 19], [1, 9, 11, 15, 17], [1, 9, 11, 15, 17, 19], [1, 9, 11, 13], [1, 9, 11, 13, 19], [1, 9, 11, 13, 17], [1, 9, 11, 13, 17, 19], [1, 9, 11, 13, 15], [1, 9, 11, 13, 15, 19], [1, 9, 11, 13, 15, 17], [1, 9, 11, 13, 15, 17, 19], [1, 7], [1, 7, 19], [1, 7, 17], [1, 7, 17, 19], [1, 7, 15], [1, 7, 15, 19], [1, 7, 15, 17], [1, 7, 15, 17, 19], [1, 7, 13], [1, 7, 13, 19], [1, 7, 13, 17], [1, 7, 13, 17, 19], [1, 7, 13, 15], [1, 7, 13, 15, 19], [1, 7, 13, 15, 17], [1, 7, 13, 15, 17, 19], [1, 7, 11], [1, 7, 11, 19], [1, 7, 11, 17], [1, 7, 11, 17, 19], [1, 7, 11, 15], [1, 7, 11, 15, 19], [1, 7, 11, 15, 17], [1, 7, 11, 15, 17, 19], [1, 7, 11, 13], [1, 7, 11, 13, 19], [1, 7, 11, 13, 17], [1, 7, 11, 13, 17, 19], [1, 7, 11, 13, 15], [1, 7, 11, 13, 15, 19], [1, 7, 11, 13, 15, 17], [1, 7, 11, 13, 15, 17, 19], [1, 7, 9], [1, 7, 9, 19], [1, 7, 9, 17], [1, 7, 9, 17, 19], [1, 7, 9, 15], [1, 7, 9, 15, 19], [1, 7, 9, 15, 17], [1, 7, 9, 15, 17, 19], [1, 7, 9, 13], [1, 7, 9, 13, 19], [1, 7, 9, 13, 17], [1, 7, 9, 13, 17, 19], [1, 7, 9, 13, 15], [1, 7, 9, 13, 15, 19], [1, 7, 9, 13, 15, 17], [1, 7, 9, 13, 15, 17, 19], [1, 7, 9, 11], [1, 7, 9, 11, 19], [1, 7, 9, 11, 17], [1, 7, 9, 11, 17, 19], [1, 7, 9, 11, 15], [1, 7, 9, 11, 15, 19], [1, 7, 9, 11, 15, 17], [1, 7, 9, 11, 15, 17, 19], [1, 7, 9, 11, 13], [1, 7, 9, 11, 13, 19], [1, 7, 9, 11, 13, 17], [1, 7, 9, 11, 13, 17, 19], [1, 7, 9, 11, 13, 15], [1, 7, 9, 11, 13, 15, 19], [1, 7, 9, 11, 13, 15, 17], [1, 7, 9, 11, 13, 15, 17, 19], [1, 5], [1, 5, 19], [1, 5, 17], [1, 5, 17, 19], [1, 5, 15], [1, 5, 15, 19], [1, 5, 15, 17], [1, 5, 15, 17, 19], [1, 5, 13], [1, 5, 13, 19], [1, 5, 13, 17], [1, 5, 13, 17, 19], [1, 5, 13, 15], [1, 5, 13, 15, 19], [1, 5, 13, 15, 17], [1, 5, 13, 15, 17, 19], [1, 5, 11], [1, 5, 11, 19], [1, 5, 11, 17], [1, 5, 11, 17, 19], [1, 5, 11, 15], [1, 5, 11, 15, 19], [1, 5, 11, 15, 17], [1, 5, 11, 15, 17, 19], [1, 5, 11, 13], [1, 5, 11, 13, 19], [1, 5, 11, 13, 17], [1, 5, 11, 13, 17, 19], [1, 5, 11, 13, 15], [1, 5, 11, 13, 15, 19], [1, 5, 11, 13, 15, 17], [1, 5, 11, 13, 15, 17, 19], [1, 5, 9], [1, 5, 9, 19], [1, 5, 9, 17], [1, 5, 9, 17, 19], [1, 5, 9, 15], [1, 5, 9, 15, 19], [1, 5, 9, 15, 17], [1, 5, 9, 15, 17, 19], [1, 5, 9, 13], [1, 5, 9, 13, 19], [1, 5, 9, 13, 17], [1, 5, 9, 13, 17, 19], [1, 5, 9, 13, 15], [1, 5, 9, 13, 15, 19], [1, 5, 9, 13, 15, 17], [1, 5, 9, 13, 15, 17, 19], [1, 5, 9, 11], [1, 5, 9, 11, 19], [1, 5, 9, 11, 17], [1, 5, 9, 11, 17, 19], [1, 5, 9, 11, 15], [1, 5, 9, 11, 15, 19], [1, 5, 9, 11, 15, 17], [1, 5, 9, 11, 15, 17, 19], [1, 5, 9, 11, 13], [1, 5, 9, 11, 13, 19], [1, 5, 9, 11, 13, 17], [1, 5, 9, 11, 13, 17, 19], [1, 5, 9, 11, 13, 15], [1, 5, 9, 11, 13, 15, 19], [1, 5, 9, 11, 13, 15, 17], [1, 5, 9, 11, 13, 15, 17, 19], [1, 5, 7], [1, 5, 7, 19], [1, 5, 7, 17], [1, 5, 7, 17, 19], [1, 5, 7, 15], [1, 5, 7, 15, 19], [1, 5, 7, 15, 17], [1, 5, 7, 15, 17, 19], [1, 5, 7, 13], [1, 5, 7, 13, 19], [1, 5, 7, 13, 17], [1, 5, 7, 13, 17, 19], [1, 5, 7, 13, 15], [1, 5, 7, 13, 15, 19], [1, 5, 7, 13, 15, 17], [1, 5, 7, 13, 15, 17, 19], [1, 5, 7, 11], [1, 5, 7, 11, 19], [1, 5, 7, 11, 17], [1, 5, 7, 11, 17, 19], [1, 5, 7, 11, 15], [1, 5, 7, 11, 15, 19], [1, 5, 7, 11, 15, 17], [1, 5, 7, 11, 15, 17, 19], [1, 5, 7, 11, 13], [1, 5, 7, 11, 13, 19], [1, 5, 7, 11, 13, 17], [1, 5, 7, 11, 13, 17, 19], [1, 5, 7, 11, 13, 15], [1, 5, 7, 11, 13, 15, 19], [1, 5, 7, 11, 13, 15, 17], [1, 5, 7, 11, 13, 15, 17, 19], [1, 5, 7, 9], [1, 5, 7, 9, 19], [1, 5, 7, 9, 17], [1, 5, 7, 9, 17, 19], [1, 5, 7, 9, 15], [1, 5, 7, 9, 15, 19], [1, 5, 7, 9, 15, 17], [1, 5, 7, 9, 15, 17, 19], [1, 5, 7, 9, 13], [1, 5, 7, 9, 13, 19], [1, 5, 7, 9, 13, 17], [1, 5, 7, 9, 13, 17, 19], [1, 5, 7, 9, 13, 15], [1, 5, 7, 9, 13, 15, 19], [1, 5, 7, 9, 13, 15, 17], [1, 5, 7, 9, 13, 15, 17, 19], [1, 5, 7, 9, 11], [1, 5, 7, 9, 11, 19], [1, 5, 7, 9, 11, 17], [1, 5, 7, 9, 11, 17, 19], [1, 5, 7, 9, 11, 15], [1, 5, 7, 9, 11, 15, 19], [1, 5, 7, 9, 11, 15, 17], [1, 5, 7, 9, 11, 15, 17, 19], [1, 5, 7, 9, 11, 13], [1, 5, 7, 9, 11, 13, 19], [1, 5, 7, 9, 11, 13, 17], [1, 5, 7, 9, 11, 13, 17, 19], [1, 5, 7, 9, 11, 13, 15], [1, 5, 7, 9, 11, 13, 15, 19], [1, 5, 7, 9, 11, 13, 15, 17], [1, 5, 7, 9, 11, 13, 15, 17, 19], [1, 3], [1, 3, 19], [1, 3, 17], [1, 3, 17, 19], [1, 3, 15], [1, 3, 15, 19], [1, 3, 15, 17], [1, 3, 15, 17, 19], [1, 3, 13], [1, 3, 13, 19], [1, 3, 13, 17], [1, 3, 13, 17, 19], [1, 3, 13, 15], [1, 3, 13, 15, 19], [1, 3, 13, 15, 17], [1, 3, 13, 15, 17, 19], [1, 3, 11], [1, 3, 11, 19], [1, 3, 11, 17], [1, 3, 11, 17, 19], [1, 3, 11, 15], [1, 3, 11, 15, 19], [1, 3, 11, 15, 17], [1, 3, 11, 15, 17, 19], [1, 3, 11, 13], [1, 3, 11, 13, 19], [1, 3, 11, 13, 17], [1, 3, 11, 13, 17, 19], [1, 3, 11, 13, 15], [1, 3, 11, 13, 15, 19], [1, 3, 11, 13, 15, 17], [1, 3, 11, 13, 15, 17, 19], [1, 3, 9], [1, 3, 9, 19], [1, 3, 9, 17], [1, 3, 9, 17, 19], [1, 3, 9, 15], [1, 3, 9, 15, 19], [1, 3, 9, 15, 17], [1, 3, 9, 15, 17, 19], [1, 3, 9, 13], [1, 3, 9, 13, 19], [1, 3, 9, 13, 17], [1, 3, 9, 13, 17, 19], [1, 3, 9, 13, 15], [1, 3, 9, 13, 15, 19], [1, 3, 9, 13, 15, 17], [1, 3, 9, 13, 15, 17, 19], [1, 3, 9, 11], [1, 3, 9, 11, 19], [1, 3, 9, 11, 17], [1, 3, 9, 11, 17, 19], [1, 3, 9, 11, 15], [1, 3, 9, 11, 15, 19], [1, 3, 9, 11, 15, 17], [1, 3, 9, 11, 15, 17, 19], [1, 3, 9, 11, 13], [1, 3, 9, 11, 13, 19], [1, 3, 9, 11, 13, 17], [1, 3, 9, 11, 13, 17, 19], [1, 3, 9, 11, 13, 15], [1, 3, 9, 11, 13, 15, 19], [1, 3, 9, 11, 13, 15, 17], [1, 3, 9, 11, 13, 15, 17, 19], [1, 3, 7], [1, 3, 7, 19], [1, 3, 7, 17], [1, 3, 7, 17, 19], [1, 3, 7, 15], [1, 3, 7, 15, 19], [1, 3, 7, 15, 17], [1, 3, 7, 15, 17, 19], [1, 3, 7, 13], [1, 3, 7, 13, 19], [1, 3, 7, 13, 17], [1, 3, 7, 13, 17, 19], [1, 3, 7, 13, 15], [1, 3, 7, 13, 15, 19], [1, 3, 7, 13, 15, 17], [1, 3, 7, 13, 15, 17, 19], [1, 3, 7, 11], [1, 3, 7, 11, 19], [1, 3, 7, 11, 17], [1, 3, 7, 11, 17, 19], [1, 3, 7, 11, 15], [1, 3, 7, 11, 15, 19], [1, 3, 7, 11, 15, 17], [1, 3, 7, 11, 15, 17, 19], [1, 3, 7, 11, 13], [1, 3, 7, 11, 13, 19], [1, 3, 7, 11, 13, 17], [1, 3, 7, 11, 13, 17, 19], [1, 3, 7, 11, 13, 15], [1, 3, 7, 11, 13, 15, 19], [1, 3, 7, 11, 13, 15, 17], [1, 3, 7, 11, 13, 15, 17, 19], [1, 3, 7, 9], [1, 3, 7, 9, 19], [1, 3, 7, 9, 17], [1, 3, 7, 9, 17, 19], [1, 3, 7, 9, 15], [1, 3, 7, 9, 15, 19], [1, 3, 7, 9, 15, 17], [1, 3, 7, 9, 15, 17, 19], [1, 3, 7, 9, 13], [1, 3, 7, 9, 13, 19], [1, 3, 7, 9, 13, 17], [1, 3, 7, 9, 13, 17, 19], [1, 3, 7, 9, 13, 15], [1, 3, 7, 9, 13, 15, 19], [1, 3, 7, 9, 13, 15, 17], [1, 3, 7, 9, 13, 15, 17, 19], [1, 3, 7, 9, 11], [1, 3, 7, 9, 11, 19], [1, 3, 7, 9, 11, 17], [1, 3, 7, 9, 11, 17, 19], [1, 3, 7, 9, 11, 15], [1, 3, 7, 9, 11, 15, 19], [1, 3, 7, 9, 11, 15, 17], [1, 3, 7, 9, 11, 15, 17, 19], [1, 3, 7, 9, 11, 13], [1, 3, 7, 9, 11, 13, 19], [1, 3, 7, 9, 11, 13, 17], [1, 3, 7, 9, 11, 13, 17, 19], [1, 3, 7, 9, 11, 13, 15], [1, 3, 7, 9, 11, 13, 15, 19], [1, 3, 7, 9, 11, 13, 15, 17], [1, 3, 7, 9, 11, 13, 15, 17, 19], [1, 3, 5], [1, 3, 5, 19], [1, 3, 5, 17], [1, 3, 5, 17, 19], [1, 3, 5, 15], [1, 3, 5, 15, 19], [1, 3, 5, 15, 17], [1, 3, 5, 15, 17, 19], [1, 3, 5, 13], [1, 3, 5, 13, 19], [1, 3, 5, 13, 17], [1, 3, 5, 13, 17, 19], [1, 3, 5, 13, 15], [1, 3, 5, 13, 15, 19], [1, 3, 5, 13, 15, 17], [1, 3, 5, 13, 15, 17, 19], [1, 3, 5, 11], [1, 3, 5, 11, 19], [1, 3, 5, 11, 17], [1, 3, 5, 11, 17, 19], [1, 3, 5, 11, 15], [1, 3, 5, 11, 15, 19], [1, 3, 5, 11, 15, 17], [1, 3, 5, 11, 15, 17, 19], [1, 3, 5, 11, 13], [1, 3, 5, 11, 13, 19], [1, 3, 5, 11, 13, 17], [1, 3, 5, 11, 13, 17, 19], [1, 3, 5, 11, 13, 15], [1, 3, 5, 11, 13, 15, 19], [1, 3, 5, 11, 13, 15, 17], [1, 3, 5, 11, 13, 15, 17, 19], [1, 3, 5, 9], [1, 3, 5, 9, 19], [1, 3, 5, 9, 17], [1, 3, 5, 9, 17, 19], [1, 3, 5, 9, 15], [1, 3, 5, 9, 15, 19], [1, 3, 5, 9, 15, 17], [1, 3, 5, 9, 15, 17, 19], [1, 3, 5, 9, 13], [1, 3, 5, 9, 13, 19], [1, 3, 5, 9, 13, 17], [1, 3, 5, 9, 13, 17, 19], [1, 3, 5, 9, 13, 15], [1, 3, 5, 9, 13, 15, 19], [1, 3, 5, 9, 13, 15, 17], [1, 3, 5, 9, 13, 15, 17, 19], [1, 3, 5, 9, 11], [1, 3, 5, 9, 11, 19], [1, 3, 5, 9, 11, 17], [1, 3, 5, 9, 11, 17, 19], [1, 3, 5, 9, 11, 15], [1, 3, 5, 9, 11, 15, 19], [1, 3, 5, 9, 11, 15, 17], [1, 3, 5, 9, 11, 15, 17, 19], [1, 3, 5, 9, 11, 13], [1, 3, 5, 9, 11, 13, 19], [1, 3, 5, 9, 11, 13, 17], [1, 3, 5, 9, 11, 13, 17, 19], [1, 3, 5, 9, 11, 13, 15], [1, 3, 5, 9, 11, 13, 15, 19], [1, 3, 5, 9, 11, 13, 15, 17], [1, 3, 5, 9, 11, 13, 15, 17, 19], [1, 3, 5, 7], [1, 3, 5, 7, 19], [1, 3, 5, 7, 17], [1, 3, 5, 7, 17, 19], [1, 3, 5, 7, 15], [1, 3, 5, 7, 15, 19], [1, 3, 5, 7, 15, 17], [1, 3, 5, 7, 15, 17, 19], [1, 3, 5, 7, 13], [1, 3, 5, 7, 13, 19], [1, 3, 5, 7, 13, 17], [1, 3, 5, 7, 13, 17, 19], [1, 3, 5, 7, 13, 15], [1, 3, 5, 7, 13, 15, 19], [1, 3, 5, 7, 13, 15, 17], [1, 3, 5, 7, 13, 15, 17, 19], [1, 3, 5, 7, 11], [1, 3, 5, 7, 11, 19], [1, 3, 5, 7, 11, 17], [1, 3, 5, 7, 11, 17, 19], [1, 3, 5, 7, 11, 15], [1, 3, 5, 7, 11, 15, 19], [1, 3, 5, 7, 11, 15, 17], [1, 3, 5, 7, 11, 15, 17, 19], [1, 3, 5, 7, 11, 13], [1, 3, 5, 7, 11, 13, 19], [1, 3, 5, 7, 11, 13, 17], [1, 3, 5, 7, 11, 13, 17, 19], [1, 3, 5, 7, 11, 13, 15], [1, 3, 5, 7, 11, 13, 15, 19], [1, 3, 5, 7, 11, 13, 15, 17], [1, 3, 5, 7, 11, 13, 15, 17, 19], [1, 3, 5, 7, 9], [1, 3, 5, 7, 9, 19], [1, 3, 5, 7, 9, 17], [1, 3, 5, 7, 9, 17, 19], [1, 3, 5, 7, 9, 15], [1, 3, 5, 7, 9, 15, 19], [1, 3, 5, 7, 9, 15, 17], [1, 3, 5, 7, 9, 15, 17, 19], [1, 3, 5, 7, 9, 13], [1, 3, 5, 7, 9, 13, 19], [1, 3, 5, 7, 9, 13, 17], [1, 3, 5, 7, 9, 13, 17, 19], [1, 3, 5, 7, 9, 13, 15], [1, 3, 5, 7, 9, 13, 15, 19], [1, 3, 5, 7, 9, 13, 15, 17], [1, 3, 5, 7, 9, 13, 15, 17, 19], [1, 3, 5, 7, 9, 11], [1, 3, 5, 7, 9, 11, 19], [1, 3, 5, 7, 9, 11, 17], [1, 3, 5, 7, 9, 11, 17, 19], [1, 3, 5, 7, 9, 11, 15], [1, 3, 5, 7, 9, 11, 15, 19], [1, 3, 5, 7, 9, 11, 15, 17], [1, 3, 5, 7, 9, 11, 15, 17, 19], [1, 3, 5, 7, 9, 11, 13], [1, 3, 5, 7, 9, 11, 13, 19], [1, 3, 5, 7, 9, 11, 13, 17], [1, 3, 5, 7, 9, 11, 13, 17, 19], [1, 3, 5, 7, 9, 11, 13, 15], [1, 3, 5, 7, 9, 11, 13, 15, 19], [1, 3, 5, 7, 9, 11, 13, 15, 17], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]]\n assert candidate(nums = [7, 14, 28, 56, 112]) == [[], [112], [56], [56, 112], [28], [28, 112], [28, 56], [28, 56, 112], [14], [14, 112], [14, 56], [14, 56, 112], [14, 28], [14, 28, 112], [14, 28, 56], [14, 28, 56, 112], [7], [7, 112], [7, 56], [7, 56, 112], [7, 28], [7, 28, 112], [7, 28, 56], [7, 28, 56, 112], [7, 14], [7, 14, 112], [7, 14, 56], [7, 14, 56, 112], [7, 14, 28], [7, 14, 28, 112], [7, 14, 28, 56], [7, 14, 28, 56, 112]]\n assert 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 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 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 candidate(nums = [0, 1, 10, 100, 1000, 10000]) == [[], [10000], [1000], [1000, 10000], [100], [100, 10000], [100, 1000], [100, 1000, 10000], [10], [10, 10000], [10, 1000], [10, 1000, 10000], [10, 100], [10, 100, 10000], [10, 100, 1000], [10, 100, 1000, 10000], [1], [1, 10000], [1, 1000], [1, 1000, 10000], [1, 100], [1, 100, 10000], [1, 100, 1000], [1, 100, 1000, 10000], [1, 10], [1, 10, 10000], [1, 10, 1000], [1, 10, 1000, 10000], [1, 10, 100], [1, 10, 100, 10000], [1, 10, 100, 1000], [1, 10, 100, 1000, 10000], [0], [0, 10000], [0, 1000], [0, 1000, 10000], [0, 100], [0, 100, 10000], [0, 100, 1000], [0, 100, 1000, 10000], [0, 10], [0, 10, 10000], [0, 10, 1000], [0, 10, 1000, 10000], [0, 10, 100], [0, 10, 100, 10000], [0, 10, 100, 1000], [0, 10, 100, 1000, 10000], [0, 1], [0, 1, 10000], [0, 1, 1000], [0, 1, 1000, 10000], [0, 1, 100], [0, 1, 100, 10000], [0, 1, 100, 1000], [0, 1, 100, 1000, 10000], [0, 1, 10], [0, 1, 10, 10000], [0, 1, 10, 1000], [0, 1, 10, 1000, 10000], [0, 1, 10, 100], [0, 1, 10, 100, 10000], [0, 1, 10, 100, 1000], [0, 1, 10, 100, 1000, 10000]]\n assert candidate(nums = [-5, -10, -15, -20, -25, -30, -35]) == [[], [-35], [-30], [-30, -35], [-25], [-25, -35], [-25, -30], [-25, -30, -35], [-20], [-20, -35], [-20, -30], [-20, -30, -35], [-20, -25], [-20, -25, -35], [-20, -25, -30], [-20, -25, -30, -35], [-15], [-15, -35], [-15, -30], [-15, -30, -35], [-15, -25], [-15, -25, -35], [-15, -25, -30], [-15, -25, -30, -35], [-15, -20], [-15, -20, -35], [-15, -20, -30], [-15, -20, -30, -35], [-15, -20, -25], [-15, -20, -25, -35], [-15, -20, -25, -30], [-15, -20, -25, -30, -35], [-10], [-10, -35], [-10, -30], [-10, -30, -35], [-10, -25], [-10, -25, -35], [-10, -25, -30], [-10, -25, -30, -35], [-10, -20], [-10, -20, -35], [-10, -20, -30], [-10, -20, -30, -35], [-10, -20, -25], [-10, -20, -25, -35], [-10, -20, -25, -30], [-10, -20, -25, -30, -35], [-10, -15], [-10, -15, -35], [-10, -15, -30], [-10, -15, -30, -35], [-10, -15, -25], [-10, -15, -25, -35], [-10, -15, -25, -30], [-10, -15, -25, -30, -35], [-10, -15, -20], [-10, -15, -20, -35], [-10, -15, -20, -30], [-10, -15, -20, -30, -35], [-10, -15, -20, -25], [-10, -15, -20, -25, -35], [-10, -15, -20, -25, -30], [-10, -15, -20, -25, -30, -35], [-5], [-5, -35], [-5, -30], [-5, -30, -35], [-5, -25], [-5, -25, -35], [-5, -25, -30], [-5, -25, -30, -35], [-5, -20], [-5, -20, -35], [-5, -20, -30], [-5, -20, -30, -35], [-5, -20, -25], [-5, -20, -25, -35], [-5, -20, -25, -30], [-5, -20, -25, -30, -35], [-5, -15], [-5, -15, -35], [-5, -15, -30], [-5, -15, -30, -35], [-5, -15, -25], [-5, -15, -25, -35], [-5, -15, -25, -30], [-5, -15, -25, -30, -35], [-5, -15, -20], [-5, -15, -20, -35], [-5, -15, -20, -30], [-5, -15, -20, -30, -35], [-5, -15, -20, -25], [-5, -15, -20, -25, -35], [-5, -15, -20, -25, -30], [-5, -15, -20, -25, -30, -35], [-5, -10], [-5, -10, -35], [-5, -10, -30], [-5, -10, -30, -35], [-5, -10, -25], [-5, -10, -25, -35], [-5, -10, -25, -30], [-5, -10, -25, -30, -35], [-5, -10, -20], [-5, -10, -20, -35], [-5, -10, -20, -30], [-5, -10, -20, -30, -35], [-5, -10, -20, -25], [-5, -10, -20, -25, -35], [-5, -10, -20, -25, -30], [-5, -10, -20, -25, -30, -35], [-5, -10, -15], [-5, -10, -15, -35], [-5, -10, -15, -30], [-5, -10, -15, -30, -35], [-5, -10, -15, -25], [-5, -10, -15, -25, -35], [-5, -10, -15, -25, -30], [-5, -10, -15, -25, -30, -35], [-5, -10, -15, -20], [-5, -10, -15, -20, -35], [-5, -10, -15, -20, -30], [-5, -10, -15, -20, -30, -35], [-5, -10, -15, -20, -25], [-5, -10, -15, -20, -25, -35], [-5, -10, -15, -20, -25, -30], [-5, -10, -15, -20, -25, -30, -35]]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == [[], [100], [90], [90, 100], [80], [80, 100], [80, 90], [80, 90, 100], [70], [70, 100], [70, 90], [70, 90, 100], [70, 80], [70, 80, 100], [70, 80, 90], [70, 80, 90, 100], [60], [60, 100], [60, 90], [60, 90, 100], [60, 80], [60, 80, 100], [60, 80, 90], [60, 80, 90, 100], [60, 70], [60, 70, 100], [60, 70, 90], [60, 70, 90, 100], [60, 70, 80], [60, 70, 80, 100], [60, 70, 80, 90], [60, 70, 80, 90, 100], [50], [50, 100], [50, 90], [50, 90, 100], [50, 80], [50, 80, 100], [50, 80, 90], [50, 80, 90, 100], [50, 70], [50, 70, 100], [50, 70, 90], [50, 70, 90, 100], [50, 70, 80], [50, 70, 80, 100], [50, 70, 80, 90], [50, 70, 80, 90, 100], [50, 60], [50, 60, 100], [50, 60, 90], [50, 60, 90, 100], [50, 60, 80], [50, 60, 80, 100], [50, 60, 80, 90], [50, 60, 80, 90, 100], [50, 60, 70], [50, 60, 70, 100], [50, 60, 70, 90], [50, 60, 70, 90, 100], [50, 60, 70, 80], [50, 60, 70, 80, 100], [50, 60, 70, 80, 90], [50, 60, 70, 80, 90, 100], [40], [40, 100], [40, 90], [40, 90, 100], [40, 80], [40, 80, 100], [40, 80, 90], [40, 80, 90, 100], [40, 70], [40, 70, 100], [40, 70, 90], [40, 70, 90, 100], [40, 70, 80], [40, 70, 80, 100], [40, 70, 80, 90], [40, 70, 80, 90, 100], [40, 60], [40, 60, 100], [40, 60, 90], [40, 60, 90, 100], [40, 60, 80], [40, 60, 80, 100], [40, 60, 80, 90], [40, 60, 80, 90, 100], [40, 60, 70], [40, 60, 70, 100], [40, 60, 70, 90], [40, 60, 70, 90, 100], [40, 60, 70, 80], [40, 60, 70, 80, 100], [40, 60, 70, 80, 90], [40, 60, 70, 80, 90, 100], [40, 50], [40, 50, 100], [40, 50, 90], [40, 50, 90, 100], [40, 50, 80], [40, 50, 80, 100], [40, 50, 80, 90], [40, 50, 80, 90, 100], [40, 50, 70], [40, 50, 70, 100], [40, 50, 70, 90], [40, 50, 70, 90, 100], [40, 50, 70, 80], [40, 50, 70, 80, 100], [40, 50, 70, 80, 90], [40, 50, 70, 80, 90, 100], [40, 50, 60], [40, 50, 60, 100], [40, 50, 60, 90], [40, 50, 60, 90, 100], [40, 50, 60, 80], [40, 50, 60, 80, 100], [40, 50, 60, 80, 90], [40, 50, 60, 80, 90, 100], [40, 50, 60, 70], [40, 50, 60, 70, 100], [40, 50, 60, 70, 90], [40, 50, 60, 70, 90, 100], [40, 50, 60, 70, 80], [40, 50, 60, 70, 80, 100], [40, 50, 60, 70, 80, 90], [40, 50, 60, 70, 80, 90, 100], [30], [30, 100], [30, 90], [30, 90, 100], [30, 80], [30, 80, 100], [30, 80, 90], [30, 80, 90, 100], [30, 70], [30, 70, 100], [30, 70, 90], [30, 70, 90, 100], [30, 70, 80], [30, 70, 80, 100], [30, 70, 80, 90], [30, 70, 80, 90, 100], [30, 60], [30, 60, 100], [30, 60, 90], [30, 60, 90, 100], [30, 60, 80], [30, 60, 80, 100], [30, 60, 80, 90], [30, 60, 80, 90, 100], [30, 60, 70], [30, 60, 70, 100], [30, 60, 70, 90], [30, 60, 70, 90, 100], [30, 60, 70, 80], [30, 60, 70, 80, 100], [30, 60, 70, 80, 90], [30, 60, 70, 80, 90, 100], [30, 50], [30, 50, 100], [30, 50, 90], [30, 50, 90, 100], [30, 50, 80], [30, 50, 80, 100], [30, 50, 80, 90], [30, 50, 80, 90, 100], [30, 50, 70], [30, 50, 70, 100], [30, 50, 70, 90], [30, 50, 70, 90, 100], [30, 50, 70, 80], [30, 50, 70, 80, 100], [30, 50, 70, 80, 90], [30, 50, 70, 80, 90, 100], [30, 50, 60], [30, 50, 60, 100], [30, 50, 60, 90], [30, 50, 60, 90, 100], [30, 50, 60, 80], [30, 50, 60, 80, 100], [30, 50, 60, 80, 90], [30, 50, 60, 80, 90, 100], [30, 50, 60, 70], [30, 50, 60, 70, 100], [30, 50, 60, 70, 90], [30, 50, 60, 70, 90, 100], [30, 50, 60, 70, 80], [30, 50, 60, 70, 80, 100], [30, 50, 60, 70, 80, 90], [30, 50, 60, 70, 80, 90, 100], [30, 40], [30, 40, 100], [30, 40, 90], [30, 40, 90, 100], [30, 40, 80], [30, 40, 80, 100], [30, 40, 80, 90], [30, 40, 80, 90, 100], [30, 40, 70], [30, 40, 70, 100], [30, 40, 70, 90], [30, 40, 70, 90, 100], [30, 40, 70, 80], [30, 40, 70, 80, 100], [30, 40, 70, 80, 90], [30, 40, 70, 80, 90, 100], [30, 40, 60], [30, 40, 60, 100], [30, 40, 60, 90], [30, 40, 60, 90, 100], [30, 40, 60, 80], [30, 40, 60, 80, 100], [30, 40, 60, 80, 90], [30, 40, 60, 80, 90, 100], [30, 40, 60, 70], [30, 40, 60, 70, 100], [30, 40, 60, 70, 90], [30, 40, 60, 70, 90, 100], [30, 40, 60, 70, 80], [30, 40, 60, 70, 80, 100], [30, 40, 60, 70, 80, 90], [30, 40, 60, 70, 80, 90, 100], [30, 40, 50], [30, 40, 50, 100], [30, 40, 50, 90], [30, 40, 50, 90, 100], [30, 40, 50, 80], [30, 40, 50, 80, 100], [30, 40, 50, 80, 90], [30, 40, 50, 80, 90, 100], [30, 40, 50, 70], [30, 40, 50, 70, 100], [30, 40, 50, 70, 90], [30, 40, 50, 70, 90, 100], [30, 40, 50, 70, 80], [30, 40, 50, 70, 80, 100], [30, 40, 50, 70, 80, 90], [30, 40, 50, 70, 80, 90, 100], [30, 40, 50, 60], [30, 40, 50, 60, 100], [30, 40, 50, 60, 90], [30, 40, 50, 60, 90, 100], [30, 40, 50, 60, 80], [30, 40, 50, 60, 80, 100], [30, 40, 50, 60, 80, 90], [30, 40, 50, 60, 80, 90, 100], [30, 40, 50, 60, 70], [30, 40, 50, 60, 70, 100], [30, 40, 50, 60, 70, 90], [30, 40, 50, 60, 70, 90, 100], [30, 40, 50, 60, 70, 80], [30, 40, 50, 60, 70, 80, 100], [30, 40, 50, 60, 70, 80, 90], [30, 40, 50, 60, 70, 80, 90, 100], [20], [20, 100], [20, 90], [20, 90, 100], [20, 80], [20, 80, 100], [20, 80, 90], [20, 80, 90, 100], [20, 70], [20, 70, 100], [20, 70, 90], [20, 70, 90, 100], [20, 70, 80], [20, 70, 80, 100], [20, 70, 80, 90], [20, 70, 80, 90, 100], [20, 60], [20, 60, 100], [20, 60, 90], [20, 60, 90, 100], [20, 60, 80], [20, 60, 80, 100], [20, 60, 80, 90], [20, 60, 80, 90, 100], [20, 60, 70], [20, 60, 70, 100], [20, 60, 70, 90], [20, 60, 70, 90, 100], [20, 60, 70, 80], [20, 60, 70, 80, 100], [20, 60, 70, 80, 90], [20, 60, 70, 80, 90, 100], [20, 50], [20, 50, 100], [20, 50, 90], [20, 50, 90, 100], [20, 50, 80], [20, 50, 80, 100], [20, 50, 80, 90], [20, 50, 80, 90, 100], [20, 50, 70], [20, 50, 70, 100], [20, 50, 70, 90], [20, 50, 70, 90, 100], [20, 50, 70, 80], [20, 50, 70, 80, 100], [20, 50, 70, 80, 90], [20, 50, 70, 80, 90, 100], [20, 50, 60], [20, 50, 60, 100], [20, 50, 60, 90], [20, 50, 60, 90, 100], [20, 50, 60, 80], [20, 50, 60, 80, 100], [20, 50, 60, 80, 90], [20, 50, 60, 80, 90, 100], [20, 50, 60, 70], [20, 50, 60, 70, 100], [20, 50, 60, 70, 90], [20, 50, 60, 70, 90, 100], [20, 50, 60, 70, 80], [20, 50, 60, 70, 80, 100], [20, 50, 60, 70, 80, 90], [20, 50, 60, 70, 80, 90, 100], [20, 40], [20, 40, 100], [20, 40, 90], [20, 40, 90, 100], [20, 40, 80], [20, 40, 80, 100], [20, 40, 80, 90], [20, 40, 80, 90, 100], [20, 40, 70], [20, 40, 70, 100], [20, 40, 70, 90], [20, 40, 70, 90, 100], [20, 40, 70, 80], [20, 40, 70, 80, 100], [20, 40, 70, 80, 90], [20, 40, 70, 80, 90, 100], [20, 40, 60], [20, 40, 60, 100], [20, 40, 60, 90], [20, 40, 60, 90, 100], [20, 40, 60, 80], [20, 40, 60, 80, 100], [20, 40, 60, 80, 90], [20, 40, 60, 80, 90, 100], [20, 40, 60, 70], [20, 40, 60, 70, 100], [20, 40, 60, 70, 90], [20, 40, 60, 70, 90, 100], [20, 40, 60, 70, 80], [20, 40, 60, 70, 80, 100], [20, 40, 60, 70, 80, 90], [20, 40, 60, 70, 80, 90, 100], [20, 40, 50], [20, 40, 50, 100], [20, 40, 50, 90], [20, 40, 50, 90, 100], [20, 40, 50, 80], [20, 40, 50, 80, 100], [20, 40, 50, 80, 90], [20, 40, 50, 80, 90, 100], [20, 40, 50, 70], [20, 40, 50, 70, 100], [20, 40, 50, 70, 90], [20, 40, 50, 70, 90, 100], [20, 40, 50, 70, 80], [20, 40, 50, 70, 80, 100], [20, 40, 50, 70, 80, 90], [20, 40, 50, 70, 80, 90, 100], [20, 40, 50, 60], [20, 40, 50, 60, 100], [20, 40, 50, 60, 90], [20, 40, 50, 60, 90, 100], [20, 40, 50, 60, 80], [20, 40, 50, 60, 80, 100], [20, 40, 50, 60, 80, 90], [20, 40, 50, 60, 80, 90, 100], [20, 40, 50, 60, 70], [20, 40, 50, 60, 70, 100], [20, 40, 50, 60, 70, 90], [20, 40, 50, 60, 70, 90, 100], [20, 40, 50, 60, 70, 80], [20, 40, 50, 60, 70, 80, 100], [20, 40, 50, 60, 70, 80, 90], [20, 40, 50, 60, 70, 80, 90, 100], [20, 30], [20, 30, 100], [20, 30, 90], [20, 30, 90, 100], [20, 30, 80], [20, 30, 80, 100], [20, 30, 80, 90], [20, 30, 80, 90, 100], [20, 30, 70], [20, 30, 70, 100], [20, 30, 70, 90], [20, 30, 70, 90, 100], [20, 30, 70, 80], [20, 30, 70, 80, 100], [20, 30, 70, 80, 90], [20, 30, 70, 80, 90, 100], [20, 30, 60], [20, 30, 60, 100], [20, 30, 60, 90], [20, 30, 60, 90, 100], [20, 30, 60, 80], [20, 30, 60, 80, 100], [20, 30, 60, 80, 90], [20, 30, 60, 80, 90, 100], [20, 30, 60, 70], [20, 30, 60, 70, 100], [20, 30, 60, 70, 90], [20, 30, 60, 70, 90, 100], [20, 30, 60, 70, 80], [20, 30, 60, 70, 80, 100], [20, 30, 60, 70, 80, 90], [20, 30, 60, 70, 80, 90, 100], [20, 30, 50], [20, 30, 50, 100], [20, 30, 50, 90], [20, 30, 50, 90, 100], [20, 30, 50, 80], [20, 30, 50, 80, 100], [20, 30, 50, 80, 90], [20, 30, 50, 80, 90, 100], [20, 30, 50, 70], [20, 30, 50, 70, 100], [20, 30, 50, 70, 90], [20, 30, 50, 70, 90, 100], [20, 30, 50, 70, 80], [20, 30, 50, 70, 80, 100], [20, 30, 50, 70, 80, 90], [20, 30, 50, 70, 80, 90, 100], [20, 30, 50, 60], [20, 30, 50, 60, 100], [20, 30, 50, 60, 90], [20, 30, 50, 60, 90, 100], [20, 30, 50, 60, 80], [20, 30, 50, 60, 80, 100], [20, 30, 50, 60, 80, 90], [20, 30, 50, 60, 80, 90, 100], [20, 30, 50, 60, 70], [20, 30, 50, 60, 70, 100], [20, 30, 50, 60, 70, 90], [20, 30, 50, 60, 70, 90, 100], [20, 30, 50, 60, 70, 80], [20, 30, 50, 60, 70, 80, 100], [20, 30, 50, 60, 70, 80, 90], [20, 30, 50, 60, 70, 80, 90, 100], [20, 30, 40], [20, 30, 40, 100], [20, 30, 40, 90], [20, 30, 40, 90, 100], [20, 30, 40, 80], [20, 30, 40, 80, 100], [20, 30, 40, 80, 90], [20, 30, 40, 80, 90, 100], [20, 30, 40, 70], [20, 30, 40, 70, 100], [20, 30, 40, 70, 90], [20, 30, 40, 70, 90, 100], [20, 30, 40, 70, 80], [20, 30, 40, 70, 80, 100], [20, 30, 40, 70, 80, 90], [20, 30, 40, 70, 80, 90, 100], [20, 30, 40, 60], [20, 30, 40, 60, 100], [20, 30, 40, 60, 90], [20, 30, 40, 60, 90, 100], [20, 30, 40, 60, 80], [20, 30, 40, 60, 80, 100], [20, 30, 40, 60, 80, 90], [20, 30, 40, 60, 80, 90, 100], [20, 30, 40, 60, 70], [20, 30, 40, 60, 70, 100], [20, 30, 40, 60, 70, 90], [20, 30, 40, 60, 70, 90, 100], [20, 30, 40, 60, 70, 80], [20, 30, 40, 60, 70, 80, 100], [20, 30, 40, 60, 70, 80, 90], [20, 30, 40, 60, 70, 80, 90, 100], [20, 30, 40, 50], [20, 30, 40, 50, 100], [20, 30, 40, 50, 90], [20, 30, 40, 50, 90, 100], [20, 30, 40, 50, 80], [20, 30, 40, 50, 80, 100], [20, 30, 40, 50, 80, 90], [20, 30, 40, 50, 80, 90, 100], [20, 30, 40, 50, 70], [20, 30, 40, 50, 70, 100], [20, 30, 40, 50, 70, 90], [20, 30, 40, 50, 70, 90, 100], [20, 30, 40, 50, 70, 80], [20, 30, 40, 50, 70, 80, 100], [20, 30, 40, 50, 70, 80, 90], [20, 30, 40, 50, 70, 80, 90, 100], [20, 30, 40, 50, 60], [20, 30, 40, 50, 60, 100], [20, 30, 40, 50, 60, 90], [20, 30, 40, 50, 60, 90, 100], [20, 30, 40, 50, 60, 80], [20, 30, 40, 50, 60, 80, 100], [20, 30, 40, 50, 60, 80, 90], [20, 30, 40, 50, 60, 80, 90, 100], [20, 30, 40, 50, 60, 70], [20, 30, 40, 50, 60, 70, 100], [20, 30, 40, 50, 60, 70, 90], [20, 30, 40, 50, 60, 70, 90, 100], [20, 30, 40, 50, 60, 70, 80], [20, 30, 40, 50, 60, 70, 80, 100], [20, 30, 40, 50, 60, 70, 80, 90], [20, 30, 40, 50, 60, 70, 80, 90, 100], [10], [10, 100], [10, 90], [10, 90, 100], [10, 80], [10, 80, 100], [10, 80, 90], [10, 80, 90, 100], [10, 70], [10, 70, 100], [10, 70, 90], [10, 70, 90, 100], [10, 70, 80], [10, 70, 80, 100], [10, 70, 80, 90], [10, 70, 80, 90, 100], [10, 60], [10, 60, 100], [10, 60, 90], [10, 60, 90, 100], [10, 60, 80], [10, 60, 80, 100], [10, 60, 80, 90], [10, 60, 80, 90, 100], [10, 60, 70], [10, 60, 70, 100], [10, 60, 70, 90], [10, 60, 70, 90, 100], [10, 60, 70, 80], [10, 60, 70, 80, 100], [10, 60, 70, 80, 90], [10, 60, 70, 80, 90, 100], [10, 50], [10, 50, 100], [10, 50, 90], [10, 50, 90, 100], [10, 50, 80], [10, 50, 80, 100], [10, 50, 80, 90], [10, 50, 80, 90, 100], [10, 50, 70], [10, 50, 70, 100], [10, 50, 70, 90], [10, 50, 70, 90, 100], [10, 50, 70, 80], [10, 50, 70, 80, 100], [10, 50, 70, 80, 90], [10, 50, 70, 80, 90, 100], [10, 50, 60], [10, 50, 60, 100], [10, 50, 60, 90], [10, 50, 60, 90, 100], [10, 50, 60, 80], [10, 50, 60, 80, 100], [10, 50, 60, 80, 90], [10, 50, 60, 80, 90, 100], [10, 50, 60, 70], [10, 50, 60, 70, 100], [10, 50, 60, 70, 90], [10, 50, 60, 70, 90, 100], [10, 50, 60, 70, 80], [10, 50, 60, 70, 80, 100], [10, 50, 60, 70, 80, 90], [10, 50, 60, 70, 80, 90, 100], [10, 40], [10, 40, 100], [10, 40, 90], [10, 40, 90, 100], [10, 40, 80], [10, 40, 80, 100], [10, 40, 80, 90], [10, 40, 80, 90, 100], [10, 40, 70], [10, 40, 70, 100], [10, 40, 70, 90], [10, 40, 70, 90, 100], [10, 40, 70, 80], [10, 40, 70, 80, 100], [10, 40, 70, 80, 90], [10, 40, 70, 80, 90, 100], [10, 40, 60], [10, 40, 60, 100], [10, 40, 60, 90], [10, 40, 60, 90, 100], [10, 40, 60, 80], [10, 40, 60, 80, 100], [10, 40, 60, 80, 90], [10, 40, 60, 80, 90, 100], [10, 40, 60, 70], [10, 40, 60, 70, 100], [10, 40, 60, 70, 90], [10, 40, 60, 70, 90, 100], [10, 40, 60, 70, 80], [10, 40, 60, 70, 80, 100], [10, 40, 60, 70, 80, 90], [10, 40, 60, 70, 80, 90, 100], [10, 40, 50], [10, 40, 50, 100], [10, 40, 50, 90], [10, 40, 50, 90, 100], [10, 40, 50, 80], [10, 40, 50, 80, 100], [10, 40, 50, 80, 90], [10, 40, 50, 80, 90, 100], [10, 40, 50, 70], [10, 40, 50, 70, 100], [10, 40, 50, 70, 90], [10, 40, 50, 70, 90, 100], [10, 40, 50, 70, 80], [10, 40, 50, 70, 80, 100], [10, 40, 50, 70, 80, 90], [10, 40, 50, 70, 80, 90, 100], [10, 40, 50, 60], [10, 40, 50, 60, 100], [10, 40, 50, 60, 90], [10, 40, 50, 60, 90, 100], [10, 40, 50, 60, 80], [10, 40, 50, 60, 80, 100], [10, 40, 50, 60, 80, 90], [10, 40, 50, 60, 80, 90, 100], [10, 40, 50, 60, 70], [10, 40, 50, 60, 70, 100], [10, 40, 50, 60, 70, 90], [10, 40, 50, 60, 70, 90, 100], [10, 40, 50, 60, 70, 80], [10, 40, 50, 60, 70, 80, 100], [10, 40, 50, 60, 70, 80, 90], [10, 40, 50, 60, 70, 80, 90, 100], [10, 30], [10, 30, 100], [10, 30, 90], [10, 30, 90, 100], [10, 30, 80], [10, 30, 80, 100], [10, 30, 80, 90], [10, 30, 80, 90, 100], [10, 30, 70], [10, 30, 70, 100], [10, 30, 70, 90], [10, 30, 70, 90, 100], [10, 30, 70, 80], [10, 30, 70, 80, 100], [10, 30, 70, 80, 90], [10, 30, 70, 80, 90, 100], [10, 30, 60], [10, 30, 60, 100], [10, 30, 60, 90], [10, 30, 60, 90, 100], [10, 30, 60, 80], [10, 30, 60, 80, 100], [10, 30, 60, 80, 90], [10, 30, 60, 80, 90, 100], [10, 30, 60, 70], [10, 30, 60, 70, 100], [10, 30, 60, 70, 90], [10, 30, 60, 70, 90, 100], [10, 30, 60, 70, 80], [10, 30, 60, 70, 80, 100], [10, 30, 60, 70, 80, 90], [10, 30, 60, 70, 80, 90, 100], [10, 30, 50], [10, 30, 50, 100], [10, 30, 50, 90], [10, 30, 50, 90, 100], [10, 30, 50, 80], [10, 30, 50, 80, 100], [10, 30, 50, 80, 90], [10, 30, 50, 80, 90, 100], [10, 30, 50, 70], [10, 30, 50, 70, 100], [10, 30, 50, 70, 90], [10, 30, 50, 70, 90, 100], [10, 30, 50, 70, 80], [10, 30, 50, 70, 80, 100], [10, 30, 50, 70, 80, 90], [10, 30, 50, 70, 80, 90, 100], [10, 30, 50, 60], [10, 30, 50, 60, 100], [10, 30, 50, 60, 90], [10, 30, 50, 60, 90, 100], [10, 30, 50, 60, 80], [10, 30, 50, 60, 80, 100], [10, 30, 50, 60, 80, 90], [10, 30, 50, 60, 80, 90, 100], [10, 30, 50, 60, 70], [10, 30, 50, 60, 70, 100], [10, 30, 50, 60, 70, 90], [10, 30, 50, 60, 70, 90, 100], [10, 30, 50, 60, 70, 80], [10, 30, 50, 60, 70, 80, 100], [10, 30, 50, 60, 70, 80, 90], [10, 30, 50, 60, 70, 80, 90, 100], [10, 30, 40], [10, 30, 40, 100], [10, 30, 40, 90], [10, 30, 40, 90, 100], [10, 30, 40, 80], [10, 30, 40, 80, 100], [10, 30, 40, 80, 90], [10, 30, 40, 80, 90, 100], [10, 30, 40, 70], [10, 30, 40, 70, 100], [10, 30, 40, 70, 90], [10, 30, 40, 70, 90, 100], [10, 30, 40, 70, 80], [10, 30, 40, 70, 80, 100], [10, 30, 40, 70, 80, 90], [10, 30, 40, 70, 80, 90, 100], [10, 30, 40, 60], [10, 30, 40, 60, 100], [10, 30, 40, 60, 90], [10, 30, 40, 60, 90, 100], [10, 30, 40, 60, 80], [10, 30, 40, 60, 80, 100], [10, 30, 40, 60, 80, 90], [10, 30, 40, 60, 80, 90, 100], [10, 30, 40, 60, 70], [10, 30, 40, 60, 70, 100], [10, 30, 40, 60, 70, 90], [10, 30, 40, 60, 70, 90, 100], [10, 30, 40, 60, 70, 80], [10, 30, 40, 60, 70, 80, 100], [10, 30, 40, 60, 70, 80, 90], [10, 30, 40, 60, 70, 80, 90, 100], [10, 30, 40, 50], [10, 30, 40, 50, 100], [10, 30, 40, 50, 90], [10, 30, 40, 50, 90, 100], [10, 30, 40, 50, 80], [10, 30, 40, 50, 80, 100], [10, 30, 40, 50, 80, 90], [10, 30, 40, 50, 80, 90, 100], [10, 30, 40, 50, 70], [10, 30, 40, 50, 70, 100], [10, 30, 40, 50, 70, 90], [10, 30, 40, 50, 70, 90, 100], [10, 30, 40, 50, 70, 80], [10, 30, 40, 50, 70, 80, 100], [10, 30, 40, 50, 70, 80, 90], [10, 30, 40, 50, 70, 80, 90, 100], [10, 30, 40, 50, 60], [10, 30, 40, 50, 60, 100], [10, 30, 40, 50, 60, 90], [10, 30, 40, 50, 60, 90, 100], [10, 30, 40, 50, 60, 80], [10, 30, 40, 50, 60, 80, 100], [10, 30, 40, 50, 60, 80, 90], [10, 30, 40, 50, 60, 80, 90, 100], [10, 30, 40, 50, 60, 70], [10, 30, 40, 50, 60, 70, 100], [10, 30, 40, 50, 60, 70, 90], [10, 30, 40, 50, 60, 70, 90, 100], [10, 30, 40, 50, 60, 70, 80], [10, 30, 40, 50, 60, 70, 80, 100], [10, 30, 40, 50, 60, 70, 80, 90], [10, 30, 40, 50, 60, 70, 80, 90, 100], [10, 20], [10, 20, 100], [10, 20, 90], [10, 20, 90, 100], [10, 20, 80], [10, 20, 80, 100], [10, 20, 80, 90], [10, 20, 80, 90, 100], [10, 20, 70], [10, 20, 70, 100], [10, 20, 70, 90], [10, 20, 70, 90, 100], [10, 20, 70, 80], [10, 20, 70, 80, 100], [10, 20, 70, 80, 90], [10, 20, 70, 80, 90, 100], [10, 20, 60], [10, 20, 60, 100], [10, 20, 60, 90], [10, 20, 60, 90, 100], [10, 20, 60, 80], [10, 20, 60, 80, 100], [10, 20, 60, 80, 90], [10, 20, 60, 80, 90, 100], [10, 20, 60, 70], [10, 20, 60, 70, 100], [10, 20, 60, 70, 90], [10, 20, 60, 70, 90, 100], [10, 20, 60, 70, 80], [10, 20, 60, 70, 80, 100], [10, 20, 60, 70, 80, 90], [10, 20, 60, 70, 80, 90, 100], [10, 20, 50], [10, 20, 50, 100], [10, 20, 50, 90], [10, 20, 50, 90, 100], [10, 20, 50, 80], [10, 20, 50, 80, 100], [10, 20, 50, 80, 90], [10, 20, 50, 80, 90, 100], [10, 20, 50, 70], [10, 20, 50, 70, 100], [10, 20, 50, 70, 90], [10, 20, 50, 70, 90, 100], [10, 20, 50, 70, 80], [10, 20, 50, 70, 80, 100], [10, 20, 50, 70, 80, 90], [10, 20, 50, 70, 80, 90, 100], [10, 20, 50, 60], [10, 20, 50, 60, 100], [10, 20, 50, 60, 90], [10, 20, 50, 60, 90, 100], [10, 20, 50, 60, 80], [10, 20, 50, 60, 80, 100], [10, 20, 50, 60, 80, 90], [10, 20, 50, 60, 80, 90, 100], [10, 20, 50, 60, 70], [10, 20, 50, 60, 70, 100], [10, 20, 50, 60, 70, 90], [10, 20, 50, 60, 70, 90, 100], [10, 20, 50, 60, 70, 80], [10, 20, 50, 60, 70, 80, 100], [10, 20, 50, 60, 70, 80, 90], [10, 20, 50, 60, 70, 80, 90, 100], [10, 20, 40], [10, 20, 40, 100], [10, 20, 40, 90], [10, 20, 40, 90, 100], [10, 20, 40, 80], [10, 20, 40, 80, 100], [10, 20, 40, 80, 90], [10, 20, 40, 80, 90, 100], [10, 20, 40, 70], [10, 20, 40, 70, 100], [10, 20, 40, 70, 90], [10, 20, 40, 70, 90, 100], [10, 20, 40, 70, 80], [10, 20, 40, 70, 80, 100], [10, 20, 40, 70, 80, 90], [10, 20, 40, 70, 80, 90, 100], [10, 20, 40, 60], [10, 20, 40, 60, 100], [10, 20, 40, 60, 90], [10, 20, 40, 60, 90, 100], [10, 20, 40, 60, 80], [10, 20, 40, 60, 80, 100], [10, 20, 40, 60, 80, 90], [10, 20, 40, 60, 80, 90, 100], [10, 20, 40, 60, 70], [10, 20, 40, 60, 70, 100], [10, 20, 40, 60, 70, 90], [10, 20, 40, 60, 70, 90, 100], [10, 20, 40, 60, 70, 80], [10, 20, 40, 60, 70, 80, 100], [10, 20, 40, 60, 70, 80, 90], [10, 20, 40, 60, 70, 80, 90, 100], [10, 20, 40, 50], [10, 20, 40, 50, 100], [10, 20, 40, 50, 90], [10, 20, 40, 50, 90, 100], [10, 20, 40, 50, 80], [10, 20, 40, 50, 80, 100], [10, 20, 40, 50, 80, 90], [10, 20, 40, 50, 80, 90, 100], [10, 20, 40, 50, 70], [10, 20, 40, 50, 70, 100], [10, 20, 40, 50, 70, 90], [10, 20, 40, 50, 70, 90, 100], [10, 20, 40, 50, 70, 80], [10, 20, 40, 50, 70, 80, 100], [10, 20, 40, 50, 70, 80, 90], [10, 20, 40, 50, 70, 80, 90, 100], [10, 20, 40, 50, 60], [10, 20, 40, 50, 60, 100], [10, 20, 40, 50, 60, 90], [10, 20, 40, 50, 60, 90, 100], [10, 20, 40, 50, 60, 80], [10, 20, 40, 50, 60, 80, 100], [10, 20, 40, 50, 60, 80, 90], [10, 20, 40, 50, 60, 80, 90, 100], [10, 20, 40, 50, 60, 70], [10, 20, 40, 50, 60, 70, 100], [10, 20, 40, 50, 60, 70, 90], [10, 20, 40, 50, 60, 70, 90, 100], [10, 20, 40, 50, 60, 70, 80], [10, 20, 40, 50, 60, 70, 80, 100], [10, 20, 40, 50, 60, 70, 80, 90], [10, 20, 40, 50, 60, 70, 80, 90, 100], [10, 20, 30], [10, 20, 30, 100], [10, 20, 30, 90], [10, 20, 30, 90, 100], [10, 20, 30, 80], [10, 20, 30, 80, 100], [10, 20, 30, 80, 90], [10, 20, 30, 80, 90, 100], [10, 20, 30, 70], [10, 20, 30, 70, 100], [10, 20, 30, 70, 90], [10, 20, 30, 70, 90, 100], [10, 20, 30, 70, 80], [10, 20, 30, 70, 80, 100], [10, 20, 30, 70, 80, 90], [10, 20, 30, 70, 80, 90, 100], [10, 20, 30, 60], [10, 20, 30, 60, 100], [10, 20, 30, 60, 90], [10, 20, 30, 60, 90, 100], [10, 20, 30, 60, 80], [10, 20, 30, 60, 80, 100], [10, 20, 30, 60, 80, 90], [10, 20, 30, 60, 80, 90, 100], [10, 20, 30, 60, 70], [10, 20, 30, 60, 70, 100], [10, 20, 30, 60, 70, 90], [10, 20, 30, 60, 70, 90, 100], [10, 20, 30, 60, 70, 80], [10, 20, 30, 60, 70, 80, 100], [10, 20, 30, 60, 70, 80, 90], [10, 20, 30, 60, 70, 80, 90, 100], [10, 20, 30, 50], [10, 20, 30, 50, 100], [10, 20, 30, 50, 90], [10, 20, 30, 50, 90, 100], [10, 20, 30, 50, 80], [10, 20, 30, 50, 80, 100], [10, 20, 30, 50, 80, 90], [10, 20, 30, 50, 80, 90, 100], [10, 20, 30, 50, 70], [10, 20, 30, 50, 70, 100], [10, 20, 30, 50, 70, 90], [10, 20, 30, 50, 70, 90, 100], [10, 20, 30, 50, 70, 80], [10, 20, 30, 50, 70, 80, 100], [10, 20, 30, 50, 70, 80, 90], [10, 20, 30, 50, 70, 80, 90, 100], [10, 20, 30, 50, 60], [10, 20, 30, 50, 60, 100], [10, 20, 30, 50, 60, 90], [10, 20, 30, 50, 60, 90, 100], [10, 20, 30, 50, 60, 80], [10, 20, 30, 50, 60, 80, 100], [10, 20, 30, 50, 60, 80, 90], [10, 20, 30, 50, 60, 80, 90, 100], [10, 20, 30, 50, 60, 70], [10, 20, 30, 50, 60, 70, 100], [10, 20, 30, 50, 60, 70, 90], [10, 20, 30, 50, 60, 70, 90, 100], [10, 20, 30, 50, 60, 70, 80], [10, 20, 30, 50, 60, 70, 80, 100], [10, 20, 30, 50, 60, 70, 80, 90], [10, 20, 30, 50, 60, 70, 80, 90, 100], [10, 20, 30, 40], [10, 20, 30, 40, 100], [10, 20, 30, 40, 90], [10, 20, 30, 40, 90, 100], [10, 20, 30, 40, 80], [10, 20, 30, 40, 80, 100], [10, 20, 30, 40, 80, 90], [10, 20, 30, 40, 80, 90, 100], [10, 20, 30, 40, 70], [10, 20, 30, 40, 70, 100], [10, 20, 30, 40, 70, 90], [10, 20, 30, 40, 70, 90, 100], [10, 20, 30, 40, 70, 80], [10, 20, 30, 40, 70, 80, 100], [10, 20, 30, 40, 70, 80, 90], [10, 20, 30, 40, 70, 80, 90, 100], [10, 20, 30, 40, 60], [10, 20, 30, 40, 60, 100], [10, 20, 30, 40, 60, 90], [10, 20, 30, 40, 60, 90, 100], [10, 20, 30, 40, 60, 80], [10, 20, 30, 40, 60, 80, 100], [10, 20, 30, 40, 60, 80, 90], [10, 20, 30, 40, 60, 80, 90, 100], [10, 20, 30, 40, 60, 70], [10, 20, 30, 40, 60, 70, 100], [10, 20, 30, 40, 60, 70, 90], [10, 20, 30, 40, 60, 70, 90, 100], [10, 20, 30, 40, 60, 70, 80], [10, 20, 30, 40, 60, 70, 80, 100], [10, 20, 30, 40, 60, 70, 80, 90], [10, 20, 30, 40, 60, 70, 80, 90, 100], [10, 20, 30, 40, 50], [10, 20, 30, 40, 50, 100], [10, 20, 30, 40, 50, 90], [10, 20, 30, 40, 50, 90, 100], [10, 20, 30, 40, 50, 80], [10, 20, 30, 40, 50, 80, 100], [10, 20, 30, 40, 50, 80, 90], [10, 20, 30, 40, 50, 80, 90, 100], [10, 20, 30, 40, 50, 70], [10, 20, 30, 40, 50, 70, 100], [10, 20, 30, 40, 50, 70, 90], [10, 20, 30, 40, 50, 70, 90, 100], [10, 20, 30, 40, 50, 70, 80], [10, 20, 30, 40, 50, 70, 80, 100], [10, 20, 30, 40, 50, 70, 80, 90], [10, 20, 30, 40, 50, 70, 80, 90, 100], [10, 20, 30, 40, 50, 60], [10, 20, 30, 40, 50, 60, 100], [10, 20, 30, 40, 50, 60, 90], [10, 20, 30, 40, 50, 60, 90, 100], [10, 20, 30, 40, 50, 60, 80], [10, 20, 30, 40, 50, 60, 80, 100], [10, 20, 30, 40, 50, 60, 80, 90], [10, 20, 30, 40, 50, 60, 80, 90, 100], [10, 20, 30, 40, 50, 60, 70], [10, 20, 30, 40, 50, 60, 70, 100], [10, 20, 30, 40, 50, 60, 70, 90], [10, 20, 30, 40, 50, 60, 70, 90, 100], [10, 20, 30, 40, 50, 60, 70, 80], [10, 20, 30, 40, 50, 60, 70, 80, 100], [10, 20, 30, 40, 50, 60, 70, 80, 90], [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]]\n assert 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 candidate(nums = [10, 20, 30, 40, 50]) == [[], [50], [40], [40, 50], [30], [30, 50], [30, 40], [30, 40, 50], [20], [20, 50], [20, 40], [20, 40, 50], [20, 30], [20, 30, 50], [20, 30, 40], [20, 30, 40, 50], [10], [10, 50], [10, 40], [10, 40, 50], [10, 30], [10, 30, 50], [10, 30, 40], [10, 30, 40, 50], [10, 20], [10, 20, 50], [10, 20, 40], [10, 20, 40, 50], [10, 20, 30], [10, 20, 30, 50], [10, 20, 30, 40], [10, 20, 30, 40, 50]]\n assert candidate(nums = [-5, 0, 5, 10, 15]) == [[], [15], [10], [10, 15], [5], [5, 15], [5, 10], [5, 10, 15], [0], [0, 15], [0, 10], [0, 10, 15], [0, 5], [0, 5, 15], [0, 5, 10], [0, 5, 10, 15], [-5], [-5, 15], [-5, 10], [-5, 10, 15], [-5, 5], [-5, 5, 15], [-5, 5, 10], [-5, 5, 10, 15], [-5, 0], [-5, 0, 15], [-5, 0, 10], [-5, 0, 10, 15], [-5, 0, 5], [-5, 0, 5, 15], [-5, 0, 5, 10], [-5, 0, 5, 10, 15]]\n assert 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 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 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 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 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 candidate(nums = [10, -5, 0, 7, 11]) == [[], [11], [7], [7, 11], [0], [0, 11], [0, 7], [0, 7, 11], [-5], [-5, 11], [-5, 7], [-5, 7, 11], [-5, 0], [-5, 0, 11], [-5, 0, 7], [-5, 0, 7, 11], [10], [10, 11], [10, 7], [10, 7, 11], [10, 0], [10, 0, 11], [10, 0, 7], [10, 0, 7, 11], [10, -5], [10, -5, 11], [10, -5, 7], [10, -5, 7, 11], [10, -5, 0], [10, -5, 0, 11], [10, -5, 0, 7], [10, -5, 0, 7, 11]]\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]) == [[], [95], [85], [85, 95], [75], [75, 95], [75, 85], [75, 85, 95], [65], [65, 95], [65, 85], [65, 85, 95], [65, 75], [65, 75, 95], [65, 75, 85], [65, 75, 85, 95], [55], [55, 95], [55, 85], [55, 85, 95], [55, 75], [55, 75, 95], [55, 75, 85], [55, 75, 85, 95], [55, 65], [55, 65, 95], [55, 65, 85], [55, 65, 85, 95], [55, 65, 75], [55, 65, 75, 95], [55, 65, 75, 85], [55, 65, 75, 85, 95], [45], [45, 95], [45, 85], [45, 85, 95], [45, 75], [45, 75, 95], [45, 75, 85], [45, 75, 85, 95], [45, 65], [45, 65, 95], [45, 65, 85], [45, 65, 85, 95], [45, 65, 75], [45, 65, 75, 95], [45, 65, 75, 85], [45, 65, 75, 85, 95], [45, 55], [45, 55, 95], [45, 55, 85], [45, 55, 85, 95], [45, 55, 75], [45, 55, 75, 95], [45, 55, 75, 85], [45, 55, 75, 85, 95], [45, 55, 65], [45, 55, 65, 95], [45, 55, 65, 85], [45, 55, 65, 85, 95], [45, 55, 65, 75], [45, 55, 65, 75, 95], [45, 55, 65, 75, 85], [45, 55, 65, 75, 85, 95], [35], [35, 95], [35, 85], [35, 85, 95], [35, 75], [35, 75, 95], [35, 75, 85], [35, 75, 85, 95], [35, 65], [35, 65, 95], [35, 65, 85], [35, 65, 85, 95], [35, 65, 75], [35, 65, 75, 95], [35, 65, 75, 85], [35, 65, 75, 85, 95], [35, 55], [35, 55, 95], [35, 55, 85], [35, 55, 85, 95], [35, 55, 75], [35, 55, 75, 95], [35, 55, 75, 85], [35, 55, 75, 85, 95], [35, 55, 65], [35, 55, 65, 95], [35, 55, 65, 85], [35, 55, 65, 85, 95], [35, 55, 65, 75], [35, 55, 65, 75, 95], [35, 55, 65, 75, 85], [35, 55, 65, 75, 85, 95], [35, 45], [35, 45, 95], [35, 45, 85], [35, 45, 85, 95], [35, 45, 75], [35, 45, 75, 95], [35, 45, 75, 85], [35, 45, 75, 85, 95], [35, 45, 65], [35, 45, 65, 95], [35, 45, 65, 85], [35, 45, 65, 85, 95], [35, 45, 65, 75], [35, 45, 65, 75, 95], [35, 45, 65, 75, 85], [35, 45, 65, 75, 85, 95], [35, 45, 55], [35, 45, 55, 95], [35, 45, 55, 85], [35, 45, 55, 85, 95], [35, 45, 55, 75], [35, 45, 55, 75, 95], [35, 45, 55, 75, 85], [35, 45, 55, 75, 85, 95], [35, 45, 55, 65], [35, 45, 55, 65, 95], [35, 45, 55, 65, 85], [35, 45, 55, 65, 85, 95], [35, 45, 55, 65, 75], [35, 45, 55, 65, 75, 95], [35, 45, 55, 65, 75, 85], [35, 45, 55, 65, 75, 85, 95], [25], [25, 95], [25, 85], [25, 85, 95], [25, 75], [25, 75, 95], [25, 75, 85], [25, 75, 85, 95], [25, 65], [25, 65, 95], [25, 65, 85], [25, 65, 85, 95], [25, 65, 75], [25, 65, 75, 95], [25, 65, 75, 85], [25, 65, 75, 85, 95], [25, 55], [25, 55, 95], [25, 55, 85], [25, 55, 85, 95], [25, 55, 75], [25, 55, 75, 95], [25, 55, 75, 85], [25, 55, 75, 85, 95], [25, 55, 65], [25, 55, 65, 95], [25, 55, 65, 85], [25, 55, 65, 85, 95], [25, 55, 65, 75], [25, 55, 65, 75, 95], [25, 55, 65, 75, 85], [25, 55, 65, 75, 85, 95], [25, 45], [25, 45, 95], [25, 45, 85], [25, 45, 85, 95], [25, 45, 75], [25, 45, 75, 95], [25, 45, 75, 85], [25, 45, 75, 85, 95], [25, 45, 65], [25, 45, 65, 95], [25, 45, 65, 85], [25, 45, 65, 85, 95], [25, 45, 65, 75], [25, 45, 65, 75, 95], [25, 45, 65, 75, 85], [25, 45, 65, 75, 85, 95], [25, 45, 55], [25, 45, 55, 95], [25, 45, 55, 85], [25, 45, 55, 85, 95], [25, 45, 55, 75], [25, 45, 55, 75, 95], [25, 45, 55, 75, 85], [25, 45, 55, 75, 85, 95], [25, 45, 55, 65], [25, 45, 55, 65, 95], [25, 45, 55, 65, 85], [25, 45, 55, 65, 85, 95], [25, 45, 55, 65, 75], [25, 45, 55, 65, 75, 95], [25, 45, 55, 65, 75, 85], [25, 45, 55, 65, 75, 85, 95], [25, 35], [25, 35, 95], [25, 35, 85], [25, 35, 85, 95], [25, 35, 75], [25, 35, 75, 95], [25, 35, 75, 85], [25, 35, 75, 85, 95], [25, 35, 65], [25, 35, 65, 95], [25, 35, 65, 85], [25, 35, 65, 85, 95], [25, 35, 65, 75], [25, 35, 65, 75, 95], [25, 35, 65, 75, 85], [25, 35, 65, 75, 85, 95], [25, 35, 55], [25, 35, 55, 95], [25, 35, 55, 85], [25, 35, 55, 85, 95], [25, 35, 55, 75], [25, 35, 55, 75, 95], [25, 35, 55, 75, 85], [25, 35, 55, 75, 85, 95], [25, 35, 55, 65], [25, 35, 55, 65, 95], [25, 35, 55, 65, 85], [25, 35, 55, 65, 85, 95], [25, 35, 55, 65, 75], [25, 35, 55, 65, 75, 95], [25, 35, 55, 65, 75, 85], [25, 35, 55, 65, 75, 85, 95], [25, 35, 45], [25, 35, 45, 95], [25, 35, 45, 85], [25, 35, 45, 85, 95], [25, 35, 45, 75], [25, 35, 45, 75, 95], [25, 35, 45, 75, 85], [25, 35, 45, 75, 85, 95], [25, 35, 45, 65], [25, 35, 45, 65, 95], [25, 35, 45, 65, 85], [25, 35, 45, 65, 85, 95], [25, 35, 45, 65, 75], [25, 35, 45, 65, 75, 95], [25, 35, 45, 65, 75, 85], [25, 35, 45, 65, 75, 85, 95], [25, 35, 45, 55], [25, 35, 45, 55, 95], [25, 35, 45, 55, 85], [25, 35, 45, 55, 85, 95], [25, 35, 45, 55, 75], [25, 35, 45, 55, 75, 95], [25, 35, 45, 55, 75, 85], [25, 35, 45, 55, 75, 85, 95], [25, 35, 45, 55, 65], [25, 35, 45, 55, 65, 95], [25, 35, 45, 55, 65, 85], [25, 35, 45, 55, 65, 85, 95], [25, 35, 45, 55, 65, 75], [25, 35, 45, 55, 65, 75, 95], [25, 35, 45, 55, 65, 75, 85], [25, 35, 45, 55, 65, 75, 85, 95], [15], [15, 95], [15, 85], [15, 85, 95], [15, 75], [15, 75, 95], [15, 75, 85], [15, 75, 85, 95], [15, 65], [15, 65, 95], [15, 65, 85], [15, 65, 85, 95], [15, 65, 75], [15, 65, 75, 95], [15, 65, 75, 85], [15, 65, 75, 85, 95], [15, 55], [15, 55, 95], [15, 55, 85], [15, 55, 85, 95], [15, 55, 75], [15, 55, 75, 95], [15, 55, 75, 85], [15, 55, 75, 85, 95], [15, 55, 65], [15, 55, 65, 95], [15, 55, 65, 85], [15, 55, 65, 85, 95], [15, 55, 65, 75], [15, 55, 65, 75, 95], [15, 55, 65, 75, 85], [15, 55, 65, 75, 85, 95], [15, 45], [15, 45, 95], [15, 45, 85], [15, 45, 85, 95], [15, 45, 75], [15, 45, 75, 95], [15, 45, 75, 85], [15, 45, 75, 85, 95], [15, 45, 65], [15, 45, 65, 95], [15, 45, 65, 85], [15, 45, 65, 85, 95], [15, 45, 65, 75], [15, 45, 65, 75, 95], [15, 45, 65, 75, 85], [15, 45, 65, 75, 85, 95], [15, 45, 55], [15, 45, 55, 95], [15, 45, 55, 85], [15, 45, 55, 85, 95], [15, 45, 55, 75], [15, 45, 55, 75, 95], [15, 45, 55, 75, 85], [15, 45, 55, 75, 85, 95], [15, 45, 55, 65], [15, 45, 55, 65, 95], [15, 45, 55, 65, 85], [15, 45, 55, 65, 85, 95], [15, 45, 55, 65, 75], [15, 45, 55, 65, 75, 95], [15, 45, 55, 65, 75, 85], [15, 45, 55, 65, 75, 85, 95], [15, 35], [15, 35, 95], [15, 35, 85], [15, 35, 85, 95], [15, 35, 75], [15, 35, 75, 95], [15, 35, 75, 85], [15, 35, 75, 85, 95], [15, 35, 65], [15, 35, 65, 95], [15, 35, 65, 85], [15, 35, 65, 85, 95], [15, 35, 65, 75], [15, 35, 65, 75, 95], [15, 35, 65, 75, 85], [15, 35, 65, 75, 85, 95], [15, 35, 55], [15, 35, 55, 95], [15, 35, 55, 85], [15, 35, 55, 85, 95], [15, 35, 55, 75], [15, 35, 55, 75, 95], [15, 35, 55, 75, 85], [15, 35, 55, 75, 85, 95], [15, 35, 55, 65], [15, 35, 55, 65, 95], [15, 35, 55, 65, 85], [15, 35, 55, 65, 85, 95], [15, 35, 55, 65, 75], [15, 35, 55, 65, 75, 95], [15, 35, 55, 65, 75, 85], [15, 35, 55, 65, 75, 85, 95], [15, 35, 45], [15, 35, 45, 95], [15, 35, 45, 85], [15, 35, 45, 85, 95], [15, 35, 45, 75], [15, 35, 45, 75, 95], [15, 35, 45, 75, 85], [15, 35, 45, 75, 85, 95], [15, 35, 45, 65], [15, 35, 45, 65, 95], [15, 35, 45, 65, 85], [15, 35, 45, 65, 85, 95], [15, 35, 45, 65, 75], [15, 35, 45, 65, 75, 95], [15, 35, 45, 65, 75, 85], [15, 35, 45, 65, 75, 85, 95], [15, 35, 45, 55], [15, 35, 45, 55, 95], [15, 35, 45, 55, 85], [15, 35, 45, 55, 85, 95], [15, 35, 45, 55, 75], [15, 35, 45, 55, 75, 95], [15, 35, 45, 55, 75, 85], [15, 35, 45, 55, 75, 85, 95], [15, 35, 45, 55, 65], [15, 35, 45, 55, 65, 95], [15, 35, 45, 55, 65, 85], [15, 35, 45, 55, 65, 85, 95], [15, 35, 45, 55, 65, 75], [15, 35, 45, 55, 65, 75, 95], [15, 35, 45, 55, 65, 75, 85], [15, 35, 45, 55, 65, 75, 85, 95], [15, 25], [15, 25, 95], [15, 25, 85], [15, 25, 85, 95], [15, 25, 75], [15, 25, 75, 95], [15, 25, 75, 85], [15, 25, 75, 85, 95], [15, 25, 65], [15, 25, 65, 95], [15, 25, 65, 85], [15, 25, 65, 85, 95], [15, 25, 65, 75], [15, 25, 65, 75, 95], [15, 25, 65, 75, 85], [15, 25, 65, 75, 85, 95], [15, 25, 55], [15, 25, 55, 95], [15, 25, 55, 85], [15, 25, 55, 85, 95], [15, 25, 55, 75], [15, 25, 55, 75, 95], [15, 25, 55, 75, 85], [15, 25, 55, 75, 85, 95], [15, 25, 55, 65], [15, 25, 55, 65, 95], [15, 25, 55, 65, 85], [15, 25, 55, 65, 85, 95], [15, 25, 55, 65, 75], [15, 25, 55, 65, 75, 95], [15, 25, 55, 65, 75, 85], [15, 25, 55, 65, 75, 85, 95], [15, 25, 45], [15, 25, 45, 95], [15, 25, 45, 85], [15, 25, 45, 85, 95], [15, 25, 45, 75], [15, 25, 45, 75, 95], [15, 25, 45, 75, 85], [15, 25, 45, 75, 85, 95], [15, 25, 45, 65], [15, 25, 45, 65, 95], [15, 25, 45, 65, 85], [15, 25, 45, 65, 85, 95], [15, 25, 45, 65, 75], [15, 25, 45, 65, 75, 95], [15, 25, 45, 65, 75, 85], [15, 25, 45, 65, 75, 85, 95], [15, 25, 45, 55], [15, 25, 45, 55, 95], [15, 25, 45, 55, 85], [15, 25, 45, 55, 85, 95], [15, 25, 45, 55, 75], [15, 25, 45, 55, 75, 95], [15, 25, 45, 55, 75, 85], [15, 25, 45, 55, 75, 85, 95], [15, 25, 45, 55, 65], [15, 25, 45, 55, 65, 95], [15, 25, 45, 55, 65, 85], [15, 25, 45, 55, 65, 85, 95], [15, 25, 45, 55, 65, 75], [15, 25, 45, 55, 65, 75, 95], [15, 25, 45, 55, 65, 75, 85], [15, 25, 45, 55, 65, 75, 85, 95], [15, 25, 35], [15, 25, 35, 95], [15, 25, 35, 85], [15, 25, 35, 85, 95], [15, 25, 35, 75], [15, 25, 35, 75, 95], [15, 25, 35, 75, 85], [15, 25, 35, 75, 85, 95], [15, 25, 35, 65], [15, 25, 35, 65, 95], [15, 25, 35, 65, 85], [15, 25, 35, 65, 85, 95], [15, 25, 35, 65, 75], [15, 25, 35, 65, 75, 95], [15, 25, 35, 65, 75, 85], [15, 25, 35, 65, 75, 85, 95], [15, 25, 35, 55], [15, 25, 35, 55, 95], [15, 25, 35, 55, 85], [15, 25, 35, 55, 85, 95], [15, 25, 35, 55, 75], [15, 25, 35, 55, 75, 95], [15, 25, 35, 55, 75, 85], [15, 25, 35, 55, 75, 85, 95], [15, 25, 35, 55, 65], [15, 25, 35, 55, 65, 95], [15, 25, 35, 55, 65, 85], [15, 25, 35, 55, 65, 85, 95], [15, 25, 35, 55, 65, 75], [15, 25, 35, 55, 65, 75, 95], [15, 25, 35, 55, 65, 75, 85], [15, 25, 35, 55, 65, 75, 85, 95], [15, 25, 35, 45], [15, 25, 35, 45, 95], [15, 25, 35, 45, 85], [15, 25, 35, 45, 85, 95], [15, 25, 35, 45, 75], [15, 25, 35, 45, 75, 95], [15, 25, 35, 45, 75, 85], [15, 25, 35, 45, 75, 85, 95], [15, 25, 35, 45, 65], [15, 25, 35, 45, 65, 95], [15, 25, 35, 45, 65, 85], [15, 25, 35, 45, 65, 85, 95], [15, 25, 35, 45, 65, 75], [15, 25, 35, 45, 65, 75, 95], [15, 25, 35, 45, 65, 75, 85], [15, 25, 35, 45, 65, 75, 85, 95], [15, 25, 35, 45, 55], [15, 25, 35, 45, 55, 95], [15, 25, 35, 45, 55, 85], [15, 25, 35, 45, 55, 85, 95], [15, 25, 35, 45, 55, 75], [15, 25, 35, 45, 55, 75, 95], [15, 25, 35, 45, 55, 75, 85], [15, 25, 35, 45, 55, 75, 85, 95], [15, 25, 35, 45, 55, 65], [15, 25, 35, 45, 55, 65, 95], [15, 25, 35, 45, 55, 65, 85], [15, 25, 35, 45, 55, 65, 85, 95], [15, 25, 35, 45, 55, 65, 75], [15, 25, 35, 45, 55, 65, 75, 95], [15, 25, 35, 45, 55, 65, 75, 85], [15, 25, 35, 45, 55, 65, 75, 85, 95], [5], [5, 95], [5, 85], [5, 85, 95], [5, 75], [5, 75, 95], [5, 75, 85], [5, 75, 85, 95], [5, 65], [5, 65, 95], [5, 65, 85], [5, 65, 85, 95], [5, 65, 75], [5, 65, 75, 95], [5, 65, 75, 85], [5, 65, 75, 85, 95], [5, 55], [5, 55, 95], [5, 55, 85], [5, 55, 85, 95], [5, 55, 75], [5, 55, 75, 95], [5, 55, 75, 85], [5, 55, 75, 85, 95], [5, 55, 65], [5, 55, 65, 95], [5, 55, 65, 85], [5, 55, 65, 85, 95], [5, 55, 65, 75], [5, 55, 65, 75, 95], [5, 55, 65, 75, 85], [5, 55, 65, 75, 85, 95], [5, 45], [5, 45, 95], [5, 45, 85], [5, 45, 85, 95], [5, 45, 75], [5, 45, 75, 95], [5, 45, 75, 85], [5, 45, 75, 85, 95], [5, 45, 65], [5, 45, 65, 95], [5, 45, 65, 85], [5, 45, 65, 85, 95], [5, 45, 65, 75], [5, 45, 65, 75, 95], [5, 45, 65, 75, 85], [5, 45, 65, 75, 85, 95], [5, 45, 55], [5, 45, 55, 95], [5, 45, 55, 85], [5, 45, 55, 85, 95], [5, 45, 55, 75], [5, 45, 55, 75, 95], [5, 45, 55, 75, 85], [5, 45, 55, 75, 85, 95], [5, 45, 55, 65], [5, 45, 55, 65, 95], [5, 45, 55, 65, 85], [5, 45, 55, 65, 85, 95], [5, 45, 55, 65, 75], [5, 45, 55, 65, 75, 95], [5, 45, 55, 65, 75, 85], [5, 45, 55, 65, 75, 85, 95], [5, 35], [5, 35, 95], [5, 35, 85], [5, 35, 85, 95], [5, 35, 75], [5, 35, 75, 95], [5, 35, 75, 85], [5, 35, 75, 85, 95], [5, 35, 65], [5, 35, 65, 95], [5, 35, 65, 85], [5, 35, 65, 85, 95], [5, 35, 65, 75], [5, 35, 65, 75, 95], [5, 35, 65, 75, 85], [5, 35, 65, 75, 85, 95], [5, 35, 55], [5, 35, 55, 95], [5, 35, 55, 85], [5, 35, 55, 85, 95], [5, 35, 55, 75], [5, 35, 55, 75, 95], [5, 35, 55, 75, 85], [5, 35, 55, 75, 85, 95], [5, 35, 55, 65], [5, 35, 55, 65, 95], [5, 35, 55, 65, 85], [5, 35, 55, 65, 85, 95], [5, 35, 55, 65, 75], [5, 35, 55, 65, 75, 95], [5, 35, 55, 65, 75, 85], [5, 35, 55, 65, 75, 85, 95], [5, 35, 45], [5, 35, 45, 95], [5, 35, 45, 85], [5, 35, 45, 85, 95], [5, 35, 45, 75], [5, 35, 45, 75, 95], [5, 35, 45, 75, 85], [5, 35, 45, 75, 85, 95], [5, 35, 45, 65], [5, 35, 45, 65, 95], [5, 35, 45, 65, 85], [5, 35, 45, 65, 85, 95], [5, 35, 45, 65, 75], [5, 35, 45, 65, 75, 95], [5, 35, 45, 65, 75, 85], [5, 35, 45, 65, 75, 85, 95], [5, 35, 45, 55], [5, 35, 45, 55, 95], [5, 35, 45, 55, 85], [5, 35, 45, 55, 85, 95], [5, 35, 45, 55, 75], [5, 35, 45, 55, 75, 95], [5, 35, 45, 55, 75, 85], [5, 35, 45, 55, 75, 85, 95], [5, 35, 45, 55, 65], [5, 35, 45, 55, 65, 95], [5, 35, 45, 55, 65, 85], [5, 35, 45, 55, 65, 85, 95], [5, 35, 45, 55, 65, 75], [5, 35, 45, 55, 65, 75, 95], [5, 35, 45, 55, 65, 75, 85], [5, 35, 45, 55, 65, 75, 85, 95], [5, 25], [5, 25, 95], [5, 25, 85], [5, 25, 85, 95], [5, 25, 75], [5, 25, 75, 95], [5, 25, 75, 85], [5, 25, 75, 85, 95], [5, 25, 65], [5, 25, 65, 95], [5, 25, 65, 85], [5, 25, 65, 85, 95], [5, 25, 65, 75], [5, 25, 65, 75, 95], [5, 25, 65, 75, 85], [5, 25, 65, 75, 85, 95], [5, 25, 55], [5, 25, 55, 95], [5, 25, 55, 85], [5, 25, 55, 85, 95], [5, 25, 55, 75], [5, 25, 55, 75, 95], [5, 25, 55, 75, 85], [5, 25, 55, 75, 85, 95], [5, 25, 55, 65], [5, 25, 55, 65, 95], [5, 25, 55, 65, 85], [5, 25, 55, 65, 85, 95], [5, 25, 55, 65, 75], [5, 25, 55, 65, 75, 95], [5, 25, 55, 65, 75, 85], [5, 25, 55, 65, 75, 85, 95], [5, 25, 45], [5, 25, 45, 95], [5, 25, 45, 85], [5, 25, 45, 85, 95], [5, 25, 45, 75], [5, 25, 45, 75, 95], [5, 25, 45, 75, 85], [5, 25, 45, 75, 85, 95], [5, 25, 45, 65], [5, 25, 45, 65, 95], [5, 25, 45, 65, 85], [5, 25, 45, 65, 85, 95], [5, 25, 45, 65, 75], [5, 25, 45, 65, 75, 95], [5, 25, 45, 65, 75, 85], [5, 25, 45, 65, 75, 85, 95], [5, 25, 45, 55], [5, 25, 45, 55, 95], [5, 25, 45, 55, 85], [5, 25, 45, 55, 85, 95], [5, 25, 45, 55, 75], [5, 25, 45, 55, 75, 95], [5, 25, 45, 55, 75, 85], [5, 25, 45, 55, 75, 85, 95], [5, 25, 45, 55, 65], [5, 25, 45, 55, 65, 95], [5, 25, 45, 55, 65, 85], [5, 25, 45, 55, 65, 85, 95], [5, 25, 45, 55, 65, 75], [5, 25, 45, 55, 65, 75, 95], [5, 25, 45, 55, 65, 75, 85], [5, 25, 45, 55, 65, 75, 85, 95], [5, 25, 35], [5, 25, 35, 95], [5, 25, 35, 85], [5, 25, 35, 85, 95], [5, 25, 35, 75], [5, 25, 35, 75, 95], [5, 25, 35, 75, 85], [5, 25, 35, 75, 85, 95], [5, 25, 35, 65], [5, 25, 35, 65, 95], [5, 25, 35, 65, 85], [5, 25, 35, 65, 85, 95], [5, 25, 35, 65, 75], [5, 25, 35, 65, 75, 95], [5, 25, 35, 65, 75, 85], [5, 25, 35, 65, 75, 85, 95], [5, 25, 35, 55], [5, 25, 35, 55, 95], [5, 25, 35, 55, 85], [5, 25, 35, 55, 85, 95], [5, 25, 35, 55, 75], [5, 25, 35, 55, 75, 95], [5, 25, 35, 55, 75, 85], [5, 25, 35, 55, 75, 85, 95], [5, 25, 35, 55, 65], [5, 25, 35, 55, 65, 95], [5, 25, 35, 55, 65, 85], [5, 25, 35, 55, 65, 85, 95], [5, 25, 35, 55, 65, 75], [5, 25, 35, 55, 65, 75, 95], [5, 25, 35, 55, 65, 75, 85], [5, 25, 35, 55, 65, 75, 85, 95], [5, 25, 35, 45], [5, 25, 35, 45, 95], [5, 25, 35, 45, 85], [5, 25, 35, 45, 85, 95], [5, 25, 35, 45, 75], [5, 25, 35, 45, 75, 95], [5, 25, 35, 45, 75, 85], [5, 25, 35, 45, 75, 85, 95], [5, 25, 35, 45, 65], [5, 25, 35, 45, 65, 95], [5, 25, 35, 45, 65, 85], [5, 25, 35, 45, 65, 85, 95], [5, 25, 35, 45, 65, 75], [5, 25, 35, 45, 65, 75, 95], [5, 25, 35, 45, 65, 75, 85], [5, 25, 35, 45, 65, 75, 85, 95], [5, 25, 35, 45, 55], [5, 25, 35, 45, 55, 95], [5, 25, 35, 45, 55, 85], [5, 25, 35, 45, 55, 85, 95], [5, 25, 35, 45, 55, 75], [5, 25, 35, 45, 55, 75, 95], [5, 25, 35, 45, 55, 75, 85], [5, 25, 35, 45, 55, 75, 85, 95], [5, 25, 35, 45, 55, 65], [5, 25, 35, 45, 55, 65, 95], [5, 25, 35, 45, 55, 65, 85], [5, 25, 35, 45, 55, 65, 85, 95], [5, 25, 35, 45, 55, 65, 75], [5, 25, 35, 45, 55, 65, 75, 95], [5, 25, 35, 45, 55, 65, 75, 85], [5, 25, 35, 45, 55, 65, 75, 85, 95], [5, 15], [5, 15, 95], [5, 15, 85], [5, 15, 85, 95], [5, 15, 75], [5, 15, 75, 95], [5, 15, 75, 85], [5, 15, 75, 85, 95], [5, 15, 65], [5, 15, 65, 95], [5, 15, 65, 85], [5, 15, 65, 85, 95], [5, 15, 65, 75], [5, 15, 65, 75, 95], [5, 15, 65, 75, 85], [5, 15, 65, 75, 85, 95], [5, 15, 55], [5, 15, 55, 95], [5, 15, 55, 85], [5, 15, 55, 85, 95], [5, 15, 55, 75], [5, 15, 55, 75, 95], [5, 15, 55, 75, 85], [5, 15, 55, 75, 85, 95], [5, 15, 55, 65], [5, 15, 55, 65, 95], [5, 15, 55, 65, 85], [5, 15, 55, 65, 85, 95], [5, 15, 55, 65, 75], [5, 15, 55, 65, 75, 95], [5, 15, 55, 65, 75, 85], [5, 15, 55, 65, 75, 85, 95], [5, 15, 45], [5, 15, 45, 95], [5, 15, 45, 85], [5, 15, 45, 85, 95], [5, 15, 45, 75], [5, 15, 45, 75, 95], [5, 15, 45, 75, 85], [5, 15, 45, 75, 85, 95], [5, 15, 45, 65], [5, 15, 45, 65, 95], [5, 15, 45, 65, 85], [5, 15, 45, 65, 85, 95], [5, 15, 45, 65, 75], [5, 15, 45, 65, 75, 95], [5, 15, 45, 65, 75, 85], [5, 15, 45, 65, 75, 85, 95], [5, 15, 45, 55], [5, 15, 45, 55, 95], [5, 15, 45, 55, 85], [5, 15, 45, 55, 85, 95], [5, 15, 45, 55, 75], [5, 15, 45, 55, 75, 95], [5, 15, 45, 55, 75, 85], [5, 15, 45, 55, 75, 85, 95], [5, 15, 45, 55, 65], [5, 15, 45, 55, 65, 95], [5, 15, 45, 55, 65, 85], [5, 15, 45, 55, 65, 85, 95], [5, 15, 45, 55, 65, 75], [5, 15, 45, 55, 65, 75, 95], [5, 15, 45, 55, 65, 75, 85], [5, 15, 45, 55, 65, 75, 85, 95], [5, 15, 35], [5, 15, 35, 95], [5, 15, 35, 85], [5, 15, 35, 85, 95], [5, 15, 35, 75], [5, 15, 35, 75, 95], [5, 15, 35, 75, 85], [5, 15, 35, 75, 85, 95], [5, 15, 35, 65], [5, 15, 35, 65, 95], [5, 15, 35, 65, 85], [5, 15, 35, 65, 85, 95], [5, 15, 35, 65, 75], [5, 15, 35, 65, 75, 95], [5, 15, 35, 65, 75, 85], [5, 15, 35, 65, 75, 85, 95], [5, 15, 35, 55], [5, 15, 35, 55, 95], [5, 15, 35, 55, 85], [5, 15, 35, 55, 85, 95], [5, 15, 35, 55, 75], [5, 15, 35, 55, 75, 95], [5, 15, 35, 55, 75, 85], [5, 15, 35, 55, 75, 85, 95], [5, 15, 35, 55, 65], [5, 15, 35, 55, 65, 95], [5, 15, 35, 55, 65, 85], [5, 15, 35, 55, 65, 85, 95], [5, 15, 35, 55, 65, 75], [5, 15, 35, 55, 65, 75, 95], [5, 15, 35, 55, 65, 75, 85], [5, 15, 35, 55, 65, 75, 85, 95], [5, 15, 35, 45], [5, 15, 35, 45, 95], [5, 15, 35, 45, 85], [5, 15, 35, 45, 85, 95], [5, 15, 35, 45, 75], [5, 15, 35, 45, 75, 95], [5, 15, 35, 45, 75, 85], [5, 15, 35, 45, 75, 85, 95], [5, 15, 35, 45, 65], [5, 15, 35, 45, 65, 95], [5, 15, 35, 45, 65, 85], [5, 15, 35, 45, 65, 85, 95], [5, 15, 35, 45, 65, 75], [5, 15, 35, 45, 65, 75, 95], [5, 15, 35, 45, 65, 75, 85], [5, 15, 35, 45, 65, 75, 85, 95], [5, 15, 35, 45, 55], [5, 15, 35, 45, 55, 95], [5, 15, 35, 45, 55, 85], [5, 15, 35, 45, 55, 85, 95], [5, 15, 35, 45, 55, 75], [5, 15, 35, 45, 55, 75, 95], [5, 15, 35, 45, 55, 75, 85], [5, 15, 35, 45, 55, 75, 85, 95], [5, 15, 35, 45, 55, 65], [5, 15, 35, 45, 55, 65, 95], [5, 15, 35, 45, 55, 65, 85], [5, 15, 35, 45, 55, 65, 85, 95], [5, 15, 35, 45, 55, 65, 75], [5, 15, 35, 45, 55, 65, 75, 95], [5, 15, 35, 45, 55, 65, 75, 85], [5, 15, 35, 45, 55, 65, 75, 85, 95], [5, 15, 25], [5, 15, 25, 95], [5, 15, 25, 85], [5, 15, 25, 85, 95], [5, 15, 25, 75], [5, 15, 25, 75, 95], [5, 15, 25, 75, 85], [5, 15, 25, 75, 85, 95], [5, 15, 25, 65], [5, 15, 25, 65, 95], [5, 15, 25, 65, 85], [5, 15, 25, 65, 85, 95], [5, 15, 25, 65, 75], [5, 15, 25, 65, 75, 95], [5, 15, 25, 65, 75, 85], [5, 15, 25, 65, 75, 85, 95], [5, 15, 25, 55], [5, 15, 25, 55, 95], [5, 15, 25, 55, 85], [5, 15, 25, 55, 85, 95], [5, 15, 25, 55, 75], [5, 15, 25, 55, 75, 95], [5, 15, 25, 55, 75, 85], [5, 15, 25, 55, 75, 85, 95], [5, 15, 25, 55, 65], [5, 15, 25, 55, 65, 95], [5, 15, 25, 55, 65, 85], [5, 15, 25, 55, 65, 85, 95], [5, 15, 25, 55, 65, 75], [5, 15, 25, 55, 65, 75, 95], [5, 15, 25, 55, 65, 75, 85], [5, 15, 25, 55, 65, 75, 85, 95], [5, 15, 25, 45], [5, 15, 25, 45, 95], [5, 15, 25, 45, 85], [5, 15, 25, 45, 85, 95], [5, 15, 25, 45, 75], [5, 15, 25, 45, 75, 95], [5, 15, 25, 45, 75, 85], [5, 15, 25, 45, 75, 85, 95], [5, 15, 25, 45, 65], [5, 15, 25, 45, 65, 95], [5, 15, 25, 45, 65, 85], [5, 15, 25, 45, 65, 85, 95], [5, 15, 25, 45, 65, 75], [5, 15, 25, 45, 65, 75, 95], [5, 15, 25, 45, 65, 75, 85], [5, 15, 25, 45, 65, 75, 85, 95], [5, 15, 25, 45, 55], [5, 15, 25, 45, 55, 95], [5, 15, 25, 45, 55, 85], [5, 15, 25, 45, 55, 85, 95], [5, 15, 25, 45, 55, 75], [5, 15, 25, 45, 55, 75, 95], [5, 15, 25, 45, 55, 75, 85], [5, 15, 25, 45, 55, 75, 85, 95], [5, 15, 25, 45, 55, 65], [5, 15, 25, 45, 55, 65, 95], [5, 15, 25, 45, 55, 65, 85], [5, 15, 25, 45, 55, 65, 85, 95], [5, 15, 25, 45, 55, 65, 75], [5, 15, 25, 45, 55, 65, 75, 95], [5, 15, 25, 45, 55, 65, 75, 85], [5, 15, 25, 45, 55, 65, 75, 85, 95], [5, 15, 25, 35], [5, 15, 25, 35, 95], [5, 15, 25, 35, 85], [5, 15, 25, 35, 85, 95], [5, 15, 25, 35, 75], [5, 15, 25, 35, 75, 95], [5, 15, 25, 35, 75, 85], [5, 15, 25, 35, 75, 85, 95], [5, 15, 25, 35, 65], [5, 15, 25, 35, 65, 95], [5, 15, 25, 35, 65, 85], [5, 15, 25, 35, 65, 85, 95], [5, 15, 25, 35, 65, 75], [5, 15, 25, 35, 65, 75, 95], [5, 15, 25, 35, 65, 75, 85], [5, 15, 25, 35, 65, 75, 85, 95], [5, 15, 25, 35, 55], [5, 15, 25, 35, 55, 95], [5, 15, 25, 35, 55, 85], [5, 15, 25, 35, 55, 85, 95], [5, 15, 25, 35, 55, 75], [5, 15, 25, 35, 55, 75, 95], [5, 15, 25, 35, 55, 75, 85], [5, 15, 25, 35, 55, 75, 85, 95], [5, 15, 25, 35, 55, 65], [5, 15, 25, 35, 55, 65, 95], [5, 15, 25, 35, 55, 65, 85], [5, 15, 25, 35, 55, 65, 85, 95], [5, 15, 25, 35, 55, 65, 75], [5, 15, 25, 35, 55, 65, 75, 95], [5, 15, 25, 35, 55, 65, 75, 85], [5, 15, 25, 35, 55, 65, 75, 85, 95], [5, 15, 25, 35, 45], [5, 15, 25, 35, 45, 95], [5, 15, 25, 35, 45, 85], [5, 15, 25, 35, 45, 85, 95], [5, 15, 25, 35, 45, 75], [5, 15, 25, 35, 45, 75, 95], [5, 15, 25, 35, 45, 75, 85], [5, 15, 25, 35, 45, 75, 85, 95], [5, 15, 25, 35, 45, 65], [5, 15, 25, 35, 45, 65, 95], [5, 15, 25, 35, 45, 65, 85], [5, 15, 25, 35, 45, 65, 85, 95], [5, 15, 25, 35, 45, 65, 75], [5, 15, 25, 35, 45, 65, 75, 95], [5, 15, 25, 35, 45, 65, 75, 85], [5, 15, 25, 35, 45, 65, 75, 85, 95], [5, 15, 25, 35, 45, 55], [5, 15, 25, 35, 45, 55, 95], [5, 15, 25, 35, 45, 55, 85], [5, 15, 25, 35, 45, 55, 85, 95], [5, 15, 25, 35, 45, 55, 75], [5, 15, 25, 35, 45, 55, 75, 95], [5, 15, 25, 35, 45, 55, 75, 85], [5, 15, 25, 35, 45, 55, 75, 85, 95], [5, 15, 25, 35, 45, 55, 65], [5, 15, 25, 35, 45, 55, 65, 95], [5, 15, 25, 35, 45, 55, 65, 85], [5, 15, 25, 35, 45, 55, 65, 85, 95], [5, 15, 25, 35, 45, 55, 65, 75], [5, 15, 25, 35, 45, 55, 65, 75, 95], [5, 15, 25, 35, 45, 55, 65, 75, 85], [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]]\n assert 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 candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == [[], [50], [45], [45, 50], [40], [40, 50], [40, 45], [40, 45, 50], [35], [35, 50], [35, 45], [35, 45, 50], [35, 40], [35, 40, 50], [35, 40, 45], [35, 40, 45, 50], [30], [30, 50], [30, 45], [30, 45, 50], [30, 40], [30, 40, 50], [30, 40, 45], [30, 40, 45, 50], [30, 35], [30, 35, 50], [30, 35, 45], [30, 35, 45, 50], [30, 35, 40], [30, 35, 40, 50], [30, 35, 40, 45], [30, 35, 40, 45, 50], [25], [25, 50], [25, 45], [25, 45, 50], [25, 40], [25, 40, 50], [25, 40, 45], [25, 40, 45, 50], [25, 35], [25, 35, 50], [25, 35, 45], [25, 35, 45, 50], [25, 35, 40], [25, 35, 40, 50], [25, 35, 40, 45], [25, 35, 40, 45, 50], [25, 30], [25, 30, 50], [25, 30, 45], [25, 30, 45, 50], [25, 30, 40], [25, 30, 40, 50], [25, 30, 40, 45], [25, 30, 40, 45, 50], [25, 30, 35], [25, 30, 35, 50], [25, 30, 35, 45], [25, 30, 35, 45, 50], [25, 30, 35, 40], [25, 30, 35, 40, 50], [25, 30, 35, 40, 45], [25, 30, 35, 40, 45, 50], [20], [20, 50], [20, 45], [20, 45, 50], [20, 40], [20, 40, 50], [20, 40, 45], [20, 40, 45, 50], [20, 35], [20, 35, 50], [20, 35, 45], [20, 35, 45, 50], [20, 35, 40], [20, 35, 40, 50], [20, 35, 40, 45], [20, 35, 40, 45, 50], [20, 30], [20, 30, 50], [20, 30, 45], [20, 30, 45, 50], [20, 30, 40], [20, 30, 40, 50], [20, 30, 40, 45], [20, 30, 40, 45, 50], [20, 30, 35], [20, 30, 35, 50], [20, 30, 35, 45], [20, 30, 35, 45, 50], [20, 30, 35, 40], [20, 30, 35, 40, 50], [20, 30, 35, 40, 45], [20, 30, 35, 40, 45, 50], [20, 25], [20, 25, 50], [20, 25, 45], [20, 25, 45, 50], [20, 25, 40], [20, 25, 40, 50], [20, 25, 40, 45], [20, 25, 40, 45, 50], [20, 25, 35], [20, 25, 35, 50], [20, 25, 35, 45], [20, 25, 35, 45, 50], [20, 25, 35, 40], [20, 25, 35, 40, 50], [20, 25, 35, 40, 45], [20, 25, 35, 40, 45, 50], [20, 25, 30], [20, 25, 30, 50], [20, 25, 30, 45], [20, 25, 30, 45, 50], [20, 25, 30, 40], [20, 25, 30, 40, 50], [20, 25, 30, 40, 45], [20, 25, 30, 40, 45, 50], [20, 25, 30, 35], [20, 25, 30, 35, 50], [20, 25, 30, 35, 45], [20, 25, 30, 35, 45, 50], [20, 25, 30, 35, 40], [20, 25, 30, 35, 40, 50], [20, 25, 30, 35, 40, 45], [20, 25, 30, 35, 40, 45, 50], [15], [15, 50], [15, 45], [15, 45, 50], [15, 40], [15, 40, 50], [15, 40, 45], [15, 40, 45, 50], [15, 35], [15, 35, 50], [15, 35, 45], [15, 35, 45, 50], [15, 35, 40], [15, 35, 40, 50], [15, 35, 40, 45], [15, 35, 40, 45, 50], [15, 30], [15, 30, 50], [15, 30, 45], [15, 30, 45, 50], [15, 30, 40], [15, 30, 40, 50], [15, 30, 40, 45], [15, 30, 40, 45, 50], [15, 30, 35], [15, 30, 35, 50], [15, 30, 35, 45], [15, 30, 35, 45, 50], [15, 30, 35, 40], [15, 30, 35, 40, 50], [15, 30, 35, 40, 45], [15, 30, 35, 40, 45, 50], [15, 25], [15, 25, 50], [15, 25, 45], [15, 25, 45, 50], [15, 25, 40], [15, 25, 40, 50], [15, 25, 40, 45], [15, 25, 40, 45, 50], [15, 25, 35], [15, 25, 35, 50], [15, 25, 35, 45], [15, 25, 35, 45, 50], [15, 25, 35, 40], [15, 25, 35, 40, 50], [15, 25, 35, 40, 45], [15, 25, 35, 40, 45, 50], [15, 25, 30], [15, 25, 30, 50], [15, 25, 30, 45], [15, 25, 30, 45, 50], [15, 25, 30, 40], [15, 25, 30, 40, 50], [15, 25, 30, 40, 45], [15, 25, 30, 40, 45, 50], [15, 25, 30, 35], [15, 25, 30, 35, 50], [15, 25, 30, 35, 45], [15, 25, 30, 35, 45, 50], [15, 25, 30, 35, 40], [15, 25, 30, 35, 40, 50], [15, 25, 30, 35, 40, 45], [15, 25, 30, 35, 40, 45, 50], [15, 20], [15, 20, 50], [15, 20, 45], [15, 20, 45, 50], [15, 20, 40], [15, 20, 40, 50], [15, 20, 40, 45], [15, 20, 40, 45, 50], [15, 20, 35], [15, 20, 35, 50], [15, 20, 35, 45], [15, 20, 35, 45, 50], [15, 20, 35, 40], [15, 20, 35, 40, 50], [15, 20, 35, 40, 45], [15, 20, 35, 40, 45, 50], [15, 20, 30], [15, 20, 30, 50], [15, 20, 30, 45], [15, 20, 30, 45, 50], [15, 20, 30, 40], [15, 20, 30, 40, 50], [15, 20, 30, 40, 45], [15, 20, 30, 40, 45, 50], [15, 20, 30, 35], [15, 20, 30, 35, 50], [15, 20, 30, 35, 45], [15, 20, 30, 35, 45, 50], [15, 20, 30, 35, 40], [15, 20, 30, 35, 40, 50], [15, 20, 30, 35, 40, 45], [15, 20, 30, 35, 40, 45, 50], [15, 20, 25], [15, 20, 25, 50], [15, 20, 25, 45], [15, 20, 25, 45, 50], [15, 20, 25, 40], [15, 20, 25, 40, 50], [15, 20, 25, 40, 45], [15, 20, 25, 40, 45, 50], [15, 20, 25, 35], [15, 20, 25, 35, 50], [15, 20, 25, 35, 45], [15, 20, 25, 35, 45, 50], [15, 20, 25, 35, 40], [15, 20, 25, 35, 40, 50], [15, 20, 25, 35, 40, 45], [15, 20, 25, 35, 40, 45, 50], [15, 20, 25, 30], [15, 20, 25, 30, 50], [15, 20, 25, 30, 45], [15, 20, 25, 30, 45, 50], [15, 20, 25, 30, 40], [15, 20, 25, 30, 40, 50], [15, 20, 25, 30, 40, 45], [15, 20, 25, 30, 40, 45, 50], [15, 20, 25, 30, 35], [15, 20, 25, 30, 35, 50], [15, 20, 25, 30, 35, 45], [15, 20, 25, 30, 35, 45, 50], [15, 20, 25, 30, 35, 40], [15, 20, 25, 30, 35, 40, 50], [15, 20, 25, 30, 35, 40, 45], [15, 20, 25, 30, 35, 40, 45, 50], [10], [10, 50], [10, 45], [10, 45, 50], [10, 40], [10, 40, 50], [10, 40, 45], [10, 40, 45, 50], [10, 35], [10, 35, 50], [10, 35, 45], [10, 35, 45, 50], [10, 35, 40], [10, 35, 40, 50], [10, 35, 40, 45], [10, 35, 40, 45, 50], [10, 30], [10, 30, 50], [10, 30, 45], [10, 30, 45, 50], [10, 30, 40], [10, 30, 40, 50], [10, 30, 40, 45], [10, 30, 40, 45, 50], [10, 30, 35], [10, 30, 35, 50], [10, 30, 35, 45], [10, 30, 35, 45, 50], [10, 30, 35, 40], [10, 30, 35, 40, 50], [10, 30, 35, 40, 45], [10, 30, 35, 40, 45, 50], [10, 25], [10, 25, 50], [10, 25, 45], [10, 25, 45, 50], [10, 25, 40], [10, 25, 40, 50], [10, 25, 40, 45], [10, 25, 40, 45, 50], [10, 25, 35], [10, 25, 35, 50], [10, 25, 35, 45], [10, 25, 35, 45, 50], [10, 25, 35, 40], [10, 25, 35, 40, 50], [10, 25, 35, 40, 45], [10, 25, 35, 40, 45, 50], [10, 25, 30], [10, 25, 30, 50], [10, 25, 30, 45], [10, 25, 30, 45, 50], [10, 25, 30, 40], [10, 25, 30, 40, 50], [10, 25, 30, 40, 45], [10, 25, 30, 40, 45, 50], [10, 25, 30, 35], [10, 25, 30, 35, 50], [10, 25, 30, 35, 45], [10, 25, 30, 35, 45, 50], [10, 25, 30, 35, 40], [10, 25, 30, 35, 40, 50], [10, 25, 30, 35, 40, 45], [10, 25, 30, 35, 40, 45, 50], [10, 20], [10, 20, 50], [10, 20, 45], [10, 20, 45, 50], [10, 20, 40], [10, 20, 40, 50], [10, 20, 40, 45], [10, 20, 40, 45, 50], [10, 20, 35], [10, 20, 35, 50], [10, 20, 35, 45], [10, 20, 35, 45, 50], [10, 20, 35, 40], [10, 20, 35, 40, 50], [10, 20, 35, 40, 45], [10, 20, 35, 40, 45, 50], [10, 20, 30], [10, 20, 30, 50], [10, 20, 30, 45], [10, 20, 30, 45, 50], [10, 20, 30, 40], [10, 20, 30, 40, 50], [10, 20, 30, 40, 45], [10, 20, 30, 40, 45, 50], [10, 20, 30, 35], [10, 20, 30, 35, 50], [10, 20, 30, 35, 45], [10, 20, 30, 35, 45, 50], [10, 20, 30, 35, 40], [10, 20, 30, 35, 40, 50], [10, 20, 30, 35, 40, 45], [10, 20, 30, 35, 40, 45, 50], [10, 20, 25], [10, 20, 25, 50], [10, 20, 25, 45], [10, 20, 25, 45, 50], [10, 20, 25, 40], [10, 20, 25, 40, 50], [10, 20, 25, 40, 45], [10, 20, 25, 40, 45, 50], [10, 20, 25, 35], [10, 20, 25, 35, 50], [10, 20, 25, 35, 45], [10, 20, 25, 35, 45, 50], [10, 20, 25, 35, 40], [10, 20, 25, 35, 40, 50], [10, 20, 25, 35, 40, 45], [10, 20, 25, 35, 40, 45, 50], [10, 20, 25, 30], [10, 20, 25, 30, 50], [10, 20, 25, 30, 45], [10, 20, 25, 30, 45, 50], [10, 20, 25, 30, 40], [10, 20, 25, 30, 40, 50], [10, 20, 25, 30, 40, 45], [10, 20, 25, 30, 40, 45, 50], [10, 20, 25, 30, 35], [10, 20, 25, 30, 35, 50], [10, 20, 25, 30, 35, 45], [10, 20, 25, 30, 35, 45, 50], [10, 20, 25, 30, 35, 40], [10, 20, 25, 30, 35, 40, 50], [10, 20, 25, 30, 35, 40, 45], [10, 20, 25, 30, 35, 40, 45, 50], [10, 15], [10, 15, 50], [10, 15, 45], [10, 15, 45, 50], [10, 15, 40], [10, 15, 40, 50], [10, 15, 40, 45], [10, 15, 40, 45, 50], [10, 15, 35], [10, 15, 35, 50], [10, 15, 35, 45], [10, 15, 35, 45, 50], [10, 15, 35, 40], [10, 15, 35, 40, 50], [10, 15, 35, 40, 45], [10, 15, 35, 40, 45, 50], [10, 15, 30], [10, 15, 30, 50], [10, 15, 30, 45], [10, 15, 30, 45, 50], [10, 15, 30, 40], [10, 15, 30, 40, 50], [10, 15, 30, 40, 45], [10, 15, 30, 40, 45, 50], [10, 15, 30, 35], [10, 15, 30, 35, 50], [10, 15, 30, 35, 45], [10, 15, 30, 35, 45, 50], [10, 15, 30, 35, 40], [10, 15, 30, 35, 40, 50], [10, 15, 30, 35, 40, 45], [10, 15, 30, 35, 40, 45, 50], [10, 15, 25], [10, 15, 25, 50], [10, 15, 25, 45], [10, 15, 25, 45, 50], [10, 15, 25, 40], [10, 15, 25, 40, 50], [10, 15, 25, 40, 45], [10, 15, 25, 40, 45, 50], [10, 15, 25, 35], [10, 15, 25, 35, 50], [10, 15, 25, 35, 45], [10, 15, 25, 35, 45, 50], [10, 15, 25, 35, 40], [10, 15, 25, 35, 40, 50], [10, 15, 25, 35, 40, 45], [10, 15, 25, 35, 40, 45, 50], [10, 15, 25, 30], [10, 15, 25, 30, 50], [10, 15, 25, 30, 45], [10, 15, 25, 30, 45, 50], [10, 15, 25, 30, 40], [10, 15, 25, 30, 40, 50], [10, 15, 25, 30, 40, 45], [10, 15, 25, 30, 40, 45, 50], [10, 15, 25, 30, 35], [10, 15, 25, 30, 35, 50], [10, 15, 25, 30, 35, 45], [10, 15, 25, 30, 35, 45, 50], [10, 15, 25, 30, 35, 40], [10, 15, 25, 30, 35, 40, 50], [10, 15, 25, 30, 35, 40, 45], [10, 15, 25, 30, 35, 40, 45, 50], [10, 15, 20], [10, 15, 20, 50], [10, 15, 20, 45], [10, 15, 20, 45, 50], [10, 15, 20, 40], [10, 15, 20, 40, 50], [10, 15, 20, 40, 45], [10, 15, 20, 40, 45, 50], [10, 15, 20, 35], [10, 15, 20, 35, 50], [10, 15, 20, 35, 45], [10, 15, 20, 35, 45, 50], [10, 15, 20, 35, 40], [10, 15, 20, 35, 40, 50], [10, 15, 20, 35, 40, 45], [10, 15, 20, 35, 40, 45, 50], [10, 15, 20, 30], [10, 15, 20, 30, 50], [10, 15, 20, 30, 45], [10, 15, 20, 30, 45, 50], [10, 15, 20, 30, 40], [10, 15, 20, 30, 40, 50], [10, 15, 20, 30, 40, 45], [10, 15, 20, 30, 40, 45, 50], [10, 15, 20, 30, 35], [10, 15, 20, 30, 35, 50], [10, 15, 20, 30, 35, 45], [10, 15, 20, 30, 35, 45, 50], [10, 15, 20, 30, 35, 40], [10, 15, 20, 30, 35, 40, 50], [10, 15, 20, 30, 35, 40, 45], [10, 15, 20, 30, 35, 40, 45, 50], [10, 15, 20, 25], [10, 15, 20, 25, 50], [10, 15, 20, 25, 45], [10, 15, 20, 25, 45, 50], [10, 15, 20, 25, 40], [10, 15, 20, 25, 40, 50], [10, 15, 20, 25, 40, 45], [10, 15, 20, 25, 40, 45, 50], [10, 15, 20, 25, 35], [10, 15, 20, 25, 35, 50], [10, 15, 20, 25, 35, 45], [10, 15, 20, 25, 35, 45, 50], [10, 15, 20, 25, 35, 40], [10, 15, 20, 25, 35, 40, 50], [10, 15, 20, 25, 35, 40, 45], [10, 15, 20, 25, 35, 40, 45, 50], [10, 15, 20, 25, 30], [10, 15, 20, 25, 30, 50], [10, 15, 20, 25, 30, 45], [10, 15, 20, 25, 30, 45, 50], [10, 15, 20, 25, 30, 40], [10, 15, 20, 25, 30, 40, 50], [10, 15, 20, 25, 30, 40, 45], [10, 15, 20, 25, 30, 40, 45, 50], [10, 15, 20, 25, 30, 35], [10, 15, 20, 25, 30, 35, 50], [10, 15, 20, 25, 30, 35, 45], [10, 15, 20, 25, 30, 35, 45, 50], [10, 15, 20, 25, 30, 35, 40], [10, 15, 20, 25, 30, 35, 40, 50], [10, 15, 20, 25, 30, 35, 40, 45], [10, 15, 20, 25, 30, 35, 40, 45, 50], [5], [5, 50], [5, 45], [5, 45, 50], [5, 40], [5, 40, 50], [5, 40, 45], [5, 40, 45, 50], [5, 35], [5, 35, 50], [5, 35, 45], [5, 35, 45, 50], [5, 35, 40], [5, 35, 40, 50], [5, 35, 40, 45], [5, 35, 40, 45, 50], [5, 30], [5, 30, 50], [5, 30, 45], [5, 30, 45, 50], [5, 30, 40], [5, 30, 40, 50], [5, 30, 40, 45], [5, 30, 40, 45, 50], [5, 30, 35], [5, 30, 35, 50], [5, 30, 35, 45], [5, 30, 35, 45, 50], [5, 30, 35, 40], [5, 30, 35, 40, 50], [5, 30, 35, 40, 45], [5, 30, 35, 40, 45, 50], [5, 25], [5, 25, 50], [5, 25, 45], [5, 25, 45, 50], [5, 25, 40], [5, 25, 40, 50], [5, 25, 40, 45], [5, 25, 40, 45, 50], [5, 25, 35], [5, 25, 35, 50], [5, 25, 35, 45], [5, 25, 35, 45, 50], [5, 25, 35, 40], [5, 25, 35, 40, 50], [5, 25, 35, 40, 45], [5, 25, 35, 40, 45, 50], [5, 25, 30], [5, 25, 30, 50], [5, 25, 30, 45], [5, 25, 30, 45, 50], [5, 25, 30, 40], [5, 25, 30, 40, 50], [5, 25, 30, 40, 45], [5, 25, 30, 40, 45, 50], [5, 25, 30, 35], [5, 25, 30, 35, 50], [5, 25, 30, 35, 45], [5, 25, 30, 35, 45, 50], [5, 25, 30, 35, 40], [5, 25, 30, 35, 40, 50], [5, 25, 30, 35, 40, 45], [5, 25, 30, 35, 40, 45, 50], [5, 20], [5, 20, 50], [5, 20, 45], [5, 20, 45, 50], [5, 20, 40], [5, 20, 40, 50], [5, 20, 40, 45], [5, 20, 40, 45, 50], [5, 20, 35], [5, 20, 35, 50], [5, 20, 35, 45], [5, 20, 35, 45, 50], [5, 20, 35, 40], [5, 20, 35, 40, 50], [5, 20, 35, 40, 45], [5, 20, 35, 40, 45, 50], [5, 20, 30], [5, 20, 30, 50], [5, 20, 30, 45], [5, 20, 30, 45, 50], [5, 20, 30, 40], [5, 20, 30, 40, 50], [5, 20, 30, 40, 45], [5, 20, 30, 40, 45, 50], [5, 20, 30, 35], [5, 20, 30, 35, 50], [5, 20, 30, 35, 45], [5, 20, 30, 35, 45, 50], [5, 20, 30, 35, 40], [5, 20, 30, 35, 40, 50], [5, 20, 30, 35, 40, 45], [5, 20, 30, 35, 40, 45, 50], [5, 20, 25], [5, 20, 25, 50], [5, 20, 25, 45], [5, 20, 25, 45, 50], [5, 20, 25, 40], [5, 20, 25, 40, 50], [5, 20, 25, 40, 45], [5, 20, 25, 40, 45, 50], [5, 20, 25, 35], [5, 20, 25, 35, 50], [5, 20, 25, 35, 45], [5, 20, 25, 35, 45, 50], [5, 20, 25, 35, 40], [5, 20, 25, 35, 40, 50], [5, 20, 25, 35, 40, 45], [5, 20, 25, 35, 40, 45, 50], [5, 20, 25, 30], [5, 20, 25, 30, 50], [5, 20, 25, 30, 45], [5, 20, 25, 30, 45, 50], [5, 20, 25, 30, 40], [5, 20, 25, 30, 40, 50], [5, 20, 25, 30, 40, 45], [5, 20, 25, 30, 40, 45, 50], [5, 20, 25, 30, 35], [5, 20, 25, 30, 35, 50], [5, 20, 25, 30, 35, 45], [5, 20, 25, 30, 35, 45, 50], [5, 20, 25, 30, 35, 40], [5, 20, 25, 30, 35, 40, 50], [5, 20, 25, 30, 35, 40, 45], [5, 20, 25, 30, 35, 40, 45, 50], [5, 15], [5, 15, 50], [5, 15, 45], [5, 15, 45, 50], [5, 15, 40], [5, 15, 40, 50], [5, 15, 40, 45], [5, 15, 40, 45, 50], [5, 15, 35], [5, 15, 35, 50], [5, 15, 35, 45], [5, 15, 35, 45, 50], [5, 15, 35, 40], [5, 15, 35, 40, 50], [5, 15, 35, 40, 45], [5, 15, 35, 40, 45, 50], [5, 15, 30], [5, 15, 30, 50], [5, 15, 30, 45], [5, 15, 30, 45, 50], [5, 15, 30, 40], [5, 15, 30, 40, 50], [5, 15, 30, 40, 45], [5, 15, 30, 40, 45, 50], [5, 15, 30, 35], [5, 15, 30, 35, 50], [5, 15, 30, 35, 45], [5, 15, 30, 35, 45, 50], [5, 15, 30, 35, 40], [5, 15, 30, 35, 40, 50], [5, 15, 30, 35, 40, 45], [5, 15, 30, 35, 40, 45, 50], [5, 15, 25], [5, 15, 25, 50], [5, 15, 25, 45], [5, 15, 25, 45, 50], [5, 15, 25, 40], [5, 15, 25, 40, 50], [5, 15, 25, 40, 45], [5, 15, 25, 40, 45, 50], [5, 15, 25, 35], [5, 15, 25, 35, 50], [5, 15, 25, 35, 45], [5, 15, 25, 35, 45, 50], [5, 15, 25, 35, 40], [5, 15, 25, 35, 40, 50], [5, 15, 25, 35, 40, 45], [5, 15, 25, 35, 40, 45, 50], [5, 15, 25, 30], [5, 15, 25, 30, 50], [5, 15, 25, 30, 45], [5, 15, 25, 30, 45, 50], [5, 15, 25, 30, 40], [5, 15, 25, 30, 40, 50], [5, 15, 25, 30, 40, 45], [5, 15, 25, 30, 40, 45, 50], [5, 15, 25, 30, 35], [5, 15, 25, 30, 35, 50], [5, 15, 25, 30, 35, 45], [5, 15, 25, 30, 35, 45, 50], [5, 15, 25, 30, 35, 40], [5, 15, 25, 30, 35, 40, 50], [5, 15, 25, 30, 35, 40, 45], [5, 15, 25, 30, 35, 40, 45, 50], [5, 15, 20], [5, 15, 20, 50], [5, 15, 20, 45], [5, 15, 20, 45, 50], [5, 15, 20, 40], [5, 15, 20, 40, 50], [5, 15, 20, 40, 45], [5, 15, 20, 40, 45, 50], [5, 15, 20, 35], [5, 15, 20, 35, 50], [5, 15, 20, 35, 45], [5, 15, 20, 35, 45, 50], [5, 15, 20, 35, 40], [5, 15, 20, 35, 40, 50], [5, 15, 20, 35, 40, 45], [5, 15, 20, 35, 40, 45, 50], [5, 15, 20, 30], [5, 15, 20, 30, 50], [5, 15, 20, 30, 45], [5, 15, 20, 30, 45, 50], [5, 15, 20, 30, 40], [5, 15, 20, 30, 40, 50], [5, 15, 20, 30, 40, 45], [5, 15, 20, 30, 40, 45, 50], [5, 15, 20, 30, 35], [5, 15, 20, 30, 35, 50], [5, 15, 20, 30, 35, 45], [5, 15, 20, 30, 35, 45, 50], [5, 15, 20, 30, 35, 40], [5, 15, 20, 30, 35, 40, 50], [5, 15, 20, 30, 35, 40, 45], [5, 15, 20, 30, 35, 40, 45, 50], [5, 15, 20, 25], [5, 15, 20, 25, 50], [5, 15, 20, 25, 45], [5, 15, 20, 25, 45, 50], [5, 15, 20, 25, 40], [5, 15, 20, 25, 40, 50], [5, 15, 20, 25, 40, 45], [5, 15, 20, 25, 40, 45, 50], [5, 15, 20, 25, 35], [5, 15, 20, 25, 35, 50], [5, 15, 20, 25, 35, 45], [5, 15, 20, 25, 35, 45, 50], [5, 15, 20, 25, 35, 40], [5, 15, 20, 25, 35, 40, 50], [5, 15, 20, 25, 35, 40, 45], [5, 15, 20, 25, 35, 40, 45, 50], [5, 15, 20, 25, 30], [5, 15, 20, 25, 30, 50], [5, 15, 20, 25, 30, 45], [5, 15, 20, 25, 30, 45, 50], [5, 15, 20, 25, 30, 40], [5, 15, 20, 25, 30, 40, 50], [5, 15, 20, 25, 30, 40, 45], [5, 15, 20, 25, 30, 40, 45, 50], [5, 15, 20, 25, 30, 35], [5, 15, 20, 25, 30, 35, 50], [5, 15, 20, 25, 30, 35, 45], [5, 15, 20, 25, 30, 35, 45, 50], [5, 15, 20, 25, 30, 35, 40], [5, 15, 20, 25, 30, 35, 40, 50], [5, 15, 20, 25, 30, 35, 40, 45], [5, 15, 20, 25, 30, 35, 40, 45, 50], [5, 10], [5, 10, 50], [5, 10, 45], [5, 10, 45, 50], [5, 10, 40], [5, 10, 40, 50], [5, 10, 40, 45], [5, 10, 40, 45, 50], [5, 10, 35], [5, 10, 35, 50], [5, 10, 35, 45], [5, 10, 35, 45, 50], [5, 10, 35, 40], [5, 10, 35, 40, 50], [5, 10, 35, 40, 45], [5, 10, 35, 40, 45, 50], [5, 10, 30], [5, 10, 30, 50], [5, 10, 30, 45], [5, 10, 30, 45, 50], [5, 10, 30, 40], [5, 10, 30, 40, 50], [5, 10, 30, 40, 45], [5, 10, 30, 40, 45, 50], [5, 10, 30, 35], [5, 10, 30, 35, 50], [5, 10, 30, 35, 45], [5, 10, 30, 35, 45, 50], [5, 10, 30, 35, 40], [5, 10, 30, 35, 40, 50], [5, 10, 30, 35, 40, 45], [5, 10, 30, 35, 40, 45, 50], [5, 10, 25], [5, 10, 25, 50], [5, 10, 25, 45], [5, 10, 25, 45, 50], [5, 10, 25, 40], [5, 10, 25, 40, 50], [5, 10, 25, 40, 45], [5, 10, 25, 40, 45, 50], [5, 10, 25, 35], [5, 10, 25, 35, 50], [5, 10, 25, 35, 45], [5, 10, 25, 35, 45, 50], [5, 10, 25, 35, 40], [5, 10, 25, 35, 40, 50], [5, 10, 25, 35, 40, 45], [5, 10, 25, 35, 40, 45, 50], [5, 10, 25, 30], [5, 10, 25, 30, 50], [5, 10, 25, 30, 45], [5, 10, 25, 30, 45, 50], [5, 10, 25, 30, 40], [5, 10, 25, 30, 40, 50], [5, 10, 25, 30, 40, 45], [5, 10, 25, 30, 40, 45, 50], [5, 10, 25, 30, 35], [5, 10, 25, 30, 35, 50], [5, 10, 25, 30, 35, 45], [5, 10, 25, 30, 35, 45, 50], [5, 10, 25, 30, 35, 40], [5, 10, 25, 30, 35, 40, 50], [5, 10, 25, 30, 35, 40, 45], [5, 10, 25, 30, 35, 40, 45, 50], [5, 10, 20], [5, 10, 20, 50], [5, 10, 20, 45], [5, 10, 20, 45, 50], [5, 10, 20, 40], [5, 10, 20, 40, 50], [5, 10, 20, 40, 45], [5, 10, 20, 40, 45, 50], [5, 10, 20, 35], [5, 10, 20, 35, 50], [5, 10, 20, 35, 45], [5, 10, 20, 35, 45, 50], [5, 10, 20, 35, 40], [5, 10, 20, 35, 40, 50], [5, 10, 20, 35, 40, 45], [5, 10, 20, 35, 40, 45, 50], [5, 10, 20, 30], [5, 10, 20, 30, 50], [5, 10, 20, 30, 45], [5, 10, 20, 30, 45, 50], [5, 10, 20, 30, 40], [5, 10, 20, 30, 40, 50], [5, 10, 20, 30, 40, 45], [5, 10, 20, 30, 40, 45, 50], [5, 10, 20, 30, 35], [5, 10, 20, 30, 35, 50], [5, 10, 20, 30, 35, 45], [5, 10, 20, 30, 35, 45, 50], [5, 10, 20, 30, 35, 40], [5, 10, 20, 30, 35, 40, 50], [5, 10, 20, 30, 35, 40, 45], [5, 10, 20, 30, 35, 40, 45, 50], [5, 10, 20, 25], [5, 10, 20, 25, 50], [5, 10, 20, 25, 45], [5, 10, 20, 25, 45, 50], [5, 10, 20, 25, 40], [5, 10, 20, 25, 40, 50], [5, 10, 20, 25, 40, 45], [5, 10, 20, 25, 40, 45, 50], [5, 10, 20, 25, 35], [5, 10, 20, 25, 35, 50], [5, 10, 20, 25, 35, 45], [5, 10, 20, 25, 35, 45, 50], [5, 10, 20, 25, 35, 40], [5, 10, 20, 25, 35, 40, 50], [5, 10, 20, 25, 35, 40, 45], [5, 10, 20, 25, 35, 40, 45, 50], [5, 10, 20, 25, 30], [5, 10, 20, 25, 30, 50], [5, 10, 20, 25, 30, 45], [5, 10, 20, 25, 30, 45, 50], [5, 10, 20, 25, 30, 40], [5, 10, 20, 25, 30, 40, 50], [5, 10, 20, 25, 30, 40, 45], [5, 10, 20, 25, 30, 40, 45, 50], [5, 10, 20, 25, 30, 35], [5, 10, 20, 25, 30, 35, 50], [5, 10, 20, 25, 30, 35, 45], [5, 10, 20, 25, 30, 35, 45, 50], [5, 10, 20, 25, 30, 35, 40], [5, 10, 20, 25, 30, 35, 40, 50], [5, 10, 20, 25, 30, 35, 40, 45], [5, 10, 20, 25, 30, 35, 40, 45, 50], [5, 10, 15], [5, 10, 15, 50], [5, 10, 15, 45], [5, 10, 15, 45, 50], [5, 10, 15, 40], [5, 10, 15, 40, 50], [5, 10, 15, 40, 45], [5, 10, 15, 40, 45, 50], [5, 10, 15, 35], [5, 10, 15, 35, 50], [5, 10, 15, 35, 45], [5, 10, 15, 35, 45, 50], [5, 10, 15, 35, 40], [5, 10, 15, 35, 40, 50], [5, 10, 15, 35, 40, 45], [5, 10, 15, 35, 40, 45, 50], [5, 10, 15, 30], [5, 10, 15, 30, 50], [5, 10, 15, 30, 45], [5, 10, 15, 30, 45, 50], [5, 10, 15, 30, 40], [5, 10, 15, 30, 40, 50], [5, 10, 15, 30, 40, 45], [5, 10, 15, 30, 40, 45, 50], [5, 10, 15, 30, 35], [5, 10, 15, 30, 35, 50], [5, 10, 15, 30, 35, 45], [5, 10, 15, 30, 35, 45, 50], [5, 10, 15, 30, 35, 40], [5, 10, 15, 30, 35, 40, 50], [5, 10, 15, 30, 35, 40, 45], [5, 10, 15, 30, 35, 40, 45, 50], [5, 10, 15, 25], [5, 10, 15, 25, 50], [5, 10, 15, 25, 45], [5, 10, 15, 25, 45, 50], [5, 10, 15, 25, 40], [5, 10, 15, 25, 40, 50], [5, 10, 15, 25, 40, 45], [5, 10, 15, 25, 40, 45, 50], [5, 10, 15, 25, 35], [5, 10, 15, 25, 35, 50], [5, 10, 15, 25, 35, 45], [5, 10, 15, 25, 35, 45, 50], [5, 10, 15, 25, 35, 40], [5, 10, 15, 25, 35, 40, 50], [5, 10, 15, 25, 35, 40, 45], [5, 10, 15, 25, 35, 40, 45, 50], [5, 10, 15, 25, 30], [5, 10, 15, 25, 30, 50], [5, 10, 15, 25, 30, 45], [5, 10, 15, 25, 30, 45, 50], [5, 10, 15, 25, 30, 40], [5, 10, 15, 25, 30, 40, 50], [5, 10, 15, 25, 30, 40, 45], [5, 10, 15, 25, 30, 40, 45, 50], [5, 10, 15, 25, 30, 35], [5, 10, 15, 25, 30, 35, 50], [5, 10, 15, 25, 30, 35, 45], [5, 10, 15, 25, 30, 35, 45, 50], [5, 10, 15, 25, 30, 35, 40], [5, 10, 15, 25, 30, 35, 40, 50], [5, 10, 15, 25, 30, 35, 40, 45], [5, 10, 15, 25, 30, 35, 40, 45, 50], [5, 10, 15, 20], [5, 10, 15, 20, 50], [5, 10, 15, 20, 45], [5, 10, 15, 20, 45, 50], [5, 10, 15, 20, 40], [5, 10, 15, 20, 40, 50], [5, 10, 15, 20, 40, 45], [5, 10, 15, 20, 40, 45, 50], [5, 10, 15, 20, 35], [5, 10, 15, 20, 35, 50], [5, 10, 15, 20, 35, 45], [5, 10, 15, 20, 35, 45, 50], [5, 10, 15, 20, 35, 40], [5, 10, 15, 20, 35, 40, 50], [5, 10, 15, 20, 35, 40, 45], [5, 10, 15, 20, 35, 40, 45, 50], [5, 10, 15, 20, 30], [5, 10, 15, 20, 30, 50], [5, 10, 15, 20, 30, 45], [5, 10, 15, 20, 30, 45, 50], [5, 10, 15, 20, 30, 40], [5, 10, 15, 20, 30, 40, 50], [5, 10, 15, 20, 30, 40, 45], [5, 10, 15, 20, 30, 40, 45, 50], [5, 10, 15, 20, 30, 35], [5, 10, 15, 20, 30, 35, 50], [5, 10, 15, 20, 30, 35, 45], [5, 10, 15, 20, 30, 35, 45, 50], [5, 10, 15, 20, 30, 35, 40], [5, 10, 15, 20, 30, 35, 40, 50], [5, 10, 15, 20, 30, 35, 40, 45], [5, 10, 15, 20, 30, 35, 40, 45, 50], [5, 10, 15, 20, 25], [5, 10, 15, 20, 25, 50], [5, 10, 15, 20, 25, 45], [5, 10, 15, 20, 25, 45, 50], [5, 10, 15, 20, 25, 40], [5, 10, 15, 20, 25, 40, 50], [5, 10, 15, 20, 25, 40, 45], [5, 10, 15, 20, 25, 40, 45, 50], [5, 10, 15, 20, 25, 35], [5, 10, 15, 20, 25, 35, 50], [5, 10, 15, 20, 25, 35, 45], [5, 10, 15, 20, 25, 35, 45, 50], [5, 10, 15, 20, 25, 35, 40], [5, 10, 15, 20, 25, 35, 40, 50], [5, 10, 15, 20, 25, 35, 40, 45], [5, 10, 15, 20, 25, 35, 40, 45, 50], [5, 10, 15, 20, 25, 30], [5, 10, 15, 20, 25, 30, 50], [5, 10, 15, 20, 25, 30, 45], [5, 10, 15, 20, 25, 30, 45, 50], [5, 10, 15, 20, 25, 30, 40], [5, 10, 15, 20, 25, 30, 40, 50], [5, 10, 15, 20, 25, 30, 40, 45], [5, 10, 15, 20, 25, 30, 40, 45, 50], [5, 10, 15, 20, 25, 30, 35], [5, 10, 15, 20, 25, 30, 35, 50], [5, 10, 15, 20, 25, 30, 35, 45], [5, 10, 15, 20, 25, 30, 35, 45, 50], [5, 10, 15, 20, 25, 30, 35, 40], [5, 10, 15, 20, 25, 30, 35, 40, 50], [5, 10, 15, 20, 25, 30, 35, 40, 45], [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]]\n assert 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 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 candidate(nums = [7, 11, 13, 17]) == [[], [17], [13], [13, 17], [11], [11, 17], [11, 13], [11, 13, 17], [7], [7, 17], [7, 13], [7, 13, 17], [7, 11], [7, 11, 17], [7, 11, 13], [7, 11, 13, 17]]\n assert 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 candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == [[], [-100], [-90], [-90, -100], [-80], [-80, -100], [-80, -90], [-80, -90, -100], [-70], [-70, -100], [-70, -90], [-70, -90, -100], [-70, -80], [-70, -80, -100], [-70, -80, -90], [-70, -80, -90, -100], [-60], [-60, -100], [-60, -90], [-60, -90, -100], [-60, -80], [-60, -80, -100], [-60, -80, -90], [-60, -80, -90, -100], [-60, -70], [-60, -70, -100], [-60, -70, -90], [-60, -70, -90, -100], [-60, -70, -80], [-60, -70, -80, -100], [-60, -70, -80, -90], [-60, -70, -80, -90, -100], [-50], [-50, -100], [-50, -90], [-50, -90, -100], [-50, -80], [-50, -80, -100], [-50, -80, -90], [-50, -80, -90, -100], [-50, -70], [-50, -70, -100], [-50, -70, -90], [-50, -70, -90, -100], [-50, -70, -80], [-50, -70, -80, -100], [-50, -70, -80, -90], [-50, -70, -80, -90, -100], [-50, -60], [-50, -60, -100], [-50, -60, -90], [-50, -60, -90, -100], [-50, -60, -80], [-50, -60, -80, -100], [-50, -60, -80, -90], [-50, -60, -80, -90, -100], [-50, -60, -70], [-50, -60, -70, -100], [-50, -60, -70, -90], [-50, -60, -70, -90, -100], [-50, -60, -70, -80], [-50, -60, -70, -80, -100], [-50, -60, -70, -80, -90], [-50, -60, -70, -80, -90, -100], [-40], [-40, -100], [-40, -90], [-40, -90, -100], [-40, -80], [-40, -80, -100], [-40, -80, -90], [-40, -80, -90, -100], [-40, -70], [-40, -70, -100], [-40, -70, -90], [-40, -70, -90, -100], [-40, -70, -80], [-40, -70, -80, -100], [-40, -70, -80, -90], [-40, -70, -80, -90, -100], [-40, -60], [-40, -60, -100], [-40, -60, -90], [-40, -60, -90, -100], [-40, -60, -80], [-40, -60, -80, -100], [-40, -60, -80, -90], [-40, -60, -80, -90, -100], [-40, -60, -70], [-40, -60, -70, -100], [-40, -60, -70, -90], [-40, -60, -70, -90, -100], [-40, -60, -70, -80], [-40, -60, -70, -80, -100], [-40, -60, -70, -80, -90], [-40, -60, -70, -80, -90, -100], [-40, -50], [-40, -50, -100], [-40, -50, -90], [-40, -50, -90, -100], [-40, -50, -80], [-40, -50, -80, -100], [-40, -50, -80, -90], [-40, -50, -80, -90, -100], [-40, -50, -70], [-40, -50, -70, -100], [-40, -50, -70, -90], [-40, -50, -70, -90, -100], [-40, -50, -70, -80], [-40, -50, -70, -80, -100], [-40, -50, -70, -80, -90], [-40, -50, -70, -80, -90, -100], [-40, -50, -60], [-40, -50, -60, -100], [-40, -50, -60, -90], [-40, -50, -60, -90, -100], [-40, -50, -60, -80], [-40, -50, -60, -80, -100], [-40, -50, -60, -80, -90], [-40, -50, -60, -80, -90, -100], [-40, -50, -60, -70], [-40, -50, -60, -70, -100], [-40, -50, -60, -70, -90], [-40, -50, -60, -70, -90, -100], [-40, -50, -60, -70, -80], [-40, -50, -60, -70, -80, -100], [-40, -50, -60, -70, -80, -90], [-40, -50, -60, -70, -80, -90, -100], [-30], [-30, -100], [-30, -90], [-30, -90, -100], [-30, -80], [-30, -80, -100], [-30, -80, -90], [-30, -80, -90, -100], [-30, -70], [-30, -70, -100], [-30, -70, -90], [-30, -70, -90, -100], [-30, -70, -80], [-30, -70, -80, -100], [-30, -70, -80, -90], [-30, -70, -80, -90, -100], [-30, -60], [-30, -60, -100], [-30, -60, -90], [-30, -60, -90, -100], [-30, -60, -80], [-30, -60, -80, -100], [-30, -60, -80, -90], [-30, -60, -80, -90, -100], [-30, -60, -70], [-30, -60, -70, -100], [-30, -60, -70, -90], [-30, -60, -70, -90, -100], [-30, -60, -70, -80], [-30, -60, -70, -80, -100], [-30, -60, -70, -80, -90], [-30, -60, -70, -80, -90, -100], [-30, -50], [-30, -50, -100], [-30, -50, -90], [-30, -50, -90, -100], [-30, -50, -80], [-30, -50, -80, -100], [-30, -50, -80, -90], [-30, -50, -80, -90, -100], [-30, -50, -70], [-30, -50, -70, -100], [-30, -50, -70, -90], [-30, -50, -70, -90, -100], [-30, -50, -70, -80], [-30, -50, -70, -80, -100], [-30, -50, -70, -80, -90], [-30, -50, -70, -80, -90, -100], [-30, -50, -60], [-30, -50, -60, -100], [-30, -50, -60, -90], [-30, -50, -60, -90, -100], [-30, -50, -60, -80], [-30, -50, -60, -80, -100], [-30, -50, -60, -80, -90], [-30, -50, -60, -80, -90, -100], [-30, -50, -60, -70], [-30, -50, -60, -70, -100], [-30, -50, -60, -70, -90], [-30, -50, -60, -70, -90, -100], [-30, -50, -60, -70, -80], [-30, -50, -60, -70, -80, -100], [-30, -50, -60, -70, -80, -90], [-30, -50, -60, -70, -80, -90, -100], [-30, -40], [-30, -40, -100], [-30, -40, -90], [-30, -40, -90, -100], [-30, -40, -80], [-30, -40, -80, -100], [-30, -40, -80, -90], [-30, -40, -80, -90, -100], [-30, -40, -70], [-30, -40, -70, -100], [-30, -40, -70, -90], [-30, -40, -70, -90, -100], [-30, -40, -70, -80], [-30, -40, -70, -80, -100], [-30, -40, -70, -80, -90], [-30, -40, -70, -80, -90, -100], [-30, -40, -60], [-30, -40, -60, -100], [-30, -40, -60, -90], [-30, -40, -60, -90, -100], [-30, -40, -60, -80], [-30, -40, -60, -80, -100], [-30, -40, -60, -80, -90], [-30, -40, -60, -80, -90, -100], [-30, -40, -60, -70], [-30, -40, -60, -70, -100], [-30, -40, -60, -70, -90], [-30, -40, -60, -70, -90, -100], [-30, -40, -60, -70, -80], [-30, -40, -60, -70, -80, -100], [-30, -40, -60, -70, -80, -90], [-30, -40, -60, -70, -80, -90, -100], [-30, -40, -50], [-30, -40, -50, -100], [-30, -40, -50, -90], [-30, -40, -50, -90, -100], [-30, -40, -50, -80], [-30, -40, -50, -80, -100], [-30, -40, -50, -80, -90], [-30, -40, -50, -80, -90, -100], [-30, -40, -50, -70], [-30, -40, -50, -70, -100], [-30, -40, -50, -70, -90], [-30, -40, -50, -70, -90, -100], [-30, -40, -50, -70, -80], [-30, -40, -50, -70, -80, -100], [-30, -40, -50, -70, -80, -90], [-30, -40, -50, -70, -80, -90, -100], [-30, -40, -50, -60], [-30, -40, -50, -60, -100], [-30, -40, -50, -60, -90], [-30, -40, -50, -60, -90, -100], [-30, -40, -50, -60, -80], [-30, -40, -50, -60, -80, -100], [-30, -40, -50, -60, -80, -90], [-30, -40, -50, -60, -80, -90, -100], [-30, -40, -50, -60, -70], [-30, -40, -50, -60, -70, -100], [-30, -40, -50, -60, -70, -90], [-30, -40, -50, -60, -70, -90, -100], [-30, -40, -50, -60, -70, -80], [-30, -40, -50, -60, -70, -80, -100], [-30, -40, -50, -60, -70, -80, -90], [-30, -40, -50, -60, -70, -80, -90, -100], [-20], [-20, -100], [-20, -90], [-20, -90, -100], [-20, -80], [-20, -80, -100], [-20, -80, -90], [-20, -80, -90, -100], [-20, -70], [-20, -70, -100], [-20, -70, -90], [-20, -70, -90, -100], [-20, -70, -80], [-20, -70, -80, -100], [-20, -70, -80, -90], [-20, -70, -80, -90, -100], [-20, -60], [-20, -60, -100], [-20, -60, -90], [-20, -60, -90, -100], [-20, -60, -80], [-20, -60, -80, -100], [-20, -60, -80, -90], [-20, -60, -80, -90, -100], [-20, -60, -70], [-20, -60, -70, -100], [-20, -60, -70, -90], [-20, -60, -70, -90, -100], [-20, -60, -70, -80], [-20, -60, -70, -80, -100], [-20, -60, -70, -80, -90], [-20, -60, -70, -80, -90, -100], [-20, -50], [-20, -50, -100], [-20, -50, -90], [-20, -50, -90, -100], [-20, -50, -80], [-20, -50, -80, -100], [-20, -50, -80, -90], [-20, -50, -80, -90, -100], [-20, -50, -70], [-20, -50, -70, -100], [-20, -50, -70, -90], [-20, -50, -70, -90, -100], [-20, -50, -70, -80], [-20, -50, -70, -80, -100], [-20, -50, -70, -80, -90], [-20, -50, -70, -80, -90, -100], [-20, -50, -60], [-20, -50, -60, -100], [-20, -50, -60, -90], [-20, -50, -60, -90, -100], [-20, -50, -60, -80], [-20, -50, -60, -80, -100], [-20, -50, -60, -80, -90], [-20, -50, -60, -80, -90, -100], [-20, -50, -60, -70], [-20, -50, -60, -70, -100], [-20, -50, -60, -70, -90], [-20, -50, -60, -70, -90, -100], [-20, -50, -60, -70, -80], [-20, -50, -60, -70, -80, -100], [-20, -50, -60, -70, -80, -90], [-20, -50, -60, -70, -80, -90, -100], [-20, -40], [-20, -40, -100], [-20, -40, -90], [-20, -40, -90, -100], [-20, -40, -80], [-20, -40, -80, -100], [-20, -40, -80, -90], [-20, -40, -80, -90, -100], [-20, -40, -70], [-20, -40, -70, -100], [-20, -40, -70, -90], [-20, -40, -70, -90, -100], [-20, -40, -70, -80], [-20, -40, -70, -80, -100], [-20, -40, -70, -80, -90], [-20, -40, -70, -80, -90, -100], [-20, -40, -60], [-20, -40, -60, -100], [-20, -40, -60, -90], [-20, -40, -60, -90, -100], [-20, -40, -60, -80], [-20, -40, -60, -80, -100], [-20, -40, -60, -80, -90], [-20, -40, -60, -80, -90, -100], [-20, -40, -60, -70], [-20, -40, -60, -70, -100], [-20, -40, -60, -70, -90], [-20, -40, -60, -70, -90, -100], [-20, -40, -60, -70, -80], [-20, -40, -60, -70, -80, -100], [-20, -40, -60, -70, -80, -90], [-20, -40, -60, -70, -80, -90, -100], [-20, -40, -50], [-20, -40, -50, -100], [-20, -40, -50, -90], [-20, -40, -50, -90, -100], [-20, -40, -50, -80], [-20, -40, -50, -80, -100], [-20, -40, -50, -80, -90], [-20, -40, -50, -80, -90, -100], [-20, -40, -50, -70], [-20, -40, -50, -70, -100], [-20, -40, -50, -70, -90], [-20, -40, -50, -70, -90, -100], [-20, -40, -50, -70, -80], [-20, -40, -50, -70, -80, -100], [-20, -40, -50, -70, -80, -90], [-20, -40, -50, -70, -80, -90, -100], [-20, -40, -50, -60], [-20, -40, -50, -60, -100], [-20, -40, -50, -60, -90], [-20, -40, -50, -60, -90, -100], [-20, -40, -50, -60, -80], [-20, -40, -50, -60, -80, -100], [-20, -40, -50, -60, -80, -90], [-20, -40, -50, -60, -80, -90, -100], [-20, -40, -50, -60, -70], [-20, -40, -50, -60, -70, -100], [-20, -40, -50, -60, -70, -90], [-20, -40, -50, -60, -70, -90, -100], [-20, -40, -50, -60, -70, -80], [-20, -40, -50, -60, -70, -80, -100], [-20, -40, -50, -60, -70, -80, -90], [-20, -40, -50, -60, -70, -80, -90, -100], [-20, -30], [-20, -30, -100], [-20, -30, -90], [-20, -30, -90, -100], [-20, -30, -80], [-20, -30, -80, -100], [-20, -30, -80, -90], [-20, -30, -80, -90, -100], [-20, -30, -70], [-20, -30, -70, -100], [-20, -30, -70, -90], [-20, -30, -70, -90, -100], [-20, -30, -70, -80], [-20, -30, -70, -80, -100], [-20, -30, -70, -80, -90], [-20, -30, -70, -80, -90, -100], [-20, -30, -60], [-20, -30, -60, -100], [-20, -30, -60, -90], [-20, -30, -60, -90, -100], [-20, -30, -60, -80], [-20, -30, -60, -80, -100], [-20, -30, -60, -80, -90], [-20, -30, -60, -80, -90, -100], [-20, -30, -60, -70], [-20, -30, -60, -70, -100], [-20, -30, -60, -70, -90], [-20, -30, -60, -70, -90, -100], [-20, -30, -60, -70, -80], [-20, -30, -60, -70, -80, -100], [-20, -30, -60, -70, -80, -90], [-20, -30, -60, -70, -80, -90, -100], [-20, -30, -50], [-20, -30, -50, -100], [-20, -30, -50, -90], [-20, -30, -50, -90, -100], [-20, -30, -50, -80], [-20, -30, -50, -80, -100], [-20, -30, -50, -80, -90], [-20, -30, -50, -80, -90, -100], [-20, -30, -50, -70], [-20, -30, -50, -70, -100], [-20, -30, -50, -70, -90], [-20, -30, -50, -70, -90, -100], [-20, -30, -50, -70, -80], [-20, -30, -50, -70, -80, -100], [-20, -30, -50, -70, -80, -90], [-20, -30, -50, -70, -80, -90, -100], [-20, -30, -50, -60], [-20, -30, -50, -60, -100], [-20, -30, -50, -60, -90], [-20, -30, -50, -60, -90, -100], [-20, -30, -50, -60, -80], [-20, -30, -50, -60, -80, -100], [-20, -30, -50, -60, -80, -90], [-20, -30, -50, -60, -80, -90, -100], [-20, -30, -50, -60, -70], [-20, -30, -50, -60, -70, -100], [-20, -30, -50, -60, -70, -90], [-20, -30, -50, -60, -70, -90, -100], [-20, -30, -50, -60, -70, -80], [-20, -30, -50, -60, -70, -80, -100], [-20, -30, -50, -60, -70, -80, -90], [-20, -30, -50, -60, -70, -80, -90, -100], [-20, -30, -40], [-20, -30, -40, -100], [-20, -30, -40, -90], [-20, -30, -40, -90, -100], [-20, -30, -40, -80], [-20, -30, -40, -80, -100], [-20, -30, -40, -80, -90], [-20, -30, -40, -80, -90, -100], [-20, -30, -40, -70], [-20, -30, -40, -70, -100], [-20, -30, -40, -70, -90], [-20, -30, -40, -70, -90, -100], [-20, -30, -40, -70, -80], [-20, -30, -40, -70, -80, -100], [-20, -30, -40, -70, -80, -90], [-20, -30, -40, -70, -80, -90, -100], [-20, -30, -40, -60], [-20, -30, -40, -60, -100], [-20, -30, -40, -60, -90], [-20, -30, -40, -60, -90, -100], [-20, -30, -40, -60, -80], [-20, -30, -40, -60, -80, -100], [-20, -30, -40, -60, -80, -90], [-20, -30, -40, -60, -80, -90, -100], [-20, -30, -40, -60, -70], [-20, -30, -40, -60, -70, -100], [-20, -30, -40, -60, -70, -90], [-20, -30, -40, -60, -70, -90, -100], [-20, -30, -40, -60, -70, -80], [-20, -30, -40, -60, -70, -80, -100], [-20, -30, -40, -60, -70, -80, -90], [-20, -30, -40, -60, -70, -80, -90, -100], [-20, -30, -40, -50], [-20, -30, -40, -50, -100], [-20, -30, -40, -50, -90], [-20, -30, -40, -50, -90, -100], [-20, -30, -40, -50, -80], [-20, -30, -40, -50, -80, -100], [-20, -30, -40, -50, -80, -90], [-20, -30, -40, -50, -80, -90, -100], [-20, -30, -40, -50, -70], [-20, -30, -40, -50, -70, -100], [-20, -30, -40, -50, -70, -90], [-20, -30, -40, -50, -70, -90, -100], [-20, -30, -40, -50, -70, -80], [-20, -30, -40, -50, -70, -80, -100], [-20, -30, -40, -50, -70, -80, -90], [-20, -30, -40, -50, -70, -80, -90, -100], [-20, -30, -40, -50, -60], [-20, -30, -40, -50, -60, -100], [-20, -30, -40, -50, -60, -90], [-20, -30, -40, -50, -60, -90, -100], [-20, -30, -40, -50, -60, -80], [-20, -30, -40, -50, -60, -80, -100], [-20, -30, -40, -50, -60, -80, -90], [-20, -30, -40, -50, -60, -80, -90, -100], [-20, -30, -40, -50, -60, -70], [-20, -30, -40, -50, -60, -70, -100], [-20, -30, -40, -50, -60, -70, -90], [-20, -30, -40, -50, -60, -70, -90, -100], [-20, -30, -40, -50, -60, -70, -80], [-20, -30, -40, -50, -60, -70, -80, -100], [-20, -30, -40, -50, -60, -70, -80, -90], [-20, -30, -40, -50, -60, -70, -80, -90, -100], [-10], [-10, -100], [-10, -90], [-10, -90, -100], [-10, -80], [-10, -80, -100], [-10, -80, -90], [-10, -80, -90, -100], [-10, -70], [-10, -70, -100], [-10, -70, -90], [-10, -70, -90, -100], [-10, -70, -80], [-10, -70, -80, -100], [-10, -70, -80, -90], [-10, -70, -80, -90, -100], [-10, -60], [-10, -60, -100], [-10, -60, -90], [-10, -60, -90, -100], [-10, -60, -80], [-10, -60, -80, -100], [-10, -60, -80, -90], [-10, -60, -80, -90, -100], [-10, -60, -70], [-10, -60, -70, -100], [-10, -60, -70, -90], [-10, -60, -70, -90, -100], [-10, -60, -70, -80], [-10, -60, -70, -80, -100], [-10, -60, -70, -80, -90], [-10, -60, -70, -80, -90, -100], [-10, -50], [-10, -50, -100], [-10, -50, -90], [-10, -50, -90, -100], [-10, -50, -80], [-10, -50, -80, -100], [-10, -50, -80, -90], [-10, -50, -80, -90, -100], [-10, -50, -70], [-10, -50, -70, -100], [-10, -50, -70, -90], [-10, -50, -70, -90, -100], [-10, -50, -70, -80], [-10, -50, -70, -80, -100], [-10, -50, -70, -80, -90], [-10, -50, -70, -80, -90, -100], [-10, -50, -60], [-10, -50, -60, -100], [-10, -50, -60, -90], [-10, -50, -60, -90, -100], [-10, -50, -60, -80], [-10, -50, -60, -80, -100], [-10, -50, -60, -80, -90], [-10, -50, -60, -80, -90, -100], [-10, -50, -60, -70], [-10, -50, -60, -70, -100], [-10, -50, -60, -70, -90], [-10, -50, -60, -70, -90, -100], [-10, -50, -60, -70, -80], [-10, -50, -60, -70, -80, -100], [-10, -50, -60, -70, -80, -90], [-10, -50, -60, -70, -80, -90, -100], [-10, -40], [-10, -40, -100], [-10, -40, -90], [-10, -40, -90, -100], [-10, -40, -80], [-10, -40, -80, -100], [-10, -40, -80, -90], [-10, -40, -80, -90, -100], [-10, -40, -70], [-10, -40, -70, -100], [-10, -40, -70, -90], [-10, -40, -70, -90, -100], [-10, -40, -70, -80], [-10, -40, -70, -80, -100], [-10, -40, -70, -80, -90], [-10, -40, -70, -80, -90, -100], [-10, -40, -60], [-10, -40, -60, -100], [-10, -40, -60, -90], [-10, -40, -60, -90, -100], [-10, -40, -60, -80], [-10, -40, -60, -80, -100], [-10, -40, -60, -80, -90], [-10, -40, -60, -80, -90, -100], [-10, -40, -60, -70], [-10, -40, -60, -70, -100], [-10, -40, -60, -70, -90], [-10, -40, -60, -70, -90, -100], [-10, -40, -60, -70, -80], [-10, -40, -60, -70, -80, -100], [-10, -40, -60, -70, -80, -90], [-10, -40, -60, -70, -80, -90, -100], [-10, -40, -50], [-10, -40, -50, -100], [-10, -40, -50, -90], [-10, -40, -50, -90, -100], [-10, -40, -50, -80], [-10, -40, -50, -80, -100], [-10, -40, -50, -80, -90], [-10, -40, -50, -80, -90, -100], [-10, -40, -50, -70], [-10, -40, -50, -70, -100], [-10, -40, -50, -70, -90], [-10, -40, -50, -70, -90, -100], [-10, -40, -50, -70, -80], [-10, -40, -50, -70, -80, -100], [-10, -40, -50, -70, -80, -90], [-10, -40, -50, -70, -80, -90, -100], [-10, -40, -50, -60], [-10, -40, -50, -60, -100], [-10, -40, -50, -60, -90], [-10, -40, -50, -60, -90, -100], [-10, -40, -50, -60, -80], [-10, -40, -50, -60, -80, -100], [-10, -40, -50, -60, -80, -90], [-10, -40, -50, -60, -80, -90, -100], [-10, -40, -50, -60, -70], [-10, -40, -50, -60, -70, -100], [-10, -40, -50, -60, -70, -90], [-10, -40, -50, -60, -70, -90, -100], [-10, -40, -50, -60, -70, -80], [-10, -40, -50, -60, -70, -80, -100], [-10, -40, -50, -60, -70, -80, -90], [-10, -40, -50, -60, -70, -80, -90, -100], [-10, -30], [-10, -30, -100], [-10, -30, -90], [-10, -30, -90, -100], [-10, -30, -80], [-10, -30, -80, -100], [-10, -30, -80, -90], [-10, -30, -80, -90, -100], [-10, -30, -70], [-10, -30, -70, -100], [-10, -30, -70, -90], [-10, -30, -70, -90, -100], [-10, -30, -70, -80], [-10, -30, -70, -80, -100], [-10, -30, -70, -80, -90], [-10, -30, -70, -80, -90, -100], [-10, -30, -60], [-10, -30, -60, -100], [-10, -30, -60, -90], [-10, -30, -60, -90, -100], [-10, -30, -60, -80], [-10, -30, -60, -80, -100], [-10, -30, -60, -80, -90], [-10, -30, -60, -80, -90, -100], [-10, -30, -60, -70], [-10, -30, -60, -70, -100], [-10, -30, -60, -70, -90], [-10, -30, -60, -70, -90, -100], [-10, -30, -60, -70, -80], [-10, -30, -60, -70, -80, -100], [-10, -30, -60, -70, -80, -90], [-10, -30, -60, -70, -80, -90, -100], [-10, -30, -50], [-10, -30, -50, -100], [-10, -30, -50, -90], [-10, -30, -50, -90, -100], [-10, -30, -50, -80], [-10, -30, -50, -80, -100], [-10, -30, -50, -80, -90], [-10, -30, -50, -80, -90, -100], [-10, -30, -50, -70], [-10, -30, -50, -70, -100], [-10, -30, -50, -70, -90], [-10, -30, -50, -70, -90, -100], [-10, -30, -50, -70, -80], [-10, -30, -50, -70, -80, -100], [-10, -30, -50, -70, -80, -90], [-10, -30, -50, -70, -80, -90, -100], [-10, -30, -50, -60], [-10, -30, -50, -60, -100], [-10, -30, -50, -60, -90], [-10, -30, -50, -60, -90, -100], [-10, -30, -50, -60, -80], [-10, -30, -50, -60, -80, -100], [-10, -30, -50, -60, -80, -90], [-10, -30, -50, -60, -80, -90, -100], [-10, -30, -50, -60, -70], [-10, -30, -50, -60, -70, -100], [-10, -30, -50, -60, -70, -90], [-10, -30, -50, -60, -70, -90, -100], [-10, -30, -50, -60, -70, -80], [-10, -30, -50, -60, -70, -80, -100], [-10, -30, -50, -60, -70, -80, -90], [-10, -30, -50, -60, -70, -80, -90, -100], [-10, -30, -40], [-10, -30, -40, -100], [-10, -30, -40, -90], [-10, -30, -40, -90, -100], [-10, -30, -40, -80], [-10, -30, -40, -80, -100], [-10, -30, -40, -80, -90], [-10, -30, -40, -80, -90, -100], [-10, -30, -40, -70], [-10, -30, -40, -70, -100], [-10, -30, -40, -70, -90], [-10, -30, -40, -70, -90, -100], [-10, -30, -40, -70, -80], [-10, -30, -40, -70, -80, -100], [-10, -30, -40, -70, -80, -90], [-10, -30, -40, -70, -80, -90, -100], [-10, -30, -40, -60], [-10, -30, -40, -60, -100], [-10, -30, -40, -60, -90], [-10, -30, -40, -60, -90, -100], [-10, -30, -40, -60, -80], [-10, -30, -40, -60, -80, -100], [-10, -30, -40, -60, -80, -90], [-10, -30, -40, -60, -80, -90, -100], [-10, -30, -40, -60, -70], [-10, -30, -40, -60, -70, -100], [-10, -30, -40, -60, -70, -90], [-10, -30, -40, -60, -70, -90, -100], [-10, -30, -40, -60, -70, -80], [-10, -30, -40, -60, -70, -80, -100], [-10, -30, -40, -60, -70, -80, -90], [-10, -30, -40, -60, -70, -80, -90, -100], [-10, -30, -40, -50], [-10, -30, -40, -50, -100], [-10, -30, -40, -50, -90], [-10, -30, -40, -50, -90, -100], [-10, -30, -40, -50, -80], [-10, -30, -40, -50, -80, -100], [-10, -30, -40, -50, -80, -90], [-10, -30, -40, -50, -80, -90, -100], [-10, -30, -40, -50, -70], [-10, -30, -40, -50, -70, -100], [-10, -30, -40, -50, -70, -90], [-10, -30, -40, -50, -70, -90, -100], [-10, -30, -40, -50, -70, -80], [-10, -30, -40, -50, -70, -80, -100], [-10, -30, -40, -50, -70, -80, -90], [-10, -30, -40, -50, -70, -80, -90, -100], [-10, -30, -40, -50, -60], [-10, -30, -40, -50, -60, -100], [-10, -30, -40, -50, -60, -90], [-10, -30, -40, -50, -60, -90, -100], [-10, -30, -40, -50, -60, -80], [-10, -30, -40, -50, -60, -80, -100], [-10, -30, -40, -50, -60, -80, -90], [-10, -30, -40, -50, -60, -80, -90, -100], [-10, -30, -40, -50, -60, -70], [-10, -30, -40, -50, -60, -70, -100], [-10, -30, -40, -50, -60, -70, -90], [-10, -30, -40, -50, -60, -70, -90, -100], [-10, -30, -40, -50, -60, -70, -80], [-10, -30, -40, -50, -60, -70, -80, -100], [-10, -30, -40, -50, -60, -70, -80, -90], [-10, -30, -40, -50, -60, -70, -80, -90, -100], [-10, -20], [-10, -20, -100], [-10, -20, -90], [-10, -20, -90, -100], [-10, -20, -80], [-10, -20, -80, -100], [-10, -20, -80, -90], [-10, -20, -80, -90, -100], [-10, -20, -70], [-10, -20, -70, -100], [-10, -20, -70, -90], [-10, -20, -70, -90, -100], [-10, -20, -70, -80], [-10, -20, -70, -80, -100], [-10, -20, -70, -80, -90], [-10, -20, -70, -80, -90, -100], [-10, -20, -60], [-10, -20, -60, -100], [-10, -20, -60, -90], [-10, -20, -60, -90, -100], [-10, -20, -60, -80], [-10, -20, -60, -80, -100], [-10, -20, -60, -80, -90], [-10, -20, -60, -80, -90, -100], [-10, -20, -60, -70], [-10, -20, -60, -70, -100], [-10, -20, -60, -70, -90], [-10, -20, -60, -70, -90, -100], [-10, -20, -60, -70, -80], [-10, -20, -60, -70, -80, -100], [-10, -20, -60, -70, -80, -90], [-10, -20, -60, -70, -80, -90, -100], [-10, -20, -50], [-10, -20, -50, -100], [-10, -20, -50, -90], [-10, -20, -50, -90, -100], [-10, -20, -50, -80], [-10, -20, -50, -80, -100], [-10, -20, -50, -80, -90], [-10, -20, -50, -80, -90, -100], [-10, -20, -50, -70], [-10, -20, -50, -70, -100], [-10, -20, -50, -70, -90], [-10, -20, -50, -70, -90, -100], [-10, -20, -50, -70, -80], [-10, -20, -50, -70, -80, -100], [-10, -20, -50, -70, -80, -90], [-10, -20, -50, -70, -80, -90, -100], [-10, -20, -50, -60], [-10, -20, -50, -60, -100], [-10, -20, -50, -60, -90], [-10, -20, -50, -60, -90, -100], [-10, -20, -50, -60, -80], [-10, -20, -50, -60, -80, -100], [-10, -20, -50, -60, -80, -90], [-10, -20, -50, -60, -80, -90, -100], [-10, -20, -50, -60, -70], [-10, -20, -50, -60, -70, -100], [-10, -20, -50, -60, -70, -90], [-10, -20, -50, -60, -70, -90, -100], [-10, -20, -50, -60, -70, -80], [-10, -20, -50, -60, -70, -80, -100], [-10, -20, -50, -60, -70, -80, -90], [-10, -20, -50, -60, -70, -80, -90, -100], [-10, -20, -40], [-10, -20, -40, -100], [-10, -20, -40, -90], [-10, -20, -40, -90, -100], [-10, -20, -40, -80], [-10, -20, -40, -80, -100], [-10, -20, -40, -80, -90], [-10, -20, -40, -80, -90, -100], [-10, -20, -40, -70], [-10, -20, -40, -70, -100], [-10, -20, -40, -70, -90], [-10, -20, -40, -70, -90, -100], [-10, -20, -40, -70, -80], [-10, -20, -40, -70, -80, -100], [-10, -20, -40, -70, -80, -90], [-10, -20, -40, -70, -80, -90, -100], [-10, -20, -40, -60], [-10, -20, -40, -60, -100], [-10, -20, -40, -60, -90], [-10, -20, -40, -60, -90, -100], [-10, -20, -40, -60, -80], [-10, -20, -40, -60, -80, -100], [-10, -20, -40, -60, -80, -90], [-10, -20, -40, -60, -80, -90, -100], [-10, -20, -40, -60, -70], [-10, -20, -40, -60, -70, -100], [-10, -20, -40, -60, -70, -90], [-10, -20, -40, -60, -70, -90, -100], [-10, -20, -40, -60, -70, -80], [-10, -20, -40, -60, -70, -80, -100], [-10, -20, -40, -60, -70, -80, -90], [-10, -20, -40, -60, -70, -80, -90, -100], [-10, -20, -40, -50], [-10, -20, -40, -50, -100], [-10, -20, -40, -50, -90], [-10, -20, -40, -50, -90, -100], [-10, -20, -40, -50, -80], [-10, -20, -40, -50, -80, -100], [-10, -20, -40, -50, -80, -90], [-10, -20, -40, -50, -80, -90, -100], [-10, -20, -40, -50, -70], [-10, -20, -40, -50, -70, -100], [-10, -20, -40, -50, -70, -90], [-10, -20, -40, -50, -70, -90, -100], [-10, -20, -40, -50, -70, -80], [-10, -20, -40, -50, -70, -80, -100], [-10, -20, -40, -50, -70, -80, -90], [-10, -20, -40, -50, -70, -80, -90, -100], [-10, -20, -40, -50, -60], [-10, -20, -40, -50, -60, -100], [-10, -20, -40, -50, -60, -90], [-10, -20, -40, -50, -60, -90, -100], [-10, -20, -40, -50, -60, -80], [-10, -20, -40, -50, -60, -80, -100], [-10, -20, -40, -50, -60, -80, -90], [-10, -20, -40, -50, -60, -80, -90, -100], [-10, -20, -40, -50, -60, -70], [-10, -20, -40, -50, -60, -70, -100], [-10, -20, -40, -50, -60, -70, -90], [-10, -20, -40, -50, -60, -70, -90, -100], [-10, -20, -40, -50, -60, -70, -80], [-10, -20, -40, -50, -60, -70, -80, -100], [-10, -20, -40, -50, -60, -70, -80, -90], [-10, -20, -40, -50, -60, -70, -80, -90, -100], [-10, -20, -30], [-10, -20, -30, -100], [-10, -20, -30, -90], [-10, -20, -30, -90, -100], [-10, -20, -30, -80], [-10, -20, -30, -80, -100], [-10, -20, -30, -80, -90], [-10, -20, -30, -80, -90, -100], [-10, -20, -30, -70], [-10, -20, -30, -70, -100], [-10, -20, -30, -70, -90], [-10, -20, -30, -70, -90, -100], [-10, -20, -30, -70, -80], [-10, -20, -30, -70, -80, -100], [-10, -20, -30, -70, -80, -90], [-10, -20, -30, -70, -80, -90, -100], [-10, -20, -30, -60], [-10, -20, -30, -60, -100], [-10, -20, -30, -60, -90], [-10, -20, -30, -60, -90, -100], [-10, -20, -30, -60, -80], [-10, -20, -30, -60, -80, -100], [-10, -20, -30, -60, -80, -90], [-10, -20, -30, -60, -80, -90, -100], [-10, -20, -30, -60, -70], [-10, -20, -30, -60, -70, -100], [-10, -20, -30, -60, -70, -90], [-10, -20, -30, -60, -70, -90, -100], [-10, -20, -30, -60, -70, -80], [-10, -20, -30, -60, -70, -80, -100], [-10, -20, -30, -60, -70, -80, -90], [-10, -20, -30, -60, -70, -80, -90, -100], [-10, -20, -30, -50], [-10, -20, -30, -50, -100], [-10, -20, -30, -50, -90], [-10, -20, -30, -50, -90, -100], [-10, -20, -30, -50, -80], [-10, -20, -30, -50, -80, -100], [-10, -20, -30, -50, -80, -90], [-10, -20, -30, -50, -80, -90, -100], [-10, -20, -30, -50, -70], [-10, -20, -30, -50, -70, -100], [-10, -20, -30, -50, -70, -90], [-10, -20, -30, -50, -70, -90, -100], [-10, -20, -30, -50, -70, -80], [-10, -20, -30, -50, -70, -80, -100], [-10, -20, -30, -50, -70, -80, -90], [-10, -20, -30, -50, -70, -80, -90, -100], [-10, -20, -30, -50, -60], [-10, -20, -30, -50, -60, -100], [-10, -20, -30, -50, -60, -90], [-10, -20, -30, -50, -60, -90, -100], [-10, -20, -30, -50, -60, -80], [-10, -20, -30, -50, -60, -80, -100], [-10, -20, -30, -50, -60, -80, -90], [-10, -20, -30, -50, -60, -80, -90, -100], [-10, -20, -30, -50, -60, -70], [-10, -20, -30, -50, -60, -70, -100], [-10, -20, -30, -50, -60, -70, -90], [-10, -20, -30, -50, -60, -70, -90, -100], [-10, -20, -30, -50, -60, -70, -80], [-10, -20, -30, -50, -60, -70, -80, -100], [-10, -20, -30, -50, -60, -70, -80, -90], [-10, -20, -30, -50, -60, -70, -80, -90, -100], [-10, -20, -30, -40], [-10, -20, -30, -40, -100], [-10, -20, -30, -40, -90], [-10, -20, -30, -40, -90, -100], [-10, -20, -30, -40, -80], [-10, -20, -30, -40, -80, -100], [-10, -20, -30, -40, -80, -90], [-10, -20, -30, -40, -80, -90, -100], [-10, -20, -30, -40, -70], [-10, -20, -30, -40, -70, -100], [-10, -20, -30, -40, -70, -90], [-10, -20, -30, -40, -70, -90, -100], [-10, -20, -30, -40, -70, -80], [-10, -20, -30, -40, -70, -80, -100], [-10, -20, -30, -40, -70, -80, -90], [-10, -20, -30, -40, -70, -80, -90, -100], [-10, -20, -30, -40, -60], [-10, -20, -30, -40, -60, -100], [-10, -20, -30, -40, -60, -90], [-10, -20, -30, -40, -60, -90, -100], [-10, -20, -30, -40, -60, -80], [-10, -20, -30, -40, -60, -80, -100], [-10, -20, -30, -40, -60, -80, -90], [-10, -20, -30, -40, -60, -80, -90, -100], [-10, -20, -30, -40, -60, -70], [-10, -20, -30, -40, -60, -70, -100], [-10, -20, -30, -40, -60, -70, -90], [-10, -20, -30, -40, -60, -70, -90, -100], [-10, -20, -30, -40, -60, -70, -80], [-10, -20, -30, -40, -60, -70, -80, -100], [-10, -20, -30, -40, -60, -70, -80, -90], [-10, -20, -30, -40, -60, -70, -80, -90, -100], [-10, -20, -30, -40, -50], [-10, -20, -30, -40, -50, -100], [-10, -20, -30, -40, -50, -90], [-10, -20, -30, -40, -50, -90, -100], [-10, -20, -30, -40, -50, -80], [-10, -20, -30, -40, -50, -80, -100], [-10, -20, -30, -40, -50, -80, -90], [-10, -20, -30, -40, -50, -80, -90, -100], [-10, -20, -30, -40, -50, -70], [-10, -20, -30, -40, -50, -70, -100], [-10, -20, -30, -40, -50, -70, -90], [-10, -20, -30, -40, -50, -70, -90, -100], [-10, -20, -30, -40, -50, -70, -80], [-10, -20, -30, -40, -50, -70, -80, -100], [-10, -20, -30, -40, -50, -70, -80, -90], [-10, -20, -30, -40, -50, -70, -80, -90, -100], [-10, -20, -30, -40, -50, -60], [-10, -20, -30, -40, -50, -60, -100], [-10, -20, -30, -40, -50, -60, -90], [-10, -20, -30, -40, -50, -60, -90, -100], [-10, -20, -30, -40, -50, -60, -80], [-10, -20, -30, -40, -50, -60, -80, -100], [-10, -20, -30, -40, -50, -60, -80, -90], [-10, -20, -30, -40, -50, -60, -80, -90, -100], [-10, -20, -30, -40, -50, -60, -70], [-10, -20, -30, -40, -50, -60, -70, -100], [-10, -20, -30, -40, -50, -60, -70, -90], [-10, -20, -30, -40, -50, -60, -70, -90, -100], [-10, -20, -30, -40, -50, -60, -70, -80], [-10, -20, -30, -40, -50, -60, -70, -80, -100], [-10, -20, -30, -40, -50, -60, -70, -80, -90], [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100]]\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14]) == [[], [14], [12], [12, 14], [10], [10, 14], [10, 12], [10, 12, 14], [8], [8, 14], [8, 12], [8, 12, 14], [8, 10], [8, 10, 14], [8, 10, 12], [8, 10, 12, 14], [6], [6, 14], [6, 12], [6, 12, 14], [6, 10], [6, 10, 14], [6, 10, 12], [6, 10, 12, 14], [6, 8], [6, 8, 14], [6, 8, 12], [6, 8, 12, 14], [6, 8, 10], [6, 8, 10, 14], [6, 8, 10, 12], [6, 8, 10, 12, 14], [4], [4, 14], [4, 12], [4, 12, 14], [4, 10], [4, 10, 14], [4, 10, 12], [4, 10, 12, 14], [4, 8], [4, 8, 14], [4, 8, 12], [4, 8, 12, 14], [4, 8, 10], [4, 8, 10, 14], [4, 8, 10, 12], [4, 8, 10, 12, 14], [4, 6], [4, 6, 14], [4, 6, 12], [4, 6, 12, 14], [4, 6, 10], [4, 6, 10, 14], [4, 6, 10, 12], [4, 6, 10, 12, 14], [4, 6, 8], [4, 6, 8, 14], [4, 6, 8, 12], [4, 6, 8, 12, 14], [4, 6, 8, 10], [4, 6, 8, 10, 14], [4, 6, 8, 10, 12], [4, 6, 8, 10, 12, 14], [2], [2, 14], [2, 12], [2, 12, 14], [2, 10], [2, 10, 14], [2, 10, 12], [2, 10, 12, 14], [2, 8], [2, 8, 14], [2, 8, 12], [2, 8, 12, 14], [2, 8, 10], [2, 8, 10, 14], [2, 8, 10, 12], [2, 8, 10, 12, 14], [2, 6], [2, 6, 14], [2, 6, 12], [2, 6, 12, 14], [2, 6, 10], [2, 6, 10, 14], [2, 6, 10, 12], [2, 6, 10, 12, 14], [2, 6, 8], [2, 6, 8, 14], [2, 6, 8, 12], [2, 6, 8, 12, 14], [2, 6, 8, 10], [2, 6, 8, 10, 14], [2, 6, 8, 10, 12], [2, 6, 8, 10, 12, 14], [2, 4], [2, 4, 14], [2, 4, 12], [2, 4, 12, 14], [2, 4, 10], [2, 4, 10, 14], [2, 4, 10, 12], [2, 4, 10, 12, 14], [2, 4, 8], [2, 4, 8, 14], [2, 4, 8, 12], [2, 4, 8, 12, 14], [2, 4, 8, 10], [2, 4, 8, 10, 14], [2, 4, 8, 10, 12], [2, 4, 8, 10, 12, 14], [2, 4, 6], [2, 4, 6, 14], [2, 4, 6, 12], [2, 4, 6, 12, 14], [2, 4, 6, 10], [2, 4, 6, 10, 14], [2, 4, 6, 10, 12], [2, 4, 6, 10, 12, 14], [2, 4, 6, 8], [2, 4, 6, 8, 14], [2, 4, 6, 8, 12], [2, 4, 6, 8, 12, 14], [2, 4, 6, 8, 10], [2, 4, 6, 8, 10, 14], [2, 4, 6, 8, 10, 12], [2, 4, 6, 8, 10, 12, 14]]\n assert 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 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 candidate(nums = [1, 100, 1000, 10000, 100000, 1000000]) == [[], [1000000], [100000], [100000, 1000000], [10000], [10000, 1000000], [10000, 100000], [10000, 100000, 1000000], [1000], [1000, 1000000], [1000, 100000], [1000, 100000, 1000000], [1000, 10000], [1000, 10000, 1000000], [1000, 10000, 100000], [1000, 10000, 100000, 1000000], [100], [100, 1000000], [100, 100000], [100, 100000, 1000000], [100, 10000], [100, 10000, 1000000], [100, 10000, 100000], [100, 10000, 100000, 1000000], [100, 1000], [100, 1000, 1000000], [100, 1000, 100000], [100, 1000, 100000, 1000000], [100, 1000, 10000], [100, 1000, 10000, 1000000], [100, 1000, 10000, 100000], [100, 1000, 10000, 100000, 1000000], [1], [1, 1000000], [1, 100000], [1, 100000, 1000000], [1, 10000], [1, 10000, 1000000], [1, 10000, 100000], [1, 10000, 100000, 1000000], [1, 1000], [1, 1000, 1000000], [1, 1000, 100000], [1, 1000, 100000, 1000000], [1, 1000, 10000], [1, 1000, 10000, 1000000], [1, 1000, 10000, 100000], [1, 1000, 10000, 100000, 1000000], [1, 100], [1, 100, 1000000], [1, 100, 100000], [1, 100, 100000, 1000000], [1, 100, 10000], [1, 100, 10000, 1000000], [1, 100, 10000, 100000], [1, 100, 10000, 100000, 1000000], [1, 100, 1000], [1, 100, 1000, 1000000], [1, 100, 1000, 100000], [1, 100, 1000, 100000, 1000000], [1, 100, 1000, 10000], [1, 100, 1000, 10000, 1000000], [1, 100, 1000, 10000, 100000], [1, 100, 1000, 10000, 100000, 1000000]]\n assert 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 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 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 assert candidate(nums = [1, 3, 5, 7, 9, 11]) == [[], [11], [9], [9, 11], [7], [7, 11], [7, 9], [7, 9, 11], [5], [5, 11], [5, 9], [5, 9, 11], [5, 7], [5, 7, 11], [5, 7, 9], [5, 7, 9, 11], [3], [3, 11], [3, 9], [3, 9, 11], [3, 7], [3, 7, 11], [3, 7, 9], [3, 7, 9, 11], [3, 5], [3, 5, 11], [3, 5, 9], [3, 5, 9, 11], [3, 5, 7], [3, 5, 7, 11], [3, 5, 7, 9], [3, 5, 7, 9, 11], [1], [1, 11], [1, 9], [1, 9, 11], [1, 7], [1, 7, 11], [1, 7, 9], [1, 7, 9, 11], [1, 5], [1, 5, 11], [1, 5, 9], [1, 5, 9, 11], [1, 5, 7], [1, 5, 7, 11], [1, 5, 7, 9], [1, 5, 7, 9, 11], [1, 3], [1, 3, 11], [1, 3, 9], [1, 3, 9, 11], [1, 3, 7], [1, 3, 7, 11], [1, 3, 7, 9], [1, 3, 7, 9, 11], [1, 3, 5], [1, 3, 5, 11], [1, 3, 5, 9], [1, 3, 5, 9, 11], [1, 3, 5, 7], [1, 3, 5, 7, 11], [1, 3, 5, 7, 9], [1, 3, 5, 7, 9, 11]]\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81]) == [[], [81], [64], [64, 81], [49], [49, 81], [49, 64], [49, 64, 81], [36], [36, 81], [36, 64], [36, 64, 81], [36, 49], [36, 49, 81], [36, 49, 64], [36, 49, 64, 81], [25], [25, 81], [25, 64], [25, 64, 81], [25, 49], [25, 49, 81], [25, 49, 64], [25, 49, 64, 81], [25, 36], [25, 36, 81], [25, 36, 64], [25, 36, 64, 81], [25, 36, 49], [25, 36, 49, 81], [25, 36, 49, 64], [25, 36, 49, 64, 81], [16], [16, 81], [16, 64], [16, 64, 81], [16, 49], [16, 49, 81], [16, 49, 64], [16, 49, 64, 81], [16, 36], [16, 36, 81], [16, 36, 64], [16, 36, 64, 81], [16, 36, 49], [16, 36, 49, 81], [16, 36, 49, 64], [16, 36, 49, 64, 81], [16, 25], [16, 25, 81], [16, 25, 64], [16, 25, 64, 81], [16, 25, 49], [16, 25, 49, 81], [16, 25, 49, 64], [16, 25, 49, 64, 81], [16, 25, 36], [16, 25, 36, 81], [16, 25, 36, 64], [16, 25, 36, 64, 81], [16, 25, 36, 49], [16, 25, 36, 49, 81], [16, 25, 36, 49, 64], [16, 25, 36, 49, 64, 81], [9], [9, 81], [9, 64], [9, 64, 81], [9, 49], [9, 49, 81], [9, 49, 64], [9, 49, 64, 81], [9, 36], [9, 36, 81], [9, 36, 64], [9, 36, 64, 81], [9, 36, 49], [9, 36, 49, 81], [9, 36, 49, 64], [9, 36, 49, 64, 81], [9, 25], [9, 25, 81], [9, 25, 64], [9, 25, 64, 81], [9, 25, 49], [9, 25, 49, 81], [9, 25, 49, 64], [9, 25, 49, 64, 81], [9, 25, 36], [9, 25, 36, 81], [9, 25, 36, 64], [9, 25, 36, 64, 81], [9, 25, 36, 49], [9, 25, 36, 49, 81], [9, 25, 36, 49, 64], [9, 25, 36, 49, 64, 81], [9, 16], [9, 16, 81], [9, 16, 64], [9, 16, 64, 81], [9, 16, 49], [9, 16, 49, 81], [9, 16, 49, 64], [9, 16, 49, 64, 81], [9, 16, 36], [9, 16, 36, 81], [9, 16, 36, 64], [9, 16, 36, 64, 81], [9, 16, 36, 49], [9, 16, 36, 49, 81], [9, 16, 36, 49, 64], [9, 16, 36, 49, 64, 81], [9, 16, 25], [9, 16, 25, 81], [9, 16, 25, 64], [9, 16, 25, 64, 81], [9, 16, 25, 49], [9, 16, 25, 49, 81], [9, 16, 25, 49, 64], [9, 16, 25, 49, 64, 81], [9, 16, 25, 36], [9, 16, 25, 36, 81], [9, 16, 25, 36, 64], [9, 16, 25, 36, 64, 81], [9, 16, 25, 36, 49], [9, 16, 25, 36, 49, 81], [9, 16, 25, 36, 49, 64], [9, 16, 25, 36, 49, 64, 81], [4], [4, 81], [4, 64], [4, 64, 81], [4, 49], [4, 49, 81], [4, 49, 64], [4, 49, 64, 81], [4, 36], [4, 36, 81], [4, 36, 64], [4, 36, 64, 81], [4, 36, 49], [4, 36, 49, 81], [4, 36, 49, 64], [4, 36, 49, 64, 81], [4, 25], [4, 25, 81], [4, 25, 64], [4, 25, 64, 81], [4, 25, 49], [4, 25, 49, 81], [4, 25, 49, 64], [4, 25, 49, 64, 81], [4, 25, 36], [4, 25, 36, 81], [4, 25, 36, 64], [4, 25, 36, 64, 81], [4, 25, 36, 49], [4, 25, 36, 49, 81], [4, 25, 36, 49, 64], [4, 25, 36, 49, 64, 81], [4, 16], [4, 16, 81], [4, 16, 64], [4, 16, 64, 81], [4, 16, 49], [4, 16, 49, 81], [4, 16, 49, 64], [4, 16, 49, 64, 81], [4, 16, 36], [4, 16, 36, 81], [4, 16, 36, 64], [4, 16, 36, 64, 81], [4, 16, 36, 49], [4, 16, 36, 49, 81], [4, 16, 36, 49, 64], [4, 16, 36, 49, 64, 81], [4, 16, 25], [4, 16, 25, 81], [4, 16, 25, 64], [4, 16, 25, 64, 81], [4, 16, 25, 49], [4, 16, 25, 49, 81], [4, 16, 25, 49, 64], [4, 16, 25, 49, 64, 81], [4, 16, 25, 36], [4, 16, 25, 36, 81], [4, 16, 25, 36, 64], [4, 16, 25, 36, 64, 81], [4, 16, 25, 36, 49], [4, 16, 25, 36, 49, 81], [4, 16, 25, 36, 49, 64], [4, 16, 25, 36, 49, 64, 81], [4, 9], [4, 9, 81], [4, 9, 64], [4, 9, 64, 81], [4, 9, 49], [4, 9, 49, 81], [4, 9, 49, 64], [4, 9, 49, 64, 81], [4, 9, 36], [4, 9, 36, 81], [4, 9, 36, 64], [4, 9, 36, 64, 81], [4, 9, 36, 49], [4, 9, 36, 49, 81], [4, 9, 36, 49, 64], [4, 9, 36, 49, 64, 81], [4, 9, 25], [4, 9, 25, 81], [4, 9, 25, 64], [4, 9, 25, 64, 81], [4, 9, 25, 49], [4, 9, 25, 49, 81], [4, 9, 25, 49, 64], [4, 9, 25, 49, 64, 81], [4, 9, 25, 36], [4, 9, 25, 36, 81], [4, 9, 25, 36, 64], [4, 9, 25, 36, 64, 81], [4, 9, 25, 36, 49], [4, 9, 25, 36, 49, 81], [4, 9, 25, 36, 49, 64], [4, 9, 25, 36, 49, 64, 81], [4, 9, 16], [4, 9, 16, 81], [4, 9, 16, 64], [4, 9, 16, 64, 81], [4, 9, 16, 49], [4, 9, 16, 49, 81], [4, 9, 16, 49, 64], [4, 9, 16, 49, 64, 81], [4, 9, 16, 36], [4, 9, 16, 36, 81], [4, 9, 16, 36, 64], [4, 9, 16, 36, 64, 81], [4, 9, 16, 36, 49], [4, 9, 16, 36, 49, 81], [4, 9, 16, 36, 49, 64], [4, 9, 16, 36, 49, 64, 81], [4, 9, 16, 25], [4, 9, 16, 25, 81], [4, 9, 16, 25, 64], [4, 9, 16, 25, 64, 81], [4, 9, 16, 25, 49], [4, 9, 16, 25, 49, 81], [4, 9, 16, 25, 49, 64], [4, 9, 16, 25, 49, 64, 81], [4, 9, 16, 25, 36], [4, 9, 16, 25, 36, 81], [4, 9, 16, 25, 36, 64], [4, 9, 16, 25, 36, 64, 81], [4, 9, 16, 25, 36, 49], [4, 9, 16, 25, 36, 49, 81], [4, 9, 16, 25, 36, 49, 64], [4, 9, 16, 25, 36, 49, 64, 81], [1], [1, 81], [1, 64], [1, 64, 81], [1, 49], [1, 49, 81], [1, 49, 64], [1, 49, 64, 81], [1, 36], [1, 36, 81], [1, 36, 64], [1, 36, 64, 81], [1, 36, 49], [1, 36, 49, 81], [1, 36, 49, 64], [1, 36, 49, 64, 81], [1, 25], [1, 25, 81], [1, 25, 64], [1, 25, 64, 81], [1, 25, 49], [1, 25, 49, 81], [1, 25, 49, 64], [1, 25, 49, 64, 81], [1, 25, 36], [1, 25, 36, 81], [1, 25, 36, 64], [1, 25, 36, 64, 81], [1, 25, 36, 49], [1, 25, 36, 49, 81], [1, 25, 36, 49, 64], [1, 25, 36, 49, 64, 81], [1, 16], [1, 16, 81], [1, 16, 64], [1, 16, 64, 81], [1, 16, 49], [1, 16, 49, 81], [1, 16, 49, 64], [1, 16, 49, 64, 81], [1, 16, 36], [1, 16, 36, 81], [1, 16, 36, 64], [1, 16, 36, 64, 81], [1, 16, 36, 49], [1, 16, 36, 49, 81], [1, 16, 36, 49, 64], [1, 16, 36, 49, 64, 81], [1, 16, 25], [1, 16, 25, 81], [1, 16, 25, 64], [1, 16, 25, 64, 81], [1, 16, 25, 49], [1, 16, 25, 49, 81], [1, 16, 25, 49, 64], [1, 16, 25, 49, 64, 81], [1, 16, 25, 36], [1, 16, 25, 36, 81], [1, 16, 25, 36, 64], [1, 16, 25, 36, 64, 81], [1, 16, 25, 36, 49], [1, 16, 25, 36, 49, 81], [1, 16, 25, 36, 49, 64], [1, 16, 25, 36, 49, 64, 81], [1, 9], [1, 9, 81], [1, 9, 64], [1, 9, 64, 81], [1, 9, 49], [1, 9, 49, 81], [1, 9, 49, 64], [1, 9, 49, 64, 81], [1, 9, 36], [1, 9, 36, 81], [1, 9, 36, 64], [1, 9, 36, 64, 81], [1, 9, 36, 49], [1, 9, 36, 49, 81], [1, 9, 36, 49, 64], [1, 9, 36, 49, 64, 81], [1, 9, 25], [1, 9, 25, 81], [1, 9, 25, 64], [1, 9, 25, 64, 81], [1, 9, 25, 49], [1, 9, 25, 49, 81], [1, 9, 25, 49, 64], [1, 9, 25, 49, 64, 81], [1, 9, 25, 36], [1, 9, 25, 36, 81], [1, 9, 25, 36, 64], [1, 9, 25, 36, 64, 81], [1, 9, 25, 36, 49], [1, 9, 25, 36, 49, 81], [1, 9, 25, 36, 49, 64], [1, 9, 25, 36, 49, 64, 81], [1, 9, 16], [1, 9, 16, 81], [1, 9, 16, 64], [1, 9, 16, 64, 81], [1, 9, 16, 49], [1, 9, 16, 49, 81], [1, 9, 16, 49, 64], [1, 9, 16, 49, 64, 81], [1, 9, 16, 36], [1, 9, 16, 36, 81], [1, 9, 16, 36, 64], [1, 9, 16, 36, 64, 81], [1, 9, 16, 36, 49], [1, 9, 16, 36, 49, 81], [1, 9, 16, 36, 49, 64], [1, 9, 16, 36, 49, 64, 81], [1, 9, 16, 25], [1, 9, 16, 25, 81], [1, 9, 16, 25, 64], [1, 9, 16, 25, 64, 81], [1, 9, 16, 25, 49], [1, 9, 16, 25, 49, 81], [1, 9, 16, 25, 49, 64], [1, 9, 16, 25, 49, 64, 81], [1, 9, 16, 25, 36], [1, 9, 16, 25, 36, 81], [1, 9, 16, 25, 36, 64], [1, 9, 16, 25, 36, 64, 81], [1, 9, 16, 25, 36, 49], [1, 9, 16, 25, 36, 49, 81], [1, 9, 16, 25, 36, 49, 64], [1, 9, 16, 25, 36, 49, 64, 81], [1, 4], [1, 4, 81], [1, 4, 64], [1, 4, 64, 81], [1, 4, 49], [1, 4, 49, 81], [1, 4, 49, 64], [1, 4, 49, 64, 81], [1, 4, 36], [1, 4, 36, 81], [1, 4, 36, 64], [1, 4, 36, 64, 81], [1, 4, 36, 49], [1, 4, 36, 49, 81], [1, 4, 36, 49, 64], [1, 4, 36, 49, 64, 81], [1, 4, 25], [1, 4, 25, 81], [1, 4, 25, 64], [1, 4, 25, 64, 81], [1, 4, 25, 49], [1, 4, 25, 49, 81], [1, 4, 25, 49, 64], [1, 4, 25, 49, 64, 81], [1, 4, 25, 36], [1, 4, 25, 36, 81], [1, 4, 25, 36, 64], [1, 4, 25, 36, 64, 81], [1, 4, 25, 36, 49], [1, 4, 25, 36, 49, 81], [1, 4, 25, 36, 49, 64], [1, 4, 25, 36, 49, 64, 81], [1, 4, 16], [1, 4, 16, 81], [1, 4, 16, 64], [1, 4, 16, 64, 81], [1, 4, 16, 49], [1, 4, 16, 49, 81], [1, 4, 16, 49, 64], [1, 4, 16, 49, 64, 81], [1, 4, 16, 36], [1, 4, 16, 36, 81], [1, 4, 16, 36, 64], [1, 4, 16, 36, 64, 81], [1, 4, 16, 36, 49], [1, 4, 16, 36, 49, 81], [1, 4, 16, 36, 49, 64], [1, 4, 16, 36, 49, 64, 81], [1, 4, 16, 25], [1, 4, 16, 25, 81], [1, 4, 16, 25, 64], [1, 4, 16, 25, 64, 81], [1, 4, 16, 25, 49], [1, 4, 16, 25, 49, 81], [1, 4, 16, 25, 49, 64], [1, 4, 16, 25, 49, 64, 81], [1, 4, 16, 25, 36], [1, 4, 16, 25, 36, 81], [1, 4, 16, 25, 36, 64], [1, 4, 16, 25, 36, 64, 81], [1, 4, 16, 25, 36, 49], [1, 4, 16, 25, 36, 49, 81], [1, 4, 16, 25, 36, 49, 64], [1, 4, 16, 25, 36, 49, 64, 81], [1, 4, 9], [1, 4, 9, 81], [1, 4, 9, 64], [1, 4, 9, 64, 81], [1, 4, 9, 49], [1, 4, 9, 49, 81], [1, 4, 9, 49, 64], [1, 4, 9, 49, 64, 81], [1, 4, 9, 36], [1, 4, 9, 36, 81], [1, 4, 9, 36, 64], [1, 4, 9, 36, 64, 81], [1, 4, 9, 36, 49], [1, 4, 9, 36, 49, 81], [1, 4, 9, 36, 49, 64], [1, 4, 9, 36, 49, 64, 81], [1, 4, 9, 25], [1, 4, 9, 25, 81], [1, 4, 9, 25, 64], [1, 4, 9, 25, 64, 81], [1, 4, 9, 25, 49], [1, 4, 9, 25, 49, 81], [1, 4, 9, 25, 49, 64], [1, 4, 9, 25, 49, 64, 81], [1, 4, 9, 25, 36], [1, 4, 9, 25, 36, 81], [1, 4, 9, 25, 36, 64], [1, 4, 9, 25, 36, 64, 81], [1, 4, 9, 25, 36, 49], [1, 4, 9, 25, 36, 49, 81], [1, 4, 9, 25, 36, 49, 64], [1, 4, 9, 25, 36, 49, 64, 81], [1, 4, 9, 16], [1, 4, 9, 16, 81], [1, 4, 9, 16, 64], [1, 4, 9, 16, 64, 81], [1, 4, 9, 16, 49], [1, 4, 9, 16, 49, 81], [1, 4, 9, 16, 49, 64], [1, 4, 9, 16, 49, 64, 81], [1, 4, 9, 16, 36], [1, 4, 9, 16, 36, 81], [1, 4, 9, 16, 36, 64], [1, 4, 9, 16, 36, 64, 81], [1, 4, 9, 16, 36, 49], [1, 4, 9, 16, 36, 49, 81], [1, 4, 9, 16, 36, 49, 64], [1, 4, 9, 16, 36, 49, 64, 81], [1, 4, 9, 16, 25], [1, 4, 9, 16, 25, 81], [1, 4, 9, 16, 25, 64], [1, 4, 9, 16, 25, 64, 81], [1, 4, 9, 16, 25, 49], [1, 4, 9, 16, 25, 49, 81], [1, 4, 9, 16, 25, 49, 64], [1, 4, 9, 16, 25, 49, 64, 81], [1, 4, 9, 16, 25, 36], [1, 4, 9, 16, 25, 36, 81], [1, 4, 9, 16, 25, 36, 64], [1, 4, 9, 16, 25, 36, 64, 81], [1, 4, 9, 16, 25, 36, 49], [1, 4, 9, 16, 25, 36, 49, 81], [1, 4, 9, 16, 25, 36, 49, 64], [1, 4, 9, 16, 25, 36, 49, 64, 81]]\n assert candidate(nums = [4, 8, 15, 16, 23, 42]) == [[], [42], [23], [23, 42], [16], [16, 42], [16, 23], [16, 23, 42], [15], [15, 42], [15, 23], [15, 23, 42], [15, 16], [15, 16, 42], [15, 16, 23], [15, 16, 23, 42], [8], [8, 42], [8, 23], [8, 23, 42], [8, 16], [8, 16, 42], [8, 16, 23], [8, 16, 23, 42], [8, 15], [8, 15, 42], [8, 15, 23], [8, 15, 23, 42], [8, 15, 16], [8, 15, 16, 42], [8, 15, 16, 23], [8, 15, 16, 23, 42], [4], [4, 42], [4, 23], [4, 23, 42], [4, 16], [4, 16, 42], [4, 16, 23], [4, 16, 23, 42], [4, 15], [4, 15, 42], [4, 15, 23], [4, 15, 23, 42], [4, 15, 16], [4, 15, 16, 42], [4, 15, 16, 23], [4, 15, 16, 23, 42], [4, 8], [4, 8, 42], [4, 8, 23], [4, 8, 23, 42], [4, 8, 16], [4, 8, 16, 42], [4, 8, 16, 23], [4, 8, 16, 23, 42], [4, 8, 15], [4, 8, 15, 42], [4, 8, 15, 23], [4, 8, 15, 23, 42], [4, 8, 15, 16], [4, 8, 15, 16, 42], [4, 8, 15, 16, 23], [4, 8, 15, 16, 23, 42]]\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().subsets", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> subsets(vector& nums) {", "container": "Solution", "callable": "subsets", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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.\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\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"\nOutput: true\n\nExample 2:\n\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"SEE\"\nOutput: true\n\nExample 3:\n\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCB\"\nOutput: false\n\n \nConstraints:\n\nm == board.length\nn = board[i].length\n1 <= m, n <= 6\n1 <= word.length <= 15\nboard and word consists of only lowercase and uppercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["board", "word"], "leetcode_dataset_entry_point": "Solution().exist", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool exist(vector>& board, string word) {", "container": "Solution", "callable": "exist", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "word", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 80, "task_id": "remove-duplicates-from-sorted-array-ii", "difficulty": "Medium", "problem_description": "Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. The relative order of the elements should be kept the same.\nSince it is impossible to change the length of the array in some languages, you must instead have the result be placed in the first part of the array nums. More formally, if there are k elements after removing the duplicates, then the first k elements of nums should hold the final result. It does not matter what you leave beyond the first k elements.\nReturn k after placing the final result in the first k slots of nums.\nDo not allocate extra space for another array. You must do this by modifying the input array in-place with O(1) extra memory.\nCustom Judge:\nThe judge will test your solution with the following code:\n\nint[] nums = [...]; // Input array\nint[] expectedNums = [...]; // The expected answer with correct length\n\nint k = removeDuplicates(nums); // Calls your implementation\n\nassert k == expectedNums.length;\nfor (int i = 0; i < k; i++) {\n assert nums[i] == expectedNums[i];\n}\n\nIf all assertions pass, then your solution will be accepted.\n \nExample 1:\n\nInput: nums = [1,1,1,2,2,3]\nOutput: 5, nums = [1,1,2,2,3,_]\nExplanation: Your function should return k = 5, with the first five elements of nums being 1, 1, 2, 2 and 3 respectively.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\nExample 2:\n\nInput: nums = [0,0,1,1,1,1,2,3,3]\nOutput: 7, nums = [0,0,1,1,2,3,3,_,_]\nExplanation: Your function should return k = 7, with the first seven elements of nums being 0, 0, 1, 1, 2, 3 and 3 respectively.\nIt does not matter what you leave beyond the returned k (hence they are underscores).\n\n \nConstraints:\n\n1 <= nums.length <= 3 * 104\n-104 <= nums[i] <= 104\nnums is sorted in non-decreasing order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 2\n assert candidate(nums = [1, 1, 1]) == 2\n assert candidate(nums = [1, 1, 1, 1]) == 2\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 3]) == 6\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 3]) == 9\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 4, 4]) == 8\n assert candidate(nums = [1, 1, 1, 2, 2, 3]) == 5\n assert candidate(nums = [0, 0, 1, 1, 1, 1, 2, 3, 3]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5]) == 9\n assert candidate(nums = [1, 1, 2]) == 3\n assert candidate(nums = [-10000, -10000, 10000, 10000, 10000]) == 4\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4]) == 8\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 7, 7, 8, 8, 9]) == 14\n assert candidate(nums = [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3]) == 9\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 7\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 17\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 10\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2]) == 6\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5]) == 10\n assert candidate(nums = [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3]) == 10\n assert candidate(nums = [1, 1]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 18\n assert candidate(nums = [1, 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]) == 23\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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(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, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 20\n assert candidate(nums = [1, 1, 1, 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, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 20\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9]) == 18\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3]) == 10\n assert candidate(nums = [-1, -1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9]) == 22\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2]) == 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, 6, 6, 6, 6, 7, 7, 7, 7]) == 14\n assert candidate(nums = [-100, -100, -99, -99, -98, -98, -98, -97, -97, -96, -96, -95, -95, -95, -95]) == 12\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 17, 18, 19, 20]) == 24\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 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]) == 30\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 12\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 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, 11, 11]) == 22\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 6\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, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 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, 10, 10, 10]) == 20\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6]) == 11\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9]) == 17\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]) == 12\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 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]) == 12\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7]) == 14\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]) == 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]) == 2\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6]) == 11\n assert candidate(nums = [-1, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3]) == 10\n assert candidate(nums = [1, 1, 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]) == 19\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9]) == 16\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 20\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 9\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, 10, 10]) == 19\n assert candidate(nums = [-1, -1, -1, -1, 0, 0, 0, 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]) == 24\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8]) == 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 20\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6]) == 16\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6]) == 11\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 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]) == 20\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9]) == 18\n assert candidate(nums = [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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 4\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10]) == 19\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9]) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 11\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8]) == 18\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, 8, 8, 8, 8, 9, 9, 9, 9]) == 18\n assert candidate(nums = [1, 1, 1, 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]) == 20\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 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, 8, 8, 8, 8, 8]) == 15\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 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]) == 12\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13]) == 26\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6]) == 12\n assert candidate(nums = [-10000, -9999, -9999, -9998, -9997, -9997, -9997, -9996, -9995, -9995, -9994, -9994, -9993, -9993, -9992, -9992, -9991, -9991, -9990, -9990]) == 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]) == 28\n assert candidate(nums = [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, 10, 10, 10, 10]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 11\n assert candidate(nums = [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]) == 12\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 29\n assert candidate(nums = [1, 2, 2, 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]) == 25\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6]) == 12\n assert candidate(nums = [-10, -10, -10, -9, -9, -8, -8, -8, -8, -8, -7, -7, -7, -7, -6, -6, -6, -6, -6, -5, -5, -5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0]) == 22\n assert candidate(nums = [1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 9\n assert candidate(nums = [-10000, -10000, -9999, -9998, -9998, -9998, -9997, -9997, -9997, -9997, -9996, -9996, -9996, -9995, -9995]) == 11\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7]) == 13\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9]) == 18\n assert candidate(nums = [-3, -3, -3, -2, -2, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5]) == 17\n assert candidate(nums = [0, 0, 0, 0, 0, 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]) == 12\n assert candidate(nums = [1, 1, 2, 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, 4, 4, 4, 4, 4, 5, 5]) == 10\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13]) == 25\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]) == 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]) == 2\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6]) == 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]) == 2\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 20\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3]) == 6\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6]) == 12\n assert candidate(nums = [-10000, -10000, -10000, -10000, -9999, -9999, -9998, -9998, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 18\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10]) == 19\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]) == 2\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 12\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]) == 2\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6]) == 12\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, 11, 12, 12, 12, 13, 13, 13]) == 26\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]) == 2\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 14\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6]) == 11\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9]) == 19\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5]) == 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, 9, 9, 9, 9, 10, 10, 10, 10]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15]) == 21\n assert candidate(nums = [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]) == 13\n assert candidate(nums = [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]) == 4\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().removeDuplicates", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int removeDuplicates(vector& nums) {", "container": "Solution", "callable": "removeDuplicates", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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).\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].\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.\nYou must decrease the overall operation steps as much as possible.\n \nExample 1:\nInput: nums = [2,5,6,0,0,1,2], target = 0\nOutput: true\nExample 2:\nInput: nums = [2,5,6,0,0,1,2], target = 3\nOutput: false\n\n \nConstraints:\n\n1 <= nums.length <= 5000\n-104 <= nums[i] <= 104\nnums is guaranteed to be rotated at some pivot.\n-104 <= target <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().search", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool search(vector& nums, int target) {", "container": "Solution", "callable": "search", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 82, "task_id": "remove-duplicates-from-sorted-list-ii", "difficulty": "Medium", "problem_description": "Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Return the linked list sorted as well.\n \nExample 1:\n\n\nInput: head = [1,2,3,3,4,4,5]\nOutput: [1,2,5]\n\nExample 2:\n\n\nInput: head = [1,1,1,2,3]\nOutput: [2,3]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 300].\n-100 <= Node.val <= 100\nThe list is guaranteed to be sorted in ascending order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([-100, -100, -99, -98, -98, -97, -96, -96, -95])), list_node([-99, -97, -95]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 3, 3, 4, 4, 5])), list_node([2, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 5, 5])), list_node([1, 4]))\n assert is_same_list(candidate(head = list_node([-100, 100, -100, 100])), list_node([-100, 100, -100, 100]))\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 4, 5, 5])), list_node([1]))\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6])) == None\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 3])), list_node([2, 3]))\n assert is_same_list(candidate(head = list_node([-100, 100])), list_node([-100, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 4, 5, 5])), list_node([1, 3]))\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -97, -97, -96])), list_node([-100, -98, -96]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -98, -97, -97, -96, -95, -94, -94, -93])), list_node([-100, -99, -96, -95, -93]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 3, 4, 4, 5])), list_node([1, 2, 5]))\n assert candidate(head = list_node([0, 0, 0, 0, 0])) == None\n assert candidate(head = list_node([1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) == None\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 10, 10, 11, 12, 12, 13])), list_node([1, 3, 5, 6, 7, 9, 11, 13]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7])), list_node([7]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11])), list_node([1, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 8, 8, 9, 10, 10, 11, 12, 12, 12, 13, 14, 15, 15, 16, 17, 17, 18, 19, 20, 20, 20])), list_node([2, 3, 4, 6, 7, 9, 11, 13, 14, 16, 18, 19]))\n assert is_same_list(candidate(head = list_node([-1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 5])), list_node([3, 4]))\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 21, 22, 23, 24, 25, 25, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30]))\n assert candidate(head = list_node([1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6])), list_node([1]))\n assert candidate(head = list_node([1, 1, 2, 2, 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, 10, 10, 10, 10, 10, 10])) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 14, 15, 16, 16, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 10])), list_node([6, 7, 8, 9]))\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])) == None\n assert candidate(head = list_node([-100, -100, -99, -99, -98, -98, -97, -97, -96, -96])) == None\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10])), list_node([1, 2, 3, 4, 6, 7, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10])), list_node([1, 2, 3, 4]))\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 2, 3, 4, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10])), list_node([2, 3, 6]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 4]))\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([-100, -100, -100, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9])), list_node([4]))\n assert is_same_list(candidate(head = list_node([-10, -10, -9, -9, -8, -8, -7, -7, -6, -5, -4, -3, -2, -1, 0, 0, 0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 5])), list_node([-6, -5, -4, -3, -2, -1, 1, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 11])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9])), list_node([1]))\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([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])), list_node([2]))\n assert is_same_list(candidate(head = list_node([-100, -100, 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9])), list_node([1, 3, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10])), list_node([1]))\n assert candidate(head = list_node([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])) == None\n assert candidate(head = list_node([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5])) == None\n assert candidate(head = list_node([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])) == None\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([-100, -50, -50, -10, 0, 0, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 8, 8, 9, 100])), list_node([-100, -10, 1, 4, 6, 7, 9, 100]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 2, 3, 4, 5, 5, 5])), list_node([2, 3, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 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(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9])) == None\n assert candidate(head = list_node([-10, -10, -9, -9, -8, -8, -7, -7, -6, -6, -5, -5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0])) == None\n assert candidate(head = list_node([1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5])), list_node([2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-1, 0, 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5])), list_node([-1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19]))\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 6, 6, 6, 7, 8, 8, 8, 9, 10, 10, 10])), list_node([4, 7, 9]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6])), list_node([2, 6]))\n assert candidate(head = list_node([1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10])) == None\n assert candidate(head = list_node([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])) == None\n assert is_same_list(candidate(head = list_node([-100, -100, -50, -50, 0, 0, 1, 2, 2, 3, 4, 4, 5, 5, 5, 6])), list_node([1, 3, 6]))\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7])), list_node([3, 7]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9])), list_node([4]))\n assert candidate(head = list_node([1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5])) == None\n assert candidate(head = list_node([1, 1, 1, 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])) == None\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert candidate(head = list_node([-10, -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, 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, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71, 72, 72, 73, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 79, 79, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 90, 91, 91, 92, 92, 93, 93, 94, 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100])) == None\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2]))\n assert candidate(head = list_node([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])) == None\n assert candidate(head = list_node([0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10])), list_node([6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9])), list_node([2]))\n assert is_same_list(candidate(head = list_node([-5, -4, -4, -3, -3, -2, -1, -1, 0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6])), list_node([-5, -2, 1, 4, 6]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 11, 11, 12, 13, 14, 14, 15])), list_node([1, 3, 4, 6, 8, 9, 10, 12, 13, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6])), list_node([1]))\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -98, -97, -96, -96, -96, -95, -94, -94, -93, -92, -91, -91, -90, -89, -89, -88, -87, -87, -87, -86, -85, -85, -84, -83, -83, -83, -82, -81, -81, -80, -79, -79, -78, -77, -77, -76, -75, -75, -74, -73, -73, -72, -71, -71, -70, -69, -69, -68, -67, -67, -66, -65, -65, -64, -63, -63, -62, -61, -61, -60, -59, -59, -58, -57, -57, -56, -55, -55, -54, -53, -53, -52, -51, -51, -50, -49, -49, -48, -47, -47, -46, -45, -45, -44, -43, -43, -42, -41, -41, -40, -39, -39, -38, -37, -37, -36, -35, -35, -34, -33, -33, -32, -31, -31, -30, -29, -29, -28, -27, -27, -26, -25, -25, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17, -17, -16, -15, -15, -14, -13, -13, -12, -11, -11, -10, -9, -9, -8, -7, -7, -6, -5, -5, -4, -3, -3, -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])), list_node([-100, -97, -95, -93, -92, -90, -88, -86, -84, -82, -80, -78, -76, -74, -72, -70, -68, -66, -64, -62, -60, -58, -56, -54, -52, -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]))\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -98, -97, -96, -96, -95, -94, -93, -93, -92])), list_node([-100, -97, -95, -94, -92]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 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])), list_node([2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12])), list_node([1, 2, 4, 7, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 12, 13, 14, 14, 14, 15])), list_node([1, 2, 3, 4, 6, 7, 9, 10, 12, 13, 15]))\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == None\n assert is_same_list(candidate(head = list_node([1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26, 27, 28, 29, 30, 30])), list_node([2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 19, 20, 20])), list_node([4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -98, -97, -96, -95, -95, -94, -94, -93, -92, -92, -91, -91])), list_node([-100, -99, -97, -96, -93]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 6])), list_node([3, 6]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8])), list_node([1, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), list_node([1, 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"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().deleteDuplicates", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* deleteDuplicates(ListNode* head) {", "container": "Solution", "callable": "deleteDuplicates", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 83, "task_id": "remove-duplicates-from-sorted-list", "difficulty": "Easy", "problem_description": "Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the linked list sorted as well.\n \nExample 1:\n\n\nInput: head = [1,1,2]\nOutput: [1,2]\n\nExample 2:\n\n\nInput: head = [1,1,2,3,3]\nOutput: [1,2,3]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 300].\n-100 <= Node.val <= 100\nThe list is guaranteed to be sorted in ascending order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([-100, 0, 0, 1, 1, 2, 2, 3, 3, 100])), list_node([-100, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([-100, -100, -99, -98, -98, -97, -97, -96])), list_node([-100, -99, -98, -97, -96]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0])), list_node([0]))\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 4, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-100, 0, 100])), list_node([-100, 0, 100]))\n assert is_same_list(candidate(head = list_node([-100, -50, -50, -25, -25, 0, 0, 50, 50, 100])), list_node([-100, -50, -25, 0, 50, 100]))\n assert is_same_list(candidate(head = list_node([1, 1, 2])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([-3, -2, -1, -1, 0, 1, 2, 2, 3])), list_node([-3, -2, -1, 0, 1, 2, 3]))\n assert is_same_list(candidate(head = list_node([-1, 0, 0, 1, 1, 2])), list_node([-1, 0, 1, 2]))\n assert is_same_list(candidate(head = list_node([-100, 0, 0, 1, 1, 2, 3, 3, 100])), list_node([-100, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 3, 3])), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([100, 100, 100])), list_node([100]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50])), list_node([50]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10])), list_node([10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([-100, -50, -25, -25, -10, -10, -5, -5, 0, 0, 5, 5, 10, 10, 25, 25, 50, 50, 100, 100])), list_node([-100, -50, -25, -10, -5, 0, 5, 10, 25, 50, 100]))\n assert is_same_list(candidate(head = list_node([-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3])), list_node([-1, 0, 1, 2, 3]))\n assert is_same_list(candidate(head = list_node([-50, -50, -40, -40, -30, -30, -20, -20, -10, -10, 0, 0, 10, 10, 20, 20, 30, 30, 40, 40, 50, 50])), list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -97, -97, -96, -95, -95, -94, -93, -93, -92, -91, -91, -90, -89, -89, -88, -87, -87, -86, -85, -85, -84, -83, -83, -82, -81, -81, -80, -79, -79, -78, -77, -77, -76, -75, -75, -74, -73, -73, -72, -71, -71, -70, -69, -69, -68, -67, -67, -66, -65, -65, -64, -63, -63, -62, -61, -61, -60, -59, -59, -58, -57, -57, -56, -55, -55, -54, -53, -53, -52, -51, -51, -50, -49, -49, -48, -47, -47, -46, -45, -45, -44, -43, -43, -42, -41, -41, -40, -39, -39, -38, -37, -37, -36, -35, -35, -34, -33, -33, -32, -31, -31, -30, -29, -29, -28, -27, -27, -26, -25, -25, -24, -23, -23, -22, -21, -21, -20, -19, -19, -18, -17, -17, -16, -15, -15, -14, -13, -13, -12, -11, -11, -10, -9, -9, -8, -7, -7, -6, -5, -5, -4, -3, -3, -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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([-50, -50, -50, -50, -50, -25, -25, -25, -25, -10, -10, -5, -5, -1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5])), list_node([-50, -25, -10, -5, -1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94, -94, -93, -93, -92, -92, -91, -91, -90, -90])), list_node([-99, -98, -97, -96, -95, -94, -93, -92, -91, -90]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -98, -97, -97, -96, -95, -94, -94, -93, -93, -92, -91, -91, -90, -89, -88, -88, -87])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 55, 55, 55])), list_node([50, 51, 52, 53, 54, 55]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81]))\n assert is_same_list(candidate(head = list_node([100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100])), list_node([100]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([-100, -50, -50, -50, -50, -25, -25, -25, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 3, 100, 100])), list_node([-100, -50, -25, -1, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 6, 6, 6, 6, 7])), list_node([-1, 0, 1, 2, 3, 4, 5, 6, 7]))\n assert is_same_list(candidate(head = list_node([-100, -100, -100, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 100, 100])), list_node([-100, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([-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, 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])), list_node([-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, 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 is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([-99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94, -94, -93, -93, -92, -92, -91, -91, -90, -90])), list_node([-99, -98, -97, -96, -95, -94, -93, -92, -91, -90]))\n assert is_same_list(candidate(head = list_node([-10, -9, -9, -8, -7, -7, -6, -5, -4, -4, -3, -2, -2, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([-50, -50, -50, -50, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40])), list_node([-50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100])), list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([-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, 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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([-1, -1, -1, -1, -1, -1, -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, 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])), list_node([-1, 0, 1]))\n assert is_same_list(candidate(head = list_node([-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, 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])), list_node([-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, 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 is_same_list(candidate(head = list_node([-100, -99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94, -94, -93, -93, -92, -92, -91, -91, -90, -90])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])), list_node([0, 1]))\n assert is_same_list(candidate(head = list_node([-100, -100, -100, -50, -50, 0, 0, 1, 1, 2, 2, 2, 3, 3, 100, 100])), list_node([-100, -50, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94, -94, -93, -93])), list_node([-100, -99, -98, -97, -96, -95, -94, -93]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([-100, -100, -100, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([-100, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-10, 0, 1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 19, 20])), list_node([-10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([-100, -100, -50, -50, -50, 0, 1, 1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 6, 7, 8, 9, 10])), list_node([-100, -50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3])), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 100, 100, 100, 100])), list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5])), list_node([-5]))\n assert is_same_list(candidate(head = list_node([-50, -50, -50, -25, -25, -25, -25, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 50, 50, 50, 50])), list_node([-50, -25, 0, 1, 2, 50]))\n assert is_same_list(candidate(head = list_node([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])), list_node([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]))\n assert is_same_list(candidate(head = list_node([100, 100, 100, 100, 100, 100, 100, 100, 100, 100])), list_node([100]))\n assert is_same_list(candidate(head = list_node([-100, -100, -100, -50, -50, -50, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 100, 100, 100])), list_node([-100, -50, 0, 1, 2, 3, 100]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([-100, -100, -99, -99, -98, -97, -97, -96, -95, -95, -94])), list_node([-100, -99, -98, -97, -96, -95, -94]))\n assert is_same_list(candidate(head = list_node([-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5])), list_node([-1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 78, 78, 78, 78, 78, 79, 79, 79, 79, 79, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 93, 93, 93, 93, 93, 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, 96, 96, 96, 96, 96, 97, 97, 97, 97, 97, 98, 98, 98, 98, 98, 99, 99, 99, 99, 99, 100, 100, 100, 100, 100])), list_node([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 is_same_list(candidate(head = list_node([-100, -50, -50, -40, -40, -30, -30, -20, -20, -10, -10, 0, 0, 10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 100, 100])), list_node([-100, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 100]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([-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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([0, 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])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([-100, -99, -99, -98, -98, -97, -97, -96, -96, -95, -95, -94, -94, -93, -93, -92, -92, -91, -91, -90, -90, -89, -89, -88, -88, -87, -87, -86, -86, -85, -85, -84, -84, -83, -83, -82, -82, -81, -81])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50])), list_node([50]))\n assert is_same_list(candidate(head = list_node([-100, -100, -100, -100, -100, -100, -100, -100, -100, -100])), list_node([-100]))\n assert is_same_list(candidate(head = list_node([-50, -40, -30, -20, -10, -10, -10, -5, -5, 0, 0, 0, 5, 5, 5, 10, 10, 15, 15, 20, 20, 25, 25, 30, 30, 35, 35, 40, 40, 50, 50])), list_node([-50, -40, -30, -20, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 50]))\n assert is_same_list(candidate(head = list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 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, 10, 10, 10, 10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([-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, 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])), list_node([-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, 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 is_same_list(candidate(head = list_node([-100, -50, 0, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100])), list_node([-100, -50, 0, 50, 100]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50])), list_node([50]))\n assert is_same_list(candidate(head = list_node([-100, 100])), list_node([-100, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3])), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([-50, -49, -49, -48, -47, -47, -46, -45, -45, -44, -43, -43, -42, -41, -40, -40, -39, -38, -38, -37, -36, -35, -35])), list_node([-50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85]))\n assert is_same_list(candidate(head = list_node([-1, 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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10])), list_node([-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81])), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81]))\n assert is_same_list(candidate(head = list_node([-100, -98, -96, -94, -92, -90, -88, -86, -84, -82, -80, -78, -76, -74, -72, -70, -68, -66, -64, -62, -60, -58, -56, -54, -52, -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, 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, 100])), list_node([-100, -98, -96, -94, -92, -90, -88, -86, -84, -82, -80, -78, -76, -74, -72, -70, -68, -66, -64, -62, -60, -58, -56, -54, -52, -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, 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, 100]))\n assert is_same_list(candidate(head = list_node([100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100])), list_node([100]))\n assert is_same_list(candidate(head = list_node([-1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 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])), list_node([-1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-50, -50, -49, -48, -47, -47, -46, -45, -44, -44, -43, -42, -41, -41, -40])), list_node([-50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40]))\n assert is_same_list(candidate(head = list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([-50, -40, -40, -30, -20, -20, -20, -10, -10, 0, 0, 0, 10, 20, 30, 40, 40, 50, 50])), list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([50, 50, 50, 50, 50, 50, 50, 51, 52, 52, 52, 53, 54, 55, 55, 56, 57, 58, 58, 59])), list_node([50, 51, 52, 53, 54, 55, 56, 57, 58, 59]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 6, 7, 7, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().deleteDuplicates", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* deleteDuplicates(ListNode* head) {", "container": "Solution", "callable": "deleteDuplicates", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "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\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\n\nInput: heights = [2,4]\nOutput: 4\n\n \nConstraints:\n\n1 <= heights.length <= 105\n0 <= heights[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["heights"], "leetcode_dataset_entry_point": "Solution().largestRectangleArea", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int largestRectangleArea(vector& heights) {", "container": "Solution", "callable": "largestRectangleArea", "parameters": [{"name": "heights", "type": "vector&"}], "return_type": "int", "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\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\n \nConstraints:\n\nrows == matrix.length\ncols == matrix[i].length\n1 <= row, cols <= 200\nmatrix[i][j] is '0' or '1'.\n\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"}, "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().maximalRectangle", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maximalRectangle(vector>& matrix) {", "container": "Solution", "callable": "maximalRectangle", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 86, "task_id": "partition-list", "difficulty": "Medium", "problem_description": "Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.\nYou should preserve the original relative order of the nodes in each of the two partitions.\n \nExample 1:\n\n\nInput: head = [1,4,3,2,5,2], x = 3\nOutput: [1,2,2,4,3,5]\n\nExample 2:\n\nInput: head = [2,1], x = 2\nOutput: [1,2]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 200].\n-100 <= Node.val <= 100\n-200 <= x <= 200\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(head = list_node([]),x = 0) == None\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),x = 3), list_node([2, 1, 5, 4, 3]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, 0, -50]),x = 0), list_node([-100, -50, 100, 50, 0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1]),x = 2), list_node([1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),x = 3), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 4, 3, 2, 5, 2]),x = 3), list_node([1, 2, 2, 4, 3, 5]))\n assert is_same_list(candidate(head = list_node([5, 1, 2, 3, 4]),x = 3), list_node([1, 2, 5, 3, 4]))\n assert is_same_list(candidate(head = list_node([-100, 100, 0]),x = 0), list_node([-100, 100, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),x = 6), list_node([1, 2, 3, 4, 5]))\n assert candidate(head = list_node([]),x = 5) == None\n assert is_same_list(candidate(head = list_node([2, 1]),x = 2), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 5), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([100, 50, 0, -50, -100]),x = 0), list_node([-50, -100, 100, 50, 0]))\n assert is_same_list(candidate(head = list_node([200, -200, 100, -100, 50, -50, 0, 25, -25, 75, -75, 125, -125, 150, -150]),x = -50), list_node([-200, -100, -75, -125, -150, 200, 100, 50, -50, 0, 25, -25, 75, 125, 150]))\n assert is_same_list(candidate(head = list_node([10, 5, 10, 5, 10, 5, 10, 5]),x = 7), list_node([5, 5, 5, 5, 10, 10, 10, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]),x = 100), list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),x = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 5), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0]),x = 0), list_node([0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 6), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6]))\n assert is_same_list(candidate(head = list_node([10, 10, 10, 5, 5, 5, 1, 1, 1, 0, 0, 0]),x = 5), list_node([1, 1, 1, 0, 0, 0, 10, 10, 10, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),x = 10), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([-50, -40, -30, -20, -10]),x = -25), list_node([-50, -40, -30, -20, -10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0]),x = 0), list_node([0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, -50, 25, -25, 0]),x = 0), list_node([-100, -50, -25, 100, 50, 25, 0]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95, 94, 93, 92, 91]),x = 95), list_node([94, 93, 92, 91, 100, 99, 98, 97, 96, 95]))\n assert is_same_list(candidate(head = list_node([3, 3, 3, 3, 3, 3, 3, 3, 3, 3]),x = 3), list_node([3, 3, 3, 3, 3, 3, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([5, 1, 5, 2, 5, 3, 5, 4, 5, 5, 5]),x = 5), list_node([1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([50, 20, 60, 30, 40, 50, 10, 90]),x = 50), list_node([20, 30, 40, 10, 50, 60, 50, 90]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),x = 5), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),x = 8), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10, 0, -10, -20, -30, -40]),x = 0), list_node([-10, -20, -30, -40, 50, 40, 30, 20, 10, 0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2]),x = 2), list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),x = 5), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),x = 1), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 5), list_node([4, 3, 2, 1, 10, 9, 8, 7, 6, 5]))\n assert is_same_list(candidate(head = list_node([5, 1, 8, 0, 3, 9, 2, 7]),x = 5), list_node([1, 0, 3, 2, 5, 8, 9, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 5.5), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]),x = 0), list_node([-10, -20, -30, -40, -50, 50, 40, 30, 20, 10, 0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),x = 1), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([2, 2, 2, 2, 2, 1, 1, 1, 1, 1]),x = 2), list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),x = 2), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([100, 99, 98, 97, 96, 95]),x = 98), list_node([97, 96, 95, 100, 99, 98]))\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]),x = 30), list_node([20, 10, 0, -10, -20, -30, -40, -50, 50, 40, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 11), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 0), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1]),x = 2), list_node([1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]),x = 8), list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]))\n assert is_same_list(candidate(head = list_node([3, 3, 3, 3, 3]),x = 3), list_node([3, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]),x = 4), list_node([3, 2, 1, 0, 9, 8, 7, 6, 5, 4]))\n assert is_same_list(candidate(head = list_node([0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5]),x = 0), list_node([-1, -2, -3, -4, -5, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),x = 5), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, -50, 25, -25, 75, -75, 0]),x = 0), list_node([-100, -50, -25, -75, 100, 50, 25, 75, 0]))\n assert is_same_list(candidate(head = list_node([5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 5), list_node([1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),x = 0), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 5, 3, 2, 4, 6, 2, 3, 1, 5]),x = 4), list_node([1, 3, 2, 2, 3, 1, 5, 4, 6, 5]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 10]),x = 5), list_node([1, 3, 2, 4, 5, 7, 6, 9, 8, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]),x = 2), list_node([1, 1, 1, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3]))\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]),x = -20), list_node([-30, -40, -50, 50, 40, 30, 20, 10, 0, -10, -20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5]),x = 5), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 6), list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6]))\n assert is_same_list(candidate(head = list_node([-50, 50, -50, 50, -50, 50, -50, 50, -50, 50]),x = 0), list_node([-50, -50, -50, -50, -50, 50, 50, 50, 50, 50]))\n assert is_same_list(candidate(head = list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 8), list_node([7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8]))\n assert is_same_list(candidate(head = list_node([-100, 0, 100, 50, -50, 25, -25]),x = 0), list_node([-100, -50, -25, 0, 100, 50, 25]))\n assert is_same_list(candidate(head = list_node([91, 92, 93, 94, 95, 96, 97, 98, 99, 100]),x = 95), list_node([91, 92, 93, 94, 95, 96, 97, 98, 99, 100]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 5, 6, 7, 8, 9, 10]),x = 7), list_node([1, 3, 2, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 10), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10]),x = 6), list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),x = 0), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91]),x = -95), list_node([-100, -99, -98, -97, -96, -95, -94, -93, -92, -91]))\n assert is_same_list(candidate(head = list_node([5, 1, 8, 3, 6, 2, 7, 4]),x = 5), list_node([1, 3, 2, 4, 5, 8, 6, 7]))\n assert is_same_list(candidate(head = list_node([10, 15, 5, 20, 1, 9, 11]),x = 10), list_node([5, 1, 9, 10, 15, 20, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]),x = 5), list_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),x = 5), list_node([4, 3, 2, 1, 10, 9, 8, 7, 6, 5]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),x = 0), list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, 0, 25, -50]),x = 0), list_node([-100, -50, 100, 50, 0, 25]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),x = 2), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, -50, 25, -25, 0, 0, 0, 0]),x = 0), list_node([-100, -50, -25, 100, 50, 25, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),x = 1), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50]),x = 0), list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5]),x = 3), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 1, 3, 5, 1, 3, 5, 1, 3, 5]),x = 3), list_node([1, 1, 1, 5, 3, 5, 3, 5, 3, 5]))\n assert is_same_list(candidate(head = list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]),x = 7), list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]))\n assert is_same_list(candidate(head = list_node([3, 3, 3, 3, 3, 3, 3, 3, 3, 3]),x = 3), list_node([3, 3, 3, 3, 3, 3, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 2, 1, 3, 2]),x = 2), list_node([1, 1, 3, 2, 4, 2, 3, 2]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 2, 4, 1, 5, 3, 2, 1]),x = 2), list_node([1, 1, 1, 3, 2, 2, 4, 5, 3, 2]))\n assert is_same_list(candidate(head = list_node([100, -100, 50, -50, 0, 25, -25, 75, -75]),x = 0), list_node([-100, -50, -25, -75, 100, 50, 0, 25, 75]))\n assert is_same_list(candidate(head = list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]),x = 6), list_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),x = 6), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([7, 3, 5, 8, 5, 10, 2, 1]),x = 5), list_node([3, 2, 1, 7, 5, 8, 5, 10]))\n assert is_same_list(candidate(head = list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]),x = 5), list_node([3, 1, 4, 1, 2, 3, 5, 9, 6, 5, 5]))\n assert is_same_list(candidate(head = list_node([20, 18, 16, 14, 12, 10, 8, 6, 4, 2]),x = 11), list_node([10, 8, 6, 4, 2, 20, 18, 16, 14, 12]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]),x = 0), list_node([-1, -2, -3, -4, -5, 5, 4, 3, 2, 1, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),x = -1), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 2, 5, 4, 3, 2, 1, 0]),x = 2), list_node([1, 1, 0, 3, 2, 2, 5, 4, 3, 2]))\n assert is_same_list(candidate(head = list_node([-5, -3, -1, 0, 2, 4, 6, 8, 10]),x = 0), list_node([-5, -3, -1, 0, 2, 4, 6, 8, 10]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10]),x = 5), list_node([1, 3, 2, 4, 5, 7, 9, 6, 8, 10]))\n assert is_same_list(candidate(head = list_node([100, 50, 25, 12, 6, 3, 1, -1, -3, -6, -12, -25, -50, -100]),x = 0), list_node([-1, -3, -6, -12, -25, -50, -100, 100, 50, 25, 12, 6, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),x = 0), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 2, 3, 1, 4, 2, 3]),x = 3), list_node([1, 2, 2, 1, 2, 3, 4, 3, 4, 3]))\n assert is_same_list(candidate(head = list_node([10, 10, 10, 10, 10, 10, 10, 10, 10, 10]),x = 5), list_node([10, 10, 10, 10, 10, 10, 10, 10, 10, 10]))\n"}, "metadata": {"canonical_parameter_names": ["head", "x"], "leetcode_dataset_entry_point": "Solution().partition", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* partition(ListNode* head, int x) {", "container": "Solution", "callable": "partition", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "x", "type": "int"}], "return_type": "ListNode*", "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\nIf the length of the string is 1, stop.\nIf the length of the string is > 1, do the following:\n\t\nSplit 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.\nRandomly 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.\nApply step 1 recursively on each of the two substrings x and y.\n\n\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\n \nConstraints:\n\ns1.length == s2.length\n1 <= s1.length <= 30\ns1 and s2 consist of lowercase English letters.\n\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 = \"eebaacbcbcadaaedceaaacadccd\",s2 = \"eadcaacabaddaceacbceaabe\") == False\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 = \"introduction\",s2 = \"oitrnuduinc\") == False\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 = \"abcdefghij\",s2 = \"efghijklabdc\") == False\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 = \"backtracking\",s2 = \"tcgakknbirn\") == False\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 = \"recursion\",s2 = \"suoncire\") == False\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 = \"scrambledstring\",s2 = \"stgimrebldstring\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"mnopqrjkl\") == False\n assert candidate(s1 = \"abcdefghijk\",s2 = \"efghijkabcd\") == True\n assert candidate(s1 = \"abracadabra\",s2 = \"carrabbadaba\") == False\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 = \"thisisatest\",s2 = \"tsaistestihis\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"fghebacijd\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"ijklabcdefgh\") == False\n assert candidate(s1 = \"scramble\",s2 = \"ercmsbal\") == False\n assert candidate(s1 = \"scramblestring\",s2 = \"gterinmbscrl\") == 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 = \"abcdefghij\",s2 = \"abcdefghijab\") == True\n assert candidate(s1 = \"recursion\",s2 = \"insrucero\") == False\n"}, "metadata": {"canonical_parameter_names": ["s1", "s2"], "leetcode_dataset_entry_point": "Solution().isScramble", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isScramble(string s1, string s2) {", "container": "Solution", "callable": "isScramble", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}], "return_type": "bool", "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 2n integers where:\n\nEvery integer is in the inclusive range [0, 2n - 1],\nThe first integer is 0,\nAn integer appears no more than once in the sequence,\nThe binary representation of every pair of adjacent integers differs by exactly one bit, and\nThe 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\n \nConstraints:\n\n1 <= n <= 16\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().grayCode", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector grayCode(int n) {", "container": "Solution", "callable": "grayCode", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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).\nThe solution set must not contain duplicate subsets. Return the solution in any order.\n \nExample 1:\nInput: nums = [1,2,2]\nOutput: [[],[1],[1,2],[1,2,2],[2],[2,2]]\nExample 2:\nInput: nums = [0]\nOutput: [[],[0]]\n\n \nConstraints:\n\n1 <= nums.length <= 10\n-10 <= nums[i] <= 10\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\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], []]\n assert 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 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 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 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 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 candidate(nums = [2, 1, 2]) == [[1, 2, 2], [1, 2], [1], [2, 2], [2], []]\n assert candidate(nums = [1, 2, 2]) == [[1, 2, 2], [1, 2], [1], [2, 2], [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], []]\n assert 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 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]) == [[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 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 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 candidate(nums = [10, 10, 10]) == [[10, 10, 10], [10, 10], [10], []]\n assert candidate(nums = [0]) == [[0], []]\n assert candidate(nums = [-1, -1, -1, 0]) == [[-1, -1, -1, 0], [-1, -1, -1], [-1, -1, 0], [-1, -1], [-1, 0], [-1], [0], []]\n assert candidate(nums = [0, 0, 0, 0]) == [[0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []]\n assert 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 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 candidate(nums = [1, 2, 3]) == [[1, 2, 3], [1, 2], [1, 3], [1], [2, 3], [2], [3], []]\n assert candidate(nums = [-1, -1, 2]) == [[-1, -1, 2], [-1, -1], [-1, 2], [-1], [2], []]\n assert candidate(nums = [5]) == [[5], []]\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 = [-1, 0, 1]) == [[-1, 0, 1], [-1, 0], [-1, 1], [-1], [0, 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, 0, 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 = [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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9]) == [[6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9], [6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9], [6, 6, 6, 7, 7, 7, 8, 8, 8, 9], [6, 6, 6, 7, 7, 7, 8, 8, 8], [6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9], [6, 6, 6, 7, 7, 7, 8, 8, 9, 9], [6, 6, 6, 7, 7, 7, 8, 8, 9], [6, 6, 6, 7, 7, 7, 8, 8], [6, 6, 6, 7, 7, 7, 8, 9, 9, 9], [6, 6, 6, 7, 7, 7, 8, 9, 9], [6, 6, 6, 7, 7, 7, 8, 9], [6, 6, 6, 7, 7, 7, 8], [6, 6, 6, 7, 7, 7, 9, 9, 9], [6, 6, 6, 7, 7, 7, 9, 9], [6, 6, 6, 7, 7, 7, 9], [6, 6, 6, 7, 7, 7], [6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9], [6, 6, 6, 7, 7, 8, 8, 8, 9, 9], [6, 6, 6, 7, 7, 8, 8, 8, 9], [6, 6, 6, 7, 7, 8, 8, 8], [6, 6, 6, 7, 7, 8, 8, 9, 9, 9], [6, 6, 6, 7, 7, 8, 8, 9, 9], [6, 6, 6, 7, 7, 8, 8, 9], [6, 6, 6, 7, 7, 8, 8], [6, 6, 6, 7, 7, 8, 9, 9, 9], [6, 6, 6, 7, 7, 8, 9, 9], [6, 6, 6, 7, 7, 8, 9], [6, 6, 6, 7, 7, 8], [6, 6, 6, 7, 7, 9, 9, 9], [6, 6, 6, 7, 7, 9, 9], [6, 6, 6, 7, 7, 9], [6, 6, 6, 7, 7], [6, 6, 6, 7, 8, 8, 8, 9, 9, 9], [6, 6, 6, 7, 8, 8, 8, 9, 9], [6, 6, 6, 7, 8, 8, 8, 9], [6, 6, 6, 7, 8, 8, 8], [6, 6, 6, 7, 8, 8, 9, 9, 9], [6, 6, 6, 7, 8, 8, 9, 9], [6, 6, 6, 7, 8, 8, 9], [6, 6, 6, 7, 8, 8], [6, 6, 6, 7, 8, 9, 9, 9], [6, 6, 6, 7, 8, 9, 9], [6, 6, 6, 7, 8, 9], [6, 6, 6, 7, 8], [6, 6, 6, 7, 9, 9, 9], [6, 6, 6, 7, 9, 9], [6, 6, 6, 7, 9], [6, 6, 6, 7], [6, 6, 6, 8, 8, 8, 9, 9, 9], [6, 6, 6, 8, 8, 8, 9, 9], [6, 6, 6, 8, 8, 8, 9], [6, 6, 6, 8, 8, 8], [6, 6, 6, 8, 8, 9, 9, 9], [6, 6, 6, 8, 8, 9, 9], [6, 6, 6, 8, 8, 9], [6, 6, 6, 8, 8], [6, 6, 6, 8, 9, 9, 9], [6, 6, 6, 8, 9, 9], [6, 6, 6, 8, 9], [6, 6, 6, 8], [6, 6, 6, 9, 9, 9], [6, 6, 6, 9, 9], [6, 6, 6, 9], [6, 6, 6], [6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9], [6, 6, 7, 7, 7, 8, 8, 8, 9, 9], [6, 6, 7, 7, 7, 8, 8, 8, 9], [6, 6, 7, 7, 7, 8, 8, 8], [6, 6, 7, 7, 7, 8, 8, 9, 9, 9], [6, 6, 7, 7, 7, 8, 8, 9, 9], [6, 6, 7, 7, 7, 8, 8, 9], [6, 6, 7, 7, 7, 8, 8], [6, 6, 7, 7, 7, 8, 9, 9, 9], [6, 6, 7, 7, 7, 8, 9, 9], [6, 6, 7, 7, 7, 8, 9], [6, 6, 7, 7, 7, 8], [6, 6, 7, 7, 7, 9, 9, 9], [6, 6, 7, 7, 7, 9, 9], [6, 6, 7, 7, 7, 9], [6, 6, 7, 7, 7], [6, 6, 7, 7, 8, 8, 8, 9, 9, 9], [6, 6, 7, 7, 8, 8, 8, 9, 9], [6, 6, 7, 7, 8, 8, 8, 9], [6, 6, 7, 7, 8, 8, 8], [6, 6, 7, 7, 8, 8, 9, 9, 9], [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, 9], [6, 6, 7, 7, 8, 9, 9], [6, 6, 7, 7, 8, 9], [6, 6, 7, 7, 8], [6, 6, 7, 7, 9, 9, 9], [6, 6, 7, 7, 9, 9], [6, 6, 7, 7, 9], [6, 6, 7, 7], [6, 6, 7, 8, 8, 8, 9, 9, 9], [6, 6, 7, 8, 8, 8, 9, 9], [6, 6, 7, 8, 8, 8, 9], [6, 6, 7, 8, 8, 8], [6, 6, 7, 8, 8, 9, 9, 9], [6, 6, 7, 8, 8, 9, 9], [6, 6, 7, 8, 8, 9], [6, 6, 7, 8, 8], [6, 6, 7, 8, 9, 9, 9], [6, 6, 7, 8, 9, 9], [6, 6, 7, 8, 9], [6, 6, 7, 8], [6, 6, 7, 9, 9, 9], [6, 6, 7, 9, 9], [6, 6, 7, 9], [6, 6, 7], [6, 6, 8, 8, 8, 9, 9, 9], [6, 6, 8, 8, 8, 9, 9], [6, 6, 8, 8, 8, 9], [6, 6, 8, 8, 8], [6, 6, 8, 8, 9, 9, 9], [6, 6, 8, 8, 9, 9], [6, 6, 8, 8, 9], [6, 6, 8, 8], [6, 6, 8, 9, 9, 9], [6, 6, 8, 9, 9], [6, 6, 8, 9], [6, 6, 8], [6, 6, 9, 9, 9], [6, 6, 9, 9], [6, 6, 9], [6, 6], [6, 7, 7, 7, 8, 8, 8, 9, 9, 9], [6, 7, 7, 7, 8, 8, 8, 9, 9], [6, 7, 7, 7, 8, 8, 8, 9], [6, 7, 7, 7, 8, 8, 8], [6, 7, 7, 7, 8, 8, 9, 9, 9], [6, 7, 7, 7, 8, 8, 9, 9], [6, 7, 7, 7, 8, 8, 9], [6, 7, 7, 7, 8, 8], [6, 7, 7, 7, 8, 9, 9, 9], [6, 7, 7, 7, 8, 9, 9], [6, 7, 7, 7, 8, 9], [6, 7, 7, 7, 8], [6, 7, 7, 7, 9, 9, 9], [6, 7, 7, 7, 9, 9], [6, 7, 7, 7, 9], [6, 7, 7, 7], [6, 7, 7, 8, 8, 8, 9, 9, 9], [6, 7, 7, 8, 8, 8, 9, 9], [6, 7, 7, 8, 8, 8, 9], [6, 7, 7, 8, 8, 8], [6, 7, 7, 8, 8, 9, 9, 9], [6, 7, 7, 8, 8, 9, 9], [6, 7, 7, 8, 8, 9], [6, 7, 7, 8, 8], [6, 7, 7, 8, 9, 9, 9], [6, 7, 7, 8, 9, 9], [6, 7, 7, 8, 9], [6, 7, 7, 8], [6, 7, 7, 9, 9, 9], [6, 7, 7, 9, 9], [6, 7, 7, 9], [6, 7, 7], [6, 7, 8, 8, 8, 9, 9, 9], [6, 7, 8, 8, 8, 9, 9], [6, 7, 8, 8, 8, 9], [6, 7, 8, 8, 8], [6, 7, 8, 8, 9, 9, 9], [6, 7, 8, 8, 9, 9], [6, 7, 8, 8, 9], [6, 7, 8, 8], [6, 7, 8, 9, 9, 9], [6, 7, 8, 9, 9], [6, 7, 8, 9], [6, 7, 8], [6, 7, 9, 9, 9], [6, 7, 9, 9], [6, 7, 9], [6, 7], [6, 8, 8, 8, 9, 9, 9], [6, 8, 8, 8, 9, 9], [6, 8, 8, 8, 9], [6, 8, 8, 8], [6, 8, 8, 9, 9, 9], [6, 8, 8, 9, 9], [6, 8, 8, 9], [6, 8, 8], [6, 8, 9, 9, 9], [6, 8, 9, 9], [6, 8, 9], [6, 8], [6, 9, 9, 9], [6, 9, 9], [6, 9], [6], [7, 7, 7, 8, 8, 8, 9, 9, 9], [7, 7, 7, 8, 8, 8, 9, 9], [7, 7, 7, 8, 8, 8, 9], [7, 7, 7, 8, 8, 8], [7, 7, 7, 8, 8, 9, 9, 9], [7, 7, 7, 8, 8, 9, 9], [7, 7, 7, 8, 8, 9], [7, 7, 7, 8, 8], [7, 7, 7, 8, 9, 9, 9], [7, 7, 7, 8, 9, 9], [7, 7, 7, 8, 9], [7, 7, 7, 8], [7, 7, 7, 9, 9, 9], [7, 7, 7, 9, 9], [7, 7, 7, 9], [7, 7, 7], [7, 7, 8, 8, 8, 9, 9, 9], [7, 7, 8, 8, 8, 9, 9], [7, 7, 8, 8, 8, 9], [7, 7, 8, 8, 8], [7, 7, 8, 8, 9, 9, 9], [7, 7, 8, 8, 9, 9], [7, 7, 8, 8, 9], [7, 7, 8, 8], [7, 7, 8, 9, 9, 9], [7, 7, 8, 9, 9], [7, 7, 8, 9], [7, 7, 8], [7, 7, 9, 9, 9], [7, 7, 9, 9], [7, 7, 9], [7, 7], [7, 8, 8, 8, 9, 9, 9], [7, 8, 8, 8, 9, 9], [7, 8, 8, 8, 9], [7, 8, 8, 8], [7, 8, 8, 9, 9, 9], [7, 8, 8, 9, 9], [7, 8, 8, 9], [7, 8, 8], [7, 8, 9, 9, 9], [7, 8, 9, 9], [7, 8, 9], [7, 8], [7, 9, 9, 9], [7, 9, 9], [7, 9], [7], [8, 8, 8, 9, 9, 9], [8, 8, 8, 9, 9], [8, 8, 8, 9], [8, 8, 8], [8, 8, 9, 9, 9], [8, 8, 9, 9], [8, 8, 9], [8, 8], [8, 9, 9, 9], [8, 9, 9], [8, 9], [8], [9, 9, 9], [9, 9], [9], []]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3]) == [[1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 2, 2], [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], [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, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2, 2], [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], [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, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2], [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], [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, 2, 2, 3, 3, 3], [2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2], [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], [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 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 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, 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, 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, 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, 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], [2, 2, 2, 2], [2, 2, 2], [2, 2], [2], []]\n assert 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 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 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 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 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 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 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 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 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 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 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 = [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 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 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 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 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 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 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 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 candidate(nums = [3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, -1, -1, -1]) == [[-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 1], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 2], [-1, -1, -1, 0, 0, 0, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 1, 3], [-1, -1, -1, 0, 0, 0, 1, 1], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 2], [-1, -1, -1, 0, 0, 0, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 2, 3], [-1, -1, -1, 0, 0, 0, 1, 2], [-1, -1, -1, 0, 0, 0, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 3, 3], [-1, -1, -1, 0, 0, 0, 1, 3], [-1, -1, -1, 0, 0, 0, 1], [-1, -1, -1, 0, 0, 0, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 2, 2, 2], [-1, -1, -1, 0, 0, 0, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 2, 3], [-1, -1, -1, 0, 0, 0, 2, 2], [-1, -1, -1, 0, 0, 0, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 3, 3], [-1, -1, -1, 0, 0, 0, 2, 3], [-1, -1, -1, 0, 0, 0, 2], [-1, -1, -1, 0, 0, 0, 3, 3, 3], [-1, -1, -1, 0, 0, 0, 3, 3], [-1, -1, -1, 0, 0, 0, 3], [-1, -1, -1, 0, 0, 0], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 2], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 2], [-1, -1, -1, 0, 0, 1, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 1, 3], [-1, -1, -1, 0, 0, 1, 1, 1], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 2], [-1, -1, -1, 0, 0, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 2, 3], [-1, -1, -1, 0, 0, 1, 1, 2], [-1, -1, -1, 0, 0, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 3, 3], [-1, -1, -1, 0, 0, 1, 1, 3], [-1, -1, -1, 0, 0, 1, 1], [-1, -1, -1, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 2, 2, 2], [-1, -1, -1, 0, 0, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 2, 3], [-1, -1, -1, 0, 0, 1, 2, 2], [-1, -1, -1, 0, 0, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 3, 3], [-1, -1, -1, 0, 0, 1, 2, 3], [-1, -1, -1, 0, 0, 1, 2], [-1, -1, -1, 0, 0, 1, 3, 3, 3], [-1, -1, -1, 0, 0, 1, 3, 3], [-1, -1, -1, 0, 0, 1, 3], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 2, 2, 2, 3], [-1, -1, -1, 0, 0, 2, 2, 2], [-1, -1, -1, 0, 0, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 2, 2, 3, 3], [-1, -1, -1, 0, 0, 2, 2, 3], [-1, -1, -1, 0, 0, 2, 2], [-1, -1, -1, 0, 0, 2, 3, 3, 3], [-1, -1, -1, 0, 0, 2, 3, 3], [-1, -1, -1, 0, 0, 2, 3], [-1, -1, -1, 0, 0, 2], [-1, -1, -1, 0, 0, 3, 3, 3], [-1, -1, -1, 0, 0, 3, 3], [-1, -1, -1, 0, 0, 3], [-1, -1, -1, 0, 0], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 2], [-1, -1, -1, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 2, 3], [-1, -1, -1, 0, 1, 1, 1, 2], [-1, -1, -1, 0, 1, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 3, 3], [-1, -1, -1, 0, 1, 1, 1, 3], [-1, -1, -1, 0, 1, 1, 1], [-1, -1, -1, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 1, 1, 2, 2, 2], [-1, -1, -1, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 2, 3], [-1, -1, -1, 0, 1, 1, 2, 2], [-1, -1, -1, 0, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 3, 3], [-1, -1, -1, 0, 1, 1, 2, 3], [-1, -1, -1, 0, 1, 1, 2], [-1, -1, -1, 0, 1, 1, 3, 3, 3], [-1, -1, -1, 0, 1, 1, 3, 3], [-1, -1, -1, 0, 1, 1, 3], [-1, -1, -1, 0, 1, 1], [-1, -1, -1, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 2, 2, 2, 3], [-1, -1, -1, 0, 1, 2, 2, 2], [-1, -1, -1, 0, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 2, 2, 3, 3], [-1, -1, -1, 0, 1, 2, 2, 3], [-1, -1, -1, 0, 1, 2, 2], [-1, -1, -1, 0, 1, 2, 3, 3, 3], [-1, -1, -1, 0, 1, 2, 3, 3], [-1, -1, -1, 0, 1, 2, 3], [-1, -1, -1, 0, 1, 2], [-1, -1, -1, 0, 1, 3, 3, 3], [-1, -1, -1, 0, 1, 3, 3], [-1, -1, -1, 0, 1, 3], [-1, -1, -1, 0, 1], [-1, -1, -1, 0, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 2, 2, 2, 3, 3], [-1, -1, -1, 0, 2, 2, 2, 3], [-1, -1, -1, 0, 2, 2, 2], [-1, -1, -1, 0, 2, 2, 3, 3, 3], [-1, -1, -1, 0, 2, 2, 3, 3], [-1, -1, -1, 0, 2, 2, 3], [-1, -1, -1, 0, 2, 2], [-1, -1, -1, 0, 2, 3, 3, 3], [-1, -1, -1, 0, 2, 3, 3], [-1, -1, -1, 0, 2, 3], [-1, -1, -1, 0, 2], [-1, -1, -1, 0, 3, 3, 3], [-1, -1, -1, 0, 3, 3], [-1, -1, -1, 0, 3], [-1, -1, -1, 0], [-1, -1, -1, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 1, 1, 1, 2, 2, 2], [-1, -1, -1, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 2, 3], [-1, -1, -1, 1, 1, 1, 2, 2], [-1, -1, -1, 1, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 3, 3], [-1, -1, -1, 1, 1, 1, 2, 3], [-1, -1, -1, 1, 1, 1, 2], [-1, -1, -1, 1, 1, 1, 3, 3, 3], [-1, -1, -1, 1, 1, 1, 3, 3], [-1, -1, -1, 1, 1, 1, 3], [-1, -1, -1, 1, 1, 1], [-1, -1, -1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 1, 1, 2, 2, 2, 3], [-1, -1, -1, 1, 1, 2, 2, 2], [-1, -1, -1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 2, 2, 3, 3], [-1, -1, -1, 1, 1, 2, 2, 3], [-1, -1, -1, 1, 1, 2, 2], [-1, -1, -1, 1, 1, 2, 3, 3, 3], [-1, -1, -1, 1, 1, 2, 3, 3], [-1, -1, -1, 1, 1, 2, 3], [-1, -1, -1, 1, 1, 2], [-1, -1, -1, 1, 1, 3, 3, 3], [-1, -1, -1, 1, 1, 3, 3], [-1, -1, -1, 1, 1, 3], [-1, -1, -1, 1, 1], [-1, -1, -1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 2, 2, 2, 3, 3], [-1, -1, -1, 1, 2, 2, 2, 3], [-1, -1, -1, 1, 2, 2, 2], [-1, -1, -1, 1, 2, 2, 3, 3, 3], [-1, -1, -1, 1, 2, 2, 3, 3], [-1, -1, -1, 1, 2, 2, 3], [-1, -1, -1, 1, 2, 2], [-1, -1, -1, 1, 2, 3, 3, 3], [-1, -1, -1, 1, 2, 3, 3], [-1, -1, -1, 1, 2, 3], [-1, -1, -1, 1, 2], [-1, -1, -1, 1, 3, 3, 3], [-1, -1, -1, 1, 3, 3], [-1, -1, -1, 1, 3], [-1, -1, -1, 1], [-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, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 2], [-1, -1, 0, 0, 0, 1, 1, 1, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 1, 3], [-1, -1, 0, 0, 0, 1, 1, 1], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 2], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 2], [-1, -1, 0, 0, 0, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 2, 3], [-1, -1, 0, 0, 0, 1, 1, 2], [-1, -1, 0, 0, 0, 1, 1, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 3, 3], [-1, -1, 0, 0, 0, 1, 1, 3], [-1, -1, 0, 0, 0, 1, 1], [-1, -1, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 2, 2, 2], [-1, -1, 0, 0, 0, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 2, 3], [-1, -1, 0, 0, 0, 1, 2, 2], [-1, -1, 0, 0, 0, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 3, 3], [-1, -1, 0, 0, 0, 1, 2, 3], [-1, -1, 0, 0, 0, 1, 2], [-1, -1, 0, 0, 0, 1, 3, 3, 3], [-1, -1, 0, 0, 0, 1, 3, 3], [-1, -1, 0, 0, 0, 1, 3], [-1, -1, 0, 0, 0, 1], [-1, -1, 0, 0, 0, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 2, 2, 2, 3], [-1, -1, 0, 0, 0, 2, 2, 2], [-1, -1, 0, 0, 0, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 2, 2, 3, 3], [-1, -1, 0, 0, 0, 2, 2, 3], [-1, -1, 0, 0, 0, 2, 2], [-1, -1, 0, 0, 0, 2, 3, 3, 3], [-1, -1, 0, 0, 0, 2, 3, 3], [-1, -1, 0, 0, 0, 2, 3], [-1, -1, 0, 0, 0, 2], [-1, -1, 0, 0, 0, 3, 3, 3], [-1, -1, 0, 0, 0, 3, 3], [-1, -1, 0, 0, 0, 3], [-1, -1, 0, 0, 0], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 2], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 2], [-1, -1, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 2, 3], [-1, -1, 0, 0, 1, 1, 1, 2], [-1, -1, 0, 0, 1, 1, 1, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 3, 3], [-1, -1, 0, 0, 1, 1, 1, 3], [-1, -1, 0, 0, 1, 1, 1], [-1, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 1, 1, 2, 2, 2], [-1, -1, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 2, 3], [-1, -1, 0, 0, 1, 1, 2, 2], [-1, -1, 0, 0, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 3, 3], [-1, -1, 0, 0, 1, 1, 2, 3], [-1, -1, 0, 0, 1, 1, 2], [-1, -1, 0, 0, 1, 1, 3, 3, 3], [-1, -1, 0, 0, 1, 1, 3, 3], [-1, -1, 0, 0, 1, 1, 3], [-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 2, 2, 2, 3], [-1, -1, 0, 0, 1, 2, 2, 2], [-1, -1, 0, 0, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 2, 2, 3, 3], [-1, -1, 0, 0, 1, 2, 2, 3], [-1, -1, 0, 0, 1, 2, 2], [-1, -1, 0, 0, 1, 2, 3, 3, 3], [-1, -1, 0, 0, 1, 2, 3, 3], [-1, -1, 0, 0, 1, 2, 3], [-1, -1, 0, 0, 1, 2], [-1, -1, 0, 0, 1, 3, 3, 3], [-1, -1, 0, 0, 1, 3, 3], [-1, -1, 0, 0, 1, 3], [-1, -1, 0, 0, 1], [-1, -1, 0, 0, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 2, 2, 2, 3, 3], [-1, -1, 0, 0, 2, 2, 2, 3], [-1, -1, 0, 0, 2, 2, 2], [-1, -1, 0, 0, 2, 2, 3, 3, 3], [-1, -1, 0, 0, 2, 2, 3, 3], [-1, -1, 0, 0, 2, 2, 3], [-1, -1, 0, 0, 2, 2], [-1, -1, 0, 0, 2, 3, 3, 3], [-1, -1, 0, 0, 2, 3, 3], [-1, -1, 0, 0, 2, 3], [-1, -1, 0, 0, 2], [-1, -1, 0, 0, 3, 3, 3], [-1, -1, 0, 0, 3, 3], [-1, -1, 0, 0, 3], [-1, -1, 0, 0], [-1, -1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 1, 1, 1, 2, 2, 2], [-1, -1, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 2, 3], [-1, -1, 0, 1, 1, 1, 2, 2], [-1, -1, 0, 1, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 3, 3], [-1, -1, 0, 1, 1, 1, 2, 3], [-1, -1, 0, 1, 1, 1, 2], [-1, -1, 0, 1, 1, 1, 3, 3, 3], [-1, -1, 0, 1, 1, 1, 3, 3], [-1, -1, 0, 1, 1, 1, 3], [-1, -1, 0, 1, 1, 1], [-1, -1, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 1, 1, 2, 2, 2, 3], [-1, -1, 0, 1, 1, 2, 2, 2], [-1, -1, 0, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 2, 2, 3, 3], [-1, -1, 0, 1, 1, 2, 2, 3], [-1, -1, 0, 1, 1, 2, 2], [-1, -1, 0, 1, 1, 2, 3, 3, 3], [-1, -1, 0, 1, 1, 2, 3, 3], [-1, -1, 0, 1, 1, 2, 3], [-1, -1, 0, 1, 1, 2], [-1, -1, 0, 1, 1, 3, 3, 3], [-1, -1, 0, 1, 1, 3, 3], [-1, -1, 0, 1, 1, 3], [-1, -1, 0, 1, 1], [-1, -1, 0, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 2, 2, 2, 3, 3], [-1, -1, 0, 1, 2, 2, 2, 3], [-1, -1, 0, 1, 2, 2, 2], [-1, -1, 0, 1, 2, 2, 3, 3, 3], [-1, -1, 0, 1, 2, 2, 3, 3], [-1, -1, 0, 1, 2, 2, 3], [-1, -1, 0, 1, 2, 2], [-1, -1, 0, 1, 2, 3, 3, 3], [-1, -1, 0, 1, 2, 3, 3], [-1, -1, 0, 1, 2, 3], [-1, -1, 0, 1, 2], [-1, -1, 0, 1, 3, 3, 3], [-1, -1, 0, 1, 3, 3], [-1, -1, 0, 1, 3], [-1, -1, 0, 1], [-1, -1, 0, 2, 2, 2, 3, 3, 3], [-1, -1, 0, 2, 2, 2, 3, 3], [-1, -1, 0, 2, 2, 2, 3], [-1, -1, 0, 2, 2, 2], [-1, -1, 0, 2, 2, 3, 3, 3], [-1, -1, 0, 2, 2, 3, 3], [-1, -1, 0, 2, 2, 3], [-1, -1, 0, 2, 2], [-1, -1, 0, 2, 3, 3, 3], [-1, -1, 0, 2, 3, 3], [-1, -1, 0, 2, 3], [-1, -1, 0, 2], [-1, -1, 0, 3, 3, 3], [-1, -1, 0, 3, 3], [-1, -1, 0, 3], [-1, -1, 0], [-1, -1, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 1, 1, 1, 2, 2, 2, 3], [-1, -1, 1, 1, 1, 2, 2, 2], [-1, -1, 1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 1, 1, 1, 2, 2, 3, 3], [-1, -1, 1, 1, 1, 2, 2, 3], [-1, -1, 1, 1, 1, 2, 2], [-1, -1, 1, 1, 1, 2, 3, 3, 3], [-1, -1, 1, 1, 1, 2, 3, 3], [-1, -1, 1, 1, 1, 2, 3], [-1, -1, 1, 1, 1, 2], [-1, -1, 1, 1, 1, 3, 3, 3], [-1, -1, 1, 1, 1, 3, 3], [-1, -1, 1, 1, 1, 3], [-1, -1, 1, 1, 1], [-1, -1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, -1, 1, 1, 2, 2, 2, 3, 3], [-1, -1, 1, 1, 2, 2, 2, 3], [-1, -1, 1, 1, 2, 2, 2], [-1, -1, 1, 1, 2, 2, 3, 3, 3], [-1, -1, 1, 1, 2, 2, 3, 3], [-1, -1, 1, 1, 2, 2, 3], [-1, -1, 1, 1, 2, 2], [-1, -1, 1, 1, 2, 3, 3, 3], [-1, -1, 1, 1, 2, 3, 3], [-1, -1, 1, 1, 2, 3], [-1, -1, 1, 1, 2], [-1, -1, 1, 1, 3, 3, 3], [-1, -1, 1, 1, 3, 3], [-1, -1, 1, 1, 3], [-1, -1, 1, 1], [-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, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 2], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 2], [-1, 0, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 2, 3], [-1, 0, 0, 0, 1, 1, 1, 2], [-1, 0, 0, 0, 1, 1, 1, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 3, 3], [-1, 0, 0, 0, 1, 1, 1, 3], [-1, 0, 0, 0, 1, 1, 1], [-1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 2, 2, 3], [-1, 0, 0, 0, 1, 1, 2, 2, 2], [-1, 0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 2, 3], [-1, 0, 0, 0, 1, 1, 2, 2], [-1, 0, 0, 0, 1, 1, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 3, 3], [-1, 0, 0, 0, 1, 1, 2, 3], [-1, 0, 0, 0, 1, 1, 2], [-1, 0, 0, 0, 1, 1, 3, 3, 3], [-1, 0, 0, 0, 1, 1, 3, 3], [-1, 0, 0, 0, 1, 1, 3], [-1, 0, 0, 0, 1, 1], [-1, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 2, 2, 2, 3], [-1, 0, 0, 0, 1, 2, 2, 2], [-1, 0, 0, 0, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 2, 2, 3, 3], [-1, 0, 0, 0, 1, 2, 2, 3], [-1, 0, 0, 0, 1, 2, 2], [-1, 0, 0, 0, 1, 2, 3, 3, 3], [-1, 0, 0, 0, 1, 2, 3, 3], [-1, 0, 0, 0, 1, 2, 3], [-1, 0, 0, 0, 1, 2], [-1, 0, 0, 0, 1, 3, 3, 3], [-1, 0, 0, 0, 1, 3, 3], [-1, 0, 0, 0, 1, 3], [-1, 0, 0, 0, 1], [-1, 0, 0, 0, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 2, 2, 2, 3, 3], [-1, 0, 0, 0, 2, 2, 2, 3], [-1, 0, 0, 0, 2, 2, 2], [-1, 0, 0, 0, 2, 2, 3, 3, 3], [-1, 0, 0, 0, 2, 2, 3, 3], [-1, 0, 0, 0, 2, 2, 3], [-1, 0, 0, 0, 2, 2], [-1, 0, 0, 0, 2, 3, 3, 3], [-1, 0, 0, 0, 2, 3, 3], [-1, 0, 0, 0, 2, 3], [-1, 0, 0, 0, 2], [-1, 0, 0, 0, 3, 3, 3], [-1, 0, 0, 0, 3, 3], [-1, 0, 0, 0, 3], [-1, 0, 0, 0], [-1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 2, 2, 3], [-1, 0, 0, 1, 1, 1, 2, 2, 2], [-1, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 2, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 2, 3], [-1, 0, 0, 1, 1, 1, 2, 2], [-1, 0, 0, 1, 1, 1, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 3, 3], [-1, 0, 0, 1, 1, 1, 2, 3], [-1, 0, 0, 1, 1, 1, 2], [-1, 0, 0, 1, 1, 1, 3, 3, 3], [-1, 0, 0, 1, 1, 1, 3, 3], [-1, 0, 0, 1, 1, 1, 3], [-1, 0, 0, 1, 1, 1], [-1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 1, 1, 2, 2, 2, 3], [-1, 0, 0, 1, 1, 2, 2, 2], [-1, 0, 0, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 2, 2, 3, 3], [-1, 0, 0, 1, 1, 2, 2, 3], [-1, 0, 0, 1, 1, 2, 2], [-1, 0, 0, 1, 1, 2, 3, 3, 3], [-1, 0, 0, 1, 1, 2, 3, 3], [-1, 0, 0, 1, 1, 2, 3], [-1, 0, 0, 1, 1, 2], [-1, 0, 0, 1, 1, 3, 3, 3], [-1, 0, 0, 1, 1, 3, 3], [-1, 0, 0, 1, 1, 3], [-1, 0, 0, 1, 1], [-1, 0, 0, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 2, 2, 2, 3, 3], [-1, 0, 0, 1, 2, 2, 2, 3], [-1, 0, 0, 1, 2, 2, 2], [-1, 0, 0, 1, 2, 2, 3, 3, 3], [-1, 0, 0, 1, 2, 2, 3, 3], [-1, 0, 0, 1, 2, 2, 3], [-1, 0, 0, 1, 2, 2], [-1, 0, 0, 1, 2, 3, 3, 3], [-1, 0, 0, 1, 2, 3, 3], [-1, 0, 0, 1, 2, 3], [-1, 0, 0, 1, 2], [-1, 0, 0, 1, 3, 3, 3], [-1, 0, 0, 1, 3, 3], [-1, 0, 0, 1, 3], [-1, 0, 0, 1], [-1, 0, 0, 2, 2, 2, 3, 3, 3], [-1, 0, 0, 2, 2, 2, 3, 3], [-1, 0, 0, 2, 2, 2, 3], [-1, 0, 0, 2, 2, 2], [-1, 0, 0, 2, 2, 3, 3, 3], [-1, 0, 0, 2, 2, 3, 3], [-1, 0, 0, 2, 2, 3], [-1, 0, 0, 2, 2], [-1, 0, 0, 2, 3, 3, 3], [-1, 0, 0, 2, 3, 3], [-1, 0, 0, 2, 3], [-1, 0, 0, 2], [-1, 0, 0, 3, 3, 3], [-1, 0, 0, 3, 3], [-1, 0, 0, 3], [-1, 0, 0], [-1, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 1, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 1, 1, 1, 2, 2, 2, 3], [-1, 0, 1, 1, 1, 2, 2, 2], [-1, 0, 1, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 1, 1, 1, 2, 2, 3, 3], [-1, 0, 1, 1, 1, 2, 2, 3], [-1, 0, 1, 1, 1, 2, 2], [-1, 0, 1, 1, 1, 2, 3, 3, 3], [-1, 0, 1, 1, 1, 2, 3, 3], [-1, 0, 1, 1, 1, 2, 3], [-1, 0, 1, 1, 1, 2], [-1, 0, 1, 1, 1, 3, 3, 3], [-1, 0, 1, 1, 1, 3, 3], [-1, 0, 1, 1, 1, 3], [-1, 0, 1, 1, 1], [-1, 0, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 1, 1, 2, 2, 2, 3, 3], [-1, 0, 1, 1, 2, 2, 2, 3], [-1, 0, 1, 1, 2, 2, 2], [-1, 0, 1, 1, 2, 2, 3, 3, 3], [-1, 0, 1, 1, 2, 2, 3, 3], [-1, 0, 1, 1, 2, 2, 3], [-1, 0, 1, 1, 2, 2], [-1, 0, 1, 1, 2, 3, 3, 3], [-1, 0, 1, 1, 2, 3, 3], [-1, 0, 1, 1, 2, 3], [-1, 0, 1, 1, 2], [-1, 0, 1, 1, 3, 3, 3], [-1, 0, 1, 1, 3, 3], [-1, 0, 1, 1, 3], [-1, 0, 1, 1], [-1, 0, 1, 2, 2, 2, 3, 3, 3], [-1, 0, 1, 2, 2, 2, 3, 3], [-1, 0, 1, 2, 2, 2, 3], [-1, 0, 1, 2, 2, 2], [-1, 0, 1, 2, 2, 3, 3, 3], [-1, 0, 1, 2, 2, 3, 3], [-1, 0, 1, 2, 2, 3], [-1, 0, 1, 2, 2], [-1, 0, 1, 2, 3, 3, 3], [-1, 0, 1, 2, 3, 3], [-1, 0, 1, 2, 3], [-1, 0, 1, 2], [-1, 0, 1, 3, 3, 3], [-1, 0, 1, 3, 3], [-1, 0, 1, 3], [-1, 0, 1], [-1, 0, 2, 2, 2, 3, 3, 3], [-1, 0, 2, 2, 2, 3, 3], [-1, 0, 2, 2, 2, 3], [-1, 0, 2, 2, 2], [-1, 0, 2, 2, 3, 3, 3], [-1, 0, 2, 2, 3, 3], [-1, 0, 2, 2, 3], [-1, 0, 2, 2], [-1, 0, 2, 3, 3, 3], [-1, 0, 2, 3, 3], [-1, 0, 2, 3], [-1, 0, 2], [-1, 0, 3, 3, 3], [-1, 0, 3, 3], [-1, 0, 3], [-1, 0], [-1, 1, 1, 1, 2, 2, 2, 3, 3, 3], [-1, 1, 1, 1, 2, 2, 2, 3, 3], [-1, 1, 1, 1, 2, 2, 2, 3], [-1, 1, 1, 1, 2, 2, 2], [-1, 1, 1, 1, 2, 2, 3, 3, 3], [-1, 1, 1, 1, 2, 2, 3, 3], [-1, 1, 1, 1, 2, 2, 3], [-1, 1, 1, 1, 2, 2], [-1, 1, 1, 1, 2, 3, 3, 3], [-1, 1, 1, 1, 2, 3, 3], [-1, 1, 1, 1, 2, 3], [-1, 1, 1, 1, 2], [-1, 1, 1, 1, 3, 3, 3], [-1, 1, 1, 1, 3, 3], [-1, 1, 1, 1, 3], [-1, 1, 1, 1], [-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], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 3], [0, 0, 0, 1, 1, 1, 2, 2], [0, 0, 0, 1, 1, 1, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 3], [0, 0, 0, 1, 1, 1, 2], [0, 0, 0, 1, 1, 1, 3, 3, 3], [0, 0, 0, 1, 1, 1, 3, 3], [0, 0, 0, 1, 1, 1, 3], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 2, 2, 2, 3, 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, 3], [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, 3], [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, 3], [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, 3], [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, 3], [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, 3], [0, 0, 0, 1, 2, 3, 3], [0, 0, 0, 1, 2, 3], [0, 0, 0, 1, 2], [0, 0, 0, 1, 3, 3, 3], [0, 0, 0, 1, 3, 3], [0, 0, 0, 1, 3], [0, 0, 0, 1], [0, 0, 0, 2, 2, 2, 3, 3, 3], [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, 3], [0, 0, 0, 2, 2, 3, 3], [0, 0, 0, 2, 2, 3], [0, 0, 0, 2, 2], [0, 0, 0, 2, 3, 3, 3], [0, 0, 0, 2, 3, 3], [0, 0, 0, 2, 3], [0, 0, 0, 2], [0, 0, 0, 3, 3, 3], [0, 0, 0, 3, 3], [0, 0, 0, 3], [0, 0, 0], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 0, 1, 1, 1, 2, 2, 2, 3], [0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 1, 2, 2, 3], [0, 0, 1, 1, 1, 2, 2], [0, 0, 1, 1, 1, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 3, 3], [0, 0, 1, 1, 1, 2, 3], [0, 0, 1, 1, 1, 2], [0, 0, 1, 1, 1, 3, 3, 3], [0, 0, 1, 1, 1, 3, 3], [0, 0, 1, 1, 1, 3], [0, 0, 1, 1, 1], [0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [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, 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, 3], [0, 0, 1, 1, 2, 3, 3], [0, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2], [0, 0, 1, 1, 3, 3, 3], [0, 0, 1, 1, 3, 3], [0, 0, 1, 1, 3], [0, 0, 1, 1], [0, 0, 1, 2, 2, 2, 3, 3, 3], [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, 3], [0, 0, 1, 2, 2, 3, 3], [0, 0, 1, 2, 2, 3], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3, 3, 3], [0, 0, 1, 2, 3, 3], [0, 0, 1, 2, 3], [0, 0, 1, 2], [0, 0, 1, 3, 3, 3], [0, 0, 1, 3, 3], [0, 0, 1, 3], [0, 0, 1], [0, 0, 2, 2, 2, 3, 3, 3], [0, 0, 2, 2, 2, 3, 3], [0, 0, 2, 2, 2, 3], [0, 0, 2, 2, 2], [0, 0, 2, 2, 3, 3, 3], [0, 0, 2, 2, 3, 3], [0, 0, 2, 2, 3], [0, 0, 2, 2], [0, 0, 2, 3, 3, 3], [0, 0, 2, 3, 3], [0, 0, 2, 3], [0, 0, 2], [0, 0, 3, 3, 3], [0, 0, 3, 3], [0, 0, 3], [0, 0], [0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 1, 1, 1, 2, 2, 2, 3], [0, 1, 1, 1, 2, 2, 2], [0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 1, 1, 1, 2, 2, 3, 3], [0, 1, 1, 1, 2, 2, 3], [0, 1, 1, 1, 2, 2], [0, 1, 1, 1, 2, 3, 3, 3], [0, 1, 1, 1, 2, 3, 3], [0, 1, 1, 1, 2, 3], [0, 1, 1, 1, 2], [0, 1, 1, 1, 3, 3, 3], [0, 1, 1, 1, 3, 3], [0, 1, 1, 1, 3], [0, 1, 1, 1], [0, 1, 1, 2, 2, 2, 3, 3, 3], [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, 3], [0, 1, 1, 2, 2, 3, 3], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3, 3, 3], [0, 1, 1, 2, 3, 3], [0, 1, 1, 2, 3], [0, 1, 1, 2], [0, 1, 1, 3, 3, 3], [0, 1, 1, 3, 3], [0, 1, 1, 3], [0, 1, 1], [0, 1, 2, 2, 2, 3, 3, 3], [0, 1, 2, 2, 2, 3, 3], [0, 1, 2, 2, 2, 3], [0, 1, 2, 2, 2], [0, 1, 2, 2, 3, 3, 3], [0, 1, 2, 2, 3, 3], [0, 1, 2, 2, 3], [0, 1, 2, 2], [0, 1, 2, 3, 3, 3], [0, 1, 2, 3, 3], [0, 1, 2, 3], [0, 1, 2], [0, 1, 3, 3, 3], [0, 1, 3, 3], [0, 1, 3], [0, 1], [0, 2, 2, 2, 3, 3, 3], [0, 2, 2, 2, 3, 3], [0, 2, 2, 2, 3], [0, 2, 2, 2], [0, 2, 2, 3, 3, 3], [0, 2, 2, 3, 3], [0, 2, 2, 3], [0, 2, 2], [0, 2, 3, 3, 3], [0, 2, 3, 3], [0, 2, 3], [0, 2], [0, 3, 3, 3], [0, 3, 3], [0, 3], [0], [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 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 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], [1], [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], [2], [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], [3], [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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().subsetsWithDup", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> subsetsWithDup(vector& nums) {", "container": "Solution", "callable": "subsetsWithDup", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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\"1\" -> 'A'\n\"2\" -> 'B'\n...\n\"25\" -> 'Y'\n\"26\" -> 'Z'\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\").\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)\nThe 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.\n\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.\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\n \nConstraints:\n\n1 <= s.length <= 100\ns contains only digits and may contain leading zero(s).\n\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 = \"2121212121212121212121212121212121212121212121212121212121\") == 956722026041\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 = \"111122221111222211112222111122221111222211112222111122221111\") == 2504730781961\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 = \"11111111111111111111111111111111111111111111111111\") == 20365011074\n assert candidate(s = \"111111111111111111111111111111111111111111111111111111\") == 139583862445\n assert candidate(s = \"2101\") == 1\n assert candidate(s = \"20\") == 1\n assert candidate(s = \"1212121212121212121212121212121212121212121212121212121212\") == 956722026041\n assert candidate(s = \"1111111111111111111111111111111111111111111111111111111111\") == 956722026041\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 = \"1111111111111111111111111111111111111111111111111111111111111\") == 4052739537881\n assert candidate(s = \"12211221122112211221122112211221122112211221122112211221122112\") == 6557470319842\n assert candidate(s = \"12345678987654321\") == 6\n assert candidate(s = \"22222222222222222222222222222222222222222222222222222222222\") == 1548008755920\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 = \"121212121212121212121212121212121212121212121212121212121212121\") == 10610209857723\n assert candidate(s = \"1201201201201201201201201201201201201201201201201201201201\") == 1\n assert candidate(s = \"122522201\") == 10\n assert candidate(s = \"20202020202020202020202020202020202020202020202020202020202\") == 1\n assert candidate(s = \"2222222222222222222222222222222222222222222222222222222222\") == 956722026041\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 = \"112112112112112112112112112112112112112112112112112112112112\") == 2504730781961\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 = \"21212121212121212121212121212121212121212121212121212121212121\") == 6557470319842\n assert candidate(s = \"3030303030303030303030303030303030303030303030303030303030303\") == 0\n assert candidate(s = \"22122212122212122212122212122212122212122212122212122212122\") == 1548008755920\n assert candidate(s = \"001\") == 0\n assert candidate(s = \"1122221122221122221122221122221122221122221122221122221122221\") == 4052739537881\n assert candidate(s = \"11110011110011110011110011110011110011110011110011\") == 0\n assert candidate(s = \"1111111111111111111111111111111111111111111111111111111112\") == 956722026041\n assert candidate(s = \"2511452311222112511452311222112511452311222112511\") == 143748000\n assert candidate(s = \"112112112112112112112112112112112112112112112112112112112112112\") == 10610209857723\n assert candidate(s = \"222222222222222222222222222222222222222222222222222222222222\") == 2504730781961\n assert candidate(s = \"1234567898765432123456789876543212345678987654321234567898\") == 375\n assert candidate(s = \"30515015150150150150150150150150150150150150150150\") == 0\n assert candidate(s = \"11213141516171819202122232425262728293031323334353637383940\") == 0\n assert candidate(s = \"212121212121212121212121212121212121212121212121212121212\") == 591286729879\n assert candidate(s = \"10203040506070809010111213141516171819202122232425262728293031\") == 0\n assert candidate(s = \"22111122111122111122111122111122111122111122111122111122111122\") == 6557470319842\n assert candidate(s = \"0102030405060708091011121314151617181920212223242526\") == 0\n assert candidate(s = \"11111111111111111111111111111111111111111111111111111111112\") == 1548008755920\n assert candidate(s = \"212221222122212221222122212221222122212221222122212221222122\") == 2504730781961\n assert candidate(s = \"11122211122211122211122211122211122211122211122211122211122211\") == 6557470319842\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 = \"21212121212121212121212121212121212121212121212121212121212\") == 1548008755920\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 = \"112211221122112211221122112211221122112211221122112211221122112\") == 10610209857723\n assert candidate(s = \"301010\") == 0\n assert candidate(s = \"121212121212121212121212121212121212121212121212121212121212\") == 2504730781961\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 = \"111111111111111111111111111111111111111111111111111111111111\") == 2504730781961\n assert candidate(s = \"12222222222222222222222222222222222222222222222222222222222\") == 1548008755920\n assert candidate(s = \"22322322322322322322322322322322322322322322322322322322322\") == 2324522934\n assert candidate(s = \"12121212121212121212121212121212121212\") == 63245986\n assert candidate(s = \"1222222222222222222222222222222222222222222222222222222222\") == 956722026041\n assert candidate(s = \"25242322212019181716151413121110987654321\") == 51200\n assert candidate(s = \"101010101010101010101010101010101010101010101010101010101010100\") == 0\n assert candidate(s = \"101112131415161718192021222324252620212223242526\") == 8998912\n assert candidate(s = \"11111111111111111111111111111111111111111111111111111111110\") == 591286729879\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 = \"11111111111111111111111111111111111111111111111111111111111101\") == 1548008755920\n assert candidate(s = \"212121212121212121212121212121212121212121212121212121212121\") == 2504730781961\n assert candidate(s = \"12121212121212121212121212121212121212121212121212121212121212\") == 6557470319842\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 = \"21211212211212122112121221121212211212122112121221121212211212\") == 6557470319842\n assert candidate(s = \"19191919191919191919191919191919191919191919191919191919191919\") == 2147483648\n assert candidate(s = \"26262626262626262626262626262626262626262626262626\") == 33554432\n assert candidate(s = \"112233445566778899112233445566778899112233445566\") == 512\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().numDecodings", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numDecodings(string s) {", "container": "Solution", "callable": "numDecodings", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 92, "task_id": "reverse-linked-list-ii", "difficulty": "Medium", "problem_description": "Given the head of a singly linked list and two integers left and right where left <= right, reverse the nodes of the list from position left to position right, and return the reversed list.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5], left = 2, right = 4\nOutput: [1,4,3,2,5]\n\nExample 2:\n\nInput: head = [5], left = 1, right = 1\nOutput: [5]\n\n \nConstraints:\n\nThe number of nodes in the list is n.\n1 <= n <= 500\n-500 <= Node.val <= 500\n1 <= left <= right <= n\n\n \nFollow up: Could you do it in one pass?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 3,right = 4), list_node([1, 2, 4, 3, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 2,right = 4), list_node([1, 4, 3, 2, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 3,right = 8), list_node([1, 2, 8, 7, 6, 5, 4, 3, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 2,right = 2), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50]),left = 1,right = 3), list_node([30, 20, 10, 40, 50]))\n assert is_same_list(candidate(head = list_node([1, 2, 3]),left = 1,right = 3), list_node([3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),left = 3,right = 7), list_node([1, 2, 7, 6, 5, 4, 3, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 2,right = 3), list_node([1, 3, 2, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 5,right = 5), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9]),left = 2,right = 3), list_node([1, 5, 3, 7, 9]))\n assert is_same_list(candidate(head = list_node([5]),left = 1,right = 1), list_node([5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 1,right = 1), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7]),left = 3,right = 5), list_node([1, 2, 5, 4, 3, 6, 7]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9]),left = 2,right = 4), list_node([1, 7, 5, 3, 9]))\n assert is_same_list(candidate(head = list_node([-1, 0, 1, 2, 3]),left = 2,right = 5), list_node([-1, 3, 2, 1, 0]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50]),left = 1,right = 5), list_node([50, 40, 30, 20, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),left = 1,right = 5), list_node([5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),left = 3,right = 8), list_node([-1, -2, -8, -7, -6, -5, -4, -3, -9, -10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 7,right = 7), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),left = 4,right = 7), list_node([-1, -2, -3, -7, -6, -5, -4, -8, -9, -10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 8,right = 8), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),left = 5,right = 16), list_node([1, 2, 3, 4, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([500, -500, 500, -500, 500]),left = 2,right = 4), list_node([500, -500, 500, -500, 500]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),left = 6,right = 15), list_node([1, 2, 3, 4, 5, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 8,right = 10), list_node([1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 12]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]),left = 5,right = 15), list_node([10, 20, 30, 40, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 5,right = 12), list_node([1, 2, 3, 4, 12, 11, 10, 9, 8, 7, 6, 5, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 1,right = 12), list_node([12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 4,right = 8), list_node([1, 2, 3, 8, 7, 6, 5, 4, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 6,right = 11), list_node([1, 2, 3, 4, 5, 11, 10, 9, 8, 7, 6, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([500, 400, 300, 200, 100]),left = 2,right = 4), list_node([500, 200, 300, 400, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 7,right = 7), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 13,right = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 14, 13]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 1,right = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 5,right = 5), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 11,right = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 14, 13, 12, 11]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 2,right = 5), list_node([1, 5, 4, 3, 2, 6, 7, 8, 9, 10, 11, 12]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 3,right = 3), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 4,right = 10), list_node([1, 2, 3, 10, 9, 8, 7, 6, 5, 4, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 5,right = 11), list_node([1, 2, 3, 4, 11, 10, 9, 8, 7, 6, 5, 12]))\n assert is_same_list(candidate(head = list_node([100, -200, 300, -400, 500]),left = 2,right = 4), list_node([100, -400, 300, -200, 500]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]),left = 3,right = 9), list_node([5, 4, -3, -2, -1, 0, 1, 2, 3, -4, -5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 6,right = 6), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 2,right = 9), list_node([1, 9, 8, 7, 6, 5, 4, 3, 2, 10]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15]),left = 4,right = 10), list_node([-1, -2, -3, -10, -9, -8, -7, -6, -5, -4, -11, -12, -13, -14, -15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 6,right = 10), list_node([1, 2, 3, 4, 5, 10, 9, 8, 7, 6]))\n assert is_same_list(candidate(head = list_node([-10, -20, -30, -40, -50]),left = 1,right = 3), list_node([-30, -20, -10, -40, -50]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1]),left = 2,right = 5), list_node([5, 1, 2, 3, 4]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),left = 2,right = 9), list_node([10, 2, 3, 4, 5, 6, 7, 8, 9, 1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),left = 4,right = 7), list_node([10, 9, 8, 4, 5, 6, 7, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),left = 1,right = 2), list_node([3, 1, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800]),left = 2,right = 7), list_node([100, 700, 600, 500, 400, 300, 200, 800]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 5,right = 9), list_node([1, 2, 3, 4, 9, 8, 7, 6, 5, 10]))\n assert is_same_list(candidate(head = list_node([-100, -200, -300, -400, -500]),left = 1,right = 4), list_node([-400, -300, -200, -100, -500]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),left = 5,right = 15), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 1,right = 7), list_node([7, 6, 5, 4, 3, 2, 1, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),left = 4,right = 8), list_node([-1, -2, -3, -8, -7, -6, -5, -4, -9, -10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90]),left = 3,right = 7), list_node([10, 20, 70, 60, 50, 40, 30, 80, 90]))\n assert is_same_list(candidate(head = list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]),left = 3,right = 7), list_node([-10, -9, -4, -5, -6, -7, -8, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 9,right = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 10, 9]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),left = 5,right = 5), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([7, 6, 5, 4, 3, 2, 1]),left = 1,right = 1), list_node([7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 1,right = 1), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 1,right = 15), list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),left = 10,right = 20), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 1,right = 5), list_node([5, 4, 3, 2, 1, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 4,right = 12), list_node([1, 2, 3, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),left = 3,right = 8), list_node([10, 20, 80, 70, 60, 50, 40, 30, 90, 100]))\n assert is_same_list(candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),left = 1,right = 5), list_node([4, 3, 2, 1, 0, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),left = 3,right = 7), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-10, -20, -30, -40, -50, -60, -70]),left = 2,right = 5), list_node([-10, -50, -40, -30, -20, -60, -70]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 1,right = 2), list_node([2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),left = 5,right = 9), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 7,right = 11), list_node([1, 2, 3, 4, 5, 6, 11, 10, 9, 8, 7, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]),left = 3,right = 7), list_node([-1, -2, -7, -6, -5, -4, -3, -8, -9, -10]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]),left = 1,right = 5), list_node([500, 400, 300, 200, 100, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 2,right = 14), list_node([1, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600]),left = 1,right = 5), list_node([500, 400, 300, 200, 100, 600]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 5,right = 8), list_node([1, 2, 3, 4, 8, 7, 6, 5, 9, 10]))\n assert is_same_list(candidate(head = list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),left = 2,right = 14), list_node([15, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 10,right = 14), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 13, 12, 11, 10, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 6,right = 12), list_node([1, 2, 3, 4, 5, 12, 11, 10, 9, 8, 7, 6, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 1,right = 10), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),left = 10,right = 30), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),left = 3,right = 8), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([-10, -20, -30, -40, -50]),left = 3,right = 5), list_node([-10, -20, -50, -40, -30]))\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10]),left = 2,right = 4), list_node([50, 20, 30, 40, 10]))\n assert is_same_list(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40]),left = 3,right = 5), list_node([5, 10, 25, 20, 15, 30, 35, 40]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]),left = 2,right = 8), list_node([9, 2, 3, 4, 5, 6, 7, 8, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),left = 2,right = 9), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([500, -500, 250, -250, 0, 1, 2, 3, 4, 5]),left = 2,right = 6), list_node([500, 1, 0, -250, 250, -500, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 5,right = 9), list_node([1, 2, 3, 4, 9, 8, 7, 6, 5, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),left = 9,right = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 15, 14, 13, 12, 11, 10, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 4,right = 7), list_node([1, 2, 3, 7, 6, 5, 4, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),left = 1,right = 10), list_node([100, 90, 80, 70, 60, 50, 40, 30, 20, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),left = 4,right = 10), list_node([1, 2, 3, 10, 9, 8, 7, 6, 5, 4, 11, 12]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70]),left = 3,right = 6), list_node([10, 20, 60, 50, 40, 30, 70]))\n assert is_same_list(candidate(head = list_node([-500, 500, -500, 500, -500]),left = 1,right = 5), list_node([-500, 500, -500, 500, -500]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),left = 4,right = 9), list_node([1, 2, 3, 9, 8, 7, 6, 5, 4, 10]))\n"}, "metadata": {"canonical_parameter_names": ["head", "left", "right"], "leetcode_dataset_entry_point": "Solution().reverseBetween", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* reverseBetween(ListNode* head, int left, int right) {", "container": "Solution", "callable": "reverseBetween", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "left", "type": "int"}, {"name": "right", "type": "int"}], "return_type": "ListNode*", "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\nFor 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\n \nConstraints:\n\n1 <= s.length <= 20\ns consists of digits only.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 candidate(s = \"1111\") == ['1.1.1.1']\n assert candidate(s = \"9876543210\") == []\n assert candidate(s = \"00000000000000000000\") == []\n assert candidate(s = \"222333444\") == ['22.233.34.44', '222.33.34.44']\n assert candidate(s = \"0000\") == ['0.0.0.0']\n assert candidate(s = \"25525511135\") == ['255.255.11.135', '255.255.111.35']\n assert candidate(s = \"256256256256\") == []\n assert candidate(s = \"010010\") == ['0.10.0.10', '0.100.1.0']\n assert candidate(s = \"99999999999999999999\") == []\n assert candidate(s = \"11111111111111111111\") == []\n assert 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 candidate(s = \"255025502550\") == []\n assert 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 candidate(s = \"1\") == []\n assert candidate(s = \"123123123123\") == ['123.123.123.123']\n assert candidate(s = \"19216801\") == ['19.216.80.1', '192.16.80.1', '192.168.0.1']\n assert candidate(s = \"22222222222222222222\") == []\n assert candidate(s = \"123456789\") == ['123.45.67.89']\n assert candidate(s = \"100100100\") == ['10.0.100.100', '100.10.0.100', '100.100.10.0']\n assert candidate(s = \"001001001001001\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255255255255\") == []\n assert candidate(s = \"0100100\") == ['0.10.0.100', '0.100.10.0']\n assert candidate(s = \"0001000100010001\") == []\n assert candidate(s = \"1100110011001100\") == []\n assert candidate(s = \"19216811001\") == []\n assert candidate(s = \"2552552551113525525511135\") == []\n assert candidate(s = \"999999999\") == []\n assert 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 candidate(s = \"2552552550\") == ['255.255.25.50', '255.255.255.0']\n assert candidate(s = \"255000255000255\") == []\n assert candidate(s = \"255255255000\") == []\n assert candidate(s = \"255255255255255255255255255255255\") == []\n assert candidate(s = \"0000000000\") == []\n assert candidate(s = \"0000000000000000\") == []\n assert candidate(s = \"222222222222222222\") == []\n assert candidate(s = \"10000000000000000000\") == []\n assert candidate(s = \"1230456789\") == []\n assert candidate(s = \"01001001001001\") == []\n assert candidate(s = \"111111111111111111110\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255255255255255255255255\") == []\n assert candidate(s = \"000000000000000000000\") == []\n assert candidate(s = \"1111222233334444\") == []\n assert candidate(s = \"000256\") == []\n assert candidate(s = \"255255255100\") == ['255.255.255.100']\n assert candidate(s = \"123456789012\") == []\n assert candidate(s = \"01020304\") == []\n assert candidate(s = \"3333333333\") == []\n assert candidate(s = \"100100\") == ['1.0.0.100', '10.0.10.0', '100.1.0.0']\n assert candidate(s = \"012345678910\") == []\n assert candidate(s = \"12345678901234567\") == []\n assert candidate(s = \"02552552550\") == []\n assert candidate(s = \"111111111111\") == ['111.111.111.111']\n assert candidate(s = \"192168111111001\") == []\n assert candidate(s = \"00000001\") == []\n assert candidate(s = \"1230123012301230\") == []\n assert candidate(s = \"100100100100100\") == []\n assert candidate(s = \"999999999999999999\") == []\n assert candidate(s = \"000255255000\") == []\n assert candidate(s = \"0000100100100\") == []\n assert candidate(s = \"2550255255255255\") == []\n assert candidate(s = \"1001001001\") == ['100.100.100.1']\n assert candidate(s = \"1111111111111111\") == []\n assert candidate(s = \"1234567890123\") == []\n assert candidate(s = \"192168011001001\") == []\n assert candidate(s = \"12345678901234567890\") == []\n assert candidate(s = \"1921681111001\") == []\n assert candidate(s = \"222222222222\") == ['222.222.222.222']\n assert candidate(s = \"255255255255255255255\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255255255255255255\") == []\n assert candidate(s = \"000000000000\") == []\n assert candidate(s = \"1921680101\") == ['19.216.80.101', '192.16.80.101', '192.168.0.101']\n assert candidate(s = \"99999999\") == ['99.99.99.99']\n assert candidate(s = \"00000\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255\") == []\n assert candidate(s = \"102030405\") == []\n assert candidate(s = \"255255255255255255255255\") == []\n assert candidate(s = \"1001001001001001\") == []\n assert candidate(s = \"0102030405\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255255\") == []\n assert 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 candidate(s = \"0000111122223333\") == []\n assert candidate(s = \"255255255255\") == ['255.255.255.255']\n assert candidate(s = \"1921681001\") == ['192.168.100.1']\n assert candidate(s = \"192168111001\") == []\n assert candidate(s = \"1000000000000000\") == []\n assert candidate(s = \"255025502550255\") == []\n assert candidate(s = \"19216811111001\") == []\n assert candidate(s = \"19216811111\") == ['192.168.11.111', '192.168.111.11']\n assert candidate(s = \"1234567890123456\") == []\n assert candidate(s = \"255000255000\") == []\n assert candidate(s = \"991871283712983712987123789\") == []\n assert candidate(s = \"0123456789\") == []\n assert candidate(s = \"1234567890123456789\") == []\n assert candidate(s = \"00000000\") == []\n assert candidate(s = \"11111\") == ['1.1.1.11', '1.1.11.1', '1.11.1.1', '11.1.1.1']\n assert candidate(s = \"255000000\") == []\n assert candidate(s = \"192168001001\") == []\n assert candidate(s = \"255255111350\") == []\n assert candidate(s = \"2552551113525525511135\") == []\n assert candidate(s = \"00010001000100010001\") == []\n assert candidate(s = \"123456789012345678\") == []\n assert candidate(s = \"0000255255255\") == []\n assert candidate(s = \"9999999999\") == []\n assert candidate(s = \"255255255255255\") == []\n assert candidate(s = \"01001001001001001001\") == []\n assert candidate(s = \"255255255255255255255255255255255255255255255255255255255255255\") == []\n assert candidate(s = \"255000255000255000\") == []\n assert 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 candidate(s = \"2552551000\") == ['255.255.100.0']\n assert candidate(s = \"2552550000\") == []\n assert candidate(s = \"25502550255025502550255\") == []\n assert candidate(s = \"2550255025502550\") == []\n assert candidate(s = \"123123123123123123\") == []\n assert candidate(s = \"192168001\") == []\n assert candidate(s = \"12345678901234\") == []\n assert candidate(s = \"010010010010\") == []\n assert candidate(s = \"123456789012345\") == []\n assert candidate(s = \"1234567890\") == []\n assert candidate(s = \"0255025502550255\") == []\n assert candidate(s = \"9216811135\") == ['92.168.11.135', '92.168.111.35']\n assert candidate(s = \"001001001\") == []\n assert candidate(s = \"00112233445566778899\") == []\n assert candidate(s = \"11101110111011101110\") == []\n assert candidate(s = \"2222222222222222\") == []\n assert candidate(s = \"255255255255255255255255255255\") == []\n assert candidate(s = \"100100100100\") == ['100.100.100.100']\n assert candidate(s = \"19216801100101\") == []\n assert 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 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 candidate(s = \"19216801001\") == []\n assert candidate(s = \"999999999999\") == []\n assert candidate(s = \"22222222222222222220\") == []\n assert candidate(s = \"10000000000000000001\") == []\n assert 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 candidate(s = \"200200200200\") == ['200.200.200.200']\n assert candidate(s = \"25525511135111\") == []\n assert candidate(s = \"110110110110110\") == []\n assert candidate(s = \"255255255255255255255255255255255255255\") == []\n assert candidate(s = \"333333333333\") == []\n assert candidate(s = \"01001001001001001001001001001\") == []\n assert candidate(s = \"025525511135\") == []\n assert candidate(s = \"001001001001001001\") == []\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().restoreIpAddresses", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector restoreIpAddresses(string s) {", "container": "Solution", "callable": "restoreIpAddresses", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 94, "task_id": "binary-tree-inorder-traversal", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return the inorder traversal of its nodes' values.\n \nExample 1:\n\nInput: root = [1,null,2,3]\nOutput: [1,3,2]\nExplanation:\n\n\nExample 2:\n\nInput: root = [1,2,3,4,5,null,8,null,null,6,7,9]\nOutput: [4,2,6,5,7,1,3,9,8]\nExplanation:\n\n\nExample 3:\n\nInput: root = []\nOutput: []\n\nExample 4:\n\nInput: root = [1]\nOutput: [1]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 100].\n-100 <= Node.val <= 100\n\n \nFollow up: Recursive solution is trivial, could you do it iteratively?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 8, None, None, 6, 7, 9])) == [4, 2, 6, 5, 7, 1, 3, 9, 8]\n assert candidate(root = tree_node([1])) == [1]\n assert candidate(root = tree_node([1, None, 2, 3])) == [1, 3, 2]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 18, 28, 32, None, 45])) == [5, 10, 12, 15, 20, 18, 25, 28, 30, 32, 35, 40, 45]\n assert candidate(root = tree_node([3, 1, 4, None, 2, None, None])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [5, 10, 6, 15, 20]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [3, 5, 7, 10, 15, 18]\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1])) == [1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, 4, None, None, 5])) == [1, 2]\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13])) == [1, 3, 4, 6, 7, 8, 10, 13, 14]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == [0, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, 9])) == [1, 2, 3, 4, 5, 6, 9, 7, 8]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 23, 27, 32, 37, 1, 3, 6, 8, 11, 13, 16, 19, 22, 24, 26, 28, 31, 33, 36, 38])) == [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38]\n assert candidate(root = tree_node([1, 2, None, None, 3, None, 4, None, 5])) == [2, 3, 4, 5, 1]\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 60, 90, 5, 20, 30, 40, 55, 65, 85, 100])) == [5, 10, 20, 25, 30, 35, 40, 50, 55, 60, 65, 75, 85, 90, 100]\n assert candidate(root = tree_node([8, 5, 12, 4, 6, 10, 14, 2, None, None, 7, 9, 11, 13, 15])) == [2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 15, 25, None, None, None, None, None, 90])) == [15, 20, 25, 30, 40, 50, 60, 70, 80, 90]\n assert candidate(root = tree_node([5, 1, 8, None, 4, None, None, None, 3, None, 6])) == [1, 4, 3, 6, 5, 8]\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, None, 25, 35, 47, None, None, 11, 14, 23, 37, None, None, None, None, 48, None, 49, 51])) == [49, 11, 51, 5, 14, 10, 23, 12, 37, 15, 20, 25, 30, 35, 40, 48, 47, 45, 50]\n assert candidate(root = tree_node([9, 6, 15, 5, 8, 12, 20, 2, 7, None, 11, 14, 18, 1, None, None, 4, None, None, None, None, 10, 13, None, None, None, None, None, None, None, 16, 17, 19, None, None, None, None, None, None, None, 21, None, None, None, None, None, None, 22])) == [2, 4, 5, 7, 6, 8, 11, 9, 10, 16, 14, 17, 13, 19, 12, 18, 15, 1, 20]\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, 9, None])) == [1, 2, 3, 4, 5, 6, 7, 9, 8]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, None, 17, 22, 28, 32, 38])) == [2, 5, 7, 10, 15, 17, 20, 22, 25, 28, 30, 32, 35, 38]\n assert candidate(root = tree_node([3, 1, 2])) == [1, 3, 2]\n assert candidate(root = tree_node([8, 5, 10, 3, 6, None, 12, None, None, None, None, 11, 14])) == [3, 5, 6, 8, 10, 11, 12, 14]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20])) == [3, 7, 9, 15, 20]\n assert candidate(root = tree_node([100, -50, None, -100, None, -75, None, -150, None, -200, None, -175, None, -225])) == [-225, -175, -200, -150, -75, -100, -50, 100]\n assert candidate(root = tree_node([5, 4, 6, None, 3, None, None, None, 2])) == [4, 3, 2, 5, 6]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, 0, 2, 6, None, None, 10])) == [0, 1, 2, 3, 6, 4, 5, 7, 10, 8, 9]\n assert candidate(root = tree_node([2, 1, 3, 4, 5])) == [4, 1, 5, 2, 3]\n assert candidate(root = tree_node([7, 3, 15, None, None, None, 20])) == [3, 7, 15, 20]\n assert candidate(root = tree_node([2, 1, None, 4, 3])) == [4, 1, 3, 2]\n assert candidate(root = tree_node([2, 1, 3, 4, 5, None, None, None, None, None, 6, 7])) == [4, 1, 5, 7, 6, 2, 3]\n assert candidate(root = tree_node([7, 3, 9, None, 4, 8, 10])) == [3, 4, 7, 8, 9, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [8, 4, 9, 2, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 7, None, 17, 22, 27, 32, 40])) == [1, 5, 7, 10, 15, 17, 20, 22, 25, 27, 30, 32, 35, 40]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, 5])) == [1, 2]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, None, None, 17])) == [3, 7, 9, 15, 20]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [4, 2, 5, 1, 6, 3, 7]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, None, 6])) == [1, 3, 5, 7, 6, 10, 15, 18]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == [16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 23, 1, 24, 12, 25, 6, 13, 3, 14, 7, 15]\n assert candidate(root = tree_node([50, 25, 75, 10, 30, 60, 80, 5, 15, 27, 35, 55, 65, 77, 85])) == [5, 10, 15, 25, 27, 30, 35, 50, 55, 60, 65, 75, 77, 80, 85]\n assert candidate(root = tree_node([-10, -20, -30, -40, None, -50, -60])) == [-40, -20, -10, -50, -30, -60]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, 8, 17, 22])) == [3, 7, 9, 8, 15, 17, 20, 22]\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, None, None, 5])) == [1, 4, 5, 2, 3]\n assert candidate(root = tree_node([7, 3, 15, None, None, None, 9])) == [3, 7, 15, 9]\n assert candidate(root = tree_node([25, 15, 30, 10, 20, 27, 35, 5, 12, 18, 23, 26, 29, 32, 40])) == [5, 10, 12, 15, 18, 20, 23, 25, 26, 27, 29, 30, 32, 35, 40]\n assert candidate(root = tree_node([8, 3, 10, None, 1, 6, None, 4, 7, 11, 14])) == [3, 4, 1, 7, 8, 11, 6, 14, 10]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, None, 10, 0, 2, None, None, 9, 11])) == [0, 1, 2, 3, 4, 5, 8, 9, 10, 11]\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 23, 27, 32, 37, 42, 47, 1, 7, 11, 13, 17, 22, 24, 26, 28, 31, 33, 36, 38, 41, 43, 46, 48])) == [46, 47, 48, 5, 1, 10, 7, 12, 11, 15, 13, 18, 17, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9])) == [1, 3, 4, 5, 7, 8, 9]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [1, 5, 3, 4, 6]\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 190])) == [10, 25, 35, 50, 60, 75, 90, 100, 110, 125, 140, 150, 160, 175, 190]\n assert candidate(root = tree_node([10, 5, 15, None, None, 12, 20, 11, 14, 13, 18, 17, 19, 16])) == [5, 10, 17, 11, 19, 12, 16, 14, 15, 13, 20, 18]\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 42, 48, 55, 1, 7, 11, 13, 17, 23, 27, 33, 37, 41, 43, 47, 51, 53, 57])) == [1, 5, 7, 10, 11, 12, 13, 15, 17, 18, 23, 20, 27, 25, 33, 30, 37, 35, 41, 40, 43, 42, 47, 45, 51, 48, 53, 50, 57, 55]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3])) == [1, 2]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [7, 6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37])) == [3, 5, 7, 10, 13, 15, 17, 20, 23, 25, 27, 30, 33, 35, 37]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6])) == [1, 3, 5, 6, 7, 10, 13, 15, 18]\n assert candidate(root = tree_node([3, 1, 4, None, 2])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7, 0, None, None, None, None, None, None, 8])) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(root = tree_node([1, 3, 2, 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])) == [61, 29, 63, 13, 65, 31, 67, 5, 69, 33, 71, 15, 73, 35, 75, 3, 77, 37, 79, 17, 81, 39, 83, 7, 85, 41, 87, 19, 89, 43, 91, 1, 93, 45, 95, 21, 97, 47, 99, 9, 49, 23, 51, 2, 53, 25, 55, 11, 57, 27, 59]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20, None, None, 11, 18, 16, 25])) == [5, 10, 6, 15, 16, 11, 25, 20, 18]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([8, 5, 15, 3, 7, 12, 18, 1, 4, 6, 9, 11, 13, 17, 19])) == [1, 3, 4, 5, 6, 7, 9, 8, 11, 12, 13, 15, 17, 18, 19]\n assert candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75, 2, 7, 12, 18, 23, 27, 32, 37, 42, 47, 52, 57, 62, 67, 72, 77, 1, 3, 6, 8, 11, 13, 16, 19, 22, 24, 26, 28, 31, 33, 36, 38, 41, 43, 46, 48, 51, 53, 56, 58, 61, 63, 66, 68, 71, 73, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])) == [79, 1, 80, 2, 81, 3, 82, 5, 83, 6, 84, 7, 85, 8, 86, 10, 87, 11, 88, 12, 89, 13, 90, 15, 91, 16, 92, 18, 93, 19, 94, 20, 95, 22, 96, 23, 97, 24, 98, 25, 99, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 78]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([10, None, 15, 12, 20, None, None, 11, 14, 13, 18, None, None, None, None, None, 19, 17])) == [10, 12, 15, 13, 11, 18, 17, 19, 20, 14]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, 5, None, None, None, 6, None, None, None, 7])) == [1, 2]\n assert candidate(root = tree_node([8, 5, 12, 4, 6, 9, 13, 2, None, None, 7, 8, 11, 10])) == [2, 4, 5, 6, 7, 8, 8, 9, 11, 12, 10, 13]\n assert candidate(root = tree_node([3, 1, 4, None, 2, None, None, None, None, None, 5])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([100, -100, None, -99, None, -98, None, -97, None, -96, None, -95, None, -94, None, -93, None, -92, None, -91, None, -90, None, -89, None, -88, None, -87, None, -86, None, -85, None, -84, None, -83, None, -82, None, -81, None, -80, None, -79, None, -78, None, -77, None, -76, None, -75, None, -74, None, -73, None, -72, None, -71, None, -70, None, -69, None, -68, None, -67, None, -66, None, -65, None, -64, None, -63, None, -62, None, -61, None, -60, None, -59, None, -58, None, -57, None, -56, None, -55, None, -54, None, -53, None, -52, None, -51, None, -50, None, -49, None, -48, None, -47, None, -46, None, -45, None, -44, None, -43, None, -42, None, -41, None, -40, None, -39, None, -38, None, -37, None, -36, None, -35, None, -34, None, -33, None, -32, None, -31, None, -30, None, -29, None, -28, None, -27, None, -26, None, -25, None, -24, None, -23, None, -22, None, -21, None, -20, None, -19, None, -18, None, -17, None, -16, None, -15, None, -14, None, -13, None, -12, None, -11, None, -10, None, -9, None, -8, None, -7, None, -6, None, -5, None, -4, None, -3, None, -2, None, -1])) == [-1, -2, -3, -4, -5, -6, -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(root = tree_node([4, 2, None, 1, 3])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 6, 9, 11, 13, 14, 17, 22, 28, 5, 7, None, None, None, None, None, None, 18, 21, 23, 24, 26, 27, None, None, None, None, None, None, 19])) == [5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 19, 18, 14, 21, 16, 23, 17, 24, 20, 26, 22, 27, 25, 28]\n assert candidate(root = tree_node([3, 1, 5, 0, 2, 4, 6])) == [0, 1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 22, 28, 38, None, None, None, 14, None, 18, None, 32, None, None, None, None, 29, None, 33])) == [5, 29, 14, 10, 12, 33, 18, 15, 20, 22, 32, 25, 28, 30, 38, 35, 40]\n assert candidate(root = tree_node([8, 3, 10, 1, 5, None, 14, None, None, 4, 7, 12, 15, 11, 13])) == [1, 3, 11, 4, 13, 5, 7, 8, 10, 12, 14, 15]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().inorderTraversal", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector inorderTraversal(TreeNode* root) {", "container": "Solution", "callable": "inorderTraversal", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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\n\nInput: n = 3\nOutput: 5\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\n \nConstraints:\n\n1 <= n <= 19\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().numTrees", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numTrees(int n) {", "container": "Solution", "callable": "numTrees", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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\ns = s1 + s2 + ... + sn\nt = t1 + t2 + ... + tm\n|n - m| <= 1\nThe interleaving is s1 + t1 + s2 + t2 + s3 + t3 + ... or t1 + s1 + t2 + s2 + t3 + s3 + ...\n\nNote: a + b is the concatenation of strings a and b.\n \nExample 1:\n\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\n \nConstraints:\n\n0 <= s1.length, s2.length <= 100\n0 <= s3.length <= 200\ns1, s2, and s3 consist of lowercase English letters.\n\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 = \"aabbccddeeff\",s2 = \"gg hh ii jj kk ll\",s3 = \"aaggbbccddhhffeeggiijjkkl\") == False\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"}, "metadata": {"canonical_parameter_names": ["s1", "s2", "s3"], "leetcode_dataset_entry_point": "Solution().isInterleave", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isInterleave(string s1, string s2, string s3) {", "container": "Solution", "callable": "isInterleave", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}, {"name": "s3", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 98, "task_id": "validate-binary-search-tree", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, determine if it is a valid binary search tree (BST).\nA valid BST is defined as follows:\n\nThe left subtree of a node contains only nodes with keys less than the node's key.\nThe right subtree of a node contains only nodes with keys greater than the node's key.\nBoth the left and right subtrees must also be binary search trees.\n\n \nExample 1:\n\n\nInput: root = [2,1,3]\nOutput: true\n\nExample 2:\n\n\nInput: root = [5,1,4,null,null,3,6]\nOutput: false\nExplanation: The root node's value is 5 but its right child's value is 4.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 104].\n-231 <= Node.val <= 231 - 1\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, None, 1])) == False\n assert candidate(root = tree_node([5, 4, 6, None, None, 3, 7])) == False\n assert candidate(root = tree_node([0, -1])) == True\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == False\n assert candidate(root = tree_node([3, 1, 5, 0, 2, 4, 6])) == True\n assert candidate(root = tree_node([3, 1, 4, 3, 2, 6, 5])) == False\n assert candidate(root = tree_node([2, 2, 2])) == False\n assert candidate(root = tree_node([2, None, 1])) == False\n assert candidate(root = tree_node([1, 2])) == False\n assert candidate(root = tree_node([2147483647])) == True\n assert candidate(root = tree_node([1, None, 2])) == True\n assert candidate(root = tree_node([2, 1, 3])) == True\n assert candidate(root = tree_node([32, 26, 47, 19, None, None, 56, None, 27])) == False\n assert candidate(root = tree_node([1, None, 2, 3])) == False\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7])) == True\n assert candidate(root = tree_node([1])) == True\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == False\n assert candidate(root = tree_node([5, 4, 6, 3, None, None, 7])) == True\n assert candidate(root = tree_node([3, 2, 5, 1, None, None, 6, 0, None, None, 4])) == False\n assert candidate(root = tree_node([1, 0, 2, None, None, 1.5, 2.5])) == True\n assert candidate(root = tree_node([5, 3, 7, 1, 4, 6, 9, None, None, None, None, None, 10])) == False\n assert candidate(root = tree_node([8, 5, 10, None, 6, 8, 15, None, None, 7])) == False\n assert candidate(root = tree_node([9, 7, 10, None, None, 8, None, 6])) == False\n assert candidate(root = tree_node([5, 1, 5, None, None, 4, 6])) == False\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == True\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190])) == True\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, None, None, None, None, None, None, 9])) == False\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == True\n assert candidate(root = tree_node([3, None, 30, 10, None, None, 15, None, 45])) == False\n assert candidate(root = tree_node([10, None, 20, 15, 30, None, None, 12, 17])) == False\n assert candidate(root = tree_node([2, 1, 3, None, None, 2])) == False\n assert candidate(root = tree_node([10, 5, 15, 1, 7, None, 20, None, None, 6, 8])) == True\n assert candidate(root = tree_node([1, 0, 2, None, None, 1.5])) == True\n assert candidate(root = tree_node([5, 1, 5, None, None, 5, 5])) == False\n assert candidate(root = tree_node([5, 3, 7, 2, 4, None, 8])) == True\n assert candidate(root = tree_node([50, 20, 60, 10, 25, 55, 70, 5, 15, 22, 30, 52, 65, 67, 80])) == False\n assert candidate(root = tree_node([2, None, 3, None, 4, None, 5, None, 6])) == True\n assert candidate(root = tree_node([8, 5, 15, 1, 7, None, 18, None, 6])) == False\n assert candidate(root = tree_node([3, 1, 5, 0, 2, 4, 6, None, None, None, 3])) == False\n assert candidate(root = tree_node([8, 5, 15, 1, 7, 10, 18, None, None, None, 8])) == False\n assert candidate(root = tree_node([32, 26, 40, 17, 27, None, 45, None, None, None, 29, 30])) == False\n assert candidate(root = tree_node([12, 7, 14, 3, 9, 13, 15, None, None, 8])) == True\n assert candidate(root = tree_node([50, 30, 80, 20, 40, 70, 90, None, None, 25, 45, 65, 75, None, None, None, None, 42])) == False\n assert candidate(root = tree_node([9, 4, 10, None, None, None, 11])) == True\n assert candidate(root = tree_node([5, 1, 6, None, None, 3, 7, None, None, None, 8])) == False\n assert candidate(root = tree_node([2147483646, 2147483647])) == False\n assert candidate(root = tree_node([2, 2, 2, 2, 2, 2, 2])) == False\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20])) == True\n assert candidate(root = tree_node([100, 50, 150, None, None, 60, 200])) == False\n assert candidate(root = tree_node([12, 7, 14, 3, 9, 13, 20, 1, 5, 8, 11, 12, 17, 16, 18])) == False\n assert candidate(root = tree_node([2, 1, 3, 0, 5, None, 4])) == False\n assert candidate(root = tree_node([5, 4, 6, None, None, 3, 7, 2, None, None, None, 4, None])) == False\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 2, None, None, None, 16])) == True\n assert candidate(root = tree_node([7, 3, 15, None, None, None, 20])) == True\n assert candidate(root = tree_node([1, 0, 2, None, None, 3, None])) == False\n assert candidate(root = tree_node([32, 26, 40, 18, 28, 36, 48, 13, 19, 27, 31, 34, 43, 49, 52, None, 14, None, None, 24, 29, None, None, 32, None, 35, 41, 44, 46, 47, 50, None, None, 51])) == False\n assert candidate(root = tree_node([2, None, 3, None, None, 4])) == True\n assert candidate(root = tree_node([5, 2, 14, None, None, 10, 20, 8, 15, 11, 19])) == False\n assert candidate(root = tree_node([10, 5, 15, 1, 8, 12, 20, None, None, 6, 9, 11, 13])) == True\n assert candidate(root = tree_node([12, 7, 14, 3, 9, 13, 18, 1, None, 8, None, 11, 15, None, 17])) == False\n assert candidate(root = tree_node([2, 1, 3, None, None, 2, 4])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == True\n assert candidate(root = tree_node([120, 70, 140, 50, 100, 130, 160, 20, 60, 80, 110, 125, 150, 180, 200])) == False\n assert candidate(root = tree_node([1, 1, None, 1])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == False\n assert candidate(root = tree_node([1, 1])) == False\n assert candidate(root = tree_node([1, 0, 2])) == True\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6, 2, 2])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4])) == True\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8])) == True\n assert candidate(root = tree_node([32, 26, 40, 19, 27, None, 44, None, None, None, None, None, 42])) == False\n assert candidate(root = tree_node([50, 30, 80, 20, 40, 70, 90])) == True\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, 4])) == True\n assert candidate(root = tree_node([1, None, 1, None, 1, None, 1, None, 1])) == False\n assert candidate(root = tree_node([5, 1, 4, None, None, None, 6])) == False\n assert candidate(root = tree_node([3, 2, 4, None, None, 3, None])) == False\n assert candidate(root = tree_node([12, 5, 18, 2, 9, 15, 19, 1, 3, 7, 11, 14, 17, 20])) == False\n assert candidate(root = tree_node([5, 1, 8, None, 4, 7, 9])) == True\n assert candidate(root = tree_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == False\n assert candidate(root = tree_node([8, 5, 10, None, 6, 9, 11])) == True\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, 9])) == False\n assert candidate(root = tree_node([5, 1, 5, None, 7])) == False\n assert candidate(root = tree_node([2, 1, 3, 0, 2, None, 4])) == False\n assert candidate(root = tree_node([3, 1, 4, 3, 3])) == False\n assert candidate(root = tree_node([5, 2, 8, 1, 3, None, 9])) == True\n assert candidate(root = tree_node([20, 10, 30, 5, 15, None, None, None, None, 13, 18])) == True\n assert candidate(root = tree_node([10, 5, 15, None, None, 12, 20])) == True\n assert candidate(root = tree_node([3, 1, 4, None, None, 2, 6])) == False\n assert candidate(root = tree_node([2147483647, 2147483647])) == False\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180])) == True\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, None, None, None, None, None, None, None, 9])) == True\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 90])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5])) == False\n assert candidate(root = tree_node([50, 30, 80, 20, 40, 70, 90, None, None, 25, 45, 65, 75, None, None, None, None, 41])) == False\n assert candidate(root = tree_node([1, None, 3, None, 2])) == False\n assert candidate(root = tree_node([5, 4, 6, 3, None, None, 7, 2, None, None, None, None, 8])) == False\n assert candidate(root = tree_node([10, 5, 15, 1, 7, None, 18])) == True\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().isValidBST", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isValidBST(TreeNode* root) {", "container": "Solution", "callable": "isValidBST", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 99, "task_id": "recover-binary-search-tree", "difficulty": "Medium", "problem_description": "You are given the root of a binary search tree (BST), where the values of exactly two nodes of the tree were swapped by mistake. Recover the tree without changing its structure.\n \nExample 1:\n\n\nInput: root = [1,3,null,null,2]\nOutput: [3,1,null,null,2]\nExplanation: 3 cannot be a left child of 1 because 3 > 1. Swapping 1 and 3 makes the BST valid.\n\nExample 2:\n\n\nInput: root = [3,1,4,null,null,2]\nOutput: [2,1,4,null,null,3]\nExplanation: 2 cannot be in the right subtree of 3 because 2 < 3. Swapping 2 and 3 makes the BST valid.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [2, 1000].\n-231 <= Node.val <= 231 - 1\n\n \nFollow up: A solution using O(n) space is pretty straight-forward. Could you devise a constant O(1) space solution?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([2, 3, 1])) == None\n assert candidate(root = tree_node([3, 1, 4, None, None, 2])) == None\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == None\n assert candidate(root = tree_node([1, 3, None, None, 2])) == None\n assert candidate(root = tree_node([3, 2, 1])) == None\n assert candidate(root = tree_node([5, 3, 9, -20, 10])) == None\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == None\n assert candidate(root = tree_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == None\n assert candidate(root = tree_node([7, 3, 10, None, None, 8, 12, 1, None, None, 9, 11, 13])) == None\n assert candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, None, None, None, None, None, None, 18, 22])) == None\n assert candidate(root = tree_node([7, 3, 15, None, 4, 10, 18, 2, 5, 9, 12, 8, 16, 14, 19])) == None\n assert candidate(root = tree_node([12, 5, 18, 2, 8, 15, 25, 1, 3, 7, 10, 13, 17, 22, 27, None, None, None, None, 6, 9, None, None, None, None, 14, None, 11, 16, 19, 21, 24, 23, 26, 28, 29, 30])) == None\n assert candidate(root = tree_node([30, 15, 45, 5, 20, 35, 50, 1, 7, 10, 25, 33, 40, 48, 60])) == None\n assert candidate(root = tree_node([7, 3, 10, 1, 5, 8, 12, None, None, 4, None, 9, 11, 13, 14])) == None\n assert candidate(root = tree_node([15, 10, 20, 5, 12, 18, 25, 3, 7, None, 14, None, None, 16, None, None, None, None, None])) == None\n assert candidate(root = tree_node([60, 30, 80, 20, 40, 70, 90, 10, 25, 35, 50, 65, 75, 85, 95, 5, 15, 22, 28, 32, 45, 48, 63, 73, 82, 88, 93, 98, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([7, 3, 9, 1, 5, 8, 10, 0, 2, 4, 6, None, None, None, None, None, 11])) == None\n assert candidate(root = tree_node([5, 2, 6, 1, 4, 3, 8, None, None, None, None, 7, 9])) == None\n assert candidate(root = tree_node([8, 5, 10, 2, 7, 9, 11, 1, 3, 6, None, None, None, None, None, 4])) == None\n assert candidate(root = tree_node([8, 3, 10, 1, 5, 9, 12, None, 2, 4, 7, 11, 13])) == None\n assert candidate(root = tree_node([5, 2, 8, 1, 4, None, 10, None, None, 3, 6])) == None\n assert candidate(root = tree_node([15, 10, 20, 5, 12, 16, 25, 3, 7, 11, 13, 14, 17, 22, 30])) == None\n assert candidate(root = tree_node([12, 9, 15, 5, 11, 13, 18, 3, 6, 8, 10, 14, 16, 17, 19])) == None\n assert candidate(root = tree_node([20, 15, 30, 10, 18, 25, 35, 5, 11, 16, 19, None, None, 14])) == None\n assert candidate(root = tree_node([20, 15, 30, 10, 25, 28, 40, 5, 12, 18, 27, 35, 38, 45, 50])) == None\n assert candidate(root = tree_node([10, 15, 8, None, None, 12, 20])) == None\n assert candidate(root = tree_node([9, 4, 20, None, None, 15, 60, None, None, 10, 25, None, None, 7, 12, None, 30])) == None\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 22, 28, 32, 38, 45, None, None, 2, 8, 14, 16, 21, 24, 27, 31, 34, 37, 42, 48, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([250, 125, 375, 62, 187, 312, 437, 31, 93, 156, 221, 278, 363, 412, 492, None, None, 15, 46, 78, 138, 171, 206, 254, 341, 400, 458, 518, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, None, None, 18, 25, 35, 48, None, None, None, None, 22, None, None, None, None])) == None\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 23, 35, 48, 1, 8, 11, 13, 16, 18, 21, 22, 27, 33, 42, 47, 53, None, 4, None, None, 6, 9, None, None, 14, None, 7, 10, None, None, None, None, 19, None, 24, None, 26, 28, 29, None, 31, 34, None, None, 38, None, 41, 43, None, 46, None, 49, None, 51, 52, None, 54, None, 55])) == None\n assert candidate(root = tree_node([60, 30, 90, 20, 40, 70, 100, 10, 25, 35, 45, 65, 75, 85, 105])) == None\n assert candidate(root = tree_node([5, 10, 15, 3, None, None, 20, None, None, None, 25])) == None\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, 5.5])) == None\n assert candidate(root = tree_node([8, 3, 10, 1, 5, 9, 12, None, 2, 4, 6, 7, 11, 13, 14, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 80, 110, 140, 160, 180, 5, 15, 28, 45, 65, 75, 105, 135, 155, 170, 190, None, None, None, None, 20, 35, None, 53, None, None, None, None, None, 54, None, 78, None, None, None, None, None, 115, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([30, 20, 50, 10, 25, 40, 60, None, None, 15, 27, 35, 55, 45, 65])) == None\n assert candidate(root = tree_node([7, 3, 10, 1, 5, 8, 12, None, 2, None, 4, 6, 9, 11, 13])) == None\n assert candidate(root = tree_node([9, 7, 10, 6, 8, 11, 12, 5, None, None, None, 13, 14])) == None\n assert candidate(root = tree_node([15, 10, 20, 7, 12, 16, 25, 2, 6, 11, 14, 13, 17, 21, 30])) == None\n assert candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, None, 17, 21, 27, 26, 35])) == None\n assert candidate(root = tree_node([12, 9, 15, 6, 10, 13, 18, 2, 7, 8, 11, 14, 16, 17, 20])) == None\n assert candidate(root = tree_node([4, 2, 5, 1, 3, 6, 7, 0, None, None, None, None, None, None, 8])) == None\n assert candidate(root = tree_node([15, 10, 20, None, None, 6, 25, 4, None, 11, 17])) == None\n assert candidate(root = tree_node([60, 30, 80, 10, 40, 70, 90, 5, 25, 35, 55, 65, 85, 95, None, 1, None, 15, 28, 40, 53, 63, 75, 88, 93, 100, None, None, 11, None, 26, None, 36, 45, 54, 64, 76, 89, None, None, None, None, None, 101])) == None\n assert candidate(root = tree_node([8, 5, 10, 2, 7, None, 15, 1, None, 6, 9, 12, 18, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 200, 10, 30, 60, 80, 110, 140, 180, 220, None, 12, 28, None, 55, 85, 105, 135, 165, 195, 210, 225, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 17, None, None, 100])) == None\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 180, 5, 15, 28, 40, 65, 85, 105, 135, 155, 170, 190])) == None\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 25, 35, 48, 3, 8, 14, 19, 24, 31, 47, 49, None, None, None, None, None, None, None, None, 9, None, None, 16, None, None, None, None, 23, None, None, None, None, 32, None, None, None, None, 46, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([9, 5, 12, 3, 7, 10, 15, 2, 4, 6, 8, 11, 13, 14, 17])) == None\n assert candidate(root = tree_node([30, 20, 40, 10, 25, 35, 50, 5, 15, None, None, 22, None, 27, 33, None, 45, 48, 55])) == None\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, 16])) == None\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 6, 9, 1, None, None, None, None, None, 7, 10])) == None\n assert candidate(root = tree_node([8, 5, 12, 3, 7, 10, 15, 2, 4, 6, 9, 11, 13, 14, 16])) == None\n assert candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, 16, 19, 21, 24, 28, 32, 3, 7, 11, 13, 17, 23, 27, 31])) == None\n assert candidate(root = tree_node([9, 5, 12, 3, 7, 11, 14, 2, 4, 6, 8, 10, 13, None, None, None, None, None, None, 1])) == None\n assert candidate(root = tree_node([22, 10, 30, 5, 15, 25, 40, 2, 7, 13, 18, 21, 35, 38, 45, 1, 3, 6, 8, 11, 14, 17, 20, 24, 28, 33, 36, 43, 41, 44, 47, 48, 4, 9, 12, 16, 19, 23, 27, 29, 32, 34, 37, 42, 46, 49, 50, 51])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == None\n assert candidate(root = tree_node([90, 60, 120, 30, 70, 100, 150, 10, 50, 65, 80, 95, 110, 140, 160, 5, 25, 45, 55, 75, 85, 92, 105, 125, 135, 155, 170, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 8, 12, 18, 22, 28, 32, 38, None, None, 4, None, 6, None, None, None, 9, None, None, 11, None, None, 14, None, None, 16, None, None, 19, None, None, 23, None, None, 27, None, None, 31, None, None, 34, None, None, 37, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([15, 10, 20, None, 12, 17, 25, 8, None, None, 13, None, 19, 16, 23])) == None\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190, None, None, 5, 15, 30, 45, 65, 85, 95, 105, 120, 130, 145, 155, 170, 185, 195, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([8, 3, 10, 1, 5, 9, 12, None, 2, 4, 7, 11, 13, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([35, 20, 55, 10, 30, 50, 60, None, None, 25, 34, 45, 56, None, None, 27, 32, None, 33, 40, 47, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([200, 100, 300, 50, 150, 250, 350, 25, 75, 125, 175, 225, 275, 325, 375, None, None, 10, 40, 60, 90, 110, 140, 160, 190, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == None\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, None, 25, 35, 55, 65, 75, 90])) == None\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().recoverTree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "void recoverTree(TreeNode* root) {", "container": "Solution", "callable": "recoverTree", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "void", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 100, "task_id": "same-tree", "difficulty": "Easy", "problem_description": "Given the roots of two binary trees p and q, write a function to check if they are the same or not.\nTwo binary trees are considered the same if they are structurally identical, and the nodes have the same value.\n \nExample 1:\n\n\nInput: p = [1,2,3], q = [1,2,3]\nOutput: true\n\nExample 2:\n\n\nInput: p = [1,2], q = [1,null,2]\nOutput: false\n\nExample 3:\n\n\nInput: p = [1,2,1], q = [1,1,2]\nOutput: false\n\n \nConstraints:\n\nThe number of nodes in both trees is in the range [0, 100].\n-104 <= Node.val <= 104\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(p = tree_node([1, 2, 3]),q = tree_node([1, 2, 3, 4])) == False\n assert candidate(p = tree_node([1, 2]),q = tree_node([1, None, 2])) == False\n assert candidate(p = tree_node([1, 0]),q = tree_node([1, None])) == False\n assert candidate(p = tree_node([1, None, 3]),q = tree_node([1, None, 3])) == True\n assert candidate(p = tree_node([1, 2, 3]),q = tree_node([1, 2, 3])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5]),q = tree_node([1, 2, 3, 4, 5])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3]),q = tree_node([1, None, 2, None, 3])) == True\n assert candidate(p = tree_node([1, None, 2]),q = tree_node([1, 2, None])) == False\n assert candidate(p = tree_node([1, 2, 1]),q = tree_node([1, 1, 2])) == False\n assert candidate(p = tree_node([]),q = tree_node([])) == True\n assert candidate(p = tree_node([1, None, 3]),q = tree_node([1, 2, 3])) == False\n assert candidate(p = tree_node([5, 1, 4, None, None, 3, 6]),q = tree_node([5, 1, 4, None, None, 3, 6])) == True\n assert candidate(p = tree_node([1]),q = tree_node([1])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5]),q = tree_node([1, 2, 3, 4, 6])) == False\n assert candidate(p = tree_node([1, 2, None, 3]),q = tree_node([1, 2, None, 3])) == True\n assert candidate(p = tree_node([1, 2, None, 3]),q = tree_node([1, 2, None, 4])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7]),q = tree_node([1, 2, 3, 4, 5, 6, 7])) == True\n assert candidate(p = tree_node([10, 5, 15]),q = tree_node([10, 5, None, None, 15])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, None, None, 12]),q = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, None, None, 13])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6]),q = tree_node([1, 2, 3, None, 4, 5, None, 7])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9]),q = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, 10, 11]),q = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, 10, 11])) == True\n assert candidate(p = tree_node([5, 1, 4, None, None, 3, 6]),q = tree_node([5, 1, 4, None, None, 2, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == False\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 14])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, None, None, 6, 9]),q = tree_node([10, 5, 15, 3, 7, None, 18, None, None, 6, 9])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 5, 6]),q = tree_node([1, 2, 3, None, 4, 5, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8, None, None, 9, 10]),q = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8, None, None, 10, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18, 19]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18, 19])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 17])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, None, None, 6, 9]),q = tree_node([10, 5, 15, 3, 7, None, 19, None, None, 6, 9])) == False\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 9])) == False\n assert candidate(p = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15]),q = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 16])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 17])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 7]),q = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 8])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, None, 9]),q = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, None, 10])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7]),q = tree_node([1, 2, 3, 4, None, 6, 7])) == True\n assert candidate(p = tree_node([1, 2, 3, None, None, 4, 5, 6, 7]),q = tree_node([1, 2, 3, None, None, 4, 5, 6, None])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7, None, 8]),q = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7, None, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, None, 6, 7, 8]),q = tree_node([1, 2, 3, None, 4, 5, None, None, 6, 7, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, 8, 9]),q = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, 8, 10])) == False\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 11])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18, 19]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18, None])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, 9, None, None, 10]),q = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, 9, None, None, 10])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5]),q = tree_node([1, None, 2, None, 3, None, 4, None, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8]),q = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, None, 5]),q = tree_node([1, 2, 3, None, 4, None, 5])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 11]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 11])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, 6]),q = tree_node([1, 2, 3, None, 4, 5, None])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, 9, 10]),q = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, 9, 10])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, 9, 10]),q = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, None, 10])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, None, 8]),q = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, None, 8])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5]),q = tree_node([1, 2, 3, 4, None, None, 6])) == False\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]),q = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 10])) == False\n assert candidate(p = tree_node([3, 5, 1, 6, 2, 9, 8, None, None, 7, 4]),q = tree_node([3, 5, 1, 6, 2, 9, 8, None, None, 7, 3])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, None, None, 12]),q = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, None, None, 12])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 15, 14])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11]),q = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 12])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, 6]),q = tree_node([1, 2, 3, None, 4, 5, 6])) == True\n assert candidate(p = tree_node([3, 5, 1, 6, 2, 9, 8, None, None, 7, 4]),q = tree_node([3, 5, 1, 6, 2, 9, 8, None, None, 7, 4])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8]),q = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 8, 7])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 11]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 12])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 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]),q = tree_node([1, 2, 3, 4, 5, 6, 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])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 5, 6, None, 7]),q = tree_node([1, 2, 3, 4, None, 5, 6, None, 8])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9]),q = tree_node([1, 2, 3, 4, None, None, 7, 8, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7]),q = tree_node([1, 2, 3, 4, None, 6])) == False\n assert candidate(p = tree_node([5, 1, 4, None, None, 3, 6]),q = tree_node([5, 1, 4, None, None, 6, 3])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18]),q = tree_node([10, 5, 15, 3, 7, None, 19])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7]),q = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 8])) == False\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4]),q = tree_node([1, None, 2, None, 3, None, 4])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, 17]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, 17])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 10])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, None, 5]),q = tree_node([1, 2, 3, None, 4, None, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == True\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6]),q = tree_node([10, 5, 15, 3, 7, None, 18, 2, None, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, None, 6]),q = tree_node([1, 2, 3, None, 4, None, 5, None, None, 6])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9]),q = tree_node([1, 2, 3, 4, 5, None, 7, 8, None])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, 6]),q = tree_node([1, 2, 3, None, 4, 6, 5])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18]),q = tree_node([10, 5, 15, 3, 7, None, 18])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 14, 15])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 5, None, 7, 8]),q = tree_node([1, 2, 3, None, 5, None, 7, 8])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13, 14, 16])) == False\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6]),q = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11, None, 12, 13, None, 14, 15, None, 16, 17, None, 18, 19, None, 20, 21]),q = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11, None, 12, 13, None, 14, 15, None, 16, 17, None, 18, 19, None, 20, 21])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 19])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, 17]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8]),q = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8])) == True\n assert candidate(p = tree_node([1, 2, 3, None, None, 6, 7, 8, 9]),q = tree_node([1, 2, 3, None, None, 6, 7, 8, 9])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, None, None, 9]),q = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, None, None, 9])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4, None, 5]),q = tree_node([1, None, 2, None, 3, None, 4, None, None])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8]),q = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 10, None, None, 12, 13])) == False\n assert candidate(p = tree_node([10, 5, 15, None, None, 6, 20]),q = tree_node([10, 5, 15, None, None, 6, 20])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, 9, None, None, 10]),q = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, 9, None, None, 11])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, None, 5, 6]),q = tree_node([1, 2, 3, None, 4, None, 5, 6])) == True\n assert candidate(p = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, None, 8]),q = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, None, 9])) == False\n assert candidate(p = tree_node([1, None, 2, 3]),q = tree_node([1, 2, None, 3])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7]),q = tree_node([1, 2, 3, 4, None, 6, 8])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, 16, None, 18])) == True\n assert candidate(p = tree_node([10, 5, 15, None, None, 6, 20]),q = tree_node([10, 5, 15, None, None, 7, 20])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8, None, None, 9, 10]),q = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8, None, None, 9, 11])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 10])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6]),q = tree_node([1, 2, 3, None, 4, 5, None, 6])) == True\n assert candidate(p = tree_node([1, None, 2, None, 3, None, 4]),q = tree_node([1, None, 2, None, 3, None, 5])) == False\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11, None, 12, 13, None, 14, 15, None, 16, 17, None, 18, 19, None, 20, 21]),q = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11, None, 12, 13, None, 14, 15, None, 16, 17, None, 18, 19, None, 20, 22])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11]),q = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 12])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == True\n assert candidate(p = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11]),q = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, 11])) == True\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 20])) == False\n assert candidate(p = tree_node([1, 2, 3, None, None, 6, 7, 8, 9]),q = tree_node([1, 2, 3, None, None, 6, 7, None, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None])) == True\n assert candidate(p = tree_node([1]),q = tree_node([2])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 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]),q = tree_node([1, 2, 3, 4, 5, 6, 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])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8]),q = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, None, 12, 13]),q = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),q = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14])) == False\n assert candidate(p = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, None, 9]),q = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, None, 9])) == True\n"}, "metadata": {"canonical_parameter_names": ["p", "q"], "leetcode_dataset_entry_point": "Solution().isSameTree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isSameTree(TreeNode* p, TreeNode* q) {", "container": "Solution", "callable": "isSameTree", "parameters": [{"name": "p", "type": "TreeNode*"}, {"name": "q", "type": "TreeNode*"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 101, "task_id": "symmetric-tree", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center).\n \nExample 1:\n\n\nInput: root = [1,2,2,3,4,4,3]\nOutput: true\n\nExample 2:\n\n\nInput: root = [1,2,2,null,3,null,3]\nOutput: false\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 1000].\n-100 <= Node.val <= 100\n\n \nFollow up: Could you solve it both recursively and iteratively?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == False\n assert candidate(root = tree_node([1, 2, 3])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == False\n assert candidate(root = tree_node([2, 3, 3, 4, 5, 5, 4])) == True\n assert candidate(root = tree_node([1, 2])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 8, 7, 6, 5])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 3, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 5, 3])) == False\n assert candidate(root = tree_node([1, 2, 2, None, 3, None, 3])) == False\n assert candidate(root = tree_node([1])) == True\n assert candidate(root = tree_node([1, 2, 2, 2, None, 2])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 6, 7, 8, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 10, 11, 11, 10, 12, 13, 13, 12])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, None, 4, 4])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 8, 7, 6, 5, None, None, None, None, None, None, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 5, None, None, 6, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 6, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, None, None, None, 8, 9, 10, 11])) == False\n assert candidate(root = tree_node([1, 2, 3, 3, 2, 1, None, 4, None, None, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 5, None, None, None, None, 6, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, None, 4, 5, 5, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, 5, 5, None, None, 6, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 6, 7, None, None, 8, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, None, 8, None, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 5, None, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, 3, None, 4, None, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 5, None, None, 6, 6, None, 7, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 6, None, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, None, None, 5, 6, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 9, 10, 11, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, None, 6, 7, 7, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, None, 6, None, 5, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 6, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, None, 3, 3, None, 4, None, None, 4, None, 5, None, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 9, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, 11, 10, 9, 8])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 6, 5, 7, 8, 8, 7, 9, 9, 10, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 6, None, 7, None, 8, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, None, 7, 8, 8, 7, None, None, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, 5, 6, None, None, 7, 8])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, 5, None, 5, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, 7, None, None, 8, 9, 9, 8])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, None, None, 11, 12, 12, 11])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 6, 7, 8, 8, 7, 6, None, None, 9, 10, 10, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7, 8, 9, None, 9, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, None, 5, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7, 8, None, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 6, 7, None, 8, 9])) == False\n assert candidate(root = tree_node([1, 2, 3, 3, 2, None, 1, 4, None, None, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, 3, 3, None, 4, 4, 4, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, None, 5, None, None, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, 3, None, 5, 6, 7, 8, 9, 10, 11, 11, 10, 9, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, None, 5, None, None, 6, 7, None, None, 8])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, 3, 5, None, 6, None, 7, 8, 9, None, None, None, None, 10, None, None, 11, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 5, 5, 4])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, None, 5, None, None, None, 6, 7, 8, 8, 7, 6])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, None, None, 12, None, None, 13, None, None, 14])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, None, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 5, None, 5, None, 4, 6, None, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 9, 10, 11, 12])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, None, None, 5, 6, 5, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 5, None, 6, 6, None, 7, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 5, 5, None, 6, 6, 7, 8, 8, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 5, 6, 6, 5, 7, 8, 8, 7, 9, 9, 10, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 3, 4, None, None, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 6, 7, 8, 9, 10, 11])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, None, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7, 8, None, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 7, None, 6, 5, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, None, None, 5, 6, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, 7, None, 8, None, None, 9, 10, 10, 9, None, 8, None, 7, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 5, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, None, None, 4, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, 6, None, 5, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 8, 7, 6, 5, 9, 10, 10, 9, 11, 12, 12, 11, 13, 14, 15, 15, 14, 13])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, 7, 8, 9, 10, 11, 11, 10, 9, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, 4, 5, None, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 8, 7, 6, 5, 9, None, None, None, None, None, None, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, None, None, 7, 6, 5])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, 6, 5, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, None, None, None, 6, 5])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, 8, 7, 6, 5, 9, 10, 10, 9, 11, 12, 12, 11, 13, 14, 14, 13])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 5, None, None, 5, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, 4, 3, 5, None, 6, None, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, None, 6, 7, 8, 8, 7, 6, None, None, 9, 10, None, None, 10, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, 5, 6, 6, 5])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, 6, None, 6, 5, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, None, 5, None, None, None, 6, None, 8, 8, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 5, None, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 6, 5, None, 7, 7, None, 8, 8])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 5, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, 6, 5, None, None, 7, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 7, 8, None, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, 5, 5, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, 10, 11, 12, 13, 14])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, None, None, 5, 6, 7, 8, 9, 10, None, None, 10, 9, 8, 7, 6, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, 6, 5, 7, 8, 8, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, None, None, 5, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, 3, 3, 4, None, None, 4, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, 5, None, 5, None, None, 6, 7])) == False\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().isSymmetric", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isSymmetric(TreeNode* root) {", "container": "Solution", "callable": "isSymmetric", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 102, "task_id": "binary-tree-level-order-traversal", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: [[3],[9,20],[15,7]]\n\nExample 2:\n\nInput: root = [1]\nOutput: [[1]]\n\nExample 3:\n\nInput: root = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 2000].\n-1000 <= Node.val <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == [[3], [9, 20], [15, 7]]\n assert candidate(root = tree_node([1])) == [[1]]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [[1], [2, 3], [4, 5, 6, 7]]\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == [[0], [2, 4], [1, 3, -1], [5, 1, 6, 8]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [[1], [2], [3], [4], [5]]\n assert candidate(root = tree_node([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, -10, -11, -12, -13, -14], [-15, -16, -17, -18, -19]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16])) == [[1], [2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15], [16]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]\n assert candidate(root = tree_node([3, 9, 20, 10, None, None, 15, 7, 8, 11, 16])) == [[3], [9, 20], [10, 15], [7, 8, 11, 16]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == [[1], [2, 3], [4, 5]]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, None, 6, None, None, 7])) == [[1], [2, 3], [4, 5], [6], [7]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 18, 19, 21, None, None, None, None, 22, 23, 24, 25, 26, None, 27, 28, 29, 30])) == [[3], [9, 20], [15, 7, 18, 19], [21, 22, 23, 24], [25, 26, 27, 28, 29, 30]]\n assert candidate(root = tree_node([1, None, 3, 2, 4, None, 5, 6])) == [[1], [3], [2, 4], [5, 6]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, 7, 8, 9])) == [[1], [2, 3], [4, 5], [6, 7, 8, 9]]\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == [[1], [2, 2], [3, 3], [4, 4]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [[1], [2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, None, 16, 18])) == [[3], [9, 20], [15, 7], [12, 16, 18]]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4])) == [[1], [2]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 16, 8, 17, 18, 19, 20, 21, 22, 23, 24])) == [[3], [9, 20], [15, 7, 16, 8], [17, 18, 19, 20, 21, 22, 23, 24]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, None, None, 10, None, 11, None, None, 12])) == [[1], [2, 3], [4, 5, 6, 7], [8, 9, 10], [11, 12]]\n assert candidate(root = tree_node([1, 2, 3, None, None, None, 4, 5, 6])) == [[1], [2, 3], [4], [5, 6]]\n assert candidate(root = tree_node([3, 9, 20, 8, None, 15, 7, 10, 11, None, None, 16, 17])) == [[3], [9, 20], [8, 15, 7], [10, 11, 16, 17]]\n assert candidate(root = tree_node([3, 1, 4, None, None, 2, None, 5])) == [[3], [1, 4], [2], [5]]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [[10], [5, 15], [6, 20]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == [[1], [2, 3], [4, 5], [6], [7]]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5])) == [[1], [2], [3], [4], [5]]\n assert candidate(root = tree_node([3, 9, 20, 11, 12, 13, 14, None, None, None, None, 15, None, None, None, 16])) == [[3], [9, 20], [11, 12, 13, 14], [15], [16]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 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(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [[10], [5, 15], [3, 7, 18]]\n assert candidate(root = tree_node([1, None, 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, 11, 12, 13, 14, 15, 16]]\n assert candidate(root = tree_node([3, 9, 20, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])) == [[3], [9, 20], [12, 13, 14, 15], [16, 17, 18, 19, 20, 21, 22, 23]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8])) == [[1], [2, 3], [4, 5], [6, 7, 8]]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == [[1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20]]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == [[6], [2, 8], [0, 4, 7, 9], [3, 5]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, 7])) == [[1], [2, 3], [4, 5], [6], [7]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, None, None, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [[1], [2, 3], [4, 5, 6, 7]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == [[5], [4, 8], [11, 13, 4], [7, 2, 1]]\n assert candidate(root = tree_node([1, None, 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(root = tree_node([1, 2, 3, None, None, 4, 5, None, 6, 7])) == [[1], [2, 3], [4, 5], [6, 7]]\n assert candidate(root = tree_node([3, None, 20, 15, 7])) == [[3], [20], [15, 7]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 10, 8, None, None, None, None, None, 12])) == [[3], [9, 20], [15, 7, 10, 8], [12]]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [[5], [1, 4], [3, 6]]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [2, 3], [4], [5], [6], [7], [8], [9], [10]]\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1])) == [[10], [5, -3], [3, 2, 11], [3, -2, 1]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 18, 19, 21])) == [[3], [9, 20], [15, 7], [18, 19, 21]]\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4, None, None, None, None, 9, 10])) == [[3], [5, 1], [6, 2, 0, 8], [7, 4], [9, 10]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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]]\n assert candidate(root = tree_node([1, None, 2, 3])) == [[1], [2], [3]]\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4])) == [[3], [5, 1], [6, 2, 0, 8], [7, 4]]\n assert candidate(root = tree_node([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(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, 10, 11, 12, 13])) == [[1], [2, 3], [4, 5], [6, 7, 8, 9], [10, 11, 12, 13]]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == [[0], [-1, -2], [-3, -4, -5, -6], [-7, -8, -9, -10, -11, -12, -13, -14], [-15]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, 7])) == [[1], [2, 3], [4, 5], [6, 7]]\n assert candidate(root = tree_node([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(root = tree_node([3, 9, 20, 15, 7, 10, 8, 13, 14, 15, None, None, None, None, None, None, None, None, 16])) == [[3], [9, 20], [15, 7, 10, 8], [13, 14, 15], [16]]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == [[1], [2, 2], [3, 4, 4, 3]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == [[1], [2], [3], [4], [5]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == [[1], [2, 3], [4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4])) == [[1], [2, 2], [3, 3], [4, 4]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, 7, None, None, 8, None, 9])) == [[1], [2, 3], [4, 5, 6], [7, 8], [9]]\n assert candidate(root = tree_node([0, -1, 2, -2, None, 1, None, -3, None, None, -4])) == [[0], [-1, 2], [-2, 1], [-3, -4]]\n assert candidate(root = tree_node([3, 9, 20, None, 17, 15, 7])) == [[3], [9, 20], [17, 15, 7]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8])) == [[1], [2, 3], [4, 5, 6], [7, 8]]\n assert candidate(root = tree_node([0, -1, 2, -2, None, -3, None, -4, -5])) == [[0], [-1, 2], [-2, -3], [-4, -5]]\n assert candidate(root = tree_node([3, 9, 20, 8, 10, None, 17, 1, None, None, 18, 2, 5, None, None, None, 4, 6])) == [[3], [9, 20], [8, 10, 17], [1, 18, 2, 5], [4, 6]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == [[5], [4, 8], [11, 13, 4], [7, 2, 5, 1]]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().levelOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> levelOrder(TreeNode* root) {", "container": "Solution", "callable": "levelOrder", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 103, "task_id": "binary-tree-zigzag-level-order-traversal", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between).\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: [[3],[20,9],[15,7]]\n\nExample 2:\n\nInput: root = [1]\nOutput: [[1]]\n\nExample 3:\n\nInput: root = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 2000].\n-100 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [[1], [3, 2], [4, 5, 6, 7]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [[1], [2], [3], [4], [5]]\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4])) == [[3], [1, 5], [6, 2, 0, 8], [4, 7]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == [[3], [20, 9], [15, 7]]\n assert candidate(root = tree_node([1])) == [[1]]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]\n assert candidate(root = tree_node([1, None, 2, None, None, None, None, 3, None, None, None, None, None, 4])) == [[1], [2]]\n assert candidate(root = tree_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == [[10], [8, 9], [7, 6, 5, 4], [1, 2, 3]]\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == [[1], [2, 2], [3, 3], [4, 4]]\n assert candidate(root = tree_node([1, None, 3, None, None, 2, None])) == [[1], [3]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, None, None, 6, 9])) == [[10], [15, 5], [3, 7, 18], [9, 6]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [[1], [2], [3], [4], [5], [6], [7], [8], [9]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, 10, 11, 12, 13, None, None, 14, 15, 16, 17, 18, 19, 20])) == [[1], [3, 2], [4, 5, 6, 7], [13, 12, 11, 10, 9, 8], [14, 15, 16, 17, 18, 19, 20]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [[1], [2], [3], [4], [5], [6], [7], [8]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, 8, None, 9, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == [[1], [3, 2], [4, 5, 6], [9, 8, 7], [10, 11, 12], [15, 14, 13], [16, 17, 18], [20, 19]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, None, None, None, 6, None, 7, None, 8, None, 9])) == [[1], [3, 2], [4, 5]]\n assert candidate(root = tree_node([1, None, 2, 3, 4, None, None, 5, 6])) == [[1], [2], [3, 4], [6, 5]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, 9, None, 11, None, None, 14, 15])) == [[1], [3, 2], [4, 7], [11, 9, 8], [14, 15]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == [[1], [3, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, None, 6, 8, 14, 16, 19, None, None, None, None, None, None, None, None])) == [[10], [15, 5], [3, 7, 18], [14, 8, 6, 1], [16, 19]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, 7, None, 8, None, 9])) == [[1], [3, 2], [4, 5], [6], [7], [8], [9]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, 16, None, 17, None, None, 18, None, 19])) == [[1], [3, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8], [16, 17, 18, 19]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, None, 9, None, None, 10, 11, None, None, 12, None, 13, None, 14, None, None, 15])) == [[1], [3, 2], [4, 5, 6, 7], [8], [9], [10], [11], [12], [13], [14]]\n assert candidate(root = tree_node([3, 1, 4, 3, None, 1, 5])) == [[3], [4, 1], [3, 1, 5]]\n assert candidate(root = tree_node([8, 15, 10, 7, None, 12, 3, 2, None, 11, 13, None, None, 4, None, 5])) == [[8], [10, 15], [7, 12, 3], [13, 11, 2], [4, 5]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, 9])) == [[1], [3, 2], [4, 5, 6, 7], [9, 8]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, 10, 11, 12, 13])) == [[1], [3, 2], [4, 5], [9, 8, 7, 6], [10, 11, 12, 13]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 10, 8, 11, 12, 13, 14, 16, 17, 18, 19])) == [[3], [20, 9], [15, 7, 10, 8], [19, 18, 17, 16, 14, 13, 12, 11]]\n assert candidate(root = tree_node([2, 1, 3, 4, None, 5, 7, None, None, None, 6, None, 8, 9, 10])) == [[2], [3, 1], [4, 5, 7], [8, 6], [9, 10]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 8, 12, None, None, None, None, None, None, 14])) == [[3], [20, 9], [15, 7, 8, 12], [14]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, None, 13, 14, None, 18, 19, 20])) == [[3], [20, 9], [15, 7], [14, 13, 12], [18, 19, 20]]\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 6, 9, 1, 7, None, 10, None, None, None, None, 11, 12])) == [[5], [8, 3], [2, 4, 6, 9], [10, 7, 1], [11, 12]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8, 9, 10])) == [[1], [3, 2], [4, 5, 6], [8, 7], [9, 10]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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], [3, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9, None, None, 10, 11, None, None, 12, 13])) == [[1], [3, 2], [4, 5], [7, 6], [8, 9], [11, 10], [12, 13]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9])) == [[1], [3, 2], [4, 5], [7, 6], [8, 9]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [[1], [3, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8], [16, 17, 18, 19, 20]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, None, 6, None, None, 7, None, None, 8])) == [[1], [3, 2], [4, 5], [6]]\n assert candidate(root = tree_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, None, None, 180, 190])) == [[10], [30, 20], [40, 50, 60, 70], [150, 140, 130, 120, 110, 100, 90, 80], [180, 190]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [[1], [3, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, None, None, 9, 10])) == [[1], [3, 2], [4, 5, 6, 7], [8], [9], [10]]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, 5])) == [[1], [2]]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, None, None, None, None, None, None, 5, 5])) == [[1], [2, 2], [3, 4, 4, 3], [5, 5]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, 9, None, 12, None, 14, None, None, 15])) == [[1], [3, 2], [4, 7], [12, 9, 8], [14, 15]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == [[10], [15, 5], [3, 7, 18], [6, 1]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, None, 9, None, 10, None, 11])) == [[1], [3, 2], [4, 5, 6, 7], [10, 9, 8], [11]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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, 2], [4, 5, 6, 7], [15, 14, 13, 12, 11, 10, 9, 8], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31], [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7, None, 8])) == [[1], [3, 2], [4, 5], [6], [7], [8]]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, None, None, None, 4])) == [[1], [2]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, None, None, 16, 17, 18, 19])) == [[3], [20, 9], [15, 7]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, 6, None, None, 7, 8, None, None, None, None, 9])) == [[1], [3, 2], [4, 5], [6], [7, 8]]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [[5], [4, 1], [3, 6]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, None, None, None, 14, 15, None, None, 16, 17])) == [[1], [3, 2], [4, 5, 6, 7], [13, 12, 11, 10, 9, 8], [14, 15, 16, 17]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, 7, 8, 9, 10, None, None, None, None, 11, 12, 13, None, None, 14, None, 15])) == [[1], [3, 2], [4, 5], [9, 8, 7, 6], [10, 11, 12, 13], [15, 14]]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, None, 13, 19, None, None, None, None, 18])) == [[7], [15, 3], [9, 20], [8], [13, 19]]\n assert candidate(root = tree_node([3, 1, None, None, 2, None, 3, None, None, 4, None, 5, None, 6])) == [[3], [1], [2], [3]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, None, None, 10, None, None, 11, 12])) == [[1], [3, 2], [4, 5, 6, 7], [10, 9, 8], [11, 12]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, None, None, 12, 13, 14, 15, None, None, 16, 17])) == [[1], [3, 2], [4, 5, 6, 7], [11, 10, 9, 8], [12, 13, 14, 15, 16, 17]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [3, 2], [4, 5], [7, 6], [8, 9], [10]]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == [[0], [-2, -1], [-3, -4, -5, -6], [-14, -13, -12, -11, -10, -9, -8, -7], [-15]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [[1], [2], [3], [4], [5], [6], [7]]\n assert candidate(root = tree_node([100, -50, -20, None, -10, None, None, -15])) == [[100], [-20, -50], [-10], [-15]]\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == [[0], [4, 2], [1, 3, -1], [8, 6, 1, 5]]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9, None, None, None, None, 10, 11])) == [[1], [3, 2], [4, 5], [7, 6], [8, 9]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7, None, None, 8, None, None, 9])) == [[1], [3, 2], [4, 5], [6], [7], [8]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, None, 13, None, None, 16, 17])) == [[1], [3, 2], [4, 5, 6, 7], [13, 11, 10, 9, 8], [16, 17]]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 6, 10, None, 2, None, None, None, None, None, 9, None, 11])) == [[5], [8, 3], [1, 4, 6, 10], [9, 2], [11]]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [3, 2], [4, 5], [7, 6], [8, 9], [10]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == [[1], [3, 2], [4, 5, 6], [9, 8, 7], [10, 11, 12]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, 10, 11, 12, None, None, None, None, None, 13])) == [[1], [3, 2], [4, 5, 6, 7], [12, 11, 10, 9, 8], [13]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, None, 9, 10, None, None, 11, 12])) == [[1], [3, 2], [4, 5], [8, 7, 6], [9, 10, 11, 12]]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, 6, None, 7, None, 8, None, 9])) == [[1], [2], [3], [4], [5, 6], [8, 7], [9]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, 9, None, None, 10, None, None, 11, 12, None, None, 13, None, None, None, None, 14])) == [[1], [3, 2], [4, 5, 6, 7], [9, 8], [10], [11], [12], [13]]\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 7, 8, None, 11, None, 14])) == [[1], [3, 2], [5, 7], [11, 8], [14]]\n assert candidate(root = tree_node([5, 4, 1, None, 1, 2, None, 2, 3, None, 4, None, 5])) == [[5], [1, 4], [1, 2], [4, 3, 2], [5]]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == [[1], [2, 2], [3, 4, 4, 3]]\n assert candidate(root = tree_node([0, -1, 2, -2, None, -3, None, -4, None, -5, None, -6, None, -7, None])) == [[0], [2, -1], [-2, -3], [-5, -4], [-6, -7]]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, None, None, 5, 5, 5, 5, None, None, None, None, None, None, None, None, None, None])) == [[1], [2, 2], [3, 3, 3, 3], [4, 4, 4, 4, 4, 4, 4, 4], [5, 5, 5, 5]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, None, 7, 8, None, None, 9, 10])) == [[1], [3, 2], [4, 5, 6], [8, 7], [9, 10]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, None, None, 6, None, 16, 20, None, None, 19])) == [[10], [15, 5], [3, 7, 18], [20, 16, 6], [19]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, 10, None, None, 11, 12])) == [[1], [3, 2], [4, 5, 6, 7], [11, 10, 9, 8], [12]]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().zigzagLevelOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> zigzagLevelOrder(TreeNode* root) {", "container": "Solution", "callable": "zigzagLevelOrder", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 104, "task_id": "maximum-depth-of-binary-tree", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return its maximum depth.\nA binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: 3\n\nExample 2:\n\nInput: root = [1,null,2]\nOutput: 2\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 104].\n-100 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == 3\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 5, 5])) == 4\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 4\n assert candidate(root = tree_node([1, None, 3, 2, None, 4, 5])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == 3\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, None, 8])) == 4\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4])) == 4\n assert candidate(root = tree_node([1, None, 2])) == 2\n assert candidate(root = tree_node([1, None, None, 2, None, None, 3, None, None, 4, None, None, 5])) == 1\n assert candidate(root = tree_node([0])) == 1\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == 3\n assert candidate(root = tree_node([1])) == 1\n assert candidate(root = tree_node([])) == 0\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 8, None, 6, None, 4, None, 1, None])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 10\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == 4\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 16, 8, 13, 14, 18, 19, 20, 21, 22, 23])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == 5\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == 3\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9])) == 4\n assert candidate(root = tree_node([1, -2, -3, 4, 5, -6, -7, 8, 9, -10, -11, -12, -13, -14, -15])) == 4\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, 16, None, 17, None, None, None, None, 18])) == 4\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == 15\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 9\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, 8, None, None, None, None, None, 9])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == 8\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14])) == 8\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 10, 11, None, 12])) == 4\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, None, None, 7, 8, 9])) == 6\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == 8\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 16, 17, 18, 19, None, None, 20, None])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 5\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 8, None, 6, None, 4, None, 1, None, 2])) == 6\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6])) == 3\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 6, None, None, 6, 5])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, 16])) == 5\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, None, 6, 7, None, None, 8, 9])) == 5\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, None, 6, None, 7])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 11, 12, 13])) == 5\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, None, None, None, None, 17, 20])) == 4\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 5, None, None, 4, 5])) == 5\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 8, None, 9, None, None, 10])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 8, 9, 10, None, None, 11, 12])) == 5\n assert candidate(root = tree_node([2, -1, -2, None, -3, None, -4, None, -5])) == 4\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7])) == 4\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30, None, 31, None, 32])) == 32\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 7, 12, 13, 14, 15])) == 4\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 8, 10, 11, None, 12])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, None, 8, None, 9])) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 5\n assert candidate(root = tree_node([3, 9, None, 15, 7, 25, 30, 35, None, None, None, 40, None, None, None, None, 45])) == 6\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 6\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([5, 4, 7, 3, None, 2, None, -1, None, 9])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 7, 8, 9])) == 5\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 6\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 8, 9])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, None, 7, None, 8])) == 6\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, None, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 9\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, None, None, 6, None, None, 7, None, None, 8, None, None, 9])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, None, None, None, 9])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, 9, None, 10, None, 11, None, 12])) == 5\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 1, None, 18, None, None, 21])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 7\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, None, None, 9, None, None, None, None, 10])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, 7, None, 8, None, 9])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, None, None, None, None, None, None, 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(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == 15\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 16, 17, None, None, None, None, 18])) == 4\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, None, None, 4, 4])) == 5\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, None, None, 7, 8, 9, 10, None, None, 11, 12])) == 5\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 65, 100, None, None, 30, 40, 60, 80, None, None, None, None, 90, 110])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == 20\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == 4\n assert candidate(root = tree_node([3, 9, 20, 8, 10, 15, 7, 6, None, None, None, None, 18])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 6\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == 6\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 16, 17, None, None, 18, 19])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 7\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, None, None, 10, 11, None, None, 12, 13, None, None, 14, 15])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == 12\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, None, None, 5, 5])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])) == 13\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 9\n assert candidate(root = tree_node([3, 9, 20, 15, 7, None, None, 8, None, None, None, None, 10])) == 5\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 11\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, None, 10])) == 4\n assert candidate(root = tree_node([1, None, None, None, None, None, None])) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, None, None, 10, 11, 12, None, None, 13, 14, 15, None, None, None, None, None, None, 16])) == 6\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, 7, None, None, None, None, None, None, 8, 9])) == 4\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, None, 10, None, 11])) == 5\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == 4\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().maxDepth", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxDepth(TreeNode* root) {", "container": "Solution", "callable": "maxDepth", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 105, "task_id": "construct-binary-tree-from-preorder-and-inorder-traversal", "difficulty": "Medium", "problem_description": "Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree.\n \nExample 1:\n\n\nInput: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]\nOutput: [3,9,20,null,null,15,7]\n\nExample 2:\n\nInput: preorder = [-1], inorder = [-1]\nOutput: [-1]\n\n \nConstraints:\n\n1 <= preorder.length <= 3000\ninorder.length == preorder.length\n-3000 <= preorder[i], inorder[i] <= 3000\npreorder and inorder consist of unique values.\nEach value of inorder also appears in preorder.\npreorder is guaranteed to be the preorder traversal of the tree.\ninorder is guaranteed to be the inorder traversal of the tree.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(preorder = [3, 9, 20, 15, 7],inorder = [9, 3, 15, 20, 7]), tree_node([3, 9, 20, None, None, 15, 7]))\n assert is_same_tree(candidate(preorder = [1, 2, 4, 5, 3, 6, 7],inorder = [4, 2, 5, 1, 6, 3, 7]), tree_node([1, 2, 3, 4, 5, 6, 7]))\n assert is_same_tree(candidate(preorder = [-1],inorder = [-1]), tree_node([-1]))\n assert is_same_tree(candidate(preorder = [1, 2, 3],inorder = [2, 1, 3]), tree_node([1, 2, 3]))\n assert is_same_tree(candidate(preorder = [1, 2],inorder = [2, 1]), tree_node([1, 2]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 1, 4, 2, 6, 7, 12, 10, 9, 11, 15, 13, 14, 16, 18, 17, 19],inorder = [1, 3, 2, 4, 5, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]), tree_node([8, 5, 12, 3, 6, 10, 15, 1, 4, 7, None, 9, 11, 13, 16, None, None, 2, None, None, None, None, None, None, None, None, 14, None, 18, None, None, None, None, 17, 19]))\n assert is_same_tree(candidate(preorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15]))\n assert is_same_tree(candidate(preorder = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],inorder = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]), tree_node([1, None, 3, None, 5, None, 7, None, 9, None, 11, None, 13, None, 15, None, 17, None, 19, None, 21, None, 23, None, 25, None, 27, None, 29]))\n assert is_same_tree(candidate(preorder = [8, 3, 1, 6, 4, 7, 10, 14, 13],inorder = [1, 3, 4, 6, 7, 8, 10, 13, 14]), tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13]))\n assert is_same_tree(candidate(preorder = [20, 10, 5, 3, 2, 1, 7, 6, 15, 12, 11, 14, 18, 16, 17, 25, 22, 21, 23, 27, 26, 28, 29],inorder = [1, 2, 3, 5, 6, 7, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 26, 27, 28, 29]), tree_node([20, 10, 25, 5, 15, 22, 27, 3, 7, 12, 18, 21, 23, 26, 28, 2, None, 6, None, 11, 14, 16, None, None, None, None, None, None, None, None, 29, 1, None, None, None, None, None, None, None, None, 17]))\n assert is_same_tree(candidate(preorder = [150, 75, 30, 15, 25, 60, 45, 55, 90, 80, 120, 110, 130, 200, 175, 160, 180, 225, 210, 230],inorder = [15, 25, 30, 45, 55, 60, 75, 80, 90, 110, 120, 130, 150, 160, 175, 180, 200, 210, 225, 230]), tree_node([150, 75, 200, 30, 90, 175, 225, 15, 60, 80, 120, 160, 180, 210, 230, None, 25, 45, None, None, None, 110, 130, None, None, None, None, None, None, None, None, None, None, None, 55]))\n assert is_same_tree(candidate(preorder = [10, 8, 7, 9, 15, 12, 11, 13, 14, 20, 18, 17, 19, 25, 22, 23, 24, 27, 26, 28, 29],inorder = [7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29]), tree_node([10, 8, 15, 7, 9, 12, 20, None, None, None, None, 11, 13, 18, 25, None, None, None, 14, 17, 19, 22, 27, None, None, None, None, None, None, None, 23, 26, 28, None, 24, None, None, None, 29]))\n assert is_same_tree(candidate(preorder = [5, 3, 2, 1, 4, 7, 6, 8, 10, 9, 11],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, None, 10, None, None, 9, 11]))\n assert is_same_tree(candidate(preorder = [10, 6, 4, 3, 5, 8, 7, 9, 15, 12, 11, 13, 14],inorder = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([10, 6, 15, 4, 8, 12, None, 3, 5, 7, 9, 11, 13, None, None, None, None, None, None, None, None, None, None, None, 14]))\n assert is_same_tree(candidate(preorder = [15, 6, 3, 2, 5, 7, 18, 13, 20, 17, 19],inorder = [2, 3, 5, 6, 7, 15, 13, 18, 17, 19, 20]), tree_node([15, 6, 18, 3, 7, 13, 20, 2, 5, None, None, None, None, 17, None, None, None, None, None, None, 19]))\n assert is_same_tree(candidate(preorder = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14],inorder = [2, 4, 5, 3, 6, 7, 1, 10, 11, 8, 12, 13, 9, 14, 15]), tree_node([1, 3, 9, 2, 7, 8, 15, None, 5, 6, None, 11, 13, 14, None, 4, None, None, None, 10, None, 12]))\n assert is_same_tree(candidate(preorder = [50, 20, 10, 5, 1, 2, 30, 25, 22, 23, 35, 32, 31, 33, 40, 38, 39, 60, 55, 52, 51, 53, 58, 56, 57, 65, 62, 61, 63, 68, 66, 67, 69],inorder = [1, 2, 5, 10, 20, 22, 23, 25, 30, 31, 32, 33, 35, 38, 39, 40, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 63, 65, 66, 67, 68, 69]), tree_node([50, 20, 60, 10, 30, 55, 65, 5, None, 25, 35, 52, 58, 62, 68, 1, None, 22, None, 32, 40, 51, 53, 56, None, 61, 63, 66, 69, None, 2, None, 23, 31, 33, 38, None, None, None, None, None, None, 57, None, None, None, None, None, 67, None, None, None, None, None, None, None, None, None, None, None, 39]))\n assert is_same_tree(candidate(preorder = [25, 15, 10, 5, 3, 2, 4, 12, 11, 13, 30, 28, 27, 29, 35, 33, 32, 34, 37, 36, 38],inorder = [2, 3, 4, 5, 10, 12, 11, 13, 15, 30, 27, 28, 29, 25, 32, 33, 34, 35, 36, 38, 37]), tree_node([25, 15, 35, 10, 30, 33, 37, 5, 12, None, 28, 32, 34, 36, None, 3, None, None, 11, 27, 29, None, None, None, None, None, 38, 2, 4, None, 13]))\n assert is_same_tree(candidate(preorder = [10, 5, 1, 3, 7, 6, 8, 15, 12, 11, 13, 18, 17, 20, 19],inorder = [1, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 17, 18, 19, 20]), tree_node([10, 5, 15, 1, 7, 12, 18, None, 3, 6, 8, 11, 13, 17, 20, None, None, None, None, None, None, None, None, None, None, None, None, 19]))\n assert is_same_tree(candidate(preorder = [10, 6, 2, 1, 3, 8, 5, 7, 12, 11, 13],inorder = [1, 2, 3, 6, 5, 7, 8, 10, 11, 12, 13]), tree_node([10, 6, 12, 2, 8, 11, 13, 1, 3, 5, None, None, None, None, None, None, None, None, None, None, 7]))\n assert is_same_tree(candidate(preorder = [8, 5, 9, 7, 3, 6, 2, 4, 1, 10, 11],inorder = [9, 5, 7, 8, 6, 3, 2, 4, 1, 10, 11]), tree_node([8, 5, 3, 9, 7, 6, 2, None, None, None, None, None, None, None, 4, None, 1, None, 10, None, 11]))\n assert is_same_tree(candidate(preorder = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([1, None, 3, 2, 5, None, None, 4, 7, None, None, 6, 9, None, None, 8, 11, None, None, 10, 13, None, None, 12, 15, None, None, 14]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 1, 4, 7, 6, 9, 12, 10, 11, 14, 13, 15],inorder = [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([8, 5, 9, 3, 7, None, 12, 1, 4, 6, None, 10, 14, None, None, None, None, None, None, None, 11, 13, 15]))\n assert is_same_tree(candidate(preorder = [20, 10, 5, 3, 7, 15, 13, 18, 25, 22, 27],inorder = [3, 5, 7, 10, 13, 15, 18, 20, 22, 25, 27]), tree_node([20, 10, 25, 5, 15, 22, 27, 3, 7, 13, 18]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 2, 4, 7, 6, 9, 12, 10, 11, 14, 13, 15, 17, 16, 18],inorder = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]), tree_node([8, 5, 9, 3, 7, None, 12, 2, 4, 6, None, 10, 14, None, None, None, None, None, None, None, 11, 13, 15, None, None, None, None, None, 17, 16, 18]))\n assert is_same_tree(candidate(preorder = [20, 10, 5, 1, 6, 15, 12, 18, 30, 25, 35],inorder = [1, 5, 6, 10, 12, 15, 18, 20, 25, 30, 35]), tree_node([20, 10, 30, 5, 15, 25, 35, 1, 6, 12, 18]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 1, 4, 7, 6, 9, 12, 10, 11, 13],inorder = [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]), tree_node([8, 5, 9, 3, 7, None, 12, 1, 4, 6, None, 10, 13, None, None, None, None, None, None, None, 11]))\n assert is_same_tree(candidate(preorder = [50, 30, 20, 10, 15, 40, 35, 37, 45, 60, 55, 52, 57, 70, 65, 75],inorder = [10, 15, 20, 30, 35, 37, 40, 45, 50, 52, 55, 57, 60, 65, 70, 75]), tree_node([50, 30, 60, 20, 40, 55, 70, 10, None, 35, 45, 52, 57, 65, 75, None, 15, None, 37]))\n assert is_same_tree(candidate(preorder = [7, 3, 1, 0, -1, 2, 5, 4, 6, 9, 8, 10, 11, 13, 12, 15, 14, 16, 18, 17, 20, 19, 22, 21, 23],inorder = [-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]), tree_node([7, 3, 9, 1, 5, 8, 10, 0, 2, 4, 6, None, None, None, 11, -1, None, None, None, None, None, None, None, None, 13, None, None, 12, 15, None, None, 14, 16, None, None, None, 18, 17, 20, None, None, 19, 22, None, None, 21, 23]))\n assert is_same_tree(candidate(preorder = [34, 23, 12, 9, 7, 8, 15, 13, 14, 26, 25, 27, 36, 35, 37, 45, 40, 42, 41, 43, 47, 46, 48],inorder = [7, 8, 9, 12, 13, 14, 15, 23, 25, 26, 27, 34, 35, 36, 37, 40, 41, 42, 43, 45, 46, 47, 48]), tree_node([34, 23, 36, 12, 26, 35, 37, 9, 15, 25, 27, None, None, None, 45, 7, None, 13, None, None, None, None, None, 40, 47, None, 8, None, 14, None, 42, 46, 48, None, None, None, None, 41, 43]))\n assert is_same_tree(candidate(preorder = [10, 5, 1, 3, 7, 6, 9, 8, 20, 15, 12, 18, 25],inorder = [1, 3, 5, 6, 7, 8, 9, 10, 12, 15, 18, 20, 25]), tree_node([10, 5, 20, 1, 7, 15, 25, None, 3, 6, 9, 12, 18, None, None, None, None, None, None, 8]))\n assert is_same_tree(candidate(preorder = [20, 10, 5, 3, 7, 15, 12, 18, 25, 22, 27],inorder = [3, 5, 7, 10, 12, 15, 18, 20, 22, 25, 27]), tree_node([20, 10, 25, 5, 15, 22, 27, 3, 7, 12, 18]))\n assert is_same_tree(candidate(preorder = [30, 15, 10, 5, 7, 25, 20, 18, 27, 40, 35, 32, 38, 50, 45, 55],inorder = [5, 7, 10, 15, 18, 20, 25, 27, 30, 32, 35, 38, 40, 45, 50, 55]), tree_node([30, 15, 40, 10, 25, 35, 50, 5, None, 20, 27, 32, 38, 45, 55, None, 7, 18]))\n assert is_same_tree(candidate(preorder = [100, 75, 60, 40, 50, 90, 80, 120, 110, 130],inorder = [40, 50, 60, 75, 80, 90, 100, 110, 120, 130]), tree_node([100, 75, 120, 60, 90, 110, 130, 40, None, 80, None, None, None, None, None, None, 50]))\n assert is_same_tree(candidate(preorder = [50, 30, 20, 10, 40, 70, 60, 90, 80, 110],inorder = [10, 20, 30, 40, 50, 60, 70, 80, 90, 110]), tree_node([50, 30, 70, 20, 40, 60, 90, 10, None, None, None, None, None, 80, 110]))\n assert is_same_tree(candidate(preorder = [20, 10, 5, 3, 1, 7, 15, 12, 9, 14, 18, 17, 25, 23, 22, 24, 30, 28, 27, 29, 32, 31],inorder = [1, 3, 5, 7, 10, 9, 12, 14, 15, 20, 22, 23, 24, 25, 17, 18, 27, 28, 29, 30, 31, 32]), tree_node([20, 10, 18, 5, 15, 17, 30, 3, 7, 12, None, 25, None, 28, 32, 1, None, None, None, 9, 14, 23, None, 27, 29, 31, None, None, None, None, None, None, None, 22, 24]))\n assert is_same_tree(candidate(preorder = [5, 3, 1, 4, 8, 6, 7, 10, 9],inorder = [1, 3, 4, 5, 6, 7, 8, 9, 10]), tree_node([5, 3, 8, 1, 4, 6, 10, None, None, None, None, None, 7, 9]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 1, 4, 7, 6, 9, 10, 11],inorder = [1, 3, 4, 5, 6, 7, 8, 9, 10, 11]), tree_node([8, 5, 9, 3, 7, None, 10, 1, 4, 6, None, None, 11]))\n assert is_same_tree(candidate(preorder = [100, 50, 25, 10, 30, 75, 60, 80, 150, 125, 175],inorder = [10, 25, 30, 50, 60, 75, 80, 100, 125, 150, 175]), tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80]))\n assert is_same_tree(candidate(preorder = [30, 15, 7, 3, 9, 22, 18, 20, 25, 40, 35, 37, 45, 50],inorder = [3, 7, 9, 15, 18, 20, 22, 25, 30, 35, 37, 40, 45, 50]), tree_node([30, 15, 40, 7, 22, 35, 45, 3, 9, 18, 25, None, 37, None, 50, None, None, None, None, None, 20]))\n assert is_same_tree(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],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]), tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 2, 4, 7, 6, 9, 11, 10, 12],inorder = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), tree_node([8, 5, 9, 3, 7, None, 11, 2, 4, 6, None, 10, 12]))\n assert is_same_tree(candidate(preorder = [10, 5, 1, 2, 6, 3, 4, 8, 7, 9, 11, 12],inorder = [1, 2, 5, 3, 4, 6, 10, 7, 8, 9, 11, 12]), tree_node([10, 5, 8, 1, 6, 7, 9, None, 2, 3, None, None, None, None, 11, None, None, None, 4, None, 12]))\n assert is_same_tree(candidate(preorder = [5, 2, 1, 3, 4, 8, 6, 7, 9],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9]), tree_node([5, 2, 8, 1, 3, 6, 9, None, None, None, 4, None, 7]))\n assert is_same_tree(candidate(preorder = [21, 15, 10, 8, 12, 17, 16, 18, 25, 23, 24, 28, 27, 29, 30],inorder = [8, 10, 12, 15, 16, 17, 18, 21, 23, 24, 25, 27, 28, 29, 30]), tree_node([21, 15, 25, 10, 17, 23, 28, 8, 12, 16, 18, None, 24, 27, 29, None, None, None, None, None, None, None, None, None, None, None, None, None, 30]))\n assert is_same_tree(candidate(preorder = [7, 3, 1, 5, 4, 6, 10, 9, 11, 14, 12, 13, 15],inorder = [1, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15]), tree_node([7, 3, 10, 1, 5, 9, 11, None, None, 4, 6, None, None, None, 14, None, None, None, None, 12, 15, None, 13]))\n assert is_same_tree(candidate(preorder = [1, 2, 3, 4, 5, 6, 7, 8, 9],inorder = [9, 8, 7, 6, 5, 4, 3, 2, 1]), tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]))\n assert is_same_tree(candidate(preorder = [15, 5, 3, 2, 1, 4, 7, 6, 8, 10, 9, 11, 20, 18, 17, 19, 25, 23, 22, 24, 30, 28, 27, 29, 32, 31],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 15, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32]), tree_node([15, 5, 20, 3, 7, 18, 25, 2, 4, 6, 8, 17, 19, 23, 30, 1, None, None, None, None, None, None, 10, None, None, None, None, 22, 24, 28, 32, None, None, None, 9, None, None, None, None, 27, 29, 31, None, None, 11]))\n assert is_same_tree(candidate(preorder = [10, 5, 1, 7, 6, 11, 15, 12, 20, 18, 25],inorder = [1, 5, 6, 7, 10, 11, 12, 15, 18, 20, 25]), tree_node([10, 5, 11, 1, 7, None, 15, None, None, 6, None, 12, 20, None, None, None, None, 18, 25]))\n assert is_same_tree(candidate(preorder = [50, 30, 20, 10, 25, 40, 35, 45, 70, 60, 80],inorder = [10, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80]), tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45]))\n assert is_same_tree(candidate(preorder = [40, 20, 10, 5, 3, 8, 15, 13, 18, 30, 25, 28, 50, 45, 42, 47, 55, 52, 58],inorder = [3, 5, 8, 10, 13, 15, 18, 20, 25, 28, 30, 40, 42, 45, 47, 50, 52, 55, 58]), tree_node([40, 20, 50, 10, 30, 45, 55, 5, 15, 25, None, 42, 47, 52, 58, 3, 8, 13, 18, None, 28]))\n assert is_same_tree(candidate(preorder = [8, 5, 3, 1, 4, 6, 7, 12, 10, 9, 11, 14, 13, 15],inorder = [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([8, 5, 12, 3, 6, 10, 14, 1, 4, None, 7, 9, 11, 13, 15]))\n assert is_same_tree(candidate(preorder = [60, 30, 15, 5, 25, 45, 40, 50, 90, 80, 100, 95, 110],inorder = [5, 15, 25, 30, 40, 45, 50, 60, 80, 90, 95, 100, 110]), tree_node([60, 30, 90, 15, 45, 80, 100, 5, 25, 40, 50, None, None, 95, 110]))\n assert is_same_tree(candidate(preorder = [25, 15, 10, 5, 3, 7, 12, 20, 18, 17, 19, 30, 28, 27, 29, 32, 31],inorder = [3, 5, 7, 10, 12, 15, 17, 18, 19, 20, 25, 27, 28, 29, 30, 31, 32]), tree_node([25, 15, 30, 10, 20, 28, 32, 5, 12, 18, None, 27, 29, 31, None, 3, 7, None, None, 17, 19]))\n assert is_same_tree(candidate(preorder = [25, 15, 10, 5, 12, 20, 17, 30, 27, 32, 35],inorder = [5, 10, 12, 15, 17, 20, 25, 27, 30, 32, 35]), tree_node([25, 15, 30, 10, 20, 27, 32, 5, 12, 17, None, None, None, None, 35]))\n assert is_same_tree(candidate(preorder = [50, 20, 10, 5, 15, 40, 25, 30, 35, 70, 60, 55, 65, 80, 75, 85],inorder = [5, 10, 15, 20, 25, 30, 35, 40, 50, 55, 60, 65, 70, 75, 80, 85]), tree_node([50, 20, 70, 10, 40, 60, 80, 5, 15, 25, None, 55, 65, 75, 85, None, None, None, None, None, 30, None, None, None, None, None, None, None, None, None, 35]))\n assert is_same_tree(candidate(preorder = [7, 3, 1, 2, 5, 4, 6, 15, 9, 8, 10, 20, 18, 19, 25],inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 18, 19, 20, 25]), tree_node([7, 3, 15, 1, 5, 9, 20, None, 2, 4, 6, 8, 10, 18, 25, None, None, None, None, None, None, None, None, None, None, None, 19]))\n assert is_same_tree(candidate(preorder = [50, 25, 10, 5, 3, 7, 20, 15, 30, 27, 35, 40, 45, 55],inorder = [3, 5, 7, 10, 15, 20, 25, 27, 30, 35, 40, 45, 50, 55]), tree_node([50, 25, 55, 10, 30, None, None, 5, 20, 27, 35, 3, 7, 15, None, None, None, None, 40, None, None, None, None, None, None, None, 45]))\n assert is_same_tree(candidate(preorder = [10, 5, 1, 2, 3, 8, 6, 7, 15, 13, 12, 14, 20, 18, 17, 19, 25, 23, 22, 24, 28, 27, 26, 29],inorder = [1, 2, 3, 5, 6, 7, 8, 10, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29]), tree_node([10, 5, 15, 1, 8, 13, 20, None, 2, 6, None, 12, 14, 18, 25, None, 3, None, 7, None, None, None, None, 17, 19, 23, 28, None, None, None, None, None, None, None, None, 22, 24, 27, 29, None, None, None, None, 26]))\n assert is_same_tree(candidate(preorder = [25, 15, 10, 4, 12, 6, 8, 20, 16, 22, 28, 27, 30, 32],inorder = [4, 10, 6, 8, 12, 15, 16, 20, 22, 25, 27, 28, 30, 32]), tree_node([25, 15, 28, 10, 20, 27, 30, 4, 12, 16, 22, None, None, None, 32, None, None, 6, None, None, None, None, None, None, None, None, 8]))\n assert is_same_tree(candidate(preorder = [10, 5, 2, 1, 3, 8, 6, 7, 15, 12, 11, 13, 20, 18, 19, 25],inorder = [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 18, 19, 20, 25]), tree_node([10, 5, 15, 2, 8, 12, 20, 1, 3, 6, None, 11, 13, 18, 25, None, None, None, None, None, 7, None, None, None, None, None, 19]))\n"}, "metadata": {"canonical_parameter_names": ["preorder", "inorder"], "leetcode_dataset_entry_point": "Solution().buildTree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* buildTree(vector& preorder, vector& inorder) {", "container": "Solution", "callable": "buildTree", "parameters": [{"name": "preorder", "type": "vector&"}, {"name": "inorder", "type": "vector&"}], "return_type": "TreeNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 106, "task_id": "construct-binary-tree-from-inorder-and-postorder-traversal", "difficulty": "Medium", "problem_description": "Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder is the postorder traversal of the same tree, construct and return the binary tree.\n \nExample 1:\n\n\nInput: inorder = [9,3,15,20,7], postorder = [9,15,7,20,3]\nOutput: [3,9,20,null,null,15,7]\n\nExample 2:\n\nInput: inorder = [-1], postorder = [-1]\nOutput: [-1]\n\n \nConstraints:\n\n1 <= inorder.length <= 3000\npostorder.length == inorder.length\n-3000 <= inorder[i], postorder[i] <= 3000\ninorder and postorder consist of unique values.\nEach value of postorder also appears in inorder.\ninorder is guaranteed to be the inorder traversal of the tree.\npostorder is guaranteed to be the postorder traversal of the tree.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(inorder = [-1],postorder = [-1]), tree_node([-1]))\n assert is_same_tree(candidate(inorder = [1, 2],postorder = [2, 1]), tree_node([1, None, 2]))\n assert is_same_tree(candidate(inorder = [3, 2, 1],postorder = [3, 2, 1]), tree_node([1, 2, None, 3]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5],postorder = [1, 2, 5, 4, 3]), tree_node([3, 2, 4, 1, None, None, 5]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4],postorder = [1, 2, 4, 3]), tree_node([3, 2, 4, 1]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7],postorder = [1, 3, 2, 5, 7, 6, 4]), tree_node([4, 2, 6, 1, 3, 5, 7]))\n assert is_same_tree(candidate(inorder = [9, 3, 15, 20, 7],postorder = [9, 15, 7, 20, 3]), tree_node([3, 9, 20, None, None, 15, 7]))\n assert is_same_tree(candidate(inorder = [4, 2, 5, 1, 6, 3, 7],postorder = [4, 5, 2, 6, 7, 3, 1]), tree_node([1, 2, 3, 4, 5, 6, 7]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],postorder = [1, 2, 4, 3, 6, 8, 10, 9, 7, 5, 12, 14, 16, 17, 15, 13, 11, 18, 20, 19]), tree_node([19, 18, 20, 11, None, None, None, 5, 13, 3, 7, 12, 15, 2, 4, 6, 9, None, None, 14, 17, 1, None, None, None, None, None, 8, 10, None, None, 16]))\n assert is_same_tree(candidate(inorder = [7, 10, 4, 3, 1, 2, 8, 11, 5, 9, 6],postorder = [7, 10, 4, 3, 11, 8, 9, 5, 6, 2, 1]), tree_node([1, 3, 2, 4, None, None, 6, 10, None, 5, None, 7, None, 8, 9, None, None, None, 11]))\n assert is_same_tree(candidate(inorder = [5, 4, 8, 7, 10, 9, 1, 3, 6, 2],postorder = [5, 8, 10, 9, 7, 4, 6, 3, 2, 1]), tree_node([1, 4, 2, 5, 7, 3, None, None, None, 8, 9, None, 6, None, None, 10]))\n assert is_same_tree(candidate(inorder = [3, 1, 4, 2, 5, 9, 6, 7, 8],postorder = [3, 4, 1, 9, 7, 8, 6, 5, 2]), tree_node([2, 1, 5, 3, 4, None, 6, None, None, None, None, 9, 8, None, None, 7]))\n assert is_same_tree(candidate(inorder = [2, 4, 5, 7, 11, 13, 15, 17, 19, 21, 23, 25],postorder = [2, 5, 4, 11, 15, 13, 7, 23, 25, 21, 19, 17]), tree_node([17, 7, 19, 4, 13, None, 21, 2, 5, 11, 15, None, 25, None, None, None, None, None, None, None, None, 23]))\n assert is_same_tree(candidate(inorder = [1, 2, 5, 3, 4, 6, 8, 7, 9, 11, 10, 12, 13, 14, 15],postorder = [1, 5, 2, 4, 3, 8, 11, 10, 12, 9, 7, 6, 14, 15, 13]), tree_node([13, 6, 15, 3, 7, 14, None, 2, 4, 8, 9, None, None, 1, 5, None, None, None, None, None, 12, None, None, None, None, 10, None, 11]))\n assert is_same_tree(candidate(inorder = [4, 2, 5, 1, 6, 9, 8, 7, 3, 11, 10],postorder = [4, 5, 2, 6, 9, 7, 8, 1, 11, 10, 3]), tree_node([3, 1, 10, 2, 8, 11, None, 4, 5, 9, 7, None, None, None, None, None, None, 6]))\n assert is_same_tree(candidate(inorder = [5, 3, 8, 1, 4, 9, 7, 2, 6, 11, 10, 12],postorder = [5, 8, 3, 9, 4, 1, 11, 12, 10, 6, 2, 7]), tree_node([7, 1, 2, 3, 4, None, 6, 5, 8, None, 9, None, 10, None, None, None, None, None, None, 11, 12]))\n assert is_same_tree(candidate(inorder = [5, 3, 7, 1, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],postorder = [5, 7, 3, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 1]), tree_node([1, 3, 29, 5, 7, 27, None, None, None, None, None, 25, None, 23, None, 21, None, 19, None, 17, None, 15, None, 13, None, 11, None, 9]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],postorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), tree_node([20, 19, None, 18, None, 17, None, 16, None, 15, None, 14, None, 13, None, 12, None, 11, None, 10, None, 9, None, 8, None, 7, None, 6, None, 5, None, 4, None, 3, None, 2, None, 1]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],postorder = [1, 3, 2, 5, 7, 6, 4, 9, 11, 12, 10, 8]), tree_node([8, 4, 10, 2, 6, 9, 12, 1, 3, 5, 7, None, None, 11]))\n assert is_same_tree(candidate(inorder = [16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 23, 1, 24, 6, 25, 12, 26, 3, 27, 7, 28],postorder = [16, 17, 8, 18, 19, 9, 4, 20, 21, 10, 22, 11, 5, 23, 2, 24, 25, 12, 26, 6, 27, 28, 7, 3, 1]), tree_node([1, 2, 3, 4, 23, 6, 7, 8, 9, 5, None, 24, 26, 27, 28, 16, 17, 18, 19, 10, 11, None, None, 12, None, None, None, None, None, None, None, None, None, None, None, None, None, 20, 21, 22, None, 25]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9],postorder = [1, 3, 2, 5, 4, 7, 9, 8, 6]), tree_node([6, 4, 8, 2, 5, 7, 9, 1, 3]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],postorder = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14]), tree_node([14, 12, 15, 10, 13, None, None, 8, 11, None, None, 6, 9, None, None, 4, 7, None, None, 2, 5, None, None, 1, 3]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9],postorder = [1, 2, 4, 3, 6, 8, 9, 7, 5]), tree_node([5, 3, 7, 2, 4, 6, 9, 1, None, None, None, None, None, 8]))\n assert is_same_tree(candidate(inorder = [3, 1, 2, 4, 6, 5, 7],postorder = [3, 2, 1, 6, 7, 5, 4]), tree_node([4, 1, 5, 3, 2, 6, 7]))\n assert is_same_tree(candidate(inorder = [3, 9, 20, 15, 7, 10, 25, 30],postorder = [3, 15, 7, 20, 10, 30, 25, 9]), tree_node([9, 3, 25, None, None, 10, 30, 20, None, None, None, None, 7, 15]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],postorder = [1, 3, 2, 5, 4, 7, 6, 9, 11, 13, 15, 14, 12, 10, 8]), tree_node([8, 6, 10, 4, 7, 9, 12, 2, 5, None, None, None, None, 11, 14, 1, 3, None, None, None, None, 13, 15]))\n assert is_same_tree(candidate(inorder = [10, 5, 15, 3, 7, 18, 12, 20, 25],postorder = [10, 15, 5, 7, 3, 18, 25, 20, 12]), tree_node([12, 18, 20, 3, None, None, 25, 5, 7, None, None, 10, 15]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],postorder = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]), tree_node([2, 1, 4, None, None, 3, 6, None, None, 5, 8, None, None, 7, 10, None, None, 9, 12, None, None, 11, 14, None, None, 13, 16, None, None, 15, 18, None, None, 17, 20, None, None, 19]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],postorder = [1, 3, 5, 7, 9, 11, 13, 15, 14, 12, 10, 8, 6, 4, 2]), tree_node([2, 1, 4, None, None, 3, 6, None, None, 5, 8, None, None, 7, 10, None, None, 9, 12, None, None, 11, 14, None, None, 13, 15]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],postorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), tree_node([16, 15, None, 14, None, 13, None, 12, None, 11, None, 10, None, 9, None, 8, None, 7, None, 6, None, 5, None, 4, None, 3, None, 2, None, 1]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],postorder = [1, 3, 5, 7, 9, 10, 8, 6, 4, 2]), tree_node([2, 1, 4, None, None, 3, 6, None, None, 5, 8, None, None, 7, 10, None, None, 9]))\n assert is_same_tree(candidate(inorder = [1, 3, 2, 6, 5, 7, 4, 8, 10, 9],postorder = [1, 3, 6, 7, 5, 2, 10, 9, 8, 4]), tree_node([4, 2, 8, 3, 5, None, 9, 1, None, 6, 7, 10]))\n assert is_same_tree(candidate(inorder = [8, 5, 11, 1, 2, 6, 9, 3, 13, 7, 10],postorder = [8, 11, 5, 2, 6, 1, 9, 13, 10, 7, 3]), tree_node([3, 9, 7, 1, None, 13, 10, 5, 6, None, None, None, None, 8, 11, 2]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],postorder = [1, 3, 2, 5, 7, 6, 4, 9, 11, 13, 14, 12, 10, 8, 15]), tree_node([15, 8, None, 4, 10, 2, 6, 9, 12, 1, 3, 5, 7, None, None, 11, 14, None, None, None, None, None, None, None, None, None, None, 13]))\n assert is_same_tree(candidate(inorder = [1, 5, 3, 6, 2, 7, 4, 8],postorder = [1, 5, 6, 3, 7, 8, 4, 2]), tree_node([2, 3, 4, 5, 6, 7, 8, 1]))\n assert is_same_tree(candidate(inorder = [4, 2, 5, 1, 6, 3, 8, 10, 7, 9],postorder = [4, 5, 2, 6, 8, 10, 9, 7, 3, 1]), tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 10, 9, 8]))\n assert is_same_tree(candidate(inorder = [8, 4, 9, 2, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15],postorder = [8, 9, 4, 10, 11, 5, 2, 12, 13, 6, 14, 15, 7, 3, 1]), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(inorder = [5, 4, 6, 2, 7, 8, 3, 1, 9],postorder = [5, 6, 4, 8, 7, 3, 9, 1, 2]), tree_node([2, 4, 1, 5, 6, 3, 9, None, None, None, None, 7, None, None, None, None, 8]))\n assert is_same_tree(candidate(inorder = [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],postorder = [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],postorder = [1, 3, 2, 5, 4, 7, 6, 9, 11, 13, 15, 17, 16, 14, 12, 10, 8]), tree_node([8, 6, 10, 4, 7, 9, 12, 2, 5, None, None, None, None, 11, 14, 1, 3, None, None, None, None, 13, 16, None, None, None, None, None, None, 15, 17]))\n assert is_same_tree(candidate(inorder = [1, 2, 3, 4, 5, 6, 7, 8, 9],postorder = [1, 3, 5, 7, 9, 8, 6, 4, 2]), tree_node([2, 1, 4, None, None, 3, 6, None, None, 5, 8, None, None, 7, 9]))\n assert is_same_tree(candidate(inorder = [5, 3, 7, 2, 8, 9, 4, 10, 1, 6, 11, 12],postorder = [5, 7, 3, 8, 9, 2, 10, 4, 11, 12, 6, 1]), tree_node([1, 4, 6, 2, 10, None, 12, 3, 9, None, None, 11, None, 5, 7, 8]))\n"}, "metadata": {"canonical_parameter_names": ["inorder", "postorder"], "leetcode_dataset_entry_point": "Solution().buildTree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* buildTree(vector& inorder, vector& postorder) {", "container": "Solution", "callable": "buildTree", "parameters": [{"name": "inorder", "type": "vector&"}, {"name": "postorder", "type": "vector&"}], "return_type": "TreeNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 107, "task_id": "binary-tree-level-order-traversal-ii", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root).\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: [[15,7],[9,20],[3]]\n\nExample 2:\n\nInput: root = [1]\nOutput: [[1]]\n\nExample 3:\n\nInput: root = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 2000].\n-1000 <= Node.val <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == [[15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([1])) == [[1]]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [[4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == [[5, 1, 6, 8], [1, 3, -1], [2, 4], [0]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [[5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([3, 1, 4, None, 2])) == [[2], [1, 4], [3]]\n assert candidate(root = tree_node([3, 9, 20, 8, None, 15, 7, 4, 5, None, None, 6])) == [[4, 5, 6], [8, 15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [[10], [9], [8], [7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8])) == [[7, 8], [4, 5, 6], [2, 3], [1]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == [[6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == [[4, 5], [2, 3], [1]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [[12, 13, 14, 15], [8, 9, 10, 11], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 2, 25, 8, 6, 1, 12, 9, 4, 18, 10])) == [[8, 6, 1, 12, 9, 4, 18, 10], [15, 7, 2, 25], [9, 20], [3]]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, None, None, 4, None])) == [[2], [1]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, 17, 18, 20, None, None, None, None, None, None, 1])) == [[1], [12, 17, 18, 20], [15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([3, 1, 4, None, 2, None, None])) == [[2], [1, 4], [3]]\n assert candidate(root = tree_node([5, None, 4, None, 3, None, 2, None, 1])) == [[1], [2], [3], [4], [5]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, None, None, 18, 25, 27])) == [[25, 27], [12, 18], [15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16])) == [[16], [15], [14], [13], [12], [11], [10], [9], [8], [7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [[6, 20], [5, 15], [10]]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5])) == [[5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([3, 9, 20, 10, None, 15, 7, 5, 11, 18])) == [[5, 11, 18], [10, 15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 25, None, None, 22])) == [[22], [25], [15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [[3, 7, 18], [5, 15], [10]]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4])) == [[4, 4, 4, 4], [3, 3], [2, 2], [1]]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9])) == [[-7, -8, -9], [-3, -4, -5, -6], [-1, -2], [0]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, None, 17, 18, 19, 20, 21, 22, 23])) == [[16, 17, 18, 19, 20, 21, 22, 23], [8, 9, 10, 11, 12, 13, 14, 15], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [[9], [8], [7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180, 5, 15, 20, 35, 65, 70, 85, 105, 115, 135, 145, 155, 175, 185])) == [[5, 15, 20, 35, 65, 70, 85, 105, 115, 135, 145, 155, 175, 185], [10, 30, 60, 80, 110, 140, 160, 180], [25, 75, 125, 175], [50, 150], [100]]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == [[3, 5], [0, 4, 7, 9], [2, 8], [6]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == [[7, 2, 5, 1], [11, 13, 4], [4, 8], [5]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == [[7, 2, 1], [11, 13, 4], [4, 8], [5]]\n assert candidate(root = tree_node([0, None, 1, None, 2, None, 3, None, 4])) == [[4], [3], [2], [1], [0]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9, 10, 11, None, 13, None, None, 14, 15])) == [[14, 15], [8, 9, 10, 11, 13], [4, 5, 7], [2, 3], [1]]\n assert candidate(root = tree_node([3, 9, 20, 8, 10, 15, 7, None, None, None, 13, None, None, None, 17])) == [[13, 17], [8, 10, 15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])) == [[-7, -8, -9, -10], [-3, -4, -5, -6], [-1, -2], [0]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [[9], [8], [7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 16, 17])) == [[16, 17], [15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [[3, 6], [1, 4], [5]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 14, 15])) == [[14, 15], [8, 9, 10, 11, 12, 13], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [[8], [7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8, 9])) == [[9], [7, 8], [4, 5, 6], [2, 3], [1]]\n assert candidate(root = tree_node([10, -5, 15, None, -8, None, 20, -12, None, None, 18])) == [[-12, 18], [-8, 20], [-5, 15], [10]]\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180])) == [[10, 30, 60, 80, 110, 140, 160, 180], [25, 75, 125, 175], [50, 150], [100]]\n assert candidate(root = tree_node([10, None, 20, 30, 40, None, 50, None, None, 60, 70])) == [[60, 70], [50], [30, 40], [20], [10]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, 6, None, None, 3, None, None, None, 9])) == [[9], [6, 3], [7, 2, 5, 1], [11, 13, 4], [4, 8], [5]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [8, 9, 10, 11, 12, 13, 14, 15], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4])) == [[7, 4], [6, 2, 0, 8], [5, 1], [3]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [[16, 17, 18, 19, 20], [8, 9, 10, 11, 12, 13, 14, 15], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6, 2, None, None, None, None, 7])) == [[7], [2], [3, 6], [1, 4], [5]]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, 2, None, None, None, 6, None, None, 11, 12])) == [[11, 12], [2, 6], [1, 4, 7, 9], [3, 8], [5]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [[8, 9, 10, 11, 12, 13, 14, 15], [4, 5, 6, 7], [2, 3], [1]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1, None, 3, None, None])) == [[3], [7, 2, 1], [11, 13, 4], [4, 8], [5]]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7])) == [[6, 7], [4, 5], [2, 3], [1]]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == [[3, 4, 4, 3], [2, 2], [1]]\n assert candidate(root = tree_node([5, 1, 4, 3, None, 6, 7])) == [[3, 6, 7], [1, 4], [5]]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6])) == [[2], [1]]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7, None, 8])) == [[8], [7], [6], [4, 5], [2, 3], [1]]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4])) == [[4, 4], [3, 3], [2, 2], [1]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [[7], [6], [5], [4], [3], [2], [1]]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == [[-15], [-7, -8, -9, -10, -11, -12, -13, -14], [-3, -4, -5, -6], [-1, -2], [0]]\n assert candidate(root = tree_node([3, 9, 20, 10, None, 15, 7, 11, None, 13, 14])) == [[11, 13, 14], [10, 15, 7], [9, 20], [3]]\n assert candidate(root = tree_node([3, 9, 20, 10, 11, 15, 7, None, None, 12, None, 16, 13, None, None, None, 14, 17, 18])) == [[14, 17, 18], [12, 16, 13], [10, 11, 15, 7], [9, 20], [3]]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().levelOrderBottom", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> levelOrderBottom(TreeNode* root) {", "container": "Solution", "callable": "levelOrderBottom", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 108, "task_id": "convert-sorted-array-to-binary-search-tree", "difficulty": "Easy", "problem_description": "Given an integer array nums where the elements are sorted in ascending order, convert it to a height-balanced binary search tree.\n \nExample 1:\n\n\nInput: nums = [-10,-3,0,5,9]\nOutput: [0,-3,9,-10,null,5]\nExplanation: [0,-10,5,null,-3,null,9] is also accepted:\n\n\nExample 2:\n\n\nInput: nums = [1,3]\nOutput: [3,1]\nExplanation: [1,null,3] and [3,1] are both height-balanced BSTs.\n\n \nConstraints:\n\n1 <= nums.length <= 104\n-104 <= nums[i] <= 104\nnums is sorted in a strictly increasing order.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(nums = [0]), tree_node([0]))\n assert is_same_tree(candidate(nums = [1, 3]), tree_node([1, None, 3]))\n assert is_same_tree(candidate(nums = [-10, -3, 0, 5, 9]), tree_node([0, -10, 5, None, -3, None, 9]))\n assert is_same_tree(candidate(nums = [-1, 0, 1, 2]), tree_node([0, -1, 1, None, None, None, 2]))\n assert is_same_tree(candidate(nums = [-1, -2, -3, -4, -5]), tree_node([-3, -1, -4, None, -2, None, -5]))\n assert is_same_tree(candidate(nums = [1, 2, 3, 4, 5, 6, 7]), tree_node([4, 2, 6, 1, 3, 5, 7]))\n assert is_same_tree(candidate(nums = [-1, 0, 1]), tree_node([0, -1, 1]))\n assert is_same_tree(candidate(nums = [-10, -5, 0, 5, 10, 15, 20]), tree_node([5, -5, 15, -10, 0, 10, 20]))\n assert is_same_tree(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]), tree_node([49, 21, 73, 9, 33, 61, 85, 1, 13, 25, 41, 53, 65, 77, 93, None, 5, None, 17, None, 29, 37, 45, None, 57, None, 69, None, 81, 89, 97]))\n assert is_same_tree(candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]), tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 31]))\n assert is_same_tree(candidate(nums = [-20, -15, -10, -5, 0, 5, 10, 15, 20]), tree_node([0, -15, 10, -20, -10, 5, 15, None, None, None, -5, None, None, None, 20]))\n assert is_same_tree(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]), tree_node([24, 11, 37, 5, 17, 30, 43, 2, 8, 14, 20, 27, 33, 40, 46, 0, 3, 6, 9, 12, 15, 18, 22, 25, 28, 31, 35, 38, 41, 44, 48, None, 1, None, 4, None, 7, None, 10, None, 13, None, 16, None, 19, 21, 23, None, 26, None, 29, None, 32, 34, 36, None, 39, None, 42, None, 45, 47, 49]))\n assert is_same_tree(candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]), tree_node([50, 25, 75, 10, 35, 60, 90, 5, 15, 30, 40, 55, 65, 80, 95, None, None, None, 20, None, None, None, 45, None, None, None, 70, None, 85, None, 100]))\n assert is_same_tree(candidate(nums = [-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]), tree_node([15, 5, 24, 0, 10, 19, 29, -2, 2, 7, 12, 17, 21, 26, 31, -3, -1, 1, 3, 6, 8, 11, 13, 16, 18, 20, 22, 25, 27, 30, 32, None, None, None, None, None, None, None, 4, None, None, None, 9, None, None, None, 14, None, None, None, None, None, None, None, 23, None, None, None, 28, None, None, None, 33]))\n assert is_same_tree(candidate(nums = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]), tree_node([0, -600, 500, -900, -300, 200, 800, -1000, -800, -500, -200, 100, 300, 600, 900, None, None, None, -700, None, -400, None, -100, None, None, None, 400, None, 700, None, 1000]))\n assert is_same_tree(candidate(nums = [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]), tree_node([0, -60, 50, -90, -30, 20, 80, -100, -80, -50, -20, 10, 30, 60, 90, None, None, None, -70, None, -40, None, -10, None, None, None, 40, None, 70, None, 100]))\n assert is_same_tree(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]), tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29, None, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]))\n assert is_same_tree(candidate(nums = [-100, -50, -25, -10, -5, 0, 5, 10, 25, 50, 100]), tree_node([0, -25, 25, -100, -10, 5, 50, None, -50, None, -5, None, 10, None, 100]))\n assert is_same_tree(candidate(nums = [-500, -250, -125, -63, -31, -15, -7, -3, -1, 0, 1, 3, 7, 15, 31, 63, 125, 250, 500]), tree_node([0, -31, 31, -250, -7, 3, 125, -500, -125, -15, -3, 1, 7, 63, 250, None, None, None, -63, None, None, None, -1, None, None, None, 15, None, None, None, 500]))\n assert is_same_tree(candidate(nums = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), tree_node([6, 1, 11, -2, 3, 8, 14, -3, -1, 2, 4, 7, 9, 12, 15, None, None, None, 0, None, None, None, 5, None, None, None, 10, None, 13, None, 16]))\n assert is_same_tree(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]), tree_node([49, 23, 75, 11, 35, 61, 87, 5, 17, 29, 41, 55, 67, 81, 93, 1, 7, 13, 19, 25, 31, 37, 45, 51, 57, 63, 71, 77, 83, 89, 97, None, 3, None, 9, None, 15, None, 21, None, 27, None, 33, None, 39, 43, 47, None, 53, None, 59, None, 65, 69, 73, None, 79, None, 85, None, 91, 95, 99]))\n assert is_same_tree(candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]), tree_node([19, 9, 29, 3, 13, 23, 35, 1, 5, 11, 15, 21, 25, 31, 37, None, None, None, 7, None, None, None, 17, None, None, None, 27, None, 33, None, 39]))\n assert is_same_tree(candidate(nums = [-20, -15, -10, -5, 0, 1, 3, 5, 8, 10, 13, 15, 20]), tree_node([3, -10, 10, -20, 0, 5, 15, None, -15, -5, 1, None, 8, 13, 20]))\n assert is_same_tree(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]), tree_node([1300, 600, 1900, 300, 900, 1600, 2200, 100, 400, 700, 1100, 1400, 1700, 2000, 2400, None, 200, None, 500, None, 800, 1000, 1200, None, 1500, None, 1800, None, 2100, 2300, 2500]))\n assert is_same_tree(candidate(nums = [-200, -190, -180, -170, -160, -150, -140, -130, -120, -110, -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, 150, 160, 170, 180, 190, 200]), tree_node([0, -110, 100, -160, -60, 50, 150, -190, -140, -90, -30, 20, 70, 120, 180, -200, -180, -150, -130, -100, -80, -50, -20, 10, 30, 60, 80, 110, 130, 160, 190, None, None, None, -170, None, None, None, -120, None, None, None, -70, None, -40, None, -10, None, None, None, 40, None, None, None, 90, None, None, None, 140, None, 170, None, 200]))\n assert is_same_tree(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]), tree_node([30, 14, 46, 6, 22, 38, 54, 2, 10, 18, 26, 34, 42, 50, 58, None, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60]))\n assert is_same_tree(candidate(nums = [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]), tree_node([8, 2, 14, -1, 5, 11, 17, -2, 0, 3, 6, 9, 12, 15, 18, None, None, None, 1, None, 4, None, 7, None, 10, None, 13, None, 16, None, 19]))\n assert is_same_tree(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]), tree_node([169, 36, 361, 9, 81, 256, 484, 1, 16, 49, 121, 196, 289, 400, 576, None, 4, None, 25, None, 64, 100, 144, None, 225, None, 324, None, 441, 529, 625]))\n assert is_same_tree(candidate(nums = [-1000, -500, -250, -100, -50, -25, -10, -5, -2, -1, 0, 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000]), tree_node([0, -50, 25, -500, -5, 2, 250, -1000, -250, -25, -2, 1, 5, 50, 500, None, None, None, -100, None, -10, None, -1, None, None, None, 10, None, 100, None, 1000]))\n assert is_same_tree(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]), tree_node([75, 35, 115, 15, 55, 95, 135, 5, 25, 45, 65, 85, 105, 125, 145, None, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]))\n assert is_same_tree(candidate(nums = [-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]), tree_node([500, -100, 1000, -400, 200, 700, 1300, -500, -300, 0, 300, 600, 800, 1100, 1400, None, None, None, -200, None, 100, None, 400, None, None, None, 900, None, 1200, None, 1500]))\n assert is_same_tree(candidate(nums = [-2000, -1900, -1800, -1700, -1600, -1500, -1400, -1300, -1200, -1100, -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, 1500, 1600, 1700, 1800, 1900, 2000]), tree_node([0, -1100, 1000, -1600, -600, 500, 1500, -1900, -1400, -900, -300, 200, 700, 1200, 1800, -2000, -1800, -1500, -1300, -1000, -800, -500, -200, 100, 300, 600, 800, 1100, 1300, 1600, 1900, None, None, None, -1700, None, None, None, -1200, None, None, None, -700, None, -400, None, -100, None, None, None, 400, None, None, None, 900, None, None, None, 1400, None, 1700, None, 2000]))\n assert is_same_tree(candidate(nums = [-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50]), tree_node([0, -30, 30, -50, -20, 10, 40, None, -40, None, -10, None, 20, None, 50]))\n assert is_same_tree(candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58]), tree_node([28, 13, 43, 4, 19, 34, 52, 1, 7, 16, 22, 31, 37, 46, 55, None, None, None, 10, None, None, None, 25, None, None, None, 40, None, 49, None, 58]))\n assert is_same_tree(candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]))\n assert is_same_tree(candidate(nums = [-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]), tree_node([19, 8, 30, 3, 13, 24, 35, 0, 5, 10, 16, 21, 27, 32, 38, -1, 1, 4, 6, 9, 11, 14, 17, 20, 22, 25, 28, 31, 33, 36, 39, None, None, None, 2, None, None, None, 7, None, None, None, 12, None, 15, None, 18, None, None, None, 23, None, 26, None, 29, None, None, None, 34, None, 37, None, 40]))\n assert is_same_tree(candidate(nums = [-99, -97, -95, -93, -91, -89, -87, -85, -83, -81, -79, -77, -75, -73, -71, -69, -67, -65, -63, -61, -59, -57, -55, -53, -51, -49, -47, -45, -43, -41, -39, -37, -35, -33, -31, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -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, 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]), tree_node([-1, -51, 49, -77, -27, 23, 75, -89, -65, -39, -15, 11, 35, 61, 87, -95, -83, -71, -59, -45, -33, -21, -9, 5, 17, 29, 41, 55, 67, 81, 93, -99, -93, -87, -81, -75, -69, -63, -55, -49, -43, -37, -31, -25, -19, -13, -5, 1, 7, 13, 19, 25, 31, 37, 45, 51, 57, 63, 71, 77, 83, 89, 97, None, -97, None, -91, None, -85, None, -79, None, -73, None, -67, None, -61, -57, -53, None, -47, None, -41, None, -35, None, -29, None, -23, None, -17, None, -11, -7, -3, None, 3, None, 9, None, 15, None, 21, None, 27, None, 33, None, 39, 43, 47, None, 53, None, 59, None, 65, 69, 73, None, 79, None, 85, None, 91, 95, 99]))\n assert is_same_tree(candidate(nums = [-15, -10, -5, 0, 5, 10, 15, 20, 25]), tree_node([5, -10, 15, -15, -5, 10, 20, None, None, None, 0, None, None, None, 25]))\n assert is_same_tree(candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), tree_node([7, 2, 12, 0, 4, 9, 14, -1, 1, 3, 5, 8, 10, 13, 15, None, None, None, None, None, None, None, 6, None, None, None, 11, None, None, None, 16]))\n assert is_same_tree(candidate(nums = [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), tree_node([0, -5, 5, -8, -3, 2, 7, -9, -7, -4, -2, 1, 3, 6, 8, None, None, None, -6, None, None, None, -1, None, None, None, 4, None, None, None, 9]))\n assert is_same_tree(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]), tree_node([65, 30, 95, 15, 45, 80, 110, 5, 20, 35, 55, 70, 85, 100, 120, None, 10, None, 25, None, 40, 50, 60, None, 75, None, 90, None, 105, 115, 125]))\n assert is_same_tree(candidate(nums = [-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, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]), tree_node([49, 23, 75, 10, 36, 62, 88, 4, 16, 29, 42, 55, 68, 81, 94, 1, 7, 13, 19, 26, 32, 39, 45, 52, 58, 65, 71, 78, 84, 91, 97, -1, 2, 5, 8, 11, 14, 17, 21, 24, 27, 30, 34, 37, 40, 43, 47, 50, 53, 56, 60, 63, 66, 69, 73, 76, 79, 82, 86, 89, 92, 95, 99, None, 0, None, 3, None, 6, None, 9, None, 12, None, 15, None, 18, 20, 22, None, 25, None, 28, None, 31, 33, 35, None, 38, None, 41, None, 44, 46, 48, None, 51, None, 54, None, 57, 59, 61, None, 64, None, 67, None, 70, 72, 74, None, 77, None, 80, None, 83, 85, 87, None, 90, None, 93, None, 96, 98, 100]))\n assert is_same_tree(candidate(nums = [-1000, -500, -250, -125, -62, -31, -15, -7, -3, -1, 0, 1, 3, 7, 15, 31, 62, 125, 250, 500, 1000]), tree_node([0, -62, 31, -500, -7, 3, 250, -1000, -250, -31, -3, 1, 7, 62, 500, None, None, None, -125, None, -15, None, -1, None, None, None, 15, None, 125, None, 1000]))\n assert is_same_tree(candidate(nums = [-20, -18, -16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), tree_node([0, -12, 10, -18, -6, 4, 16, -20, -16, -10, -4, 2, 6, 12, 18, None, None, None, -14, None, -8, None, -2, None, None, None, 8, None, 14, None, 20]))\n assert is_same_tree(candidate(nums = [-9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990, -9989, -9988, -9987, -9986, -9985]), tree_node([-9992, -9996, -9988, -9998, -9994, -9990, -9986, -9999, -9997, -9995, -9993, -9991, -9989, -9987, -9985]))\n assert is_same_tree(candidate(nums = [-100, -50, -20, -10, -5, 0, 5, 10, 20, 50, 100]), tree_node([0, -20, 20, -100, -10, 5, 50, None, -50, None, -5, None, 10, None, 100]))\n assert is_same_tree(candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]), tree_node([100, 50, 150, 20, 70, 120, 180, 10, 30, 60, 80, 110, 130, 160, 190, None, None, None, 40, None, None, None, 90, None, None, None, 140, None, 170, None, 200]))\n assert is_same_tree(candidate(nums = [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), tree_node([9, 3, 15, 0, 6, 12, 18, -2, 1, 4, 7, 10, 13, 16, 19, None, -1, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20]))\n assert is_same_tree(candidate(nums = [-5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), tree_node([9, 3, 15, 0, 6, 12, 18, -5, 1, 4, 7, 10, 13, 16, 19, None, None, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20]))\n assert is_same_tree(candidate(nums = [-30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]), tree_node([10, -15, 30, -25, -5, 20, 40, -30, -20, -10, 0, 15, 25, 35, 45, None, None, None, None, None, None, None, 5, None, None, None, None, None, None, None, 50]))\n assert is_same_tree(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, 1, 2, 3, 4, 5, 6, 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]), tree_node([0, -26, 25, -39, -13, 12, 38, -45, -33, -20, -7, 6, 18, 31, 44, -48, -42, -36, -30, -23, -17, -10, -4, 3, 9, 15, 21, 28, 34, 41, 47, -50, -47, -44, -41, -38, -35, -32, -28, -25, -22, -19, -15, -12, -9, -6, -2, 1, 4, 7, 10, 13, 16, 19, 23, 26, 29, 32, 36, 39, 42, 45, 49, None, -49, None, -46, None, -43, None, -40, None, -37, None, -34, None, -31, -29, -27, None, -24, None, -21, None, -18, -16, -14, None, -11, None, -8, None, -5, -3, -1, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20, 22, 24, None, 27, None, 30, None, 33, 35, 37, None, 40, None, 43, None, 46, 48, 50]))\n assert is_same_tree(candidate(nums = [-9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990, -9989, -9988, -9987, -9986, -9985, -9984, -9983, -9982, -9981, -9980]), tree_node([-9990, -9995, -9985, -9998, -9993, -9988, -9982, -9999, -9997, -9994, -9992, -9989, -9987, -9984, -9981, None, None, None, -9996, None, None, None, -9991, None, None, None, -9986, None, -9983, None, -9980]))\n assert is_same_tree(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]), tree_node([130, 60, 190, 30, 90, 160, 220, 10, 40, 70, 110, 140, 170, 200, 240, None, 20, None, 50, None, 80, 100, 120, None, 150, None, 180, None, 210, 230, 250]))\n assert is_same_tree(candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]), tree_node([8, 3, 12, 1, 5, 10, 14, 0, 2, 4, 6, 9, 11, 13, 15, None, None, None, None, None, None, None, 7, None, None, None, None, None, None, None, 16]))\n assert is_same_tree(candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), tree_node([0, -6, 5, -9, -3, 2, 8, -10, -8, -5, -2, 1, 3, 6, 9, None, None, None, -7, None, -4, None, -1, None, None, None, 4, None, 7, None, 10]))\n assert is_same_tree(candidate(nums = [-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]), tree_node([14, 5, 23, 1, 9, 18, 27, -1, 3, 7, 11, 16, 20, 25, 29, -2, 0, 2, 4, 6, 8, 10, 12, 15, 17, 19, 21, 24, 26, 28, 30, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 13, None, None, None, None, None, None, None, 22, None, None, None, None, None, None, None, 31]))\n assert is_same_tree(candidate(nums = [-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]), tree_node([14, 6, 22, 2, 10, 18, 26, 0, 4, 8, 12, 16, 20, 24, 28, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 30]))\n assert is_same_tree(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]), tree_node([25, 11, 37, 5, 17, 31, 43, 1, 7, 13, 21, 27, 33, 39, 47, None, 3, None, 9, None, 15, 19, 23, None, 29, None, 35, None, 41, 45, 49]))\n assert is_same_tree(candidate(nums = [-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]), tree_node([9, 4, 13, 2, 6, 11, 15, -1, 3, 5, 7, 10, 12, 14, 16, None, None, None, None, None, None, None, 8, None, None, None, None, None, None, None, 17]))\n assert is_same_tree(candidate(nums = [-1000, -500, -250, -125, -63, -31, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 31, 63, 125, 250, 500, 1000]), tree_node([0, -31, 31, -250, -4, 4, 250, -1000, -125, -16, -2, 1, 8, 63, 500, None, -500, None, -63, None, -8, None, -1, None, 2, None, 16, None, 125, None, 1000]))\n assert is_same_tree(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]), tree_node([150, 70, 230, 30, 110, 190, 270, 10, 50, 90, 130, 170, 210, 250, 290, None, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300]))\n assert is_same_tree(candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), tree_node([10, 5, 15, 2, 7, 12, 18, 1, 3, 6, 8, 11, 13, 16, 19, None, None, None, 4, None, None, None, 9, None, None, None, 14, None, 17, None, 20]))\n assert is_same_tree(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, 21, 22, 23, 24, 25]), tree_node([7, -2, 16, -7, 2, 11, 21, -9, -5, 0, 4, 9, 13, 18, 23, -10, -8, -6, -4, -1, 1, 3, 5, 8, 10, 12, 14, 17, 19, 22, 24, None, None, None, None, None, None, None, -3, None, None, None, None, None, None, None, 6, None, None, None, None, None, None, None, 15, None, None, None, 20, None, None, None, 25]))\n assert is_same_tree(candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]), tree_node([5000, 2000, 8000, 1000, 3000, 6000, 9000, None, None, None, 4000, None, 7000, None, 10000]))\n assert is_same_tree(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]), tree_node([12, 5, 19, 2, 8, 15, 22, 0, 3, 6, 10, 13, 17, 20, 24, None, 1, None, 4, None, 7, 9, 11, None, 14, 16, 18, None, 21, 23, 25]))\n assert is_same_tree(candidate(nums = [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500, 10000]), tree_node([5000, 2500, 7500, 1000, 3500, 6000, 9000, 500, 1500, 3000, 4000, 5500, 6500, 8000, 9500, None, None, None, 2000, None, None, None, 4500, None, None, None, 7000, None, 8500, None, 10000]))\n assert is_same_tree(candidate(nums = [-50, -45, -40, -35, -30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]), tree_node([0, -30, 25, -45, -15, 10, 40, -50, -40, -25, -10, 5, 15, 30, 45, None, None, None, -35, None, -20, None, -5, None, None, None, 20, None, 35, None, 50]))\n assert is_same_tree(candidate(nums = [-100, -50, -25, -10, -3, 0, 5, 9, 20, 50, 75, 100]), tree_node([0, -25, 20, -100, -10, 5, 75, None, -50, None, -3, None, 9, 50, 100]))\n assert is_same_tree(candidate(nums = [-15, -10, -5, -3, 0, 1, 2, 5, 6, 8, 10, 15]), tree_node([1, -5, 6, -15, -3, 2, 10, None, -10, None, 0, None, 5, 8, 15]))\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().sortedArrayToBST", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* sortedArrayToBST(vector& nums) {", "container": "Solution", "callable": "sortedArrayToBST", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "TreeNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 109, "task_id": "convert-sorted-list-to-binary-search-tree", "difficulty": "Medium", "problem_description": "Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced binary search tree.\n \nExample 1:\n\n\nInput: head = [-10,-3,0,5,9]\nOutput: [0,-3,9,-10,null,5]\nExplanation: One possible answer is [0,-3,9,-10,null,5], which represents the shown height balanced BST.\n\nExample 2:\n\nInput: head = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in head is in the range [0, 2 * 104].\n-105 <= Node.val <= 105\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7])), tree_node([4, 2, 6, 1, 3, 5, 7]))\n assert is_same_tree(candidate(head = list_node([-1, 0, 1, 2])), tree_node([0, -1, 1, None, None, None, 2]))\n assert is_same_tree(candidate(head = list_node([-10, -5, 0, 5, 10])), tree_node([0, -10, 5, None, -5, None, 10]))\n assert is_same_tree(candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), tree_node([5, 2, 8, 0, 3, 6, 9, None, 1, None, 4, None, 7, None, 10]))\n assert is_same_tree(candidate(head = list_node([-10, -3, 0, 5, 9])), tree_node([0, -10, 5, None, -3, None, 9]))\n assert candidate(head = list_node([])) == None\n assert is_same_tree(candidate(head = list_node([1])), tree_node([1]))\n assert is_same_tree(candidate(head = list_node([1, 3])), tree_node([1, None, 3]))\n assert is_same_tree(candidate(head = list_node([-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10])), tree_node([5, -3, -8, 1, -4, 6, 9, -1, -2, 3, 4, -6, -7, 8, -10, None, None, None, 2, None, None, None, -5, None, None, None, 7, None, -9, None, 10]))\n assert is_same_tree(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500])), tree_node([800, 400, 1200, 200, 600, 1000, 1400, 100, 300, 500, 700, 900, 1100, 1300, 1500]))\n assert is_same_tree(candidate(head = list_node([-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])), tree_node([7, 0, 14, -3, 3, 10, 17, -5, -2, 1, 5, 8, 12, 15, 19, None, -4, None, -1, None, 2, 4, 6, None, 9, 11, 13, None, 16, 18, 20]))\n assert is_same_tree(candidate(head = list_node([-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])), tree_node([3, -1, 6, -3, 1, 4, 8, None, -2, 0, 2, None, 5, 7, 9]))\n assert is_same_tree(candidate(head = list_node([-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])), tree_node([-185, -193, -177, -197, -189, -181, -173, -199, -195, -191, -187, -183, -179, -175, -171, -200, -198, -196, -194, -192, -190, -188, -186, -184, -182, -180, -178, -176, -174, -172, -170]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29, None, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]))\n assert is_same_tree(candidate(head = list_node([-100, -50, -25, 0, 25, 50, 100, 150, 200, 250, 300])), tree_node([50, -25, 200, -100, 0, 100, 250, None, -50, None, 25, None, 150, None, 300]))\n assert is_same_tree(candidate(head = list_node([100000])), tree_node([100000]))\n assert is_same_tree(candidate(head = list_node([-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])), tree_node([5, 0, 9, -2, 2, 7, 11, -3, -1, 1, 3, 6, 8, 10, 12, None, None, None, None, None, None, None, 4, None, None, None, None, None, None, None, 13]))\n assert is_same_tree(candidate(head = list_node([1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000])), tree_node([10000, 5000, 15000, 2000, 7000, 12000, 18000, 1000, 3000, 6000, 8000, 11000, 13000, 16000, 19000, None, None, None, 4000, None, None, None, 9000, None, None, None, 14000, None, 17000, None, 20000]))\n assert is_same_tree(candidate(head = list_node([-2000, -1500, -1000, -500, 0, 500, 1000, 1500, 2000])), tree_node([0, -1500, 1000, -2000, -1000, 500, 1500, None, None, None, -500, None, None, None, 2000]))\n assert is_same_tree(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39])), tree_node([19, 9, 29, 3, 13, 23, 35, 1, 5, 11, 15, 21, 25, 31, 37, None, None, None, 7, None, None, None, 17, None, None, None, 27, None, 33, None, 39]))\n assert is_same_tree(candidate(head = list_node([-30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30])), tree_node([0, -20, 15, -30, -10, 5, 25, None, -25, -15, -5, None, 10, 20, 30]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), tree_node([25, 12, 38, 6, 18, 31, 44, 3, 9, 15, 21, 28, 34, 41, 47, 1, 4, 7, 10, 13, 16, 19, 23, 26, 29, 32, 36, 39, 42, 45, 49, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20, 22, 24, None, 27, None, 30, None, 33, 35, 37, None, 40, None, 43, None, 46, 48, 50]))\n assert is_same_tree(candidate(head = list_node([-5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000])), tree_node([0, -3000, 3000, -5000, -2000, 1000, 4000, None, -4000, None, -1000, None, 2000, None, 5000]))\n assert is_same_tree(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120])), tree_node([60, 30, 90, 15, 45, 75, 105, 5, 20, 35, 50, 65, 80, 95, 115, None, 10, None, 25, None, 40, None, 55, None, 70, None, 85, None, 100, 110, 120]))\n assert is_same_tree(candidate(head = list_node([10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000])), tree_node([50000, 20000, 80000, 10000, 30000, 60000, 90000, None, None, None, 40000, None, 70000, None, 100000]))\n assert is_same_tree(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31])), tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 31]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([125, 55, 185, 25, 85, 155, 215, 5, 35, 65, 105, 135, 165, 195, 235, None, 15, None, 45, None, 75, 95, 115, None, 145, None, 175, None, 205, 225, 245]))\n assert is_same_tree(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100])), tree_node([50, 25, 75, 10, 35, 60, 90, 5, 15, 30, 40, 55, 65, 80, 95, None, None, None, 20, None, None, None, 45, None, None, None, 70, None, 85, None, 100]))\n assert is_same_tree(candidate(head = list_node([-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), tree_node([20, -20, 60, -40, 0, 40, 80, -50, -30, -10, 10, 30, 50, 70, 90, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 100]))\n assert is_same_tree(candidate(head = list_node([-999, -888, -777, -666, -555, -444, -333, -222, -111, 0, 111, 222, 333, 444, 555, 666, 777, 888, 999])), tree_node([0, -555, 555, -888, -333, 222, 777, -999, -777, -444, -222, 111, 333, 666, 888, None, None, None, -666, None, None, None, -111, None, None, None, 444, None, None, None, 999]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), tree_node([10, 5, 15, 2, 7, 12, 18, 1, 3, 6, 8, 11, 13, 16, 19, None, None, None, 4, None, None, None, 9, None, None, None, 14, None, 17, None, 20]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), tree_node([18, 9, 27, 4, 13, 22, 31, 2, 6, 11, 15, 20, 24, 29, 33, 1, 3, 5, 7, 10, 12, 14, 16, 19, 21, 23, 25, 28, 30, 32, 34, None, None, None, None, None, None, None, 8, None, None, None, None, None, None, None, 17, None, None, None, None, None, None, None, 26, None, None, None, None, None, None, None, 35]))\n assert is_same_tree(candidate(head = list_node([-30, -25, -20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90])), tree_node([30, -5, 60, -20, 10, 45, 75, -30, -15, 0, 20, 35, 50, 65, 85, None, -25, None, -10, None, 5, 15, 25, None, 40, None, 55, None, 70, 80, 90]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([200, 100, 300, 50, 150, 250, 350, 20, 70, 120, 170, 220, 270, 320, 380, 10, 30, 60, 80, 110, 130, 160, 180, 210, 230, 260, 280, 310, 330, 360, 390, None, None, None, 40, None, None, None, 90, None, None, None, 140, None, None, None, 190, None, None, None, 240, None, None, None, 290, None, None, None, 340, None, 370, None, 400]))\n assert is_same_tree(candidate(head = list_node([-1000, -500, -250, -100, -50, 0, 50, 100, 250, 500, 1000])), tree_node([0, -250, 250, -1000, -100, 50, 500, None, -500, None, -50, None, 100, None, 1000]))\n assert is_same_tree(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20])), tree_node([-10, -5, -15, -2, -7, -12, -18, -1, -3, -6, -8, -11, -13, -16, -19, None, None, None, -4, None, None, None, -9, None, None, None, -14, None, -17, None, -20]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([25, 11, 37, 5, 17, 31, 43, 1, 7, 13, 21, 27, 33, 39, 47, None, 3, None, 9, None, 15, 19, 23, None, 29, None, 35, None, 41, 45, 49]))\n assert is_same_tree(candidate(head = list_node([-500, -400, -300, -200, -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, 150, 200, 300, 400, 500])), tree_node([20, -70, 110, -200, -30, 60, 150, -400, -90, -50, -10, 40, 80, 130, 300, -500, -300, -100, -80, -60, -40, -20, 0, 30, 50, 70, 90, 120, 140, 200, 400, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 10, None, None, None, None, None, None, None, 100, None, None, None, None, None, None, None, 500]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), tree_node([13, 6, 19, 3, 9, 16, 22, 1, 4, 7, 11, 14, 17, 20, 24, None, 2, None, 5, None, 8, 10, 12, None, 15, None, 18, None, 21, 23, 25]))\n assert is_same_tree(candidate(head = list_node([-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])), tree_node([0, -600, 500, -900, -300, 200, 800, -1000, -800, -500, -200, 100, 300, 600, 900, None, None, None, -700, None, -400, None, -100, None, None, None, 400, None, 700, None, 1000]))\n assert is_same_tree(candidate(head = list_node([1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100])), tree_node([49, 22, 76, 10, 34, 61, 88, 4, 16, 28, 40, 55, 67, 82, 94, 1, 7, 13, 19, 25, 31, 37, 43, 52, 58, 64, 70, 79, 85, 91, 97, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 46, None, None, None, None, None, None, None, 73, None, None, None, None, None, None, None, 100]))\n assert is_same_tree(candidate(head = list_node([-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])), tree_node([9, 3, 14, 0, 6, 11, 17, -1, 1, 4, 7, 10, 12, 15, 18, None, None, None, 2, None, 5, None, 8, None, None, None, 13, None, 16, None, 19]))\n assert is_same_tree(candidate(head = list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), tree_node([0, -60, 50, -90, -30, 20, 80, -100, -80, -50, -20, 10, 30, 60, 90, None, None, None, -70, None, -40, None, -10, None, None, None, 40, None, 70, None, 100]))\n assert is_same_tree(candidate(head = list_node([0])), tree_node([0]))\n assert is_same_tree(candidate(head = list_node([-20, -15, -10, -5, 0, 5, 10, 15, 20])), tree_node([0, -15, 10, -20, -10, 5, 15, None, None, None, -5, None, None, None, 20]))\n assert is_same_tree(candidate(head = list_node([-100000])), tree_node([-100000]))\n assert is_same_tree(candidate(head = list_node([-20, -15, -10, -5, 0, 5, 10, 15, 20])), tree_node([0, -15, 10, -20, -10, 5, 15, None, None, None, -5, None, None, None, 20]))\n assert is_same_tree(candidate(head = list_node([-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500])), tree_node([0, -300, 300, -500, -200, 100, 400, None, -400, None, -100, None, 200, None, 500]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([75, 37, 113, 17, 55, 93, 131, 7, 27, 45, 65, 83, 103, 121, 141, 3, 11, 21, 31, 41, 49, 59, 69, 79, 87, 97, 107, 117, 125, 135, 145, 1, 5, 9, 13, 19, 23, 29, 33, 39, 43, 47, 51, 57, 61, 67, 71, 77, 81, 85, 89, 95, 99, 105, 109, 115, 119, 123, 127, 133, 137, 143, 147, None, None, None, None, None, None, None, 15, None, None, None, 25, None, None, None, 35, None, None, None, None, None, None, None, 53, None, None, None, 63, None, None, None, 73, None, None, None, None, None, None, None, 91, None, None, None, 101, None, None, None, 111, None, None, None, None, None, None, None, 129, None, None, None, 139, None, None, None, 149]))\n assert is_same_tree(candidate(head = list_node([-300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000])), tree_node([800, 200, 1400, -100, 500, 1100, 1700, -300, 0, 300, 600, 900, 1200, 1500, 1900, None, -200, None, 100, None, 400, None, 700, None, 1000, None, 1300, None, 1600, 1800, 2000]))\n assert is_same_tree(candidate(head = list_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10])), tree_node([-5, 2, 8, -1, -3, 6, -9, None, None, None, 4, None, -7, None, 10]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([130, 60, 190, 30, 90, 160, 220, 10, 40, 70, 110, 140, 170, 200, 240, None, 20, None, 50, None, 80, 100, 120, None, 150, None, 180, None, 210, 230, 250]))\n assert is_same_tree(candidate(head = list_node([-100, -50, -25, -10, 0, 10, 25, 50, 100])), tree_node([0, -50, 25, -100, -25, 10, 50, None, None, None, -10, None, None, None, 100]))\n assert is_same_tree(candidate(head = list_node([-200, -190, -180, -170, -160, -150, -140, -130, -120, -110, -100, -90, -80, -70, -60, -50, -40, -30, -20, -10])), tree_node([-110, -160, -60, -190, -140, -90, -30, -200, -180, -150, -130, -100, -80, -50, -20, None, None, None, -170, None, None, None, -120, None, None, None, -70, None, -40, None, -10]))\n assert is_same_tree(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29])), tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([75, 35, 115, 15, 55, 95, 135, 5, 25, 45, 65, 85, 105, 125, 145, None, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]))\n assert is_same_tree(candidate(head = list_node([-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), tree_node([15, 7, 23, 3, 11, 19, 27, -1, 5, 9, 13, 17, 21, 25, 29, None, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]))\n assert is_same_tree(candidate(head = list_node([-99999, -88888, -77777, -66666, -55555, -44444, -33333, -22222, -11111, 0, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999])), tree_node([0, -55555, 55555, -88888, -33333, 22222, 77777, -99999, -77777, -44444, -22222, 11111, 33333, 66666, 88888, None, None, None, -66666, None, None, None, -11111, None, None, None, 44444, None, None, None, 99999]))\n assert is_same_tree(candidate(head = list_node([-50000, -40000, -30000, -20000, -10000, 0, 10000, 20000, 30000, 40000, 50000])), tree_node([0, -30000, 30000, -50000, -20000, 10000, 40000, None, -40000, None, -10000, None, 20000, None, 50000]))\n assert is_same_tree(candidate(head = list_node([-300, -250, -200, -150, -100, -50, 0, 50, 100, 150, 200, 250, 300])), tree_node([0, -200, 150, -300, -100, 50, 250, None, -250, -150, -50, None, 100, 200, 300]))\n assert is_same_tree(candidate(head = list_node([-500, -450, -400, -350, -300, -250, -200, -150, -100, -50, 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500])), tree_node([0, -300, 250, -450, -150, 100, 400, -500, -400, -250, -100, 50, 150, 300, 450, None, None, None, -350, None, -200, None, -50, None, None, None, 200, None, 350, None, 500]))\n assert is_same_tree(candidate(head = list_node([1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000])), tree_node([5000, 2000, 8000, 1000, 3000, 6000, 9000, None, None, None, 4000, None, 7000, None, 10000]))\n assert is_same_tree(candidate(head = list_node([1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000])), tree_node([8000, 4000, 12000, 2000, 6000, 10000, 14000, 1000, 3000, 5000, 7000, 9000, 11000, 13000, 15000]))\n assert is_same_tree(candidate(head = list_node([-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100])), tree_node([0, -60, 50, -90, -30, 20, 80, -100, -80, -50, -20, 10, 30, 60, 90, None, None, None, -70, None, -40, None, -10, None, None, None, 40, None, 70, None, 100]))\n assert is_same_tree(candidate(head = list_node([-20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30])), tree_node([5, -10, 20, -20, -5, 10, 25, None, -15, None, 0, None, 15, None, 30]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([49, 23, 75, 11, 35, 61, 87, 5, 17, 29, 41, 55, 67, 81, 93, 1, 7, 13, 19, 25, 31, 37, 45, 51, 57, 63, 71, 77, 83, 89, 97, None, 3, None, 9, None, 15, None, 21, None, 27, None, 33, None, 39, 43, 47, None, 53, None, 59, None, 65, 69, 73, None, 79, None, 85, None, 91, 95, 99]))\n assert is_same_tree(candidate(head = list_node([-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, 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])), tree_node([0, -26, 25, -39, -13, 12, 38, -45, -33, -20, -7, 6, 18, 31, 44, -48, -42, -36, -30, -23, -17, -10, -4, 3, 9, 15, 21, 28, 34, 41, 47, -50, -47, -44, -41, -38, -35, -32, -28, -25, -22, -19, -15, -12, -9, -6, -2, 1, 4, 7, 10, 13, 16, 19, 23, 26, 29, 32, 36, 39, 42, 45, 49, None, -49, None, -46, None, -43, None, -40, None, -37, None, -34, None, -31, -29, -27, None, -24, None, -21, None, -18, -16, -14, None, -11, None, -8, None, -5, -3, -1, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20, 22, 24, None, 27, None, 30, None, 33, 35, 37, None, 40, None, 43, None, 46, 48, 50]))\n assert is_same_tree(candidate(head = list_node([-20, -15, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40])), tree_node([10, -10, 25, -20, 0, 15, 35, None, -15, -5, 5, None, 20, 30, 40]))\n assert is_same_tree(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000])), tree_node([1000, 500, 1500, 200, 700, 1200, 1800, 100, 300, 600, 800, 1100, 1300, 1600, 1900, None, None, None, 400, None, None, None, 900, None, None, None, 1400, None, 1700, None, 2000]))\n assert is_same_tree(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000])), tree_node([1000, 500, 1500, 200, 700, 1200, 1800, 100, 300, 600, 800, 1100, 1300, 1600, 1900, None, None, None, 400, None, None, None, 900, None, None, None, 1400, None, 1700, None, 2000]))\n assert is_same_tree(candidate(head = list_node([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])), tree_node([70, 35, 105, 15, 50, 85, 125, 5, 25, 40, 60, 75, 95, 115, 135, None, 10, 20, 30, None, 45, 55, 65, None, 80, 90, 100, 110, 120, 130, 140]))\n assert is_same_tree(candidate(head = list_node([-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), tree_node([9, 3, 15, 0, 6, 12, 18, -1, 1, 4, 7, 10, 13, 16, 19, None, None, None, 2, None, 5, None, 8, None, 11, None, 14, None, 17, None, 20]))\n assert is_same_tree(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]))\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().sortedListToBST", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* sortedListToBST(ListNode* head) {", "container": "Solution", "callable": "sortedListToBST", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "TreeNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 110, "task_id": "balanced-binary-tree", "difficulty": "Easy", "problem_description": "Given a binary tree, determine if it is height-balanced.\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: true\n\nExample 2:\n\n\nInput: root = [1,2,2,3,3,null,null,4,4]\nOutput: false\n\nExample 3:\n\nInput: root = []\nOutput: true\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 5000].\n-104 <= Node.val <= 104\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, None, None, 5, 5])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, 4, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3])) == False\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, None, None, 4, 4])) == False\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == True\n assert candidate(root = tree_node([1])) == True\n assert candidate(root = tree_node([])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5])) == True\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, 8, 9, None, None, 10, 11])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, 7, 8, 9, 10, 11, 12, None, None, 13, 14, 15])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, 7, 8, 9, 10, 11, 12])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, None, 10, 11, 12, None, None, 15])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == False\n assert candidate(root = tree_node([1, 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, None, 10])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, 5, 5, None, None, 6, 6])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 9, None, None, 14, None, 16, 17, 18, 19, None, None, None, None, None, None, None, None, 28])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30, None, 31, None, 32])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, None, 4, 5, 5])) == True\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, 6, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, 9, None])) == True\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, 8, 9, 10, None, None, 11, 12])) == False\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == False\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, 20, None])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, None, None, None, None, 5, 5, 5, 5, None, None, None, None])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, None, None, None, None, None, None, 21])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7, 8, 9, 10, None, None, 11, 12])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 4, None, 5, 6, 7, 8, 9])) == False\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 16])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, None, None, None, None, 5, None, None, None, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 4, 5, None, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, None, 8, 9])) == False\n assert candidate(root = tree_node([1, None, 3, None, None, None, 6, None, None, None, None, 12, None, None, None, 19])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4, 5, None, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, None, None, 5])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, None, 3, 4, 5, 6, 7, None, None, None, None, None, 8, 9, 10, 11])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 9, None, 11, 14, None, 16, 17, 18, 19, None, 23, None, None, None, None, None, None, 28])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 9])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, 16, 17])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 5, 5, None, None, 6, 6])) == True\n assert candidate(root = tree_node([1, 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])) == True\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, 16])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 31])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, 10, 11, 12, 13, 14, 15, 16, None, None, None, None, None, None, None, None, None, None, None, 28, 29, 30])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, 8, 9, 10, None, None, 11, 12, 13, 14])) == False\n assert candidate(root = tree_node([1, 2, None, 4, None, 7, 8, 14, 15])) == False\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, 8])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7, 8, 9, 10, 11, 12, 13, 14])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == True\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, None])) == True\n assert candidate(root = tree_node([1, 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, None, None, 10, 11])) == True\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, 6, None, 7, None, 8, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, None, None, 10, 11, 12, 13, None, None, None, None, None, None, None, 14])) == False\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, 4])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, 15, 16, 17])) == True\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, None, None, None, None, None, None, None, 4])) == True\n assert candidate(root = tree_node([1, 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, None])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, None, 10, None, 14, None, 16, 17, 18, 19, None, None, None, None, None, None, None, None, 28])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, None, 4, None, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, None, None, 13, None, None, 14])) == True\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == False\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9, None, 10])) == False\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, 16])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, None, None, 10, 11, 12, 13, None, None, None, None, None, None, 14, 15, 16, 17, 18, 19, 20])) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17])) == True\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, None, 6, None, None, None, None, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, None, 7, None, 8, 9])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, None, 8, None, 10, 11, 12, None, None, None, 16, None, None, None, None, None, None, 25])) == False\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, None, None, 5, 5])) == False\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, None, 6])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9])) == True\n assert candidate(root = tree_node([1, 2, 2, None, 3, 3, None, 4, 4])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, None, 3, 4, 5, None, 5])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == False\n assert candidate(root = tree_node([1, 2, 2, 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])) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None])) == True\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7])) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, None, None, None, None, None, None, None, 5])) == False\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().isBalanced", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isBalanced(TreeNode* root) {", "container": "Solution", "callable": "isBalanced", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 111, "task_id": "minimum-depth-of-binary-tree", "difficulty": "Easy", "problem_description": "Given a binary tree, find its minimum depth.\nThe minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.\nNote: A leaf is a node with no children.\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: 2\n\nExample 2:\n\nInput: root = [2,null,3,null,4,null,5,null,6]\nOutput: 5\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 105].\n-1000 <= Node.val <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == 3\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == 4\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == 3\n assert candidate(root = tree_node([2, None, 3, None, 4, None, 5, None, 6])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5])) == 3\n assert candidate(root = tree_node([1, 2])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, 8, None, None, 9, 10])) == 2\n assert candidate(root = tree_node([0])) == 1\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == 2\n assert candidate(root = tree_node([1])) == 1\n assert candidate(root = tree_node([])) == 0\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 10\n assert candidate(root = tree_node([1, 2, 3, None, None, None, 4, None, None, 5, None, None, 6])) == 2\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == 3\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == 2\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, None, None, 5, None, 6, None, 7, None, 8])) == 2\n assert candidate(root = tree_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, None, None, None, None, None, None, None, None, None, None])) == 3\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, None, 18])) == 2\n assert candidate(root = tree_node([1, None, None, 2, None, None, 3, None, None, 4, None, None, 5])) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, None, None, None, None, 8])) == 3\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == 8\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4, None, None, None, None, None, 5, None, None, None, None, None, 6, None, None, None, None, None, 7, None, None, None, None, None, 8, None, None, None, None, None, 9, None, None, None, None, None, 10, None, None, None, None, None, 11])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, None, None, None, None, 6])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, None, None, 6, 7, None, 8])) == 3\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 25, 28, 30, None, None, None, 29, 31])) == 3\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4, None, None, None, None, 5, None, None, None, None, 6, None, None, None, None, 7])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, 10, 11, 12, 13, None, None, 16, 17, 18, 19])) == 3\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4])) == 2\n assert candidate(root = tree_node([3, 9, 20, None, 1, 15, 7, None, None, 14, 6, None, 8])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, None, None, None, 7, 8, None, None, 9, None])) == 3\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, None, 5, None, None, 6, None, None, 7])) == 2\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30])) == 30\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 6\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4, None, None, None, None, 5])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, None, 8, 9, None, 10])) == 4\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, None, None, 14, None, None, None, None, 15, None, None, None, None, 16, None, None, None, None, 17, None, None, None, None, 18, None, None, None, None, 19, None, None, None, None, 20])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7])) == 4\n assert candidate(root = tree_node([1, 2, None, None, 3, None, None, None, None, 4, None, 5])) == 3\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, 16])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, None, None, 10, 11])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9])) == 5\n assert candidate(root = tree_node([1, None, None, 2, None, None, None, 3])) == 1\n assert candidate(root = tree_node([1, None, 2, None, None, None, None, 3, None, None, None, None, None, 4, None, None, None, None, None, 5])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 4\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, None, None, None, None, 6, None, None, None, None, None, 7, None, None, None, None, None, 8, None, None, None, None, None, 9])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 16])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, 12, None, 14])) == 3\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, None, 5, 6])) == 2\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, None, None, 10])) == 3\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, 6, None, None, 7, None, None, 8, None, None, 9, None, None, 10])) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == 4\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, 4, None, 5, None, 6, None, 7])) == 2\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == 8\n assert candidate(root = tree_node([10, 5, 15, None, 7, None, 18, None, 8, None, 20, 16, 22])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14])) == 7\n assert candidate(root = tree_node([1, 2, None, 4, None, None, 5, None, 6, None, 7, None, 8])) == 7\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, None, None, None, None, 5, 5])) == 2\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 7\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25])) == 13\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 7, None, None, 8, 9, None, None, 10, 11, None, None, 12, 13])) == 2\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == 2\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, 1])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 6\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7, None, None, None, None, None, 8])) == 3\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 7, None, 9])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, None, None, None, 7, None, None, None, None, None, 8, None, None, None, None, None, 9, None, None, None, None, None, 10, None, None, None, None, None, 11, None, None, None, None, None, 12, None, None, None, None, None, 13])) == 3\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == 6\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, None, None, 16, 18, 17])) == 2\n assert candidate(root = tree_node([3, 9, None, 8, None, None, 10, None, None, None, None, 11, None, None, None, None, 12])) == 4\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == 12\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16])) == 16\n assert candidate(root = tree_node([1, None, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7])) == 1\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4, None, None, None, None, None, 5, None, None, None, None, None, 6])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, 10, None, None, 11])) == 4\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, 6, 7, None, None, 8, 9, None, None, 10, 11, None, 12, None, 13])) == 6\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])) == 13\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 9\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, None, None, None, None, None, None, 14])) == 2\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 11\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, None, None, 5, 5])) == 2\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 14, 6, None, None, None, 8])) == 2\n assert candidate(root = tree_node([42])) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, 8, None, None, None, 9])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, None, 10, None, 11, None, 12])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, 10, 11, 12, 13])) == 2\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == 3\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, None, 12])) == 12\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().minDepth", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minDepth(TreeNode* root) {", "container": "Solution", "callable": "minDepth", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 112, "task_id": "path-sum", "difficulty": "Easy", "problem_description": "Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum.\nA leaf is a node with no children.\n \nExample 1:\n\n\nInput: root = [5,4,8,11,null,13,4,7,2,null,null,null,1], targetSum = 22\nOutput: true\nExplanation: The root-to-leaf path with the target sum is shown.\n\nExample 2:\n\n\nInput: root = [1,2,3], targetSum = 5\nOutput: false\nExplanation: There are two root-to-leaf paths in the tree:\n(1 --> 2): The sum is 3.\n(1 --> 3): The sum is 4.\nThere is no root-to-leaf path with sum = 5.\n\nExample 3:\n\nInput: root = [], targetSum = 0\nOutput: false\nExplanation: Since the tree is empty, there are no root-to-leaf paths.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 5000].\n-1000 <= Node.val <= 1000\n-1000 <= targetSum <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([]),targetSum = 0) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7]),targetSum = 10) == True\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = 3) == False\n assert candidate(root = tree_node([1, 2]),targetSum = 3) == True\n assert candidate(root = tree_node([1, 2, 3]),targetSum = 5) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1]),targetSum = 22) == True\n assert candidate(root = tree_node([1, 2]),targetSum = 1) == False\n assert candidate(root = tree_node([-2, None, -3]),targetSum = -5) == True\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5]),targetSum = 10) == False\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190]),targetSum = 400) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1]),targetSum = 26) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 30) == False\n assert candidate(root = tree_node([0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]),targetSum = 2) == True\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),targetSum = 0) == True\n assert candidate(root = tree_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),targetSum = 54) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 26) == True\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, None, 1, None, 6, 8, None, None, 11, 13]),targetSum = 22) == False\n assert candidate(root = tree_node([-1, None, -2, None, -3, None, -4, None, -5, None, -6, None, -7, None, -8]),targetSum = -16) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 27) == False\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),targetSum = 32) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 120) == False\n assert candidate(root = tree_node([0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]),targetSum = 3) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 31) == False\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),targetSum = 22) == True\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1]),targetSum = 30) == False\n assert candidate(root = tree_node([100, 50, 200, None, 150, None, 300, 125, None, None, None, 250]),targetSum = 475) == False\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15]),targetSum = -30) == False\n assert candidate(root = tree_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),targetSum = 100) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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]),targetSum = 93) == False\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5]),targetSum = 15) == True\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1]),targetSum = 31) == False\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 3, 4, None, None, None, None, 5, 5, 5, 5]),targetSum = 13) == False\n assert candidate(root = tree_node([100, -100, 100, -100, 100, -100, 100, -100, 100]),targetSum = 0) == True\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10]),targetSum = 10) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 22) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 45) == False\n assert candidate(root = tree_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),targetSum = 550) == False\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15]),targetSum = 3) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),targetSum = 39) == False\n assert candidate(root = tree_node([1000, -1000, 1000, -1000, 1000, -1000, 1000]),targetSum = 0) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 100) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 9) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 27) == True\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10]),targetSum = 55) == True\n assert candidate(root = tree_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),targetSum = 400) == False\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]),targetSum = 23) == False\n assert candidate(root = tree_node([1000, -1000, 1000, -1000, None, 1000, -1000, None, -1000, None, 1000]),targetSum = 0) == False\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1]),targetSum = 8) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]),targetSum = 60) == False\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 80, 110, 140, 160, 190]),targetSum = 450) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 29) == False\n assert candidate(root = tree_node([0, -1, 1, None, -2, 2, None, None, -3, 3]),targetSum = -1) == False\n assert candidate(root = tree_node([-1, None, -2, -3, None, -4, None]),targetSum = -10) == True\n assert candidate(root = tree_node([-10, -5, -15, -3, -7, None, -18]),targetSum = -28) == False\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = 2) == True\n assert candidate(root = tree_node([100, 50, 200, 25, 75, None, 350, 12, None, 60, 85, None, None, None, 400]),targetSum = 275) == False\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15]),targetSum = -15) == True\n assert candidate(root = tree_node([0, 1, 1, 0, 1, 0, 1, -1, -1, None, None, None, -1, None, -1, None, 1, None, -1, None, -1, None, 1, None, None, None, None, None, None, None, None]),targetSum = 2) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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]),targetSum = 90) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1]),targetSum = 21) == False\n assert candidate(root = tree_node([-1, -2, -3, -4, None, -6, -7]),targetSum = -14) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 64) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),targetSum = 38) == True\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 60) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 32) == False\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]),targetSum = 28) == False\n assert candidate(root = tree_node([0, 1, 1, 0, 1, 0, None, None, 1, 0]),targetSum = 1) == True\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190]),targetSum = 250) == False\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180]),targetSum = 450) == False\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 1) == False\n assert candidate(root = tree_node([100, 98, 102, None, None, 99, 101, 97, None, 103]),targetSum = 300) == False\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7]),targetSum = 7) == False\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190]),targetSum = 500) == False\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15]),targetSum = -16) == False\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 18) == True\n"}, "metadata": {"canonical_parameter_names": ["root", "targetSum"], "leetcode_dataset_entry_point": "Solution().hasPathSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool hasPathSum(TreeNode* root, int targetSum) {", "container": "Solution", "callable": "hasPathSum", "parameters": [{"name": "root", "type": "TreeNode*"}, {"name": "targetSum", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 113, "task_id": "path-sum-ii", "difficulty": "Medium", "problem_description": "Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. Each path should be returned as a list of the node values, not node references.\nA root-to-leaf path is a path starting from the root and ending at any leaf node. A leaf is a node with no children.\n \nExample 1:\n\n\nInput: root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22\nOutput: [[5,4,11,2],[5,8,4,5]]\nExplanation: There are two paths whose sum equals targetSum:\n5 + 4 + 11 + 2 = 22\n5 + 8 + 4 + 5 = 22\n\nExample 2:\n\n\nInput: root = [1,2,3], targetSum = 5\nOutput: []\n\nExample 3:\n\nInput: root = [1,2], targetSum = 0\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 5000].\n-1000 <= Node.val <= 1000\n-1000 <= targetSum <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([0, 1, 1]),targetSum = 1) == [[0, 1], [0, 1]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 45) == []\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6]),targetSum = 21) == [[1, 2, 3, 4, 5, 6]]\n assert candidate(root = tree_node([-2, None, -3]),targetSum = -5) == [[-2, -3]]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7]),targetSum = 15) == []\n assert candidate(root = tree_node([1, 2, 3]),targetSum = 5) == []\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1, -1]),targetSum = -1) == [[1, -2, 1, -1], [1, -2, 1, -1]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 27) == [[5, 4, 11, 7]]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6]),targetSum = 15) == []\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1]),targetSum = 8) == []\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),targetSum = 22) == [[10, 5, 7]]\n assert candidate(root = tree_node([0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7]),targetSum = 15) == []\n assert candidate(root = tree_node([1, 2]),targetSum = 0) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 27) == []\n assert candidate(root = tree_node([0, 0, 0, 0, 0]),targetSum = 0) == [[0, 0, 0], [0, 0, 0], [0, 0]]\n assert candidate(root = tree_node([1]),targetSum = 1) == [[1]]\n assert candidate(root = tree_node([]),targetSum = 0) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 30) == []\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15]),targetSum = -15) == [[-1, 2, -5, -11]]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),targetSum = 25) == []\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),targetSum = 25) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 60) == []\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = 2) == [[1, -2, 3]]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5]),targetSum = 15) == [[1, 2, 3, 4, 5]]\n assert candidate(root = tree_node([]),targetSum = 5) == []\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 26) == [[5, 8, 13]]\n assert candidate(root = tree_node([0, 1, 1]),targetSum = 0) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5]),targetSum = 10) == []\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 22) == [[5, 4, 11, 2], [5, 8, 4, 5]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 18) == [[5, 8, 4, 1]]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 21) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 100) == []\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = 3) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7]),targetSum = 9) == []\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190]),targetSum = 300) == []\n assert candidate(root = tree_node([8, 6, 10, 5, 7, 9, 11, 4, None, None, None, None, None, 3]),targetSum = 26) == []\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190]),targetSum = 250) == []\n assert candidate(root = tree_node([]),targetSum = 1) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7]),targetSum = 10) == [[1, 3, 6]]\n"}, "metadata": {"canonical_parameter_names": ["root", "targetSum"], "leetcode_dataset_entry_point": "Solution().pathSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> pathSum(TreeNode* root, int targetSum) {", "container": "Solution", "callable": "pathSum", "parameters": [{"name": "root", "type": "TreeNode*"}, {"name": "targetSum", "type": "int"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 114, "task_id": "flatten-binary-tree-to-linked-list", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, flatten the tree into a \"linked list\":\n\nThe \"linked list\" should use the same TreeNode class where the right child pointer points to the next node in the list and the left child pointer is always null.\nThe \"linked list\" should be in the same order as a pre-order traversal of the binary tree.\n\n \nExample 1:\n\n\nInput: root = [1,2,5,3,4,null,6]\nOutput: [1,null,2,null,3,null,4,null,5,null,6]\n\nExample 2:\n\nInput: root = []\nOutput: []\n\nExample 3:\n\nInput: root = [0]\nOutput: [0]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 2000].\n-100 <= Node.val <= 100\n\n \nFollow up: Can you flatten the tree in-place (with O(1) extra space)?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == None\n assert candidate(root = tree_node([1, 2, 3, 4])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7])) == None\n assert candidate(root = tree_node([1, 2])) == None\n assert candidate(root = tree_node([1, None, None, 2, None, 3, None, 4])) == None\n assert candidate(root = tree_node([1, None, 2])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == None\n assert candidate(root = tree_node([0])) == None\n assert candidate(root = tree_node([1, 2, 5, 3, 4, None, 6])) == None\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, 6])) == None\n assert candidate(root = tree_node([])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, 7, 8, 9, None, None, 10, 11, None, 12, 13, None, None, 14])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, None, 13, 14, None, None, 15, None, 16, 17, None, None, None, 18, None, None, 19, None, None, None, None, 20])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, 10, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == None\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9, None, None, 10, None, None, 11, None, None, 12])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7, 8, 9, 10, 11, 12, None, 13, None, 14, None, 15])) == None\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, 8, 9, None, 10, None, None, 11, 12])) == None\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7, None, None, 8, None, None, 9, None, None, 10, None, None, 11, None, None, 12, None, None, 13, None, None, 14, None, None, 15, None, None, 16])) == None\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, 6, 7, 8, 9, None, None, 10, None, None, 11, None, None, 12])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, 7, None, None, None, 8, None, None, 9])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, None, None, 17, None, None, 18])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, None, 8, 9, None, None, 10, 11, None, None, 12, 13, None, None, 14, 15])) == None\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5])) == None\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, None, 6, 7])) == None\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == None\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, None, 7, None, None, None, None, 8])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30, None, 31, None, 32, None, 33, None, 34, None, 35])) == None\n assert candidate(root = tree_node([1, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, None, 5, None, None, 6, None, None, 7, None, None, 8])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, 10, None, None, 11, None, None, 12, 13, 14, None, None, 15])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, 9, 10, 11, 12, None, None, 13, 14])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, None, 7, None, 8, None, 9, None, 10])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == None\n assert candidate(root = tree_node([10, 5, 15, None, 7, 13, None, None, None, 6, 8, 11, 14, None, None, None, 9])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == None\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, None, 8, 9, None, None, 10, 11])) == None\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7])) == None\n assert candidate(root = tree_node([1, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == None\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 18, 19, 21, 22])) == None\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == None\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9])) == None\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, 8, None, 9, None, None, 10, 11, None, None, 12, 13])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, None, 9, 10, 11, 12, None, None, None, None, 13, None, 14, None, 15, None, 16])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7, 8, 9, 10, None, None, 11, 12, 13, 14, None, None, 15, 16, 17, None, None, 18, 19, 20])) == None\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, None, 7, None, None, None, 8, None, None, 9, None, None, 10, None, None, 11, None, None, None, 12, None, None, 13, None, None, 14, None, None, None, 15])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, 16, 17, 18, 19, 20, None, None, None, None, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, None, 31, None, 32])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, 6, 7, None, None, None, None, 8, None])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 16, 17, 18, 19, 20, None, 21, 22, 23, 24, None, 25, 26, 27, 28, 29, 30, None, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40])) == None\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, 5])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == None\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, 6, 7, None, 8, None, 9, None, 10])) == None\n assert candidate(root = tree_node([5, 3, 8, 1, 4, None, 9, None, 2, None, None, None, 6, 7])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, None, 8, 9])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, None, None, None, 8, 9])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == None\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == None\n assert candidate(root = tree_node([1, 2, None, None, 3, 4, None, None, 5, None, 6, 7, None, None, 8, 9, None, None, 10])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, None, None, 9, None, 10, 11, 12, 13, None, None, None, 14, None, None, 15])) == None\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, 7, None, None, None, None, None, 8, 9])) == None\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == None\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().flatten", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "void flatten(TreeNode* root) {", "container": "Solution", "callable": "flatten", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "void", "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.\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\n1 <= s.length, t.length <= 1000\ns and t consist of English letters.\n\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 = \"\",t = \"abc\") == 0\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 = \"abcde\",t = \"\") == 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 = \"\",t = \"\") == 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 = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzz\") == 14782231840815648\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"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().numDistinct", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numDistinct(string s, string t) {", "container": "Solution", "callable": "numDistinct", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "int", "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.\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\n \nExample 1:\nInput: numRows = 5\nOutput: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]\nExample 2:\nInput: numRows = 1\nOutput: [[1]]\n\n \nConstraints:\n\n1 <= numRows <= 30\n\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"}, "metadata": {"canonical_parameter_names": ["numRows"], "leetcode_dataset_entry_point": "Solution().generate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> generate(int numRows) {", "container": "Solution", "callable": "generate", "parameters": [{"name": "numRows", "type": "int"}], "return_type": "vector>", "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 rowIndexth (0-indexed) row of the Pascal's triangle.\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\n \nExample 1:\nInput: rowIndex = 3\nOutput: [1,3,3,1]\nExample 2:\nInput: rowIndex = 0\nOutput: [1]\nExample 3:\nInput: rowIndex = 1\nOutput: [1,1]\n\n \nConstraints:\n\n0 <= rowIndex <= 33\n\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"}, "metadata": {"canonical_parameter_names": ["rowIndex"], "leetcode_dataset_entry_point": "Solution().getRow", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector getRow(int rowIndex) {", "container": "Solution", "callable": "getRow", "parameters": [{"name": "rowIndex", "type": "int"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= triangle.length <= 200\ntriangle[0].length == 1\ntriangle[i].length == triangle[i - 1].length + 1\n-104 <= triangle[i][j] <= 104\n\n \nFollow up: Could you do this using only O(n) extra space, where n is the total number of rows in the triangle?", "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 = [[10000], [9999, 10001], [-10000, 10000, 10000], [10000, 10000, 10000, 10000], [0, 0, 0, 0, 0]]) == 19999\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, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]]) == 15\n assert candidate(triangle = [[1], [2, 2], [3, 3, 3], [4, 4, 4, 4], [5, 5, 5, 5, 5]]) == 15\n assert candidate(triangle = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9, -10], [-11, -12, -13, -14, -15]]) == -29\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]]) == -1\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, 2, 3, 4, 5], [6, 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]]) == 65\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"}, "metadata": {"canonical_parameter_names": ["triangle"], "leetcode_dataset_entry_point": "Solution().minimumTotal", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minimumTotal(vector>& triangle) {", "container": "Solution", "callable": "minimumTotal", "parameters": [{"name": "triangle", "type": "vector>&"}], "return_type": "int", "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 ith day.\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.\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\n \nConstraints:\n\n1 <= prices.length <= 105\n0 <= prices[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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 ith day.\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 buy it then immediately sell it on the same day.\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\n \nConstraints:\n\n1 <= prices.length <= 3 * 104\n0 <= prices[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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 ith day.\nFind the maximum profit you can achieve. You may complete at most two transactions.\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.\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\n \nConstraints:\n\n1 <= prices.length <= 105\n0 <= prices[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 124, "task_id": "binary-tree-maximum-path-sum", "difficulty": "Hard", "problem_description": "A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. Note that the path does not need to pass through the root.\nThe path sum of a path is the sum of the node's values in the path.\nGiven the root of a binary tree, return the maximum path sum of any non-empty path.\n \nExample 1:\n\n\nInput: root = [1,2,3]\nOutput: 6\nExplanation: The optimal path is 2 -> 1 -> 3 with a path sum of 2 + 1 + 3 = 6.\n\nExample 2:\n\n\nInput: root = [-10,9,20,null,null,15,7]\nOutput: 42\nExplanation: The optimal path is 15 -> 20 -> 7 with a path sum of 15 + 20 + 7 = 42.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 3 * 104].\n-1000 <= Node.val <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 15\n assert candidate(root = tree_node([2, -1])) == 2\n assert candidate(root = tree_node([-3])) == -3\n assert candidate(root = tree_node([1, 2, 3])) == 6\n assert candidate(root = tree_node([1, -2, -3])) == 1\n assert candidate(root = tree_node([-2, 1])) == 1\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7])) == 42\n assert candidate(root = tree_node([1, 2])) == 3\n assert candidate(root = tree_node([1, None, 2])) == 3\n assert candidate(root = tree_node([0])) == 0\n assert candidate(root = tree_node([-1])) == -1\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == 48\n assert candidate(root = tree_node([1])) == 1\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1])) == 3\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == 48\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7, -1, -2, 1, 1, -3, -4, -5, -6])) == 43\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 55\n assert candidate(root = tree_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150])) == 440\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, None, None, None, None, None, -10])) == 16\n assert candidate(root = tree_node([50, 20, 30, 15, 25, 10, 35, -10, -5, None, None, None, None, None, None])) == 160\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == 36\n assert candidate(root = tree_node([-10, 5, 15, -5, 3, None, 7, -1, None, -2, 4, None, None, 8])) == 24\n assert candidate(root = tree_node([9, 6, -3, None, None, -6, 2, None, None, 2, 2, None, -1, -6, -6, -6])) == 16\n assert candidate(root = tree_node([50, 20, 30, 10, 40, 25, 35, 5, 15, 32, 45, 22, 28, 33, 42, 1, 9, 11, 19, 31, 37, 43, 48, 0, 4, 8, 14, 16, 18, 21, 24, 27, 29, 34, 36, 39, 41, 44, 46, 47, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == 351\n assert candidate(root = tree_node([1, None, -2, None, -3, None, -4, None, -5, None, -6, None, -7, None, -8, None, -9])) == 1\n assert candidate(root = tree_node([-1, None, -2, None, -3, None, -4, -5, None])) == -1\n assert candidate(root = tree_node([2, -5, 7, -4, None, None, 6, -3, -1, 8, 9, None, None, None, None, None, 10])) == 33\n assert candidate(root = tree_node([10, 9, -10, None, None, 15, 7, None, None, None, 1, None, None, -1, None, -5])) == 24\n assert candidate(root = tree_node([2, -1, -2, 1, -3, -4, -5, -6, -7])) == 2\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, -2, 9, 3, 1, None, None, None, None, None, None, None, -10])) == 52\n assert candidate(root = tree_node([-1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 27\n assert candidate(root = tree_node([100, -50, -50, 40, 20, None, -60, 30, None, 10, None, -5])) == 120\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1, None, -5, 6, 8, -4, -6, None, 7, 9])) == 58\n assert candidate(root = tree_node([-1, 2, 2, None, 3, None, 3, None, 4, None, 4])) == 17\n assert candidate(root = tree_node([0, -10, 20, None, None, 15, 6, None, None, -5, 12, 11, 13, -14])) == 53\n assert candidate(root = tree_node([-10, -20, -30, -40, None, -50, -60, None, None, -70, -80, -90, None, None, -100])) == -10\n assert candidate(root = tree_node([100, 50, 200, 25, 75, 150, 300, 10, 40, 60, 90, 125, 175, 250, 350])) == 1175\n assert candidate(root = tree_node([-1, -2, -3, 1, 2, -1, -1, -2, None, -3, None, -2, -2])) == 2\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 7, 6, 12, 3, 8, 99, -100, 5, None, 4, 2, 1, None, None, None, None, None, None, None, -99])) == 159\n assert candidate(root = tree_node([100, -50, 50, -25, 25, -12, 12, -6, 6, -3, 3, -1, 1, 0, -100, 100, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == 181\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1, None, None, None, 9])) == 52\n assert candidate(root = tree_node([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])) == 44\n assert candidate(root = tree_node([1, -10, 20, 15, 10, None, -25, 6, None, None, -3, None, 4])) == 32\n assert candidate(root = tree_node([-1, -2, -3, -4, -5])) == -1\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, -1, None, -5, 6, 9])) == 50\n assert candidate(root = tree_node([1, -2, 3, 4, None, None, -6, None, -7, None, None, 8, 9])) == 10\n assert candidate(root = tree_node([-10, 5, 20, 15, 25, None, None, None, -5, 30, None])) == 75\n assert candidate(root = tree_node([10, -2, 15, 20, -5, None, 7, None, 1, None, 3, 9])) == 60\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])) == 101\n assert candidate(root = tree_node([2, -5, -1, None, -9, -4, None, None, -3, None, -8])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 69\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 3, 10, -1, None, -15, 9, None, None, None, -1])) == 59\n assert candidate(root = tree_node([0, -10, 20, 15, 7, -2, None, None, None, None, None, 5, 1, None, None, None, -1])) == 28\n assert candidate(root = tree_node([10, 2, 10, 8, 34, 7, 6, 1, None, None, None, None, None, 9, 8, 7])) == 71\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1, None, 5])) == 53\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1, -14, 16, 18, None, None, None, None, None, None, None, -19])) == 64\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 44\n assert candidate(root = tree_node([0, 2, 5, None, None, 6, 3, None, None, 9, None, None, 12, 15, 7])) == 50\n assert candidate(root = tree_node([0, -10, 7, 8, None, 15, None, -8, None, 5, None, 9, 6, 11, None, None, None, None, None, None, None, None, None, None, None])) == 38\n assert candidate(root = tree_node([1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1])) == 1\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 4, 6, 8, 12, 14, 17, 19, None, 2, None, 0, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == 82\n assert candidate(root = tree_node([-1, None, 9, -6, 3, None, None, None, -2])) == 12\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30])) == 44\n assert candidate(root = tree_node([1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20])) == 48\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7, None, None, None, None, 2, None, 1, None, -1, None, None, None, -2])) == 42\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) == 0\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -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\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, -1, None, -1, None, -2])) == 48\n assert candidate(root = tree_node([100, -50, 200, -75, 25, 150, 250, -100, None, 20, None, -50, None, 30, 40])) == 640\n assert candidate(root = tree_node([-1, None, -2, None, -3, None, -4, None, -5])) == -1\n assert candidate(root = tree_node([9, 4, 0, -1, -3, None, -10, None, None, -5])) == 13\n assert candidate(root = tree_node([0, -10, 5, None, None, -5, 6])) == 11\n assert candidate(root = tree_node([10, -10, 20, -20, 30, -30, 40, None, None, None, -40, None, None, -50, -60, None, None, -70, -80])) == 90\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == -1\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30, None, 31, None, 32, None, 33, None, 34, None, 35, None, 36, None, 37, None, 38, None, 39, None, 40])) == 820\n assert candidate(root = tree_node([-1, None, -2, None, -3, None, -4, None, -5, None, -6, None, -7])) == -1\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 7, 12, None, 2, 1, None, None, -5])) == 66\n assert candidate(root = tree_node([5, -4, -8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, -1, None, -5, 6, 9, -3])) == 26\n assert candidate(root = tree_node([2, -1, -2, 1, -4, -5, -6])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 119\n assert candidate(root = tree_node([2, -5, 6, None, 5, None, 7])) == 15\n assert candidate(root = tree_node([100, 50, 50, 25, 25, 25, 25, 12, 13, 14, 15, 16, 17, 18, 19])) == 284\n assert candidate(root = tree_node([3, -2, 5, -6, None, None, 4, None, None, -8, None, None, 7])) == 12\n assert candidate(root = tree_node([50, 20, 30, 10, 40, 25, 35, 5, 15, 32, 45, 23, 27, 33, 47, 1, 9, 11, 19, 31, 34, 39, 44, 46, 48])) == 325\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 45\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, None, -1, None, -9])) == 48\n assert candidate(root = tree_node([10, 9, -10, None, None, 15, 20, 1, None, -1, None, -5, None, 4, None, -6])) == 32\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1])) == 29\n assert candidate(root = tree_node([1, -2, 3, -4, None, 5, -6, 7, None, None, 8, None, 9])) == 19\n assert candidate(root = tree_node([1, -2, 3, 4, None, 5, -6, None, None, 7, -8, 9, -10, None, None, None, None, 11])) == 29\n assert candidate(root = tree_node([10, -10, 20, 15, 7, None, -5, 20, 30])) == 65\n assert candidate(root = tree_node([1, -2, -3, 4, 5, None, 6, None, None, -8, -9])) == 7\n assert candidate(root = tree_node([-10, 5, 9, None, -3, None, -8, None, -2, None, 7, -5, None, -1, None, 6, None, None, None, None, None, None, 8])) == 9\n assert candidate(root = tree_node([9, 6, -3, None, None, -6, 2, None, None, 2, None, -6, -6, -6])) == 16\n assert candidate(root = tree_node([100, -50, -50, None, -100, -100, None, -50, -100, None, -150, -150])) == 100\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 7, None, None, 30, 40, None, 50])) == 127\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().maxPathSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxPathSum(TreeNode* root) {", "container": "Solution", "callable": "maxPathSum", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 125, "task_id": "valid-palindrome", "difficulty": "Easy", "problem_description": "A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.\nGiven a string s, return true if it is a palindrome, or false otherwise.\n \nExample 1:\n\nInput: s = \"A man, a plan, a canal: Panama\"\nOutput: true\nExplanation: \"amanaplanacanalpanama\" is a palindrome.\n\nExample 2:\n\nInput: s = \"race a car\"\nOutput: false\nExplanation: \"raceacar\" is not a palindrome.\n\nExample 3:\n\nInput: s = \" \"\nOutput: true\nExplanation: s is an empty string \"\" after removing non-alphanumeric characters.\nSince an empty string reads the same forward and backward, it is a palindrome.\n\n \nConstraints:\n\n1 <= s.length <= 2 * 105\ns consists only of printable ASCII characters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"race a car\") == False\n assert candidate(s = \" \") == True\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().isPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPalindrome(string s) {", "container": "Solution", "callable": "isPalindrome", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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 -> s1 -> s2 -> ... -> sk such that:\n\nEvery adjacent pair of words differs by a single letter.\nEvery si for 1 <= i <= k is in wordList. Note that beginWord does not need to be in wordList.\nsk == 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\n \nConstraints:\n\n1 <= beginWord.length <= 10\nendWord.length == beginWord.length\n1 <= wordList.length <= 5000\nwordList[i].length == beginWord.length\nbeginWord, endWord, and wordList[i] consist of lowercase English letters.\nbeginWord != endWord\nAll the words in wordList are unique.\n\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 = \"listen\",endWord = \"silent\",wordList = ['lisen', 'litesn', 'litens', 'listne', 'listen', 'siltne', 'silent', 'linset', 'lintes', 'sleint', 'ltsine', 'lintse', 'lisnet', 'lsitne', 'lnties', 'lintes', 'lintes', 'linsat', 'slient', 'lsinte', 'linset']) == 0\n assert candidate(beginWord = \"algorithm\",endWord = \"rhythm\",wordList = ['alorhythm', 'alohrhythm', 'alohrhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'alorhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm', 'rhythm']) == 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"}, "metadata": {"canonical_parameter_names": ["beginWord", "endWord", "wordList"], "leetcode_dataset_entry_point": "Solution().ladderLength", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int ladderLength(string beginWord, string endWord, vector& wordList) {", "container": "Solution", "callable": "ladderLength", "parameters": [{"name": "beginWord", "type": "string"}, {"name": "endWord", "type": "string"}, {"name": "wordList", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n0 <= nums.length <= 105\n-109 <= nums[i] <= 109\n\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 = [1000000000, -1000000000, 1000000001, -1000000001, 0, 1, -1, 2, -2]) == 5\n assert candidate(nums = [999999999, 1000000000, 1000000001, 1000000002, 1000000003]) == 5\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 = [1000000000, 1000000001, 999999999, 999999998, 999999997]) == 5\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105]) == 6\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004]) == 5\n assert candidate(nums = [1000000000, 1000000002, 1000000001, 1000000003, 1000000004, 1000000005, 1000000006, 1000000007, 1000000008, 1000000009]) == 10\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 = [1000000000, 999999999, 1000000001, 1000000002, 1000000003, 1000000004]) == 6\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 = [1000000000, 999999999, 1000000001, 1000000002, 1000000003]) == 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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006, 1000000007, 1000000008, 1000000009, 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 = [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 = [1000000000, -1000000000, 2147483647, -2147483648, 0]) == 1\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005]) == 6\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 = [1000000000, -1000000000, 500000000, 500000001, 500000002, -1000000001]) == 3\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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006, 1000000007, 1000000008, 1000000009]) == 10\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().longestConsecutive", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestConsecutive(vector& nums) {", "container": "Solution", "callable": "longestConsecutive", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 129, "task_id": "sum-root-to-leaf-numbers", "difficulty": "Medium", "problem_description": "You are given the root of a binary tree containing digits from 0 to 9 only.\nEach root-to-leaf path in the tree represents a number.\n\nFor example, the root-to-leaf path 1 -> 2 -> 3 represents the number 123.\n\nReturn the total sum of all root-to-leaf numbers. Test cases are generated so that the answer will fit in a 32-bit integer.\nA leaf node is a node with no children.\n \nExample 1:\n\n\nInput: root = [1,2,3]\nOutput: 25\nExplanation:\nThe root-to-leaf path 1->2 represents the number 12.\nThe root-to-leaf path 1->3 represents the number 13.\nTherefore, sum = 12 + 13 = 25.\n\nExample 2:\n\n\nInput: root = [4,9,0,5,1]\nOutput: 1026\nExplanation:\nThe root-to-leaf path 4->9->5 represents the number 495.\nThe root-to-leaf path 4->9->1 represents the number 491.\nThe root-to-leaf path 4->0 represents the number 40.\nTherefore, sum = 495 + 491 + 40 = 1026.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 1000].\n0 <= Node.val <= 9\nThe depth of the tree will not exceed 10.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == 522\n assert candidate(root = tree_node([9, 3, 20, None, None, 15, 7])) == 2315\n assert candidate(root = tree_node([1, 2, 3])) == 25\n assert candidate(root = tree_node([1, 0, 0])) == 20\n assert candidate(root = tree_node([1, 0])) == 10\n assert candidate(root = tree_node([5, 2, 8, 3, 5, 4, 9, 0, None, None, 6])) == 11659\n assert candidate(root = tree_node([1, 0, 1])) == 21\n assert candidate(root = tree_node([1, 0, 1, 0, 1, 0, 1])) == 422\n assert candidate(root = tree_node([4, 9, 0, 5, 1])) == 1026\n assert candidate(root = tree_node([1, None, 2])) == 12\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 8, 1, None, None, None, 7, 9])) == 17231\n assert candidate(root = tree_node([0])) == 0\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8])) == 2220\n assert candidate(root = tree_node([4, 3, None, 1, 2])) == 863\n assert candidate(root = tree_node([2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6])) == 19350\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1])) == 22655\n assert candidate(root = tree_node([3, 1, 5, None, 2, 4, 6, 7, 8, 9])) == 10160\n assert candidate(root = tree_node([8, None, 5, None, 3, None, 1])) == 8531\n assert candidate(root = tree_node([2, 3, 5, 6, 4, None, 9, 8, 7, 1, 0, None, None, None, None, None, None, 5])) == 30749\n assert candidate(root = tree_node([9, 4, 0, 9, 8, 6, 0, 1, 3, 8, 9, 0, 6, 7, 9])) == 74103\n assert candidate(root = tree_node([5, 5, 5, 5, 5, None, 5, 5, None, 5, 5, 5, 5, None, None, 5])) == 77775\n assert candidate(root = tree_node([1, 3, None, None, 5, 2, None, None, 8, 6, 9])) == 270575\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None])) == 123456789\n assert candidate(root = tree_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0])) == 157777\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 123456789\n assert candidate(root = tree_node([5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == 43076\n assert candidate(root = tree_node([1, 9, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0])) == 123485\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == 541795\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, None, None, 0, 1])) == 27594\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5])) == 10472\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, None, None, None, None, None, None, None, None, None])) == 31520\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5])) == 78398\n assert candidate(root = tree_node([6, 0, 8, None, 7, 1, 3, None, None, 2, 5, None, None, None, 4])) == 76229\n assert candidate(root = tree_node([1, 9, 8, 7, 6, 5, 4, 3, 2, 1, None, None, 0, 9, 8, 7, 6, 5, 4, 3])) == 104082\n assert candidate(root = tree_node([2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 23456789\n assert candidate(root = tree_node([5, 9, 6, 7, 4, 0, 2, None, None, 8, 1, None, None, 3, 9])) == 24298\n assert candidate(root = tree_node([1, 9, 8, 2, 8, 7, 9, 4, 4, 6, 8, 3, 0, 7, 9, None, None, None, None, None, 4, None, None, None, None, 0, None, 3, None, None, 2, None, 1, None, 9])) == 431324\n assert candidate(root = tree_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])) == 1499985\n assert candidate(root = tree_node([1, None, 3, None, 5, None, 7, None, 9, None, 11, None, 13, None, 15, None, 17, None, 19])) == 1358024689\n assert candidate(root = tree_node([8, 15, 7, 1, None, 10, 2, 8, None, None, 5, None, 10, None, 9])) == 112724\n assert candidate(root = tree_node([6, 7, 8, 2, 7, 1, 3, 9, None, 1, 4, None, None, None, 5])) == 27790\n assert candidate(root = tree_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])) == 8444\n assert candidate(root = tree_node([7, 0, 8, None, 2, 3, None, 9])) == 7812\n assert candidate(root = tree_node([5, 9, 1, None, 3, None, None, None, 2])) == 5983\n assert candidate(root = tree_node([7, 5, 6, 0, 1, 2, 8, 4, None, 3, None, None, None, None, None, 9])) == 84092\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, None, None, None, None, None, None, 9])) == 120287\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 69405\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 0])) == 1234567890\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0])) == 31520\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, None, 1, 2, None, 3, 4, None, 5, 6, None, 7, 8, None, 9, 0, None, 1])) == 104580\n assert candidate(root = tree_node([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])) == 150745\n assert candidate(root = tree_node([7, 6, 7, 4, 3, 6, 7, 8, 7, 4, 7, 8, 7, 3, 7])) == 61651\n assert candidate(root = tree_node([7, 3, 6, 1, 5, 8, 2, 0, 9, None, None, None, None, None, None])) == 16894\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0])) == 69195\n assert candidate(root = tree_node([3, 9, 8, 4, 0, 1, 2, None, None, None, 5, None, None, 6, 7])) == 12333\n assert candidate(root = tree_node([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])) == 131357\n assert candidate(root = tree_node([7, 1, 4, 6, 9, None, 3, None, None, None, 5])) == 8654\n assert candidate(root = tree_node([2, 3, 5, 4, 1, 6, 8, 7, None, 9, None, None, None, 0, None])) == 7502\n assert candidate(root = tree_node([5, 3, 6, 2, 4, 8, 9, 1, 7, None, None, 0, None, None, 0, 0, None, None, 0, 0])) == 169504\n assert candidate(root = tree_node([5, 3, 2, 8, 9, 7, 1, 4, 6, None, None, None, None, None, None])) == 12357\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 1, None, 2, None, 3, None, 4, None, 5])) == 565898\n assert candidate(root = tree_node([9, 4, 5, 1, 6, 7, 2, None, None, None, None, 8, 3, 0, None])) == 30558\n assert candidate(root = tree_node([5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5])) == 43996\n assert candidate(root = tree_node([6, 7, 8, 0, 1, 2, 3, 4, 5, None, None, None, None, None, None, 9])) == 75790\n assert candidate(root = tree_node([4, 9, 0, 5, 1, 0, 0, None, None, 3, 2, 0, 0])) == 18720\n assert candidate(root = tree_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29])) == 12176\n assert candidate(root = tree_node([2, 3, 5, 1, 9, 4, 6, 7, 8, 0, 2, 5, 8, 9, 3])) == 19642\n assert candidate(root = tree_node([1, 0, 2, 3, 4, 5, 6, 7, 8, 9])) == 3375\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 25, 26, 30, 31, 32, 33, 34, 35])) == 217394\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 2, 5, 10, 11, 12, 13, 14, 15])) == 216394\n assert candidate(root = tree_node([7, 3, 4, 1, 5, 8, 2, 9, 6, None, None, 0, None, None, 0, None, None, 0, None, None, 0])) == 163434\n assert candidate(root = tree_node([8, 5, 9, 7, 3, None, 1, None, 6, 2, 4])) == 26533\n assert candidate(root = tree_node([6, 7, 8, 9, 0, 1, 2, 3, 4, 5, None, None, None, None, None, None, None, None, None])) == 21655\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, None, None, None, None, None, None, None])) == 475\n assert candidate(root = tree_node([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])) == 195765\n assert candidate(root = tree_node([3, 1, 8, None, 4, 2, 7, None, None, None, 5])) == 4526\n assert candidate(root = tree_node([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])) == 19397\n assert candidate(root = tree_node([0, 1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 123456789\n assert candidate(root = tree_node([6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0])) == 54282\n assert candidate(root = tree_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, None, 9, 8, 7, 6])) == 68543\n assert candidate(root = tree_node([7, 3, 8, None, None, 1, 4, 6, 2, None, None, 5, 9])) == 165003\n assert candidate(root = tree_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])) == 79992\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4])) == 1594\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == 93345\n assert candidate(root = tree_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])) == 1599984\n assert candidate(root = tree_node([1, 9, None, 2, 8, None, 7, None, 3, 6, None, 4, 5, None, None, None, None])) == 58945\n assert candidate(root = tree_node([6, 7, 8, 2, 7, 1, 3, 9, None, 1, 4, None, 5, None, None, None, None, None, 5])) == 88716\n assert candidate(root = tree_node([1, None, 9, 2, None, 8, 4, None, None, None, 5, None, None, 6, 3])) == 21173\n assert candidate(root = tree_node([1, 0, 1, None, 1, 0, 1, None, None, None, 1])) == 1313\n assert candidate(root = tree_node([3, 0, 1, None, None, 0, 2, 1, 4, None, None, 6, 9, None, None, 8, None, None, None, None, None])) == 344633\n assert candidate(root = tree_node([1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9])) == 105550\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == 475\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == 23308\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().sumNumbers", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int sumNumbers(TreeNode* root) {", "container": "Solution", "callable": "sumNumbers", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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:\nInput: s = \"aab\"\nOutput: [[\"a\",\"a\",\"b\"],[\"aa\",\"b\"]]\nExample 2:\nInput: s = \"a\"\nOutput: [[\"a\"]]\n\n \nConstraints:\n\n1 <= s.length <= 16\ns contains only lowercase English letters.\n\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 = \"\") == [[]]\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 = \"noonlevelrotorredder\") == [['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'redder'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'redder'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'redder'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'rotor', 'redder'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'r', 'redder'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'o', 'o', 'n', 'level', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'o', 'o', 'n', 'level', 'rotor', 'r', 'edde', 'r'], ['n', 'o', 'o', 'n', 'level', 'rotor', 'redder'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'redder'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'rotor', 'redder'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'r', 'redder'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'rotor', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'rotor', 'redder'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'r', 'redder'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'r', 'redder'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'r', 'oto', 'rr', 'edde', 'r'], ['n', 'oo', 'n', 'level', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['n', 'oo', 'n', 'level', 'rotor', 'r', 'edde', 'r'], ['n', 'oo', 'n', 'level', 'rotor', 'redder'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r', 'redder'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'rotor', 'r', 'edde', 'r'], ['noon', 'l', 'e', 'v', 'e', 'l', 'rotor', 'redder'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r', 'redder'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'r', 'redder'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'r', 'oto', 'rr', 'edde', 'r'], ['noon', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'l', 'eve', 'l', 'rotor', 'r', 'edde', 'r'], ['noon', 'l', 'eve', 'l', 'rotor', 'redder'], ['noon', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'level', 'r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['noon', 'level', 'r', 'o', 't', 'o', 'r', 'redder'], ['noon', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'level', 'r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'level', 'r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['noon', 'level', 'r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'level', 'r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'level', 'r', 'oto', 'r', 'r', 'edde', 'r'], ['noon', 'level', 'r', 'oto', 'r', 'redder'], ['noon', 'level', 'r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['noon', 'level', 'r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['noon', 'level', 'r', 'oto', 'rr', 'edde', 'r'], ['noon', 'level', 'rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['noon', 'level', 'rotor', 'r', 'e', 'dd', 'e', 'r'], ['noon', 'level', 'rotor', 'r', 'edde', 'r'], ['noon', 'level', 'rotor', 'redder']]\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 = \"deifiedcivicdeified\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'deified'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c', 'deified'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'civic', 'd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'civic', 'deified'], ['d', 'e', 'i', 'f', 'i', 'e', 'dcivicd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'dcivicd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'dcivicd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'edcivicde', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'edcivicde', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'iedcivicdei', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'fiedcivicdeif', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c', 'deified'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c', 'deified'], ['d', 'e', 'ifi', 'e', 'd', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'civic', 'd', 'eifie', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'civic', 'deified'], ['d', 'e', 'ifi', 'e', 'dcivicd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'dcivicd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'dcivicd', 'eifie', 'd'], ['d', 'e', 'ifi', 'edcivicde', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'edcivicde', 'ifi', 'e', 'd'], ['d', 'e', 'ifiedcivicdeifi', 'e', 'd'], ['d', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['d', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c', 'deified'], ['d', 'eifie', 'd', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'd', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'd', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['d', 'eifie', 'd', 'c', 'ivi', 'c', 'deified'], ['d', 'eifie', 'd', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'd', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'd', 'civic', 'd', 'eifie', 'd'], ['d', 'eifie', 'd', 'civic', 'deified'], ['d', 'eifie', 'dcivicd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'dcivicd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'dcivicd', 'eifie', 'd'], ['d', 'eifiedcivicdeifie', 'd'], ['deified', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['deified', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['deified', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['deified', 'c', 'i', 'v', 'i', 'c', 'deified'], ['deified', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['deified', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['deified', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['deified', 'c', 'ivi', 'c', 'deified'], ['deified', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['deified', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['deified', 'civic', 'd', 'eifie', 'd'], ['deified', 'civic', 'deified'], ['deifiedcivicdeified']]\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 = \"madamatoyotademadam\") == [['m', 'a', 'd', 'a', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'madam'], ['m', 'a', 'd', 'a', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'madam'], ['m', 'a', 'd', 'a', 'm', 'a', 'toyot', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 'toyot', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'a', 'toyot', 'a', 'd', 'e', 'madam'], ['m', 'a', 'd', 'a', 'm', 'atoyota', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'atoyota', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'atoyota', 'd', 'e', 'madam'], ['m', 'a', 'd', 'ama', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'ama', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'ama', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'madam'], ['m', 'a', 'd', 'ama', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'ama', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'ama', 't', 'oyo', 't', 'a', 'd', 'e', 'madam'], ['m', 'a', 'd', 'ama', 'toyot', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'ama', 'toyot', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'a', 'd', 'ama', 'toyot', 'a', 'd', 'e', 'madam'], ['m', 'ada', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'madam'], ['m', 'ada', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'madam'], ['m', 'ada', 'm', 'a', 'toyot', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'a', 'toyot', 'a', 'd', 'e', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'a', 'toyot', 'a', 'd', 'e', 'madam'], ['m', 'ada', 'm', 'atoyota', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'atoyota', 'd', 'e', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'atoyota', 'd', 'e', 'madam'], ['madam', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['madam', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['madam', 'a', 't', 'o', 'y', 'o', 't', 'a', 'd', 'e', 'madam'], ['madam', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['madam', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'm', 'ada', 'm'], ['madam', 'a', 't', 'oyo', 't', 'a', 'd', 'e', 'madam'], ['madam', 'a', 'toyot', 'a', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['madam', 'a', 'toyot', 'a', 'd', 'e', 'm', 'ada', 'm'], ['madam', 'a', 'toyot', 'a', 'd', 'e', 'madam'], ['madam', 'atoyota', 'd', 'e', 'm', 'a', 'd', 'a', 'm'], ['madam', 'atoyota', 'd', 'e', 'm', 'ada', 'm'], ['madam', 'atoyota', 'd', 'e', 'madam']]\n assert candidate(s = \"levelnooncivicdeified\") == [['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n', 'civic', 'deified'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'civic', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n', 'civic', 'deified'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'c', 'ivi', 'c', 'deified'], ['l', 'e', 'v', 'e', 'l', 'noon', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'civic', 'd', 'eifie', 'd'], ['l', 'e', 'v', 'e', 'l', 'noon', 'civic', 'deified'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'deified'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'civic', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'o', 'o', 'n', 'civic', 'deified'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'deified'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'civic', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'n', 'oo', 'n', 'civic', 'deified'], ['l', 'eve', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'i', 'v', 'i', 'c', 'deified'], ['l', 'eve', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'noon', 'c', 'ivi', 'c', 'deified'], ['l', 'eve', 'l', 'noon', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['l', 'eve', 'l', 'noon', 'civic', 'd', 'eifie', 'd'], ['l', 'eve', 'l', 'noon', 'civic', 'deified'], ['level', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['level', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['level', 'n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'deified'], ['level', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'o', 'o', 'n', 'civic', 'd', 'eifie', 'd'], ['level', 'n', 'o', 'o', 'n', 'civic', 'deified'], ['level', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['level', 'n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'deified'], ['level', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['level', 'n', 'oo', 'n', 'c', 'ivi', 'c', 'deified'], ['level', 'n', 'oo', 'n', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'n', 'oo', 'n', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'n', 'oo', 'n', 'civic', 'd', 'eifie', 'd'], ['level', 'n', 'oo', 'n', 'civic', 'deified'], ['level', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'noon', 'c', 'i', 'v', 'i', 'c', 'd', 'eifie', 'd'], ['level', 'noon', 'c', 'i', 'v', 'i', 'c', 'deified'], ['level', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'noon', 'c', 'ivi', 'c', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'noon', 'c', 'ivi', 'c', 'd', 'eifie', 'd'], ['level', 'noon', 'c', 'ivi', 'c', 'deified'], ['level', 'noon', 'civic', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['level', 'noon', 'civic', 'd', 'e', 'ifi', 'e', 'd'], ['level', 'noon', 'civic', 'd', 'eifie', 'd'], ['level', 'noon', 'civic', 'deified']]\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 = \"refermadamracecar\") == [['r', 'e', 'f', 'e', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'cec', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'aceca', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'a', 'd', 'a', 'm', 'racecar'], ['r', 'e', 'f', 'e', 'r', 'm', 'ada', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'ada', 'm', 'r', 'a', 'cec', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'ada', 'm', 'r', 'aceca', 'r'], ['r', 'e', 'f', 'e', 'r', 'm', 'ada', 'm', 'racecar'], ['r', 'e', 'f', 'e', 'r', 'madam', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'madam', 'r', 'a', 'cec', 'a', 'r'], ['r', 'e', 'f', 'e', 'r', 'madam', 'r', 'aceca', 'r'], ['r', 'e', 'f', 'e', 'r', 'madam', 'racecar'], ['r', 'e', 'f', 'e', 'rmadamr', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'e', 'f', 'e', 'rmadamr', 'a', 'cec', 'a', 'r'], ['r', 'e', 'f', 'e', 'rmadamr', 'aceca', 'r'], ['r', 'efe', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'efe', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'cec', 'a', 'r'], ['r', 'efe', 'r', 'm', 'a', 'd', 'a', 'm', 'r', 'aceca', 'r'], ['r', 'efe', 'r', 'm', 'a', 'd', 'a', 'm', 'racecar'], ['r', 'efe', 'r', 'm', 'ada', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'efe', 'r', 'm', 'ada', 'm', 'r', 'a', 'cec', 'a', 'r'], ['r', 'efe', 'r', 'm', 'ada', 'm', 'r', 'aceca', 'r'], ['r', 'efe', 'r', 'm', 'ada', 'm', 'racecar'], ['r', 'efe', 'r', 'madam', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'efe', 'r', 'madam', 'r', 'a', 'cec', 'a', 'r'], ['r', 'efe', 'r', 'madam', 'r', 'aceca', 'r'], ['r', 'efe', 'r', 'madam', 'racecar'], ['r', 'efe', 'rmadamr', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'efe', 'rmadamr', 'a', 'cec', 'a', 'r'], ['r', 'efe', 'rmadamr', 'aceca', 'r'], ['refer', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['refer', 'm', 'a', 'd', 'a', 'm', 'r', 'a', 'cec', 'a', 'r'], ['refer', 'm', 'a', 'd', 'a', 'm', 'r', 'aceca', 'r'], ['refer', 'm', 'a', 'd', 'a', 'm', 'racecar'], ['refer', 'm', 'ada', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['refer', 'm', 'ada', 'm', 'r', 'a', 'cec', 'a', 'r'], ['refer', 'm', 'ada', 'm', 'r', 'aceca', 'r'], ['refer', 'm', 'ada', 'm', 'racecar'], ['refer', 'madam', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['refer', 'madam', 'r', 'a', 'cec', 'a', 'r'], ['refer', 'madam', 'r', 'aceca', 'r'], ['refer', 'madam', 'racecar']]\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 = \"wasitacaroracatisaw\") == [['w', 'a', 's', 'i', 't', 'a', 'c', 'a', 'r', 'o', 'r', 'a', 'c', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'a', 'c', 'a', 'r', 'o', 'r', 'aca', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'a', 'c', 'a', 'ror', 'a', 'c', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'a', 'c', 'a', 'ror', 'aca', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'a', 'c', 'arora', 'c', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'a', 'carorac', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'aca', 'r', 'o', 'r', 'a', 'c', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'aca', 'r', 'o', 'r', 'aca', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'aca', 'ror', 'a', 'c', 'a', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'aca', 'ror', 'aca', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 't', 'acaroraca', 't', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'i', 'tacaroracat', 'i', 's', 'a', 'w'], ['w', 'a', 's', 'itacaroracati', 's', 'a', 'w'], ['w', 'a', 'sitacaroracatis', 'a', 'w'], ['w', 'asitacaroracatisa', 'w'], ['wasitacaroracatisaw']]\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 = \"detartratedetartatra\") == [['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd', 'e', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd', 'e', 't', 'artatra'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'ede', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'ede', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'ede', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'ede', 't', 'artatra'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 'tedet', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 'tedet', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 'tedet', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 'tedet', 'artatra'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'atedeta', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'atedeta', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'r', 'atedeta', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'ratedetar', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 't', 'ratedetar', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'r', 'tratedetart', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd', 'e', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd', 'e', 't', 'artatra'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'ede', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'ede', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'ede', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'ede', 't', 'artatra'], ['d', 'e', 't', 'a', 'rtr', 'a', 'tedet', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 'tedet', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 'tedet', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'a', 'rtr', 'a', 'tedet', 'artatra'], ['d', 'e', 't', 'a', 'rtr', 'atedeta', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'atedeta', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'a', 'rtr', 'atedeta', 'rtatr', 'a'], ['d', 'e', 't', 'artra', 't', 'e', 'd', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'artra', 't', 'e', 'd', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'artra', 't', 'e', 'd', 'e', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'artra', 't', 'e', 'd', 'e', 't', 'artatra'], ['d', 'e', 't', 'artra', 't', 'ede', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'artra', 't', 'ede', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'artra', 't', 'ede', 't', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'artra', 't', 'ede', 't', 'artatra'], ['d', 'e', 't', 'artra', 'tedet', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 't', 'artra', 'tedet', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 't', 'artra', 'tedet', 'a', 'rtatr', 'a'], ['d', 'e', 't', 'artra', 'tedet', 'artatra'], ['d', 'e', 'tartrat', 'e', 'd', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 'tartrat', 'e', 'd', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 'tartrat', 'e', 'd', 'e', 't', 'a', 'rtatr', 'a'], ['d', 'e', 'tartrat', 'e', 'd', 'e', 't', 'artatra'], ['d', 'e', 'tartrat', 'ede', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'e', 'tartrat', 'ede', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'e', 'tartrat', 'ede', 't', 'a', 'rtatr', 'a'], ['d', 'e', 'tartrat', 'ede', 't', 'artatra'], ['d', 'etartrate', 'd', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['d', 'etartrate', 'd', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['d', 'etartrate', 'd', 'e', 't', 'a', 'rtatr', 'a'], ['d', 'etartrate', 'd', 'e', 't', 'artatra'], ['detartrated', 'e', 't', 'a', 'r', 't', 'a', 't', 'r', 'a'], ['detartrated', 'e', 't', 'a', 'r', 'tat', 'r', 'a'], ['detartrated', 'e', 't', 'a', 'rtatr', 'a'], ['detartrated', 'e', 't', 'artatra']]\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 = \"civiclevelmadamrotor\") == [['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'madam', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'l', 'eve', 'l', 'madam', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'm', 'ada', 'm', 'rotor'], ['c', 'i', 'v', 'i', 'c', 'level', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'madam', 'r', 'oto', 'r'], ['c', 'i', 'v', 'i', 'c', 'level', 'madam', 'rotor'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'rotor'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'e', 'v', 'e', 'l', 'madam', 'rotor'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'm', 'ada', 'm', 'rotor'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'madam', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'l', 'eve', 'l', 'madam', 'rotor'], ['c', 'ivi', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'level', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['c', 'ivi', 'c', 'level', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'level', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'level', 'm', 'ada', 'm', 'rotor'], ['c', 'ivi', 'c', 'level', 'madam', 'r', 'o', 't', 'o', 'r'], ['c', 'ivi', 'c', 'level', 'madam', 'r', 'oto', 'r'], ['c', 'ivi', 'c', 'level', 'madam', 'rotor'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm', 'rotor'], ['civic', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'madam', 'r', 'oto', 'r'], ['civic', 'l', 'e', 'v', 'e', 'l', 'madam', 'rotor'], ['civic', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['civic', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['civic', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'eve', 'l', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['civic', 'l', 'eve', 'l', 'm', 'ada', 'm', 'rotor'], ['civic', 'l', 'eve', 'l', 'madam', 'r', 'o', 't', 'o', 'r'], ['civic', 'l', 'eve', 'l', 'madam', 'r', 'oto', 'r'], ['civic', 'l', 'eve', 'l', 'madam', 'rotor'], ['civic', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'level', 'm', 'a', 'd', 'a', 'm', 'r', 'oto', 'r'], ['civic', 'level', 'm', 'a', 'd', 'a', 'm', 'rotor'], ['civic', 'level', 'm', 'ada', 'm', 'r', 'o', 't', 'o', 'r'], ['civic', 'level', 'm', 'ada', 'm', 'r', 'oto', 'r'], ['civic', 'level', 'm', 'ada', 'm', 'rotor'], ['civic', 'level', 'madam', 'r', 'o', 't', 'o', 'r'], ['civic', 'level', 'madam', 'r', 'oto', 'r'], ['civic', 'level', 'madam', 'rotor']]\n assert candidate(s = \"madamleveldeified\") == [['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'deified'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'deified'], ['m', 'a', 'd', 'a', 'm', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'a', 'd', 'a', 'm', 'level', 'd', 'eifie', 'd'], ['m', 'a', 'd', 'a', 'm', 'level', 'deified'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'deified'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'deified'], ['m', 'ada', 'm', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['m', 'ada', 'm', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['m', 'ada', 'm', 'level', 'd', 'eifie', 'd'], ['m', 'ada', 'm', 'level', 'deified'], ['madam', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['madam', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['madam', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['madam', 'l', 'e', 'v', 'e', 'l', 'deified'], ['madam', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['madam', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['madam', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['madam', 'l', 'eve', 'l', 'deified'], ['madam', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['madam', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['madam', 'level', 'd', 'eifie', 'd'], ['madam', 'level', 'deified']]\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 = \"amanaplanacanalpanama\") == [['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'lanacanal', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'p', 'lanacanal', 'p', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'p', 'lanacanal', 'p', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'planacanalp', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'a', 'planacanalp', 'a', 'n', 'ama'], ['a', 'm', 'a', 'n', 'a', 'planacanalp', 'ana', 'm', 'a'], ['a', 'm', 'a', 'n', 'aplanacanalpa', 'n', 'a', 'm', 'a'], ['a', 'm', 'a', 'n', 'aplanacanalpa', 'n', 'ama'], ['a', 'm', 'a', 'naplanacanalpan', 'a', 'm', 'a'], ['a', 'm', 'a', 'naplanacanalpan', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'l', 'anacana', 'l', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'p', 'lanacanal', 'p', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'p', 'lanacanal', 'p', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'p', 'lanacanal', 'p', 'ana', 'm', 'a'], ['a', 'm', 'ana', 'planacanalp', 'a', 'n', 'a', 'm', 'a'], ['a', 'm', 'ana', 'planacanalp', 'a', 'n', 'ama'], ['a', 'm', 'ana', 'planacanalp', 'ana', 'm', 'a'], ['a', 'm', 'anaplanacanalpana', 'm', 'a'], ['a', 'manaplanacanalpanam', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'a', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'a', 'n', 'aca', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'a', 'nacan', 'a', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'a', 'n', 'a', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'ana', 'c', 'ana', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'l', 'anacana', 'l', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'p', 'lanacanal', 'p', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'p', 'lanacanal', 'p', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'p', 'lanacanal', 'p', 'ana', 'm', 'a'], ['ama', 'n', 'a', 'planacanalp', 'a', 'n', 'a', 'm', 'a'], ['ama', 'n', 'a', 'planacanalp', 'a', 'n', 'ama'], ['ama', 'n', 'a', 'planacanalp', 'ana', 'm', 'a'], ['ama', 'n', 'aplanacanalpa', 'n', 'a', 'm', 'a'], ['ama', 'n', 'aplanacanalpa', 'n', 'ama'], ['ama', 'naplanacanalpan', 'a', 'm', 'a'], ['ama', 'naplanacanalpan', 'ama'], ['amanaplanacanalpanama']]\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 = \"rotorleveldeified\") == [['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'deified'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'deified'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'eifie', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'deified'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'deified'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'deified'], ['r', 'oto', 'r', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'eifie', 'd'], ['r', 'oto', 'r', 'level', 'deified'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'eifie', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'deified'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 'ifi', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'eifie', 'd'], ['rotor', 'l', 'eve', 'l', 'deified'], ['rotor', 'level', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['rotor', 'level', 'd', 'e', 'ifi', 'e', 'd'], ['rotor', 'level', 'd', 'eifie', 'd'], ['rotor', 'level', 'deified']]\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 = \"rotorleveldetartrated\") == [['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'etartrate', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'detartrated'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'd', 'etartrate', 'd'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'detartrated'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'd', 'etartrate', 'd'], ['r', 'o', 't', 'o', 'r', 'level', 'detartrated'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'd', 'etartrate', 'd'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'detartrated'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'd', 'etartrate', 'd'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'detartrated'], ['r', 'oto', 'r', 'level', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'e', 'tartrat', 'e', 'd'], ['r', 'oto', 'r', 'level', 'd', 'etartrate', 'd'], ['r', 'oto', 'r', 'level', 'detartrated'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'd', 'etartrate', 'd'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'detartrated'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'e', 'tartrat', 'e', 'd'], ['rotor', 'l', 'eve', 'l', 'd', 'etartrate', 'd'], ['rotor', 'l', 'eve', 'l', 'detartrated'], ['rotor', 'level', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['rotor', 'level', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['rotor', 'level', 'd', 'e', 't', 'artra', 't', 'e', 'd'], ['rotor', 'level', 'd', 'e', 'tartrat', 'e', 'd'], ['rotor', 'level', 'd', 'etartrate', 'd'], ['rotor', 'level', 'detartrated']]\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 = \"rotormadamlevelcivic\") == [['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'civic'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'level', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'm', 'ada', 'm', 'level', 'civic'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'l', 'eve', 'l', 'civic'], ['r', 'o', 't', 'o', 'r', 'madam', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'level', 'c', 'ivi', 'c'], ['r', 'o', 't', 'o', 'r', 'madam', 'level', 'civic'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'civic'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'a', 'd', 'a', 'm', 'level', 'civic'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'l', 'eve', 'l', 'civic'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'level', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'm', 'ada', 'm', 'level', 'civic'], ['r', 'oto', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'madam', 'l', 'e', 'v', 'e', 'l', 'civic'], ['r', 'oto', 'r', 'madam', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'madam', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'madam', 'l', 'eve', 'l', 'civic'], ['r', 'oto', 'r', 'madam', 'level', 'c', 'i', 'v', 'i', 'c'], ['r', 'oto', 'r', 'madam', 'level', 'c', 'ivi', 'c'], ['r', 'oto', 'r', 'madam', 'level', 'civic'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'civic'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'level', 'c', 'ivi', 'c'], ['rotor', 'm', 'a', 'd', 'a', 'm', 'level', 'civic'], ['rotor', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['rotor', 'm', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'civic'], ['rotor', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'ada', 'm', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['rotor', 'm', 'ada', 'm', 'l', 'eve', 'l', 'civic'], ['rotor', 'm', 'ada', 'm', 'level', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'm', 'ada', 'm', 'level', 'c', 'ivi', 'c'], ['rotor', 'm', 'ada', 'm', 'level', 'civic'], ['rotor', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'madam', 'l', 'e', 'v', 'e', 'l', 'c', 'ivi', 'c'], ['rotor', 'madam', 'l', 'e', 'v', 'e', 'l', 'civic'], ['rotor', 'madam', 'l', 'eve', 'l', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'madam', 'l', 'eve', 'l', 'c', 'ivi', 'c'], ['rotor', 'madam', 'l', 'eve', 'l', 'civic'], ['rotor', 'madam', 'level', 'c', 'i', 'v', 'i', 'c'], ['rotor', 'madam', 'level', 'c', 'ivi', 'c'], ['rotor', 'madam', 'level', 'civic']]\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 = \"levelonevenolevel\") == [['l', 'e', 'v', 'e', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'eve', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'level'], ['l', 'e', 'v', 'e', 'l', 'o', 'n', 'eve', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'n', 'eve', 'n', 'o', 'l', 'eve', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'n', 'eve', 'n', 'o', 'level'], ['l', 'e', 'v', 'e', 'l', 'o', 'neven', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'neven', 'o', 'l', 'eve', 'l'], ['l', 'e', 'v', 'e', 'l', 'o', 'neven', 'o', 'level'], ['l', 'e', 'v', 'e', 'l', 'oneveno', 'l', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'l', 'oneveno', 'l', 'eve', 'l'], ['l', 'e', 'v', 'e', 'l', 'oneveno', 'level'], ['l', 'e', 'v', 'e', 'lonevenol', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'lonevenol', 'eve', 'l'], ['l', 'e', 'v', 'elonevenole', 'v', 'e', 'l'], ['l', 'e', 'velonevenolev', 'e', 'l'], ['l', 'eve', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'eve', 'l'], ['l', 'eve', 'l', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'level'], ['l', 'eve', 'l', 'o', 'n', 'eve', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l', 'o', 'n', 'eve', 'n', 'o', 'l', 'eve', 'l'], ['l', 'eve', 'l', 'o', 'n', 'eve', 'n', 'o', 'level'], ['l', 'eve', 'l', 'o', 'neven', 'o', 'l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l', 'o', 'neven', 'o', 'l', 'eve', 'l'], ['l', 'eve', 'l', 'o', 'neven', 'o', 'level'], ['l', 'eve', 'l', 'oneveno', 'l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l', 'oneveno', 'l', 'eve', 'l'], ['l', 'eve', 'l', 'oneveno', 'level'], ['l', 'eve', 'lonevenol', 'e', 'v', 'e', 'l'], ['l', 'eve', 'lonevenol', 'eve', 'l'], ['l', 'evelonevenoleve', 'l'], ['level', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['level', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'l', 'eve', 'l'], ['level', 'o', 'n', 'e', 'v', 'e', 'n', 'o', 'level'], ['level', 'o', 'n', 'eve', 'n', 'o', 'l', 'e', 'v', 'e', 'l'], ['level', 'o', 'n', 'eve', 'n', 'o', 'l', 'eve', 'l'], ['level', 'o', 'n', 'eve', 'n', 'o', 'level'], ['level', 'o', 'neven', 'o', 'l', 'e', 'v', 'e', 'l'], ['level', 'o', 'neven', 'o', 'l', 'eve', 'l'], ['level', 'o', 'neven', 'o', 'level'], ['level', 'oneveno', 'l', 'e', 'v', 'e', 'l'], ['level', 'oneveno', 'l', 'eve', 'l'], ['level', 'oneveno', 'level'], ['levelonevenolevel']]\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 = \"racecardeifiedcivic\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'civic'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'civic'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'eifie', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'd', 'eifie', 'd', 'civic'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'deified', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'deified', 'c', 'ivi', 'c'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'deified', 'civic'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'civic'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'e', 'ifi', 'e', 'd', 'civic'], ['r', 'a', 'cec', 'a', 'r', 'd', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'eifie', 'd', 'c', 'ivi', 'c'], ['r', 'a', 'cec', 'a', 'r', 'd', 'eifie', 'd', 'civic'], ['r', 'a', 'cec', 'a', 'r', 'deified', 'c', 'i', 'v', 'i', 'c'], ['r', 'a', 'cec', 'a', 'r', 'deified', 'c', 'ivi', 'c'], ['r', 'a', 'cec', 'a', 'r', 'deified', 'civic'], ['r', 'aceca', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'aceca', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'aceca', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'civic'], ['r', 'aceca', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'aceca', 'r', 'd', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c'], ['r', 'aceca', 'r', 'd', 'e', 'ifi', 'e', 'd', 'civic'], ['r', 'aceca', 'r', 'd', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c'], ['r', 'aceca', 'r', 'd', 'eifie', 'd', 'c', 'ivi', 'c'], ['r', 'aceca', 'r', 'd', 'eifie', 'd', 'civic'], ['r', 'aceca', 'r', 'deified', 'c', 'i', 'v', 'i', 'c'], ['r', 'aceca', 'r', 'deified', 'c', 'ivi', 'c'], ['r', 'aceca', 'r', 'deified', 'civic'], ['racecar', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['racecar', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c'], ['racecar', 'd', 'e', 'i', 'f', 'i', 'e', 'd', 'civic'], ['racecar', 'd', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['racecar', 'd', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c'], ['racecar', 'd', 'e', 'ifi', 'e', 'd', 'civic'], ['racecar', 'd', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c'], ['racecar', 'd', 'eifie', 'd', 'c', 'ivi', 'c'], ['racecar', 'd', 'eifie', 'd', 'civic'], ['racecar', 'deified', 'c', 'i', 'v', 'i', 'c'], ['racecar', 'deified', 'c', 'ivi', 'c'], ['racecar', 'deified', 'civic']]\n assert candidate(s = \"xyxzyx\") == [['x', 'y', 'x', 'z', 'y', 'x'], ['xyx', 'z', 'y', 'x']]\n assert candidate(s = \"rotordetartratoredor\") == [['r', 'o', 't', 'o', 'r', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'd', 'e', 't', 'artra', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'd', 'e', 'tartrat', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'oto', 'r', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'oto', 'r', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'oto', 'r', 'd', 'e', 't', 'artra', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['r', 'oto', 'r', 'd', 'e', 'tartrat', 'o', 'r', 'e', 'd', 'o', 'r'], ['rotor', 'd', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['rotor', 'd', 'e', 't', 'a', 'rtr', 'a', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['rotor', 'd', 'e', 't', 'artra', 't', 'o', 'r', 'e', 'd', 'o', 'r'], ['rotor', 'd', 'e', 'tartrat', 'o', 'r', 'e', 'd', 'o', 'r']]\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 = \"referencereference\") == [['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'ere', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e', 'r', 'efe', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e', 'refer', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'ere', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'ere', 'f', 'ere', 'n', 'c', 'e'], ['r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'erefere', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'e', 'r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'e', 'r', 'e', 'f', 'ere', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'e', 'r', 'efe', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'e', 'refer', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'ere', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'ere', 'f', 'ere', 'n', 'c', 'e'], ['r', 'e', 'f', 'ere', 'n', 'c', 'erefere', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'ere', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'e', 'r', 'efe', 'r', 'e', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'e', 'refer', 'e', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'ere', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'ere', 'f', 'ere', 'n', 'c', 'e'], ['r', 'efe', 'r', 'e', 'n', 'c', 'erefere', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'e', 'r', 'e', 'f', 'ere', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'e', 'r', 'efe', 'r', 'e', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'e', 'refer', 'e', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'ere', 'f', 'e', 'r', 'e', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'ere', 'f', 'ere', 'n', 'c', 'e'], ['refer', 'e', 'n', 'c', 'erefere', 'n', 'c', 'e']]\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 assert candidate(s = \"deifiedrotorcivic\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'ivi', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'civic'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'oto', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'oto', 'r', 'c', 'ivi', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'oto', 'r', 'civic'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'rotor', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'rotor', 'c', 'ivi', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'rotor', 'civic'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'ivi', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'o', 't', 'o', 'r', 'civic'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'oto', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'oto', 'r', 'c', 'ivi', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'oto', 'r', 'civic'], ['d', 'e', 'ifi', 'e', 'd', 'rotor', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'rotor', 'c', 'ivi', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'rotor', 'civic'], ['d', 'eifie', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'eifie', 'd', 'r', 'o', 't', 'o', 'r', 'c', 'ivi', 'c'], ['d', 'eifie', 'd', 'r', 'o', 't', 'o', 'r', 'civic'], ['d', 'eifie', 'd', 'r', 'oto', 'r', 'c', 'i', 'v', 'i', 'c'], ['d', 'eifie', 'd', 'r', 'oto', 'r', 'c', 'ivi', 'c'], ['d', 'eifie', 'd', 'r', 'oto', 'r', 'civic'], ['d', 'eifie', 'd', 'rotor', 'c', 'i', 'v', 'i', 'c'], ['d', 'eifie', 'd', 'rotor', 'c', 'ivi', 'c'], ['d', 'eifie', 'd', 'rotor', 'civic'], ['deified', 'r', 'o', 't', 'o', 'r', 'c', 'i', 'v', 'i', 'c'], ['deified', 'r', 'o', 't', 'o', 'r', 'c', 'ivi', 'c'], ['deified', 'r', 'o', 't', 'o', 'r', 'civic'], ['deified', 'r', 'oto', 'r', 'c', 'i', 'v', 'i', 'c'], ['deified', 'r', 'oto', 'r', 'c', 'ivi', 'c'], ['deified', 'r', 'oto', 'r', 'civic'], ['deified', 'rotor', 'c', 'i', 'v', 'i', 'c'], ['deified', 'rotor', 'c', 'ivi', 'c'], ['deified', 'rotor', 'civic']]\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().partition", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> partition(string s) {", "container": "Solution", "callable": "partition", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector>", "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.\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\n \nConstraints:\n\n1 <= s.length <= 2000\ns consists of lowercase English letters only.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().minCut", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minCut(string s) {", "container": "Solution", "callable": "minCut", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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 ith station is gas[i].\nYou have a car with an unlimited gas tank and it costs cost[i] of gas to travel from the ith station to its next (i + 1)th station. You begin the journey with an empty tank at one of the gas stations.\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\n \nConstraints:\n\nn == gas.length == cost.length\n1 <= n <= 105\n0 <= gas[i], cost[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["gas", "cost"], "leetcode_dataset_entry_point": "Solution().canCompleteCircuit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int canCompleteCircuit(vector& gas, vector& cost) {", "container": "Solution", "callable": "canCompleteCircuit", "parameters": [{"name": "gas", "type": "vector&"}, {"name": "cost", "type": "vector&"}], "return_type": "int", "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. Each child is assigned a rating value given in the integer array ratings.\nYou are giving candies to these children subjected to the following requirements:\n\nEach child must have at least one candy.\nChildren 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\n \nConstraints:\n\nn == ratings.length\n1 <= n <= 2 * 104\n0 <= ratings[i] <= 2 * 104\n\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"}, "metadata": {"canonical_parameter_names": ["ratings"], "leetcode_dataset_entry_point": "Solution().candy", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int candy(vector& ratings) {", "container": "Solution", "callable": "candy", "parameters": [{"name": "ratings", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 3 * 104\n-3 * 104 <= nums[i] <= 3 * 104\nEach element in the array appears twice except for one element which appears only once.\n\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 = [100000, 100000, 50000]) == 50000\n assert candidate(nums = [5, 7, 5, 7, 9]) == 9\n assert candidate(nums = [3, 3, 2, 2, 5]) == 5\n assert candidate(nums = [2147483647, -2147483648, -2147483648, 2147483647, 0]) == 0\n assert candidate(nums = [0, 1, 0, 1, 2]) == 2\n assert candidate(nums = [100000, 100000, -100000]) == -100000\n assert candidate(nums = [100000, -100000, 100000]) == -100000\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 = [12345, 12345, 67890, 67890, 24680, 55555, 24680, 77777, 77777, 99999, 99999]) == 55555\n assert candidate(nums = [123456, 123456, 789012, 789012, 345678, 345678, 901234]) == 901234\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 = [100000, 100000, 200000, 200000, 300000, 300000, 400000]) == 400000\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 = [-1, -2, -3, -4, -5, -1, -2, -3, -4, -5, 100000]) == 100000\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 = [99999, 99999, 88888, 88888, 77777, 77777]) == 0\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 = [100000, 100000, -50000, -50000, 23456, 23456, 78901]) == 78901\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 = [98765, 87654, 76543, 65432, 54321, 43210, 32109, 21098, 10987, 98765, 87654, 76543, 65432, 54321, 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]) == 1898\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 = [100000, -100000, 100000, 200000, -200000, 200000, 300000, -300000, 300000, 400000]) == -768\n assert candidate(nums = [123, 456, 789, 123, 456, 789, 101112, -101112, -101112, 131415, 131415]) == 101112\n assert candidate(nums = [23456, 23456, 78901, 22222, 22222, 11111, 11111, 33333, 33333, 44444, 44444, 55555, 55555, 66666, 66666, 77777]) == 7140\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 = [100000, 100000, 200000, 300000, 200000, 300000, 400000]) == 400000\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 = [100000, 100000, 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, 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 = [100000, -100000, 100000, -100000, 1]) == 1\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 = [1234, 1234, 5678, 5678, 91011, 91011, 121314]) == 121314\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 = [100000, 200000, 300000, 100000, 200000]) == 300000\n assert candidate(nums = [100000, 100000, 20000, 20000, 3000, 3000, 40]) == 40\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 = [98765, 98765, 87654, 87654, 76543, 76543, 65432, 65432, 54321, 54321, 12345]) == 12345\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 = [12345, 12345, 67890, 67890, -1, -1, -2, -2, -3, -3, 5]) == 5\n assert candidate(nums = [-100, -200, -100, -300, -200, -400, -300]) == -400\n assert candidate(nums = [12345, 67890, 12345, 67890, -11111, -22222, -11111, -33333, -22222, -33333, 44444]) == 44444\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6]) == 6\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\nYou must implement a solution with a linear runtime complexity and use only constant extra space.\n \nExample 1:\nInput: nums = [2,2,3,2]\nOutput: 3\nExample 2:\nInput: nums = [0,1,0,1,0,1,99]\nOutput: 99\n\n \nConstraints:\n\n1 <= nums.length <= 3 * 104\n-231 <= nums[i] <= 231 - 1\nEach element in nums appears exactly three times except for one element which appears once.\n\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 = [1000000000, 1000000000, 1000000000, 2000000000, 2000000000, 2000000000, 3000000000]) == -1294967296\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= s.length <= 300\n1 <= wordDict.length <= 1000\n1 <= wordDict[i].length <= 20\ns and wordDict[i] consist of only lowercase English letters.\nAll the strings of wordDict are unique.\n\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 = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'breakproblem', 'wordbreakproblem', 'wordbreakpro', 'blem', 'wordprob', 'lem', 'wordb', 'reak', 'breakpro', 'brea', 'kprob', 'wordbre', 'akprob', 'wordbreakp', 'rob', 'reakp', 'reakpro', 'wordbre', 'reakproblem']) == True\n assert candidate(s = \"cascadingsubstrings\",wordDict = ['cascade', 'sub', 'strings', 'cascade', 'ing', 'substring']) == False\n assert candidate(s = \"breaktheglassceiling\",wordDict = ['break', 'the', 'glass', 'ceiling', 'breaks', 'theglass', 'ceiling']) == 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 = \"mississippi\",wordDict = ['mis', 'is', 'sip', 'i', 'pi', 'p', 'mississipp', 'missis', 'miss', 'issi', 'ippi', 'ssippi', 'ssipp', 'ssip', 'ssips', 'ssip', 'issipi', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips', 'issip', 'issipp', 'issip', 'issips']) == True\n assert candidate(s = \"complexwordbreakproblem\",wordDict = ['complex', 'word', 'break', 'problem', 'wordbreak', 'breakprob', 'lem', 'prob', 'lemp', 'complexword']) == True\n assert candidate(s = \"mississippi\",wordDict = ['mis', 'issi', 'ppi', 'issip', 'ippi', 'missis', 'sip', 'pi', 'ssippi', 'is', 'ip', 'sipi', 'issipp', 'ippi', 'ippi', 'mississi', 'ppis', 'ippii', 'missi', 'mississipp', 'i', 'p', 'issippip', 'issiippi', 'mississippi']) == True\n assert candidate(s = \"abracadabra\",wordDict = ['abra', 'cad', 'abra', 'cadabra', 'ra', 'dab', 'ra', 'cadabra']) == True\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'superca', 'li', 'fragi', 'listicex', 'piali', 'do']) == True\n assert candidate(s = \"abrakadabra\",wordDict = ['abra', 'kadabra', 'abra', 'ka', 'da', 'bra']) == 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 = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'superfragilisticexpialidocious']) == True\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 = \"thisisaverylongstringthatisdifficulttobreak\",wordDict = ['this', 'is', 'a', 'very', 'long', 'string', 'that', 'is', 'difficult', 'to', 'break', 'avery', 'longstring', 'isdifficult']) == 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 = \"programmingisfun\",wordDict = ['pro', 'gram', 'ming', 'is', 'fun', 'grammi', 'ngis', 'funny', 'progr', 'amming', 'isfun', 'ogramming', 'grammi', 'ngisfu', 'n']) == 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 = \"thelongestword\",wordDict = ['the', 'long', 'longest', 'word', 'lon', 'gest', 'longes', 'estword', 'longestwo', 'longestwo', 'longes', 'gestwo', 'est', 'wordwo', 'rdwo', 'rdo', 'wo', 'o']) == 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 = \"theskyisblue\",wordDict = ['the', 'sky', 'is', 'blue', 'thesky', 'isblue', 'theskyisblue', 'theblue', 'theskyblue', 'blueis', 'isblue', 'blueisblue', 'theskyis']) == True\n assert candidate(s = \"mississippi\",wordDict = ['miss', 'issi', 'ssippi', 'ppi', 'ipi', 'i']) == True\n assert candidate(s = \"sheisbeautiful\",wordDict = ['she', 'is', 'beau', 'tiful', 'beauti', 'ful', 'be', 'auti', 'ful', 'ti', 'ful', 'shi', 'bea', 'autiful', 'sheis']) == 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 = \"mississippi\",wordDict = ['mis', 'is', 'is', 'ppi', 'issi', 'ippi', 'pp', 'miss', 'mis', 'ippi']) == 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 = \"thelongestword\",wordDict = ['the', 'long', 'longest', 'word', 'longestword', 'oneword', 'endword', 'word', 'one']) == 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 = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragi', 'listic', 'expi', 'ali', 'docious', 'supercalifragilisticexpialidoci']) == True\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 = \"programmingisawesome\",wordDict = ['pro', 'gram', 'ming', 'is', 'awe', 'some', 'awesome', 'awe', 'so', 'me']) == 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 = \"internationalization\",wordDict = ['inter', 'national', 'ization', 'inter', 'nationalization']) == True\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"}, "metadata": {"canonical_parameter_names": ["s", "wordDict"], "leetcode_dataset_entry_point": "Solution().wordBreak", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool wordBreak(string s, vector& wordDict) {", "container": "Solution", "callable": "wordBreak", "parameters": [{"name": "s", "type": "string"}, {"name": "wordDict", "type": "vector&"}], "return_type": "bool", "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.\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\n \nConstraints:\n\n1 <= s.length <= 20\n1 <= wordDict.length <= 1000\n1 <= wordDict[i].length <= 10\ns and wordDict[i] consist of only lowercase English letters.\nAll the strings of wordDict are unique.\nInput is generated in a way that the length of the answer doesn't exceed 105.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aaaaaaa\",wordDict = ['aa', 'aaa']) == ['aa aa aaa', 'aa aaa aa', 'aaa aa aa']\n assert candidate(s = \"pineapplepenapple\",wordDict = ['apple', 'pen', 'applepen', 'pine', 'pineapple']) == ['pine apple pen apple', 'pine applepen apple', 'pineapple pen apple']\n assert candidate(s = \"a\",wordDict = ['a']) == ['a']\n assert candidate(s = \"catsanddog\",wordDict = ['cat', 'cats', 'and', 'sand', 'dog']) == ['cat sand dog', 'cats and dog']\n assert candidate(s = \"catsandog\",wordDict = ['cats', 'dog', 'sand', 'and', 'cat']) == []\n assert candidate(s = \"abcd\",wordDict = ['a', 'abc', 'b', 'cd']) == ['a b cd']\n assert candidate(s = \"leetcodeleet\",wordDict = ['leet', 'code']) == ['leet code leet']\n assert candidate(s = \"nevergonnagiveyouup\",wordDict = ['never', 'gonna', 'give', 'you', 'up', 'nevergonna', 'gonnagive', 'onnagive', 'nnagive', 'nagive', 'agive', 'giveu', 'giveyo', 'giveyou', 'giveyoup', 'giveyoupu', 'giveyoupup', 'youpup', 'oupup', 'pupup', 'upup', 'pup', 'up']) == ['never gonna give you up', 'never gonna giveyou up', 'never gonnagive you up', 'nevergonna give you up', 'nevergonna giveyou up']\n assert candidate(s = \"thisproblemisverydifficult\",wordDict = ['this', 'problem', 'is', 'very', 'difficult', 'difficul', 'icult']) == ['this problem is very difficult']\n assert 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 candidate(s = \"amazingrace\",wordDict = ['amazing', 'race', 'amaz', 'ing', 'zing', 'ace', 'rac']) == ['amaz ing race', 'amazing race']\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'breakprob', 'lem', 'pro', 'b', 'reak', 'prob', 'lem', 'wordbreakprob']) == ['word b reak pro b lem', 'word b reak prob lem', 'word b reak problem', 'word break pro b lem', 'word break prob lem', 'word break problem', 'word breakprob lem', 'wordbreak pro b lem', 'wordbreak prob lem', 'wordbreak problem', 'wordbreakprob lem']\n assert candidate(s = \"skyscraper\",wordDict = ['sky', 'scraper', 'sky', 'scrap', 'er']) == ['sky scrap er', 'sky scraper']\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'prob', 'lem']) == ['word break prob lem', 'word break problem', 'wordbreak prob lem', 'wordbreak problem']\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefgabcdefg\",wordDict = ['abc', 'defg', 'abcd', 'efgabc', 'abcdefg', 'fgabcde', 'abcde', 'bcdefg', 'def', 'abcfg']) == ['abc defg abc defg abc defg abc defg abc defg', 'abc defg abc defg abc defg abc defg abcdefg', 'abc defg abc defg abc defg abcd efgabc defg', 'abc defg abc defg abc defg abcdefg abc defg', 'abc defg abc defg abc defg abcdefg abcdefg', 'abc defg abc defg abcd efgabc defg abc defg', 'abc defg abc defg abcd efgabc defg abcdefg', 'abc defg abc defg abcdefg abc defg abc defg', 'abc defg abc defg abcdefg abc defg abcdefg', 'abc defg abc defg abcdefg abcd efgabc defg', 'abc defg abc defg abcdefg abcdefg abc defg', 'abc defg abc defg abcdefg abcdefg abcdefg', 'abc defg abcd efgabc defg abc defg abc defg', 'abc defg abcd efgabc defg abc defg abcdefg', 'abc defg abcd efgabc defg abcd efgabc defg', 'abc defg abcd efgabc defg abcdefg abc defg', 'abc defg abcd efgabc defg abcdefg abcdefg', 'abc defg abcdefg abc defg abc defg abc defg', 'abc defg abcdefg abc defg abc defg abcdefg', 'abc defg abcdefg abc defg abcd efgabc defg', 'abc defg abcdefg abc defg abcdefg abc defg', 'abc defg abcdefg abc defg abcdefg abcdefg', 'abc defg abcdefg abcd efgabc defg abc defg', 'abc defg abcdefg abcd efgabc defg abcdefg', 'abc defg abcdefg abcdefg abc defg abc defg', 'abc defg abcdefg abcdefg abc defg abcdefg', 'abc defg abcdefg abcdefg abcd efgabc defg', 'abc defg abcdefg abcdefg abcdefg abc defg', 'abc defg abcdefg abcdefg abcdefg abcdefg', 'abcd efgabc defg abc defg abc defg abc defg', 'abcd efgabc defg abc defg abc defg abcdefg', 'abcd efgabc defg abc defg abcd efgabc defg', 'abcd efgabc defg abc defg abcdefg abc defg', 'abcd efgabc defg abc defg abcdefg abcdefg', 'abcd efgabc defg abcd efgabc defg abc defg', 'abcd efgabc defg abcd efgabc defg abcdefg', 'abcd efgabc defg abcdefg abc defg abc defg', 'abcd efgabc defg abcdefg abc defg abcdefg', 'abcd efgabc defg abcdefg abcd efgabc defg', 'abcd efgabc defg abcdefg abcdefg abc defg', 'abcd efgabc defg abcdefg abcdefg abcdefg', 'abcdefg abc defg abc defg abc defg abc defg', 'abcdefg abc defg abc defg abc defg abcdefg', 'abcdefg abc defg abc defg abcd efgabc defg', 'abcdefg abc defg abc defg abcdefg abc defg', 'abcdefg abc defg abc defg abcdefg abcdefg', 'abcdefg abc defg abcd efgabc defg abc defg', 'abcdefg abc defg abcd efgabc defg abcdefg', 'abcdefg abc defg abcdefg abc defg abc defg', 'abcdefg abc defg abcdefg abc defg abcdefg', 'abcdefg abc defg abcdefg abcd efgabc defg', 'abcdefg abc defg abcdefg abcdefg abc defg', 'abcdefg abc defg abcdefg abcdefg abcdefg', 'abcdefg abcd efgabc defg abc defg abc defg', 'abcdefg abcd efgabc defg abc defg abcdefg', 'abcdefg abcd efgabc defg abcd efgabc defg', 'abcdefg abcd efgabc defg abcdefg abc defg', 'abcdefg abcd efgabc defg abcdefg abcdefg', 'abcdefg abcdefg abc defg abc defg abc defg', 'abcdefg abcdefg abc defg abc defg abcdefg', 'abcdefg abcdefg abc defg abcd efgabc defg', 'abcdefg abcdefg abc defg abcdefg abc defg', 'abcdefg abcdefg abc defg abcdefg abcdefg', 'abcdefg abcdefg abcd efgabc defg abc defg', 'abcdefg abcdefg abcd efgabc defg abcdefg', 'abcdefg abcdefg abcdefg abc defg abc defg', 'abcdefg abcdefg abcdefg abc defg abcdefg', 'abcdefg abcdefg abcdefg abcd efgabc defg', 'abcdefg abcdefg abcdefg abcdefg abc defg', 'abcdefg abcdefg abcdefg abcdefg abcdefg']\n assert candidate(s = \"anagramproblem\",wordDict = ['anagram', 'anagramprob', 'gram', 'prob', 'lem', 'problem', 'ana', 'gramprob', 'anag', 'ramprob', 'rampro', 'an', 'grampro', 'gramprob']) == ['ana gram prob lem', 'ana gram problem', 'ana gramprob lem', 'anag ramprob lem', 'anagram prob lem', 'anagram problem', 'anagramprob lem']\n assert candidate(s = \"amazingrace\",wordDict = ['amazing', 'race', 'amazingr', 'acer', 'age', 'maze', 'rang', 'racer', 'ace', 'zing']) == ['amazing race', 'amazingr ace']\n assert candidate(s = \"thisproblemiswaytoolongtobreakdownintosmallervariables\",wordDict = ['this', 'problem', 'is', 'way', 'too', 'long', 'to', 'be', 'broken', 'down', 'into', 'smaller', 'variables', 'break', 'down', 'small']) == ['this problem is way too long to break down into smaller variables']\n assert candidate(s = \"mississippi\",wordDict = ['mis', 'is', 'sip', 'issi', 'ppi', 'ippi', 'pi', 'pippi', 'miss', 'sipi']) == ['miss is sip pi', 'miss issi ppi']\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",wordDict = ['quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog', 'quickbrown', 'brownfox', 'jumpsover', 'overthe', 'the', 'lazydog']) == ['quick brown fox jumps over the lazy dog', 'quick brown fox jumps over the lazydog', 'quick brown fox jumps overthe lazy dog', 'quick brown fox jumps overthe lazydog', 'quick brown fox jumpsover the lazy dog', 'quick brown fox jumpsover the lazydog', 'quick brownfox jumps over the lazy dog', 'quick brownfox jumps over the lazydog', 'quick brownfox jumps overthe lazy dog', 'quick brownfox jumps overthe lazydog', 'quick brownfox jumpsover the lazy dog', 'quick brownfox jumpsover the lazydog', 'quickbrown fox jumps over the lazy dog', 'quickbrown fox jumps over the lazydog', 'quickbrown fox jumps overthe lazy dog', 'quickbrown fox jumps overthe lazydog', 'quickbrown fox jumpsover the lazy dog', 'quickbrown fox jumpsover the lazydog']\n assert 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 candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'breakproblem', 'problem', 'wordbreak', 'breakpro', 'lem']) == ['word break problem', 'word breakproblem', 'wordbreak problem']\n assert candidate(s = \"amazingprogramminglanguage\",wordDict = ['amazing', 'programming', 'language', 'pro', 'gram', 'ming', 'amaz', 'ing', 'za', 'zing']) == ['amaz ing pro gram ming language', 'amaz ing programming language', 'amazing pro gram ming language', 'amazing programming language']\n assert candidate(s = \"programmingisfun\",wordDict = ['programming', 'is', 'fun', 'pro', 'gram', 'ming', 'gramming', 'isfun', 'progra']) == ['pro gram ming is fun', 'pro gram ming isfun', 'pro gramming is fun', 'pro gramming isfun', 'programming is fun', 'programming isfun']\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragi', 'listic', 'expi', 'ali', 'docious', 'supercal', 'ifragilisticexpi', 'alidocious', 'frag', 'listicexpialido', 'cious']) == ['super cali fragi listic expi ali docious', 'super cali fragi listic expi alidocious', 'super cali fragi listicexpialido cious', 'supercal ifragilisticexpi ali docious', 'supercal ifragilisticexpi alidocious']\n assert 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 candidate(s = \"theprogramminglanguage\",wordDict = ['the', 'pro', 'gram', 'ming', 'lan', 'guage']) == ['the pro gram ming lan guage']\n assert 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 candidate(s = \"backtrackingalgorithm\",wordDict = ['back', 'tracking', 'algorithm', 'backtrack', 'ingalgo', 'rithm', 'backtracki', 'ngalgor', 'thmalgo', 'rithmal', 'backtrac', 'kingalg', 'thm', 'algo', 'thmalgo', 'backtrackin', 'backtrackinga', 'backtrackingal', 'backtrackingalg', 'backtrackingalgo']) == ['back tracking algo rithm', 'back tracking algorithm', 'backtrack ingalgo rithm', 'backtrackingalgo rithm']\n assert candidate(s = \"thepinkquickbrownfoxjumpsoverthelazydog\",wordDict = ['the', 'pink', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'pinkquick', 'brownfox', 'overthe', 'lazydog']) == ['the pink quick brown fox jumps over the lazy dog', 'the pink quick brown fox jumps over the lazydog', 'the pink quick brown fox jumps overthe lazy dog', 'the pink quick brown fox jumps overthe lazydog', 'the pink quick brownfox jumps over the lazy dog', 'the pink quick brownfox jumps over the lazydog', 'the pink quick brownfox jumps overthe lazy dog', 'the pink quick brownfox jumps overthe lazydog', 'the pinkquick brown fox jumps over the lazy dog', 'the pinkquick brown fox jumps over the lazydog', 'the pinkquick brown fox jumps overthe lazy dog', 'the pinkquick brown fox jumps overthe lazydog', 'the pinkquick brownfox jumps over the lazy dog', 'the pinkquick brownfox jumps over the lazydog', 'the pinkquick brownfox jumps overthe lazy dog', 'the pinkquick brownfox jumps overthe lazydog']\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",wordDict = ['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quickbrown', 'brownfox', 'foxjump', 'jumpsover', 'overthe', 'thelazy']) == ['the quick brown fox jumps over the lazy dog', 'the quick brown fox jumps over thelazy dog', 'the quick brown fox jumps overthe lazy dog', 'the quick brown fox jumpsover the lazy dog', 'the quick brown fox jumpsover thelazy dog', 'the quick brownfox jumps over the lazy dog', 'the quick brownfox jumps over thelazy dog', 'the quick brownfox jumps overthe lazy dog', 'the quick brownfox jumpsover the lazy dog', 'the quick brownfox jumpsover thelazy dog', 'the quickbrown fox jumps over the lazy dog', 'the quickbrown fox jumps over thelazy dog', 'the quickbrown fox jumps overthe lazy dog', 'the quickbrown fox jumpsover the lazy dog', 'the quickbrown fox jumpsover thelazy dog']\n assert 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 candidate(s = \"thisisjustasillywordtobreak\",wordDict = ['this', 'is', 'just', 'a', 'silly', 'word', 'to', 'break', 'sillyword', 'wordtobreak']) == ['this is just a silly word to break', 'this is just a silly wordtobreak', 'this is just a sillyword to break']\n assert candidate(s = \"thisisaverylongsentencethatweneedtosplit\",wordDict = ['this', 'is', 'a', 'very', 'long', 'sentence', 'that', 'we', 'need', 'to', 'split', 'verylong', 'sentencewe', 'needtos', 'tosplit', 'thisisavery']) == ['this is a very long sentence that we need to split', 'this is a very long sentence that we need tosplit', 'this is a verylong sentence that we need to split', 'this is a verylong sentence that we need tosplit', 'thisisavery long sentence that we need to split', 'thisisavery long sentence that we need tosplit']\n assert 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 candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'frag', 'ilisti', 'c', 'ex', 'piali', 'doc', 'io', 'us', 'superca', 'li', 'frag', 'listic', 'expi', 'ali', 'do', 'cious']) == ['super c ali frag ilisti c ex piali do c io us', 'super c ali frag ilisti c ex piali do cious', 'super c ali frag ilisti c ex piali doc io us', 'super c ali frag ilisti c ex piali docious', 'super c ali frag ilisti c expi ali do c io us', 'super c ali frag ilisti c expi ali do cious', 'super c ali frag ilisti c expi ali doc io us', 'super c ali frag ilisti c expi ali docious', 'super c ali frag ilisti c expiali do c io us', 'super c ali frag ilisti c expiali do cious', 'super c ali frag ilisti c expiali doc io us', 'super c ali frag ilisti c expiali docious', 'super c ali fragilistic ex piali do c io us', 'super c ali fragilistic ex piali do cious', 'super c ali fragilistic ex piali doc io us', 'super c ali fragilistic ex piali docious', 'super c ali fragilistic expi ali do c io us', 'super c ali fragilistic expi ali do cious', 'super c ali fragilistic expi ali doc io us', 'super c ali fragilistic expi ali docious', 'super c ali fragilistic expiali do c io us', 'super c ali fragilistic expiali do cious', 'super c ali fragilistic expiali doc io us', 'super c ali fragilistic expiali docious', 'super cali frag ilisti c ex piali do c io us', 'super cali frag ilisti c ex piali do cious', 'super cali frag ilisti c ex piali doc io us', 'super cali frag ilisti c ex piali docious', 'super cali frag ilisti c expi ali do c io us', 'super cali frag ilisti c expi ali do cious', 'super cali frag ilisti c expi ali doc io us', 'super cali frag ilisti c expi ali docious', 'super cali frag ilisti c expiali do c io us', 'super cali frag ilisti c expiali do cious', 'super cali frag ilisti c expiali doc io us', 'super cali frag ilisti c expiali docious', 'super cali fragilistic ex piali do c io us', 'super cali fragilistic ex piali do cious', 'super cali fragilistic ex piali doc io us', 'super cali fragilistic ex piali docious', 'super cali fragilistic expi ali do c io us', 'super cali fragilistic expi ali do cious', 'super cali fragilistic expi ali doc io us', 'super cali fragilistic expi ali docious', 'super cali fragilistic expiali do c io us', 'super cali fragilistic expiali do cious', 'super cali fragilistic expiali doc io us', 'super cali fragilistic expiali docious', 'superca li frag ilisti c ex piali do c io us', 'superca li frag ilisti c ex piali do cious', 'superca li frag ilisti c ex piali doc io us', 'superca li frag ilisti c ex piali docious', 'superca li frag ilisti c expi ali do c io us', 'superca li frag ilisti c expi ali do cious', 'superca li frag ilisti c expi ali doc io us', 'superca li frag ilisti c expi ali docious', 'superca li frag ilisti c expiali do c io us', 'superca li frag ilisti c expiali do cious', 'superca li frag ilisti c expiali doc io us', 'superca li frag ilisti c expiali docious', 'superca li fragilistic ex piali do c io us', 'superca li fragilistic ex piali do cious', 'superca li fragilistic ex piali doc io us', 'superca li fragilistic ex piali docious', 'superca li fragilistic expi ali do c io us', 'superca li fragilistic expi ali do cious', 'superca li fragilistic expi ali doc io us', 'superca li fragilistic expi ali docious', 'superca li fragilistic expiali do c io us', 'superca li fragilistic expiali do cious', 'superca li fragilistic expiali doc io us', 'superca li fragilistic expiali docious']\n assert candidate(s = \"leetcode\",wordDict = ['leet', 'code', 'le', 'et', 'code', 'cod', 'leetco']) == ['le et code', 'leet code']\n assert candidate(s = \"thelongestwordisinthisdictionary\",wordDict = ['the', 'longest', 'word', 'is', 'in', 'this', 'dictionary']) == ['the longest word is in this dictionary']\n assert candidate(s = \"backtracking\",wordDict = ['back', 'track', 'ing', 'backtrack', 'backtracking', 'tra', 'ck', 'bac', 'king']) == ['back tra ck ing', 'back track ing', 'backtrack ing', 'backtracking']\n assert candidate(s = \"thethreefishes\",wordDict = ['the', 'three', 'threefish', 'fish', 'fishes']) == ['the three fishes']\n assert 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 candidate(s = \"canadaday\",wordDict = ['can', 'ada', 'day', 'canada', 'anada', 'aday']) == ['can ada day', 'canada day']\n assert candidate(s = \"ambiguityindictionary\",wordDict = ['ambi', 'biguity', 'in', 'dictionary', 'ambigui', 'tity', 'uity', 'amb', 'uityin', 'ityinden', 'uityindict', 'uityindicti', 'uityindiction', 'uityindictiona', 'uityindictionar', 'uityindictionary']) == []\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'pro', 'blem', 'wordbreakpro', 'breakpro', 'lemproblem']) == ['word break pro blem', 'word break problem', 'word breakpro blem', 'wordbreak pro blem', 'wordbreak problem', 'wordbreakpro blem']\n assert candidate(s = \"optimizethiscode\",wordDict = ['optimize', 'this', 'code', 'opt', 'imize', 'thisco', 'deopt', 'mizethis', 'ethiscode', 'optimizethis', 'opti', 'mize', 'thisc']) == ['opt imize this code', 'opti mize this code', 'opti mizethis code', 'optimize this code', 'optimizethis code']\n assert candidate(s = \"abababababababababababababab\",wordDict = ['aba', 'abab', 'ababa', 'bab', 'babab', 'bababa']) == ['aba bab aba bab aba bab aba bab abab', 'aba bab aba bab aba bab abab aba bab', 'aba bab aba bab aba bab ababa babab', 'aba bab aba bab aba babab aba babab', 'aba bab aba bab aba babab abab abab', 'aba bab aba bab aba babab ababa bab', 'aba bab aba bab aba bababa bab abab', 'aba bab aba bab abab aba bab aba bab', 'aba bab aba bab abab aba babab abab', 'aba bab aba bab abab aba bababa bab', 'aba bab aba bab abab abab aba babab', 'aba bab aba bab abab abab abab abab', 'aba bab aba bab abab abab ababa bab', 'aba bab aba bab abab ababa bab abab', 'aba bab aba bab ababa bab aba babab', 'aba bab aba bab ababa bab abab abab', 'aba bab aba bab ababa bab ababa bab', 'aba bab aba bab ababa babab aba bab', 'aba bab aba bab ababa bababa babab', 'aba bab aba babab aba bab aba babab', 'aba bab aba babab aba bab abab abab', 'aba bab aba babab aba bab ababa bab', 'aba bab aba babab aba babab aba bab', 'aba bab aba babab aba bababa babab', 'aba bab aba babab abab aba bab abab', 'aba bab aba babab abab abab aba bab', 'aba bab aba babab abab ababa babab', 'aba bab aba babab ababa bab aba bab', 'aba bab aba babab ababa babab abab', 'aba bab aba babab ababa bababa bab', 'aba bab aba bababa bab aba bab abab', 'aba bab aba bababa bab abab aba bab', 'aba bab aba bababa bab ababa babab', 'aba bab aba bababa babab aba babab', 'aba bab aba bababa babab abab abab', 'aba bab aba bababa babab ababa bab', 'aba bab aba bababa bababa bab abab', 'aba bab abab aba bab aba bab aba bab', 'aba bab abab aba bab aba babab abab', 'aba bab abab aba bab aba bababa bab', 'aba bab abab aba bab abab aba babab', 'aba bab abab aba bab abab abab abab', 'aba bab abab aba bab abab ababa bab', 'aba bab abab aba bab ababa bab abab', 'aba bab abab aba babab aba bab abab', 'aba bab abab aba babab abab aba bab', 'aba bab abab aba babab ababa babab', 'aba bab abab aba bababa bab aba bab', 'aba bab abab aba bababa babab abab', 'aba bab abab aba bababa bababa bab', 'aba bab abab abab aba bab aba babab', 'aba bab abab abab aba bab abab abab', 'aba bab abab abab aba bab ababa bab', 'aba bab abab abab aba babab aba bab', 'aba bab abab abab aba bababa babab', 'aba bab abab abab abab aba bab abab', 'aba bab abab abab abab abab aba bab', 'aba bab abab abab abab ababa babab', 'aba bab abab abab ababa bab aba bab', 'aba bab abab abab ababa babab abab', 'aba bab abab abab ababa bababa bab', 'aba bab abab ababa bab aba bab abab', 'aba bab abab ababa bab abab aba bab', 'aba bab abab ababa bab ababa babab', 'aba bab abab ababa babab aba babab', 'aba bab abab ababa babab abab abab', 'aba bab abab ababa babab ababa bab', 'aba bab abab ababa bababa bab abab', 'aba bab ababa bab aba bab aba babab', 'aba bab ababa bab aba bab abab abab', 'aba bab ababa bab aba bab ababa bab', 'aba bab ababa bab aba babab aba bab', 'aba bab ababa bab aba bababa babab', 'aba bab ababa bab abab aba bab abab', 'aba bab ababa bab abab abab aba bab', 'aba bab ababa bab abab ababa babab', 'aba bab ababa bab ababa bab aba bab', 'aba bab ababa bab ababa babab abab', 'aba bab ababa bab ababa bababa bab', 'aba bab ababa babab aba bab aba bab', 'aba bab ababa babab aba babab abab', 'aba bab ababa babab aba bababa bab', 'aba bab ababa babab abab aba babab', 'aba bab ababa babab abab abab abab', 'aba bab ababa babab abab ababa bab', 'aba bab ababa babab ababa bab abab', 'aba bab ababa bababa bab aba babab', 'aba bab ababa bababa bab abab abab', 'aba bab ababa bababa bab ababa bab', 'aba bab ababa bababa babab aba bab', 'aba bab ababa bababa bababa babab', 'aba babab aba bab aba bab aba babab', 'aba babab aba bab aba bab abab abab', 'aba babab aba bab aba bab ababa bab', 'aba babab aba bab aba babab aba bab', 'aba babab aba bab aba bababa babab', 'aba babab aba bab abab aba bab abab', 'aba babab aba bab abab abab aba bab', 'aba babab aba bab abab ababa babab', 'aba babab aba bab ababa bab aba bab', 'aba babab aba bab ababa babab abab', 'aba babab aba bab ababa bababa bab', 'aba babab aba babab aba bab aba bab', 'aba babab aba babab aba babab abab', 'aba babab aba babab aba bababa bab', 'aba babab aba babab abab aba babab', 'aba babab aba babab abab abab abab', 'aba babab aba babab abab ababa bab', 'aba babab aba babab ababa bab abab', 'aba babab aba bababa bab aba babab', 'aba babab aba bababa bab abab abab', 'aba babab aba bababa bab ababa bab', 'aba babab aba bababa babab aba bab', 'aba babab aba bababa bababa babab', 'aba babab abab aba bab aba bab abab', 'aba babab abab aba bab abab aba bab', 'aba babab abab aba bab ababa babab', 'aba babab abab aba babab aba babab', 'aba babab abab aba babab abab abab', 'aba babab abab aba babab ababa bab', 'aba babab abab aba bababa bab abab', 'aba babab abab abab aba bab aba bab', 'aba babab abab abab aba babab abab', 'aba babab abab abab aba bababa bab', 'aba babab abab abab abab aba babab', 'aba babab abab abab abab abab abab', 'aba babab abab abab abab ababa bab', 'aba babab abab abab ababa bab abab', 'aba babab abab ababa bab aba babab', 'aba babab abab ababa bab abab abab', 'aba babab abab ababa bab ababa bab', 'aba babab abab ababa babab aba bab', 'aba babab abab ababa bababa babab', 'aba babab ababa bab aba bab aba bab', 'aba babab ababa bab aba babab abab', 'aba babab ababa bab aba bababa bab', 'aba babab ababa bab abab aba babab', 'aba babab ababa bab abab abab abab', 'aba babab ababa bab abab ababa bab', 'aba babab ababa bab ababa bab abab', 'aba babab ababa babab aba bab abab', 'aba babab ababa babab abab aba bab', 'aba babab ababa babab ababa babab', 'aba babab ababa bababa bab aba bab', 'aba babab ababa bababa babab abab', 'aba babab ababa bababa bababa bab', 'aba bababa bab aba bab aba bab abab', 'aba bababa bab aba bab abab aba bab', 'aba bababa bab aba bab ababa babab', 'aba bababa bab aba babab aba babab', 'aba bababa bab aba babab abab abab', 'aba bababa bab aba babab ababa bab', 'aba bababa bab aba bababa bab abab', 'aba bababa bab abab aba bab aba bab', 'aba bababa bab abab aba babab abab', 'aba bababa bab abab aba bababa bab', 'aba bababa bab abab abab aba babab', 'aba bababa bab abab abab abab abab', 'aba bababa bab abab abab ababa bab', 'aba bababa bab abab ababa bab abab', 'aba bababa bab ababa bab aba babab', 'aba bababa bab ababa bab abab abab', 'aba bababa bab ababa bab ababa bab', 'aba bababa bab ababa babab aba bab', 'aba bababa bab ababa bababa babab', 'aba bababa babab aba bab aba babab', 'aba bababa babab aba bab abab abab', 'aba bababa babab aba bab ababa bab', 'aba bababa babab aba babab aba bab', 'aba bababa babab aba bababa babab', 'aba bababa babab abab aba bab abab', 'aba bababa babab abab abab aba bab', 'aba bababa babab abab ababa babab', 'aba bababa babab ababa bab aba bab', 'aba bababa babab ababa babab abab', 'aba bababa babab ababa bababa bab', 'aba bababa bababa bab aba bab abab', 'aba bababa bababa bab abab aba bab', 'aba bababa bababa bab ababa babab', 'aba bababa bababa babab aba babab', 'aba bababa bababa babab abab abab', 'aba bababa bababa babab ababa bab', 'aba bababa bababa bababa bab abab', 'abab aba bab aba bab aba bab aba bab', 'abab aba bab aba bab aba babab abab', 'abab aba bab aba bab aba bababa bab', 'abab aba bab aba bab abab aba babab', 'abab aba bab aba bab abab abab abab', 'abab aba bab aba bab abab ababa bab', 'abab aba bab aba bab ababa bab abab', 'abab aba bab aba babab aba bab abab', 'abab aba bab aba babab abab aba bab', 'abab aba bab aba babab ababa babab', 'abab aba bab aba bababa bab aba bab', 'abab aba bab aba bababa babab abab', 'abab aba bab aba bababa bababa bab', 'abab aba bab abab aba bab aba babab', 'abab aba bab abab aba bab abab abab', 'abab aba bab abab aba bab ababa bab', 'abab aba bab abab aba babab aba bab', 'abab aba bab abab aba bababa babab', 'abab aba bab abab abab aba bab abab', 'abab aba bab abab abab abab aba bab', 'abab aba bab abab abab ababa babab', 'abab aba bab abab ababa bab aba bab', 'abab aba bab abab ababa babab abab', 'abab aba bab abab ababa bababa bab', 'abab aba bab ababa bab aba bab abab', 'abab aba bab ababa bab abab aba bab', 'abab aba bab ababa bab ababa babab', 'abab aba bab ababa babab aba babab', 'abab aba bab ababa babab abab abab', 'abab aba bab ababa babab ababa bab', 'abab aba bab ababa bababa bab abab', 'abab aba babab aba bab aba bab abab', 'abab aba babab aba bab abab aba bab', 'abab aba babab aba bab ababa babab', 'abab aba babab aba babab aba babab', 'abab aba babab aba babab abab abab', 'abab aba babab aba babab ababa bab', 'abab aba babab aba bababa bab abab', 'abab aba babab abab aba bab aba bab', 'abab aba babab abab aba babab abab', 'abab aba babab abab aba bababa bab', 'abab aba babab abab abab aba babab', 'abab aba babab abab abab abab abab', 'abab aba babab abab abab ababa bab', 'abab aba babab abab ababa bab abab', 'abab aba babab ababa bab aba babab', 'abab aba babab ababa bab abab abab', 'abab aba babab ababa bab ababa bab', 'abab aba babab ababa babab aba bab', 'abab aba babab ababa bababa babab', 'abab aba bababa bab aba bab aba bab', 'abab aba bababa bab aba babab abab', 'abab aba bababa bab aba bababa bab', 'abab aba bababa bab abab aba babab', 'abab aba bababa bab abab abab abab', 'abab aba bababa bab abab ababa bab', 'abab aba bababa bab ababa bab abab', 'abab aba bababa babab aba bab abab', 'abab aba bababa babab abab aba bab', 'abab aba bababa babab ababa babab', 'abab aba bababa bababa bab aba bab', 'abab aba bababa bababa babab abab', 'abab aba bababa bababa bababa bab', 'abab abab aba bab aba bab aba babab', 'abab abab aba bab aba bab abab abab', 'abab abab aba bab aba bab ababa bab', 'abab abab aba bab aba babab aba bab', 'abab abab aba bab aba bababa babab', 'abab abab aba bab abab aba bab abab', 'abab abab aba bab abab abab aba bab', 'abab abab aba bab abab ababa babab', 'abab abab aba bab ababa bab aba bab', 'abab abab aba bab ababa babab abab', 'abab abab aba bab ababa bababa bab', 'abab abab aba babab aba bab aba bab', 'abab abab aba babab aba babab abab', 'abab abab aba babab aba bababa bab', 'abab abab aba babab abab aba babab', 'abab abab aba babab abab abab abab', 'abab abab aba babab abab ababa bab', 'abab abab aba babab ababa bab abab', 'abab abab aba bababa bab aba babab', 'abab abab aba bababa bab abab abab', 'abab abab aba bababa bab ababa bab', 'abab abab aba bababa babab aba bab', 'abab abab aba bababa bababa babab', 'abab abab abab aba bab aba bab abab', 'abab abab abab aba bab abab aba bab', 'abab abab abab aba bab ababa babab', 'abab abab abab aba babab aba babab', 'abab abab abab aba babab abab abab', 'abab abab abab aba babab ababa bab', 'abab abab abab aba bababa bab abab', 'abab abab abab abab aba bab aba bab', 'abab abab abab abab aba babab abab', 'abab abab abab abab aba bababa bab', 'abab abab abab abab abab aba babab', 'abab abab abab abab abab abab abab', 'abab abab abab abab abab ababa bab', 'abab abab abab abab ababa bab abab', 'abab abab abab ababa bab aba babab', 'abab abab abab ababa bab abab abab', 'abab abab abab ababa bab ababa bab', 'abab abab abab ababa babab aba bab', 'abab abab abab ababa bababa babab', 'abab abab ababa bab aba bab aba bab', 'abab abab ababa bab aba babab abab', 'abab abab ababa bab aba bababa bab', 'abab abab ababa bab abab aba babab', 'abab abab ababa bab abab abab abab', 'abab abab ababa bab abab ababa bab', 'abab abab ababa bab ababa bab abab', 'abab abab ababa babab aba bab abab', 'abab abab ababa babab abab aba bab', 'abab abab ababa babab ababa babab', 'abab abab ababa bababa bab aba bab', 'abab abab ababa bababa babab abab', 'abab abab ababa bababa bababa bab', 'abab ababa bab aba bab aba bab abab', 'abab ababa bab aba bab abab aba bab', 'abab ababa bab aba bab ababa babab', 'abab ababa bab aba babab aba babab', 'abab ababa bab aba babab abab abab', 'abab ababa bab aba babab ababa bab', 'abab ababa bab aba bababa bab abab', 'abab ababa bab abab aba bab aba bab', 'abab ababa bab abab aba babab abab', 'abab ababa bab abab aba bababa bab', 'abab ababa bab abab abab aba babab', 'abab ababa bab abab abab abab abab', 'abab ababa bab abab abab ababa bab', 'abab ababa bab abab ababa bab abab', 'abab ababa bab ababa bab aba babab', 'abab ababa bab ababa bab abab abab', 'abab ababa bab ababa bab ababa bab', 'abab ababa bab ababa babab aba bab', 'abab ababa bab ababa bababa babab', 'abab ababa babab aba bab aba babab', 'abab ababa babab aba bab abab abab', 'abab ababa babab aba bab ababa bab', 'abab ababa babab aba babab aba bab', 'abab ababa babab aba bababa babab', 'abab ababa babab abab aba bab abab', 'abab ababa babab abab abab aba bab', 'abab ababa babab abab ababa babab', 'abab ababa babab ababa bab aba bab', 'abab ababa babab ababa babab abab', 'abab ababa babab ababa bababa bab', 'abab ababa bababa bab aba bab abab', 'abab ababa bababa bab abab aba bab', 'abab ababa bababa bab ababa babab', 'abab ababa bababa babab aba babab', 'abab ababa bababa babab abab abab', 'abab ababa bababa babab ababa bab', 'abab ababa bababa bababa bab abab', 'ababa bab aba bab aba bab aba babab', 'ababa bab aba bab aba bab abab abab', 'ababa bab aba bab aba bab ababa bab', 'ababa bab aba bab aba babab aba bab', 'ababa bab aba bab aba bababa babab', 'ababa bab aba bab abab aba bab abab', 'ababa bab aba bab abab abab aba bab', 'ababa bab aba bab abab ababa babab', 'ababa bab aba bab ababa bab aba bab', 'ababa bab aba bab ababa babab abab', 'ababa bab aba bab ababa bababa bab', 'ababa bab aba babab aba bab aba bab', 'ababa bab aba babab aba babab abab', 'ababa bab aba babab aba bababa bab', 'ababa bab aba babab abab aba babab', 'ababa bab aba babab abab abab abab', 'ababa bab aba babab abab ababa bab', 'ababa bab aba babab ababa bab abab', 'ababa bab aba bababa bab aba babab', 'ababa bab aba bababa bab abab abab', 'ababa bab aba bababa bab ababa bab', 'ababa bab aba bababa babab aba bab', 'ababa bab aba bababa bababa babab', 'ababa bab abab aba bab aba bab abab', 'ababa bab abab aba bab abab aba bab', 'ababa bab abab aba bab ababa babab', 'ababa bab abab aba babab aba babab', 'ababa bab abab aba babab abab abab', 'ababa bab abab aba babab ababa bab', 'ababa bab abab aba bababa bab abab', 'ababa bab abab abab aba bab aba bab', 'ababa bab abab abab aba babab abab', 'ababa bab abab abab aba bababa bab', 'ababa bab abab abab abab aba babab', 'ababa bab abab abab abab abab abab', 'ababa bab abab abab abab ababa bab', 'ababa bab abab abab ababa bab abab', 'ababa bab abab ababa bab aba babab', 'ababa bab abab ababa bab abab abab', 'ababa bab abab ababa bab ababa bab', 'ababa bab abab ababa babab aba bab', 'ababa bab abab ababa bababa babab', 'ababa bab ababa bab aba bab aba bab', 'ababa bab ababa bab aba babab abab', 'ababa bab ababa bab aba bababa bab', 'ababa bab ababa bab abab aba babab', 'ababa bab ababa bab abab abab abab', 'ababa bab ababa bab abab ababa bab', 'ababa bab ababa bab ababa bab abab', 'ababa bab ababa babab aba bab abab', 'ababa bab ababa babab abab aba bab', 'ababa bab ababa babab ababa babab', 'ababa bab ababa bababa bab aba bab', 'ababa bab ababa bababa babab abab', 'ababa bab ababa bababa bababa bab', 'ababa babab aba bab aba bab aba bab', 'ababa babab aba bab aba babab abab', 'ababa babab aba bab aba bababa bab', 'ababa babab aba bab abab aba babab', 'ababa babab aba bab abab abab abab', 'ababa babab aba bab abab ababa bab', 'ababa babab aba bab ababa bab abab', 'ababa babab aba babab aba bab abab', 'ababa babab aba babab abab aba bab', 'ababa babab aba babab ababa babab', 'ababa babab aba bababa bab aba bab', 'ababa babab aba bababa babab abab', 'ababa babab aba bababa bababa bab', 'ababa babab abab aba bab aba babab', 'ababa babab abab aba bab abab abab', 'ababa babab abab aba bab ababa bab', 'ababa babab abab aba babab aba bab', 'ababa babab abab aba bababa babab', 'ababa babab abab abab aba bab abab', 'ababa babab abab abab abab aba bab', 'ababa babab abab abab ababa babab', 'ababa babab abab ababa bab aba bab', 'ababa babab abab ababa babab abab', 'ababa babab abab ababa bababa bab', 'ababa babab ababa bab aba bab abab', 'ababa babab ababa bab abab aba bab', 'ababa babab ababa bab ababa babab', 'ababa babab ababa babab aba babab', 'ababa babab ababa babab abab abab', 'ababa babab ababa babab ababa bab', 'ababa babab ababa bababa bab abab', 'ababa bababa bab aba bab aba babab', 'ababa bababa bab aba bab abab abab', 'ababa bababa bab aba bab ababa bab', 'ababa bababa bab aba babab aba bab', 'ababa bababa bab aba bababa babab', 'ababa bababa bab abab aba bab abab', 'ababa bababa bab abab abab aba bab', 'ababa bababa bab abab ababa babab', 'ababa bababa bab ababa bab aba bab', 'ababa bababa bab ababa babab abab', 'ababa bababa bab ababa bababa bab', 'ababa bababa babab aba bab aba bab', 'ababa bababa babab aba babab abab', 'ababa bababa babab aba bababa bab', 'ababa bababa babab abab aba babab', 'ababa bababa babab abab abab abab', 'ababa bababa babab abab ababa bab', 'ababa bababa babab ababa bab abab', 'ababa bababa bababa bab aba babab', 'ababa bababa bababa bab abab abab', 'ababa bababa bababa bab ababa bab', 'ababa bababa bababa babab aba bab', 'ababa bababa bababa bababa babab']\n assert candidate(s = \"abcdefgh\",wordDict = ['ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh']) == ['abcdefgh']\n assert candidate(s = \"elephant\",wordDict = ['ele', 'phant', 'lephant', 'el', 'phant', 'le', 'pha', 'nt', 'e', 'phantom', 'pha']) == ['e le pha nt', 'e le phant', 'e lephant', 'el e pha nt', 'el e phant', 'ele pha nt', 'ele phant']\n assert candidate(s = \"thelongwordthatshouldbreakdown\",wordDict = ['the', 'long', 'word', 'that', 'should', 'break', 'down', 'thelon', 'breakdo', 'wordtha', 'thatshoul', 'ouldbreak']) == ['the long word that should break down']\n assert candidate(s = \"thisisaverylongstringthatcanbebrokenintomultiplewordswithdictionary\",wordDict = ['this', 'is', 'a', 'very', 'long', 'string', 'that', 'can', 'be', 'broken', 'into', 'multiple', 'words', 'with', 'dictionary']) == ['this is a very long string that can be broken into multiple words with dictionary']\n assert candidate(s = \"solvetheproblem\",wordDict = ['solve', 'the', 'problem', 'solvethe', 'solvepro', 'prob', 'lem', 'prob', 'lempro', 'solvethepro', 'solvetheprob', 'solvetheproblem', 'sol', 'vel', 'ethe', 'prob', 'pro', 'lem', 'lempro', 'solvethepro', 'solvetheprob', 'solvetheproblem']) == ['solve the prob lem', 'solve the problem', 'solvethe prob lem', 'solvethe problem', 'solvetheprob lem', 'solvetheproblem']\n assert candidate(s = \"aquickbrownfox\",wordDict = ['a', 'quick', 'brown', 'fox', 'quickbrown', 'brownfox']) == ['a quick brown fox', 'a quick brownfox', 'a quickbrown fox']\n assert candidate(s = \"thisisatoyproblem\",wordDict = ['this', 'is', 'atoy', 'problem', 'isato', 'oyprob', 'lem', 'toy', 'prob', 'em', 'l', 'em', 'thisisato', 'oy', 'prob']) == ['this is atoy prob l em', 'this is atoy prob lem', 'this is atoy problem']\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",wordDict = ['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'thequick', 'brownfox', 'jumpsover', 'thelazy']) == ['the quick brown fox jumps over the lazy dog', 'the quick brown fox jumps over thelazy dog', 'the quick brown fox jumpsover the lazy dog', 'the quick brown fox jumpsover thelazy dog', 'the quick brownfox jumps over the lazy dog', 'the quick brownfox jumps over thelazy dog', 'the quick brownfox jumpsover the lazy dog', 'the quick brownfox jumpsover thelazy dog', 'thequick brown fox jumps over the lazy dog', 'thequick brown fox jumps over thelazy dog', 'thequick brown fox jumpsover the lazy dog', 'thequick brown fox jumpsover thelazy dog', 'thequick brownfox jumps over the lazy dog', 'thequick brownfox jumps over thelazy dog', 'thequick brownfox jumpsover the lazy dog', 'thequick brownfox jumpsover thelazy dog']\n assert candidate(s = \"abcd\",wordDict = ['a', 'b', 'c', 'd', 'ab', 'bc', 'cd', 'abcd', 'abc', 'bcd', 'ab', 'bc', 'a', 'd', 'abcd']) == ['a b c d', 'a b cd', 'a bc d', 'a bcd', 'ab c d', 'ab cd', 'abc d', 'abcd']\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'pro', 'blem']) == ['word break pro blem', 'word break problem', 'wordbreak pro blem', 'wordbreak problem']\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'wordbreak', 'breakprob', 'lem', 'prob', 'lempro', 'breakpro', 'wordbreakpro', 'wordbreakprob', 'wordbreakproblem']) == ['word break prob lem', 'word break problem', 'word breakprob lem', 'wordbreak prob lem', 'wordbreak problem', 'wordbreakprob lem', 'wordbreakproblem']\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'cal', 'frag', 'ilis', 'tic', 'exp', 'expi', 'ali', 'do', 'cious']) == ['super cali frag ilis tic expi ali do cious', 'super cali frag ilis tic expi ali docious', 'super cali frag ilis tic expiali do cious', 'super cali frag ilis tic expiali docious', 'super cali fragilistic expi ali do cious', 'super cali fragilistic expi ali docious', 'super cali fragilistic expiali do cious', 'super cali fragilistic expiali docious']\n assert candidate(s = \"solvetheproblemrecursively\",wordDict = ['solve', 'the', 'problem', 'recursively', 'solvethe', 'problemre', 'cursivelysolve', 'solvetheproblem', 'theproblemis', 'solvetheproble', 'problemrecursively', 'theisproblem']) == ['solve the problem recursively', 'solve the problemrecursively', 'solvethe problem recursively', 'solvethe problemrecursively', 'solvetheproblem recursively']\n"}, "metadata": {"canonical_parameter_names": ["s", "wordDict"], "leetcode_dataset_entry_point": "Solution().wordBreak", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector wordBreak(string s, vector& wordDict) {", "container": "Solution", "callable": "wordBreak", "parameters": [{"name": "s", "type": "string"}, {"name": "wordDict", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 144, "task_id": "binary-tree-preorder-traversal", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return the preorder traversal of its nodes' values.\n \nExample 1:\n\nInput: root = [1,null,2,3]\nOutput: [1,2,3]\nExplanation:\n\n\nExample 2:\n\nInput: root = [1,2,3,4,5,null,8,null,null,6,7,9]\nOutput: [1,2,4,5,6,7,3,8,9]\nExplanation:\n\n\nExample 3:\n\nInput: root = []\nOutput: []\n\nExample 4:\n\nInput: root = [1]\nOutput: [1]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 100].\n-100 <= Node.val <= 100\n\n \nFollow up: Recursive solution is trivial, could you do it iteratively?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5])) == [1, 2, 4, 3, 5]\n assert candidate(root = tree_node([1, None, None])) == [1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 8, None, None, 6, 7, 9])) == [1, 2, 4, 5, 6, 7, 3, 8, 9]\n assert candidate(root = tree_node([1, None, 3, None, 2])) == [1, 3, 2]\n assert candidate(root = tree_node([1, 2])) == [1, 2]\n assert candidate(root = tree_node([1, None, 2])) == [1, 2]\n assert candidate(root = tree_node([1, None, 2, 3])) == [1, 2, 3]\n assert candidate(root = tree_node([1])) == [1]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [10, 5, 15, 6, 20]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9])) == [10, 5, 3, 1, 7, 6, 9, 15, 18]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [10, 5, 3, 7, 15, 18]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12])) == [1, 2, 4, 6, 8, 10, 12, 3, 5, 7, 9, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, None, None, None, None, 5, 6])) == [1, 2, 4, 3]\n assert candidate(root = tree_node([100, -50, 50, -100, 0, 49, 99, -150, None, -75, -25, -1, None, 5, None, None, 25, 75, 98, 100])) == [100, -50, -100, -150, 25, 0, -75, 75, 98, -25, 100, 50, 49, -1, 99, 5]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == [8, 4, 2, 1, 3, 6, 5, 7, 12, 10, 9, 11, 14, 13, 15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, None, 6, 7, None, None, 8, None, 9])) == [1, 2, 4, 6, 8, 7, 9, 3, 5]\n assert candidate(root = tree_node([3, None, 5, 4, 6, None, 7])) == [3, 5, 4, 7, 6]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [1, 2, 4, 8, 13, 9, 14, 5, 10, 15, 3, 6, 11, 7, 12]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, 6, None, 7, 8, None, 9, 10, None, 11])) == [1, 2, 3, 4, 5, 6, 7, 9, 11, 8, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 7, None, None, None, None, 8, 9])) == [1, 2, 4, 5, 6, 7, 3]\n assert candidate(root = tree_node([10, None, 20, None, 30, None, 40, 50, 60])) == [10, 20, 30, 40, 50, 60]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, 4, 6, 9, 11, 20])) == [10, 5, 3, 1, 4, 7, 6, 9, 15, 18, 11, 20]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20])) == [7, 3, 15, 9, 20]\n assert candidate(root = tree_node([8, 5, 12, 4, 6, 10, 14, 2, None, None, None, None, 11, None, 13])) == [8, 5, 4, 2, 6, 12, 10, 11, 14, 13]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, None, None, None, 6, None, 7])) == [1, 2, 4, 3, 5, 6, 7]\n assert candidate(root = tree_node([1, None, 2, None, None, None, None, 3, None, 4, None, 5])) == [1, 2]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4])) == [1, 2]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9, None, None, 12, None, None, None, None, None, 20])) == [10, 5, 3, 1, 12, 20, 7, 6, 9, 15, 18]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 4, 6, 8, 3, 5, 7, 9]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, None, None, 12, None, 22, 28])) == [20, 10, 5, 15, 12, 30, 25, 22, 28, 35]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 4, 6, 8, 10, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, None, None, 6, 7])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [1, 2, 4, 8, 16, 17, 9, 18, 19, 5, 10, 20, 11, 3, 6, 12, 13, 7, 14, 15]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, None, None, 12, None, None, 13, None, None, 14, None, None, 15])) == [1, 2, 4, 5, 8, 12, 15, 9, 13, 3, 6, 10, 11, 14, 7]\n assert candidate(root = tree_node([3, 1, 4, None, 2, None, None, None, None, 5])) == [3, 1, 2, 4]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [1, 2, 4, 8, 9, 5, 10, 11, 3, 6, 12, 13, 7, 14, 15]\n assert candidate(root = tree_node([100, -50, 200, -200, -100, 150, 300, -300, -150, -75, -25, 25, 75, 125, 175, 225, 275])) == [100, -50, -200, -300, 225, 275, -150, -100, -75, -25, 200, 150, 25, 75, 300, 125, 175]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == [10, 5, 3, 1, 7, 6, 15, 18]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, None, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 4, 6, 8, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([5, 4, 7, 3, 8, 6, 9, 2, 11, 12, 13, 14, 15, 16, 17])) == [5, 4, 3, 2, 11, 8, 12, 13, 7, 6, 14, 15, 9, 16, 17]\n assert candidate(root = tree_node([3, 1, 2, None, None, None, 4, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([0, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8])) == [0, -1, -2, -4, 5, 3, -5, 6, 2, -3, -6, 7, 4, -7, 8]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, 0, 2, 6, None, None, None, None, None, None, 10])) == [5, 3, 1, 0, 10, 2, 4, 6, 8, 7, 9]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 2]\n assert candidate(root = tree_node([-1, -2, None, -3, -4, -5])) == [-1, -2, -3, -5, -4]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == [1, 2, 4, 8, 9, 16, 17, 5, 10, 18, 19, 11, 20, 21, 3, 6, 12, 22, 23, 13, 24, 25, 7, 14, 15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 15, 25, 35, 45, 55, 65, 75, 85])) == [50, 30, 20, 15, 25, 40, 35, 45, 70, 60, 55, 65, 80, 75, 85]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19, 20, None, 21, 22, 23, None, 24, 25, 26])) == [1, 2, 4, 8, 9, 16, 17, 5, 10, 18, 19, 11, 20, 3, 6, 12, 21, 22, 13, 23, 7, 14, 24, 25, 15, 26]\n assert candidate(root = tree_node([0, -1, 2, -2, None, 3, None, None, None, None, None, None, 4])) == [0, -1, -2, 2, 3]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [5, 1, 4, 3, 6]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, 5, None, 6, 7, None, 8, 9, None, 10, None, 11, 12])) == [1, 2, 3, 4, 6, 8, 11, 9, 12, 5, 7, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, 8, 9])) == [1, 2, 4, 7, 5, 3, 6, 8, 9]\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [0, 1, 3, 7, 15, 16, 8, 17, 18, 4, 9, 19, 20, 10, 2, 5, 11, 12, 6, 13, 14]\n assert candidate(root = tree_node([2, 1, 3, None, None, 4, 5])) == [2, 1, 3, 4, 5]\n assert candidate(root = tree_node([100, -50, 150, -200, 0, 120, 200, -300, -100, -60, 90, 110, 160, 180, 220])) == [100, -50, -200, -300, -100, 0, -60, 90, 150, 120, 110, 160, 200, 180, 220]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, 1])) == [5, 3, 2, 1, 4, 6, 7]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6])) == [10, 5, 3, 1, 7, 6, 15, 13, 18]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, None, None, None, None, 10, 11])) == [1, 2, 4, 8, 10, 11, 9, 5, 3, 6, 7]\n assert candidate(root = tree_node([3, 1, 4, None, 2])) == [3, 1, 2, 4]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 4, 6, 8, 10, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, 4, None, 5])) == [1, 2]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, None, 6, 7, 8, 9, 10, 11])) == [1, 2, 4, 5, 6, 8, 9, 7, 10, 11, 3]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([5, 4, 6, 2, 5, None, None, 1, None, 3])) == [5, 4, 2, 1, 5, 3, 6]\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 15, 25, None, None, 55, None, None, 75, 65, 85])) == [50, 30, 20, 15, 65, 85, 25, 40, 70, 60, 55, 80, 75]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, None, 5])) == [1, 2]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, 4, None, 5])) == [1, 2]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, None, None, None, None, None, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == [1, 2, 4, 8, 10, 13, 19, 20, 14, 21, 22, 9, 11, 15, 23, 24, 16, 25, 12, 17, 18, 5, 3, 6, 7]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, None, 6, None, 7])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([5, None, 10, None, 15, None, 20, None, 25])) == [5, 10, 15, 20, 25]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().preorderTraversal", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector preorderTraversal(TreeNode* root) {", "container": "Solution", "callable": "preorderTraversal", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 145, "task_id": "binary-tree-postorder-traversal", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return the postorder traversal of its nodes' values.\n \nExample 1:\n\nInput: root = [1,null,2,3]\nOutput: [3,2,1]\nExplanation:\n\n\nExample 2:\n\nInput: root = [1,2,3,4,5,null,8,null,null,6,7,9]\nOutput: [4,6,7,5,2,9,8,3,1]\nExplanation:\n\n\nExample 3:\n\nInput: root = []\nOutput: []\n\nExample 4:\n\nInput: root = [1]\nOutput: [1]\n\n \nConstraints:\n\nThe number of the nodes in the tree is in the range [0, 100].\n-100 <= Node.val <= 100\n\n \nFollow up: Recursive solution is trivial, could you do it iteratively?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([2, None, 1])) == [1, 2]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 8, None, None, 6, 7, 9])) == [4, 6, 7, 5, 2, 9, 8, 3, 1]\n assert candidate(root = tree_node([1, 2])) == [2, 1]\n assert candidate(root = tree_node([1, None, 2, 3])) == [3, 2, 1]\n assert candidate(root = tree_node([3, 1, 2])) == [1, 2, 3]\n assert candidate(root = tree_node([1])) == [1]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4, None, None, 5])) == [2, 1]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, None, 4])) == [2, 1]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [5, 6, 20, 15, 10]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9])) == [1, 3, 6, 9, 7, 5, 18, 15, 10]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [3, 7, 5, 18, 15, 10]\n assert candidate(root = tree_node([1, None, 2, 3, 4])) == [3, 4, 2, 1]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, None, 5, None, None, None, 6])) == [5, 4, 3, 2, 1]\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13])) == [1, 4, 7, 6, 3, 13, 14, 10, 8]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == [0, 3, 5, 4, 2, 7, 9, 8, 6]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == [1, 3, 2, 5, 7, 6, 4, 9, 11, 10, 13, 15, 14, 12, 8]\n assert candidate(root = tree_node([9, 7, 20, 5, 8, None, None, 2, None, None, 11])) == [2, 5, 11, 8, 7, 20, 9]\n assert candidate(root = tree_node([1, 2, None, 3, None, None, 4, None, 5])) == [5, 4, 3, 2, 1]\n assert candidate(root = tree_node([5, 4, 6, 3, None, None, 7, 2, None, 1])) == [2, 3, 4, 1, 7, 6, 5]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9])) == [2, 4, 6, 8, 9, 7, 5, 3, 1]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, None, None, None, None, 5])) == [2, 4, 3, 1]\n assert candidate(root = tree_node([3, 1, 2, None, None, 4, 5])) == [1, 4, 5, 2, 3]\n assert candidate(root = tree_node([2, 1, 3, None, None, 4, None, None, None, 5])) == [1, 4, 3, 2]\n assert candidate(root = tree_node([8, 5, 1, 7, 10, 12])) == [7, 10, 5, 12, 1, 8]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, None, None, None, 6, None, 7, None, None, 8, None, None, 9, None, None, 10])) == [3, 5, 4, 2, 1]\n assert candidate(root = tree_node([5, 1, 6, None, 2, None, None, 3, 4])) == [3, 4, 2, 1, 6, 5]\n assert candidate(root = tree_node([9, 4, 13, 2, 6, 11, 16, 1, 3, 5, 7, 8, 10, 12, 14, 15])) == [15, 1, 3, 2, 5, 7, 6, 4, 8, 10, 11, 12, 14, 16, 13, 9]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7, None, None, 8, None, None, 9, None, None, 10])) == [2, 1]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20])) == [3, 9, 20, 15, 7]\n assert candidate(root = tree_node([22, 11, 33, 5, 17, 27, 41, 2, 6, 14, 19, 25, 31, 37, 45, 1, 3, 4, 7, 10, 13, 16, 18, 21, 24, 26, 29, 32, 36, 38, 40, 43, 44, 46, 47])) == [43, 44, 1, 46, 47, 3, 2, 4, 7, 6, 5, 10, 13, 14, 16, 18, 19, 17, 11, 21, 24, 25, 26, 29, 31, 27, 32, 36, 37, 38, 40, 45, 41, 33, 22]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20, None, None, None, 30])) == [5, 6, 30, 20, 15, 10]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, None, 4, None, None, None, None, 5])) == [3, 2, 1]\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, 9, 10])) == [1, 2, 4, 3, 6, 9, 10, 8, 7, 5]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, None, 6, 7, None, None, None, None, 8, None, None, None, None, 9])) == [6, 7, 5, 3, 4, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, None, None, 10, 11, None, None, None, None, None, None, 12, 13, None, None, 14, 15, None, None, None, None, 16])) == [8, 4, 9, 5, 2, 6, 10, 12, 14, 15, 13, 11, 7, 3, 1]\n assert candidate(root = tree_node([7, 3, 15, None, None, None, 20])) == [3, 20, 15, 7]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [10, 8, 6, 4, 2, 9, 7, 5, 3, 1]\n assert candidate(root = tree_node([5, 4, 6, 3, 8, 7, 9])) == [3, 8, 4, 7, 9, 6, 5]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, None, None, 6, 7])) == [2, 4, 5, 3, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6])) == [4, 2, 5, 6, 3, 1]\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, None, 18, None, None, None, None, 22])) == [5, 10, 18, 20, 15, 30, 22, 40, 35, 25]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9])) == [8, 6, 4, 2, 9, 7, 5, 3, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [16, 17, 8, 18, 19, 9, 4, 20, 10, 11, 5, 2, 12, 13, 6, 14, 15, 7, 3, 1]\n assert candidate(root = tree_node([5, 3, 8, 1, None, None, 10, None, 2, None, None, 11])) == [11, 2, 1, 3, 10, 8, 5]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [8, 9, 4, 10, 11, 5, 2, 12, 13, 6, 14, 15, 7, 3, 1]\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 6, 9, 1, 7, None, None, None, None, None, 10])) == [1, 7, 2, 4, 3, 6, 10, 9, 8, 5]\n assert candidate(root = tree_node([14, 9, 21, 7, 11, 17, 25, 5, 8, 10, 12, 15, 18, 23, 27, 3, 6, None, None, None, None, None, None, None, 13, None, None, None, 16, None, 19, None, 22, None, 26, None, 24, None, None, None, None, 20, None, None, None, None, None, 28])) == [28, 20, 22, 3, 26, 6, 5, 8, 7, 10, 12, 11, 9, 24, 13, 15, 18, 17, 16, 23, 19, 27, 25, 21, 14]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == [5, 4, 3, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, None, None, 10])) == [10, 7, 4, 8, 9, 5, 2, 6, 3, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [4, 5, 2, 6, 7, 3, 1]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [5, 4, 3, 2, 1]\n assert candidate(root = tree_node([17, 8, 26, 4, 13, 22, 31, 2, 6, 11, 15, 19, 24, 28, 34, 1, 3, 5, 7, 9, 10, 12, 14, 16, 18, 20, 23, 25, 27, 29, 32, 33, 35])) == [33, 35, 1, 3, 2, 5, 7, 6, 4, 9, 10, 11, 12, 14, 15, 13, 8, 16, 18, 19, 20, 23, 24, 22, 25, 27, 28, 29, 32, 34, 31, 26, 17]\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, 4])) == [2, 1]\n assert candidate(root = tree_node([15, 7, 23, 3, 11, 19, 27, 1, 5, 9, 13, 17, 21, 25, 29, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 31])) == [2, 4, 1, 6, 8, 5, 3, 10, 12, 9, 14, 16, 13, 11, 7, 18, 20, 17, 22, 24, 21, 19, 26, 28, 25, 30, 31, 29, 27, 23, 15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4])) == [4, 3, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 16, None, 17, None, 18, None, 19])) == [16, 8, 17, 9, 4, 18, 10, 19, 11, 5, 2, 12, 13, 6, 14, 15, 7, 3, 1]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, 2, None, None, None, None, None, 10])) == [2, 1, 4, 3, 7, 10, 9, 8, 5]\n assert candidate(root = tree_node([7, 3, 15, None, None, None, 9])) == [3, 9, 15, 7]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5])) == [5, 3, 4, 2, 1]\n assert candidate(root = tree_node([25, 15, 30, 10, 20, 28, 35, 5, 12, 17, 22, 27, 33, 32, 36])) == [5, 12, 10, 17, 22, 20, 15, 27, 33, 28, 32, 36, 35, 30, 25]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 10, None, 2, 6, 9, 11])) == [2, 1, 6, 9, 4, 3, 11, 7, 10, 8, 5]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [7, 6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [1, 3, 6, 4, 5]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, None, 5])) == [5, 4, 3, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 6, 7, None, 8, None, 9])) == [9, 7, 5, 2, 8, 6, 3, 1]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, None, None, None, None, 9])) == [1, 3, 9, 6, 8, 7, 5, 18, 15, 10]\n assert candidate(root = tree_node([11, 7, 19, 3, 9, 13, 21, 1, 5, None, 8, None, 12, 17, None, None, None, None, None, 14, 16, 18, 20, 22, 23])) == [1, 5, 3, 14, 16, 8, 9, 7, 18, 20, 12, 13, 22, 23, 17, 21, 19, 11]\n assert candidate(root = tree_node([1, None, None, None, 2])) == [1]\n assert candidate(root = tree_node([1, None, None])) == [1]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, 4])) == [2, 1]\n assert candidate(root = tree_node([16, 8, 24, 4, 12, 20, 28, 2, 6, 10, 14, 18, 22, 26, 30, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31])) == [1, 3, 2, 5, 7, 6, 4, 9, 11, 10, 13, 15, 14, 12, 8, 17, 19, 18, 21, 23, 22, 20, 25, 27, 26, 29, 31, 30, 28, 24, 16]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 10, 0, 2, 6, 9, None, None, None, None, None, 11])) == [11, 0, 2, 1, 6, 9, 4, 3, 7, 10, 8, 5]\n assert candidate(root = tree_node([2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [7, 6, 5, 4, 3, 2]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == [6, 5, 4, 3, 2, 1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, None, 10, None, None, 11, None, None, 12, None, None, 13, None, None, 14])) == [8, 14, 12, 9, 4, 5, 2, 13, 10, 6, 11, 7, 3, 1]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, 4])) == [2, 1]\n assert candidate(root = tree_node([30, 25, 35, 20, 27, 32, 40, 18, None, None, 23, None, None, None, None, None, 45])) == [45, 18, 20, 23, 27, 25, 32, 40, 35, 30]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, 6])) == [5, 3, 6, 4, 2, 1]\n assert candidate(root = tree_node([30, 15, 45, 7, 22, 37, 52, 3, 11, 18, 26, 32, 41, 50, 57, 1, 2, 5, 6, 8, 9, 10, 12, 13, 16, 17, 19, 20, 23, 24, 25, 27, 28, 30, 31, 33, 35, 36, 39, 40, 42, 43, 44, 46, 47, 48, 49, 51, 53, 54, 55, 56, 58, 59])) == [27, 28, 1, 30, 31, 2, 3, 33, 35, 5, 36, 39, 6, 11, 7, 40, 42, 8, 43, 44, 9, 18, 46, 47, 10, 48, 49, 12, 26, 22, 15, 51, 53, 13, 54, 55, 16, 32, 56, 58, 17, 59, 19, 41, 37, 20, 23, 50, 24, 25, 57, 52, 45, 30]\n assert candidate(root = tree_node([7, 3, 15, 1, 5, 9, 20, None, None, 2, 6, None, None, 8, 12, None, 18])) == [1, 18, 2, 6, 5, 3, 9, 8, 12, 20, 15, 7]\n assert candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, None, 17, 21, 24, 28, 35])) == [5, 12, 10, 17, 18, 15, 21, 24, 22, 28, 35, 30, 25, 20]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7])) == [1, 3, 2, 5, 7, 6, 4]\n assert candidate(root = tree_node([3, 1, 2, 4, None, 5, 6, 7, None, 8, 9])) == [7, 4, 1, 8, 9, 5, 6, 2, 3]\n assert candidate(root = tree_node([3, 1, 2, 4])) == [4, 1, 2, 3]\n assert candidate(root = tree_node([8, 5, 12, 4, 6, 11, 13, 2, None, None, None, None, None, None, 14])) == [2, 4, 6, 5, 11, 14, 13, 12, 8]\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 28, 33, 38, 45, 3, 7, 9, 11, 14, 16, 18, 21, 23, 27, 29, 32, 36, 37, 39, 41, 44, 46])) == [44, 46, 3, 7, 5, 9, 11, 12, 10, 14, 16, 17, 18, 21, 22, 20, 15, 23, 27, 28, 29, 32, 33, 30, 36, 37, 38, 39, 41, 45, 40, 35, 25]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, None, 7, 8])) == [4, 7, 8, 5, 2, 6, 3, 1]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().postorderTraversal", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector postorderTraversal(TreeNode* root) {", "container": "Solution", "callable": "postorderTraversal", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 147, "task_id": "insertion-sort-list", "difficulty": "Medium", "problem_description": "Given the head of a singly linked list, sort the list using insertion sort, and return the sorted list's head.\nThe steps of the insertion sort algorithm:\n\nInsertion sort iterates, consuming one input element each repetition and growing a sorted output list.\nAt each iteration, insertion sort removes one element from the input data, finds the location it belongs within the sorted list and inserts it there.\nIt repeats until no input elements remain.\n\nThe following is a graphical example of the insertion sort algorithm. The partially sorted list (black) initially contains only the first element in the list. One element (red) is removed from the input data and inserted in-place into the sorted list with each iteration.\n\n \nExample 1:\n\n\nInput: head = [4,2,1,3]\nOutput: [1,2,3,4]\n\nExample 2:\n\n\nInput: head = [-1,5,3,4,0]\nOutput: [-1,0,3,4,5]\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [1, 5000].\n-5000 <= Node.val <= 5000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0])), list_node([0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([10, -1, 0, 5, 3, 2, -5])), list_node([-5, -1, 0, 2, 3, 5, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5, 2, 4, 6, 1, 3])), list_node([1, 2, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 1, 3, 1, 2])), list_node([1, 1, 1, 2, 2, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1000, 500, 250, 125, 62, 31, 15, 7, 3, 1])), list_node([1, 3, 7, 15, 31, 62, 125, 250, 500, 1000]))\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1000, 999, 998, 997, 996, 995, 994, 993, 992, 991])), list_node([991, 992, 993, 994, 995, 996, 997, 998, 999, 1000]))\n assert is_same_list(candidate(head = list_node([-1, 5, 3, 4, 0])), list_node([-1, 0, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([0, -1, -2, -3, -4])), list_node([-4, -3, -2, -1, 0]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -5000, 5000, 0])), list_node([-5000, -5000, 0, 5000, 5000]))\n assert is_same_list(candidate(head = list_node([4, 2, 1, 3])), list_node([1, 2, 3, 4]))\n assert is_same_list(candidate(head = list_node([100, 50, 25, 12, 6, 3, 1])), list_node([1, 3, 6, 12, 25, 50, 100]))\n assert is_same_list(candidate(head = list_node([4, 4, 4, 4, 4])), list_node([4, 4, 4, 4, 4]))\n assert is_same_list(candidate(head = list_node([5, 1, 4, 2, 3])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -4999, 4999])), list_node([-5000, -4999, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 2500, 0, -2500, 1250, -1250, 625, -625, 312, -312])), list_node([-5000, -2500, -1250, -625, -312, 0, 312, 625, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 0, 2500, -2500, 4000, -4000, 1000, -1000])), list_node([-5000, -4000, -2500, -1000, 0, 1000, 2500, 4000, 5000]))\n assert is_same_list(candidate(head = list_node([7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140])), list_node([7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140]))\n assert is_same_list(candidate(head = list_node([34, 22, 10, 19, 17, 26, 31, 44, 54, 20])), list_node([10, 17, 19, 20, 22, 26, 31, 34, 44, 54]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([23, 5, 67, 2, 34, 89, 12, 56, 3, 78])), list_node([2, 3, 5, 12, 23, 34, 56, 67, 78, 89]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 4999, -4999, 4998, -4998, 4997, -4997, 4996, -4996, 4995, -4995, 4994, -4994])), list_node([-5000, -4999, -4998, -4997, -4996, -4995, -4994, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([0, -1, -2, -3, -4, -5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5])), list_node([-5, -5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 2500, -2500, 1250, -1250])), list_node([-5000, -2500, -1250, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5])), list_node([1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]))\n assert is_same_list(candidate(head = list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5])), list_node([1, 1, 2, 3, 3, 4, 5, 5, 5, 6, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5])), list_node([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5])), list_node([-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 5, 4, 6, 7, 8, 10, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 150, 250, 350, 450, 550])), list_node([100, 150, 200, 250, 300, 350, 400, 450, 500, 550]))\n assert is_same_list(candidate(head = list_node([2, 3, 5, 4, 1, 7, 6, 9, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985, -4984, -4983, -4982, -4981])), list_node([-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985, -4984, -4983, -4982, -4981]))\n assert is_same_list(candidate(head = list_node([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, 9, 3, 3, 7, 2, 0, 7, 8, 1, 6, 4, 2, 1, 6, 1, 9, 9, 9, 4, 5, 3, 0, 7, 7, 2, 7])), list_node([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 1, 4, 5, 4, 3, 2, 1, 6, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7]))\n assert is_same_list(candidate(head = list_node([9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990])), list_node([9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 2, 3, 2, 1, 3, 2, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 10, 20, 30, 40, 50, 60, 70, 80, 90, 1])), list_node([1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([100, 50, 25, 12, 6, 3, 1, 0, -1, -2, -5, -10, -25, -50, -100])), list_node([-100, -50, -25, -10, -5, -2, -1, 0, 1, 3, 6, 12, 25, 50, 100]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 3, 8, 6, 2, 7, 4, 1, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([100, 200, 150, 175, 160, 180, 190, 140, 130, 120])), list_node([100, 120, 130, 140, 150, 160, 175, 180, 190, 200]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10, -10, 20, -20, 30, -30, 40, -40, 50, -50])), list_node([-50, -40, -30, -20, -10, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([0, 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])), list_node([-5000, -2500, -1250, -625, -312, -156, -78, -39, -19, -9, -4, -2, -1, 0, 1, 2, 4, 9, 19, 39, 78, 156, 312, 625, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000])), list_node([1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]))\n assert is_same_list(candidate(head = list_node([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])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5])), list_node([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 2, 4, 6, 7, 8, 10, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([3, -1, 4, 1, 5, 9, -2, 6, 5, 3, 5])), list_node([-2, -1, 1, 3, 3, 4, 5, 5, 5, 6, 9]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 2500, -2500, 1250, -1250, 625, -625, 312, -312, 156, -156, 78, -78, 39, -39])), list_node([-5000, -2500, -1250, -625, -312, -156, -78, -39, 39, 78, 156, 312, 625, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([5, 3, 4, 2, 6, 1, 7, 9, 8, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([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])), list_node([-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 is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 50, 150, 250, 350, 450])), list_node([50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]))\n assert is_same_list(candidate(head = list_node([4, 1, 7, 3, 2, 6, 5, 8, 0, 9])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([-10, -20, 5, 3, -15, 7, 0])), list_node([-20, -15, -10, 0, 3, 5, 7]))\n assert is_same_list(candidate(head = list_node([5, 3, 8, 6, 2, 7, 4, 1, 10, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([23, 45, 12, 33, 5, 67, 4, 89, 21])), list_node([4, 5, 12, 21, 23, 33, 45, 67, 89]))\n assert is_same_list(candidate(head = list_node([10, 3, 1, 9, 2, 5, 8, 7, 6, 4])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25])), list_node([-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 is_same_list(candidate(head = list_node([5000, -5000, 0, 2500, -2500, 1250, -1250, 625, -625, 312, -312])), list_node([-5000, -2500, -1250, -625, -312, 0, 312, 625, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])), list_node([-15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5])), list_node([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([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])), list_node([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 is_same_list(candidate(head = list_node([-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985])), list_node([-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991, 4990, 4989, 4988, 4987, 4986, 4985, 4984, 4983, 4982, 4981])), list_node([4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 1, 3, 1, 2, 1, 3])), list_node([1, 1, 1, 1, 2, 2, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([2000, 1000, 500, 250, 125, 62, 31, 15, 7, 3, 1, -1, -3, -7, -15, -31, -62, -125, -250, -500, -1000, -2000])), list_node([-2000, -1000, -500, -250, -125, -62, -31, -15, -7, -3, -1, 1, 3, 7, 15, 31, 62, 125, 250, 500, 1000, 2000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1])), list_node([1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([3, 1, 2, 5, 4, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21])), list_node([1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]))\n assert is_same_list(candidate(head = list_node([100, 101, 99, 98, 102, 103, 97, 96, 104, 105])), list_node([96, 97, 98, 99, 100, 101, 102, 103, 104, 105]))\n assert is_same_list(candidate(head = list_node([5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991, 4990, 4989, 4988, 4987, 4986, 4985])), list_node([4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5, 3, 1, 4, 2, 6, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 2500, -2500, 1250, -1250, 625, -625, 312, -312])), list_node([-5000, -2500, -1250, -625, -312, 312, 625, 1250, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5])), list_node([-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([-100, -200, -150, -175, -160, -180, -190, -140, -130, -120])), list_node([-200, -190, -180, -175, -160, -150, -140, -130, -120, -100]))\n assert is_same_list(candidate(head = list_node([5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991, 4990, 4989, 4988, 4987, 4986, 4985, 4984, 4983, 4982, 4981, 4980])), list_node([4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), list_node([1, 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"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().insertionSortList", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* insertionSortList(ListNode* head) {", "container": "Solution", "callable": "insertionSortList", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 148, "task_id": "sort-list", "difficulty": "Medium", "problem_description": "Given the head of a linked list, return the list after sorting it in ascending order.\n \nExample 1:\n\n\nInput: head = [4,2,1,3]\nOutput: [1,2,3,4]\n\nExample 2:\n\n\nInput: head = [-1,5,3,4,0]\nOutput: [-1,0,3,4,5]\n\nExample 3:\n\nInput: head = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 5 * 104].\n-105 <= Node.val <= 105\n\n \nFollow up: Can you sort the linked list in O(n logn) time and O(1) memory (i.e. constant space)?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5])), list_node([-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0])), list_node([0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-1, 5, 3, 4, 0])), list_node([-1, 0, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0]))\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([100000, -100000, 0, 50000, -50000])), list_node([-100000, -50000, 0, 50000, 100000]))\n assert is_same_list(candidate(head = list_node([10, -10, 20, -20, 30, -30])), list_node([-30, -20, -10, 10, 20, 30]))\n assert is_same_list(candidate(head = list_node([-100000, 100000, -100000, 100000])), list_node([-100000, -100000, 100000, 100000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([100000, -100000, 0])), list_node([-100000, 0, 100000]))\n assert is_same_list(candidate(head = list_node([4, 2, 1, 3])), list_node([1, 2, 3, 4]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5])), list_node([5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([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])), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([25000, 25001, 25002, 25003, 25004, 25005, 25006, 25007, 25008, 25009, 25010, 25011, 25012, 25013, 25014])), list_node([25000, 25001, 25002, 25003, 25004, 25005, 25006, 25007, 25008, 25009, 25010, 25011, 25012, 25013, 25014]))\n assert is_same_list(candidate(head = list_node([1000, 500, 250, 125, 62, 31, 15, 7, 3, 1])), list_node([1, 3, 7, 15, 31, 62, 125, 250, 500, 1000]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 3, 7, 2, 8, 6, 4, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5, 3, 1, 4, 2, 7, 6, 9, 8, 10, 0, -1, -2, -3, -4, -5])), list_node([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 950, 850, 750, 650, 550, 450, 350, 250, 150, 50])), list_node([50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000]))\n assert is_same_list(candidate(head = list_node([50000, -50000, 100000, -100000, 150000, -150000, 200000, -200000, 250000, -250000, 300000, -300000])), list_node([-300000, -250000, -200000, -150000, -100000, -50000, 50000, 100000, 150000, 200000, 250000, 300000]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([100000, 90000, 80000, 70000, 60000, 50000, 40000, 30000, 20000, 10000, 0, -10000, -20000, -30000, -40000, -50000, -60000, -70000, -80000, -90000])), list_node([-90000, -80000, -70000, -60000, -50000, -40000, -30000, -20000, -10000, 0, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 2, 8, 3, 7, 4, 6, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5, 1, 4, 2, 8, 3, 7, 6, 9, 10, 11, 12, 13, 14, 15])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1000000, 100000, 10000, 1000, 100, 10, 1, 0, -1, -10, -100, -1000, -10000, -100000, -1000000])), list_node([-1000000, -100000, -10000, -1000, -100, -10, -1, 0, 1, 10, 100, 1000, 10000, 100000, 1000000]))\n assert is_same_list(candidate(head = list_node([5, 1, 4, 2, 8, 5, 1, 4, 2, 8])), list_node([1, 1, 2, 2, 4, 4, 5, 5, 8, 8]))\n assert is_same_list(candidate(head = list_node([-99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990])), list_node([-99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 10, 100, 1000, 10000, 100000, -1, -10, -100, -1000, -10000, -100000])), list_node([-100000, -10000, -1000, -100, -10, -1, 1, 10, 100, 1000, 10000, 100000]))\n assert is_same_list(candidate(head = list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990])), list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990]))\n assert is_same_list(candidate(head = list_node([100000, 50000, 25000, 12500, 6250, 3125, 1562, 781, 390, 195, 97, 48, 24, 12, 6, 3, 1, -1, -3, -6, -12, -24, -48, -97, -195, -390, -781, -1562, -3125, -6250, -12500, -25000, -50000, -100000])), list_node([-100000, -50000, -25000, -12500, -6250, -3125, -1562, -781, -390, -195, -97, -48, -24, -12, -6, -3, -1, 1, 3, 6, 12, 24, 48, 97, 195, 390, 781, 1562, 3125, 6250, 12500, 25000, 50000, 100000]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([-100000, 100000, -99999, 99999, -99998, 99998, -99997, 99997, -99996, 99996, -99995, 99995])), list_node([-100000, -99999, -99998, -99997, -99996, -99995, 99995, 99996, 99997, 99998, 99999, 100000]))\n assert is_same_list(candidate(head = list_node([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])), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000])), list_node([100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 1, 2, 3, 4, 5])), list_node([1, 2, 3, 4, 5, 10, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 0, -1, 2, -2, 3, -3, 4, -4, 5])), list_node([-4, -3, -2, -1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 0, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000])), list_node([-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([1, 9, 2, 8, 3, 7, 4, 6, 5, 0])), list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990])), list_node([99990, 99991, 99992, 99993, 99994, 99995, 99996, 99997, 99998, 99999, 100000]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([5, 1, 9, 3, 7, 2, 8, 6, 4, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([50000, 50001, 50002, 50003, 50004, 49999, 49998, 49997, 49996, 49995])), list_node([49995, 49996, 49997, 49998, 49999, 50000, 50001, 50002, 50003, 50004]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9])), list_node([-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-1, 0, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([-50000, -40000, -30000, -20000, -10000, 0, 10000, 20000, 30000, 40000, 50000])), list_node([-50000, -40000, -30000, -20000, -10000, 0, 10000, 20000, 30000, 40000, 50000]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([23, 8, 45, 78, 1, 3, 89, 4, 2, 67, 43, 90, 12, 34, 56, 78, 9, 10, 21, 11, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 34, 43, 45, 56, 67, 78, 78, 89, 90]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9])), list_node([-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991])), list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991]))\n assert is_same_list(candidate(head = list_node([5, 2, 9, 1, 5, 6, 3, 8, 4, 7, 1, 5, 6, 3, 8, 4, 7])), list_node([1, 1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -15])), list_node([-15, -14, -12, -10, -8, -6, -4, -2, 1, 3, 5, 7, 9, 11, 13, 15]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 5, 4, 7, 6, 9, 8, 10, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 1, 20, 2, 30, 3, 40, 4, 50, 5, 60, 6, 70, 7, 80, 8, 90, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8])), list_node([-8, -7, -6, -5, -4, -3, -2, -1, 1, 2, 3, 4, 5, 6, 7, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 20, 12, 19, 13, 18, 14, 17, 15, 16])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991])), list_node([99991, 99992, 99993, 99994, 99995, 99996, 99997, 99998, 99999, 100000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10000, 1000, 100, 10, 1, 0, -1, -10, -100, -1000, -10000])), list_node([-10000, -1000, -100, -10, -1, 0, 1, 10, 100, 1000, 10000]))\n assert is_same_list(candidate(head = list_node([10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981])), list_node([9981, 9982, 9983, 9984, 9985, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991])), list_node([99991, 99992, 99993, 99994, 99995, 99996, 99997, 99998, 99999, 100000]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5])), list_node([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991])), list_node([-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991]))\n assert is_same_list(candidate(head = list_node([2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 25])), list_node([1, 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 is_same_list(candidate(head = list_node([5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5])), list_node([-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5, -5, 10, -10, 15, -15, 20, -20, 25, -25, 30, -30])), list_node([-30, -25, -20, -15, -10, -5, 5, 10, 15, 20, 25, 30]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5]))\n assert is_same_list(candidate(head = list_node([1, 5, 9, 13, 17, 2, 6, 10, 14, 18, 3, 7, 11, 15, 19, 4, 8, 12, 16, 20])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([9, 3, 7, 1, 5, 13, 11, 2, 6, 12, 8, 4, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), list_node([1, 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"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().sortList", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* sortList(ListNode* head) {", "container": "Solution", "callable": "sortList", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "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] = [xi, yi] 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\n\nInput: points = [[1,1],[2,2],[3,3]]\nOutput: 3\n\nExample 2:\n\n\nInput: points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]\nOutput: 4\n\n \nConstraints:\n\n1 <= points.length <= 300\npoints[i].length == 2\n-104 <= xi, yi <= 104\nAll the points are unique.\n\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], [1, 1], [1, 1]]) == 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, 65536], [65536, 0], [65536, 65536], [0, 65536]]) == 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, 65536], [65536, 1], [233, 233], [65536, 233], [233, 65536], [0, 1], [1, 0], [1, 2], [2, 1], [65535, 65535]]) == 3\n assert candidate(points = [[1, 1], [1, 1], [1, 1], [2, 2], [2, 2], [2, 2], [3, 3], [3, 3], [3, 3], [4, 4], [4, 4], [4, 4]]) == 12\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 = [[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], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], [6, 10], [7, 9], [8, 8], [9, 7], [10, 6], [11, 5], [12, 4], [13, 3], [14, 2], [15, 1]]) == 16\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, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]) == 10\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], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [1, 9], [2, 8], [3, 7], [4, 6], [5, 5], [6, 4], [7, 3], [8, 2], [9, 1]]) == 10\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], [1, 1], [1, 1], [1, 1], [2, 2], [2, 2], [2, 2], [2, 2], [3, 3], [3, 3]]) == 10\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], [1, 1], [1, 2], [1, 3], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 14\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 = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]) == 6\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 = [[1, 1], [1, 1], [2, 2], [2, 2], [3, 3], [3, 3], [4, 4], [4, 4], [5, 5], [5, 5], [6, 6], [6, 6]]) == 12\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"}, "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().maxPoints", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxPoints(vector>& points) {", "container": "Solution", "callable": "maxPoints", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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.\nEvaluate the expression. Return an integer that represents the value of the expression.\nNote that:\n\nThe valid operators are '+', '-', '*', and '/'.\nEach operand may be an integer or another expression.\nThe division between two integers always truncates toward zero.\nThere will not be any division by zero.\nThe input represents a valid arithmetic expression in a reverse polish notation.\nThe answer and all the intermediate calculations can be represented in a 32-bit integer.\n\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\n \nConstraints:\n\n1 <= tokens.length <= 104\ntokens[i] is either an operator: \"+\", \"-\", \"*\", or \"/\", or an integer in the range [-200, 200].\n\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"}, "metadata": {"canonical_parameter_names": ["tokens"], "leetcode_dataset_entry_point": "Solution().evalRPN", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int evalRPN(vector& tokens) {", "container": "Solution", "callable": "evalRPN", "parameters": [{"name": "tokens", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 151, "task_id": "reverse-words-in-a-string", "difficulty": "Medium", "problem_description": "Given an input string s, reverse the order of the words.\nA word is defined as a sequence of non-space characters. The words in s will be separated by at least one space.\nReturn a string of the words in reverse order concatenated by a single space.\nNote that s may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words. Do not include any extra spaces.\n \nExample 1:\n\nInput: s = \"the sky is blue\"\nOutput: \"blue is sky the\"\n\nExample 2:\n\nInput: s = \" hello world \"\nOutput: \"world hello\"\nExplanation: Your reversed string should not contain leading or trailing spaces.\n\nExample 3:\n\nInput: s = \"a good example\"\nOutput: \"example good a\"\nExplanation: You need to reduce multiple spaces between two words to a single space in the reversed string.\n\n \nConstraints:\n\n1 <= s.length <= 104\ns contains English letters (upper-case and lower-case), digits, and spaces ' '.\nThere is at least one word in s.\n\n \nFollow-up: If the string data type is mutable in your language, can you solve it in-place with O(1) extra space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"the sky is blue\") == \"blue is sky the\"\n assert candidate(s = \"  hello world  \") == \"world hello\"\n assert candidate(s = \"a good   example\") == \"example good a\"\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().reverseWords", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string reverseWords(string s) {", "container": "Solution", "callable": "reverseWords", "parameters": [{"name": "s", "type": "string"}], "return_type": "string", "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.\nThe test cases are generated so that the answer will fit in a 32-bit integer.\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\n \nConstraints:\n\n1 <= nums.length <= 2 * 104\n-10 <= nums[i] <= 10\nThe product of any subarray of nums is guaranteed to fit in a 32-bit integer.\n\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 = [10, -20, 0, 5, 1]) == 10\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 = [-10, 0, 10, 20, 30, -40, 50, 60, -70, 80]) == 4032000000000\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 = [10, -10, 20, -20, 30, -30, 40, -40, 50]) == 2880000000000\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 = [-2, -3, 0, -2, -40, 0, -10]) == 80\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 = [100, -100, 50, -50, 25, -25, 10, -10, 5, -5]) == 7812500000000\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, -10, 10, -1, -100]) == 900000\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 = [100, -100, 100, -100, 100, -100, 100, -100, 100, -100]) == 1000000000000000000\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 = [-2, 3, -4, 5, -6, 7, -8, 9, -10, 11]) == 19958400\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 = [1, 2, 3, -4, -5, -6, 7, 8, 9, 10, -11]) == 39916800\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 = [-10, -20, 0, -5, -7, 0, 2, -1]) == 200\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3, -4, 5, 6]) == 720\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3, 0, 4, 5, 6, 0, -7, -8, -9, 0, 10, 11, 12]) == 1320\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxProduct", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProduct(vector& nums) {", "container": "Solution", "callable": "maxProduct", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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]].\nGiven the sorted rotated array nums of unique elements, return the minimum element of this array.\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\n \nConstraints:\n\nn == nums.length\n1 <= n <= 5000\n-5000 <= nums[i] <= 5000\nAll the integers of nums are unique.\nnums is sorted and rotated between 1 and n times.\n\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 = [3, 8, 9, 1, 2, 3, 4, 5, 6, 7]) == 3\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMin", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMin(vector& nums) {", "container": "Solution", "callable": "findMin", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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]].\nGiven the sorted rotated array nums that may contain duplicates, return the minimum element of this array.\nYou must decrease the overall operation steps as much as possible.\n \nExample 1:\nInput: nums = [1,3,5]\nOutput: 1\nExample 2:\nInput: nums = [2,2,2,0,1]\nOutput: 0\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 5000\n-5000 <= nums[i] <= 5000\nnums is sorted and rotated between 1 and n times.\n\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 \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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMin", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMin(vector& nums) {", "container": "Solution", "callable": "findMin", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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.\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.\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.\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\n1 <= nums.length <= 1000\n-231 <= nums[i] <= 231 - 1\nnums[i] != nums[i + 1] for all valid i.\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findPeakElement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findPeakElement(vector& nums) {", "container": "Solution", "callable": "findPeakElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 105\n0 <= nums[i] <= 109\n\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 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == 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]) == 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 = [2147483647, 100, 200, 300, 400, 500, 600, 700, 800, 900]) == 2147482747\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 = [50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]) == 10\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 = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maximumGap", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maximumGap(vector& nums) {", "container": "Solution", "callable": "maximumGap", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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.\nReturn the following:\n\nIf version1 < version2, return -1.\nIf version1 > version2, return 1.\nOtherwise, return 0.\n\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\n \nConstraints:\n\n1 <= version1.length, version2.length <= 500\nversion1 and version2 only contain digits and '.'.\nversion1 and version2 are valid version numbers.\nAll the given revisions in version1 and version2 can be stored in a 32-bit integer.\n\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"}, "metadata": {"canonical_parameter_names": ["version1", "version2"], "leetcode_dataset_entry_point": "Solution().compareVersion", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int compareVersion(string version1, string version2) {", "container": "Solution", "callable": "compareVersion", "parameters": [{"name": "version1", "type": "string"}, {"name": "version2", "type": "string"}], "return_type": "int", "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.\nIf the fractional part is repeating, enclose the repeating part in parentheses.\nIf multiple answers are possible, return any of them.\nIt is guaranteed that the length of the answer string is less than 104 for all the given inputs.\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\n \nConstraints:\n\n-231 <= numerator, denominator <= 231 - 1\ndenominator != 0\n\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"}, "metadata": {"canonical_parameter_names": ["numerator", "denominator"], "leetcode_dataset_entry_point": "Solution().fractionToDecimal", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string fractionToDecimal(int numerator, int denominator) {", "container": "Solution", "callable": "fractionToDecimal", "parameters": [{"name": "numerator", "type": "int"}, {"name": "denominator", "type": "int"}], "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": "Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 <= index1 < index2 <= numbers.length.\nReturn the indices of the two numbers, index1 and index2, added by one as an integer array [index1, index2] of length 2.\nThe tests are generated such that there is exactly one solution. You may not use the same element twice.\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, index1 = 1, index2 = 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 index1 = 1, index2 = 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 index1 = 1, index2 = 2. We return [1, 2].\n\n \nConstraints:\n\n2 <= numbers.length <= 3 * 104\n-1000 <= numbers[i] <= 1000\nnumbers is sorted in non-decreasing order.\n-1000 <= target <= 1000\nThe tests are generated such that there is exactly one solution.\n\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 = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],target = 768) == [9, 10]\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, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987],target = 1597) == [14, 15]\n assert candidate(numbers = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100],target = -1800) == [1, 3]\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1500) == [5, 10]\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 = [-499, -333, -222, -111, 0, 111, 222, 333, 499, 666, 888, 1111, 1333, 1666, 1999],target = 1000) == [2, 13]\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 = [-1000, -999, -998, -997, -996, -995, -994, -993, -992, -991],target = -1981) == None\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 = [-1000, -500, -250, -125, -62, -31, -15, -7, -3, -1, 0, 1, 3, 7, 15, 31, 62, 125, 250, 500, 1000],target = -1562) == None\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 = [-1000, -999, -998, -997, -996],target = -1998) == [1, 3]\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 = [995, 996, 997, 998, 999, 1000],target = 1995) == [1, 6]\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 = [500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511],target = 1011) == [1, 12]\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 = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987],target = 1094) == None\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"}, "metadata": {"canonical_parameter_names": ["numbers", "target"], "leetcode_dataset_entry_point": "Solution().twoSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector twoSum(vector& numbers, int target) {", "container": "Solution", "callable": "twoSum", "parameters": [{"name": "numbers", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "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.\nFor example:\n\nA -> 1\nB -> 2\nC -> 3\n...\nZ -> 26\nAA -> 27\nAB -> 28 \n...\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\n \nConstraints:\n\n1 <= columnNumber <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["columnNumber"], "leetcode_dataset_entry_point": "Solution().convertToTitle", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string convertToTitle(int columnNumber) {", "container": "Solution", "callable": "convertToTitle", "parameters": [{"name": "columnNumber", "type": "int"}], "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.\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:\nInput: nums = [3,2,3]\nOutput: 3\nExample 2:\nInput: nums = [2,2,1,1,1,2,2]\nOutput: 2\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 5 * 104\n-109 <= nums[i] <= 109\n\n \nFollow-up: Could you solve the problem in linear time and in O(1) space?", "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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().majorityElement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int majorityElement(vector& nums) {", "container": "Solution", "callable": "majorityElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\nFor example:\n\nA -> 1\nB -> 2\nC -> 3\n...\nZ -> 26\nAA -> 27\nAB -> 28 \n...\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\n \nConstraints:\n\n1 <= columnTitle.length <= 7\ncolumnTitle consists only of uppercase English letters.\ncolumnTitle is in the range [\"A\", \"FXSHRXW\"].\n\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 = \"ALGORITHM\") == 307557815253\n assert candidate(columnTitle = \"QWERTY\") == 212594433\n assert candidate(columnTitle = \"ZXCVBN\") == 319950866\n assert candidate(columnTitle = \"QRSTU\") == 8098345\n assert candidate(columnTitle = \"ALPHABET\") == 11932576390\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 = \"QWJRTYUP\") == 143773244150\n assert candidate(columnTitle = \"WZYZ\") == 422500\n assert candidate(columnTitle = \"MNBVCXZ\") == 4183547654\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 = \"ZXCVBNM\") == 8318722529\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 = \"LETTERS\") == 3775891099\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 = \"UPPERCASE\") == 4518887657679\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 = \"PROGRAMMING\") == 2359598803856431\n assert candidate(columnTitle = \"ZYXWVUT\") == 8340231686\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 = \"STUVWXYZ\") == 159042692380\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 = \"LEETCODE\") == 97994910369\n assert candidate(columnTitle = \"ABCD\") == 19010\n assert candidate(columnTitle = \"ASDFGHJKL\") == 362741755778\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 = \"JKLMNOPQR\") == 2180488677476\n assert candidate(columnTitle = \"SPREADSHEET\") == 2772846287758970\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 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 256094574536617744129141650397448476\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 = \"ZZZZZZZ\") == 8353082582\n assert candidate(columnTitle = \"ABCDEF\") == 12850896\n assert candidate(columnTitle = \"YZ\") == 676\n assert candidate(columnTitle = \"KK\") == 297\n"}, "metadata": {"canonical_parameter_names": ["columnTitle"], "leetcode_dataset_entry_point": "Solution().titleToNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int titleToNumber(string columnTitle) {", "container": "Solution", "callable": "titleToNumber", "parameters": [{"name": "columnTitle", "type": "string"}], "return_type": "int", "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!.\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\n \nConstraints:\n\n0 <= n <= 104\n\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 = 15000) == 3748\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 = 99999) == 24994\n assert candidate(n = 49) == 10\n assert candidate(n = 125) == 31\n assert candidate(n = 62499) == 15618\n assert candidate(n = 4096) == 1021\n assert candidate(n = 2000) == 499\n assert candidate(n = 7500) == 1874\n assert candidate(n = 50000) == 12499\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 = 31249) == 7806\n assert candidate(n = 15625) == 3906\n assert candidate(n = 31250) == 7812\n assert candidate(n = 2050) == 511\n assert candidate(n = 1024) == 253\n assert candidate(n = 250) == 62\n assert candidate(n = 100000) == 24999\n assert candidate(n = 15624) == 3900\n assert candidate(n = 20000) == 4999\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 = 62500) == 15624\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().trailingZeroes", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int trailingZeroes(int n) {", "container": "Solution", "callable": "trailingZeroes", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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.\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).\nTo reach the princess as quickly as possible, the knight decides to move only rightward or downward in each step.\nReturn the knight's minimum initial health so that he can rescue the princess.\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\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\n \nConstraints:\n\nm == dungeon.length\nn == dungeon[i].length\n1 <= m, n <= 200\n-1000 <= dungeon[i][j] <= 1000\n\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"}, "metadata": {"canonical_parameter_names": ["dungeon"], "leetcode_dataset_entry_point": "Solution().calculateMinimumHP", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int calculateMinimumHP(vector>& dungeon) {", "container": "Solution", "callable": "calculateMinimumHP", "parameters": [{"name": "dungeon", "type": "vector>&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 100\n0 <= nums[i] <= 109\n\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 = [1111111111, 111111111, 11111111, 1111111, 111111, 11111, 1111, 111, 11, 1]) == \"1111111111111111111111111111111111111111111111111111111\"\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 = [6, 66, 666, 6666, 66666, 666666, 6666666, 66666666, 666666666, 6666666666]) == \"6666666666666666666666666666666666666666666666666666666\"\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().largestNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string largestNumber(vector& nums) {", "container": "Solution", "callable": "largestNumber", "parameters": [{"name": "nums", "type": "vector&"}], "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\nFor example, \"ACGAATTCCG\" is a DNA sequence.\n\nWhen studying DNA, it is useful to identify repeated sequences within the DNA.\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:\nInput: s = \"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"\nOutput: [\"AAAAACCCCC\",\"CCCCCAAAAA\"]\nExample 2:\nInput: s = \"AAAAAAAAAAAAA\"\nOutput: [\"AAAAAAAAAA\"]\n\n \nConstraints:\n\n1 <= s.length <= 105\ns[i] is either 'A', 'C', 'G', or 'T'.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"ACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"AAAAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\") == ['AAAAACCCCC', 'CCCCCAAAAA']\n assert candidate(s = \"CGTTGCGTTGCGTTGCGTTG\") == ['CGTTGCGTTG', 'GTTGCGTTGC', 'TTGCGTTGCG', 'TGCGTTGCGT', 'GCGTTGCGTT']\n assert candidate(s = \"AAAAAAAAAATTTTTTTTTTAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"CGCGCGCGCGCGCGCGCGCG\") == ['CGCGCGCGCG', 'GCGCGCGCGC']\n assert candidate(s = \"ACGTTTACGTTTACGTTT\") == ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT']\n assert candidate(s = \"ACGACGACGACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT\") == ['TTTTTTTTTT']\n assert candidate(s = \"ACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"ACGACGACGACGACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"AAAAAAAAAAAACCCCCCCCCC\") == ['AAAAAAAAAA']\n assert candidate(s = \"GGGGGGGGGGGGGGGGGGGG\") == ['GGGGGGGGGG']\n assert candidate(s = \"ACGTCGTCGTCGTCGT\") == ['CGTCGTCGTC', 'GTCGTCGTCG', 'TCGTCGTCGT']\n assert candidate(s = \"AAAAAAAAAAACCCCCCCCCCAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"TTTTTTTTTTAAAAAAAAAA\") == []\n assert candidate(s = \"TTAGGGTTAGGGTTAGGG\") == ['TTAGGGTTAG', 'TAGGGTTAGG', 'AGGGTTAGGG']\n assert candidate(s = \"AAAAAAAAAAAGGGGGGGGGGG\") == ['AAAAAAAAAA', 'GGGGGGGGGG']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACG\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"ACGACGACGACGACGACGACGACGACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"AAAAAAAAAAACCCCCCCAAAAAAAAAACCCCCCCCCCCC\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'CCCCCCCCCC']\n assert candidate(s = \"TTAGGGTACCTAGGGTACCTAGGGTACC\") == ['TAGGGTACCT', 'AGGGTACCTA', 'GGGTACCTAG', 'GGTACCTAGG', 'GTACCTAGGG', 'TACCTAGGGT', 'ACCTAGGGTA', 'CCTAGGGTAC', 'CTAGGGTACC']\n assert candidate(s = \"ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT\") == ['ATATATATAT', 'TATATATATA']\n assert candidate(s = \"CCAGTTACCGGGTAAAGGGCCCTAAAGGGCCCTAAAGGGCCCTAAAGGGCCC\") == ['TAAAGGGCCC', 'AAAGGGCCCT', 'AAGGGCCCTA', 'AGGGCCCTAA', 'GGGCCCTAAA', 'GGCCCTAAAG', 'GCCCTAAAGG', 'CCCTAAAGGG', 'CCTAAAGGGC', 'CTAAAGGGCC']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTA\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA\") == ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG']\n assert candidate(s = \"ACGTACGTACGTACGTACGTTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"TTACGTACGTACGTACGTACGTACGTACGTAC\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"GTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCA\") == ['GTCAGTCAGT', 'TCAGTCAGTC', 'CAGTCAGTCA', 'AGTCAGTCAG']\n assert candidate(s = \"AAAAACCCCCAAAAAAAAAAAAACCCCCAAAA\") == ['AAAAAAAAAA', 'AAAAACCCCC', 'AAAACCCCCA', 'AAACCCCCAA', 'AACCCCCAAA', 'ACCCCCAAAA']\n assert candidate(s = \"AAAAAAAAAAACCCCCCCCCCAAAAAAAAAAAACCCCCCCCCCAGGGGGGGGGG\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC', 'CCCCCCCCCA']\n assert candidate(s = \"AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT\") == ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA']\n assert candidate(s = \"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\") == ['GGGGGGGGGG']\n assert candidate(s = \"ACCTGACCTGACCTGACCTGACCTGACCTGACCTGACCTG\") == ['ACCTGACCTG', 'CCTGACCTGA', 'CTGACCTGAC', 'TGACCTGACC', 'GACCTGACCT']\n assert candidate(s = \"GACGTGACGTGACGTGACGTGACGTGACGTGACGTGACG\") == ['GACGTGACGT', 'ACGTGACGTG', 'CGTGACGTGA', 'GTGACGTGAC', 'TGACGTGACG']\n assert candidate(s = \"AACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTT\") == ['AACCGGTTAA', 'ACCGGTTAAC', 'CCGGTTAACC', 'CGGTTAACCG', 'GGTTAACCGG', 'GTTAACCGGT', 'TTAACCGGTT', 'TAACCGGTTA']\n assert candidate(s = \"GAAAAAAAAATTTTTTTTTTAAAAAAAAAA\") == []\n assert candidate(s = \"AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT\") == ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA']\n assert candidate(s = \"AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA\") == ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA']\n assert candidate(s = \"AAAAAGGGGGAAAAAGGGGGCCCCCATTTTTT\") == ['AAAAAGGGGG']\n assert candidate(s = \"TTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT\") == ['TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG', 'ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT']\n assert candidate(s = \"GGGGGGGGGGTTGGGGGGGGTTGGGGGGGGTTGGGGGG\") == ['GGGGGGGGTT', 'GGGGGGGTTG', 'GGGGGGTTGG', 'GGGGGTTGGG', 'GGGGTTGGGG', 'GGGTTGGGGG', 'GGTTGGGGGG', 'GTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGT']\n assert candidate(s = \"ACGACGACGACGACGACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"AAAAAAAAAAGGGGGGGGGGAAAAAAAAAAGGGG\") == ['AAAAAAAAAA', 'AAAAAAAAAG', 'AAAAAAAAGG', 'AAAAAAAGGG', 'AAAAAAGGGG']\n assert candidate(s = \"CCCCCCCCCCGGCCCCCCCCCCGGCCCCCCCCCCGG\") == ['CCCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGC', 'CCCCCCGGCC', 'CCCCCGGCCC', 'CCCCGGCCCC', 'CCCGGCCCCC', 'CCGGCCCCCC', 'CGGCCCCCCC', 'GGCCCCCCCC', 'GCCCCCCCCC']\n assert candidate(s = \"ATATATATATACGTACGTACGTACGTACGTACGT\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"GATACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTAC\") == ['TACAGTACAG', 'ACAGTACAGT', 'CAGTACAGTA', 'AGTACAGTAC', 'GTACAGTACA']\n assert candidate(s = \"TCGATCGATCGATCGATCGATCGATCGATCGA\") == ['TCGATCGATC', 'CGATCGATCG', 'GATCGATCGA', 'ATCGATCGAT']\n assert candidate(s = \"ACGTACGTTACGTACGTTACGTACGTTACGTACGTTACGTACGTT\") == ['ACGTACGTTA', 'CGTACGTTAC', 'GTACGTTACG', 'TACGTTACGT', 'ACGTTACGTA', 'CGTTACGTAC', 'GTTACGTACG', 'TTACGTACGT', 'TACGTACGTT']\n assert candidate(s = \"ACCGGTTTAAACCGGTTTAAACCGGTTTAA\") == ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA']\n assert candidate(s = \"TTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAA\") == ['TTTTAAAAAT', 'TTTAAAAATT', 'TTAAAAATTT', 'TAAAAATTTT', 'AAAAATTTTT', 'AAAATTTTTA', 'AAATTTTTAA', 'AATTTTTAAA', 'ATTTTTAAAA', 'TTTTTAAAAA']\n assert candidate(s = \"ACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTA\") == ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA']\n assert candidate(s = \"ACGCGTACGCGTACGCGTACGCGTACGCGTACGCGT\") == ['ACGCGTACGC', 'CGCGTACGCG', 'GCGTACGCGT', 'CGTACGCGTA', 'GTACGCGTAC', 'TACGCGTACG']\n assert candidate(s = \"GAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGA\") == ['GAGAGAGAGA', 'AGAGAGAGAG']\n assert candidate(s = \"ACACACACACACACACACACACACACACACAC\") == ['ACACACACAC', 'CACACACACA']\n assert candidate(s = \"CGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGAT\") == ['CGATCGATCG', 'GATCGATCGA', 'ATCGATCGAT', 'TCGATCGATC']\n assert candidate(s = \"AAACCGGGTTAAACCGGGTTAAACCGGGTT\") == ['AAACCGGGTT', 'AACCGGGTTA', 'ACCGGGTTAA', 'CCGGGTTAAA', 'CGGGTTAAAC', 'GGGTTAAACC', 'GGTTAAACCG', 'GTTAAACCGG', 'TTAAACCGGG', 'TAAACCGGGT']\n assert candidate(s = \"TTTTTTTTTTCCTTTTTTTTCCTTTTTTTTCCTTTTTT\") == ['TTTTTTTTCC', 'TTTTTTTCCT', 'TTTTTTCCTT', 'TTTTTCCTTT', 'TTTTCCTTTT', 'TTTCCTTTTT', 'TTCCTTTTTT', 'TCCTTTTTTT', 'CCTTTTTTTT', 'CTTTTTTTTC']\n assert candidate(s = \"ACACACACACACACACACACACACACACACACACACACAC\") == ['ACACACACAC', 'CACACACACA']\n assert candidate(s = \"ATATATATATATATATATATATATATATATATAT\") == ['ATATATATAT', 'TATATATATA']\n assert candidate(s = \"TATATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"TGCCTGCCTGCCTGCCTGCCTGCC\") == ['TGCCTGCCTG', 'GCCTGCCTGC', 'CCTGCCTGCC', 'CTGCCTGCCT']\n assert candidate(s = \"CGTACGTAACGTACGTAACGTACGTAACGTAC\") == ['CGTACGTAAC', 'GTACGTAACG', 'TACGTAACGT', 'ACGTAACGTA', 'CGTAACGTAC', 'GTAACGTACG', 'TAACGTACGT', 'AACGTACGTA', 'ACGTACGTAA']\n assert candidate(s = \"ACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAA\") == ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA']\n assert candidate(s = \"ACGTACGTACGTACGTATATATATACGTACGTAC\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert 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 candidate(s = \"ATATATATATATATATATATATATATATATAT\") == ['ATATATATAT', 'TATATATATA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"ATCGATCGATCGATCGATCGATCGATCGATCGATCG\") == ['ATCGATCGAT', 'TCGATCGATC', 'CGATCGATCG', 'GATCGATCGA']\n assert candidate(s = \"AAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGG\") == ['AAAAAAAAAA', 'GGGGGGGGGG']\n assert candidate(s = \"AAAAAAAAAACAAAAAAAAAACAAAAAAAAAACAAAAAAA\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACA', 'AAAAAAACAA', 'AAAAAACAAA', 'AAAAACAAAA', 'AAAACAAAAA', 'AAACAAAAAA', 'AACAAAAAAA', 'ACAAAAAAAA', 'CAAAAAAAAA']\n assert candidate(s = \"AAAAAAAAAAACAAAAAAAAAAACAAAAAAAAAAAC\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACA', 'AAAAAAACAA', 'AAAAAACAAA', 'AAAAACAAAA', 'AAAACAAAAA', 'AAACAAAAAA', 'AACAAAAAAA', 'ACAAAAAAAA', 'CAAAAAAAAA']\n assert candidate(s = \"AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT\") == ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA']\n assert candidate(s = \"CCCGGGCCCGGGCCCGGGCCCGGGCCCGGGCCCGGGCCCGGG\") == ['CCCGGGCCCG', 'CCGGGCCCGG', 'CGGGCCCGGG', 'GGGCCCGGGC', 'GGCCCGGGCC', 'GCCCGGGCCC']\n assert candidate(s = \"GCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTG\") == ['GCTGCTGCTG', 'CTGCTGCTGC', 'TGCTGCTGCT']\n assert candidate(s = \"ATATATATATATATATATATATATATAT\") == ['ATATATATAT', 'TATATATATA']\n assert candidate(s = \"ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT\") == ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG']\n assert 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 candidate(s = \"TTTTACCGGGAAAAACCGGGAAAAACCGGGAAAA\") == ['ACCGGGAAAA', 'CCGGGAAAAA', 'CGGGAAAAAC', 'GGGAAAAACC', 'GGAAAAACCG', 'GAAAAACCGG', 'AAAAACCGGG', 'AAAACCGGGA', 'AAACCGGGAA', 'AACCGGGAAA']\n assert candidate(s = \"TACGTACGTACGTACGTACGTACGTACGTACG\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"AGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTAC\") == ['AGTACAGTAC', 'GTACAGTACA', 'TACAGTACAG', 'ACAGTACAGT', 'CAGTACAGTA']\n assert candidate(s = \"GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA\") == ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG']\n assert candidate(s = \"TTTTTTTTTTAAAAAAAAAAAATTTTTTTTTTAAAAAAAAAAAATTTTT\") == ['AAAAAAAAAA', 'TTTTTTTTTT', 'TTTTTTTTTA', 'TTTTTTTTAA', 'TTTTTTTAAA', 'TTTTTTAAAA', 'TTTTTAAAAA', 'TTTTAAAAAA', 'TTTAAAAAAA', 'TTAAAAAAAA', 'TAAAAAAAAA', 'AAAAAAAAAT', 'AAAAAAAATT', 'AAAAAAATTT', 'AAAAAATTTT', 'AAAAATTTTT']\n assert candidate(s = \"CCCCGGGGAAGGGGCCCCGGGGAAGGGGCCCCGGGGAAGGGGCCCCGGGGAAGGGG\") == ['CCCCGGGGAA', 'CCCGGGGAAG', 'CCGGGGAAGG', 'CGGGGAAGGG', 'GGGGAAGGGG', 'GGGAAGGGGC', 'GGAAGGGGCC', 'GAAGGGGCCC', 'AAGGGGCCCC', 'AGGGGCCCCG', 'GGGGCCCCGG', 'GGGCCCCGGG', 'GGCCCCGGGG', 'GCCCCGGGGA']\n assert candidate(s = \"AAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCCCCCC\") == ['AAAAAAAAAA', 'CCCCCCCCCC']\n assert candidate(s = \"AAAAAAAAAAAACCCCCCCCCCAAAAAAAAAAAACCCCCCCCCC\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC']\n assert 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 candidate(s = \"AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT\") == ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA']\n assert candidate(s = \"ACGTACGTTTTACGTTTTACGTTTTACGTTTT\") == ['TACGTTTTAC', 'ACGTTTTACG', 'CGTTTTACGT', 'GTTTTACGTT', 'TTTTACGTTT', 'TTTACGTTTT', 'TTACGTTTTA']\n assert candidate(s = \"GAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGA\") == ['GAGAGAGAGA', 'AGAGAGAGAG']\n assert candidate(s = \"ACGTCGTTTTTACGTCGTTTTTACGTCGTTTTTACGTCGTTTTT\") == ['ACGTCGTTTT', 'CGTCGTTTTT', 'GTCGTTTTTA', 'TCGTTTTTAC', 'CGTTTTTACG', 'GTTTTTACGT', 'TTTTTACGTC', 'TTTTACGTCG', 'TTTACGTCGT', 'TTACGTCGTT', 'TACGTCGTTT']\n assert candidate(s = \"ACGTACGTACGTATATATATACGTACGTACGTAT\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'ACGTACGTAT']\n assert candidate(s = \"TACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == ['AAAAAAAAAA']\n assert candidate(s = \"TTTACCGGAAAACCGGAAAACCGGAAAACCGGAAAACCGG\") == ['ACCGGAAAAC', 'CCGGAAAACC', 'CGGAAAACCG', 'GGAAAACCGG', 'GAAAACCGGA', 'AAAACCGGAA', 'AAACCGGAAA', 'AACCGGAAAA']\n assert candidate(s = \"AGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAG\") == ['AGAGAGAGAG', 'GAGAGAGAGA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"AAAAAAAAAAAACCCCCCCCCCAAAAAAAAAACCCCCCCCCC\") == ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC']\n assert candidate(s = \"TACGTACGTACGTACGTACGTACGTACGTACGTACGTACG\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"AAAAACCCCCAAAAACCCCCAAAAACCCCCAAAAACCCCC\") == ['AAAAACCCCC', 'AAAACCCCCA', 'AAACCCCCAA', 'AACCCCCAAA', 'ACCCCCAAAA', 'CCCCCAAAAA', 'CCCCAAAAAC', 'CCCAAAAACC', 'CCAAAAACCC', 'CAAAAACCCC']\n assert candidate(s = \"AAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\") == ['AAAAAAAAAA', 'GGGGGGGGGG']\n assert candidate(s = \"ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT\") == ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT\") == ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG']\n assert candidate(s = \"TTTTTTTTTTGGGGGGGGGGTTTTTTTTTTGGGGGGGGGG\") == ['TTTTTTTTTT', 'TTTTTTTTTG', 'TTTTTTTTGG', 'TTTTTTTGGG', 'TTTTTTGGGG', 'TTTTTGGGGG', 'TTTTGGGGGG', 'TTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGG', 'GGGGGGGGGG']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA\") == ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG']\n assert candidate(s = \"CGTACGTACGTACGTACGTACGTACGTACGTACGTAC\") == ['CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA', 'ACGTACGTAC']\n assert candidate(s = \"TATATATATATATATATATATATATATATATATATATATATATA\") == ['TATATATATA', 'ATATATATAT']\n assert candidate(s = \"GTACGTACGTACGTACGTACGTACGTACGTACGTACG\") == ['GTACGTACGT', 'TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG']\n assert candidate(s = \"TGACGTGACGTGACGTGACGTGACGTGACGTGACGTGAC\") == ['TGACGTGACG', 'GACGTGACGT', 'ACGTGACGTG', 'CGTGACGTGA', 'GTGACGTGAC']\n assert candidate(s = \"TACGTACGTACGTACGTACGTACGTACGTACGTAC\") == ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTAC\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n assert candidate(s = \"TTTTTTTTTTGGGGGGGGGGAAAAAAAAAATTTTTTTTTTGGGGGGGGGG\") == ['TTTTTTTTTT', 'TTTTTTTTTG', 'TTTTTTTTGG', 'TTTTTTTGGG', 'TTTTTTGGGG', 'TTTTTGGGGG', 'TTTTGGGGGG', 'TTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGG', 'GGGGGGGGGG']\n assert candidate(s = \"AAAAAAAAAAAAACCCCCCCCCCCCCCCGGGGGGGGGGGGGG\") == ['AAAAAAAAAA', 'CCCCCCCCCC', 'GGGGGGGGGG']\n assert candidate(s = \"ACGGTACGGTACGGTACGGTACGGTACGGTACGGTACGGT\") == ['ACGGTACGGT', 'CGGTACGGTA', 'GGTACGGTAC', 'GTACGGTACG', 'TACGGTACGG']\n assert candidate(s = \"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\") == ['GGGGGGGGGG']\n assert candidate(s = \"AGACGTAGACGTAGACGTAGACGTAGACGTAGACGTAG\") == ['AGACGTAGAC', 'GACGTAGACG', 'ACGTAGACGT', 'CGTAGACGTA', 'GTAGACGTAG', 'TAGACGTAGA']\n assert 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 candidate(s = \"ACGGTGACGGTGACGGTGACGGTGACGGTGACGGTG\") == ['ACGGTGACGG', 'CGGTGACGGT', 'GGTGACGGTG', 'GTGACGGTGA', 'TGACGGTGAC', 'GACGGTGACG']\n assert candidate(s = \"AAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\") == ['GGGGGGGGGG']\n assert candidate(s = \"ACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACG\") == ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG']\n assert candidate(s = \"GCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGC\") == ['GCGCGCGCGC', 'CGCGCGCGCG']\n assert candidate(s = \"ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT\") == ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG']\n assert candidate(s = \"ACGAATTCCGACGAATTCCGACGAATTCCGACGAATTCCG\") == ['ACGAATTCCG', 'CGAATTCCGA', 'GAATTCCGAC', 'AATTCCGACG', 'ATTCCGACGA', 'TTCCGACGAA', 'TCCGACGAAT', 'CCGACGAATT', 'CGACGAATTC', 'GACGAATTCC']\n assert candidate(s = \"GATTACAAGATTACAAGATTACAAGATTACAAGATTAC\") == ['GATTACAAGA', 'ATTACAAGAT', 'TTACAAGATT', 'TACAAGATTA', 'ACAAGATTAC', 'CAAGATTACA', 'AAGATTACAA', 'AGATTACAAG']\n assert candidate(s = \"GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA\") == ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG']\n assert candidate(s = \"ACGACGTTTTACGACGTTTTACGACGTTTT\") == ['ACGACGTTTT', 'CGACGTTTTA', 'GACGTTTTAC', 'ACGTTTTACG', 'CGTTTTACGA', 'GTTTTACGAC', 'TTTTACGACG', 'TTTACGACGT', 'TTACGACGTT', 'TACGACGTTT']\n assert candidate(s = \"CCGGTTTAAAACCGGTTTAAAACCGGTTTAAAACCGGTTTAAA\") == ['CCGGTTTAAA', 'CGGTTTAAAA', 'GGTTTAAAAC', 'GTTTAAAACC', 'TTTAAAACCG', 'TTAAAACCGG', 'TAAAACCGGT', 'AAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA', 'ACCGGTTTAA']\n assert candidate(s = \"AAGGTTCCGGTTCCTTAAAGGTTCCGGTTCCT\") == ['AAGGTTCCGG', 'AGGTTCCGGT', 'GGTTCCGGTT', 'GTTCCGGTTC', 'TTCCGGTTCC', 'TCCGGTTCCT']\n assert candidate(s = \"ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTT\") == ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA']\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().findRepeatedDnaSequences", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findRepeatedDnaSequences(string s) {", "container": "Solution", "callable": "findRepeatedDnaSequences", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "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 ith day, and an integer k.\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.\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\n \nConstraints:\n\n1 <= k <= 100\n1 <= prices.length <= 1000\n0 <= prices[i] <= 1000\n\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 = 0,prices = [1, 2, 3, 4, 5]) == 0\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 = 0,prices = [7, 6, 4, 3, 1]) == 0\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"}, "metadata": {"canonical_parameter_names": ["k", "prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(int k, vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "k", "type": "int"}, {"name": "prices", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 190, "task_id": "reverse-bits", "difficulty": "Easy", "problem_description": "Reverse bits of a given 32 bits unsigned integer.\nNote:\n\nNote that in some languages, such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed integer type. They should not affect your implementation, as the integer's internal binary representation is the same, whether it is signed or unsigned.\nIn Java, the compiler represents the signed integers using 2's complement notation. Therefore, in Example 2 above, the input represents the signed integer -3 and the output represents the signed integer -1073741825.\n\n \nExample 1:\n\nInput: n = 00000010100101000001111010011100\nOutput: 964176192 (00111001011110000010100101000000)\nExplanation: The input binary string 00000010100101000001111010011100 represents the unsigned integer 43261596, so return 964176192 which its binary representation is 00111001011110000010100101000000.\n\nExample 2:\n\nInput: n = 11111111111111111111111111111101\nOutput: 3221225471 (10111111111111111111111111111111)\nExplanation: The input binary string 11111111111111111111111111111101 represents the unsigned integer 4294967293, so return 3221225471 which its binary representation is 10111111111111111111111111111111.\n\n \nConstraints:\n\nThe input must be a binary string of length 32\n\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 = 0) == 0\n assert candidate(n = 11111111111111111111111111111111) == 3817748707\n assert candidate(n = 0) == 0\n assert candidate(n = 10000000000000000000000000000000) == 1\n assert candidate(n = 2147483648) == 1\n assert candidate(n = 43261596) == 964176192\n assert candidate(n = 4294967293) == 3221225471\n assert candidate(n = 1) == 2147483648\n assert candidate(n = 11111111111111111111111111111101) == 3180214499\n assert candidate(n = 10100101001010010100101001010010) == 1524246408\n assert candidate(n = 11110000111100001111000011110000) == 242192076\n assert candidate(n = 11110000000011111111000000001111) == 3928946530\n assert candidate(n = 11111111111111110000000000000000) == 57352\n assert candidate(n = 11011011011011011011011011011011) == 3280443572\n assert candidate(n = 10011100100001011011100110000110) == 2012287233\n assert candidate(n = 11100000111000001110000011100000) == 117259735\n assert candidate(n = 11100001111000011110000111100001) == 2248527424\n assert candidate(n = 10010010010010010010010010010010) == 1501692052\n assert candidate(n = 10101010101010100101010101010101) == 2910733234\n assert candidate(n = 10101010101010101010101010101010) == 1221553761\n assert candidate(n = 11111111000000001111111100000000) == 15193787\n assert candidate(n = 11110000000000000000000000000000) == 14\n assert candidate(n = 10001000100010001000100010001000) == 373324907\n assert candidate(n = 11001100110011001100110011001100) == 815197725\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().reverseBits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int reverseBits(int n) {", "container": "Solution", "callable": "reverseBits", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= n <= 231 - 1\n\n \nFollow up: If this function is called many times, how would you optimize it?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\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 = 1099511627776) == 1\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 = 549755813888) == 1\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 = 8589934591) == 33\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 = 68719476735) == 36\n assert candidate(n = 2199023255551) == 41\n assert candidate(n = 89) == 4\n assert candidate(n = 256) == 1\n assert candidate(n = 1099511627775) == 40\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 = 4294967295) == 32\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 = 4026531840) == 4\n assert candidate(n = 17179869183) == 34\n assert candidate(n = 311) == 6\n assert candidate(n = 179) == 5\n assert candidate(n = 2) == 1\n assert candidate(n = 3221225471) == 31\n assert candidate(n = 2147483644) == 29\n assert candidate(n = 34359738367) == 35\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().hammingWeight", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int hammingWeight(int n) {", "container": "Solution", "callable": "hammingWeight", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 100\n0 <= nums[i] <= 400\n\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 = [300, 400, 500, 100, 200, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]) == 6500\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 3000\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 11000\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 = [300, 200, 100, 400, 300, 500, 400, 600, 500, 700]) == 2500\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 = [100, 200, 300, 400, 500, 600]) == 1200\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, 400, 300, 500, 200]) == 1200\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 3000\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().rob", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int rob(vector& nums) {", "container": "Solution", "callable": "rob", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 199, "task_id": "binary-tree-right-side-view", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.\n \nExample 1:\n\nInput: root = [1,2,3,null,5,null,4]\nOutput: [1,3,4]\nExplanation:\n\n\nExample 2:\n\nInput: root = [1,2,3,4,null,null,null,5]\nOutput: [1,3,4,5]\nExplanation:\n\n\nExample 3:\n\nInput: root = [1,null,3]\nOutput: [1,3]\n\nExample 4:\n\nInput: root = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 100].\n-100 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, None, 3])) == [1, 3]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, None, 5])) == [1, 3, 4, 5]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 4])) == [1, 3, 4]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, None, None, None, 5, None, None, None, 6, None, None, None, 7, None, None, None, 8, None, None, None, 9, None, None, None, 10])) == [1, 3, 4]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == [1, 3, 5, 6, 7]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9])) == [10, 15, 18, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, 6, None, 7, 8, 9, None, None, 10, 11, 12, None, None, 13, None, None, 14])) == [1, 3, 5, 7, 9, 12, 14]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, None, 9, 2, None, None, None, None, 10])) == [5, 8, 9, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9])) == [1, 3, 7, 9]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 4, None, 6, None, 7, None, 8, None, 9])) == [1, 3, 4, 7, 9]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 14, 15])) == [1, 3, 7, 13, 15]\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, 6, None, None, None, None, 7, None, 8, 9])) == [1, 2, 3, 4, 6]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, 16])) == [1, 3, 7, 15, 16]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, 8, 9, None, 10, None, None, 11, None, 12])) == [1, 3, 6, 10, 12]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == [1, 3, 7, 15, 31]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, None, None, None, None, 12, 13, 14, 15])) == [1, 3, 7, 11, 15]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8])) == [1, 3, 6, 8]\n assert candidate(root = tree_node([1, 2, 3, None, None, None, 4, None, None, 5, None, None, 6, None, None, 7])) == [1, 3, 4]\n assert candidate(root = tree_node([100, -50, 50, -75, -25, 25, 75, -100, 0, 0, 100])) == [100, 50, 75, 100]\n assert candidate(root = tree_node([1, None, 2, 3, 4, 5, 6, None, None, 7, 8, 9, 10, None, None, 11, 12, 13, 14, 15])) == [1, 2, 4, 6, 10, 15]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == [3, 20, 7]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, None, 7, None, 8, None, 9])) == [1, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, None, 6, 7, 8, 9])) == [1, 3, 5, 6, 8, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, 7, None, 8, None, 9, None, 10])) == [1, 3, 5, 8, 10]\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == [1, 3, 6, 8, 10, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, None, None, None, None, 6, 7, 8, 9, 10, 11])) == [1, 3, 5]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7])) == [1, 3, 5, 7]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [1, 3, 7, 15, 20]\n assert candidate(root = tree_node([1, 2, None, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8])) == [1, 2, 4, 7, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [1, 3, 7, 15]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [1, 3, 7]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, 7, None, None, None, None, None, 8, 9])) == [1, 3, 6, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, 8, 9, None, 10, None, None, 11])) == [1, 3, 6, 10, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, 8, None, None, None, 9])) == [1, 3, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, None, 7, None, 8, 9])) == [1, 3, 6, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, 10, 11, 12, 13, None, None, None, None, 14])) == [1, 3, 7, 13, 14]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, None, None, 5, 6])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 9])) == [1, 3, 7, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, 10, None, None, None, None, 11, 12, None, None, 13, None, 14])) == [1, 3, 5, 9, 12, 14]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, 6])) == [1, 2, 4, 6]\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 4, 6, 7])) == [1, 3, 4, 7]\n assert candidate(root = tree_node([1, 2, None, 4, None, 6, 7, None, None, None, 8])) == [1, 2, 4, 7, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, 6, 7, 8, None, 9, None, 10, 11])) == [1, 3, 5, 8, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, 11, 12, 13, 14, 15])) == [1, 3, 7, 14, 15]\n assert candidate(root = tree_node([1, None, 2, None, None, None, None, 3, None, None, None, 4, None, None, None, 5])) == [1, 2]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [5, 4, 6]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, None, 6, 7, None, 8, 9, None, None, None, None, 10])) == [1, 2, 4, 5, 7, 9, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, None, 7, 8, None, None, 9, 10, None, None, 11, 12])) == [1, 3, 6, 8, 10, 12]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, None, 5, 6, None, None, 7, 8, None, None, 9, 10, None, None, 11, 12])) == [1, 2, 4, 6, 8, 10, 12]\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8, 9, 10, None, None, 11, 12])) == [1, 3, 6, 10, 12]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, 4])) == [1, 2]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, None, None, 6, 7, None, None, 8, 9])) == [1, 3, 5]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 3, 5, 7, 9]\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == [0, 4, -1, 8]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, 6, None, 7, 8, 9, 10, None, None, 11, 12])) == [1, 3, 5, 8, 12]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == [1, 2, 3, 4, 5, 6]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, 7, 8, 9, None, None, None, 10])) == [1, 3, 6, 9, 10]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, 6, 7, None, None, 8, None, 9, 10])) == [1, 2, 4, 7, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, 10, None, 11])) == [1, 3, 6, 10, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, None, 13, None, None, 14])) == [1, 3, 7, 13, 14]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, 16])) == [1, 3, 7, 15, 16]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9, None, None, 10, 11])) == [1, 3, 5, 7, 9, 11]\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8, None, None, 9, 10])) == [1, 3, 6, 8, 10]\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, 6, 7, 8, 9, 10, 11, 12, 13])) == [1, 3, 5, 9, 13]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [1, 3, 5, 7, 8]\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, None, 6, None, None, None, 7])) == [1, 2, 4, 5, 6]\n assert candidate(root = tree_node([-10, -5, -15, -3, -8, -20, -18, -1, -4, None, -9, None, None, -6, -7])) == [-10, -15, -18, -7]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, 7, 8, None, 9, 10, None, 11])) == [1, 3, 6, 10, 11]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, None, None, None, 9])) == [1, 3, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, 10, 11, 12, 13, 14])) == [1, 3, 7, 14]\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, None, 7, 8])) == [1, 3, 6, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, None, None, 6, None, 7, None, 8, None, 9])) == [1, 3, 5, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 3, 5, 7]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, None, None, 7, 8])) == [1, 3, 6, 8]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, None, 8, 9, None, None, None, 10, 11])) == [1, 3, 7, 9, 11]\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, None, None, 6, None, None, 7])) == [1, 3, 5]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, None, None, 17, None, 18, None, None, 19, None, None, 20])) == [1, 3, 7, 15, 20]\n assert candidate(root = tree_node([1, 2, None, 3, 4, 5, None, 6, 7, None, None, 8, None, None, 9, None, 10])) == [1, 2, 4, 7, 9, 10]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, 8, 9, None, None, 10])) == [1, 3, 5, 8, 10]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().rightSideView", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector rightSideView(TreeNode* root) {", "container": "Solution", "callable": "rightSideView", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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.\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\n \nConstraints:\n\nm == grid.length\nn == grid[i].length\n1 <= m, n <= 300\ngrid[i][j] is '0' or '1'.\n\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"}, "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().numIslands", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numIslands(vector>& grid) {", "container": "Solution", "callable": "numIslands", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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\n \nConstraints:\n\n0 <= left <= right <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["left", "right"], "leetcode_dataset_entry_point": "Solution().rangeBitwiseAnd", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int rangeBitwiseAnd(int left, int right) {", "container": "Solution", "callable": "rangeBitwiseAnd", "parameters": [{"name": "left", "type": "int"}, {"name": "right", "type": "int"}], "return_type": "int", "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.\nA happy number is a number defined by the following process:\n\nStarting with any positive integer, replace the number by the sum of the squares of its digits.\nRepeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1.\nThose 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:\n12 + 92 = 82\n82 + 22 = 68\n62 + 82 = 100\n12 + 02 + 02 = 1\n\nExample 2:\n\nInput: n = 2\nOutput: false\n\n \nConstraints:\n\n1 <= n <= 231 - 1\n\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 = 3249671058) == 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 = 8989898989) == 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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isHappy", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isHappy(int n) {", "container": "Solution", "callable": "isHappy", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 203, "task_id": "remove-linked-list-elements", "difficulty": "Easy", "problem_description": "Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.\n \nExample 1:\n\n\nInput: head = [1,2,6,3,4,5,6], val = 6\nOutput: [1,2,3,4,5]\n\nExample 2:\n\nInput: head = [], val = 1\nOutput: []\n\nExample 3:\n\nInput: head = [7,7,7,7], val = 7\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [0, 104].\n1 <= Node.val <= 50\n0 <= val <= 50\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, 2, 6, 3, 4, 5, 6]),val = 6), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50]),val = 10), list_node([20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([50, 20, 30, 20, 10]),val = 20), list_node([50, 30, 10]))\n assert candidate(head = list_node([1, 1, 1, 1, 1]),val = 1) == None\n assert is_same_list(candidate(head = list_node([50, 40, 30, 20, 10]),val = 50), list_node([40, 30, 20, 10]))\n assert candidate(head = list_node([7, 7, 7, 7]),val = 7) == None\n assert is_same_list(candidate(head = list_node([5, 1, 2, 3, 5, 4, 5]),val = 5), list_node([1, 2, 3, 4]))\n assert is_same_list(candidate(head = list_node([5, 1, 5, 2, 5, 3, 5]),val = 5), list_node([1, 2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),val = 3), list_node([1, 2, 4, 5]))\n assert candidate(head = list_node([]),val = 1) == None\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 3]),val = 1), list_node([2, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5]),val = 6), list_node([1, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),val = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31]),val = 35), list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 34, 33, 32, 31]))\n assert is_same_list(candidate(head = list_node([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]),val = 45), list_node([50, 49, 48, 47, 46, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20]))\n assert candidate(head = list_node([42, 42, 42, 42, 42, 42]),val = 42) == None\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]),val = 20), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 22, 24, 26, 28, 30]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]),val = 2), list_node([1, 1, 1, 1, 3, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 2, 4, 2, 5, 2, 6]),val = 2), list_node([1, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 1, 3, 3, 3, 2, 2, 1]),val = 2), list_node([1, 1, 3, 3, 3, 1]))\n assert is_same_list(candidate(head = list_node([50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50]),val = 50), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 10, 20, 30]),val = 20), list_node([10, 30, 40, 50, 10, 30]))\n assert is_same_list(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]),val = 5), list_node([10, 15, 20, 25, 30, 35, 40, 45, 50, 10, 15, 20, 25, 30, 35, 40, 45, 50]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),val = 8), list_node([10, 9, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),val = 11), list_node([1, 3, 5, 7, 9, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([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]),val = 2), list_node([4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),val = 20), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),val = 13), list_node([1, 3, 5, 7, 9, 11, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7]),val = 2), list_node([1, 3, 4, 5, 6, 7]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 1, 2, 3, 2, 1, 2]),val = 2), list_node([1, 3, 1, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),val = 5), list_node([1, 2, 3, 4, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),val = 9), list_node([10, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),val = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50]),val = 10), list_node([20, 30, 40, 50, 60, 70, 80, 90, 100, 20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),val = 70), list_node([10, 20, 30, 40, 50, 60, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]),val = 14), list_node([2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 26, 28, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 1, 3, 1, 4, 1, 5]),val = 1), list_node([2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),val = 1), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),val = 7), list_node([1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22]),val = 22), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6]),val = 3), list_node([1, 2, 4, 5, 6, 1, 2, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([3, 5, 2, 3, 7, 3, 8, 3, 3]),val = 3), list_node([5, 2, 7, 8]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 2), list_node([1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 4, 2, 5, 2, 6, 2]),val = 2), list_node([1, 3, 4, 5, 6]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]),val = 10), list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]))\n assert is_same_list(candidate(head = list_node([3, 2, 1, 4, 5, 6, 3, 7, 8, 9, 3]),val = 3), list_node([2, 1, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]),val = 5), list_node([3, 1, 4, 1, 9, 2, 6, 3]))\n assert is_same_list(candidate(head = list_node([3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1]),val = 3), list_node([2, 1, 2, 1, 2, 1, 2, 1]))\n assert is_same_list(candidate(head = list_node([15, 16, 15, 17, 15, 18, 15, 19, 15, 20]),val = 15), list_node([16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([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]),val = 25), list_node([30, 29, 28, 27, 26, 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 is_same_list(candidate(head = list_node([34, 33, 32, 31, 30, 29, 28, 27, 26, 25]),val = 27), list_node([34, 33, 32, 31, 30, 29, 28, 26, 25]))\n assert is_same_list(candidate(head = list_node([2, 2, 2, 1, 1, 1, 3, 3, 3]),val = 2), list_node([1, 1, 1, 3, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 19), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20]))\n assert is_same_list(candidate(head = list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41]),val = 47), list_node([50, 49, 48, 46, 45, 44, 43, 42, 41]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 1, 1]),val = 1), list_node([2, 2, 3, 3, 2, 2, 2, 2]))\n assert candidate(head = list_node([4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]),val = 4) == None\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),val = 1), list_node([3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 1, 2, 1, 2, 1, 2, 1, 2]),val = 1), list_node([2, 2, 2, 2, 2]))\n assert candidate(head = list_node([42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]),val = 42) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]),val = 3), list_node([1, 2, 4, 2, 1, 2, 4, 2, 1]))\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),val = 1) == None\n assert is_same_list(candidate(head = list_node([1, 2, 3, 1, 2, 3, 1, 2, 3, 1]),val = 1), list_node([2, 3, 2, 3, 2, 3]))\n assert candidate(head = list_node([42, 42, 42, 42, 42, 42, 42, 42, 42, 42]),val = 42) == None\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),val = 18), list_node([2, 4, 6, 8, 10, 12, 14, 16, 20]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]),val = 19), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]))\n assert is_same_list(candidate(head = list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31]),val = 31), list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 10, 40, 10, 50]),val = 10), list_node([20, 30, 40, 50]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),val = 16), list_node([2, 4, 6, 8, 10, 12, 14, 18, 20]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]),val = 1), list_node([2, 3, 4, 5, 6, 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 is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]),val = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 7), list_node([1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]),val = 21), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([3, 3, 3, 2, 2, 1, 1, 1, 2, 2, 2]),val = 2), list_node([3, 3, 3, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]),val = 2), list_node([1, 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]),val = 4), list_node([1, 2, 2, 3, 3, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]),val = 2), list_node([1, 1, 1, 3, 3, 3, 4, 4, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),val = 10), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2]),val = 1), list_node([2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]),val = 2), list_node([1, 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]))\n assert is_same_list(candidate(head = list_node([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]),val = 13), list_node([1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]))\n assert is_same_list(candidate(head = list_node([42, 17, 22, 17, 35, 17, 5, 17]),val = 17), list_node([42, 22, 35, 5]))\n assert is_same_list(candidate(head = list_node([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]),val = 50), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]),val = 13), list_node([1, 3, 5, 7, 9, 11, 15, 17, 19, 21]))\n assert candidate(head = list_node([25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25]),val = 25) == None\n assert is_same_list(candidate(head = list_node([1, 3, 2, 6, 5, 4, 6, 7, 8, 6, 9]),val = 6), list_node([1, 3, 2, 5, 4, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),val = 10), list_node([5, 6, 7, 8, 9, 11, 12, 13, 14, 15]))\n assert candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),val = 5) == None\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]),val = 1), list_node([2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 20), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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]),val = 1), list_node([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 2, 3, 4, 5]))\n assert is_same_list(candidate(head = list_node([5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 10]),val = 5), list_node([1, 2, 3, 4, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),val = 3), list_node([1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([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]),val = 26), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50]))\n assert is_same_list(candidate(head = list_node([3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]),val = 3), list_node([1, 4, 1, 5, 9, 2, 6, 5, 5]))\n assert is_same_list(candidate(head = list_node([2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]),val = 3), list_node([2, 2, 2, 2, 2, 2, 2, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 3]),val = 3), list_node([1, 2, 4, 5, 6, 7, 8, 9]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 3, 2, 1, 3, 2, 1]),val = 3), list_node([1, 2, 4, 2, 1, 2, 1]))\n assert is_same_list(candidate(head = list_node([10, 20, 10, 30, 10, 40]),val = 10), list_node([20, 30, 40]))\n assert is_same_list(candidate(head = list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40]),val = 45), list_node([50, 49, 48, 47, 46, 44, 43, 42, 41, 40]))\n assert candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),val = 5) == None\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20]),val = 20), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18]))\n assert is_same_list(candidate(head = list_node([50, 49, 48, 47, 46, 45, 44, 43, 42, 41]),val = 45), list_node([50, 49, 48, 47, 46, 44, 43, 42, 41]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100]),val = 50), list_node([10, 20, 30, 40, 60, 70, 80, 90, 100]))\n assert is_same_list(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]),val = 50), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]))\n assert is_same_list(candidate(head = list_node([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]),val = 3), list_node([1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 40, 30, 20, 10]),val = 30), list_node([10, 20, 40, 50, 40, 20, 10]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),val = 3), list_node([10, 9, 8, 7, 6, 5, 4, 2, 1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]),val = 10), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]),val = 2), list_node([3]))\n assert is_same_list(candidate(head = list_node([49, 48, 47, 46, 45, 44, 43, 42, 41, 40]),val = 45), list_node([49, 48, 47, 46, 44, 43, 42, 41, 40]))\n assert candidate(head = list_node([1]),val = 1) == None\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]),val = 10), list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),val = 15), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_list(candidate(head = list_node([42, 23, 42, 23, 42, 23, 42, 23, 42]),val = 42), list_node([23, 23, 23, 23]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]),val = 30), list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 32, 34, 36, 38, 40]))\n"}, "metadata": {"canonical_parameter_names": ["head", "val"], "leetcode_dataset_entry_point": "Solution().removeElements", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* removeElements(ListNode* head, int val) {", "container": "Solution", "callable": "removeElements", "parameters": [{"name": "head", "type": "ListNode*"}, {"name": "val", "type": "int"}], "return_type": "ListNode*", "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\n \nConstraints:\n\n0 <= n <= 5 * 106\n\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 = 7890123) == 532888\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 = 10000000) == 664579\n assert candidate(n = 5000001) == 348513\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countPrimes", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countPrimes(int n) {", "container": "Solution", "callable": "countPrimes", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\nTwo strings s and t are isomorphic if the characters in s can be replaced to get t.\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\nMapping 'e' to 'a'.\nMapping 'g' to 'd'.\n\n\nExample 2:\n\nInput: s = \"foo\", t = \"bar\"\nOutput: false\nExplanation:\nThe strings s and t can not be made identical as 'o' needs to be mapped to both 'a' and 'r'.\n\nExample 3:\n\nInput: s = \"paper\", t = \"title\"\nOutput: true\n\n \nConstraints:\n\n1 <= s.length <= 5 * 104\nt.length == s.length\ns and t consist of any valid ascii character.\n\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 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzz\") == 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 = \"aabbccddeeff\",t = \"zzyyxxwwvvuuzz\") == True\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 = \"abccbaabc\",t = \"xyzyxzyxzyx\") == False\n assert candidate(s = \"abcdabcdabcd\",t = \"wxyzwxyzwxyz\") == True\n assert candidate(s = \"mississippi\",t = \"bbccddeffgg\") == False\n assert candidate(s = \"aabbccddeeff\",t = \"zzzzyyxxwwvvuuzz\") == 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 = \"longlongstringwithvariouscharacters\",t = \"shortshort\") == False\n assert candidate(s = \"sos\",t = \"non\") == True\n assert candidate(s = \"rat\",t = \"car\") == True\n assert candidate(s = \"elephant\",t = \"mouse\") == False\n assert candidate(s = \"abc\",t = \"zyx\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzxxwwvvuuttssrrqqppoonnmmllkkjjiihhggeeffddccbbaa\") == 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 = \"mississippi\",t = \"bbcccb\") == False\n assert candidate(s = \"xyxxyxyxyx\",t = \"xyxyyxyxyx\") == False\n assert candidate(s = \"aaaabbbbccccdddd\",t = \"ddddccccbbbbaaaa\") == True\n assert candidate(s = \"sameexample\",t = \"gnatgnatgnat\") == False\n assert candidate(s = \"twosky\",t = \"threesky\") == False\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 = \"aabbccddeeffgghhii\",t = \"zzxxyywwvvuuttrrqqpp\") == True\n assert candidate(s = \"123123123\",t = \"abcabcabc\") == True\n assert candidate(s = \"racecar\",t = \"level\") == False\n assert candidate(s = \"racecar\",t = \"madam\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"abacabadabacaba\",t = \"xyxyxyxyxyxyxyxy\") == False\n assert candidate(s = \"abcdeffedcba\",t = \"gfedcbaabcdefg\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggeeffdccbbbaa\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzzzyyyxxwwvvuuttrrsqqppoonnmmllkkjjiihhggffeeddccbbaa\") == False\n assert candidate(s = \"1234567890\",t = \"!@#$%^&*()\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzxxwvuttssrrqqponmlkjihgfedcbbaa\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhhgggffeeeeddccbbbaa\") == False\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 = \"abbabbbbabaabababbaaabbbabbbaaa\",t = \"xyzxxzzxzyzyzyzyzyzyzyzyzyzyzyzyzyz\") == False\n assert candidate(s = \"aaabbbcccdddeeefffggghhhh\",t = \"mmmnnnoooqqrssstttuuuvvvvv\") == False\n assert candidate(s = \"mississippi\",t = \"bbjjjjbbbrrr\") == 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 = \"abcabcabcabc\",t = \"defgdefgdefgdefg\") == False\n assert candidate(s = \"isomorphic\",t = \"homomorphi\") == False\n assert candidate(s = \"aaaaabbbbbaaaa\",t = \"cccceeeedddd\") == False\n assert candidate(s = \"xxxxx\",t = \"yyyyy\") == True\n assert candidate(s = \"abcabcabcabc\",t = \"xyzxyzxyzxyz\") == True\n assert candidate(s = \"abcabcabc\",t = \"xyzxyzyxzy\") == False\n assert candidate(s = \"isomorphic\",t = \"homomorphic\") == False\n assert candidate(s = \"sabcsabc\",t = \"tabctabc\") == True\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",t = \"mlkjihgfdsapoiuytrewqzxcvbnm\") == False\n assert candidate(s = \"thisisatest\",t = \"thatistest\") == False\n assert candidate(s = \"!@#$%^&*()\",t = \"()&*^%$#@!\") == True\n assert candidate(s = \"racecar\",t = \"kayyak\") == False\n assert candidate(s = \"!@#$%^&*()\",t = \")(*&^%$#@!\") == True\n assert candidate(s = \"sphinxofblackquartzjumps\",t = \"zpmxkbvhnckgyusldqpj\") == False\n assert candidate(s = \"1122334455\",t = \"1122334455\") == True\n assert candidate(s = \"ab\",t = \"zy\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"aaaaaa\",t = \"zzzzzz\") == True\n assert candidate(s = \"noon\",t = \"moon\") == False\n assert candidate(s = \"aaaaabbbbccccddddd\",t = \"bbbbbccccdddddfffff\") == False\n assert candidate(s = \"special$chars!@#\",t = \"normal%^&*()\") == False\n assert candidate(s = \"abcabcabcabc\",t = \"defdefdefdef\") == True\n assert candidate(s = \"mississippi\",t = \"bbnnnnoooppp\") == False\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 = \"mississippi\",t = \"eeffgghhiiii\") == False\n assert candidate(s = \"xyxxyxyxyx\",t = \"zvzvzvzvzv\") == False\n assert candidate(s = \"abacabadabacaba\",t = \"xyxzyxzyzxzyxzy\") == False\n assert candidate(s = \"aabbccddeeffgghhiijj\",t = \"zzxxccvvnnooppmmqqllkk\") == True\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 = \"aabbccddeeff\",t = \"zzxxyywwvvuutt\") == True\n assert candidate(s = \"elephant\",t = \"zuluqaak\") == False\n assert candidate(s = \"mississippi\",t = \"lllssssiiip\") == False\n assert candidate(s = \"thisproblemisfun\",t = \"thatquestionistame\") == False\n assert candidate(s = \"abcdefghij\",t = \"abcdefghij\") == True\n"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isIsomorphic", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isIsomorphic(string s, string t) {", "container": "Solution", "callable": "isIsomorphic", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 206, "task_id": "reverse-linked-list", "difficulty": "Easy", "problem_description": "Given the head of a singly linked list, reverse the list, and return the reversed list.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5]\nOutput: [5,4,3,2,1]\n\nExample 2:\n\n\nInput: head = [1,2]\nOutput: [2,1]\n\nExample 3:\n\nInput: head = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the list is the range [0, 5000].\n-5000 <= Node.val <= 5000\n\n \nFollow up: A linked list can be reversed either iteratively or recursively. Could you implement both?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([5000, -5000, 0, 1000, -1000])), list_node([-1000, 1000, 0, -5000, 5000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([5, 4, 3, 2, 1]))\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([1, 2])), list_node([2, 1]))\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5])), list_node([-5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([3])), list_node([3]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([-1000, 0, 1000])), list_node([1000, 0, -1000]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 5000, -5000])), list_node([-5000, 5000, -5000, 5000]))\n assert is_same_list(candidate(head = list_node([100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5])), list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21])), list_node([21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([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 is_same_list(candidate(head = list_node([-5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000])), list_node([5000, 4000, 3000, 2000, 1000, 0, -1000, -2000, -3000, -4000, -5000]))\n assert is_same_list(candidate(head = list_node([-5000, -2500, 0, 2500, 5000])), list_node([5000, 2500, 0, -2500, -5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25])), list_node([25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20])), list_node([-20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([-5000])), list_node([-5000]))\n assert is_same_list(candidate(head = list_node([5000, 2500, 0, -2500, -5000, 5000, 2500, 0, -2500, -5000])), list_node([-5000, -2500, 0, 2500, 5000, -5000, -2500, 0, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([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])), list_node([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]))\n assert is_same_list(candidate(head = list_node([0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39])), list_node([39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])), list_node([1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -5000, 5000, -5000, 5000])), list_node([5000, -5000, 5000, -5000, 5000, -5000]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, -2, 3, -4, 5, -6, 7, -8, 9, -10])), list_node([-10, 9, -8, 7, -6, 5, -4, 3, -2, 1]))\n assert is_same_list(candidate(head = list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10])), list_node([10, -10, 9, -9, 8, -8, 7, -7, 6, -6, 5, -5, 4, -4, 3, -3, 2, -2, 1, -1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991])), list_node([4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5])), list_node([-5, 5, -4, 4, -3, 3, -2, 2, -1, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000])), list_node([-5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21])), list_node([21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([5000])), list_node([5000]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([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])), list_node([49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([1000, 900, 800, 700, 600, 500, 400, 300, 200, 100])), list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]))\n assert is_same_list(candidate(head = list_node([5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100])), list_node([100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5]))\n assert is_same_list(candidate(head = list_node([1000, 2000, 3000, 4000, 5000, 4000, 3000, 2000, 1000])), list_node([1000, 2000, 3000, 4000, 5000, 4000, 3000, 2000, 1000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), list_node([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 is_same_list(candidate(head = list_node([-10, 9, -8, 7, -6, 5, -4, 3, -2, 1])), list_node([1, -2, 3, -4, 5, -6, 7, -8, 9, -10]))\n assert is_same_list(candidate(head = list_node([2, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 4])), list_node([4, 4, 4, 3, 3, 3, 1, 1, 1, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([-1])), list_node([-1]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1])), list_node([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]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40])), list_node([40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 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 is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15])), list_node([15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([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])), list_node([4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150])), list_node([150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]))\n assert is_same_list(candidate(head = list_node([1000, 2000, 3000, 4000, 5000, -1000, -2000, -3000, -4000, -5000])), list_node([-5000, -4000, -3000, -2000, -1000, 5000, 4000, 3000, 2000, 1000]))\n assert is_same_list(candidate(head = list_node([1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0])), list_node([0, 10, 0, 9, 0, 8, 0, 7, 0, 6, 0, 5, 0, 4, 0, 3, 0, 2, 0, 1]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500])), list_node([1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -4000, 4000, -3000, 3000, -2000, 2000, -1000, 1000])), list_node([1000, -1000, 2000, -2000, 3000, -3000, 4000, -4000, 5000, -5000]))\n assert is_same_list(candidate(head = list_node([0, 10, 0, 20, 0, 30, 0, 40, 0, 50, 0, 60, 0, 70, 0, 80, 0, 90, 0, 100, 0])), list_node([0, 100, 0, 90, 0, 80, 0, 70, 0, 60, 0, 50, 0, 40, 0, 30, 0, 20, 0, 10, 0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39])), list_node([39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5])), list_node([5, 5, 4, 4, 3, 3, 2, 2, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10])), list_node([10, 8, 6, 4, 2, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -4999, 4999, -4998, 4998, -4997, 4997, -4996, 4996])), list_node([4996, -4996, 4997, -4997, 4998, -4998, 4999, -4999, 5000, -5000]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 6, 5, 7, 9, 8, 10])), list_node([10, 8, 9, 7, 5, 6, 4, 2, 3, 1]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10])), list_node([-10, 10, -9, 9, -8, 8, -7, 7, -6, 6, -5, 5, -4, 4, -3, 3, -2, 2, -1, 1]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 2, 2, 1, 1])), list_node([1, 1, 2, 2, 3, 3, 2, 2, 1, 1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([5000, 4000, 3000, 2000, 1000, 0, -1000, -2000, -3000, -4000, -5000])), list_node([-5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 2, 1])), list_node([1, 2, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])), list_node([1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]))\n assert is_same_list(candidate(head = list_node([5, -5, 10, -10, 15, -15, 20, -20, 25, -25, 30, -30, 35, -35, 40, -40])), list_node([-40, 40, -35, 35, -30, 30, -25, 25, -20, 20, -15, 15, -10, 10, -5, 5]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000])), list_node([2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]))\n assert is_same_list(candidate(head = list_node([1000, -1000, 2000, -2000, 3000, -3000, 4000, -4000, 5000, -5000])), list_node([-5000, 5000, -4000, 4000, -3000, 3000, -2000, 2000, -1000, 1000]))\n assert is_same_list(candidate(head = list_node([5000, 2500, 0, -2500, -5000])), list_node([-5000, -2500, 0, 2500, 5000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([1000, 900, 800, 700, 600, 500, 400, 300, 200, 100])), list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5])), list_node([5, 5, 4, 4, 3, 3, 2, 2, 1, 1]))\n assert is_same_list(candidate(head = list_node([20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_list(candidate(head = list_node([500, 400, 300, 200, 100, 50, 25, 12, 6, 3, 1, 0, -1, -3, -6, -12, -25, -50, -100, -200, -300, -400, -500])), list_node([-500, -400, -300, -200, -100, -50, -25, -12, -6, -3, -1, 0, 1, 3, 6, 12, 25, 50, 100, 200, 300, 400, 500]))\n assert is_same_list(candidate(head = list_node([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1])), list_node([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]))\n assert is_same_list(candidate(head = list_node([49, 47, 45, 43, 41, 39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([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]))\n assert is_same_list(candidate(head = list_node([-5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000])), list_node([5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]))\n assert is_same_list(candidate(head = list_node([1, -1, 2, -2, 3, -3, 4, -4, 5, -5])), list_node([-5, 5, -4, 4, -3, 3, -2, 2, -1, 1]))\n assert is_same_list(candidate(head = list_node([21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 4, 3, 2, 1])), list_node([1, 2, 3, 4, 5, 4, 3, 2, 1]))\n assert is_same_list(candidate(head = list_node([5000, -5000, 4000, -4000, 3000, -3000, 2000, -2000, 1000, -1000, 0])), list_node([0, -1000, 1000, -2000, 2000, -3000, 3000, -4000, 4000, -5000, 5000]))\n assert is_same_list(candidate(head = list_node([5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5])), list_node([-5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5]))\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().reverseList", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* reverseList(ListNode* head) {", "container": "Solution", "callable": "reverseList", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "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] = [ai, bi] indicates that you must take course bi first if you want to take course ai.\n\nFor 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\n \nConstraints:\n\n1 <= numCourses <= 2000\n0 <= prerequisites.length <= 5000\nprerequisites[i].length == 2\n0 <= ai, bi < numCourses\nAll the pairs prerequisites[i] are unique.\n\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"}, "metadata": {"canonical_parameter_names": ["numCourses", "prerequisites"], "leetcode_dataset_entry_point": "Solution().canFinish", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canFinish(int numCourses, vector>& prerequisites) {", "container": "Solution", "callable": "canFinish", "parameters": [{"name": "numCourses", "type": "int"}, {"name": "prerequisites", "type": "vector>&"}], "return_type": "bool", "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\n \nConstraints:\n\n1 <= target <= 109\n1 <= nums.length <= 105\n1 <= nums[i] <= 104\n\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)).", "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 = 100000,nums = [10000, 20000, 30000, 40000, 1000, 2000, 3000, 4000, 5000, 1000, 2000, 3000, 4000, 5000, 1000, 2000, 3000, 4000, 5000, 1000, 2000, 3000, 4000, 5000, 1000, 2000, 3000, 4000, 5000]) == 4\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"}, "metadata": {"canonical_parameter_names": ["target", "nums"], "leetcode_dataset_entry_point": "Solution().minSubArrayLen", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minSubArrayLen(int target, vector& nums) {", "container": "Solution", "callable": "minSubArrayLen", "parameters": [{"name": "target", "type": "int"}, {"name": "nums", "type": "vector&"}], "return_type": "int", "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] = [ai, bi] indicates that you must take course bi first if you want to take course ai.\n\nFor 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\n \nConstraints:\n\n1 <= numCourses <= 2000\n0 <= prerequisites.length <= numCourses * (numCourses - 1)\nprerequisites[i].length == 2\n0 <= ai, bi < numCourses\nai != bi\nAll the pairs [ai, bi] are distinct.\n\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 = 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, 9], [18, 10], [17, 11], [16, 12], [15, 13], [14, 14], [13, 15], [12, 16], [11, 17], [10, 18], [9, 19], [8, 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], [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 = 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], [13, 7], [12, 8], [11, 9], [10, 10], [9, 11], [8, 12], [7, 13], [6, 14]]) == []\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"}, "metadata": {"canonical_parameter_names": ["numCourses", "prerequisites"], "leetcode_dataset_entry_point": "Solution().findOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findOrder(int numCourses, vector>& prerequisites) {", "container": "Solution", "callable": "findOrder", "parameters": [{"name": "numCourses", "type": "int"}, {"name": "prerequisites", "type": "vector>&"}], "return_type": "vector", "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.\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\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\n\nInput: board = [[\"a\",\"b\"],[\"c\",\"d\"]], words = [\"abcb\"]\nOutput: []\n\n \nConstraints:\n\nm == board.length\nn == board[i].length\n1 <= m, n <= 12\nboard[i][j] is a lowercase English letter.\n1 <= words.length <= 3 * 104\n1 <= words[i].length <= 10\nwords[i] consists of lowercase English letters.\nAll the strings of words are unique.\n\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', '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 = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaa']) == ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaa']\n assert candidate(board = [['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaaaaaaaa', 'aaaaaaaaaab', 'aaaaaaaaaac', 'aaaaaaaaaad']) == ['aaaaaaaaaa']\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 = [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p'], ['q', 'r', 's', 't']],words = ['abcdefghijlkmnoprst', 'bcegikmnort', 'afgknprt']) == []\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 = [['z', 'y', 'x'], ['w', 'v', 'u'], ['t', 's', 'r'], ['q', 'p', 'o'], ['n', 'm', 'l'], ['k', 'j', 'i'], ['h', 'g', 'f'], ['e', 'd', 'c'], ['b', 'a', 'a']],words = ['zyx', 'wvu', 'tsr', 'qpo', 'nml', 'kji', 'hgf', 'edc', 'baa', 'zyxwvutsrqponmlkjihgfedcba']) == ['zyx', 'wvu', 'tsr', 'qpo', 'nml', 'kji', 'hgf', 'edc', 'baa']\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', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p']],words = ['abcdefgh', 'ponmlkjihgfedcba', 'abcd', 'efgh', 'ijkl', 'mnop', 'mnopijkl']) == ['abcd', 'efgh', 'ijkl', 'mnop']\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 = ['abcdefghij', 'klmnopqrstu', 'vwxyz', 'zutrqponmlk', 'ytxwvusrqponmlkjihgfedcba']) == []\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']],words = ['aaaaaaaaaaaaa', 'aaaaaaaab']) == ['aaaaaaaaaaaaa']\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 = [['c', 'a', 't'], ['a', 't', 'c'], ['t', 'c', 'a']],words = ['cat', 'act', 'tat', 'tac', 'att', 'tat', 'cta']) == ['cat', 'tat', 'tac', 'cta', 'act']\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', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaa', 'aaa', 'aa', 'a', 'aaaaaaaaaaaaaaaa']) == ['a', 'aa', 'aaa', 'aaaa', 'aaaaaaaaaaaaaaaa']\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 = [['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z']],words = ['zzzzzzzzzz', 'zzzzzzzzzza', 'zzzzzzzzzzb', 'zzzzzzzzzzc']) == ['zzzzzzzzzz']\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 = [['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaaaaaaaaaaa', 'aaaabaaa', 'aaaaabaa']) == ['aaaaaaaaaaaaa']\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"}, "metadata": {"canonical_parameter_names": ["board", "words"], "leetcode_dataset_entry_point": "Solution().findWords", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findWords(vector>& board, vector& words) {", "container": "Solution", "callable": "findWords", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "words", "type": "vector&"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 100\n0 <= nums[i] <= 1000\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().rob", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int rob(vector& nums) {", "container": "Solution", "callable": "rob", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\nReturn the shortest palindrome you can find by performing this transformation.\n \nExample 1:\nInput: s = \"aacecaaa\"\nOutput: \"aaacecaaa\"\nExample 2:\nInput: s = \"abcd\"\nOutput: \"dcbabcd\"\n\n \nConstraints:\n\n0 <= s.length <= 5 * 104\ns consists of lowercase English letters only.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().shortestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string shortestPalindrome(string s) {", "container": "Solution", "callable": "shortestPalindrome", "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 kth largest element in the array.\nNote that it is the kth largest element in the sorted order, not the kth distinct element.\nCan you solve it without sorting?\n \nExample 1:\nInput: nums = [3,2,1,5,6,4], k = 2\nOutput: 5\nExample 2:\nInput: nums = [3,2,3,1,2,4,5,5,6], k = 4\nOutput: 4\n\n \nConstraints:\n\n1 <= k <= nums.length <= 105\n-104 <= nums[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().findKthLargest", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findKthLargest(vector& nums, int k) {", "container": "Solution", "callable": "findKthLargest", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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\nOnly numbers 1 through 9 are used.\nEach 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.\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\n \nConstraints:\n\n2 <= k <= 9\n1 <= n <= 60\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(k = 7,n = 28) == [[1, 2, 3, 4, 5, 6, 7]]\n assert 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 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 candidate(k = 7,n = 56) == []\n assert candidate(k = 4,n = 1) == []\n assert candidate(k = 2,n = 15) == [[6, 9], [7, 8]]\n assert candidate(k = 9,n = 45) == [[1, 2, 3, 4, 5, 6, 7, 8, 9]]\n assert candidate(k = 8,n = 84) == []\n assert 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 candidate(k = 3,n = 9) == [[1, 2, 6], [1, 3, 5], [2, 3, 4]]\n assert candidate(k = 7,n = 63) == []\n assert candidate(k = 4,n = 28) == [[4, 7, 8, 9], [5, 6, 8, 9]]\n assert candidate(k = 3,n = 7) == [[1, 2, 4]]\n assert candidate(k = 3,n = 23) == [[6, 8, 9]]\n assert candidate(k = 8,n = 36) == [[1, 2, 3, 4, 5, 6, 7, 8]]\n assert candidate(k = 6,n = 45) == []\n assert candidate(k = 2,n = 18) == []\n assert candidate(k = 5,n = 15) == [[1, 2, 3, 4, 5]]\n assert candidate(k = 8,n = 60) == []\n assert candidate(k = 2,n = 5) == [[1, 4], [2, 3]]\n assert candidate(k = 9,n = 90) == []\n assert 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 candidate(k = 8,n = 72) == []\n assert candidate(k = 3,n = 20) == [[3, 8, 9], [4, 7, 9], [5, 6, 9], [5, 7, 8]]\n assert 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 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 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 candidate(k = 7,n = 21) == []\n assert candidate(k = 7,n = 40) == [[1, 4, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 9]]\n assert 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 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 candidate(k = 5,n = 33) == [[3, 6, 7, 8, 9], [4, 5, 7, 8, 9]]\n assert 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 candidate(k = 7,n = 29) == [[1, 2, 3, 4, 5, 6, 8]]\n assert candidate(k = 6,n = 42) == []\n assert candidate(k = 5,n = 18) == [[1, 2, 3, 4, 8], [1, 2, 3, 5, 7], [1, 2, 4, 5, 6]]\n assert 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 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 candidate(k = 7,n = 42) == [[3, 4, 5, 6, 7, 8, 9]]\n assert candidate(k = 4,n = 10) == [[1, 2, 3, 4]]\n assert candidate(k = 5,n = 17) == [[1, 2, 3, 4, 7], [1, 2, 3, 5, 6]]\n assert candidate(k = 3,n = 10) == [[1, 2, 7], [1, 3, 6], [1, 4, 5], [2, 3, 5]]\n assert 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 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 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 candidate(k = 5,n = 10) == []\n assert candidate(k = 6,n = 39) == [[4, 5, 6, 7, 8, 9]]\n assert candidate(k = 4,n = 30) == [[6, 7, 8, 9]]\n assert 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 candidate(k = 6,n = 40) == []\n assert 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 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 candidate(k = 8,n = 81) == []\n assert candidate(k = 5,n = 35) == [[5, 6, 7, 8, 9]]\n assert candidate(k = 2,n = 16) == [[7, 9]]\n assert candidate(k = 6,n = 55) == []\n assert candidate(k = 8,n = 30) == []\n assert candidate(k = 6,n = 18) == []\n assert 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 candidate(k = 4,n = 12) == [[1, 2, 3, 6], [1, 2, 4, 5]]\n assert candidate(k = 7,n = 49) == []\n assert candidate(k = 7,n = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8]]\n"}, "metadata": {"canonical_parameter_names": ["k", "n"], "leetcode_dataset_entry_point": "Solution().combinationSum3", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> combinationSum3(int k, int n) {", "container": "Solution", "callable": "combinationSum3", "parameters": [{"name": "k", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "vector>", "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\n \nConstraints:\n\n1 <= nums.length <= 105\n-109 <= nums[i] <= 109\n\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 = [-2147483648, -2147483647, 2147483647, 2147483646, 0, 0, 1, -1, 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, 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 = [1000000000, -1000000000, 2000000000, -2000000000, 1000000000]) == 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 = [-2147483648, 2147483647, 0, -1, 1, -2147483648]) == 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().containsDuplicate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool containsDuplicate(vector& nums) {", "container": "Solution", "callable": "containsDuplicate", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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.\nThe geometric information of each building is given in the array buildings where buildings[i] = [lefti, righti, heighti]:\n\nlefti is the x coordinate of the left edge of the ith building.\nrighti is the x coordinate of the right edge of the ith building.\nheighti is the height of the ith building.\n\nYou may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.\nThe skyline should be represented as a list of \"key points\" sorted by their x-coordinate in the form [[x1,y1],[x2,y2],...]. 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.\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\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\n \nConstraints:\n\n1 <= buildings.length <= 104\n0 <= lefti < righti <= 231 - 1\n1 <= heighti <= 231 - 1\nbuildings is sorted by lefti in non-decreasing order.\n\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, 10, 10], [2, 9, 9], [3, 8, 8], [4, 7, 7], [5, 6, 6], [6, 5, 5], [7, 4, 4], [8, 3, 3], [9, 2, 2], [10, 1, 1]]) == [[1, 10], [10, 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, 100, 10], [10, 90, 15], [20, 80, 12], [30, 70, 14], [40, 60, 10], [50, 50, 20], [60, 40, 15], [70, 30, 10]]) == [[1, 10], [10, 15], [90, 10], [100, 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, 100, 1], [10, 90, 2], [20, 80, 3], [30, 70, 4], [40, 60, 5], [50, 50, 6], [60, 40, 7], [70, 30, 8], [80, 20, 9], [90, 10, 10]]) == [[1, 1], [10, 2], [20, 3], [30, 4], [40, 5], [60, 4], [70, 3], [80, 2], [90, 1], [100, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 9, 15], [3, 8, 12], [4, 7, 14], [5, 6, 10], [6, 5, 15], [7, 4, 10]]) == [[1, 10], [2, 15], [9, 10], [10, 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, 100, 100], [10, 90, 90], [20, 80, 80], [30, 70, 70], [40, 60, 60], [50, 50, 50], [60, 40, 40], [70, 30, 30], [80, 20, 20], [90, 10, 10]]) == [[1, 100], [100, 0]]\n assert candidate(buildings = [[1, 10, 5], [2, 8, 4], [3, 7, 3], [4, 6, 2], [5, 5, 1]]) == [[1, 5], [10, 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, 2000000000, 1000000000], [200000000, 300000000, 2000000000], [500000000, 800000000, 1200000000], [600000000, 1200000000, 1400000000], [1500000000, 2000000000, 1000000000], [1900000000, 2400000000, 800000000]]) == [[1, 1000000000], [200000000, 2000000000], [300000000, 1000000000], [500000000, 1200000000], [600000000, 1400000000], [1200000000, 1000000000], [2000000000, 800000000], [2400000000, 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, 50, 10], [5, 45, 20], [10, 40, 30], [15, 35, 40], [20, 30, 50], [25, 25, 60], [30, 20, 50], [35, 15, 40], [40, 10, 30], [45, 5, 20], [50, 1, 10]]) == [[1, 10], [5, 20], [10, 30], [15, 40], [20, 50], [30, 40], [35, 30], [40, 20], [45, 10], [50, 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, 10, 100], [2, 9, 90], [3, 8, 80], [4, 7, 70], [5, 6, 60], [6, 5, 50], [7, 4, 40], [8, 3, 30], [9, 2, 20], [10, 1, 10]]) == [[1, 100], [10, 0]]\n assert candidate(buildings = [[1, 5, 10], [1, 5, 15], [1, 5, 20], [2, 4, 25], [2, 4, 30], [2, 4, 35], [3, 3, 40], [3, 3, 45], [3, 3, 50], [4, 2, 55], [4, 2, 60]]) == [[1, 20], [2, 35], [4, 20], [5, 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, 5, 10], [1, 5, 20], [1, 5, 30], [2, 4, 40], [2, 4, 50], [3, 3, 60]]) == [[1, 30], [2, 50], [4, 30], [5, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 9, 15], [3, 8, 20], [4, 7, 25], [5, 6, 30], [6, 5, 25], [7, 4, 20], [8, 3, 15], [9, 2, 10]]) == [[1, 10], [2, 15], [3, 20], [4, 25], [5, 30], [6, 25], [7, 20], [8, 15], [9, 10], [10, 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, 5, 5], [1, 5, 3], [1, 5, 10], [2, 4, 15], [2, 4, 20], [2, 4, 5], [3, 3, 25]]) == [[1, 10], [2, 20], [4, 10], [5, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 9, 20], [3, 8, 30], [4, 7, 40], [5, 6, 50], [6, 5, 60]]) == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 40], [7, 30], [8, 20], [9, 10], [10, 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, 10, 100], [2, 9, 150], [3, 8, 200], [4, 7, 250], [5, 6, 300], [6, 5, 350], [7, 4, 400], [8, 3, 450], [9, 2, 500], [10, 1, 550]]) == [[1, 100], [2, 150], [3, 200], [4, 250], [5, 300], [6, 250], [7, 200], [8, 150], [9, 100], [10, 0]]\n assert candidate(buildings = [[1, 5, 10], [2, 4, 20], [3, 3, 30], [4, 5, 40], [5, 6, 50], [6, 7, 60], [7, 8, 70], [8, 9, 80], [9, 10, 90], [10, 11, 100]]) == [[1, 10], [2, 20], [4, 40], [5, 50], [6, 60], [7, 70], [8, 80], [9, 90], [10, 100], [11, 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, 300], [2, 4, 200], [4, 5, 100], [5, 7, 50], [7, 9, 25], [9, 10, 10], [10, 12, 5], [12, 14, 3], [14, 16, 2], [16, 18, 1], [18, 20, 0]]) == [[1, 300], [2, 200], [4, 100], [5, 50], [7, 25], [9, 10], [10, 5], [12, 3], [14, 2], [16, 1], [18, 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, 4, 100], [2, 6, 200], [3, 9, 150], [4, 12, 100], [5, 14, 50], [6, 16, 25], [7, 18, 10], [8, 20, 5], [9, 22, 3], [10, 24, 2], [11, 26, 1], [12, 28, 0]]) == [[1, 100], [2, 200], [6, 150], [9, 100], [12, 50], [14, 25], [16, 10], [18, 5], [20, 3], [22, 2], [24, 1], [26, 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, 15, 10], [2, 14, 20], [3, 13, 30], [4, 12, 40], [5, 11, 50], [6, 10, 60], [7, 9, 70], [8, 8, 80]]) == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60], [7, 70], [9, 60], [10, 50], [11, 40], [12, 30], [13, 20], [14, 10], [15, 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"}, "metadata": {"canonical_parameter_names": ["buildings"], "leetcode_dataset_entry_point": "Solution().getSkyline", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> getSkyline(vector>& buildings) {", "container": "Solution", "callable": "getSkyline", "parameters": [{"name": "buildings", "type": "vector>&"}], "return_type": "vector>", "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\n \nConstraints:\n\n1 <= nums.length <= 105\n-109 <= nums[i] <= 109\n0 <= k <= 105\n\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 = [-1000000000, -2000000000, -1000000000, -3000000000, -2000000000],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 = 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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006, 1000000007, 1000000008, 1000000009, 1000000000],k = 10) == True\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 = [1000000000, 2000000000, 1000000000, 3000000000, 2000000000],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 = 20) == True\n assert candidate(nums = [1000000000, 2000000000, 1000000000],k = 2) == 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 = [1000000000, 1000000001, 1000000000, 1000000001, 1000000000],k = 2) == True\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().containsNearbyDuplicate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool containsNearbyDuplicate(vector& nums, int k) {", "container": "Solution", "callable": "containsNearbyDuplicate", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "bool", "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.\nFind a pair of indices (i, j) such that:\n\ni != j,\nabs(i - j) <= indexDiff.\nabs(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\n \nConstraints:\n\n2 <= nums.length <= 105\n-109 <= nums[i] <= 109\n1 <= indexDiff <= nums.length\n0 <= valueDiff <= 109\n\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 = [2147483647, -2147483647],indexDiff = 1,valueDiff = 2147483647) == False\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 = [-1, 2147483647],indexDiff = 1,valueDiff = 2147483647) == False\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 = [-1000000000, 1000000000, -999999999, 999999999, -1000000001, 1000000001],indexDiff = 5,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 = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 3,valueDiff = 2000000000) == 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 = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 3,valueDiff = 2000000000) == 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 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],indexDiff = 10000,valueDiff = 0) == 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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004],indexDiff = 3,valueDiff = 1) == True\n assert candidate(nums = [0, 1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000],indexDiff = 10,valueDiff = 1000000000) == 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 = [1000000000, 999999999, 1000000001, 999999998, 1000000002],indexDiff = 4,valueDiff = 2) == 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 = [-1000000000, 1000000000, -1000000000, 1000000000, 0],indexDiff = 4,valueDiff = 2000000000) == 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, 1000000000, 2, 1000000001, 3, 1000000002, 4, 1000000003],indexDiff = 7,valueDiff = 999999999) == 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 = [2147483647, -2147483648, 2147483646, -2147483647],indexDiff = 2,valueDiff = 1) == 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, 1000000000, -1000000000, 2, 1000000000, -1000000000],indexDiff = 5,valueDiff = 1999999999) == 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, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 100,valueDiff = 0) == 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, 2147483647, -2147483648, 2147483647, -1, 2147483647, -2147483648, 2147483647, -1, 2147483647],indexDiff = 3,valueDiff = 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, 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 = [2147483647, -1, 2147483647, -1],indexDiff = 1,valueDiff = 2147483647) == False\n assert candidate(nums = [1],indexDiff = 1,valueDiff = 1) == False\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 = [2147483647, -2147483647],indexDiff = 1,valueDiff = 4294967294) == True\n assert candidate(nums = [0, 1, 1, 1],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 2,valueDiff = 1999999999) == 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 = [2147483647, -2147483648, 2147483647, -2147483648],indexDiff = 1,valueDiff = 4294967295) == 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 = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 2,valueDiff = 1999999999) == True\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 = [2147483647, -2147483648, 2147483647, -2147483648],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [0, 2147483647],indexDiff = 1,valueDiff = 2147483647) == 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],indexDiff = 0,valueDiff = 1) == False\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 = [-1, 2147483647, -1, 2147483647],indexDiff = 1,valueDiff = 2147483647) == False\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 = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 2,valueDiff = 2000000000) == True\n assert candidate(nums = [1000000000, 1000000000],indexDiff = 0,valueDiff = 0) == False\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 = [-1, 2147483647],indexDiff = 1,valueDiff = 2147483647) == 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"}, "metadata": {"canonical_parameter_names": ["nums", "indexDiff", "valueDiff"], "leetcode_dataset_entry_point": "Solution().containsNearbyAlmostDuplicate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool containsNearbyAlmostDuplicate(vector& nums, int indexDiff, int valueDiff) {", "container": "Solution", "callable": "containsNearbyAlmostDuplicate", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "indexDiff", "type": "int"}, {"name": "valueDiff", "type": "int"}], "return_type": "bool", "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\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\n\nInput: matrix = [[\"0\",\"1\"],[\"1\",\"0\"]]\nOutput: 1\n\nExample 3:\n\nInput: matrix = [[\"0\"]]\nOutput: 0\n\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= m, n <= 300\nmatrix[i][j] is '0' or '1'.\n\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"}, "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().maximalSquare", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maximalSquare(vector>& matrix) {", "container": "Solution", "callable": "maximalSquare", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 222, "task_id": "count-complete-tree-nodes", "difficulty": "Easy", "problem_description": "Given the root of a complete binary tree, return the number of the nodes in the tree.\nAccording to Wikipedia, every level, except possibly the last, is completely filled in a complete binary tree, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive at the last level h.\nDesign an algorithm that runs in less than O(n) time complexity.\n \nExample 1:\n\n\nInput: root = [1,2,3,4,5,6]\nOutput: 6\n\nExample 2:\n\nInput: root = []\nOutput: 0\n\nExample 3:\n\nInput: root = [1]\nOutput: 1\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 5 * 104].\n0 <= Node.val <= 5 * 104\nThe tree is guaranteed to be complete.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == 7\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 15\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7])) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6])) == 6\n assert candidate(root = tree_node([1])) == 1\n assert candidate(root = tree_node([])) == 0\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 16, 17])) == 15\n assert candidate(root = tree_node([1, 2, 3, None, None, 6, 7])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 16, 17, None, None, 19, 20, 21, 22, None, None, None, None, 23, 24, 25, 26, None, None, 27, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 28])) == 25\n assert candidate(root = tree_node([1, 2, 3, 4])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 34\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 32\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 48\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 64\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 33\n assert candidate(root = tree_node([1, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13])) == 13\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27])) == 27\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 38\n assert candidate(root = tree_node([1, 2])) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8])) == 8\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 16, None, 18])) == 15\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])) == 11\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 7, 8, 9, 10, 11, 12, 13, 14, None])) == 13\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28])) == 28\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 40\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])) == 10\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])) == 17\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 16, 17, None, None, 19, 20, 21, 22, None, None, 23, 24])) == 21\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 37\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 35\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 8, 9, 10, 11])) == 9\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18])) == 18\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])) == 23\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])) == 19\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 39\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == 14\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 63\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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, None, None, None, None, 35])) == 32\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == 15\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 7\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])) == 16\n assert candidate(root = tree_node([1, 2, 3])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 36\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 20\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24])) == 24\n assert candidate(root = tree_node([1, 2, 3, 4, 5])) == 5\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, 7])) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, 16, 17, None, None, 19, 20, None, None, None, None, 21])) == 18\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])) == 12\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])) == 21\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22])) == 22\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26])) == 26\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29])) == 29\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9])) == 9\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().countNodes", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countNodes(TreeNode* root) {", "container": "Solution", "callable": "countNodes", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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.\nThe first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2).\nThe second rectangle is defined by its bottom-left corner (bx1, by1) and its top-right corner (bx2, by2).\n \nExample 1:\n\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\n \nConstraints:\n\n-104 <= ax1 <= ax2 <= 104\n-104 <= ay1 <= ay2 <= 104\n-104 <= bx1 <= bx2 <= 104\n-104 <= by1 <= by2 <= 104\n\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 = 10000,ay2 = 10000,bx1 = 5000,by1 = 5000,bx2 = 15000,by2 = 15000) == 175000000\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 = -10000,ay1 = -10000,ax2 = 10000,ay2 = 10000,bx1 = 5000,by1 = 5000,bx2 = 15000,by2 = 15000) == 475000000\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"}, "metadata": {"canonical_parameter_names": ["ax1", "ay1", "ax2", "ay2", "bx1", "by1", "bx2", "by2"], "leetcode_dataset_entry_point": "Solution().computeArea", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {", "container": "Solution", "callable": "computeArea", "parameters": [{"name": "ax1", "type": "int"}, {"name": "ay1", "type": "int"}, {"name": "ax2", "type": "int"}, {"name": "ay2", "type": "int"}, {"name": "bx1", "type": "int"}, {"name": "by1", "type": "int"}, {"name": "bx2", "type": "int"}, {"name": "by2", "type": "int"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= s.length <= 3 * 105\ns consists of digits, '+', '-', '(', ')', and ' '.\ns 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).\nThere will be no two consecutive operators in the input.\nEvery number and running calculation will fit in a signed 32-bit integer.\n\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 = \"100 * 2 + 12\") == 114\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 + 2 * 6\") == 18\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 = \"100 * ( 2 + 12 )\") == 114\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 = \"(1 + ((2 + 3) * (4 / 2)))\") == 12\n assert candidate(s = \"(100 - (50 + (25 - (12 + (6 - (3 + (1 - 1)))))))\") == 40\n assert candidate(s = \"100 / ((5 + (5 - (5 + (5 - 5)))) * 2)\") == 103\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 = \"5 + (8 * 3 + 9 + (3 * 5))\") == 33\n assert candidate(s = \"((10 + 20) * (30 / 5)) - (40 + (50 - 60))\") == 35\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 = \"100 - (50 + ((25 * 2) - (10 + 5)))\") == 38\n assert candidate(s = \"(3 + (2 * 2) - (1 + 3) + (4 - (5 + 6)))\") == -4\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 / 5) + 5 * (6 + 7 * (8 + 9))\") == 140\n assert candidate(s = \"(10 + 20) - (30 - 40) + (50 * 60) / (70 - 80)\") == 140\n assert candidate(s = \"123 + (456 - 789) * (10 - 5)\") == -215\n assert candidate(s = \"3 * (5 + 2 * (2 + 3)) + 4 * (2 + (3 - 1))\") == 23\n assert candidate(s = \"((5 - 3) * (6 + 2) - (4 + 1) * (3 - 8)) + 10\") == -6\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 = \"((1 + 2) * (3 - 4) + (5 * 6) - 7)\") == 6\n assert candidate(s = \"1 + (2 * (2 + 2) - (3 - 4) * (3 + (2 - 1)))\") == 4\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 = \"(9 - (8 + 7 - (6 + 5 - 4))) * (3 + (2 - (1 + 0 - (-1))))\") == -2\n assert candidate(s = \"100 - (25 + 3 * (4 + 5))\") == 63\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 = \"5 + 3 * (10 - 2) / 4 - 1\") == 11\n assert candidate(s = \"1 + 2 * (3 + (4 * (5 + (6 * (7 + 8)))))\") == 36\n assert candidate(s = \"(9 + (8 - (7 + (6 - (5 + (4 - (3 + (2 - 1))))))))\") == 9\n assert candidate(s = \"( 1 + 2 ) * ( 3 + 4 ) - ( 5 + 6 ) * ( 7 + 8 )\") == 14\n assert candidate(s = \"(100 - 50) + ((25 * 2) - (10 + 5))\") == 62\n assert candidate(s = \"10 - (20 - (30 - (40 - 50)))\") == 30\n assert candidate(s = \"5 + ((1 + (2 * 2) + (3 * (4 + 5))) * 6)\") == 28\n assert candidate(s = \"(((((1 + 2) * 3) + 4) - 5) * 6) - 7\") == -8\n assert candidate(s = \"((2 + 3) * (5 - 1) + 7)\") == 16\n assert candidate(s = \"((10 + 2) - (5 + 3) * (2 - 8)) + 4\") == 2\n assert candidate(s = \"((1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + (9 + 0)))))))))\") == 45\n assert candidate(s = \"(((10 - 2) * 3) / 2) + (((4 + 5) * 6) / 3)\") == 21\n assert candidate(s = \"(1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + 9))))))))\") == 9\n assert candidate(s = \"(1 + (2 * (2 + 3) - 4) + 5)\") == 9\n assert candidate(s = \"((1 + 2) * (3 + 4) - 5) * 2\") == 3\n assert candidate(s = \"((10 + 20) - (30 + 40)) + (50 + (60 - (70 + (80 - (90 + (100 - (110 + (120 - 130))))))))\") == 10\n assert candidate(s = \"((1 + 2) * (3 + 4)) - ((5 + 6) * (7 + 8))\") == -16\n assert candidate(s = \"(2 + 6 * (25 - (3 + 3) * 2 ) ) + 5\") == 34\n assert candidate(s = \"(1 + (4 + (5 + (2 - 3)) - 3)) + (6 + 8)\") == 20\n assert candidate(s = \"((22 + (2 * (3 + 5))) - (7 + 3))\") == 22\n assert candidate(s = \"(1 + (2 - 3) * (4 + 5) - 6)\") == -15\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)\") == 33\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 = \"30 - (10 + 20) + (5 * (2 + 3))\") == 10\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) * (6 - (7 + 8)))\") == -2\n assert candidate(s = \"3 * (2 + (1 - 5) * (3 + 7)) - 2\") == -11\n assert candidate(s = \"( ( 1 + 2 ) * ( 3 + 4 ) ) - ( ( 5 + 6 ) * ( 7 + 8 ) )\") == -16\n assert candidate(s = \"(3 * (4 - (5 + 2)) / (1 - 2))\") == -1\n assert candidate(s = \"((((-1 + 2) - 3) + 4) - 5)\") == -3\n assert candidate(s = \"(12 - (4 + 3) * (2 - 1)) + 7\") == 13\n assert candidate(s = \"( 123 + ( 456 - ( 789 + ( 12 - 34 ) ) ) )\") == -188\n assert candidate(s = \"10 + 20 * (30 - 20 / 2) + 5\") == 43\n assert candidate(s = \"((2 + 3) * (4 + 5) - 6) + 7 * (8 - 9)\") == 14\n assert candidate(s = \"(1 + (2 * (2 + 3)) - (4 * (5 - 6))) + (7 * (8 - (9 + 1)))\") == 10\n assert candidate(s = \"(((1 + 2) * 3) + ((4 + 5) * 6) + ((7 + 8) * 9))\") == 45\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 = \"10 - 2 * (6 / (3 + 1))\") == -2\n assert candidate(s = \"(10 + 2) * 6 - (3 + (4 - 5))\") == 16\n assert candidate(s = \"100 + ( 50 - ( 25 * ( 4 + 1 ) ) ) + ( 10 - ( 2 * 3 ) )\") == 125\n assert candidate(s = \"((2 + 3) * (4 + 5)) - (6 * (7 + 8))\") == -7\n assert candidate(s = \"100 - ((99 - (98 - (97 - (96 - (95 - (94 - (93 - (92 - (91 - 90)))))))))\") == 5\n assert candidate(s = \"((3 + 5) - (2 * (8 / 4)) + 1)\") == -5\n assert candidate(s = \"(123 - (456 + 789) + (101 - 202))\") == -1223\n assert candidate(s = \"100 - ( 3 * ( 2 + 4 ) ) + 5\") == 96\n assert candidate(s = \"-1 + (-2 + (-3 * (-4 - (-5))))\") == -7\n assert candidate(s = \"- ( 2 + 3 ) + ( 4 - 5 )\") == -6\n assert candidate(s = \"(100 - (50 + (25 - (10 + (5 - 2)))))\") == 38\n assert candidate(s = \"(10 + 2 * 6) / ((5 - 3) * 2)\") == 18\n assert candidate(s = \"10 + (2 * (6 / 3))\") == 21\n assert candidate(s = \"5 * (3 + (2 * (2 + (1 + (0 - (-1))))))\") == 14\n assert candidate(s = \"1 - (2 + 3) * (4 - 5) + (6 / 3)\") == 4\n assert candidate(s = \"1 - (2 + (3 * (4 + (5 * (6 + (7 * (8 + (9 * (10 + 11)))))))))\") == -64\n assert candidate(s = \"(100 - 50) - ((25 * 2) - (10 + 5))\") == 38\n assert candidate(s = \"1 + (2 + (3 + (4 + (5 + 6))))\") == 21\n assert candidate(s = \"((22 + (2 * 3)) * (4 + 3))\") == 34\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 = \"100 - (25 * (2 + 3))\") == 70\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 = \"100 + (200 * (300 + 400) - 500)\") == 500\n assert candidate(s = \"1 - (-2 - (-3 - (-4)))\") == 4\n assert candidate(s = \"10 + 20 - 30 + (40 - 50)\") == -10\n assert candidate(s = \"((1 + 2) * (3 - 4)) + (5 + 6)\") == 13\n assert candidate(s = \"12 - (4 * (2 + 3)) + 15\") == 18\n assert candidate(s = \"3 + 5 / 2\") == 10\n assert candidate(s = \"1 + (2 * (2 + 2) - (3 - 4) * 3)\") == 5\n assert candidate(s = \"(5 + 3) * (7 - (2 + 3))\") == 10\n assert candidate(s = \"10 + 2 * (6 / (3 + 1)) - (8 - 4) * (2 + 1)\") == 15\n assert candidate(s = \"2 * ((3 + 4) * (5 - 6) + 7) - 8\") == 7\n assert candidate(s = \"(1 + (2 * (2 + (3 * (4 + (5 * (6 + 7)))))))\") == 30\n assert candidate(s = \"123 + (456 - (789 + (101 - 202) ) )\") == -109\n assert candidate(s = \"3 + (2 * (2 + (2 * (2 + (2 * 2)))))\") == 15\n assert candidate(s = \"-1 + (-2 + (-3 + (-4 + (-5))))\") == -15\n assert candidate(s = \"(((1 + 2) * (3 + 4)) - 5) * (6 + 7)\") == -8\n assert candidate(s = \"(3 + (2 * (2 + 1)))\") == 8\n assert candidate(s = \"20 * ((1 + 2) * (3 + 4) - (5 * 6)) / 10\") == 29\n assert candidate(s = \"((100 - (50 + (25 - (10 + (5 - (2 + (1 - 0))))))) + (10 - 5))\") == 42\n assert candidate(s = \"(5 - 3) * (10 - (4 + 2) * (3 - 1))\") == -4\n assert candidate(s = \"(1 + 2) * 3 - 4 * (5 + 6)\") == -9\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 = \"(3 - 4) * (5 - (6 - (7 - (8 - (9 - 10)))))\") == 2\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))\") == -11\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 - 9)))))))\") == 1\n assert candidate(s = \"(3 * (5 - (2 + 1)) + 4) - (6 * (8 - (7 + 1)))\") == 3\n assert candidate(s = \"((1 + 2) * (3 + 4) - (5 + 6)) * (7 + 8) - (9 + 10)\") == -5\n assert candidate(s = \"(1 + 2) * (3 - 4) * (5 + 6) * (7 - 8)\") == -10\n assert candidate(s = \"1 + 2 - 3 * (4 - 5) / (6 - 7) + 8\") == 10\n assert candidate(s = \"(1 + (2 * 3)) - (4 + (5 * 6))\") == -9\n assert candidate(s = \"(((3 + 2) * (4 + 5)) - (6 + (7 * 8) - 9)) + 10\") == 12\n assert candidate(s = \"(100 - (50 + 25 - (10 * 2 + 5)) + 15)\") == 57\n assert candidate(s = \"1000 + (2000 - (3000 - (4000 - (5000 - (6000 - (7000 - 8000))))))\") == 6000\n assert candidate(s = \"( ( ( 1 + 2 ) * 3 ) - ( 4 + 5 ) )\") == -3\n assert candidate(s = \"(1 + (2 * (3 + (4 * (5 + 6))))) - (7 + (8 * (9 + 10)))\") == -13\n assert candidate(s = \"((1 + 2) * (3 + 4) - (5 * 6))\") == -1\n assert candidate(s = \"(10 - 5) + (3 * 2) + (8 / 4)\") == 22\n assert candidate(s = \"3 + 5 * ( 2 - 8 )\") == 2\n assert candidate(s = \"(3 - (5 - (7 - (9 - (11 - (13 - (15 - 17))))))\") == -8\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().calculate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int calculate(string s) {", "container": "Solution", "callable": "calculate", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 226, "task_id": "invert-binary-tree", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, invert the tree, and return its root.\n \nExample 1:\n\n\nInput: root = [4,2,7,1,3,6,9]\nOutput: [4,7,2,9,6,3,1]\n\nExample 2:\n\n\nInput: root = [2,1,3]\nOutput: [2,3,1]\n\nExample 3:\n\nInput: root = []\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 100].\n-100 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 6, 9])), tree_node([4, 7, 2, 9, 6, 3, 1]))\n assert is_same_tree(candidate(root = tree_node([2, 1, 3])), tree_node([2, 3, 1]))\n assert candidate(root = tree_node([])) == None\n assert is_same_tree(candidate(root = tree_node([3, 1, 4, None, 2])), tree_node([3, 4, 1, None, None, 2]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])), tree_node([1, 2, None, 3, None, 4, None, 5]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, None, 7, 8, None, 10, 11, 12])), tree_node([1, 3, 2, 7, None, 5, 4, None, 12, 11, 10, None, 8]))\n assert is_same_tree(candidate(root = tree_node([50, 20, 70, 10, 30, 60, 80, 5, 15, 25, 35, 55, 65, 75, 85])), tree_node([50, 70, 20, 80, 60, 30, 10, 85, 75, 65, 55, 35, 25, 15, 5]))\n assert is_same_tree(candidate(root = tree_node([3, 1, 4, 3, None, 1, 5])), tree_node([3, 4, 1, 5, 1, None, 3]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])), tree_node([1, 2, None, 3, None, 4, None, 5, None, 6]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 9, 3, 7, 12, 15, 1, 4, 6, 10, 13, 17])), tree_node([8, 9, 5, 15, 12, 7, 3, None, None, 17, 13, 10, 6, 4, 1]))\n assert is_same_tree(candidate(root = tree_node([5, 15, 1, None, 30, 20, None])), tree_node([5, 1, 15, None, 20, 30]))\n assert is_same_tree(candidate(root = tree_node([8, 15, 3, 7, 19, 1, 2])), tree_node([8, 3, 15, 2, 1, 19, 7]))\n assert is_same_tree(candidate(root = tree_node([6, 3, 8, 1, 4, 7, 9, None, None, 2, 5])), tree_node([6, 8, 3, 9, 7, 4, 1, None, None, None, None, 5, 2]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37])), tree_node([20, 30, 10, 35, 25, 15, 5, 37, 33, 27, 23, 17, 13, 7, 3]))\n assert is_same_tree(candidate(root = tree_node([1, 2])), tree_node([1, None, 2]))\n assert is_same_tree(candidate(root = tree_node([10, None, 20, None, 30, None, 40])), tree_node([10, 20, None, 30, None, 40]))\n assert is_same_tree(candidate(root = tree_node([3, 9, 20, None, None, 15, 7])), tree_node([3, 20, 9, 7, 15]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, 5, 9, 20, None, None, None, 6, None, 18])), tree_node([7, 15, 3, 20, 9, 5, 1, None, None, 18, None, 6]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, None, None, 6, 20])), tree_node([10, 15, 5, 20, 6]))\n assert is_same_tree(candidate(root = tree_node([1, 3, 2, 5, 4])), tree_node([1, 2, 3, None, None, 4, 5]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 9, 2, 7, None, None, None, 3, None, 4])), tree_node([8, 9, 5, None, None, 7, 2, 4, None, 3]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, None, 4, None, 5])), tree_node([1, 3, 2, 5, None, 4]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19, 20])), tree_node([1, 3, 2, 7, 6, 5, 4, 15, 14, 13, 12, 11, 10, 9, 8, None, None, None, None, None, None, None, None, None, 20, 19, 18, 17, 16]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])), tree_node([10, 15, 5, 18, None, 7, 3]))\n assert is_same_tree(candidate(root = tree_node([-10, -5, -15, -3, -8, None, -20])), tree_node([-10, -15, -5, -20, None, -8, -3]))\n assert is_same_tree(candidate(root = tree_node([1, 3, 2, None, 6, 5, 4, None, None, None, None, None, 7])), tree_node([1, 2, 3, 4, 5, 6, None, 7]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1])), tree_node([5, 7, 3, 8, 6, 4, 2, None, None, None, None, None, None, None, 1]))\n assert is_same_tree(candidate(root = tree_node([100, -50, -20, -60, -80, -30, -10])), tree_node([100, -20, -50, -10, -30, -80, -60]))\n assert is_same_tree(candidate(root = tree_node([5, 1, 8, None, None, 6, 9])), tree_node([5, 8, 1, 9, 6]))\n assert is_same_tree(candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7])), tree_node([-1, -3, -2, -7, -6, -5, -4]))\n assert is_same_tree(candidate(root = tree_node([7, -3, 9, -5, -4, 8, -10, None, None, None, -9, -8, -6])), tree_node([7, 9, -3, -10, 8, -4, -5, None, None, -6, -8, -9]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 8, None, 9, None, 10])), tree_node([1, 3, 2, 5, None, None, 4, None, 8, None, 6, None, 10, None, 9]))\n assert is_same_tree(candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])), tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]))\n assert is_same_tree(candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])), tree_node([6, 8, 2, 9, 7, 4, 0, None, None, None, None, 5, 3]))\n assert is_same_tree(candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])), tree_node([5, 8, 4, 4, 13, None, 11, 1, 5, None, None, 2, 7]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, None, None, 4])), tree_node([1, 2]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])), tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 10, None, None, 6, 12, None, None, 7, 9])), tree_node([8, 10, 5, 12, 6, None, None, 9, 7]))\n assert is_same_tree(candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, 3, 5, None, None, None, None, None, None])), tree_node([6, 8, 2, 9, 7, 4, 0, None, None, None, None, None, 5, 3]))\n assert is_same_tree(candidate(root = tree_node([5, 4, 7, 3, None, 6, 9])), tree_node([5, 7, 4, 9, 6, None, 3]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, None, 30, None, 16, 22, 27, None, None, 19])), tree_node([20, 25, 15, 30, None, 18, 10, None, None, 27, 22, 16, None, None, None, None, None, None, 19]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, None, 10, None, None, 11, 12, None, None, 13, None, 14, 15])), tree_node([1, 3, 2, 7, 6, 5, 4, 12, 11, None, None, 10, None, 9, 8, None, None, None, None, 15, 14, None, 13]))\n assert is_same_tree(candidate(root = tree_node([5, 1, 4, None, None, 3, 6])), tree_node([5, 4, 1, 6, 3]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])), tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8]))\n assert is_same_tree(candidate(root = tree_node([1, 3, 2, None, None, 5, 4])), tree_node([1, 2, 3, 4, 5]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, 7, 8, None, None, None, None, 9])), tree_node([1, 3, 2, None, 6, 5, 4, None, None, None, None, 8, 7, None, None, None, 9]))\n assert is_same_tree(candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])), tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8]))\n assert is_same_tree(candidate(root = tree_node([100, -100, 50, 25, 75, -25, -50])), tree_node([100, 50, -100, -50, -25, 75, 25]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, None, 2, 6])), tree_node([5, 8, 3, 9, 7, 4, 1, None, None, None, None, 6, 2]))\n assert is_same_tree(candidate(root = tree_node([0, 0, 0, 0, 0, None, None, 0, 0])), tree_node([0, 0, 0, None, None, 0, 0, None, None, 0, 0]))\n assert is_same_tree(candidate(root = tree_node([5, 4, 7, 3, None, 2, None, -1])), tree_node([5, 7, 4, None, 2, None, 3, None, None, None, -1]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, None, None, None, None, 14])), tree_node([1, 3, 2, 7, 6, 5, 4, None, None, 13, 12, 11, 10, 9, 8, None, None, None, None, None, None, None, None, 14]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), tree_node([1, 3, 2, 7, 6, 5, 4, 15, 14, 13, 12, 11, 10, 9, 8, None, None, None, None, None, None, None, None, None, None, None, 20, 19, 18, 17, 16]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])), tree_node([1, 2]))\n assert is_same_tree(candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4])), tree_node([3, 1, 5, 8, 0, 2, 6, None, None, None, None, 4, 7]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9])), tree_node([1, 3, 2, 5, 4, None, None, 7, 6, None, None, 9, 8]))\n assert is_same_tree(candidate(root = tree_node([2, None, 3, None, 4, None, 5, None, 6])), tree_node([2, 3, None, 4, None, 5, None, 6]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), tree_node([1, 3, 2, 7, 6, 5, 4, 15, 14, 13, 12, 11, 10, 9, 8]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, None, 3, None])), tree_node([1, 2]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])), tree_node([1, 2, 2, 3, 4, 4, 3]))\n assert is_same_tree(candidate(root = tree_node([100, -50, 150, 25, 75, 125, 175, 15, 35, 65, 85, 115, 145, 165, 185])), tree_node([100, 150, -50, 175, 125, 75, 25, 185, 165, 145, 115, 85, 65, 35, 15]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])), tree_node([1, 3, 2, 7, 6, 5, 4, 15, 14, 13, 12, 11, 10, 9, 8, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 1, 7, 10, 12])), tree_node([8, 1, 5, None, 12, 10, 7]))\n assert is_same_tree(candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])), tree_node([1, None, 2, None, 3, None, 4, None, 5]))\n assert is_same_tree(candidate(root = tree_node([1, 3, None, None, 2])), tree_node([1, None, 3, 2]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), tree_node([1, 2, None, 4, 3, 8, 7, 6, 5, None, 15, 14, 13, 12, 11, 10, 9, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 30, 29]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, None, None, 14])), tree_node([1, 3, 2, 7, None, None, 4, 14, None, None, 8]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8])), tree_node([1, 3, 2, 6, None, 5, 4, 8, None, None, None, None, 7]))\n assert is_same_tree(candidate(root = tree_node([10, None, 20, None, None, 15, 25])), tree_node([10, 20]))\n assert is_same_tree(candidate(root = tree_node([5, 1, None, None, 4, 3, None, None, 2])), tree_node([5, None, 1, 4, None, None, 3, 2]))\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().invertTree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* invertTree(TreeNode* root) {", "container": "Solution", "callable": "invertTree", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "TreeNode*", "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. \nThe integer division should truncate toward zero.\nYou may assume that the given expression is always valid. All intermediate results will be in the range of [-231, 231 - 1].\nNote: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().\n \nExample 1:\nInput: s = \"3+2*2\"\nOutput: 7\nExample 2:\nInput: s = \" 3/2 \"\nOutput: 1\nExample 3:\nInput: s = \" 3+5 / 2 \"\nOutput: 5\n\n \nConstraints:\n\n1 <= s.length <= 3 * 105\ns consists of integers and operators ('+', '-', '*', '/') separated by some number of spaces.\ns represents a valid expression.\nAll the integers in the expression are non-negative integers in the range [0, 231 - 1].\nThe answer is guaranteed to fit in a 32-bit integer.\n\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 = \"30 + 2 * 6 / (3 - 1)\") == 33\n assert candidate(s = \"100 * ( 2 + 12 ) / 14\") == 200\n assert candidate(s = \"1 + 1 * 1 + 1\") == 3\n assert candidate(s = \"2*3+4/5\") == 6\n assert candidate(s = \"3 + 5 / ( 2 + 3 )\") == 8\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 = \"100*(2+12)/14\") == 200\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 = \"3 + 5 - ( 2 + 3 )\") == 9\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 = \"100*(2+12)\") == 212\n assert candidate(s = \"100 * ( 2 + 12 )\") == 212\n assert candidate(s = \" 1 + 2 * 3 / 4 + 5 * 6 - 7\") == 25\n assert candidate(s = \"( 2 + 6 ) * 3 + 8\") == 28\n assert candidate(s = \"(2 + 6 * 3 + 5 - (3 * 14 / 7 + 2) * 5) + 3\") == 32\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 = \"3 + ( 2 * 2 )\") == 7\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 = \" 1 + 2 - 3 * (4 / 5) + 6 - 7 * 8 / 9\") == 1\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 = \" (123 + 456) * 789 - 101112 / (13 * 14) \") == 251029\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 = \" 1000 + 2000 - (3000 / 4000 + 5000 - 6000 * (7000 / 8000))\") == 2750\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 = \" ( 100 + 200 ) * ( 300 - 100 ) / 50\") == 60098\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 = \" 42 * (5 - 3) / 2 + 8 \") == 217\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 = \"10 + 2 * 6 / ( 1 - 2 ) * 3\") == 16\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 + 4 * (5 - 6 / 2)) + 7\") == 30\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 = \" 2 * 3 + ( 2 * ( 1 + 4 ) / 2 ) - 5 \") == 5\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 = \"10 / 2 + 15 * 3 - 7 * (5 - 3) + 20\") == 32\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 = \" 2 * ( 3 + 4 * ( 5 - 6 ) / 7 ) - 8 \") == 18\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 = \" 7 + 3 * ( 10 / 2 ) - 5\") == 17\n assert candidate(s = \" 100 * 2 / 5 + 3 * (20 - 15) \") == 85\n assert candidate(s = \" 10 * 20 - 5 * 4 + 3 * 2 - 1 / 1 + 8 * 2\") == 201\n assert candidate(s = \" 8 * ( 4 / 2 ) + 12 - 6\") == 22\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 = \"100 + 200 * (300 - 150 / 50) - 400\") == 59697\n assert candidate(s = \"333 * 111 + 222 * 444 / 666 - 777 + 888\") == 37222\n assert candidate(s = \"7 + 3 * (10 / 2) - 1\") == 21\n assert candidate(s = \"2 * 3 + 4 * 5 - 6 / 2 + 7\") == 30\n assert candidate(s = \"(1 + 2) * 3 / 4 + 5 - 6\") == 1\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 = \" 1000 + 2000 - 3000 * (4000 / 5000) + 6000 - 7000 * (8000 / 9000)\") == 378\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 = \" 2147483647 + 1 * 2 - 3 / 4\") == 2147483649\n assert candidate(s = \" (10 + (20 + (30 + (40 + (50 + (60 + (70 + (80 + (90 + 100)))))))) \") == 550\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 = \" 1 + 2 * ( 3 + 4 ) / 2 - 1 \") == 8\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 = \"10 + 20 * (30 / 10) - 5\") == 65\n assert candidate(s = \" 99999 + 88888 - 77777 * 66666 / 55555\") == 95555\n assert candidate(s = \" 100 + 200 * (300 / 50) - 600 + 700 * 800 / 900 \") == 1322\n assert candidate(s = \"999999 / 3 + 999999 / 3 - 999999 / 3\") == 333333\n assert candidate(s = \" 1000 / ( 500 / 250 ) - 250 + 125 * ( 500 / 250 )\") == 0\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 = \" 2 * ( 3 + 5 ) * 4\") == 26\n assert candidate(s = \"30 / 5 * 2 - 1 + 4 * 8 - 3\") == 40\n assert candidate(s = \" 1 + (2 + (3 + (4 + (5 + 6))))\") == 21\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 = \" 1000 / ( 25 / 5 ) + 50 - 20\") == 38\n assert candidate(s = \" 5 + 3 * (2 - 8) + 4 / 2\") == 5\n assert candidate(s = \"987654321 - 123456789 + 111111111 * 222222222 / 333333333 \") == 938271606\n assert candidate(s = \" 8 / 3 + 4 * ( 5 - 3 ) / 2 \") == 21\n assert candidate(s = \" 5 * 6 + 20 / 4 - 8\") == 27\n assert candidate(s = \" 3 + 8 * ( 4 - 2 ) / 2\") == 34\n assert candidate(s = \" 5 + 3 * ( 20 / 4 ) \") == 20\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 = \" 10 + 20 + 30 + 40 + 50 - ( 10 * 5 )\") == 100\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 = \" 3 + (2 * (2 + (2 * (2 + 2))))\") == 13\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 assert candidate(s = \" 3 + 5 * ( 2 + 8 ) / 4 - 2 \") == 13\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().calculate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int calculate(string s) {", "container": "Solution", "callable": "calculate", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\nA range [a,b] is the set of all integers from a to b (inclusive).\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.\nEach range [a,b] in the list should be output as:\n\n\"a->b\" if a != b\n\"a\" if a == b\n\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\n \nConstraints:\n\n0 <= nums.length <= 20\n-231 <= nums[i] <= 231 - 1\nAll the values of nums are unique.\nnums is sorted in ascending order.\n\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 = [-1, -2, -3, -4, -5]) == ['-1', '-2', '-3', '-4', '-5']\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, -3, -5, -7, -8, -9, -11, -12, -13, -14, -16, -17, -18, -20]) == ['-1', '-2', '-3', '-5', '-7', '-8', '-9', '-11', '-12', '-13', '-14', '-16', '-17', '-18', '-20']\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 = [-50, -49, -48, -46, -45, -44, -42, -41, -40, -38, -37, -36, -34, -33, -32, -30, -29, -28, -26, -25, -24]) == ['-50->-48', '-46->-44', '-42->-40', '-38->-36', '-34->-32', '-30->-28', '-26->-24']\n assert candidate(nums = [0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29]) == ['0->3', '5->7', '9->11', '13->15', '17->19', '21->23', '25->27', '29']\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 = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31]) == ['1->2', '4->5', '7->8', '10->11', '13->14', '16->17', '19->20', '22->23', '25->26', '28->29', '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]) == ['1->30']\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, 10, 11, 12, 20, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51, 52, 60, 61, 62, 70, 71, 72]) == ['1->3', '10->12', '20->22', '30->32', '40->42', '50->52', '60->62', '70->72']\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 = [-10, -9, -8, -7, -5, -4, -3, -1, 0, 1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21]) == ['-10->-7', '-5->-3', '-1->1', '3->5', '7->9', '11->13', '15->17', '19->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, 41, 43, 45, 47, 49]) == ['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']\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 = [-10, -9, -8, -6, -5, -4, -2, -1, 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 27, 29, 30]) == ['-10->-8', '-6->-4', '-2->0', '2->3', '5->6', '8->9', '11->12', '14->15', '17->18', '20->21', '23->24', '26->27', '29->30']\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 = [1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 36, 37]) == ['1->5', '7->9', '11->12', '14->16', '18->20', '22->23', '25->27', '29->32', '34->37']\n assert candidate(nums = [10, 11, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32, 35, 36, 37, 40, 41, 42]) == ['10->12', '15->17', '20->22', '25->27', '30->32', '35->37', '40->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 = [1, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30]) == ['1', '4->6', '8->10', '12->14', '16->18', '20->22', '24->26', '28->30']\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 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == ['0->20']\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, 2, 3, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == ['1->6', '8', '10', '12', '14', '16', '18', '20', '22', '24', '26', '28', '30', '32', '34', '36', '38', '40']\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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == ['1->10', '12->30']\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 = [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51]) == ['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']\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, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 26]) == ['1->5', '7->10', '12->15', '17->20', '22->24', '26']\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 = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == ['10->30']\n assert candidate(nums = [1, 2, 3, 4, 6, 7, 8, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39]) == ['1->4', '6->8', '10->11', '13->15', '17->19', '21->23', '25->27', '29->31', '33->35', '37->39']\n assert candidate(nums = [0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30]) == ['0->2', '4->6', '8->10', '12->14', '16->18', '20->22', '24->26', '28->30']\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 = [1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35]) == ['1->3', '5->6', '8->9', '11->13', '15->18', '20->22', '24->26', '28->30', '32->35']\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 = [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == ['0->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, 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, -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, 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 = [1, 2, 3, 4, 5, 6, 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->49']\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 assert candidate(nums = [-1, -2, -3, -5, -6, -7, -9, -10, -11, -13, -14, -15, -17, -18, -19, -21, -22, -23, -25, -26, -27]) == ['-1', '-2', '-3', '-5', '-6', '-7', '-9', '-10', '-11', '-13', '-14', '-15', '-17', '-18', '-19', '-21', '-22', '-23', '-25', '-26', '-27']\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().summaryRanges", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector summaryRanges(vector& nums) {", "container": "Solution", "callable": "summaryRanges", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= nums.length <= 5 * 104\n-109 <= nums[i] <= 109\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().majorityElement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector majorityElement(vector& nums) {", "container": "Solution", "callable": "majorityElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 230, "task_id": "kth-smallest-element-in-a-bst", "difficulty": "Medium", "problem_description": "Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree.\n \nExample 1:\n\n\nInput: root = [3,1,4,null,2], k = 1\nOutput: 1\n\nExample 2:\n\n\nInput: root = [5,3,6,2,4,null,null,1], k = 3\nOutput: 3\n\n \nConstraints:\n\nThe number of nodes in the tree is n.\n1 <= k <= n <= 104\n0 <= Node.val <= 104\n\n \nFollow up: If the BST is modified often (i.e., we can do insert and delete operations) and you need to find the kth smallest frequently, how would you optimize?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, None, 1]),k = 3) == 3\n assert candidate(root = tree_node([3, 1, 4, None, 2]),k = 1) == 1\n assert candidate(root = tree_node([3, 2, 4, 1]),k = 2) == 2\n assert candidate(root = tree_node([1]),k = 1) == 1\n assert candidate(root = tree_node([5, 1, 7, None, 2, None, 8, None, 3]),k = 4) == 5\n assert candidate(root = tree_node([3, 1, 4, None, 2, None, None, None, None, None]),k = 2) == 2\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),k = 4) == 10\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]),k = 15) == 15\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, 4, 6, 8, 11, 13, 17, 19]),k = 5) == 6\n assert candidate(root = tree_node([50, 25, 75, 10, 30, 60, 80, 5, 15, 27, 35, 55, 65, 70, 90, 1, None, 8, 12, 20, 28, 32, 38, 40, 52, 58, 62, 68, 72, 78, 85, 95]),k = 15) == 38\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13, 17, 11, 15]),k = 7) == 7\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, 8, 10, 11, 19]),k = 4) == 9\n assert candidate(root = tree_node([60, 30, 90, 20, 40, 70, 100, 15, 25, 35, 45, 65, 80, 95, 110]),k = 17) == None\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 7, 12, 18, 23, 27, 32, 37]),k = 10) == 25\n assert candidate(root = tree_node([7, 3, 9, 2, 5, 8, 10, 1, 4, 6, None, None, None, None, None, None, None]),k = 5) == 6\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1]),k = 8) == 8\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 13, 17, 23, 27, 32, 37]),k = 10) == 25\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, None, 22]),k = 5) == 20\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1]),k = 1) == 1\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]),k = 7) == 7\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6]),k = 4) == 6\n assert candidate(root = tree_node([20, 15, 25, 10, 18, None, 30, 5, 13, None, None, None, None, 17, 19]),k = 10) == 30\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180]),k = 15) == 180\n assert candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, None, 6, None, None, None, None, None, None, 3]),k = 6) == 7\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 42, 48, 55]),k = 18) == None\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 22, 28, 32, 38, 42]),k = 18) == None\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 22, 35, 42, 48, 55]),k = 7) == 22\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 28, 32, 38, 45, 2, 7, 11, 14, 18, 21, 26, 29, 31, 33, 36, 42, 44, 47, None, None, None, 9, None, 13, None, 16, None, None, 23, None, None, None, None, None, None, None, None, None, None, 39, None, None, None, None, None, None, None, None, 41, 43, None, 46, None, None, 48, None, None, 49]),k = 22) == 22\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 22, 28, 32, 38, 45]),k = 15) == 45\n assert candidate(root = tree_node([20, 10, 30, 5, 15, None, None, 3, 7, 12, 18]),k = 8) == 20\n assert candidate(root = tree_node([50, 20, 80, 10, 30, 70, 90, 5, 15, 25, 35, 60, 75, 85, 95]),k = 10) == 70\n assert candidate(root = tree_node([30, 10, 50, 5, 20, 40, 60, 1, 7, 15, 25, 35, 45, 55, 65]),k = 20) == None\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20]),k = 3) == 9\n assert candidate(root = tree_node([60, 40, 80, 30, 50, 70, 90, 20, 35, 45, 55, 65, 75, 85, 95]),k = 22) == None\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, 4, 6, 8, None, None, None, None, 11, 14, 16, None, None, 13, 17, 19]),k = 7) == 5\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6]),k = 5) == 7\n assert candidate(root = tree_node([10, 5, 15, None, None, 12, 20, 11, None, None, 13, 14, 16, None, None, None, 18, 19, 21]),k = 4) == 18\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 17, 22, 27, 32, 37, 1, 3, 6, 8, 11, 13, 16, 18, 21, 23, 26, 28, 31, 33, 36, 38, 4, 9, 14, 19, 24, 29, 34, 39]),k = 20) == 15\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, 8, None, None, None, None, 25]),k = 6) == 15\n assert candidate(root = tree_node([50, 25, 75, 15, 35, 60, 85, 10, 20, 30, 40, 55, 65, 80, 90]),k = 12) == 75\n assert candidate(root = tree_node([15, 10, 20, 5, 12, 18, 25, None, 7, 11, 14, 16, 19, 22, 27]),k = 8) == 16\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190]),k = 15) == 190\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 18, 28, 32, 38, 45]),k = 15) == None\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 22, 28, 32, 38, 1, None, 6, None, 11, 13, None, 17, 19, None, 21, 23, None, 27, 29, None, 31, 33, None, 37, 39]),k = 10) == 39\n assert candidate(root = tree_node([60, 30, 90, 20, 40, 70, 110, 10, 25, 35, 50, 65, 85, 100, 120]),k = 9) == 65\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, None, 12, 18, 22, 28, None, None, None, None, 14]),k = 10) == 25\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, 8, None, None, None, None, 22]),k = 12) == None\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 45, 48, 55]),k = 7) == 25\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 85, 110, 140, 160, 185, 5, 15, 35, 45, 55, 70, 80, 90, 105, 115, 130, 135, 155, 170, 190, 3, 7, 13, 17, 20, 30, 43, 47, 53, 65, 72, 87, 88, 95, 103, 108, 112, 127, 132, 138, 148, 157, 165, 168, 172, 182, 187, 192, 197, 2, 4, 6, 8, 11, 12, 14, 16, 19, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 44, 46, 48, 49, 51, 52, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 71, 73, 74, 76, 77, 78, 79, 81, 82, 83, 84, 86, 89, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 104, 106, 107, 109, 111, 113, 114, 116, 117, 118, 119, 120, 121, 122, 123, 124, 126, 128, 129, 131, 133, 134, 136, 137, 139, 141, 142, 143, 144, 145, 146, 147, 149, 150, 151, 152, 153, 154, 156, 158, 159, 161, 162, 163, 164, 166, 167, 169, 171, 173, 174, 175, 176, 177, 178, 179, 180, 181, 183, 184, 186, 188, 189, 191, 193, 194, 195, 196, 198, 199, 200]),k = 150) == 66\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 18, 28, 32, None, None, None, None, None, None, 13, None, 16, None, None, 27, 29, 31, 33, None, None, None, None, None, 34]),k = 18) == 35\n assert candidate(root = tree_node([75, 50, 100, 25, 60, 85, 125, 15, 35, 55, 65, 90, 110, 130, 150]),k = 13) == 130\n assert candidate(root = tree_node([4, 2, 5, 1, 3]),k = 2) == 2\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 90, 110, 140, 160, 180]),k = 20) == None\n assert candidate(root = tree_node([55, 30, 80, 15, 40, 70, 90, 10, 20, 35, 45, 65, 75, 85, 95]),k = 9) == 65\n assert candidate(root = tree_node([50, 25, 75, 12, 37, 62, 87, 6, 18, 31, 43, 56, 70, 81, 93, 3, 9, 15, 21, 28, 34, 40, 47, 53, 59, 65, 68, 73, 79, 84, 89, 91, 96]),k = 25) == 68\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 22, 28, 32, 38, 45]),k = 18) == None\n assert candidate(root = tree_node([7, 3, 9, 1, 5, None, 10, None, 2, 4, 6, 8, None, None, None, None, None, None, None]),k = 8) == 9\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 90, 110, 140, 160, 180]),k = 15) == 180\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13]),k = 7) == 10\n assert candidate(root = tree_node([1, 2, None, None, 3, None, 4, None, 5, None, 6, None, 7]),k = 7) == 1\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]),k = 13) == 13\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 25, 35, 47, 55, 60]),k = 20) == None\n assert candidate(root = tree_node([2, 1, 3, None, None, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]),k = 7) == 12\n assert candidate(root = tree_node([15, 10, 20, 8, 12, None, 25, 7, 9, 11, 13, 22, 30]),k = 15) == None\n assert candidate(root = tree_node([8, 3, 10, None, 6, 9, 14, None, 7, 8, 11, 12, 15]),k = 7) == 11\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 190]),k = 10) == 125\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37]),k = 25) == None\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15]),k = 10) == 10\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 7, 12, 18, 22, 28, 32, 40]),k = 15) == 40\n assert candidate(root = tree_node([37, 23, 49, 10, 30, 44, 55, 5, 15, 25, 33, 41, 47, 52, 60]),k = 9) == 41\n assert candidate(root = tree_node([50, 25, 75, 10, 40, 60, 90, 5, 15, 35, 45, 55, 65, 85, 100, 3, 7, 13, 17, 32, 37, 43, 47, 52, 57, 62, 67, 80, 87, 95, 105, None, None, 8, 12, 16, 18, 33, 36, 41, 44, 46, 48, 51, 53, 56, 58, 61, 63, 66, 68, 78, 83, 86, 92, 98, None, None, 6, None, 9, None, None, 11, None, None, 14, None, None, 19, None, 24, None, 27, None, None, 30, None, 34, None, None, 38, None, 42, None, None, 45, None, None, 50, None, None, 54, None, None, 59, None, None, 64, None, None, 69, None, None, 74, None, None, 79, None, None, 82, None, None, 84, None, None, 89, None, None, 91, None, None, 93, None, None, 96, None, None, 99, None, None, 102, None, None, 104]),k = 30) == 35\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7, 0]),k = 3) == 2\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 48, 2, None, 11, 14, 16, 19, 22, 28, 33, 38, 47, 52, None, 8, None, None, None, 13, None, 17, None, None, 21, 23, None, 27, None, None, 32, 36, None, None, 41, None, 46, 51, 55, None, None, None, 53, 54, None, 56]),k = 12) == 56\n assert candidate(root = tree_node([9, 5, 13, 2, 7, 11, 15, 1, 3, 6, 8, 10, 12, 14, 16]),k = 12) == 13\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5]),k = 5) == 5\n assert candidate(root = tree_node([100, 75, 125, 50, 85, 110, 140, 30, 60, 80, 90, 105, 120, 135, 150]),k = 28) == None\n assert candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, None, 6]),k = 4) == 6\n assert candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, None, None, 6, 8]),k = 4) == 7\n"}, "metadata": {"canonical_parameter_names": ["root", "k"], "leetcode_dataset_entry_point": "Solution().kthSmallest", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int kthSmallest(TreeNode* root, int k) {", "container": "Solution", "callable": "kthSmallest", "parameters": [{"name": "root", "type": "TreeNode*"}, {"name": "k", "type": "int"}], "return_type": "int", "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.\nAn integer n is a power of two, if there exists an integer x such that n == 2x.\n \nExample 1:\n\nInput: n = 1\nOutput: true\nExplanation: 20 = 1\n\nExample 2:\n\nInput: n = 16\nOutput: true\nExplanation: 24 = 16\n\nExample 3:\n\nInput: n = 3\nOutput: false\n\n \nConstraints:\n\n-231 <= n <= 231 - 1\n\n \nFollow up: Could you solve it without loops/recursion?", "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 = 2147483648) == 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 = 9223372036854775808) == True\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 = 4294967296) == True\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 = 2147483649) == 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 = 1152921504606846976) == True\n assert candidate(n = 255) == False\n assert candidate(n = 18) == False\n assert candidate(n = 4611686018427387904) == True\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 = 18446744073709551616) == True\n assert candidate(n = 12) == False\n assert candidate(n = 16383) == False\n assert candidate(n = 2305843009213693952) == True\n assert candidate(n = 134217727) == False\n assert candidate(n = 8388607) == False\n assert candidate(n = 2097151) == False\n assert candidate(n = 18014398509481984) == True\n assert candidate(n = 4095) == False\n assert candidate(n = 18014398509481983) == 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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfTwo", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPowerOfTwo(int n) {", "container": "Solution", "callable": "isPowerOfTwo", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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\n \nConstraints:\n\n0 <= n <= 109\n\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 = 2147483647) == 2971027783\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 = 2000000000) == 2800000000\n assert candidate(n = 123000000) == 129800001\n assert candidate(n = 56789) == 33059\n assert candidate(n = 110) == 33\n assert candidate(n = 3000000000) == 3700000000\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 = 1101101101) == 1082954833\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 = 10000000000) == 10000000001\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 = 1000000001) == 900000003\n assert candidate(n = 50001) == 30001\n assert candidate(n = 111111111) == 100000008\n assert candidate(n = 1010101010) == 917253346\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 = 1999999999) == 2800000000\n assert candidate(n = 100001) == 50003\n assert candidate(n = 199) == 140\n assert candidate(n = 1111111111) == 1111111120\n assert candidate(n = 800000008) == 740000001\n assert candidate(n = 100010001) == 80014005\n assert candidate(n = 100000000) == 80000001\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countDigitOne", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countDigitOne(int n) {", "container": "Solution", "callable": "countDigitOne", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 234, "task_id": "palindrome-linked-list", "difficulty": "Easy", "problem_description": "Given the head of a singly linked list, return true if it is a palindrome or false otherwise.\n \nExample 1:\n\n\nInput: head = [1,2,2,1]\nOutput: true\n\nExample 2:\n\n\nInput: head = [1,2]\nOutput: false\n\n \nConstraints:\n\nThe number of nodes in the list is in the range [1, 105].\n0 <= Node.val <= 9\n\n \nFollow up: Could you do it in O(n) time and O(1) space?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(head = list_node([1, 0, 0, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([9, 8, 7, 8, 9])) == True\n assert candidate(head = list_node([1, 2, 3, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5])) == False\n assert candidate(head = list_node([1, 2, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 2, 1])) == True\n assert candidate(head = list_node([1, 2])) == False\n assert candidate(head = list_node([1])) == True\n assert candidate(head = list_node([1, 0, 1])) == True\n assert candidate(head = list_node([1, 1])) == True\n assert candidate(head = list_node([1, 1, 1, 1, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6])) == False\n assert candidate(head = list_node([1, 1, 2, 2, 1, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([2, 4, 6, 8, 10, 8, 6, 4, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == False\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2])) == False\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1])) == False\n assert candidate(head = list_node([9, 8, 7, 6, 5, 6, 7, 8, 9])) == True\n assert candidate(head = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9])) == True\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 3, 2, 4, 2, 3, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])) == True\n assert candidate(head = list_node([1, 2, 2, 3, 2, 2, 1])) == True\n assert candidate(head = list_node([9, 9, 8, 7, 6, 7, 8, 9, 9])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([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(head = list_node([1, 0, 2, 0, 1, 0, 2, 0, 1])) == True\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == True\n assert candidate(head = list_node([1, 2, 2, 3, 3, 2, 2, 1])) == True\n assert candidate(head = list_node([9, 9, 9, 9, 9, 9, 9])) == True\n assert candidate(head = list_node([1, 0, 2, 4, 2, 0, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 0, 2, 0, 1])) == True\n assert candidate(head = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1])) == True\n assert candidate(head = list_node([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])) == True\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 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(head = list_node([1, 2, 3, 2, 1, 1, 2, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 0, 1, 0, 1, 0, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 3, 2, 1, 0])) == False\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == False\n assert candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5])) == True\n assert candidate(head = list_node([1, 0, 2, 4, 5, 4, 2, 0, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 4, 3, 2, 1, 0])) == False\n assert candidate(head = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])) == True\n assert candidate(head = list_node([1, 2, 3, 2, 1, 0, 1, 0, 1])) == False\n assert candidate(head = list_node([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(head = list_node([1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5])) == False\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0])) == False\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == True\n assert candidate(head = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) == True\n assert candidate(head = list_node([0, 0, 0, 0, 0, 0, 0])) == True\n assert candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0])) == True\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1])) == True\n assert candidate(head = list_node([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])) == True\n assert candidate(head = list_node([1, 3, 5, 7, 9, 7, 5, 3, 1, 0, 0, 0, 0, 1, 3, 5, 7, 9, 7, 5, 3, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 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, 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])) == True\n assert candidate(head = list_node([1, 2, 3, 2, 1, 2, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 3, 3, 7, 7, 7, 3, 3, 1])) == True\n assert candidate(head = list_node([0, 0, 0, 0, 0, 0, 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(head = list_node([1, 2, 3, 3, 2, 1, 1])) == False\n assert candidate(head = list_node([9, 8, 7, 6, 7, 8, 9])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 2, 1, 2, 1])) == False\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([1, 1, 2, 1, 1])) == True\n assert candidate(head = list_node([1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1])) == True\n assert candidate(head = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0])) == False\n assert candidate(head = list_node([1, 2, 3, 3, 2, 1, 2, 3, 3, 2, 1])) == True\n assert candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == True\n assert candidate(head = list_node([1, 3, 5, 7, 5, 3, 1])) == True\n assert candidate(head = list_node([1, 1, 2, 2, 3, 3, 2, 2, 1, 1])) == True\n assert candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1])) == True\n assert candidate(head = list_node([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])) == True\n assert candidate(head = list_node([5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1])) == False\n assert candidate(head = list_node([1, 1, 2, 1, 1, 2, 1, 1])) == True\n assert candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5])) == True\n assert candidate(head = list_node([1, 3, 2, 3, 1])) == True\n assert candidate(head = list_node([1, 2, 2, 3, 3, 3, 2, 2, 1])) == True\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().isPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPalindrome(ListNode* head) {", "container": "Solution", "callable": "isPalindrome", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "bool", "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].\nThe product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer.\nYou must write an algorithm that runs in O(n) time and without using the division operation.\n \nExample 1:\nInput: nums = [1,2,3,4]\nOutput: [24,12,8,6]\nExample 2:\nInput: nums = [-1,1,0,-3,3]\nOutput: [0,0,9,0,0]\n\n \nConstraints:\n\n2 <= nums.length <= 105\n-30 <= nums[i] <= 30\nThe input is generated such that answer[i] is guaranteed to fit in a 32-bit integer.\n\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 = [-30, -29, -28, -27, -26, -25, -24, -23, -22, -21]) == [-3634245014400, -3759563808000, -3893833944000, -4038050016000, -4193359632000, -4361094017280, -4542806268000, -4740319584000, -4955788656000, -5191778592000]\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 = [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]) == [304888344611713860501504000000, 315777214062132212662272000000, 327472666434803776094208000000, 340067768989988536713216000000, 353670479749588078181744640000, 368406749739154248105984000000, 384424434510421824110592000000, 401898272442713725206528000000, 421036285416176283549696000000, 442088099686985097727180800000, 465355894407352734449664000000, 491208999652205664141312000000, 520103646690570703208448000000, 552610124608731372158976000000, 589450799582646796969574400000, 631554428124264425324544000000, 680135537979977073426432000000, 736813499478308496211968000000, 803796544885427450413056000000, 884176199373970195454361600000, 982417999304411328282624000000, 1105220249217462744317952000000, 1263108856248528850649088000000, 1473626998956616992423936000000, 1768352398747940390908723200000, 2210440498434925488635904000000, 2947253997913233984847872000000, 4420880996869850977271808000000, 8841761993739701954543616000000]\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 = [100, -100, 200, -200, 300, -300]) == [-360000000000, 360000000000, -180000000000, 180000000000, -120000000000, 120000000000]\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 = [10, 20, 30, 40, 50]) == [1200000, 600000, 400000, 300000, 240000]\n assert candidate(nums = [29, 29, 29, 29, 29, 29, 29, 29, 29, 29]) == [14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869, 14507145975869]\n assert candidate(nums = [15, 20, 25, 30, 35, 40, 45, 50]) == [47250000000, 35437500000, 28350000000, 23625000000, 20250000000, 17718750000, 15750000000, 14175000000]\n assert candidate(nums = [10, 20, 0, 30, 40]) == [0, 0, 240000, 0, 0]\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125, 62, -62]) == [-938476562500000000000, 938476562500000000000, -1876953125000000000000, 1876953125000000000000, -3753906250000000000000, 3753906250000000000000, -7507812500000000000000, 7507812500000000000000, -15136718750000000000000, 15136718750000000000000]\n assert candidate(nums = [30, -20, 10, -5, 4, -2, 1]) == [-8000, 12000, -24000, 48000, -60000, 120000, -240000]\n assert candidate(nums = [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]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8841761993739701954543616000000]\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 = [10, -20, 30, -40, 50]) == [1200000, -600000, 400000, -300000, 240000]\n assert candidate(nums = [-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10]) == [-13168189440000, 13168189440000, -6584094720000, 6584094720000, -4389396480000, 4389396480000, -3292047360000, 3292047360000, -2633637888000, 2633637888000, -2194698240000, 2194698240000, -1881169920000, 1881169920000, -1646023680000, 1646023680000, -1463132160000, 1463132160000, -1316818944000, 1316818944000]\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]) == [265252859812191058636308480000000, 132626429906095529318154240000000, 88417619937397019545436160000000, 66313214953047764659077120000000, 53050571962438211727261696000000, 44208809968698509772718080000000, 37893265687455865519472640000000, 33156607476523882329538560000000, 29472539979132339848478720000000, 26525285981219105863630848000000, 24113896346562823512391680000000, 22104404984349254886359040000000, 20404066139399312202792960000000, 18946632843727932759736320000000, 17683523987479403909087232000000, 16578303738261941164769280000000, 15603109400717121096253440000000, 14736269989566169924239360000000, 13960676832220582033489920000000, 13262642990609552931815424000000, 12631088562485288506490880000000, 12056948173281411756195840000000, 11532733035312654723317760000000, 11052202492174627443179520000000, 10610114392487642345452339200000, 10202033069699656101396480000000, 9824179993044113282826240000000, 9473316421863966379868160000000, 9146650338351415815045120000000, 8841761993739701954543616000000]\n assert candidate(nums = [0, 0, 0, 1]) == [0, 0, 0, 0]\n assert candidate(nums = [-29, 29, -29, 29, -29, 29, -29, 29, -29, 29]) == [14507145975869, -14507145975869, 14507145975869, -14507145975869, 14507145975869, -14507145975869, 14507145975869, -14507145975869, 14507145975869, -14507145975869]\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1, -1, -2, -3]) == [-1620000, -3240000, -6480000, -13500000, -27000000, -54000000, -162000000, 162000000, 81000000, 54000000]\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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [1307674368000, 653837184000, 435891456000, 326918592000, 261534873600, 217945728000, 186810624000, 163459296000, 145297152000, 130767436800, 118879488000, 108972864000, 100590336000, 93405312000, 87178291200]\n assert candidate(nums = [-1000000000, 1, -2, 3, -4]) == [24, -24000000000, 12000000000, -8000000000, 6000000000]\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, 1, 2, 3, 4, 5, 6, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70359079638545882374689246780656119576032161719910400000000000000, 0, 0, 0, 0, 0, 0, 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, 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 = [1000000000, -1000000000, 500000000, -500000000, 250000000]) == [62500000000000000000000000000000000, -62500000000000000000000000000000000, 125000000000000000000000000000000000, -125000000000000000000000000000000000, 250000000000000000000000000000000000]\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20]) == [2432902008176640000, -1216451004088320000, 810967336058880000, -608225502044160000, 486580401635328000, -405483668029440000, 347557429739520000, -304112751022080000, 270322445352960000, -243290200817664000, 221172909834240000, -202741834014720000, 187146308321280000, -173778714869760000, 162193467211776000, -152056375511040000, 143111882833920000, -135161222676480000, 128047474114560000, -121645100408832000]\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == [-14400000000000, 14400000000000, -7200000000000, 7200000000000, -4800000000000, 4800000000000, -3600000000000, 3600000000000, -2880000000000, 2880000000000]\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 = [-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]) == [-8841761993739701954543616000000, 9146650338351415815045120000000, -9473316421863966379868160000000, 9824179993044113282826240000000, -10202033069699656101396480000000, 10610114392487642345452339200000, -11052202492174627443179520000000, 11532733035312654723317760000000, -12056948173281411756195840000000, 12631088562485288506490880000000, -13262642990609552931815424000000, 13960676832220582033489920000000, -14736269989566169924239360000000, 15603109400717121096253440000000, -16578303738261941164769280000000, 17683523987479403909087232000000, -18946632843727932759736320000000, 20404066139399312202792960000000, -22104404984349254886359040000000, 24113896346562823512391680000000, -26525285981219105863630848000000, 29472539979132339848478720000000, -33156607476523882329538560000000, 37893265687455865519472640000000, -44208809968698509772718080000000, 53050571962438211727261696000000, -66313214953047764659077120000000, 88417619937397019545436160000000, -132626429906095529318154240000000, 265252859812191058636308480000000, -265252859812191058636308480000000]\n assert candidate(nums = [30, -30, 30, -30, 30, -30, 30, -30, 30, -30, 30, -30, 30, -30, 30, -30, 30, -30, 30, -30]) == [11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000, 11622614670000000000000000000, -11622614670000000000000000000]\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 = [1000000000, 1000000000, -1, 1, -1, 1, -1, 1, -1, 1]) == [1000000000, 1000000000, -1000000000000000000, 1000000000000000000, -1000000000000000000, 1000000000000000000, -1000000000000000000, 1000000000000000000, -1000000000000000000, 1000000000000000000]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [2432902008176640000, 1216451004088320000, 810967336058880000, 608225502044160000, 486580401635328000, 405483668029440000, 347557429739520000, 304112751022080000, 270322445352960000, 243290200817664000, 221172909834240000, 202741834014720000, 187146308321280000, 173778714869760000, 162193467211776000, 152056375511040000, 143111882833920000, 135161222676480000, 128047474114560000, 121645100408832000]\n assert candidate(nums = [25, -25, 25, -25, 25, -25, 25, -25, 25, -25]) == [-3814697265625, 3814697265625, -3814697265625, 3814697265625, -3814697265625, 3814697265625, -3814697265625, 3814697265625, -3814697265625, 3814697265625]\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == [-14400000000000, 14400000000000, -7200000000000, 7200000000000, -4800000000000, 4800000000000, -3600000000000, 3600000000000, -2880000000000, 2880000000000]\n assert candidate(nums = [15, 20, 30, 0, 0, 40, 50, 60]) == [0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [-10, 9, 0, 5, -2, 3, -1, 8]) == [0, 0, -21600, 0, 0, 0, 0, 0]\n assert candidate(nums = [100, -100, 50, -50, 25, -25]) == [-156250000, 156250000, -312500000, 312500000, -625000000, 625000000]\n assert candidate(nums = [29, 28, 27, 26, 25, 24, 23, 22, 21, 20]) == [2506375872000, 2595889296000, 2692033344000, 2795573088000, 2907396011520, 3028537512000, 3160213056000, 3303859104000, 3461185728000, 3634245014400]\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]) == [8841761993739701954543616000000, 9146650338351415815045120000000, 9473316421863966379868160000000, 9824179993044113282826240000000, 10202033069699656101396480000000, 10610114392487642345452339200000, 11052202492174627443179520000000, 11532733035312654723317760000000, 12056948173281411756195840000000, 12631088562485288506490880000000, 13262642990609552931815424000000, 13960676832220582033489920000000, 14736269989566169924239360000000, 15603109400717121096253440000000, 16578303738261941164769280000000, 17683523987479403909087232000000, 18946632843727932759736320000000, 20404066139399312202792960000000, 22104404984349254886359040000000, 24113896346562823512391680000000, 26525285981219105863630848000000, 29472539979132339848478720000000, 33156607476523882329538560000000, 37893265687455865519472640000000, 44208809968698509772718080000000, 53050571962438211727261696000000, 66313214953047764659077120000000, 88417619937397019545436160000000, 132626429906095529318154240000000, 265252859812191058636308480000000]\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]) == [265252859812191058636308480000000, 0, 0, 0, 0, 0, 0, 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 = [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 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == [3628800000000000, 1814400000000000, 1209600000000000, 907200000000000, 725760000000000, 604800000000000, 518400000000000, 453600000000000, 403200000000000, 362880000000000]\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 = [-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]) == [8841761993739701954543616000000, -9146650338351415815045120000000, 9473316421863966379868160000000, -9824179993044113282826240000000, 10202033069699656101396480000000, -10610114392487642345452339200000, 11052202492174627443179520000000, -11532733035312654723317760000000, 12056948173281411756195840000000, -12631088562485288506490880000000, 13262642990609552931815424000000, -13960676832220582033489920000000, 14736269989566169924239360000000, -15603109400717121096253440000000, 16578303738261941164769280000000, -17683523987479403909087232000000, 18946632843727932759736320000000, -20404066139399312202792960000000, 22104404984349254886359040000000, -24113896346562823512391680000000, 26525285981219105863630848000000, -29472539979132339848478720000000, 33156607476523882329538560000000, -37893265687455865519472640000000, 44208809968698509772718080000000, -53050571962438211727261696000000, 66313214953047764659077120000000, -88417619937397019545436160000000, 132626429906095529318154240000000, -265252859812191058636308480000000]\n assert candidate(nums = [-10, -20, -30, -40, -50]) == [1200000, 600000, 400000, 300000, 240000]\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 = [1000000000, 1, 2, 3, 4]) == [24, 24000000000, 12000000000, 8000000000, 6000000000]\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 = [-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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70359079638545882374689246780656119576032161719910400000000000000, 0, 0, 0, 0, 0, 0, 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 = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21]) == [3634245014400, 3759563808000, 3893833944000, 4038050016000, 4193359632000, 4361094017280, 4542806268000, 4740319584000, 4955788656000, 5191778592000]\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 = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == [3234846615, 2156564410, 1293938646, 924241890, 588153930, 497668710, 380570190, 340510170, 281291010, 223092870]\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().productExceptSelf", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector productExceptSelf(vector& nums) {", "container": "Solution", "callable": "productExceptSelf", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 105\n-104 <= nums[i] <= 104\n1 <= k <= nums.length\n\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().maxSlidingWindow", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector maxSlidingWindow(vector& nums, int k) {", "container": "Solution", "callable": "maxSlidingWindow", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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\nIntegers in each row are sorted in ascending from left to right.\nIntegers in each column are sorted in ascending from top to bottom.\n\n \nExample 1:\n\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\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\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= n, m <= 300\n-109 <= matrix[i][j] <= 109\nAll the integers in each row are sorted in ascending order.\nAll the integers in each column are sorted in ascending order.\n-109 <= target <= 109\n\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 = [[1000000000, 1000000001, 1000000002], [1000000003, 1000000004, 1000000005], [1000000006, 1000000007, 1000000008]],target = 1000000004) == 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 = [[-1000000000, -900000000, -800000000, -700000000, -600000000], [-500000000, -400000000, -300000000, -200000000, -1000000000], [0, 1000000000, 2000000000, 3000000000, 4000000000], [5000000000, 6000000000, 7000000000, 8000000000, 9000000000]],target = 0) == 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 = [[1000000000, 2000000000, 3000000000, 4000000000, 5000000000], [1500000000, 2500000000, 3500000000, 4500000000, 5500000000], [2000000000, 3000000000, 4000000000, 5000000000, 6000000000], [2500000000, 3500000000, 4500000000, 5500000000, 6500000000], [3000000000, 4000000000, 5000000000, 6000000000, 7000000000]],target = 4500000000) == 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"}, "metadata": {"canonical_parameter_names": ["matrix", "target"], "leetcode_dataset_entry_point": "Solution().searchMatrix", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool searchMatrix(vector>& matrix, int target) {", "container": "Solution", "callable": "searchMatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "target", "type": "int"}], "return_type": "bool", "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.\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 104.\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\n \nConstraints:\n\n1 <= expression.length <= 20\nexpression consists of digits and the operator '+', '-', and '*'.\nAll the integer values in the input expression are in the range [0, 99].\nThe integer values in the input expression do not have a leading '-' or '+' denoting the sign.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(expression = \"4*5-2*3\") == [-4, 36, 14, 36, 54]\n assert candidate(expression = \"9-3*2+1\") == [0, 2, 18, 4, 13]\n assert candidate(expression = \"3+5/2*3\") == []\n assert candidate(expression = \"1+1+1+1\") == [4, 4, 4, 4, 4]\n assert 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 candidate(expression = \"10+5-3*2\") == [9, 14, 9, 24, 24]\n assert candidate(expression = \"3+5*2\") == [13, 16]\n assert candidate(expression = \"2*3-4*5\") == [-34, -10, -14, -10, 10]\n assert candidate(expression = \"2*3+4*5\") == [46, 70, 26, 70, 50]\n assert candidate(expression = \"10+5-2*3\") == [9, 19, 9, 39, 39]\n assert candidate(expression = \"1+2*3\") == [7, 9]\n assert candidate(expression = \"4+2*3-5\") == [0, 5, -12, 5, 13]\n assert candidate(expression = \"1+2\") == [3]\n assert candidate(expression = \"9-3/3+2\") == []\n assert candidate(expression = \"2-1-1\") == [2, 0]\n assert candidate(expression = \"3-2*2+1\") == [-3, -2, 3, 0, 3]\n assert candidate(expression = \"1*2-3*4+5\") == [-25, -15, -9, -5, 1, -25, -15, -9, -9, -5, 1, -5, 1, 1]\n assert candidate(expression = \"8+2-1*3\") == [7, 11, 7, 27, 27]\n assert candidate(expression = \"100+200-50*2\") == [200, 400, 200, 500, 500]\n assert candidate(expression = \"3*4+2*5\") == [42, 90, 22, 90, 70]\n assert candidate(expression = \"1+2*3-4/2\") == []\n assert candidate(expression = \"1+2-3\") == [0, 0]\n assert candidate(expression = \"1+2*3-4\") == [-1, 3, -3, 3, 5]\n assert candidate(expression = \"3+2*2\") == [7, 10]\n assert candidate(expression = \"10+5-3*2+4\") == [-3, 5, 22, 13, 18, -3, 5, 72, 72, 13, 18, 13, 28, 28]\n assert candidate(expression = \"1*1*1*1\") == [1, 1, 1, 1, 1]\n assert candidate(expression = \"1*2-3+4*5\") == [-21, -33, 19, -25, 15, -21, -33, 19, 19, -25, 15, -25, 15, 15]\n assert 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 candidate(expression = \"1*2+3*4+5\") == [29, 19, 45, 19, 25, 29, 19, 45, 45, 19, 25, 19, 25, 25]\n assert candidate(expression = \"3+5*2-8\") == [-27, 5, -48, 5, 8]\n assert candidate(expression = \"1+2+3\") == [6, 6]\n assert candidate(expression = \"6/2+3-1\") == []\n assert candidate(expression = \"7*8-2+3\") == [21, 63, 51, 45, 57]\n assert candidate(expression = \"2+3*4-5+6\") == [-19, 17, 3, 5, 15, -35, 25, 3, 9, 5, 15, 1, 15, 21]\n assert candidate(expression = \"11*11+22-33*4+55-66/2\") == []\n assert 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 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 candidate(expression = \"33+33-33*33/33\") == []\n assert 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 candidate(expression = \"3*3-10/2+4*2-1\") == []\n assert candidate(expression = \"100-99+98-97+96-95+94-93\") == [0, 0, 2, -186, 2, 0, 0, 2, 2, -186, 2, -186, 2, 2, 0, 0, -2, 186, -2, 192, 192, 0, 0, 0, 0, -2, 190, -2, 0, 188, 0, 188, 188, 186, -2, 378, 186, 0, 0, -2, 190, -2, 0, 0, 2, -186, 2, 0, 0, 2, 2, -186, 2, -186, 2, 2, 0, 0, -2, 186, -2, 0, 0, -2, 186, -2, 192, 192, 0, 0, 192, 192, 0, 0, 0, 0, 0, 0, -2, 190, -2, 0, 0, -2, -2, 190, -2, 190, -2, -2, 0, 188, 0, 188, 188, 186, -2, 378, 186, 0, 0, -2, 190, -2, 0, 188, 0, 188, 188, 186, -2, 186, -2, 378, 186, 378, 186, 186, 0, 0, -2, 190, -2, 0, 0, -2, -2, 190, -2, 190, -2, -2, 2, 2, 0, 188, 0, 2, 2, 0, 0, 188, 0, 188, 0, 0, 2, 2, 4, -184, 4, -190, -190, 2, 2, 2, 2, 4, -188, 4, 2, -186, 2, -186, -186, -184, 4, -376, -184, 2, 2, 4, -188, 4, -194, -194, -196, -8, -196, -194, -194, -196, -196, -8, -196, -8, -196, -196, 2, 2, 0, 188, 0, 2, 2, 0, 0, 188, 0, 188, 0, 0, 0, 0, 2, -186, 2, 0, 0, 2, -186, 2, 2, 2, 4, -184, 4, -194, -194, -192, -380, -192, 2, 2, 4, -184, 4, 0, 0, -192, -192, 0, 0, -192, -192, -192, -192, -190, -190, 2, 2, -386, -386, -190, -190, 0, 0, 0, 0, 2, 2, -194, -194, 2, 2, 2, 2, 0, 192, 0, 2, 2, 0, 0, 192, 0, 192, 0, 0, 2, 2, 4, -188, 4, -194, -194, 2, 2, 2, 2, 4, -192, 4, 2, -190, 2, -190, -190, -188, 4, -384, -188, 2, 2, 4, -192, 4, -186, 2, -186, 2, 2, 0, -188, 192, 0, -186, -186, -188, 4, -188, -186, 2, -186, 2, 2, 0, -188, 0, -188, 192, 0, 192, 0, 0, -186, -186, -188, 4, -188, -186, -186, -188, -188, 4, -188, 4, -188, -188, 2, -186, 2, -186, -186, -184, 4, -376, -184, 2, 2, 4, -188, 4, -194, -382, -194, -382, -382, 2, -186, 2, -186, -186, -186, 2, -186, 2, -184, 4, -380, -192, -184, 4, -186, -378, -186, -378, -378, -376, -184, -572, -376, -186, -186, -184, -380, -184, 2, 2, 0, 192, 0, 2, 2, 0, 0, 192, 0, 192, 0, 0, 2, 2, 4, -188, 4, -194, -194, 2, 2, 2, 2, 4, -192, 4, 2, -190, 2, -190, -190, -188, 4, -384, -188, 2, 2, 4, -192, 4]\n assert candidate(expression = \"15+25*3-45/5+6*7\") == []\n assert 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 candidate(expression = \"33-5*6+7*8-9/3+2\") == []\n assert candidate(expression = \"12*3+4-5/2+6-7*8\") == []\n assert 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 candidate(expression = \"10+20-30*40/50\") == []\n assert candidate(expression = \"100-50*2+30/5-20*3\") == []\n assert 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 candidate(expression = \"7+8*3-2/1+6\") == []\n assert 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 candidate(expression = \"10*9-8/2+3*7\") == []\n assert candidate(expression = \"3*5-2*3+4\") == [-27, -15, 63, 9, 39, 1, 5, 63, 91, 1, 31, 13, 31, 43]\n assert candidate(expression = \"10+5*2-3*4\") == [-40, -10, 8, -10, 38, -150, -60, 8, 18, 20, 68, -60, 68, 108]\n assert 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 candidate(expression = \"25/5-4/4+3/3-2/2+1/1\") == []\n assert 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 candidate(expression = \"15/3+2*6-4/2+3*5\") == []\n assert 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 candidate(expression = \"99-77*5+33/3-22*8+11\") == []\n assert 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 candidate(expression = \"10-2/2+3*3\") == []\n assert candidate(expression = \"30-20*5+10/5+8*2-4*1\") == []\n assert candidate(expression = \"3+5*3-2*4+6/2-1\") == []\n assert candidate(expression = \"2*3*4+5*6-7*8/2\") == []\n assert 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 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 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 candidate(expression = \"10*2-5*3+1\") == [-180, -140, -120, -120, -80, 0, 4, -120, 60, -129, -89, 6, -89, 46]\n assert 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 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 candidate(expression = \"12+11-10*9+8*7-6*5+4-3\") == [2253, 2253, 1853, 3453, 1853, -547, -547, 1693, -547, 3933, 2333, -547, 1693, -547, -267, -267, -317, -117, -317, -547, -547, -3067, -3067, 1763, -477, -337, -477, -2577, 3723, 2123, -757, 1483, -757, -57, -257, -757, -4537, 1763, -477, -337, -477, -2577, 4953, 4953, 4103, 7503, 4103, -997, -997, 3763, -997, 8523, 5123, -997, 3763, -997, -267, -267, -317, -117, -317, -807, -807, -857, -657, -857, -997, -997, -3517, -3517, -997, -997, -3517, -3517, -6757, -6757, 1763, -477, -337, -477, -2577, 3923, -837, -337, -877, -837, -2937, -837, -2937, -5637, 3723, 2123, -757, 1483, -757, -57, -257, -757, -4537, 1763, -477, -337, -477, -2577, 8043, 4643, -1477, 3283, -1477, -57, -257, -597, -797, -1477, -5257, -1477, -5257, -10117, 1763, -477, -337, -477, -2577, 3923, -837, -337, -877, -837, -2937, -837, -2937, -5637, 165, 165, 125, 285, 125, -115, -115, 109, -115, 333, 173, -115, 109, -115, -87, -87, -92, -72, -92, -115, -115, -367, -367, 116, -108, -94, -108, -318, 312, 152, -136, 88, -136, -66, -86, -136, -514, 116, -108, -94, -108, -318, 4953, 4953, 4103, 7503, 4103, -997, -997, 3763, -997, 8523, 5123, -997, 3763, -997, 2865, 2865, 2375, 4335, 2375, -565, -565, 2179, -565, 4923, 2963, -565, 2179, -565, -591, -591, -596, -576, -596, -1131, -1131, -1136, -1116, -1136, -87, -87, -92, -72, -92, -1131, -1131, -1136, -1116, -1136, -627, -627, -632, -612, -632, -997, -997, -3517, -3517, -997, -997, -3517, -3517, -6757, -6757, -565, -565, -817, -817, -997, -997, -565, -565, -3841, -3841, -7081, -7081, -817, -817, -7081, -7081, -4057, -4057, 1772, -468, -328, -468, -2568, 3932, -828, -328, -868, -828, -2928, -828, -2928, -5628, 116, -108, -94, -108, -318, 3932, -828, 2276, -468, -598, -1138, -94, -1138, -634, -828, -2928, -828, -2928, -5628, -468, -678, -828, -468, -3198, -5898, -678, -5898, -3378, 3696, 2096, -784, 1456, -784, -84, -284, -784, -4564, 1736, -504, -364, -504, -2604, 8016, 4616, -1504, 3256, -1504, -84, -284, -624, -824, -1504, -5284, -1504, -5284, -10144, 1736, -504, -364, -504, -2604, 3896, -864, -364, -904, -864, -2964, -864, -2964, -5664, 312, 152, -136, 88, -136, -66, -86, -136, -514, 116, -108, -94, -108, -318, 8016, 4616, -1504, 3256, -1504, 4632, 2672, -856, 1888, -856, -570, -590, -1110, -1130, -66, -86, -1110, -1130, -606, -626, -1504, -5284, -1504, -5284, -10144, -856, -1234, -1504, -856, -5770, -10630, -1234, -10630, -6094, 1772, -468, -328, -468, -2568, 3932, -828, -328, -868, -828, -2928, -828, -2928, -5628, 116, -108, -94, -108, -318, 3932, -828, 2276, -468, -598, -1138, -94, -1138, -634, -828, -2928, -828, -2928, -5628, -468, -678, -828, -468, -3198, -5898, -678, -5898, -3378, -211, -211, -171, -331, -171, 69, 69, -155, 69, -379, -219, 69, -155, 69, 41, 41, 46, 26, 46, 69, 69, 321, 321, -162, 62, 48, 62, 272, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -481, -481, -396, -736, -396, 114, 114, -362, 114, -838, -498, 114, -362, 114, 41, 41, 46, 26, 46, 95, 95, 100, 80, 100, 114, 114, 366, 366, 114, 114, 366, 366, 690, 690, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -790, -450, 162, -314, 162, 20, 40, 74, 94, 162, 540, 162, 540, 1026, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -299, -299, -259, -419, -259, -19, -19, -243, -19, -467, -307, -19, -243, -19, -47, -47, -42, -62, -42, -19, -19, 233, 233, -250, -26, -40, -26, 184, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -211, -211, -171, -331, -171, 69, 69, -155, 69, -379, -219, 69, -155, 69, 41, 41, 46, 26, 46, 69, 69, 321, 321, -162, 62, 48, 62, 272, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, 4623, 4623, 3828, 7008, 3828, -942, -942, 3510, -942, 7962, 4782, -942, 3510, -942, 2535, 2535, 2100, 3840, 2100, -510, -510, 1926, -510, 4362, 2622, -510, 1926, -510, -481, -481, -396, -736, -396, 114, 114, -362, 114, -838, -498, 114, -362, 114, 2071, 2071, 1716, 3136, 1716, -414, -414, 1574, -414, 3562, 2142, -414, 1574, -414, -481, -481, -396, -736, -396, 114, 114, -362, 114, -838, -498, 114, -362, 114, -663, -663, -658, -678, -658, -1203, -1203, -1198, -1218, -1198, -159, -159, -154, -174, -154, -1203, -1203, -1198, -1218, -1198, -699, -699, -694, -714, -694, 41, 41, 46, 26, 46, 95, 95, 100, 80, 100, -47, -47, -42, -62, -42, 41, 41, 46, 26, 46, -1137, -1137, -1132, -1152, -1132, -633, -633, -628, -648, -628, 95, 95, 100, 80, 100, -521, -521, -516, -536, -516, 95, 95, 100, 80, 100, -942, -942, -3462, -3462, -942, -942, -3462, -3462, -6702, -6702, -510, -510, -762, -762, -942, -942, -510, -510, -3786, -3786, -7026, -7026, -762, -762, -7026, -7026, -4002, -4002, 114, 114, 366, 366, 114, 114, 366, 366, 690, 690, -414, -414, -162, -162, 114, 114, 366, 366, -942, -942, -510, -510, 114, 114, -414, -414, 114, 114, -3858, -3858, -7098, -7098, -834, -834, -7098, -7098, -4074, -4074, 366, 366, 690, 690, -162, -162, 366, 366, -6702, -6702, -3678, -3678, 690, 690, -3006, -3006, 690, 690, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, 3670, -782, 2014, -422, -378, 98, 1646, -342, -378, 98, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -782, -2882, -782, -2882, -5582, -422, -632, -782, -422, -3152, -5852, -632, -5852, -3332, 98, 308, 98, 308, 578, -342, -132, 98, 308, -782, -422, 98, -342, 98, -3212, -5912, -692, -5912, -3392, 308, 578, -132, 308, -5582, -3062, 578, -2502, 578, 3690, 2090, -790, 1450, -790, -90, -290, -790, -4570, 1730, -510, -370, -510, -2610, 8010, 4610, -1510, 3250, -1510, -90, -290, -630, -830, -1510, -5290, -1510, -5290, -10150, 1730, -510, -370, -510, -2610, 3890, -870, -370, -910, -870, -2970, -870, -2970, -5670, 306, 146, -142, 82, -142, -72, -92, -142, -520, 110, -114, -100, -114, -324, 8010, 4610, -1510, 3250, -1510, 4626, 2666, -862, 1882, -862, -576, -596, -1116, -1136, -72, -92, -1116, -1136, -612, -632, -1510, -5290, -1510, -5290, -10150, -862, -1240, -1510, -862, -5776, -10636, -1240, -10636, -6100, 1766, -474, -334, -474, -2574, 3926, -834, -334, -874, -834, -2934, -834, -2934, -5634, 110, -114, -100, -114, -324, 3926, -834, 2270, -474, -604, -1144, -100, -1144, -640, -834, -2934, -834, -2934, -5634, -474, -684, -834, -474, -3204, -5904, -684, -5904, -3384, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -790, -450, 162, -314, 162, 20, 40, 74, 94, 162, 540, 162, 540, 1026, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, 7482, 4302, -1422, 3030, -1422, 4098, 2358, -774, 1662, -774, -790, -450, 162, -314, 162, 3346, 1926, -630, 1358, -630, -790, -450, 162, -314, 162, -684, -664, -1224, -1204, -180, -160, -1224, -1204, -720, -700, 20, 40, 74, 94, -68, -48, 20, 40, -1158, -1138, -654, -634, 74, 94, -542, -522, 74, 94, -1422, -5202, -1422, -5202, -10062, -774, -1152, -1422, -774, -5688, -10548, -1152, -10548, -6012, 162, 540, 162, 540, 1026, -630, -252, 162, 540, -1422, -774, 162, -630, 162, -5796, -10656, -1260, -10656, -6120, 540, 1026, -252, 540, -10062, -5526, 1026, -4518, 1026, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, 3670, -782, 2014, -422, -378, 98, 1646, -342, -378, 98, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -782, -2882, -782, -2882, -5582, -422, -632, -782, -422, -3152, -5852, -632, -5852, -3332, 98, 308, 98, 308, 578, -342, -132, 98, 308, -782, -422, 98, -342, 98, -3212, -5912, -692, -5912, -3392, 308, 578, -132, 308, -5582, -3062, 578, -2502, 578, 2253, 2253, 1853, 3453, 1853, -547, -547, 1693, -547, 3933, 2333, -547, 1693, -547, -267, -267, -317, -117, -317, -547, -547, -3067, -3067, 1763, -477, -337, -477, -2577, 3723, 2123, -757, 1483, -757, -57, -257, -757, -4537, 1763, -477, -337, -477, -2577, 4953, 4953, 4103, 7503, 4103, -997, -997, 3763, -997, 8523, 5123, -997, 3763, -997, -267, -267, -317, -117, -317, -807, -807, -857, -657, -857, -997, -997, -3517, -3517, -997, -997, -3517, -3517, -6757, -6757, 1763, -477, -337, -477, -2577, 3923, -837, -337, -877, -837, -2937, -837, -2937, -5637, 3723, 2123, -757, 1483, -757, -57, -257, -757, -4537, 1763, -477, -337, -477, -2577, 8043, 4643, -1477, 3283, -1477, -57, -257, -597, -797, -1477, -5257, -1477, -5257, -10117, 1763, -477, -337, -477, -2577, 3923, -837, -337, -877, -837, -2937, -837, -2937, -5637, 165, 165, 125, 285, 125, -115, -115, 109, -115, 333, 173, -115, 109, -115, -87, -87, -92, -72, -92, -115, -115, -367, -367, 116, -108, -94, -108, -318, 312, 152, -136, 88, -136, -66, -86, -136, -514, 116, -108, -94, -108, -318, 4953, 4953, 4103, 7503, 4103, -997, -997, 3763, -997, 8523, 5123, -997, 3763, -997, 2865, 2865, 2375, 4335, 2375, -565, -565, 2179, -565, 4923, 2963, -565, 2179, -565, -591, -591, -596, -576, -596, -1131, -1131, -1136, -1116, -1136, -87, -87, -92, -72, -92, -1131, -1131, -1136, -1116, -1136, -627, -627, -632, -612, -632, -997, -997, -3517, -3517, -997, -997, -3517, -3517, -6757, -6757, -565, -565, -817, -817, -997, -997, -565, -565, -3841, -3841, -7081, -7081, -817, -817, -7081, -7081, -4057, -4057, 1772, -468, -328, -468, -2568, 3932, -828, -328, -868, -828, -2928, -828, -2928, -5628, 116, -108, -94, -108, -318, 3932, -828, 2276, -468, -598, -1138, -94, -1138, -634, -828, -2928, -828, -2928, -5628, -468, -678, -828, -468, -3198, -5898, -678, -5898, -3378, 3696, 2096, -784, 1456, -784, -84, -284, -784, -4564, 1736, -504, -364, -504, -2604, 8016, 4616, -1504, 3256, -1504, -84, -284, -624, -824, -1504, -5284, -1504, -5284, -10144, 1736, -504, -364, -504, -2604, 3896, -864, -364, -904, -864, -2964, -864, -2964, -5664, 312, 152, -136, 88, -136, -66, -86, -136, -514, 116, -108, -94, -108, -318, 8016, 4616, -1504, 3256, -1504, 4632, 2672, -856, 1888, -856, -570, -590, -1110, -1130, -66, -86, -1110, -1130, -606, -626, -1504, -5284, -1504, -5284, -10144, -856, -1234, -1504, -856, -5770, -10630, -1234, -10630, -6094, 1772, -468, -328, -468, -2568, 3932, -828, -328, -868, -828, -2928, -828, -2928, -5628, 116, -108, -94, -108, -318, 3932, -828, 2276, -468, -598, -1138, -94, -1138, -634, -828, -2928, -828, -2928, -5628, -468, -678, -828, -468, -3198, -5898, -678, -5898, -3378, -2899, -2899, -2379, -4459, -2379, 741, 741, -2171, 741, -5083, -3003, 741, -2171, 741, 377, 377, 442, 182, 442, 741, 741, 4017, 4017, -2262, 650, 468, 650, 3380, -4810, -2730, 1014, -1898, 1014, 104, 364, 1014, 5928, -2262, 650, 468, 650, 3380, -6409, -6409, -5304, -9724, -5304, 1326, 1326, -4862, 1326, -11050, -6630, 1326, -4862, 1326, 377, 377, 442, 182, 442, 1079, 1079, 1144, 884, 1144, 1326, 1326, 4602, 4602, 1326, 1326, 4602, 4602, 8814, 8814, -2262, 650, 468, 650, 3380, -5070, 1118, 468, 1170, 1118, 3848, 1118, 3848, 7358, -4810, -2730, 1014, -1898, 1014, 104, 364, 1014, 5928, -2262, 650, 468, 650, 3380, -10426, -6006, 1950, -4238, 1950, 104, 364, 806, 1066, 1950, 6864, 1950, 6864, 13182, -2262, 650, 468, 650, 3380, -5070, 1118, 468, 1170, 1118, 3848, 1118, 3848, 7358, -2899, -2899, -2379, -4459, -2379, 741, 741, -2171, 741, -5083, -3003, 741, -2171, 741, 377, 377, 442, 182, 442, 741, 741, 4017, 4017, -2262, 650, 468, 650, 3380, -4810, -2730, 1014, -1898, 1014, 104, 364, 1014, 5928, -2262, 650, 468, 650, 3380, -6409, -6409, -5304, -9724, -5304, 1326, 1326, -4862, 1326, -11050, -6630, 1326, -4862, 1326, 377, 377, 442, 182, 442, 1079, 1079, 1144, 884, 1144, 1326, 1326, 4602, 4602, 1326, 1326, 4602, 4602, 8814, 8814, -2262, 650, 468, 650, 3380, -5070, 1118, 468, 1170, 1118, 3848, 1118, 3848, 7358, -4810, -2730, 1014, -1898, 1014, 104, 364, 1014, 5928, -2262, 650, 468, 650, 3380, -10426, -6006, 1950, -4238, 1950, 104, 364, 806, 1066, 1950, 6864, 1950, 6864, 13182, -2262, 650, 468, 650, 3380, -5070, 1118, 468, 1170, 1118, 3848, 1118, 3848, 7358, -299, -299, -259, -419, -259, -19, -19, -243, -19, -467, -307, -19, -243, -19, -47, -47, -42, -62, -42, -19, -19, 233, 233, -250, -26, -40, -26, 184, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -211, -211, -171, -331, -171, 69, 69, -155, 69, -379, -219, 69, -155, 69, 41, 41, 46, 26, 46, 69, 69, 321, 321, -162, 62, 48, 62, 272, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -299, -299, -259, -419, -259, -19, -19, -243, -19, -467, -307, -19, -243, -19, -47, -47, -42, -62, -42, -19, -19, 233, 233, -250, -26, -40, -26, 184, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -115, -115, -75, -235, -75, 165, 165, -59, 165, -283, -123, 165, -59, 165, 137, 137, 142, 122, 142, 165, 165, 417, 417, -66, 158, 144, 158, 368, -262, -102, 186, -38, 186, 116, 136, 186, 564, -66, 158, 144, 158, 368, -115, -115, -75, -235, -75, 165, 165, -59, 165, -283, -123, 165, -59, 165, 137, 137, 142, 122, 142, 165, 165, 417, 417, -66, 158, 144, 158, 368, -262, -102, 186, -38, 186, 116, 136, 186, 564, -66, 158, 144, 158, 368, 4263, 4263, 3528, 6468, 3528, -882, -882, 3234, -882, 7350, 4410, -882, 3234, -882, 2175, 2175, 1800, 3300, 1800, -450, -450, 1650, -450, 3750, 2250, -450, 1650, -450, -841, -841, -696, -1276, -696, 174, 174, -638, 174, -1450, -870, 174, -638, 174, 1711, 1711, 1416, 2596, 1416, -354, -354, 1298, -354, 2950, 1770, -354, 1298, -354, -841, -841, -696, -1276, -696, 174, 174, -638, 174, -1450, -870, 174, -638, 174, 4263, 4263, 3528, 6468, 3528, -882, -882, 3234, -882, 7350, 4410, -882, 3234, -882, 2175, 2175, 1800, 3300, 1800, -450, -450, 1650, -450, 3750, 2250, -450, 1650, -450, -6409, -6409, -5304, -9724, -5304, 1326, 1326, -4862, 1326, -11050, -6630, 1326, -4862, 1326, -6409, -6409, -5304, -9724, -5304, 1326, 1326, -4862, 1326, -11050, -6630, 1326, -4862, 1326, 1711, 1711, 1416, 2596, 1416, -354, -354, 1298, -354, 2950, 1770, -354, 1298, -354, -841, -841, -696, -1276, -696, 174, 174, -638, 174, -1450, -870, 174, -638, 174, 1711, 1711, 1416, 2596, 1416, -354, -354, 1298, -354, 2950, 1770, -354, 1298, -354, -3625, -3625, -3000, -5500, -3000, 750, 750, -2750, 750, -6250, -3750, 750, -2750, 750, -3625, -3625, -3000, -5500, -3000, 750, 750, -2750, 750, -6250, -3750, 750, -2750, 750, -663, -663, -658, -678, -658, -1203, -1203, -1198, -1218, -1198, -159, -159, -154, -174, -154, -1203, -1203, -1198, -1218, -1198, -699, -699, -694, -714, -694, 41, 41, 46, 26, 46, 95, 95, 100, 80, 100, -47, -47, -42, -62, -42, 41, 41, 46, 26, 46, -1137, -1137, -1132, -1152, -1132, -633, -633, -628, -648, -628, 95, 95, 100, 80, 100, -521, -521, -516, -536, -516, 95, 95, 100, 80, 100, -663, -663, -658, -678, -658, -1203, -1203, -1198, -1218, -1198, -159, -159, -154, -174, -154, -1203, -1203, -1198, -1218, -1198, -699, -699, -694, -714, -694, 809, 809, 814, 794, 814, 1511, 1511, 1516, 1496, 1516, 809, 809, 814, 794, 814, 1511, 1511, 1516, 1496, 1516, -47, -47, -42, -62, -42, 41, 41, 46, 26, 46, -47, -47, -42, -62, -42, 137, 137, 142, 122, 142, 137, 137, 142, 122, 142, -1065, -1065, -1060, -1080, -1060, -561, -561, -556, -576, -556, 167, 167, 172, 152, 172, -449, -449, -444, -464, -444, 167, 167, 172, 152, 172, -1065, -1065, -1060, -1080, -1060, -561, -561, -556, -576, -556, 1511, 1511, 1516, 1496, 1516, 1511, 1511, 1516, 1496, 1516, -449, -449, -444, -464, -444, 167, 167, 172, 152, 172, -449, -449, -444, -464, -444, 839, 839, 844, 824, 844, 839, 839, 844, 824, 844, -882, -882, -3402, -3402, -882, -882, -3402, -3402, -6642, -6642, -450, -450, -702, -702, -882, -882, -450, -450, -3726, -3726, -6966, -6966, -702, -702, -6966, -6966, -3942, -3942, 174, 174, 426, 426, 174, 174, 426, 426, 750, 750, -354, -354, -102, -102, 174, 174, 426, 426, -882, -882, -450, -450, 174, 174, -354, -354, 174, 174, -3798, -3798, -7038, -7038, -774, -774, -7038, -7038, -4014, -4014, 426, 426, 750, 750, -102, -102, 426, 426, -6642, -6642, -3618, -3618, 750, 750, -2946, -2946, 750, 750, -882, -882, -3402, -3402, -882, -882, -3402, -3402, -6642, -6642, -450, -450, -702, -702, -882, -882, -450, -450, -3726, -3726, -6966, -6966, -702, -702, -6966, -6966, -3942, -3942, 1326, 1326, 4602, 4602, 1326, 1326, 4602, 4602, 8814, 8814, 1326, 1326, 4602, 4602, 1326, 1326, 4602, 4602, 8814, 8814, -354, -354, -102, -102, 174, 174, 426, 426, -354, -354, -102, -102, 750, 750, 1002, 1002, 750, 750, 1002, 1002, -882, -882, -450, -450, 174, 174, -354, -354, 174, 174, -882, -882, -450, -450, 1326, 1326, 1326, 1326, -354, -354, 174, 174, -354, -354, 750, 750, 750, 750, -3798, -3798, -7038, -7038, -774, -774, -7038, -7038, -4014, -4014, 426, 426, 750, 750, -102, -102, 426, 426, -6642, -6642, -3618, -3618, 750, 750, -2946, -2946, 750, 750, -3798, -3798, -7038, -7038, -774, -774, -7038, -7038, -4014, -4014, 5034, 5034, 9246, 9246, 5034, 5034, 9246, 9246, -102, -102, 426, 426, -102, -102, 1002, 1002, 1002, 1002, -6210, -6210, -3186, -3186, 1182, 1182, -2514, -2514, 1182, 1182, -6210, -6210, -3186, -3186, 9246, 9246, 9246, 9246, -2514, -2514, 1182, 1182, -2514, -2514, 5214, 5214, 5214, 5214, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, 3670, -782, 2014, -422, -378, 98, 1646, -342, -378, 98, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -782, -2882, -782, -2882, -5582, -422, -632, -782, -422, -3152, -5852, -632, -5852, -3332, 98, 308, 98, 308, 578, -342, -132, 98, 308, -782, -422, 98, -342, 98, -3212, -5912, -692, -5912, -3392, 308, 578, -132, 308, -5582, -3062, 578, -2502, 578, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -2274, 638, 456, 638, 3368, -5082, 1106, 456, 1158, 1106, 3836, 1106, 3836, 7346, -2274, 638, 456, 638, 3368, -5082, 1106, 456, 1158, 1106, 3836, 1106, 3836, 7346, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, -250, -26, -40, -26, 184, -66, 158, 144, 158, 368, -66, 158, 144, 158, 368, 3382, -734, 1726, -374, -666, 146, 1358, -294, -666, 146, 3382, -734, 1726, -374, -5082, 1106, -5082, 1106, 1358, -294, -666, 146, 1358, -294, -2874, 626, -2874, 626, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -656, -1196, -152, -1196, -692, 816, 1518, 816, 1518, -40, 48, -40, 144, 144, -1058, -554, 174, -442, 174, -1058, -554, 1518, 1518, -442, 174, -442, 846, 846, -734, -2834, -734, -2834, -5534, -374, -584, -734, -374, -3104, -5804, -584, -5804, -3284, 146, 356, 146, 356, 626, -294, -84, 146, 356, -734, -374, 146, -294, 146, -3164, -5864, -644, -5864, -3344, 356, 626, -84, 356, -5534, -3014, 626, -2454, 626, -734, -2834, -734, -2834, -5534, -374, -584, -734, -374, -3104, -5804, -584, -5804, -3284, 1106, 3836, 1106, 3836, 7346, 1106, 3836, 1106, 3836, 7346, -294, -84, 146, 356, -294, -84, 626, 836, 626, 836, -734, -374, 146, -294, 146, -734, -374, 1106, 1106, -294, 146, -294, 626, 626, -3164, -5864, -644, -5864, -3344, 356, 626, -84, 356, -5534, -3014, 626, -2454, 626, -3164, -5864, -644, -5864, -3344, 4196, 7706, 4196, 7706, -84, 356, -84, 836, 836, -5174, -2654, 986, -2094, 986, -5174, -2654, 7706, 7706, -2094, 986, -2094, 4346, 4346, 3690, 2090, -790, 1450, -790, -90, -290, -790, -4570, 1730, -510, -370, -510, -2610, 8010, 4610, -1510, 3250, -1510, -90, -290, -630, -830, -1510, -5290, -1510, -5290, -10150, 1730, -510, -370, -510, -2610, 3890, -870, -370, -910, -870, -2970, -870, -2970, -5670, 306, 146, -142, 82, -142, -72, -92, -142, -520, 110, -114, -100, -114, -324, 8010, 4610, -1510, 3250, -1510, 4626, 2666, -862, 1882, -862, -576, -596, -1116, -1136, -72, -92, -1116, -1136, -612, -632, -1510, -5290, -1510, -5290, -10150, -862, -1240, -1510, -862, -5776, -10636, -1240, -10636, -6100, 1766, -474, -334, -474, -2574, 3926, -834, -334, -874, -834, -2934, -834, -2934, -5634, 110, -114, -100, -114, -324, 3926, -834, 2270, -474, -604, -1144, -100, -1144, -640, -834, -2934, -834, -2934, -5634, -474, -684, -834, -474, -3204, -5904, -684, -5904, -3384, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -790, -450, 162, -314, 162, 20, 40, 74, 94, 162, 540, 162, 540, 1026, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, 7482, 4302, -1422, 3030, -1422, 4098, 2358, -774, 1662, -774, -790, -450, 162, -314, 162, 3346, 1926, -630, 1358, -630, -790, -450, 162, -314, 162, -684, -664, -1224, -1204, -180, -160, -1224, -1204, -720, -700, 20, 40, 74, 94, -68, -48, 20, 40, -1158, -1138, -654, -634, 74, 94, -542, -522, 74, 94, -1422, -5202, -1422, -5202, -10062, -774, -1152, -1422, -774, -5688, -10548, -1152, -10548, -6012, 162, 540, 162, 540, 1026, -630, -252, 162, 540, -1422, -774, 162, -630, 162, -5796, -10656, -1260, -10656, -6120, 540, 1026, -252, 540, -10062, -5526, 1026, -4518, 1026, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, 3670, -782, 2014, -422, -378, 98, 1646, -342, -378, 98, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -782, -2882, -782, -2882, -5582, -422, -632, -782, -422, -3152, -5852, -632, -5852, -3332, 98, 308, 98, 308, 578, -342, -132, 98, 308, -782, -422, 98, -342, 98, -3212, -5912, -692, -5912, -3392, 308, 578, -132, 308, -5582, -3062, 578, -2502, 578, 3690, 2090, -790, 1450, -790, -90, -290, -790, -4570, 1730, -510, -370, -510, -2610, 8010, 4610, -1510, 3250, -1510, -90, -290, -630, -830, -1510, -5290, -1510, -5290, -10150, 1730, -510, -370, -510, -2610, 3890, -870, -370, -910, -870, -2970, -870, -2970, -5670, 306, 146, -142, 82, -142, -72, -92, -142, -520, 110, -114, -100, -114, -324, 8010, 4610, -1510, 3250, -1510, 4626, 2666, -862, 1882, -862, -576, -596, -1116, -1136, -72, -92, -1116, -1136, -612, -632, -1510, -5290, -1510, -5290, -10150, -862, -1240, -1510, -862, -5776, -10636, -1240, -10636, -6100, 1766, -474, -334, -474, -2574, 3926, -834, -334, -874, -834, -2934, -834, -2934, -5634, 110, -114, -100, -114, -324, 3926, -834, 2270, -474, -604, -1144, -100, -1144, -640, -834, -2934, -834, -2934, -5634, -474, -684, -834, -474, -3204, -5904, -684, -5904, -3384, -4774, -2694, 1050, -1862, 1050, 140, 400, 1050, 5964, -2226, 686, 504, 686, 3416, -10390, -5970, 1986, -4202, 1986, 140, 400, 842, 1102, 1986, 6900, 1986, 6900, 13218, -2226, 686, 504, 686, 3416, -5034, 1154, 504, 1206, 1154, 3884, 1154, 3884, 7394, -4774, -2694, 1050, -1862, 1050, 140, 400, 1050, 5964, -2226, 686, 504, 686, 3416, -10390, -5970, 1986, -4202, 1986, 140, 400, 842, 1102, 1986, 6900, 1986, 6900, 13218, -2226, 686, 504, 686, 3416, -5034, 1154, 504, 1206, 1154, 3884, 1154, 3884, 7394, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -358, -198, 90, -134, 90, 20, 40, 90, 468, -162, 62, 48, 62, 272, -446, -286, 2, -222, 2, -68, -48, 2, 380, -250, -26, -40, -26, 184, -262, -102, 186, -38, 186, 116, 136, 186, 564, -66, 158, 144, 158, 368, -262, -102, 186, -38, 186, 116, 136, 186, 564, -66, 158, 144, 158, 368, 6906, 3966, -1326, 2790, -1326, 3522, 2022, -678, 1422, -678, -1366, -786, 258, -554, 258, 2770, 1590, -534, 1118, -534, -1366, -786, 258, -554, 258, 6906, 3966, -1326, 2790, -1326, 3522, 2022, -678, 1422, -678, -10390, -5970, 1986, -4202, 1986, -10390, -5970, 1986, -4202, 1986, 2770, 1590, -534, 1118, -534, -1366, -786, 258, -554, 258, 2770, 1590, -534, 1118, -534, -5878, -3378, 1122, -2378, 1122, -5878, -3378, 1122, -2378, 1122, -684, -664, -1224, -1204, -180, -160, -1224, -1204, -720, -700, 20, 40, 74, 94, -68, -48, 20, 40, -1158, -1138, -654, -634, 74, 94, -542, -522, 74, 94, -684, -664, -1224, -1204, -180, -160, -1224, -1204, -720, -700, 788, 808, 1490, 1510, 788, 808, 1490, 1510, -68, -48, 20, 40, -68, -48, 116, 136, 116, 136, -1086, -1066, -582, -562, 146, 166, -470, -450, 146, 166, -1086, -1066, -582, -562, 1490, 1510, 1490, 1510, -470, -450, 146, 166, -470, -450, 818, 838, 818, 838, -1326, -5106, -1326, -5106, -9966, -678, -1056, -1326, -678, -5592, -10452, -1056, -10452, -5916, 258, 636, 258, 636, 1122, -534, -156, 258, 636, -1326, -678, 258, -534, 258, -5700, -10560, -1164, -10560, -6024, 636, 1122, -156, 636, -9966, -5430, 1122, -4422, 1122, -1326, -5106, -1326, -5106, -9966, -678, -1056, -1326, -678, -5592, -10452, -1056, -10452, -5916, 1986, 6900, 1986, 6900, 13218, 1986, 6900, 1986, 6900, 13218, -534, -156, 258, 636, -534, -156, 1122, 1500, 1122, 1500, -1326, -678, 258, -534, 258, -1326, -678, 1986, 1986, -534, 258, -534, 1122, 1122, -5700, -10560, -1164, -10560, -6024, 636, 1122, -156, 636, -9966, -5430, 1122, -4422, 1122, -5700, -10560, -1164, -10560, -6024, 7548, 13866, 7548, 13866, -156, 636, -156, 1500, 1500, -9318, -4782, 1770, -3774, 1770, -9318, -4782, 13866, 13866, -3774, 1770, -3774, 7818, 7818, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -162, 62, 48, 62, 272, -378, 98, 48, 102, 98, 308, 98, 308, 578, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, 3670, -782, 2014, -422, -378, 98, 1646, -342, -378, 98, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -782, -2882, -782, -2882, -5582, -422, -632, -782, -422, -3152, -5852, -632, -5852, -3332, 98, 308, 98, 308, 578, -342, -132, 98, 308, -782, -422, 98, -342, 98, -3212, -5912, -692, -5912, -3392, 308, 578, -132, 308, -5582, -3062, 578, -2502, 578, 1774, -466, -326, -466, -2566, 3934, -826, -326, -866, -826, -2926, -826, -2926, -5626, 118, -106, -92, -106, -316, 3934, -826, 2278, -466, -596, -1136, -92, -1136, -632, -826, -2926, -826, -2926, -5626, -466, -676, -826, -466, -3196, -5896, -676, -5896, -3376, -2274, 638, 456, 638, 3368, -5082, 1106, 456, 1158, 1106, 3836, 1106, 3836, 7346, -2274, 638, 456, 638, 3368, -5082, 1106, 456, 1158, 1106, 3836, 1106, 3836, 7346, -250, -26, -40, -26, 184, -162, 62, 48, 62, 272, -250, -26, -40, -26, 184, -66, 158, 144, 158, 368, -66, 158, 144, 158, 368, 3382, -734, 1726, -374, -666, 146, 1358, -294, -666, 146, 3382, -734, 1726, -374, -5082, 1106, -5082, 1106, 1358, -294, -666, 146, 1358, -294, -2874, 626, -2874, 626, -656, -1196, -152, -1196, -692, 48, 102, -40, 48, -1130, -626, 102, -514, 102, -656, -1196, -152, -1196, -692, 816, 1518, 816, 1518, -40, 48, -40, 144, 144, -1058, -554, 174, -442, 174, -1058, -554, 1518, 1518, -442, 174, -442, 846, 846, -734, -2834, -734, -2834, -5534, -374, -584, -734, -374, -3104, -5804, -584, -5804, -3284, 146, 356, 146, 356, 626, -294, -84, 146, 356, -734, -374, 146, -294, 146, -3164, -5864, -644, -5864, -3344, 356, 626, -84, 356, -5534, -3014, 626, -2454, 626, -734, -2834, -734, -2834, -5534, -374, -584, -734, -374, -3104, -5804, -584, -5804, -3284, 1106, 3836, 1106, 3836, 7346, 1106, 3836, 1106, 3836, 7346, -294, -84, 146, 356, -294, -84, 626, 836, 626, 836, -734, -374, 146, -294, 146, -734, -374, 1106, 1106, -294, 146, -294, 626, 626, -3164, -5864, -644, -5864, -3344, 356, 626, -84, 356, -5534, -3014, 626, -2454, 626, -3164, -5864, -644, -5864, -3344, 4196, 7706, 4196, 7706, -84, 356, -84, 836, 836, -5174, -2654, 986, -2094, 986, -5174, -2654, 7706, 7706, -2094, 986, -2094, 4346, 4346]\n assert 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 candidate(expression = \"100-25*4+30/6\") == []\n assert 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 candidate(expression = \"10+5*2-3/1\") == []\n assert candidate(expression = \"33-22*1+44/4-55*6+77\") == []\n assert candidate(expression = \"8*3+9-4/2+5-7\") == []\n assert 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 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 candidate(expression = \"15/3+2*4-8/2\") == []\n assert candidate(expression = \"15+25*35-45*55/65\") == []\n assert 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 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 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 candidate(expression = \"7+6*5-4/2\") == []\n assert 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 candidate(expression = \"9*9-8/2+7-6*5+4\") == []\n assert candidate(expression = \"50+25-10*2+5\") == [5, 50, 155, 60, 85, 5, 50, 455, 455, 60, 85, 60, 135, 135]\n assert 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 candidate(expression = \"1+2-3*4/5+6-7*8/9+10\") == []\n assert candidate(expression = \"4+3*2-1+5*6/3\") == []\n assert 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 candidate(expression = \"3*7-2+5*8-4/2+6\") == []\n assert 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 candidate(expression = \"10+2*6/3-8\") == []\n assert 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 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 candidate(expression = \"55+33*2-11/1+44-66\") == []\n assert candidate(expression = \"12*5+3-6/2*4\") == []\n assert 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 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 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 candidate(expression = \"20+19-18*17/16+15\") == []\n assert 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 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 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 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 candidate(expression = \"11+11*11-11*11+11*11-11*11\") == [145211, -1199, -1199, -1199, -147609, 292952, 132, -1199, -14509, -14509, -160919, 132, -160919, -307329, 12111, -1199, -1199, -1199, -14509, 292952, 132, 159852, 132, -14509, -27819, -1199, -27819, -14509, -14509, -160919, 132, -160919, -307329, -14509, -27819, 132, 132, -174229, -320639, -27819, -320639, -174229, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -14509, -1199, -1199, -1199, 12111, -13299, 11, 11, 11, 13321, 279521, 11, 146421, 11, 11, 11, 119801, 11, -13299, 11, -17171, -30481, -3861, -30481, -17171, -1320, -1320, -1199, 11, -29271, -15961, -1320, -13299, 11, -13299, -159709, 1342, -159709, -306119, -13299, -26609, 1342, 1342, -173019, -319429, -26609, -319429, -173019, 11, 11, 11, 11, 11, -13299, 11, 11, 13321, 11, 11, 11, 11, 11, -175681, -322091, -29271, -322091, -175681, -1320, -1320, 11, 13321, -308781, -162371, -1320, -133089, 13321, 13321, 11, 11, 11, -13299, 26752, 132, 11, -1199, -1199, -14509, 132, -14509, -27819, 1221, 11, 11, 11, -1199, 26752, 132, 14652, 132, -1199, -2409, 11, -2409, -1199, -1199, -14509, 132, -14509, -27819, -1199, -2409, 132, 132, -15719, -29029, -2409, -29029, -15719, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -131879, 1221, 1221, 1221, 134321, -266189, 11, 1221, 13321, 13321, 146421, 11, 146421, 279521, -2409, -1199, -1199, -1199, 11, -1199, 11, 11, 11, 1221, -1199, 11, 11, 11, 1221, -1199, 11, 11, 11, 1221, 11, 1221, 1221, 1221, 2431, 279521, 11, 146421, 11, 11, 11, 119801, 11, -13299, 11, 13321, 11, 1221, 11, 11, 11, -266189, 11, 131901, 11, -1199, 11, -1199, 11, -1199, 11, -134299, 11, -15961, -29271, -2651, -29271, -15961, -110, -110, 11, 1221, -28061, -14751, -110, -12089, 1221, -1441, -2651, -231, -2651, -1441, -110, -110, 14410, 26510, -1199, 11, 11, 11, 1221, -28061, -14751, -110, -12089, 1221, -1441, -231, -110, 26510, -13299, 11, 11, 11, 13321, -13299, -159709, 1342, -159709, -306119, -13299, -26609, 1342, 1342, -173019, -319429, -26609, -319429, -173019, 11, 11, 11, 11, 11, -13299, 11, 11, 13321, 11, 11, 11, 11, 11, -175681, -322091, -29271, -322091, -175681, -1320, -1320, 11, 13321, -308781, -162371, -1320, -133089, 13321, 11, -13299, 1342, -13299, -26609, 11, -1199, 1342, 1342, -14509, -27819, -1199, -27819, -14509, 11, 11, 11, 11, 11, 13321, 146421, 11, 146421, 279521, -13299, -12089, 11, 1221, 11, 1221, 11, 1221, 13321, 14531, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -174471, -320881, -28061, -320881, -174471, -110, -110, 1221, 14531, -307571, -161161, -110, -131879, 14531, -14751, -28061, -1441, -28061, -14751, -110, -110, 159610, 292710, -12089, 1221, 1221, 1221, 14531, -307571, -161161, -110, -131879, 14531, -14751, -1441, -110, 292710, -145189, 1221, 1221, 1221, 147631, 290400, -2420, -2420, -2420, -295240, 585882, 242, -2420, -29040, -29040, -321860, 242, -321860, -614680, 24200, -2420, -2420, -2420, -29040, 585882, 242, 319682, 242, -29040, -55660, -2420, -55660, -29040, -29040, -321860, 242, -321860, -614680, -29040, -55660, 242, 242, -348480, -641300, -55660, -641300, -348480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -29040, -2420, -2420, -2420, 24200, -26620, 0, 0, 0, 26620, 559020, 0, 292820, 0, 0, 0, 239580, 0, -26620, 0, -34364, -60984, -7744, -60984, -34364, -2662, -2662, -2420, 0, -58564, -31944, -2662, -26620, 0, -26620, -319440, 2662, -319440, -612260, -26620, -53240, 2662, 2662, -346060, -638880, -53240, -638880, -346060, 0, 0, 0, 0, 0, -26620, 0, 0, 26620, 0, 0, 0, 0, 0, -351384, -644204, -58564, -644204, -351384, -2662, -2662, 0, 26620, -617584, -324764, -2662, -266200, 26620, 13321, 11, 11, 11, -13299, 26752, 132, 11, -1199, -1199, -14509, 132, -14509, -27819, 1221, 11, 11, 11, -1199, 26752, 132, 14652, 132, -1199, -2409, 11, -2409, -1199, -1199, -14509, 132, -14509, -27819, -1199, -2409, 132, 132, -15719, -29029, -2409, -29029, -15719, 13431, 121, 121, 121, -13189, 26862, 242, 121, -1089, -1089, -14399, 242, -14399, -27709, 1331, 121, 121, 121, -1089, 26862, 242, 14762, 242, -1089, -2299, 121, -2299, -1089, -1089, -14399, 242, -14399, -27709, -1089, -2299, 242, 242, -15609, -28919, -2299, -28919, -15609, -13189, 121, 121, 121, 13431, -26620, 0, 121, 1331, 1331, 14641, 0, 14641, 27951, -145079, 1331, 1331, 1331, 147741, -292820, 0, 1331, 14641, 14641, 161051, 0, 161051, 307461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -145079, 1331, 1331, 1331, 147741, -292820, 0, 1331, 14641, 14641, 161051, 0, 161051, 307461, -276969, 2541, 2541, 2541, 282051, -559020, 0, 2541, 27951, 27951, 307461, 0, 307461, 586971, -2409, -1199, -1199, -1199, 11, -1199, 11, 11, 11, 1221, -1199, 11, 11, 11, 1221, -1199, 11, 11, 11, 1221, 11, 1221, 1221, 1221, 2431, -3630, -2420, -2420, -2420, -1210, -1210, 0, 0, 0, 1210, -1199, 11, 11, 11, 1221, -1089, 121, 121, 121, 1331, -1089, 121, 121, 121, 1331, 121, 1331, 1331, 1331, 2541, -1210, 0, 0, 0, 1210, 121, 1331, 1331, 1331, 2541, 1331, 2541, 2541, 2541, 3751, 278300, 0, 145200, 0, -1210, 0, 118580, 0, -14520, 0, 12100, 0, 0, 0, -1210, 0, -267410, 0, 130680, 0, -2420, 0, -2420, 0, -2420, 0, -135520, 0, 559020, 0, 292820, 0, 0, 0, 239580, 0, -26620, 0, 12100, 0, 0, 0, 0, 0, -12100, 0, -26620, 0, -292820, 0, 0, 0, -292820, 0, -559020, 0, 130680, 0, -2420, 0, -2420, 0, -2420, 0, -135520, 0, 264990, 0, -1210, 0, -2420, 0, -14520, 0, -14520, 0, -147620, 0, -1210, 0, -147620, 0, -280720, 0, -15961, -29271, -2651, -29271, -15961, -110, -110, 11, 1221, -28061, -14751, -110, -12089, 1221, -1441, -2651, -231, -2651, -1441, -110, -110, 14410, 26510, -1199, 11, 11, 11, 1221, -28061, -14751, -110, -12089, 1221, -1441, -231, -110, 26510, -13299, 11, 11, 11, 13321, -31823, -58443, -5203, -58443, -31823, -121, -121, 121, 2541, -56023, -29403, -121, -24079, 2541, -1441, -2651, -231, -2651, -1441, -1331, -2541, -121, -2541, -1331, 1331, 2541, 15851, 29161, -121, -121, 15851, 29161, 30371, 55781, -1199, 11, 11, 11, 1221, -2420, 0, 11, 121, 121, 1331, 0, 1331, 2541, -27951, -14641, 0, -11979, 1331, -1331, -121, 0, 26620, -13189, 121, 121, 121, 13431, -56023, -29403, -121, -24079, 2541, -1331, -121, -121, 1089, 2541, 29161, -121, 29161, 55781, -13189, 121, 121, 121, 13431, -26620, 0, 121, 1331, 1331, 14641, 0, 14641, 27951, -13189, -159599, 1452, -159599, -306009, -13189, -26499, 1452, 1452, -172909, -319319, -26499, -319319, -172909, 121, 121, 121, 121, 121, -13189, 121, 121, 13431, 121, 121, 121, 121, 121, -175571, -321981, -29161, -321981, -175571, -1210, -1210, 121, 13431, -308671, -162261, -1210, -132979, 13431, 121, -13189, 1452, -13189, -26499, 121, -1089, 1452, 1452, -14399, -27709, -1089, -27709, -14399, 121, 121, 121, 121, 121, 13431, 146531, 121, 146531, 279631, -13189, -11979, 121, 1331, 121, 1331, 121, 1331, 13431, 14641, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, -174361, -320771, -27951, -320771, -174361, 0, 0, 1331, 14641, -307461, -161051, 0, -131769, 14641, -14641, -27951, -1331, -27951, -14641, 0, 0, 159720, 292820, -11979, 1331, 1331, 1331, 14641, -307461, -161051, 0, -131769, 14641, -14641, -1331, 0, 292820, -145079, 1331, 1331, 1331, 147741, -26620, -319440, 2662, -319440, -612260, -26620, -53240, 2662, 2662, -346060, -638880, -53240, -638880, -346060, 0, 0, 0, 0, 0, -26620, 0, 0, 26620, 0, 0, 0, 0, 0, -351384, -644204, -58564, -644204, -351384, -2662, -2662, 0, 26620, -617584, -324764, -2662, -266200, 26620, 121, -13189, 1452, -13189, -26499, 121, -1089, 1452, 1452, -14399, -27709, -1089, -27709, -14399, 1331, -11979, 2662, -11979, -25289, 1331, 121, 2662, 2662, -13189, -26499, 121, -26499, -13189, 1331, 14641, 0, 14641, 27951, 14641, 161051, 0, 161051, 307461, 0, 0, 0, 0, 0, 14641, 161051, 0, 161051, 307461, 27951, 307461, 0, 307461, 586971, -13189, -11979, 121, 1331, 121, 1331, 121, 1331, 13431, 14641, -26620, -25410, 0, 1210, 121, 1331, 1331, 2541, 1331, 2541, 14641, 15851, 0, 1210, 14641, 15851, 27951, 29161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -174361, -320771, -27951, -320771, -174361, 0, 0, 1331, 14641, -307461, -161051, 0, -131769, 14641, -14641, -27951, -1331, -27951, -14641, 0, 0, 159720, 292820, -11979, 1331, 1331, 1331, 14641, -307461, -161051, 0, -131769, 14641, -14641, -1331, 0, 292820, -145079, 1331, 1331, 1331, 147741, -348843, -641663, -56023, -641663, -348843, -121, -121, 2541, 29161, -615043, -322223, -121, -263659, 29161, -14641, -27951, -1331, -27951, -14641, -13431, -26741, -121, -26741, -13431, 15851, 29161, 175571, 321981, -121, -121, 175571, 321981, 335291, 614801, -11979, 1331, 1331, 1331, 14641, -25410, 1210, 1331, 2541, 2541, 15851, 1210, 15851, 29161, -306251, -159841, 1210, -130559, 15851, -13431, -121, 1210, 294030, -143869, 2541, 2541, 2541, 148951, -615043, -322223, -121, -263659, 29161, -13431, -121, -121, 13189, 29161, 321981, -121, 321981, 614801, -143869, 2541, 2541, 2541, 148951, -291610, 1210, 2541, 15851, 15851, 162261, 1210, 162261, 308671]\n assert 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 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 candidate(expression = \"11+12*13-14/7+15\") == []\n assert 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 candidate(expression = \"6*3+4-2*5/1+7\") == []\n assert 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 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 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 candidate(expression = \"10+5*2-3/1+8\") == []\n assert candidate(expression = \"1*2*3*4*5\") == [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120]\n assert 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 candidate(expression = \"66-44*3+22/1-55*7+88\") == []\n assert candidate(expression = \"6/2+3*4-5\") == []\n assert 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 candidate(expression = \"77+55*2-33/3+22*8-11\") == []\n assert 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 candidate(expression = \"100-50*2+25*4/2\") == []\n assert 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 candidate(expression = \"5+3*2-8/4+6\") == []\n assert candidate(expression = \"7-3+2*5-8/4\") == []\n assert candidate(expression = \"8*3-2*4+6/2-1\") == []\n assert candidate(expression = \"7-3*2+4*5-6/2\") == []\n assert 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 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 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 candidate(expression = \"99*98-97*96+95*94-93*92\") == [7718843484, -84842406, -4503708, -84842406, -7808189598, 15520781628, -168734214, -4503708, -90239292, -168734214, -7892081406, -168734214, -7892081406, -15779755134, 78672924, -1777446, -949212, -1777446, -81399582, 15520781628, -168734214, 7880611068, -85669254, -85819932, -171555516, -949212, -171555516, -86684796, -168734214, -7892081406, -168734214, -7892081406, -15779755134, -85669254, -165291390, -168734214, -85669254, -7973397630, -15861071358, -165291390, -15861071358, -8052965118, -79575606, 874764, 46530, 874764, 80496900, -160007958, 1739628, 46530, 930402, 1739628, 81361764, 1739628, 81361764, 162677988, -80497296, -46926, -875160, -46926, 79575210, -79575606, 874764, 46530, 874764, 80496900, 15438673602, -167851332, 7798503042, -84786372, -160007958, 1739628, 7639332822, -83055852, -160007958, 1739628, -87514020, -173249604, -2643300, -173249604, -88378884, 46530, 930402, -875160, 46530, -172347318, -87476598, 930402, -85708458, 930402, -167851332, -7891198524, -167851332, -7891198524, -15778872252, -84786372, -164408508, -167851332, -84786372, -7972514748, -15860188476, -164408508, -15860188476, -8052082236, 1739628, 81361764, 1739628, 81361764, 162677988, -83055852, -3433716, 1739628, 81361764, -167851332, -84786372, 1739628, -83055852, 1739628, -7974208836, -15861882564, -166102596, -15861882564, -8053776324, 81361764, 162677988, -3433716, 81361764, -15778872252, -7970766012, 162677988, -7808097132, 162677988, 77977720, -847390, -35888, -847390, -78860998, 156785176, -1694782, -35888, -901904, -1694782, -79708390, -1694782, -79708390, -159381862, 804280, -8350, 16, -8350, -812614, 156785176, -1694782, 79611736, -855742, -857264, -1723280, 16, -1723280, -866000, -1694782, -79708390, -1694782, -79708390, -159381862, -855742, -1660006, -1694782, -855742, -80529766, -160203238, -1660006, -160203238, -81333478, -79575606, 874764, 46530, 874764, 80496900, -160007958, 1739628, 46530, 930402, 1739628, 81361764, 1739628, 81361764, 162677988, -7720441370, 84869780, 4514350, 84869780, 7809825500, -15524004410, 168779060, 4514350, 90267790, 168779060, 7893734780, 168779060, 7893734780, 15783051260, -1716076, -903446, -911812, -903446, -99182, -794386, 18244, 9878, 18244, 822508, -803500, 9130, 764, 9130, 813394, -794386, 18244, 9878, 18244, 822508, 118190, 930820, 922454, 930820, 1735084, 15438673602, -167851332, 7798503042, -84786372, -160007958, 1739628, 7639332822, -83055852, -160007958, 1739628, 74677150, -811900, -2496290, 27140, -160007958, 1739628, -15524004410, 168779060, 7718114042, -83912372, -81226738, 883108, -4104070, 44620, -81226738, 883108, -7803444850, 84840100, -86675532, -172411116, -1804812, -172411116, -87540396, 885018, 1768890, -36672, 885018, -171508830, -86638110, 1768890, -84869970, 1768890, -874376, -1740392, -17096, -1740392, -883112, 885018, 1768890, 86686174, 172439614, -911812, 9878, 764, 9878, 922454, -171508830, -86638110, 1768890, -84869970, 1768890, -838106, 19174, 1768890, 172439614, -85745110, 893750, 37034, 893750, 86675894, -167851332, -7891198524, -167851332, -7891198524, -15778872252, -84786372, -164408508, -167851332, -84786372, -7972514748, -15860188476, -164408508, -15860188476, -8052082236, 1739628, 81361764, 1739628, 81361764, 162677988, -83055852, -3433716, 1739628, 81361764, -167851332, -84786372, 1739628, -83055852, 1739628, -7974208836, -15861882564, -166102596, -15861882564, -8053776324, 81361764, 162677988, -3433716, 81361764, -15778872252, -7970766012, 162677988, -7808097132, 162677988, -811900, -78825508, -811900, -78825508, -158498980, 27140, -777124, -811900, 27140, -79646884, -159320356, -777124, -159320356, -80450596, 1739628, 81361764, 1739628, 81361764, 162677988, 168779060, 7893734780, 168779060, 7893734780, 15783051260, -83912372, -83108108, 883108, 1687372, 44620, 848884, 883108, 1687372, 84840100, 85644364, -167851332, -84786372, 1739628, -83055852, 1739628, -811900, 27140, 1739628, 168779060, -83912372, 883108, 44620, 883108, 84840100, -7973370348, -15861044076, -165264108, -15861044076, -8052937836, 82200252, 163516476, -2595228, 82200252, -15778033764, -7969927524, 163516476, -7807258644, 163516476, -79663996, -159337468, -794236, -159337468, -80467708, 82200252, 163516476, 7975906604, 15865223084, -83108108, 1687372, 848884, 1687372, 85644364, -15778033764, -7969927524, 163516476, -7807258644, 163516476, -76327156, 2542604, 163516476, 15865223084, -7887771524, 83003596, 4185724, 83003596, 7974960844]\n assert 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 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 candidate(expression = \"12+34-56*78/9\") == []\n assert candidate(expression = \"15-5*3+2-8/4+9*2\") == []\n assert 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 candidate(expression = \"55+44*3-22/2+11*9-88\") == []\n assert 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 candidate(expression = \"44-22*3+55/5-66*7+88\") == []\n assert candidate(expression = \"9*3-4*2+1/1-5\") == []\n assert candidate(expression = \"9*3+2*8-4*5+6/3\") == []\n assert 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 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 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 candidate(expression = \"22*9-88+77/7-66*5+44\") == []\n assert 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 candidate(expression = \"10*2-5*3+2-8/4+9*2\") == []\n assert candidate(expression = \"7-6+5*4-3\") == [-4, -16, -4, -16, -34, 6, 18, -4, 6, -22, -40, 18, -19, 21]\n assert candidate(expression = \"12-8*2+4/1+6*2-5\") == []\n assert candidate(expression = \"7+3*2-5/1+8\") == []\n assert candidate(expression = \"100-50*2+25/5+15*3-5*2\") == []\n assert candidate(expression = \"8-6*2+4/2+3*3-1\") == []\n assert 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 candidate(expression = \"5-3*2+4*3\") == [-37, -49, -13, -49, -25, 28, 36, 11, 16, -39, -15, 36, 9, 24]\n assert 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 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 candidate(expression = \"18*2-5*3+6/2-4*3\") == []\n assert 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 candidate(expression = \"15-14*13+12*11-10*9+8*7\") == [107185, 197905, 22513, 197905, 113233, -11087, -20159, 3697, -11087, 186817, 102145, -20159, 83329, -20159, 7085, 14645, 29, 14645, 7589, -11087, -20159, -111187, -203419, 12321, -2463, -1539, -2463, -16323, 186817, 102145, -20159, 83329, -20159, 3557, -3499, -20159, -203419, 91953, -11535, -5067, -11535, -108555, 223665, 412665, 47265, 412665, 236265, -22735, -41635, 8065, -22735, 389565, 213165, -41635, 173965, -41635, 7085, 14645, 29, 14645, 7589, 5265, 12825, -1791, 12825, 5769, -22735, -41635, -122835, -224895, -22735, -41635, -122835, -224895, -241135, -441475, 12321, -2463, -1539, -2463, -16323, 26881, -3919, -1539, -3359, -3919, -17779, -3919, -17779, -34159, 185725, 101053, -21251, 82237, -21251, 2465, -4591, -21251, -204511, 90861, -12627, -6159, -12627, -109647, 389565, 213165, -41635, 173965, -41635, 2465, -4591, -10275, -17331, -41635, -224895, -41635, -224895, -441475, 90861, -12627, -6159, -12627, -109647, 192781, -22819, -6159, -18899, -22819, -119839, -22819, -119839, -234499, 7501, 13981, 1453, 13981, 7933, -947, -1595, 109, -947, 13189, 7141, -1595, 5797, -1595, 351, 891, -153, 891, 387, -947, -1595, -8097, -14685, 725, -331, -265, -331, -1321, 13189, 7141, -1595, 5797, -1595, 99, -405, -1595, -14685, 6413, -979, -517, -979, -7909, 223665, 412665, 47265, 412665, 236265, -22735, -41635, 8065, -22735, 389565, 213165, -41635, 173965, -41635, 123981, 228741, 26205, 228741, 130965, -12595, -23071, 4477, -12595, 215937, 118161, -23071, 96433, -23071, -1365, -825, -1869, -825, -1329, -3185, -2645, -3689, -2645, -3149, 351, 891, -153, 891, 387, -3185, -2645, -3689, -2645, -3149, -1469, -929, -1973, -929, -1433, -22735, -41635, -122835, -224895, -22735, -41635, -122835, -224895, -241135, -441475, -12595, -23071, -19745, -36161, -22735, -41635, -12595, -23071, -131285, -240365, -249585, -456945, -19745, -36161, -249585, -456945, -138045, -252741, 13049, -1735, -811, -1735, -15595, 27609, -3191, -811, -2631, -3191, -17051, -3191, -17051, -33431, 725, -331, -265, -331, -1321, 27609, -3191, 15285, -1787, -1981, -3801, -265, -3801, -2085, -3191, -17051, -3191, -17051, -33431, -1787, -2777, -3191, -1787, -18221, -34601, -2777, -34601, -19157, 185725, 101053, -21251, 82237, -21251, 2465, -4591, -21251, -204511, 90861, -12627, -6159, -12627, -109647, 389565, 213165, -41635, 173965, -41635, 2465, -4591, -10275, -17331, -41635, -224895, -41635, -224895, -441475, 90861, -12627, -6159, -12627, -109647, 192781, -22819, -6159, -18899, -22819, -119839, -22819, -119839, -234499, 12097, 6049, -2687, 4705, -2687, -993, -1497, -2687, -15777, 5321, -2071, -1609, -2071, -9001, 389565, 213165, -41635, 173965, -41635, 215937, 118161, -23071, 96433, -23071, -13005, -13509, -25745, -26249, -993, -1497, -25745, -26249, -13733, -14237, -41635, -224895, -41635, -224895, -441475, -23071, -36161, -41635, -23071, -240365, -456945, -36161, -456945, -252741, 91589, -11899, -5431, -11899, -108919, 193509, -22091, -5431, -18171, -22091, -119111, -22091, -119111, -233771, 5321, -2071, -1609, -2071, -9001, 193509, -22091, 107241, -12263, -13621, -26361, -1609, -26361, -14349, -22091, -119111, -22091, -119111, -233771, -12263, -19193, -22091, -12263, -127301, -241961, -19193, -241961, -133853, -7655, -14135, -1607, -14135, -8087, 793, 1441, -263, 793, -13343, -7295, 1441, -5951, 1441, -505, -1045, -1, -1045, -541, 793, 1441, 7943, 14531, -879, 177, 111, 177, 1167, -13343, -7295, 1441, -5951, 1441, -253, 251, 1441, 14531, -6567, 825, 363, 825, 7755, -15975, -29475, -3375, -29475, -16875, 1625, 2975, -575, 1625, -27825, -15225, 2975, -12425, 2975, -505, -1045, -1, -1045, -541, -375, -915, 129, -915, -411, 1625, 2975, 8775, 16065, 1625, 2975, 8775, 16065, 17225, 31535, -879, 177, 111, 177, 1167, -1919, 281, 111, 241, 281, 1271, 281, 1271, 2441, -13265, -7217, 1519, -5873, 1519, -175, 329, 1519, 14609, -6489, 903, 441, 903, 7833, -27825, -15225, 2975, -12425, 2975, -175, 329, 735, 1239, 2975, 16065, 2975, 16065, 31535, -6489, 903, 441, 903, 7833, -13769, 1631, 441, 1351, 1631, 8561, 1631, 8561, 16751, -7835, -14315, -1787, -14315, -8267, 613, 1261, -443, 613, -13523, -7475, 1261, -6131, 1261, -685, -1225, -181, -1225, -721, 613, 1261, 7763, 14351, -1059, -3, -69, -3, 987, -13523, -7475, 1261, -6131, 1261, -433, 71, 1261, 14351, -6747, 645, 183, 645, 7575, -7655, -14135, -1607, -14135, -8087, 793, 1441, -263, 793, -13343, -7295, 1441, -5951, 1441, -505, -1045, -1, -1045, -541, 793, 1441, 7943, 14531, -879, 177, 111, 177, 1167, -13343, -7295, 1441, -5951, 1441, -253, 251, 1441, 14531, -6567, 825, 363, 825, 7755, 214065, 394965, 45225, 394965, 226125, -21775, -39865, 7705, -21775, 372855, 204015, -39865, 166495, -39865, 114381, 211041, 24165, 211041, 120825, -11635, -21301, 4117, -11635, 199227, 109011, -21301, 88963, -21301, -15975, -29475, -3375, -29475, -16875, 1625, 2975, -575, 1625, -27825, -15225, 2975, -12425, 2975, 99045, 182745, 20925, 182745, 104625, -10075, -18445, 3565, -10075, 172515, 94395, -18445, 77035, -18445, -15975, -29475, -3375, -29475, -16875, 1625, 2975, -575, 1625, -27825, -15225, 2975, -12425, 2975, -2665, -3205, -2161, -3205, -2701, -4485, -5025, -3981, -5025, -4521, -949, -1489, -445, -1489, -985, -4485, -5025, -3981, -5025, -4521, -2769, -3309, -2265, -3309, -2805, -505, -1045, -1, -1045, -541, -375, -915, 129, -915, -411, -685, -1225, -181, -1225, -721, -505, -1045, -1, -1045, -541, -4335, -4875, -3831, -4875, -4371, -2619, -3159, -2115, -3159, -2655, -375, -915, 129, -915, -411, -2355, -2895, -1851, -2895, -2391, -375, -915, 129, -915, -411, -21775, -39865, -121875, -223125, -21775, -39865, -121875, -223125, -240175, -439705, -11635, -21301, -18785, -34391, -21775, -39865, -11635, -21301, -130325, -238595, -248625, -455175, -18785, -34391, -248625, -455175, -137085, -250971, 1625, 2975, 8775, 16065, 1625, 2975, 8775, 16065, 17225, 31535, -10075, -18445, -2925, -5355, 1625, 2975, 8775, 16065, -21775, -39865, -11635, -21301, 1625, 2975, -10075, -18445, 1625, 2975, -131625, -240975, -249925, -457555, -20085, -36771, -249925, -457555, -138385, -253351, 8775, 16065, 17225, 31535, -2925, -5355, 8775, 16065, -240175, -439705, -128635, -235501, 17225, 31535, -111475, -204085, 17225, 31535, 13161, -1623, -699, -1623, -15483, 27721, -3079, -699, -2519, -3079, -16939, -3079, -16939, -33319, 837, -219, -153, -219, -1209, 27721, -3079, 15397, -1675, -1869, -3689, -153, -3689, -1973, -3079, -16939, -3079, -16939, -33319, -1675, -2665, -3079, -1675, -18109, -34489, -2665, -34489, -19045, -879, 177, 111, 177, 1167, -1919, 281, 111, 241, 281, 1271, 281, 1271, 2441, -1059, -3, -69, -3, 987, -879, 177, 111, 177, 1167, 26521, -2959, 14197, -1555, -1919, 281, 12301, -1339, -1919, 281, -2049, -3869, -333, -3869, -2153, 111, 241, -69, 111, -3719, -2003, 241, -1739, 241, -2959, -16819, -2959, -16819, -33199, -1555, -2545, -2959, -1555, -17989, -34369, -2545, -34369, -18925, 281, 1271, 281, 1271, 2441, -1339, -349, 281, 1271, -2959, -1555, 281, -1339, 281, -18169, -34549, -2725, -34549, -19105, 1271, 2441, -349, 1271, -33199, -17755, 2441, -15379, 2441, 185815, 101143, -21161, 82327, -21161, 2555, -4501, -21161, -204421, 90951, -12537, -6069, -12537, -109557, 389655, 213255, -41545, 174055, -41545, 2555, -4501, -10185, -17241, -41545, -224805, -41545, -224805, -441385, 90951, -12537, -6069, -12537, -109557, 192871, -22729, -6069, -18809, -22729, -119749, -22729, -119749, -234409, 12187, 6139, -2597, 4795, -2597, -903, -1407, -2597, -15687, 5411, -1981, -1519, -1981, -8911, 389655, 213255, -41545, 174055, -41545, 216027, 118251, -22981, 96523, -22981, -12915, -13419, -25655, -26159, -903, -1407, -25655, -26159, -13643, -14147, -41545, -224805, -41545, -224805, -441385, -22981, -36071, -41545, -22981, -240275, -456855, -36071, -456855, -252651, 91679, -11809, -5341, -11809, -108829, 193599, -22001, -5341, -18081, -22001, -119021, -22001, -119021, -233681, 5411, -1981, -1519, -1981, -8911, 193599, -22001, 107331, -12173, -13531, -26271, -1519, -26271, -14259, -22001, -119021, -22001, -119021, -233681, -12173, -19103, -22001, -12173, -127211, -241871, -19103, -241871, -133763, -13265, -7217, 1519, -5873, 1519, -175, 329, 1519, 14609, -6489, 903, 441, 903, 7833, -27825, -15225, 2975, -12425, 2975, -175, 329, 735, 1239, 2975, 16065, 2975, 16065, 31535, -6489, 903, 441, 903, 7833, -13769, 1631, 441, 1351, 1631, 8561, 1631, 8561, 16751, -14525, -8477, 259, -7133, 259, -1435, -931, 259, 13349, -7749, -357, -819, -357, 6573, -13265, -7217, 1519, -5873, 1519, -175, 329, 1519, 14609, -6489, 903, 441, 903, 7833, 372855, 204015, -39865, 166495, -39865, 199227, 109011, -21301, 88963, -21301, -27825, -15225, 2975, -12425, 2975, 172515, 94395, -18445, 77035, -18445, -27825, -15225, 2975, -12425, 2975, -15295, -14791, -28035, -27531, -3283, -2779, -28035, -27531, -16023, -15519, -175, 329, 735, 1239, -1435, -931, -175, 329, -26985, -26481, -14973, -14469, 735, 1239, -13125, -12621, 735, 1239, -39865, -223125, -39865, -223125, -439705, -21301, -34391, -39865, -21301, -238595, -455175, -34391, -455175, -250971, 2975, 16065, 2975, 16065, 31535, -18445, -5355, 2975, 16065, -39865, -21301, 2975, -18445, 2975, -240975, -457555, -36771, -457555, -253351, 16065, 31535, -5355, 16065, -439705, -235501, 31535, -204085, 31535, 91791, -11697, -5229, -11697, -108717, 193711, -21889, -5229, -17969, -21889, -118909, -21889, -118909, -233569, 5523, -1869, -1407, -1869, -8799, 193711, -21889, 107443, -12061, -13419, -26159, -1407, -26159, -14147, -21889, -118909, -21889, -118909, -233569, -12061, -18991, -21889, -12061, -127099, -241759, -18991, -241759, -133651, -6489, 903, 441, 903, 7833, -13769, 1631, 441, 1351, 1631, 8561, 1631, 8561, 16751, -7749, -357, -819, -357, 6573, -6489, 903, 441, 903, 7833, 185311, -21049, 99043, -11221, -13769, 1631, 85771, -9709, -13769, 1631, -14679, -27419, -2667, -27419, -15407, 441, 1351, -819, 441, -26369, -14357, 1351, -12509, 1351, -21049, -118069, -21049, -118069, -232729, -11221, -18151, -21049, -11221, -126259, -240919, -18151, -240919, -132811, 1631, 8561, 1631, 8561, 16751, -9709, -2779, 1631, 8561, -21049, -11221, 1631, -9709, 1631, -127519, -242179, -19411, -242179, -134071, 8561, 16751, -2779, 8561, -232729, -124621, 16751, -107989, 16751]\n assert candidate(expression = \"100-50*2+25\") == [-1250, -25, 1350, 25, 125]\n assert 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 candidate(expression = \"99*99-99+99\") == [-9801, 9801, 9603, 99, 9801]\n assert 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 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 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 candidate(expression = \"88+12*4-6/2+5*9-7\") == []\n assert candidate(expression = \"6/2-3*1+8/4\") == []\n assert candidate(expression = \"2*3+4-5*6/3\") == []\n assert 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 candidate(expression = \"10+20+30+40+50+60+70+80+90\") == [450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450]\n assert 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 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 candidate(expression = \"5+6*7-8*9/2\") == []\n assert 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 candidate(expression = \"1*2-3+4*5-6/3\") == []\n assert 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 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 candidate(expression = \"100-50/2+20*3-10\") == []\n assert candidate(expression = \"5*3+2*8-9/3\") == []\n assert candidate(expression = \"12/4+3*2-1+8/2\") == []\n assert candidate(expression = \"100-99+98-97+96\") == [96, -96, 96, -96, -96, -94, 98, -290, -94, 96, 96, 98, -98, 98]\n assert candidate(expression = \"9-3+4-2*3\") == [8, 0, 8, -6, -6, 4, 12, -4, 4, 12, 12, 24, 0, 24]\n assert 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 candidate(expression = \"4*9-3+2*5-1/1+7\") == []\n assert 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"}, "metadata": {"canonical_parameter_names": ["expression"], "leetcode_dataset_entry_point": "Solution().diffWaysToCompute", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector diffWaysToCompute(string expression) {", "container": "Solution", "callable": "diffWaysToCompute", "parameters": [{"name": "expression", "type": "string"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= s.length, t.length <= 5 * 104\ns and t consist of lowercase English letters.\n\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 = \"\",t = \"\") == True\n assert candidate(s = \"ababababababababab\",t = \"bababababababababa\") == True\n assert candidate(s = \"hello world\",t = \"worldhello\") == False\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 = \"the quick brown fox\",t = \"xof nworb kciuq eht\") == True\n assert candidate(s = \"astronomer\",t = \"moonstarer\") == True\n assert candidate(s = \"thisisananagram\",t = \"isanagramthis\") == False\n assert candidate(s = \"spaces should be ignored\",t = \"should be ignored spaces\") == True\n assert candidate(s = \"aabbcc\",t = \"ccbbaa\") == True\n assert candidate(s = \"special!@#$%^&*()characters\",t = \"characters)!@#$%^&*()special\") == False\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 = \"1234567890\",t = \"0987654321\") == True\n assert candidate(s = \"anananana\",t = \"naanaanna\") == True\n assert candidate(s = \"\",t = \"a\") == False\n assert candidate(s = \"thisisanagramtest\",t = \"agamnartisiesttst\") == False\n assert candidate(s = \"hello world\",t = \"world hello\") == True\n assert candidate(s = \"a gentleman\",t = \"elegant man\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"aabbcc\",t = \"aabbc\") == False\n assert candidate(s = \"school master\",t = \"the classroom\") == True\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 = \"funeral\",t = \"real fun\") == False\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 = \"forty five\",t = \"over fifty\") == True\n assert candidate(s = \"a!@#b$%^c&*()\",t = \"c&*()b$%^a!@#\") == 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 = \"the quick brown fox jumps over the lazy dog\",t = \"dog lazy the over jumps fox brown quick the\") == True\n assert candidate(s = \"conversation\",t = \"voices rant on\") == False\n assert candidate(s = \"eleven plus two\",t = \"twelve plus one\") == True\n assert candidate(s = \"the eyes\",t = \"they see\") == True\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 = \"this is a test\",t = \"test a is this\") == 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 = \"dormitory\",t = \"dirty room\") == False\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 = \"a\",t = \"\") == 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 = \"clint eastwood\",t = \"old west action\") == 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"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isAnagram", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isAnagram(string s, string t) {", "container": "Solution", "callable": "isAnagram", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 257, "task_id": "binary-tree-paths", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return all root-to-leaf paths in any order.\nA leaf is a node with no children.\n \nExample 1:\n\n\nInput: root = [1,2,3,null,5]\nOutput: [\"1->2->5\",\"1->3\"]\n\nExample 2:\n\nInput: root = [1]\nOutput: [\"1\"]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 100].\n-100 <= Node.val <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == ['1->2->4', '1->2->5', '1->3->6', '1->3->7']\n assert candidate(root = tree_node([1, 2, 3, None, 5])) == ['1->2->5', '1->3']\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7])) == ['-10->9', '-10->20->15', '-10->20->7']\n assert candidate(root = tree_node([-10, -20, -30, -40, None, -50, -60])) == ['-10->-20->-40', '-10->-30->-50', '-10->-30->-60']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4])) == ['1->2->3->4']\n assert candidate(root = tree_node([-10, -5, 0, 5, 9])) == ['-10->-5->5', '-10->-5->9', '-10->0']\n assert candidate(root = tree_node([1])) == ['1']\n assert candidate(root = tree_node([1, None, 2, None, 3])) == ['1->2->3']\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == ['0->2->1->5', '0->2->1->1', '0->4->3->6', '0->4->-1->8']\n assert candidate(root = tree_node([3, 1, None, None, 2])) == ['3->1->2']\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, 21, 18, 22])) == ['3->9', '3->20->15->21', '3->20->7->18', '3->20->7->22']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == ['1->2->3->4->5->6->7->8->9->10']\n assert candidate(root = tree_node([2, -3, 5, 1, None, -4, 6, -7, None, None, None, None, -8, -9, 7])) == ['2->-3->1->-7->-9', '2->-3->1->-7->7', '2->5->-4', '2->5->6->-8']\n assert candidate(root = tree_node([100, -50, 50, None, -100, None, 100, -50, None, 50, None, -100, None, 100])) == ['100->-50->-100->-50->-100', '100->50->100->50->100']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, None, 9])) == ['5->4->11->7', '5->4->11->2->9', '5->8->13', '5->8->4->5', '5->8->4->1']\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, 8, None, 10, 11, None, 13, None, None, 16])) == ['1->2->4->8', '1->3->6->10->16', '1->3->6->11', '1->3->7->13']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None])) == ['1->2->4->8->16', '1->2->4->8->17', '1->2->4->9->18', '1->2->4->9->19', '1->2->5->10->20', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == ['0->1->3->7', '0->1->3->8', '0->1->4->9', '0->1->4->10', '0->2->5->11', '0->2->5->12', '0->2->6->13', '0->2->6->14']\n assert candidate(root = tree_node([10, -10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80, -80, 90, -90, 100, -100])) == ['10->-10->-20->-40->-80', '10->-10->-20->-40->90', '10->-10->-20->50->-90', '10->-10->-20->50->100', '10->-10->30->-50->-100', '10->-10->30->60', '10->20->-30->-60', '10->20->-30->70', '10->20->40->-70', '10->20->40->80']\n assert candidate(root = tree_node([10, None, 20, None, 30, None, 40, None, 50, None, 60, None, 70, None, 80])) == ['10->20->30->40->50->60->70->80']\n assert candidate(root = tree_node([0, -2, 1, None, None, -3, None, -4, None, None, 5])) == ['0->-2', '0->1->-3->-4->5']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, 9, None, None, 10, None, None, 11, None, None, 12])) == ['1->2->4->8->11', '1->2->5->9', '1->3->6', '1->3->7->10->12']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, 16, 17, 18, 19, 20])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10->16', '1->2->5->11->17', '1->2->5->11->18', '1->3->6->12->19', '1->3->6->12->20', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])) == ['1->2->4->8', '1->2->4->9->16->30', '1->2->4->9->17', '1->2->5->10->18', '1->2->5->10->19', '1->2->5->11->20', '1->2->5->11->21', '1->3->6->12->22', '1->3->6->12->23', '1->3->6->13->24', '1->3->6->13->25', '1->3->7->14->26', '1->3->7->14->27', '1->3->7->15->28', '1->3->7->15->29']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 8, 9, 10, 11, None, None, 16, 17, 18, 19])) == ['1->2->4->8', '1->2->4->9->16', '1->2->4->9->17', '1->2->5->10->18', '1->2->5->10->19', '1->2->5->11', '1->3']\n assert candidate(root = tree_node([8, 5, 1, 7, 6, 9, 12, None, None, 2, None, None, None, None, None, None, 3])) == ['8->5->7', '8->5->6->2->3', '8->1->9', '8->1->12']\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 6, None, None, None, 7, None, 8])) == ['1->2->5', '1->3->6->7->8']\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4])) == ['1->2->3->4', '1->2->3->4', '1->2->3->4', '1->2->3->4', '1->2']\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, None, -8, -9, -10, -11, -12, None, -13, None, None, -14])) == ['0->-1->-3->-7->-13', '0->-1->-4->-8->-14', '0->-1->-4->-9', '0->-2->-5->-10', '0->-2->-5->-11', '0->-2->-6->-12']\n assert candidate(root = tree_node([0, -3, 9, -10, None, 5])) == ['0->-3->-10', '0->9->5']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == ['1->2->4->8->12', '1->2->5->9->13', '1->3->6->10->14', '1->3->7->11->15']\n assert candidate(root = tree_node([0, -1, 1, -2, -3, 2, 3, -4, -5, -6, -7, 4, 5, 6, 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])) == ['0->-1->-2->-4->-8->-24', '0->-1->-2->-4->-8->-25', '0->-1->-2->-4->-9->-26', '0->-1->-2->-4->-9->-27', '0->-1->-2->-5->-10->-28', '0->-1->-2->-5->-10->-29', '0->-1->-2->-5->-11->-30', '0->-1->-2->-5->-11->-31', '0->-1->-3->-6->-12', '0->-1->-3->-6->-13', '0->-1->-3->-7->-14', '0->-1->-3->-7->-15', '0->1->2->4->-16', '0->1->2->4->-17', '0->1->2->5->-18', '0->1->2->5->-19', '0->1->3->6->-20', '0->1->3->6->-21', '0->1->3->7->-22', '0->1->3->7->-23']\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, None, None, None, 8])) == ['1->2->4->7', '1->3->5', '1->3->6->8']\n assert candidate(root = tree_node([3, 9, 20, 15, 7, 6, 8, 1, 2, None, None, None, None, None, 4])) == ['3->9->15->1', '3->9->15->2', '3->9->7', '3->20->6', '3->20->8->4']\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == ['1->2->3->4->5->6->7->8->9']\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) == ['0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->0->0->0->0', '0->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(root = tree_node([3, 9, 20, None, None, 15, 7, 12, None, None, 18])) == ['3->9', '3->20->15->12', '3->20->7->18']\n assert candidate(root = tree_node([100, -50, 50, -25, 25, -75, 75, None, None, -100, 100, -125, 125])) == ['100->-50->-25', '100->-50->25->-100', '100->-50->25->100', '100->50->-75->-125', '100->50->-75->125', '100->50->75']\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, None, None, None, None, 16, 20])) == ['10->5->3', '10->5->7', '10->15->18->16', '10->15->18->20']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == ['1->2->3->4->5->6->7->8->9->10->11->12->13->14->15']\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == ['5->4->11->7', '5->4->11->2', '5->8->13', '5->8->4->1']\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10])) == ['-1->-2->-4->-8', '-1->-2->-4->-9', '-1->-2->-5->-10', '-1->-3->-6', '-1->-3->-7']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == ['1->2->3->4->5->6->7->8->9']\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == ['1->2->3->4->5->6->7->8->9->10']\n assert candidate(root = tree_node([5, -4, 8, -11, None, 17, 4, 7, 2, None, None, None, 1])) == ['5->-4->-11->7', '5->-4->-11->2', '5->8->17', '5->8->4->1']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 16])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == ['1->2->3->4->5->6->7->8']\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1])) == ['10->5->3->3', '10->5->3->-2', '10->5->2->1', '10->-3->11']\n assert candidate(root = tree_node([100, -100, 50, -50, 25, 0, 75, None, -75, -25, None, 20, None, None, None, 60])) == ['100->-100->-50->-75->60', '100->-100->25->-25', '100->50->0->20', '100->50->75']\n assert candidate(root = tree_node([3, 9, 20, 8, None, 15, 7, 4, 6, None, None, 13, 18])) == ['3->9->8->4', '3->9->8->6', '3->20->15', '3->20->7->13', '3->20->7->18']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, 15])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->15']\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == ['1->2->3->4->5->6->7->8']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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->4->8->16', '1->2->4->8->17', '1->2->4->9->18', '1->2->4->9->19', '1->2->5->10->20', '1->2->5->10->21', '1->2->5->11->22', '1->2->5->11->23', '1->3->6->12->24', '1->3->6->12->25', '1->3->6->13->26', '1->3->6->13->27', '1->3->7->14->28', '1->3->7->14->29', '1->3->7->15->30']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, 8, None, None, None, 9])) == ['1->2->4->7->9', '1->2->5->8', '1->3->6']\n assert candidate(root = tree_node([2, -3, 3, -4, -5, -6, -7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == ['2->-3->-4->8->16', '2->-3->-4->8->17', '2->-3->-4->9->18', '2->-3->-4->9->19', '2->-3->-5->10->20', '2->-3->-5->11', '2->3->-6->12', '2->3->-6->13', '2->3->-7->14', '2->3->-7->15']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, None, 9, None, None, 10, 11, None, None, 12, None])) == ['1->2->4->7->10', '1->2->4->7->11', '1->2->4->8', '1->2->5->9->12', '1->3->6']\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4])) == ['3->5->6', '3->5->2->7', '3->5->2->4', '3->1->0', '3->1->8']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, -1])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15->-1']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None, None, 15, 16, 17, 18, 19, 20])) == ['1->2->4->8->15', '1->2->4->9->16', '1->2->4->9->17', '1->2->5->10->18', '1->2->5->10->19', '1->2->5->11->20', '1->3->6->12', '1->3->6->13', '1->3->7->14']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == ['1->2->4->8->16', '1->2->4->8->17', '1->2->4->9->18', '1->2->4->9->19', '1->2->5->10->20', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([1, 2, 2, 3, None, 3, None, 4, None, 4])) == ['1->2->3->4', '1->2->3->4']\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == ['1->2->4->7->13', '1->2->4->7->14', '1->2->4->8->15', '1->3->5->9', '1->3->5->10', '1->3->6->11', '1->3->6->12']\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, None, 11, 12, None, 14, 15, None, None, 16, 17])) == ['1->2->4->8->14', '1->2->4->8->15', '1->2->4->9', '1->3->6->11->16', '1->3->6->11->17', '1->3->7->12']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14', '1->3->7->15']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None])) == ['1->2->4->8', '1->2->4->9', '1->2->5->10', '1->2->5->11', '1->3->6->12', '1->3->6->13', '1->3->7->14']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, 8, None, 9, None, 10])) == ['1->2->4->6->9', '1->2->4->7->10', '1->2->5->8', '1->3']\n assert candidate(root = tree_node([1, None, None])) == ['1']\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == ['1->2->3', '1->2->4', '1->2->4', '1->2->3']\n assert candidate(root = tree_node([0, -3, 9, -10, None, 5, -1, -6, None, -8, None, None, None, -11, None, -12, None, 13, -13, -14])) == ['0->-3->-10->-6->-11->13', '0->-3->-10->-6->-11->-13', '0->9->5->-8->-12->-14', '0->9->-1']\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == ['1->2->3->4->5->6->7->8->9->10->11->12->13->14->15->16->17->18->19->20']\n assert candidate(root = tree_node([2, -3, -3, -4, None, -5, -4, None, -6, None, -7])) == ['2->-3->-4->-6', '2->-3->-5->-7', '2->-3->-4']\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 13, 14, 18, 19])) == ['3->9', '3->20->15->13', '3->20->15->14', '3->20->7->18', '3->20->7->19']\n assert candidate(root = tree_node([3, 9, 20, 8, 10, 15, 7, None, None, None, None, 14, 16, 12, 17])) == ['3->9->8', '3->9->10', '3->20->15->14', '3->20->15->16', '3->20->7->12', '3->20->7->17']\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, None, None, 10, 11])) == ['1->2->4->7->10', '1->2->4->7->11', '1->2->5->8', '1->2->5->9', '1->3->6']\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == ['0->-1->-3->-7->-15', '0->-1->-3->-8', '0->-1->-4->-9', '0->-1->-4->-10', '0->-2->-5->-11', '0->-2->-5->-12', '0->-2->-6->-13', '0->-2->-6->-14']\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == ['10->5->3->1', '10->5->7->6', '10->15->18']\n assert candidate(root = tree_node([3, 9, 20, 8, None, 15, 7, 6, 10, None, None, 13, 17, 16])) == ['3->9->8->6->16', '3->9->8->10', '3->20->15', '3->20->7->13', '3->20->7->17']\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == ['5->4->11->7', '5->4->11->2', '5->8->13', '5->8->4->5', '5->8->4->1']\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().binaryTreePaths", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector binaryTreePaths(TreeNode* root) {", "container": "Solution", "callable": "binaryTreePaths", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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\n \nConstraints:\n\n0 <= num <= 231 - 1\n\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 = 1010101010101010101) == 1\n assert candidate(num = 222222222) == 9\n assert candidate(num = 555555555) == 9\n assert candidate(num = 1234567890123456789) == 9\n assert candidate(num = 66666666666666666666) == 3\n assert candidate(num = 9999999999999999999) == 9\n assert candidate(num = 888888888) == 9\n assert candidate(num = 1111111111) == 1\n assert candidate(num = 123456789012345678901234567890) == 9\n assert candidate(num = 27) == 9\n assert candidate(num = 98765432109876543210) == 9\n assert candidate(num = 444444444) == 9\n assert candidate(num = 2222222222) == 2\n assert candidate(num = 88888888888888888888) == 7\n assert candidate(num = 33333333333333333333) == 6\n assert candidate(num = 5555555555555555555) == 5\n assert candidate(num = 999999999999999999) == 9\n assert candidate(num = 777777777) == 9\n assert candidate(num = 888888888888888888) == 9\n assert candidate(num = 1999999999999999999) == 1\n assert candidate(num = 666666666) == 9\n assert candidate(num = 123456789) == 9\n assert candidate(num = 9876543210) == 9\n assert candidate(num = 5) == 5\n assert candidate(num = 555555555555555555555555555555) == 6\n assert candidate(num = 333333333) == 9\n assert candidate(num = 11) == 2\n assert candidate(num = 1111111111111111111) == 1\n assert candidate(num = 4321098765432109876543210987654321) == 1\n assert candidate(num = 1234567890) == 9\n assert candidate(num = 101010101010101010101010101010) == 6\n assert candidate(num = 543210987654321) == 6\n assert candidate(num = 44444444444444444444) == 8\n assert candidate(num = 94528) == 1\n assert candidate(num = 12345678901234567890) == 9\n assert candidate(num = 8888888888888888888) == 8\n assert candidate(num = 18) == 9\n assert candidate(num = 77777777777777777777) == 5\n assert candidate(num = 987654321987654321) == 9\n assert candidate(num = 876543210987654321098765432109876543210) == 9\n assert candidate(num = 4321) == 1\n assert candidate(num = 22222222222222222222) == 4\n assert candidate(num = 9876543210987654321) == 9\n assert candidate(num = 369369369) == 9\n assert candidate(num = 898989898989898989898989898989) == 3\n assert candidate(num = 2222222222222222222) == 2\n assert candidate(num = 123456789123456789) == 9\n assert candidate(num = 9999999999) == 9\n assert candidate(num = 11111111111111111111) == 2\n assert candidate(num = 55555555555555555555) == 1\n assert candidate(num = 99999999999999999999) == 9\n assert candidate(num = 5689423749832749823749237492374923749237492374923749237492374923749237492374) == 2\n assert candidate(num = 191919191919191919191919191919) == 6\n assert candidate(num = 987654321098765432109876543210) == 9\n assert candidate(num = 12345678987654321) == 9\n"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().addDigits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int addDigits(int num) {", "container": "Solution", "callable": "addDigits", "parameters": [{"name": "num", "type": "int"}], "return_type": "int", "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.\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\n \nConstraints:\n\n2 <= nums.length <= 3 * 104\n-231 <= nums[i] <= 231 - 1\nEach integer in nums will appear twice, only two integers will appear once.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2147483647, -2147483648, 2147483647, -2147483648, 1, 2, 1, 3, 2, 5]) == [3, 5]\n assert candidate(nums = [3, 4, 5, 4, 3, 6]) == [5, 6]\n assert candidate(nums = [4, 1, 4, 13, 6, 7, 6, 7]) == [13, 1]\n assert candidate(nums = [4, 1, 4, 13, 6, 13, 2, 6]) == [1, 2]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8]) == [9, 1]\n assert candidate(nums = [2, 2, 3, 4, 3, 4, 5, 5, 6, 7]) == [7, 6]\n assert candidate(nums = [-1, 0]) == [-1, 0]\n assert 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 candidate(nums = [10, 1, 10, 3, 7, 3, 5, 5]) == [7, 1]\n assert candidate(nums = [10, 20, 10, 30, 40, 50, 40, 50]) == [30, 20]\n assert candidate(nums = [3, 1, 2, 3, 2, 5, 6, 6]) == [5, 1]\n assert candidate(nums = [0, 0, 1, 2, 3, 3, 4, 4, 5, 5]) == [1, 2]\n assert candidate(nums = [10, 20, 10, 30, 30, 40]) == [20, 40]\n assert candidate(nums = [1000000000, 2000000000, 1000000000, 3000000000]) == [3000000000, 2000000000]\n assert candidate(nums = [0, 1]) == [1, 0]\n assert 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 candidate(nums = [2147483647, -2147483648, 2147483647, -2]) == [-2, -2147483648]\n assert candidate(nums = [0, 0, 1, 1, 2, 3]) == [3, 2]\n assert candidate(nums = [1000000000, 2000000000, 1000000000, 3000000000, 4000000000, 4000000000]) == [3000000000, 2000000000]\n assert candidate(nums = [4, 1, 4, 6, 7, 7]) == [1, 6]\n assert candidate(nums = [1000000000, 1000000000, 500000000, 2000000000]) == [500000000, 2000000000]\n assert 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 candidate(nums = [-2147483648, 2147483647, -2147483648, 2]) == [2147483647, 2]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 5, 6, 6]) == [5, 4]\n assert candidate(nums = [1, 1, 2, 3, 2, 4, 5, 5, 6, 6]) == [3, 4]\n assert candidate(nums = [1, 2, 1, 3, 2, 5]) == [3, 5]\n assert candidate(nums = [10, 1, 10, 3, 3, 5, 5, 2]) == [1, 2]\n assert candidate(nums = [1000000000, -1000000000, 1000000000, 5]) == [5, -1000000000]\n assert candidate(nums = [1, 1, 2, 2, 3, 4]) == [3, 4]\n assert candidate(nums = [1000000000, 2000000000, 1000000000, 3000000000, 4000000000, 2000000000, 5000000000, 6000000000, 4000000000, 5000000000]) == [3000000000, 6000000000]\n assert 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 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 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 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 candidate(nums = [987654321, 123456789, 987654321, 234567890, 345678901, 234567890, 456789012, 567890123, 345678901, 456789012, 678901234, 567890123, 789012345, 678901234, 890123456]) == [123456789, 436825017]\n assert 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 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 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 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 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 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 candidate(nums = [999999999, 999999999, 1000000000, 1000000000, 1000000001, 1000000001, 1000000002, 1000000002, 1000000003, 1000000004, 1000000005, 1000000005]) == [1000000003, 1000000004]\n assert 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 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 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 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 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 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 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 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 candidate(nums = [-2147483648, 2147483647, -2147483648, 100000, 200000, 100000, 300000, 300000, 400000, 2147483647, 400000, 500000, 600000, 500000, 600000]) == [200000, 0]\n assert 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 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 candidate(nums = [1000000000, 1000000000, 2000000000, 2000000000, 3000000000, 4000000000]) == [3000000000, 4000000000]\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, 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 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 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 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 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 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 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 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 candidate(nums = [-2147483648, 2147483647, -2147483648, 1, 2, 1, 3, 2]) == [2147483647, 3]\n assert candidate(nums = [-1000000000, -1000000000, 1000000000, 1000000000, 2147483647, -2147483648]) == [2147483647, -2147483648]\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, -31]) == [-31, -30]\n assert candidate(nums = [1000000000, 1000000000, 2147483647, 2147483647, 123456789, -123456789]) == [-123456789, 123456789]\n assert 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 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 candidate(nums = [999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 555555555, 123456789, 987654321]) == [123456789, 987654321]\n assert 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 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 candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 123456789]) == [555555555, 123456789]\n assert 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 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 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 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 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 candidate(nums = [999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 555555555, 444444444, 333333333, 222222222, 111111111, 111111111, 222222222]) == [333333333, 444444444]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, -1000000000, 1000000000, -2000000000, 3000000000, 3000000000, -4000000000, -4000000000, 5000000000, 6000000000]) == [4983875072, 5000000000]\n assert 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 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 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 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 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 candidate(nums = [1000000000, 999999999, 1000000000, 888888888, 777777777, 888888888, 666666666, 666666666]) == [999999999, 777777777]\n assert 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 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 candidate(nums = [-1000000000, -1000000000, 2000000000, 2000000000, 1000000, 1000000, -100000, -100000, 50000, 50000, 999999999, 1000000001]) == [999999999, 1000000001]\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, 12]) == [11, 12]\n assert 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n-231 <= n <= 231 - 1\n\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 = 2147483648) == True\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 = 72057594037927935) == False\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 = 2250000000) == True\n assert candidate(n = 8589934591) == False\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 = 1000000000000) == True\n assert candidate(n = 60) == True\n assert candidate(n = 1500000000) == True\n assert candidate(n = 30000) == True\n assert candidate(n = 34359738368) == True\n assert candidate(n = 2500000000) == 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 = 2430000000) == True\n assert candidate(n = 2187000) == True\n assert candidate(n = 307200000) == True\n assert candidate(n = 1000000001) == False\n assert candidate(n = 112500000000) == True\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 = 3125000000) == True\n assert candidate(n = 500000) == True\n assert candidate(n = 150000000) == True\n assert candidate(n = 8589934592) == True\n assert candidate(n = 1800000000) == True\n assert candidate(n = 3125) == True\n assert candidate(n = 6103515625) == True\n assert candidate(n = 2352) == False\n assert candidate(n = 120) == True\n assert candidate(n = 72057594037927936) == 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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isUgly", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isUgly(int n) {", "container": "Solution", "callable": "isUgly", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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.\nGiven an integer n, return the nth 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\n \nConstraints:\n\n1 <= n <= 1690\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().nthUglyNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int nthUglyNumber(int n) {", "container": "Solution", "callable": "nthUglyNumber", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\n\n\n \n\n\n \n\n \n \n\n\n\n\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 104\n0 <= nums[i] <= n\nAll the numbers of nums are unique.\n\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 = [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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 9900]) == 10001\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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16]) == 31\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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 9900, 9899, 9898, 9897, 9896, 9895, 9894, 9893, 9892, 9891, 9890, 9889, 9888, 9887, 9886, 9885, 9884, 9883, 9882, 9881, 9880, 9879, 9878, 9877, 9876, 9875, 9874, 9873, 9872, 9871, 9870, 9869, 9868, 9867, 9866, 9865, 9864, 9863, 9862, 9861, 9860, 9859, 9858, 9857, 9856, 9855, 9854, 9853, 9852, 9851, 9850, 9849, 9848, 9847, 9846, 9845, 9844, 9843, 9842, 9841, 9840, 9839, 9838, 9837, 9836, 9835, 9834, 9833, 9832, 9831, 9830, 9829, 9828, 9827, 9826, 9825, 9824, 9823, 9822, 9821, 9820, 9819, 9818, 9817, 9816, 9815, 9814, 9813, 9812, 9811, 9810, 9809, 9808, 9807, 9806, 9805, 9804, 9803, 9802, 9801, 9800]) == 10001\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 = [1, 3, 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, 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]) == 107\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]) == 5001\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 = [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]) == 5001\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, 45, 46, 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]) == 213\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().missingNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int missingNumber(vector& nums) {", "container": "Solution", "callable": "missingNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\n \nConstraints:\n\n0 <= num <= 231 - 1\n\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 = 10000000000) == \"Ten Billion\"\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 = 999999999999) == \"Nine Hundred Ninety Nine Billion Nine Hundred Ninety Nine Million Nine Hundred Ninety Nine Thousand Nine Hundred Ninety Nine\"\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 = 1000000000001) == \"Ten Hundred Billion One\"\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 = 4321098765) == \"Four Billion Three Hundred Twenty One Million Ninety Eight Thousand Seven Hundred Sixty Five\"\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"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().numberToWords", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string numberToWords(int num) {", "container": "Solution", "callable": "numberToWords", "parameters": [{"name": "num", "type": "int"}], "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 ith paper, return the researcher's h-index.\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\n \nConstraints:\n\nn == citations.length\n1 <= n <= 5000\n0 <= citations[i] <= 1000\n\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 = [0, 1000, 2000, 3000, 4000, 5000]) == 5\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"}, "metadata": {"canonical_parameter_names": ["citations"], "leetcode_dataset_entry_point": "Solution().hIndex", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int hIndex(vector& citations) {", "container": "Solution", "callable": "hIndex", "parameters": [{"name": "citations", "type": "vector&"}], "return_type": "int", "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 ith paper and citations is sorted in ascending order, return the researcher's h-index.\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.\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\n \nConstraints:\n\nn == citations.length\n1 <= n <= 105\n0 <= citations[i] <= 1000\ncitations is sorted in ascending order.\n\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 = [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]) == 0\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, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\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"}, "metadata": {"canonical_parameter_names": ["citations"], "leetcode_dataset_entry_point": "Solution().hIndex", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int hIndex(vector& citations) {", "container": "Solution", "callable": "hIndex", "parameters": [{"name": "citations", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= n <= 104\n\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 = 12345) == 3\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().numSquares", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numSquares(int n) {", "container": "Solution", "callable": "numSquares", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\nNote that operands in the returned expressions should not contain leading zeros.\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\n \nConstraints:\n\n1 <= num.length <= 10\nnum consists of only digits.\n-231 <= target <= 231 - 1\n\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 = \"9999999999\",target = 9999999999) == ['9999999999']\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"}, "metadata": {"canonical_parameter_names": ["num", "target"], "leetcode_dataset_entry_point": "Solution().addOperators", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector addOperators(string num, int target) {", "container": "Solution", "callable": "addOperators", "parameters": [{"name": "num", "type": "string"}, {"name": "target", "type": "int"}], "return_type": "vector", "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.\nThere is only one repeated number in nums, return this repeated number.\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\n1 <= n <= 105\nnums.length == n + 1\n1 <= nums[i] <= n\nAll the integers in nums appear only once except for precisely one integer which appears two or more times.\n\n \nFollow up:\n\nHow can we prove that at least one duplicate number must exist in nums?\nCan you solve the problem in linear runtime complexity?\n\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 = [50000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50000]) == 12\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 = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99991]) == 11\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 = [100000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100000]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100]) == 11\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 = [50000, 49999, 1, 2, 3, 4, 5, 6, 7, 8, 50000]) == 11\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 = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7]) == 11\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 = [1, 100000, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100000]) == 21\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 = [99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99991]) == 11\n assert candidate(nums = [2, 3, 1, 4, 5, 6, 7, 8, 9, 10, 2]) == 2\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 1]) == 11\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 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 2]) == 11\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDuplicate", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findDuplicate(vector& nums) {", "container": "Solution", "callable": "findDuplicate", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\nEach letter in pattern maps to exactly one unique word in s.\nEach unique word in s maps to exactly one letter in pattern.\nNo two letters map to the same word, and no two words map to the same letter.\n\n \nExample 1:\n\nInput: pattern = \"abba\", s = \"dog cat cat dog\"\nOutput: true\nExplanation:\nThe bijection can be established as:\n\n'a' maps to \"dog\".\n'b' maps to \"cat\".\n\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\n \nConstraints:\n\n1 <= pattern.length <= 300\npattern contains only lower-case English letters.\n1 <= s.length <= 3000\ns contains only lowercase English letters and spaces ' '.\ns does not contain any leading or trailing spaces.\nAll the words in s are separated by a single space.\n\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"}, "metadata": {"canonical_parameter_names": ["pattern", "s"], "leetcode_dataset_entry_point": "Solution().wordPattern", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool wordPattern(string pattern, string s) {", "container": "Solution", "callable": "wordPattern", "parameters": [{"name": "pattern", "type": "string"}, {"name": "s", "type": "string"}], "return_type": "bool", "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\nInitially, there is a heap of stones on the table.\nYou and your friend will alternate taking turns, and you go first.\nOn each turn, the person whose turn it is will remove 1 to 3 stones from the heap.\nThe 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\n \nConstraints:\n\n1 <= n <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().canWinNim", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canWinNim(int n) {", "container": "Solution", "callable": "canWinNim", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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.\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\nThe number of \"bulls\", which are digits in the guess that are in the correct position.\nThe 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.\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\"\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\n \nConstraints:\n\n1 <= secret.length, guess.length <= 1000\nsecret.length == guess.length\nsecret and guess consist of digits only.\n\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"}, "metadata": {"canonical_parameter_names": ["secret", "guess"], "leetcode_dataset_entry_point": "Solution().getHint", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string getHint(string secret, string guess) {", "container": "Solution", "callable": "getHint", "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\n \nConstraints:\n\n1 <= nums.length <= 2500\n-104 <= nums[i] <= 104\n\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 = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10001]) == 2\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().lengthOfLIS", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int lengthOfLIS(vector& nums) {", "container": "Solution", "callable": "lengthOfLIS", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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.\nGiven a string containing only digits, return true if it is an additive number or false otherwise.\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\n \nConstraints:\n\n1 <= num.length <= 35\nnum consists only of digits.\n\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 = \"100000000000000000000000000000000000\") == False\n assert candidate(num = \"1203\") == False\n assert candidate(num = \"12358132134558914423337761098715972584467376111128914423337761098715972584467376\") == 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 = \"11112233558814332333776109871597258446737611112891442333776109871597258446737600\") == False\n assert candidate(num = \"1212243660100961962968965936565601271879009877665776613593530136146765122399774777472502727500\") == False\n assert candidate(num = \"199100199100199\") == False\n assert candidate(num = \"10110210305080130210406107080910111213141516171819202122232425262728293031323334353637383940\") == False\n assert candidate(num = \"2112358132134558914423337761098715972584467376111128914423337761098715972584467376220492347771287\") == False\n assert candidate(num = \"1112233558814327211122335588143272\") == False\n assert candidate(num = \"352118533731775752284871638259384606056366656831559420082325201446228041128569094840455200277408\") == False\n assert candidate(num = \"10102030508132134558914423337761098715972584467376\") == False\n assert candidate(num = \"300330033006601299619912909229\") == False\n assert candidate(num = \"550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000550000000000000000000000000000000000000000000000000000000000000000000000\") == False\n assert candidate(num = \"55511223355881432909822637021898214553360131525527302283789507043051101080889100000\") == False\n assert candidate(num = \"555555555555555555555555555555555\") == False\n assert candidate(num = \"19900199\") == False\n assert candidate(num = \"30003\") == False\n assert candidate(num = \"3051853171590129631715903912962502507512501001250100200200300500801302103405508914423337761098715972584467376\") == False\n assert candidate(num = \"19910019900\") == False\n assert candidate(num = \"5745531324141546367890125508174615794760060485883631387953457734726182221445769627934652072761665542399776038945322296701\") == False\n assert candidate(num = \"899221133233445566778899876555\") == False\n assert candidate(num = \"111213142741681091772866447311811526410877018957986665552221177988707665563244118981001090199209210010912022032254497422444229947474727222024224646709115801009900991981983975965935905845745351276283462110581190099109921982983975965935905845745351276283462110581203202402604609051405190302203224464670911580100990099109921982983975965935905845745351276283462110581\") == False\n assert candidate(num = \"129911121325478121325478121325478\") == False\n assert candidate(num = \"0000000\") == True\n assert candidate(num = \"5368793321443682275858790555153493087535923479825334678016159736904802346340845063\") == False\n assert candidate(num = \"123456789101525406510517027544721991113132643570011287135791412876295855157142910811321344578\") == False\n assert candidate(num = \"199100199100199100199100199100199100199100199100199100199100199100199100199100199100199100199100199\") == False\n assert candidate(num = \"10101\") == False\n assert candidate(num = \"1991001991983973967957941893777514118293847772514624891438782221426638710909674597\") == False\n assert candidate(num = \"12122448917736695401454519004049053859146500549859595405049859595405049859595405049859595405\") == False\n assert candidate(num = \"305185365910589560661212\") == False\n assert candidate(num = \"12345678910111213141516171819202122232425\") == False\n assert candidate(num = \"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130\") == False\n assert candidate(num = \"3005300800130021003400550089014402330377\") == False\n assert candidate(num = \"1299110111221332553886455100015001500300045007501200195031505050820132521303455558591405514559048549455448994344387823621848116309415534969431111042255597445104990005999100001099911000220003300055000880014300233003770061000983\") == False\n assert candidate(num = \"11112233558814323355881432335588\") == False\n assert candidate(num = \"5959119811172113294059805914902979115991111109805914902979115991\") == False\n assert candidate(num = \"98765432111122335588143323337761098715972584467376111128914423337761098715972584467376\") == False\n assert candidate(num = \"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\") == False\n assert candidate(num = \"1112233558814321345588\") == False\n assert candidate(num = \"92347625436528391098765432187654321\") == False\n assert candidate(num = \"0123581321345589144233377610987159725844673761111289144233377610987159725844673761111289144233377\") == False\n assert candidate(num = \"199100199199398597969492898581777066636056352287605388942716093879017705683542125777904752467997447441986163412654769912111098765432213455881433\") == False\n assert candidate(num = \"211758524167291746877551401998346226438183838811803565385890299919329691455\") == False\n assert candidate(num = \"11235813213455891442333776109871597258446737611112891442333776109871597258446737600123\") == False\n assert candidate(num = \"1234768011122335588143323337761098715972584467376111128914423337761098715972584467376\") == False\n assert candidate(num = \"1001002003005008001300\") == True\n assert candidate(num = \"1234567891011121314151617181920\") == False\n assert candidate(num = \"352139810401113513581639833758412122651368518021112902195751760821594112109021957517608215941121090219575176082159411210902195751760821594\") == False\n assert candidate(num = \"11122335588143\") == False\n assert candidate(num = \"211758234058327419099998\") == False\n assert candidate(num = \"10100101102103205308513\") == False\n assert candidate(num = \"5752689987964510450572356014182641347233140125408327326957105375467524896598145343\") == False\n assert candidate(num = \"1101122335588143213455881432134558828675514321345588143213455882867551432134558814321345588\") == False\n assert candidate(num = \"101102030508132134558914423337761098715972584467376\") == False\n assert candidate(num = \"1112233558814321345588143213455882867551432134558814321345588286755143213455881432134558828675514321345588143213455882867551432134558814321345588\") == False\n assert candidate(num = \"1299111112132538639841488932233898720971532865197530864209973547913264331210134756789079852484266\") == False\n assert candidate(num = \"12951122334558814323337761098715972584467376\") == False\n assert candidate(num = \"1212243660100961962968965936565601271879009877665776613593530136146765122399774777472502727500222\") == False\n assert candidate(num = \"212243651091524439844383271296199112214135589284144173337761098715972584467376\") == False\n assert candidate(num = \"111223355881433\") == False\n assert candidate(num = \"3175572624803186172814695510757016747589710586934673882534968156908264298619675998931\") == False\n assert candidate(num = \"123456789101112131415161718192021222324252627282930\") == False\n assert candidate(num = \"111223355881433233355881433233355881433233355881433\") == False\n assert candidate(num = \"10101010101010101010101010101010\") == False\n assert candidate(num = \"31940557016293489164500676297242200430930046356082642245568636631\") == False\n assert candidate(num = \"8981019082988190810089881819190810108988190829881908100898818191908101089881908298819081008988\") == False\n assert candidate(num = \"12358132134558914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376111128914423337761098715972584467376\") == False\n assert candidate(num = \"10010020030050080013002100340055089\") == False\n assert candidate(num = \"1122345678910111213141516171819202122232425262728293031323334353637383940\") == False\n assert candidate(num = \"112233445566778899\") == False\n assert candidate(num = \"111122335588143\") == True\n assert candidate(num = \"19111912203153659816422578234520799598262971192393524758786050352083218672182710805015497586846097981324363146733192212428056781120567168772205832843917570355828832737185509783248648047935104544356078208075678306526165963732066388575682449695836013890215825360502011010311122335588143\") == False\n assert candidate(num = \"202040601002004081632641282565121024204840968192163843276865536131072262144524288\") == False\n assert candidate(num = \"1010203050813213455881433\") == False\n assert candidate(num = \"10000000000000000000000000000000000000000000000000000000000000000000000000000000001\") == False\n assert candidate(num = \"1010101010\") == False\n assert candidate(num = \"5555500000000000000000000000000000000000000000000000000000\") == False\n assert candidate(num = \"21175821271252318169634918448837766214888726074252\") == False\n assert candidate(num = \"3175823340583274190999988\") == False\n assert candidate(num = \"305081321345881431611015264177108919611571328211413552693182114391344738656105716826154\") == False\n assert candidate(num = \"3071185960741317127783240917118596074131712778324091711859607413171277832409171185960741317127783240917\") == False\n assert candidate(num = \"10001000200030005000800130021003400550089014402330377061098615972584467376111128914423337761098715972584467376\") == False\n assert candidate(num = \"234710172744711188299487767465434185296792587860343608720077093447431405448595334665\") == False\n assert candidate(num = \"31415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679\") == False\n assert candidate(num = \"0000\") == True\n"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().isAdditiveNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isAdditiveNumber(string num) {", "container": "Solution", "callable": "isAdditiveNumber", "parameters": [{"name": "num", "type": "string"}], "return_type": "bool", "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 ith day.\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\nAfter 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\n \nConstraints:\n\n1 <= prices.length <= 5000\n0 <= prices[i] <= 1000\n\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 = [100, 180, 260, 310, 40, 535, 695, 200, 400, 310, 350, 410, 300, 500, 600, 500, 400, 600, 700, 800, 900, 1000, 500, 1100, 1200, 1300]) == 2455\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"}, "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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.\nGiven a tree of n nodes labelled from 0 to n - 1, and an array of n - 1 edges where edges[i] = [ai, bi] indicates that there is an undirected edge between the two nodes ai and bi 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).\nReturn a list of all MHTs' root labels. You can return the answer in any order.\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\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\n\nInput: n = 6, edges = [[3,0],[3,1],[3,2],[3,4],[5,4]]\nOutput: [3,4]\n\n \nConstraints:\n\n1 <= n <= 2 * 104\nedges.length == n - 1\n0 <= ai, bi < n\nai != bi\nAll the pairs (ai, bi) are distinct.\nThe given input is guaranteed to be a tree and there will be no repeated edges.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 2,edges = [[0, 1]]) == [0, 1]\n assert 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 candidate(n = 6,edges = [[3, 0], [3, 1], [3, 2], [3, 4], [5, 4]]) == [3, 4]\n assert candidate(n = 5,edges = [[0, 1], [1, 2], [0, 3], [3, 4]]) == [0]\n assert 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 candidate(n = 1,edges = []) == [0]\n assert candidate(n = 7,edges = [[0, 1], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6]]) == [1, 2]\n assert candidate(n = 4,edges = [[1, 0], [1, 2], [1, 3]]) == [1]\n assert candidate(n = 9,edges = [[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7], [3, 8]]) == [0]\n assert 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 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 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 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 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 candidate(n = 9,edges = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8]]) == [0, 1]\n assert candidate(n = 9,edges = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [5, 7], [5, 8]]) == [0, 2]\n assert 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 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 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], [17, 0]]) == []\n assert 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 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 candidate(n = 8,edges = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [5, 7]]) == [0, 2]\n assert 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 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 candidate(n = 14,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, 11]]) == [4, 5]\n assert 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 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 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 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 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 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 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 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 candidate(n = 8,edges = [[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7]]) == [0]\n assert 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 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 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 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 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 candidate(n = 8,edges = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7]]) == [0, 1]\n assert 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 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 candidate(n = 9,edges = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == [4]\n assert 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 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 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 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 candidate(n = 13,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, 10], [11, 12]]) == []\n assert 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 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 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 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 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 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 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 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 candidate(n = 9,edges = [[0, 1], [1, 2], [2, 3], [2, 4], [4, 5], [4, 6], [6, 7], [6, 8]]) == [2, 4]\n assert candidate(n = 9,edges = [[0, 1], [0, 2], [0, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8]]) == [0]\n assert 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 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 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 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 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 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], [0, 11]]) == []\n assert 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"}, "metadata": {"canonical_parameter_names": ["n", "edges"], "leetcode_dataset_entry_point": "Solution().findMinHeightTrees", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findMinHeightTrees(int n, vector>& edges) {", "container": "Solution", "callable": "findMinHeightTrees", "parameters": [{"name": "n", "type": "int"}, {"name": "edges", "type": "vector>&"}], "return_type": "vector", "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.\nIf you burst the ith 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.\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\nExample 2:\n\nInput: nums = [1,5]\nOutput: 10\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 300\n0 <= nums[i] <= 100\n\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 = [1, 10, 100, 1000, 10000, 100000]) == 1010101200000\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 = [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]) == 98801200\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 = [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]) == 243603300\n assert candidate(nums = [25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300]) == 82507800\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 = [10, 100, 1000, 10000]) == 1010110000\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 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 45602200\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxCoins", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxCoins(vector& nums) {", "container": "Solution", "callable": "maxCoins", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\nGiven an integer n and an array of integers primes, return the nth super ugly number.\nThe nth 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\n \nConstraints:\n\n1 <= n <= 105\n1 <= primes.length <= 100\n2 <= primes[i] <= 1000\nprimes[i] is guaranteed to be a prime number.\nAll the values of primes are unique and sorted in ascending order.\n\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 = 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, 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, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]) == 100\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"}, "metadata": {"canonical_parameter_names": ["n", "primes"], "leetcode_dataset_entry_point": "Solution().nthSuperUglyNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int nthSuperUglyNumber(int n, vector& primes) {", "container": "Solution", "callable": "nthSuperUglyNumber", "parameters": [{"name": "n", "type": "int"}, {"name": "primes", "type": "vector&"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= nums.length <= 105\n-104 <= nums[i] <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().countSmaller", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector countSmaller(vector& nums) {", "container": "Solution", "callable": "countSmaller", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= s.length <= 104\ns consists of lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().removeDuplicateLetters", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string removeDuplicateLetters(string s) {", "container": "Solution", "callable": "removeDuplicateLetters", "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\n \nConstraints:\n\n2 <= words.length <= 1000\n1 <= words[i].length <= 1000\nwords[i] consists only of lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().maxProduct", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxProduct(vector& words) {", "container": "Solution", "callable": "maxProduct", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "int", "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.\nOn the third round, you toggle every third bulb (turning on if it's off or turning off if it's on). For the ith round, you toggle every i bulb. For the nth round, you only toggle the last bulb.\nReturn the number of bulbs that are on after n rounds.\n \nExample 1:\n\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.\nExample 2:\n\nInput: n = 0\nOutput: 0\n\nExample 3:\n\nInput: n = 1\nOutput: 1\n\n \nConstraints:\n\n0 <= n <= 109\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().bulbSwitch", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int bulbSwitch(int n) {", "container": "Solution", "callable": "bulbSwitch", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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.\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\n \nConstraints:\n\nm == nums1.length\nn == nums2.length\n1 <= m, n <= 500\n0 <= nums1[i], nums2[i] <= 9\n1 <= k <= m + n\nnums1 and nums2 do not have leading zeros.\n\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],nums2 = [4, 5, 6, 7, 8, 9, 10, 11, 12],k = 6) == [10, 11, 12, 1, 2, 3]\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 = [5, 4, 3, 2, 1],nums2 = [6, 7, 8, 9, 10],k = 5) == [10, 5, 4, 3, 2]\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 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10],k = 8) == [8, 9, 10, 1, 2, 3, 4, 5]\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 = [1, 3, 5, 7, 9, 11],nums2 = [2, 4, 6, 8, 10, 12],k = 11) == [4, 6, 8, 10, 12, 1, 3, 5, 7, 9, 11]\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"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2", "k"], "leetcode_dataset_entry_point": "Solution().maxNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector maxNumber(vector& nums1, vector& nums2, int k) {", "container": "Solution", "callable": "maxNumber", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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.\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.\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\n \nConstraints:\n\n1 <= coins.length <= 12\n1 <= coins[i] <= 231 - 1\n0 <= amount <= 104\n\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 = [1, 2, 5, 10, 20, 50, 100, 200],amount = 10002) == 51\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, 5, 10, 25, 50, 100],amount = 99999) == 1007\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 = [11, 23, 37, 41, 43, 47, 53],amount = 12345) == 235\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 = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048],amount = 1048575) == 522\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 = [1, 5, 10, 20, 50, 100],amount = 10001) == 101\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 = [1, 10, 25, 50, 100],amount = 12345) == 126\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 = [23, 37, 41, 53, 67, 71],amount = 8675309) == 122189\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 = [7, 14, 33, 19, 100],amount = 12345) == 126\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 = [100, 50, 20, 10, 5, 1],amount = 19876) == 202\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"}, "metadata": {"canonical_parameter_names": ["coins", "amount"], "leetcode_dataset_entry_point": "Solution().coinChange", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int coinChange(vector& coins, int amount) {", "container": "Solution", "callable": "coinChange", "parameters": [{"name": "coins", "type": "vector&"}, {"name": "amount", "type": "int"}], "return_type": "int", "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.\nAn integer n is a power of three, if there exists an integer x such that n == 3x.\n \nExample 1:\n\nInput: n = 27\nOutput: true\nExplanation: 27 = 33\n\nExample 2:\n\nInput: n = 0\nOutput: false\nExplanation: There is no x where 3x = 0.\n\nExample 3:\n\nInput: n = -1\nOutput: false\nExplanation: There is no x where 3x = (-1).\n\n \nConstraints:\n\n-231 <= n <= 231 - 1\n\n \nFollow up: Could you solve it without loops/recursion?", "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 = 239148450531289) == False\n assert candidate(n = 32805) == False\n assert candidate(n = 2147483646) == False\n assert candidate(n = 797161567330890596) == False\n assert candidate(n = 12157665459056928802) == 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 = 12157665459056928801) == True\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 = 282429536481) == True\n assert candidate(n = 100000) == False\n assert candidate(n = 231) == False\n assert candidate(n = 4052555153018976267) == True\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 = 3486784401) == True\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfThree", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPowerOfThree(int n) {", "container": "Solution", "callable": "isPowerOfThree", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 105\n-231 <= nums[i] <= 231 - 1\n-105 <= lower <= upper <= 105\nThe answer is guaranteed to fit in a 32-bit integer.\n\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 = [1000000000, -1000000000, 1000000000, -1000000000],lower = -2000000000,upper = 2000000000) == 10\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 = [2147483647, -2147483648, 2147483647, -2147483648],lower = -4294967295,upper = 4294967295) == 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 = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125],lower = 500000000,upper = 2000000000) == 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 = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],lower = 5000000000,upper = 6000000000) == 1\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 = [-1000000000, -1000000000, -1000000000, -1000000000, -1000000000],lower = -6000000000,upper = -5000000000) == 1\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 = [100000000, 200000000, 300000000, 400000000, 500000000],lower = 500000000,upper = 1500000000) == 10\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 = [1000000000, 1000000000, -2000000000, 0, 1000000000, -1000000000],lower = -5000000000,upper = 5000000000) == 21\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, -100, 100, -10000, 10000, -1000000, 1000000, 1, -1, 10, -10],lower = -1000000,upper = 1000000) == 64\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 = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000],lower = -2000000000,upper = 2000000000) == 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],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 = [1000000000, 500000000, -1500000000, 2000000000, -2000000000, 1000000000],lower = -3000000000,upper = 3000000000) == 21\n assert candidate(nums = [100000000, 200000000, 300000000, -100000000, -200000000, -300000000],lower = 100000000,upper = 500000000) == 10\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 = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],lower = 5000000000,upper = 10000000000) == 21\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -20,upper = -5) == 24\n assert candidate(nums = [2147483647, -2147483647, 2147483647, -2147483647, 2147483647],lower = -4294967295,upper = 4294967295) == 15\n assert candidate(nums = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000],lower = -5000000000,upper = 15000000000) == 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 = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],lower = 10000000000,upper = 15000000000) == 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],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"}, "metadata": {"canonical_parameter_names": ["nums", "lower", "upper"], "leetcode_dataset_entry_point": "Solution().countRangeSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countRangeSum(vector& nums, int lower, int upper) {", "container": "Solution", "callable": "countRangeSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "lower", "type": "int"}, {"name": "upper", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 328, "task_id": "odd-even-linked-list", "difficulty": "Medium", "problem_description": "Given the head of a singly linked list, group all the nodes with odd indices together followed by the nodes with even indices, and return the reordered list.\nThe first node is considered odd, and the second node is even, and so on.\nNote that the relative order inside both the even and odd groups should remain as it was in the input.\nYou must solve the problem in O(1) extra space complexity and O(n) time complexity.\n \nExample 1:\n\n\nInput: head = [1,2,3,4,5]\nOutput: [1,3,5,2,4]\n\nExample 2:\n\n\nInput: head = [2,1,3,5,6,4,7]\nOutput: [2,3,6,7,1,5,4]\n\n \nConstraints:\n\nThe number of nodes in the linked list is in the range [0, 104].\n-106 <= Node.val <= 106\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(head = list_node([1, 2, 3])), list_node([1, 3, 2]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90])), list_node([10, 30, 50, 70, 90, 20, 40, 60, 80]))\n assert is_same_list(candidate(head = list_node([2, 1, 3, 5, 6, 4, 7])), list_node([2, 3, 6, 7, 1, 5, 4]))\n assert is_same_list(candidate(head = list_node([0])), list_node([0]))\n assert is_same_list(candidate(head = list_node([-1, 0, 1, -2, 2, -3, 3])), list_node([-1, 1, 2, 3, 0, -2, -3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5])), list_node([1, 3, 5, 2, 4]))\n assert candidate(head = list_node([])) == None\n assert is_same_list(candidate(head = list_node([1, 2])), list_node([1, 2]))\n assert is_same_list(candidate(head = list_node([1])), list_node([1]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4])), list_node([1, 3, 2, 4]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6])), list_node([1, 3, 5, 2, 4, 6]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10])), list_node([1, 5, 9, 4, 8, 3, 7, 2, 6, 10]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1])), list_node([5, 3, 1, 4, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59]))\n assert is_same_list(candidate(head = list_node([5, 3, 8, 6, 2, 4, 7, 1, 9])), list_node([5, 8, 2, 7, 9, 3, 6, 4, 1]))\n assert is_same_list(candidate(head = list_node([2, 3, 1, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14])), list_node([2, 1, 4, 6, 8, 10, 12, 14, 3, 5, 7, 9, 11, 13, 15]))\n assert is_same_list(candidate(head = list_node([-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120, -130, -140, -150])), list_node([-10, -30, -50, -70, -90, -110, -130, -150, -20, -40, -60, -80, -100, -120, -140]))\n assert is_same_list(candidate(head = list_node([10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11])), list_node([10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30])), list_node([-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]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])), list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5])), list_node([1, 2, 3, 4, 4, 5, 5, 5, 2, 3, 3, 4, 4, 5, 5]))\n assert is_same_list(candidate(head = list_node([5, 3, 8, 6, 2, 4, 7, 1, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([5, 8, 2, 7, 9, 11, 13, 15, 17, 19, 3, 6, 4, 1, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11])), list_node([5, 3, 1, 9, 7, 15, 13, 11, 4, 2, 10, 8, 6, 14, 12]))\n assert is_same_list(candidate(head = list_node([10, 21, 32, 43, 54, 65, 76, 87, 98, 109])), list_node([10, 32, 54, 76, 98, 21, 43, 65, 87, 109]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39])), list_node([1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([999999, -999999, 999998, -999998, 999997, -999997, 999996, -999996])), list_node([999999, 999998, 999997, 999996, -999999, -999998, -999997, -999996]))\n assert is_same_list(candidate(head = list_node([1000000, -1000000, 500000, -500000, 250000, -250000, 125000, -125000])), list_node([1000000, 500000, 250000, 125000, -1000000, -500000, -250000, -125000]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120])), list_node([10, 30, 50, 70, 90, 110, 20, 40, 60, 80, 100, 120]))\n assert is_same_list(candidate(head = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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 is_same_list(candidate(head = list_node([1, 10, 2, 9, 3, 8, 4, 7, 5, 6])), list_node([1, 2, 3, 4, 5, 10, 9, 8, 7, 6]))\n assert is_same_list(candidate(head = list_node([1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([999999, -999999, 999998, -999998, 999997, -999997, 999996, -999996, 999995, -999995, 999994, -999994, 999993, -999993, 999992, -999992, 999991, -999991, 999990, -999990])), list_node([999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991, 999990, -999999, -999998, -999997, -999996, -999995, -999994, -999993, -999992, -999991, -999990]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([10, 8, 6, 4, 2, 9, 7, 5, 3, 1]))\n assert is_same_list(candidate(head = list_node([100000, -100000, 100000, -100000, 100000, -100000])), list_node([100000, 100000, 100000, -100000, -100000, -100000]))\n assert is_same_list(candidate(head = list_node([10000, -10000, 5000, -5000, 2500, -2500, 1250, -1250, 625, -625, 312, -312, 156, -156, 78, -78, 39, -39, 19, -19])), list_node([10000, 5000, 2500, 1250, 625, 312, 156, 78, 39, 19, -10000, -5000, -2500, -1250, -625, -312, -156, -78, -39, -19]))\n assert is_same_list(candidate(head = list_node([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5])), list_node([-5, -3, -1, 1, 3, 5, -4, -2, 0, 2, 4]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])), list_node([1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 11, 13, 15, 17, 19, 12, 14, 16, 18, 20])), list_node([1, 5, 9, 4, 8, 11, 15, 19, 14, 18, 3, 7, 2, 6, 10, 13, 17, 12, 16, 20]))\n assert is_same_list(candidate(head = list_node([10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 110])), list_node([10, 32, 54, 76, 98, 110, 21, 43, 65, 87, 109]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([-1, -3, -5, -7, -9, -2, -4, -6, -8, -10]))\n assert is_same_list(candidate(head = list_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])), list_node([0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4])), list_node([1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 3, 2, 4, 5, 7, 6, 9, 8, 11, 10])), list_node([1, 2, 5, 6, 8, 10, 3, 4, 7, 9, 11]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(head = list_node([100, -200, 300, 0, 500, 600, -700, 800, 900, 1000])), list_node([100, 300, 500, -700, 900, -200, 0, 600, 800, 1000]))\n assert is_same_list(candidate(head = list_node([1000000, -1000000, 2000000, -2000000, 3000000, -3000000])), list_node([1000000, 2000000, 3000000, -1000000, -2000000, -3000000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([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]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9])), list_node([9, 7, 5, 3, 1, -1, -3, -5, -7, -9, 8, 6, 4, 2, 0, -2, -4, -6, -8]))\n assert is_same_list(candidate(head = list_node([100, -200, 300, -400, 500, -600, 700, -800, 900, -1000])), list_node([100, 300, 500, 700, 900, -200, -400, -600, -800, -1000]))\n assert is_same_list(candidate(head = list_node([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])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_list(candidate(head = list_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])), list_node([-1, -3, -5, -7, -9, -11, -13, -15, -2, -4, -6, -8, -10, -12, -14]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 2, 4, 6, 8, 10, 12, 14]))\n assert is_same_list(candidate(head = list_node([5, 3, 1, 4, 2, 6, 8, 7, 9, 11, 13, 10, 12, 14, 15])), list_node([5, 1, 2, 8, 9, 13, 12, 15, 3, 4, 6, 7, 11, 10, 14]))\n assert is_same_list(candidate(head = list_node([100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])), list_node([100, 300, 500, 700, 900, 200, 400, 600, 800, 1000]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 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])), list_node([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, 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]))\n assert is_same_list(candidate(head = list_node([10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10])), list_node([10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), list_node([0, 0, 0, 0, 0, 0, 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 is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210])), list_node([10, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150])), list_node([10, 30, 50, 70, 90, 110, 130, 150, 20, 40, 60, 80, 100, 120, 140]))\n assert is_same_list(candidate(head = list_node([1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]))\n assert is_same_list(candidate(head = list_node([999999, -999999, 999999, -999999, 999999, -999999, 999999, -999999, 999999, -999999, 999999, -999999])), list_node([999999, 999999, 999999, 999999, 999999, 999999, -999999, -999999, -999999, -999999, -999999, -999999]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 1, 3, 5, 7, 9])), list_node([2, 6, 10, 3, 7, 4, 8, 1, 5, 9]))\n assert is_same_list(candidate(head = list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])), list_node([1, 5, 9, 13, 17, 2, 6, 10, 14, 18, 3, 7, 11, 15, 19, 4, 8, 12, 16, 20]))\n assert is_same_list(candidate(head = list_node([2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40])), list_node([2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40]))\n assert is_same_list(candidate(head = list_node([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])), list_node([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]))\n assert is_same_list(candidate(head = list_node([5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5])), list_node([5, 3, 1, -1, -3, -5, 4, 2, 0, -2, -4]))\n assert is_same_list(candidate(head = list_node([100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991])), list_node([100000, 99998, 99996, 99994, 99992, 99999, 99997, 99995, 99993, 99991]))\n assert is_same_list(candidate(head = list_node([10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110])), list_node([10, 30, 50, 70, 90, 110, 20, 40, 60, 80, 100]))\n assert is_same_list(candidate(head = list_node([1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1])), list_node([1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]))\n assert is_same_list(candidate(head = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([9, 7, 5, 3, 1, 8, 6, 4, 2]))\n assert is_same_list(candidate(head = list_node([1000000, -1000000, 500000, -500000, 250000, -250000, 125000, -125000, 62500, -62500])), list_node([1000000, 500000, 250000, 125000, 62500, -1000000, -500000, -250000, -125000, -62500]))\n assert is_same_list(candidate(head = list_node([100000, -100000, 50000, -50000, 25000, -25000, 12500, -12500])), list_node([100000, 50000, 25000, 12500, -100000, -50000, -25000, -12500]))\n assert is_same_list(candidate(head = list_node([1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3])), list_node([1, 1, 1, 2, 2, 3, 3, 3, 1, 1, 2, 2, 2, 3, 3]))\n assert is_same_list(candidate(head = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])), list_node([1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]))\n"}, "metadata": {"canonical_parameter_names": ["head"], "leetcode_dataset_entry_point": "Solution().oddEvenList", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* oddEvenList(ListNode* head) {", "container": "Solution", "callable": "oddEvenList", "parameters": [{"name": "head", "type": "ListNode*"}], "return_type": "ListNode*", "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.\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\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\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\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= m, n <= 200\n0 <= matrix[i][j] <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().longestIncreasingPath", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestIncreasingPath(vector>& matrix) {", "container": "Solution", "callable": "longestIncreasingPath", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 1000\n1 <= nums[i] <= 104\nnums is sorted in ascending order.\n1 <= n <= 231 - 1\n\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 = [],n = 8) == 4\n assert candidate(nums = [],n = 7) == 3\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, 1000000000],n = 2000000000) == 29\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 = [1, 100, 10000, 1000000],n = 2000000) == 18\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, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536],n = 1000000) == 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, 10, 100, 1000, 10000, 100000],n = 1000000) == 15\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, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, 729, 1458, 2187, 4374, 6561, 13122, 19683, 39366],n = 50000) == 0\n assert candidate(nums = [1, 4, 13, 36, 104, 284, 780, 2184, 5964, 16216, 43792, 118764, 319524, 866208, 2359608, 6336584, 17335296, 46832600, 127132960, 341754864],n = 1000000000) == 15\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, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536],n = 100000000) == 10\n assert candidate(nums = [1, 2, 3, 5, 11, 21, 43, 85, 171, 341, 683, 1365, 2731, 5461, 10922, 21845],n = 100000) == 2\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"}, "metadata": {"canonical_parameter_names": ["nums", "n"], "leetcode_dataset_entry_point": "Solution().minPatches", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minPatches(vector& nums, int n) {", "container": "Solution", "callable": "minPatches", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "n", "type": "int"}], "return_type": "int", "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.\nGiven a string of comma-separated values preorder, return true if it is a correct preorder traversal serialization of a binary tree.\nIt is guaranteed that each comma-separated value in the string must be either an integer or a character '#' representing null pointer.\nYou may assume that the input format is always valid.\n\nFor 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:\nInput: preorder = \"9,3,4,#,#,1,#,#,2,#,6,#,#\"\nOutput: true\nExample 2:\nInput: preorder = \"1,#\"\nOutput: false\nExample 3:\nInput: preorder = \"9,#,#,1\"\nOutput: false\n\n \nConstraints:\n\n1 <= preorder.length <= 104\npreorder consist of integers in the range [0, 100] and '#' separated by commas ','.\n\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"}, "metadata": {"canonical_parameter_names": ["preorder"], "leetcode_dataset_entry_point": "Solution().isValidSerialization", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isValidSerialization(string preorder) {", "container": "Solution", "callable": "isValidSerialization", "parameters": [{"name": "preorder", "type": "string"}], "return_type": "bool", "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] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it.\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\nFor 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\n\nInput: tickets = [[\"MUC\",\"LHR\"],[\"JFK\",\"MUC\"],[\"SFO\",\"SJC\"],[\"LHR\",\"SFO\"]]\nOutput: [\"JFK\",\"MUC\",\"LHR\",\"SFO\",\"SJC\"]\n\nExample 2:\n\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\n \nConstraints:\n\n1 <= tickets.length <= 300\ntickets[i].length == 2\nfromi.length == 3\ntoi.length == 3\nfromi and toi consist of uppercase English letters.\nfromi != toi\n\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', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'D'], ['D', 'A'], ['A', 'JFK'], ['JFK', 'C']]) == ['JFK', 'A', 'B', 'C', 'D', 'A', 'JFK', 'C']\n assert candidate(tickets = [['JFK', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'A'], ['A', 'D'], ['D', 'E'], ['E', 'F'], ['F', 'G'], ['G', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'JFK'], ['JFK', 'H'], ['H', 'I'], ['I', 'J'], ['J', 'H'], ['H', 'JFK'], ['JFK', 'K'], ['K', 'L'], ['L', 'M'], ['M', 'N'], ['N', 'O'], ['O', 'P'], ['P', 'Q'], ['Q', 'R'], ['R', 'S'], ['S', 'T'], ['T', 'U'], ['U', 'V'], ['V', 'W'], ['W', 'X'], ['X', 'Y'], ['Y', 'Z'], ['Z', 'W'], ['W', 'V'], ['V', 'U'], ['U', 'T'], ['T', 'S'], ['S', 'R'], ['R', 'Q'], ['Q', 'P'], ['P', 'O'], ['O', 'N'], ['N', 'M'], ['M', 'L'], ['L', 'K'], ['K', 'JFK'], ['JFK', 'G'], ['G', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'JFK']]) == ['JFK', 'A', 'B', 'A', 'D', 'C', 'A', 'JFK', 'G', 'F', 'E', 'D', 'E', 'F', 'G', 'F', 'E', 'D', 'C', 'B', 'C', 'B', 'A', 'JFK', 'H', 'I', 'J', 'H', 'JFK', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', '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', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'D'], ['D', 'E'], ['E', 'F'], ['F', 'G'], ['G', 'H'], ['H', 'I'], ['I', 'J'], ['J', 'K'], ['K', 'L'], ['L', 'M'], ['M', 'N'], ['N', 'O'], ['O', 'P'], ['P', 'Q'], ['Q', 'R'], ['R', 'S'], ['S', 'T'], ['T', 'U'], ['U', 'V'], ['V', 'W'], ['W', 'X'], ['X', 'Y'], ['Y', 'Z'], ['Z', 'A'], ['A', 'JFK'], ['JFK', 'Z'], ['Z', 'Y'], ['Y', 'X'], ['X', 'W'], ['W', 'V'], ['V', 'U'], ['U', 'T'], ['T', 'S'], ['S', 'R'], ['R', 'Q'], ['Q', 'P'], ['P', 'O'], ['O', 'N'], ['N', 'M'], ['M', 'L'], ['L', 'K'], ['K', 'J'], ['J', 'I'], ['I', 'H'], ['H', 'G'], ['G', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'JFK']]) == ['JFK', 'A', 'B', 'A', 'JFK', 'Z', 'Y', 'X', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', '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', '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', 'B'], ['B', 'JFK'], ['JFK', 'C'], ['C', 'JFK'], ['JFK', 'D'], ['D', 'JFK'], ['JFK', 'E'], ['E', 'JFK']]) == ['JFK', 'B', 'JFK', 'C', 'JFK', 'D', 'JFK', 'E', 'JFK']\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', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'A'], ['A', 'D'], ['D', 'E'], ['E', 'F'], ['F', 'G'], ['G', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'JFK'], ['JFK', 'H'], ['H', 'I'], ['I', 'J'], ['J', 'H'], ['H', 'JFK'], ['JFK', 'K'], ['K', 'L'], ['L', 'M'], ['M', 'N'], ['N', 'O'], ['O', 'P'], ['P', 'Q'], ['Q', 'R'], ['R', 'S'], ['S', 'T'], ['T', 'U'], ['U', 'V'], ['V', 'W'], ['W', 'X'], ['X', 'Y'], ['Y', 'Z'], ['Z', 'W'], ['W', 'V'], ['V', 'U'], ['U', 'T'], ['T', 'S'], ['S', 'R'], ['R', 'Q'], ['Q', 'P'], ['P', 'O'], ['O', 'N'], ['N', 'M'], ['M', 'L'], ['L', 'K'], ['K', 'JFK']]) == ['JFK', 'A', 'B', 'A', 'D', 'E', 'F', 'G', 'F', 'E', 'D', 'C', 'B', 'C', 'A', 'JFK', 'H', 'I', 'J', 'H', 'JFK', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'W', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', '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', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'A'], ['A', 'D'], ['D', 'E'], ['E', 'F'], ['F', 'G'], ['G', 'E'], ['E', 'D'], ['D', 'A'], ['A', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'A'], ['A', 'B'], ['B', 'C'], ['C', 'D'], ['D', 'E'], ['E', 'F'], ['F', 'G'], ['G', 'F'], ['F', 'E'], ['E', 'D'], ['D', 'C'], ['C', 'B'], ['B', 'A'], ['A', 'JFK']]) == ['JFK', 'A', 'B', 'A', 'B', 'A', 'C', 'A', 'D', 'A', 'F', 'E', 'D', 'C', 'B', 'C', 'B', 'C', 'D', 'E', 'D', 'E', 'F', 'E', 'F', 'G', 'F', 'G', 'E', 'D', 'C', 'A', 'JFK']\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"}, "metadata": {"canonical_parameter_names": ["tickets"], "leetcode_dataset_entry_point": "Solution().findItinerary", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findItinerary(vector>& tickets) {", "container": "Solution", "callable": "findItinerary", "parameters": [{"name": "tickets", "type": "vector>&"}], "return_type": "vector", "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: The triplet (3, 4, 5) is valid because nums[3] == 0 < nums[4] == 4 < nums[5] == 6.\n\n \nConstraints:\n\n1 <= nums.length <= 5 * 105\n-231 <= nums[i] <= 231 - 1\n\n \nFollow up: Could you implement a solution that runs in O(n) time complexity and O(1) space complexity?", "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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().increasingTriplet", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool increasingTriplet(vector& nums) {", "container": "Solution", "callable": "increasingTriplet", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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.\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.\nReturn true if your path crosses itself or false if it does not.\n \nExample 1:\n\n\nInput: distance = [2,1,1,2]\nOutput: true\nExplanation: The path crosses itself at the point (0, 1).\n\nExample 2:\n\n\nInput: distance = [1,2,3,4]\nOutput: false\nExplanation: The path does not cross itself at any point.\n\nExample 3:\n\n\nInput: distance = [1,1,1,2,1]\nOutput: true\nExplanation: The path crosses itself at the point (0, 0).\n\n \nConstraints:\n\n1 <= distance.length <= 105\n1 <= distance[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["distance"], "leetcode_dataset_entry_point": "Solution().isSelfCrossing", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isSelfCrossing(vector& distance) {", "container": "Solution", "callable": "isSelfCrossing", "parameters": [{"name": "distance", "type": "vector&"}], "return_type": "bool", "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.\nA palindrome pair is a pair of integers (i, j) such that:\n\n0 <= i, j < words.length,\ni != j, and\nwords[i] + words[j] (the concatenation of the two strings) is a palindrome.\n\nReturn an array of all the palindrome pairs of words.\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\n \nConstraints:\n\n1 <= words.length <= 5000\n0 <= words[i].length <= 300\nwords[i] consists of lowercase English letters.\n\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 = ['zxcvbnm', 'mnbvcxz', 'asdfghjkl', 'lkjhgfdsa', 'qwertyuiop', 'poiuytrewq', '1234567890', '0987654321', 'abcdefghij', 'jihgfedcba', 'klmnopqrst', 'tsrqponmlk', 'uvwxyz', 'zyxwvut', 'nopqrstu', 'utsrqpon', 'abcdefgh', 'hgfedcba', 'ijklmnop', 'ponmlkji', 'qrstuvwx', 'xwvutsrq', 'yz', 'zy', 'abcd', 'dcba', 'ab', 'ba', '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], [1, 0], [2, 3], [3, 2], [4, 5], [5, 4], [6, 7], [7, 6], [8, 9], [9, 8], [10, 11], [11, 10], [13, 12], [14, 15], [15, 14], [16, 17], [17, 16], [18, 19], [19, 18], [20, 21], [21, 20], [22, 52], [53, 22], [22, 23], [23, 53], [52, 23], [23, 22], [24, 25], [25, 24], [26, 28], [29, 26], [26, 27], [27, 29], [28, 27], [27, 26]]\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 = ['a1b', 'b1a', 'abc2', '2cba', 'abcd3', '3dcba', 'abcde4', '4edcba', 'abcdef5', '5fedcba', 'abcdefg6', '6gfedcba', 'abcdefgh7', '7hgfedcba', 'abcdefghi8', '8ihgfedcba']) == [[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], [14, 15], [15, 14]]\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 assert candidate(words = ['12321', '21312', '32123', '43234', '54345', '65456', '76567', '87678', '98789', '10901', '11011']) == []\n"}, "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().palindromePairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> palindromePairs(vector& words) {", "container": "Solution", "callable": "palindromePairs", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 337, "task_id": "house-robber-iii", "difficulty": "Medium", "problem_description": "The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root.\nBesides the root, each house has one and only one parent house. After a tour, the smart thief realized that all houses in this place form a binary tree. It will automatically contact the police if two directly-linked houses were broken into on the same night.\nGiven the root of the binary tree, return the maximum amount of money the thief can rob without alerting the police.\n \nExample 1:\n\n\nInput: root = [3,2,3,null,3,null,1]\nOutput: 7\nExplanation: Maximum amount of money the thief can rob = 3 + 3 + 1 = 7.\n\nExample 2:\n\n\nInput: root = [3,4,5,1,3,null,1]\nOutput: 9\nExplanation: Maximum amount of money the thief can rob = 4 + 5 = 9.\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 104].\n0 <= Node.val <= 104\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == 23\n assert candidate(root = tree_node([3, 2, None, 1, 3, None, 1])) == 7\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 9\n assert candidate(root = tree_node([3, 0, 0])) == 3\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == 38\n assert candidate(root = tree_node([3, 4, 5, 1, 3, None, 1])) == 9\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, 7])) == 13\n assert candidate(root = tree_node([2, 1, 3, None, 4])) == 7\n assert candidate(root = tree_node([1, None, 3, 2, 4, None, 5, 6])) == 14\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 1])) == 7\n assert candidate(root = tree_node([0])) == 0\n assert candidate(root = tree_node([3, None, 4, None, 5])) == 8\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 7, None, 3, 18, None, 6, 2, 0, 1, 5, None, None, None, None, 4])) == 59\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 30\n assert candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, None, 6, 8, None, None, None, 9])) == 55\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6, 8, 12, 14, 17, 19])) == 97\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 13, 17, 23, 27, 33, 37, 1, 3, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38])) == 418\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7])) == 17\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 5, 5, None, None, 6, 6, 7, 7, 8, 8, 9, 9])) == 63\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, 5, None, 6])) == 13\n assert candidate(root = tree_node([5, 2, 13, None, 5, None, 14, 20, None, None, 9, 10, 3])) == 44\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190])) == 980\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, None, 6, None, 11, 13, None, None, 18, 22])) == 104\n assert candidate(root = tree_node([3, 2, 3, 3, 3, None, 2, None, 1])) == 11\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == 80\n assert candidate(root = tree_node([3000, 1000, 2000, 500, 700, None, 3000, None, 600, None, 800, None, 900])) == 7400\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, 9, None, None, 11, 13, None, None, 15, 17])) == 82\n assert candidate(root = tree_node([3, 2, 3, 2, None, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1])) == 16\n assert candidate(root = tree_node([100, 90, 80, 70, 60, 50, 40, 30, 20, 10])) == 320\n assert candidate(root = tree_node([3, 1, 4, 3, None, 1, 5])) == 12\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9])) == 18\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, 13, None, None, None, None, 19])) == 61\n assert candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, None, 6, 8, None, None, None, None, 18])) == 58\n assert candidate(root = tree_node([5, 1, 5, None, 7, 6, None, 4, None, 3, None, 2, 8, None, None, None, 9])) == 35\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, 18, 13, 17, 16, 19, 14, 21, 10, 11, None, 15])) == 137\n assert candidate(root = tree_node([6, 7, 8, 2, 7, 1, 3, 9, None, 1, 4, None, None, None, 5])) == 34\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, None, 20, 17, 21])) == 92\n assert candidate(root = tree_node([6, 3, 7, 2, 5, None, 8, 1, 4, None, None, None, None, None, 9])) == 32\n assert candidate(root = tree_node([8, 4, 13, 2, 6, 10, 14, 1, None, 5, 7, None, None, 9, 12])) == 53\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 1, 5, 6, 7, 8, 9, 10, 11, 12])) == 63\n assert candidate(root = tree_node([15, 10, 20, 8, None, None, 25, None, None, None, 30])) == 60\n assert candidate(root = tree_node([50, 20, 50, 10, 30, 40, 60, 5, 15, None, None, None, None, None, 70])) == 210\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])) == 368\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 162\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 97\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 6, 8, 9, 12, 14, 17, 19])) == 106\n assert candidate(root = tree_node([10, 5, None, 1, 7, None, 12, 0, 2, 6, 8, None, None, 11, 13, None, None, 3, 4, None, None, None, None, 9, 10])) == 76\n assert candidate(root = tree_node([5, 4, 7, 3, None, 2, 9, None, None, None, 10])) == 27\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == 259\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 1, None, None, 5, 6])) == 17\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180, 5, 15, 20, 35, 65, 70, 85, 105, 135, 145, 155, 175, 185, 190])) == 1890\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 6, 8, 12, 14, 17, 9, 11, 2, 4, 16, 19, 20])) == 144\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 8, 12, None, None, 11, None, 10])) == 59\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 1, 5, 6, 7, 8, 9, 10])) == 45\n assert candidate(root = tree_node([9, 4, 17, 3, 6, 11, 20, 1, 5, 8, 13, None, 22, None, 2, None, None, 0, 2, None, 9, None, None, 7, 12, None, None, None, 2])) == 89\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, 5, 6, None, 7, None, 8, None, 9, None, 10])) == 32\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, 8, 9, None, None, None, None, 10, 11, None, None, None, None, None, 12])) == 49\n assert candidate(root = tree_node([50, 20, 60, 10, 30, 55, 70, 5, 15, 25, 35, 51, 59, 65, 75, 1, 4, 9, 16, 24, 26, 34, 36, 50, 58, 61, 64, 66, 73, 76, 78])) == 891\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 16\n assert candidate(root = tree_node([5, 4, 5, None, 1, 4, None, None, 2, 3])) == 14\n assert candidate(root = tree_node([10, 5, 15, 2, 7, 13, 18, 1, None, 6, 8, 9, 14, None, None, None, 19, None, 20])) == 100\n assert candidate(root = tree_node([5, 3, 7, 2, 5, None, 8, 1, None, 4, None, 6, None, 3, 5])) == 28\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, None, 6, None, 11, 13, None, None, 18, 22, 19, 23, 24, 25, 26, 27, 28, 29, 30])) == 283\n assert candidate(root = tree_node([50, 20, 60, 10, 30, 55, 70, 5, 15, 25, 35, 52, 58, 65, 75, 2, 7, 12, 17, 23, 27, 32, 37, 51, 56, 59, 64, 67, 72, 76, 78])) == 895\n assert candidate(root = tree_node([100, 50, 50, 25, 25, 25, 25, 10, 10, 10, 10, 10, 10, 10, 10])) == 200\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, None, 5, None, None, 6, None, None, None, 7])) == 13\n assert candidate(root = tree_node([2, 1, 3, None, 4, None, 5, None, 6, None, 7])) == 17\n assert candidate(root = tree_node([9, 4, 7, 3, 6, 5, 11, 2, 5, None, None, 8, None, 10, 12, None, None, None, None, None, 14])) == 63\n assert candidate(root = tree_node([3, 4, 5, 1, 3, None, 1, 5, 6, None, 2, 8, None, None, None, 9, None, None, 10])) == 41\n assert candidate(root = tree_node([8, 4, 13, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 12, 15])) == 80\n assert candidate(root = tree_node([7, 3, 8, 1, 4, 3, 9, 0, 2, 5, 6, None, None, None, None, None, 11])) == 43\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8])) == 45\n assert candidate(root = tree_node([10, 5, 15, 2, 7, 13, 18, 1, None, 6, 8, 9, 14, 19, 20])) == 97\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, 14, 19, None, None, 13, None, None, None, None, None, None, 12])) == 75\n assert candidate(root = tree_node([5, 2, 8, 1, 3, None, 9, 0, None, None, 4, None, None, 6, None, 10])) == 34\n assert candidate(root = tree_node([10, 5, 15, 2, 7, 13, 18, 1, None, 6, 8, None, 14, None, None, 19])) == 77\n assert candidate(root = tree_node([50, 20, 30, 10, 40, None, None, 5, None, None, 55])) == 115\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, 2, None, None, None, 20])) == 45\n assert candidate(root = tree_node([5, 2, 6, 1, 3, None, 8, None, None, 4, 7, None, None, None, 9])) == 30\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 32\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9, 10, 11, 12])) == 56\n assert candidate(root = tree_node([7, 3, 8, 1, 4, 5, 9, 0, 2, 6, None, None, None, None, None, None, 10])) == 39\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])) == 49\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 25\n assert candidate(root = tree_node([20, 10, 10, 5, 15, None, None, 3, 7, 12, 18])) == 60\n assert candidate(root = tree_node([8, 4, 13, 2, 6, 10, 17, 1, None, 5, 7, None, 12, None, None, None, 14])) == 65\n assert candidate(root = tree_node([7, 3, 8, 1, 4, 6, 9, 0, 2, 5, None, None, None, None, None, None, None, 10, 11, None, 12, None, 13, 14, 15, None, None, None, None, 16, 17])) == 101\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 1, 2, None, 4])) == 11\n assert candidate(root = tree_node([50, 20, 50, None, 30, None, 60, 10, 40, None, 70])) == 190\n assert candidate(root = tree_node([3, 1, 5, 0, 2, 4, 6])) == 15\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == 35\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().rob", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int rob(TreeNode* root) {", "container": "Solution", "callable": "rob", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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 \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\n \nConstraints:\n\n0 <= n <= 105\n\n \nFollow up:\n\nIt 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?\nCan you do it without using any built-in function (i.e., like __builtin_popcount in C++)?\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countBits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector countBits(int n) {", "container": "Solution", "callable": "countBits", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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.\nAn integer n is a power of four, if there exists an integer x such that n == 4x.\n \nExample 1:\nInput: n = 16\nOutput: true\nExample 2:\nInput: n = 5\nOutput: false\nExample 3:\nInput: n = 1\nOutput: true\n\n \nConstraints:\n\n-231 <= n <= 231 - 1\n\n \nFollow up: Could you solve it without loops/recursion?", "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 = 4294967295) == 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 = 4294967296) == True\n assert candidate(n = 1) == True\n assert candidate(n = 1000000003) == False\n assert candidate(n = 1099511627776) == True\n assert candidate(n = -4294967296) == False\n assert candidate(n = 4096) == True\n assert candidate(n = 18446744073709551615) == False\n assert candidate(n = 1431655765) == False\n assert candidate(n = 1000000002) == False\n assert candidate(n = 16384) == True\n assert candidate(n = 2147483649) == False\n assert candidate(n = -1) == False\n assert candidate(n = 2199023255552) == True\n assert candidate(n = 4194304) == True\n assert candidate(n = 1073741823) == False\n assert candidate(n = 1152921504606846976) == True\n assert candidate(n = -65536) == False\n assert candidate(n = 34359738368) == True\n assert candidate(n = 9223372036854775807) == False\n assert candidate(n = 1073741824) == True\n assert candidate(n = 18014398509481984) == True\n assert candidate(n = 255) == False\n assert candidate(n = 2147483648) == False\n assert candidate(n = 17179869184) == True\n assert candidate(n = 4611686018427387904) == True\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 = 35184372088832) == True\n assert candidate(n = 72057594037927936) == True\n assert candidate(n = 1073741825) == False\n assert candidate(n = 7) == False\n assert candidate(n = 10) == False\n assert candidate(n = 18446744073709551616) == True\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfFour", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPowerOfFour(int n) {", "container": "Solution", "callable": "isPowerOfFour", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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.\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\n \nConstraints:\n\n2 <= n <= 58\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().integerBreak", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int integerBreak(int n) {", "container": "Solution", "callable": "integerBreak", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 345, "task_id": "reverse-vowels-of-a-string", "difficulty": "Easy", "problem_description": "Given a string s, reverse only all the vowels in the string and return it.\nThe vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper cases, more than once.\n \nExample 1:\n\nInput: s = \"IceCreAm\"\nOutput: \"AceCreIm\"\nExplanation:\nThe vowels in s are ['I', 'e', 'e', 'A']. On reversing the vowels, s becomes \"AceCreIm\".\n\nExample 2:\n\nInput: s = \"leetcode\"\nOutput: \"leotcede\"\n\n \nConstraints:\n\n1 <= s.length <= 3 * 105\ns consist of printable ASCII characters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"hello\") == \"holle\"\n assert candidate(s = \"leetcode\") == \"leotcede\"\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().reverseVowels", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string reverseVowels(string s) {", "container": "Solution", "callable": "reverseVowels", "parameters": [{"name": "s", "type": "string"}], "return_type": "string", "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:\nInput: nums = [1,1,1,2,2,3], k = 2\nOutput: [1,2]\nExample 2:\nInput: nums = [1], k = 1\nOutput: [1]\n\n \nConstraints:\n\n1 <= nums.length <= 105\n-104 <= nums[i] <= 104\nk is in the range [1, the number of unique elements in the array].\nIt is guaranteed that the answer is unique.\n\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 check(candidate):\n assert candidate(nums = [5, 3, 1, 1, 1, 3, 5, 2, 2, 2, 4, 4, 4, 4],k = 3) == [4, 1, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 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],k = 10) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [5, 3, 1, 1, 1, 3, 73, 1],k = 1) == [1]\n assert candidate(nums = [1],k = 1) == [1]\n assert candidate(nums = [1, 1, 1, 2, 2, 3],k = 2) == [1, 2]\n assert candidate(nums = [-1, -1, -1, 2, 2, 3, 4, 4, 4, 4],k = 2) == [4, -1]\n assert candidate(nums = [1, 2],k = 2) == [1, 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, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 1, 1],k = 3) == [5, 4, 3]\n assert candidate(nums = [5, 3, 1, 1, 1, 3, 5, 7, 7, 7, 7],k = 3) == [7, 1, 5]\n assert candidate(nums = [4, 1, -1, 2, -1, 2, 3],k = 2) == [-1, 2]\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, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 4) == [9, 8, 7, 6]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [10000, 10000, 9999, 9999, 9999, 9998, 9998, 9997, 9996, 9995],k = 3) == [9999, 10000, 9998]\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, 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 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 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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().topKFrequent", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector topKFrequent(vector& nums, int k) {", "container": "Solution", "callable": "topKFrequent", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= nums1.length, nums2.length <= 1000\n0 <= nums1[i], nums2[i] <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [4, 3, 2, 1]) == [1, 2, 3, 4]\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1, 1, 1]) == [1]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [2, 4, 6, 8]) == []\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [0, 0, 0, 0]) == [0]\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 0]) == [0, 1, 2, 3, 4, 5]\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [30, 40, 50, 60]) == [40, 30]\n assert candidate(nums1 = [1000],nums2 = [1000]) == [1000]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]\n assert candidate(nums1 = [1, 2, 2, 1],nums2 = [2, 2]) == [2]\n assert candidate(nums1 = [1000, 1000, 1000],nums2 = [1000, 1000]) == [1000]\n assert candidate(nums1 = [10, 20, 30],nums2 = [30, 40, 50]) == [30]\n assert candidate(nums1 = [5, 5, 5, 5],nums2 = [5, 5, 5, 5]) == [5]\n assert candidate(nums1 = [4, 9, 5],nums2 = [9, 4, 9, 8, 4]) == [9, 4]\n assert candidate(nums1 = [0, 1000],nums2 = [500, 1000]) == [1000]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6]) == []\n assert candidate(nums1 = [1000, 1000],nums2 = [1000, 1000]) == [1000]\n assert candidate(nums1 = [500, 500, 500],nums2 = [500]) == [500]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [3, 4, 5, 6, 7]) == [3, 4, 5]\n assert candidate(nums1 = [0],nums2 = [0]) == [0]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [0, 2, 4, 6, 8]) == []\n assert candidate(nums1 = [0, 0, 0],nums2 = [0, 0, 0]) == [0]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 10, 20, 30, 40]) == [40, 10, 50, 20, 30]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0]) == [0]\n assert 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 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 candidate(nums1 = [999, 998, 997, 996, 995],nums2 = [994, 993, 992, 991, 990]) == []\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]) == [1]\n assert 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 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 candidate(nums1 = [1, 1, 2, 2, 3, 3, 4, 4],nums2 = [2, 2, 4, 4, 6, 6, 8, 8]) == [2, 4]\n assert candidate(nums1 = [1000, 0, 500, 250, 750],nums2 = [750, 500, 250, 0, 1000]) == [0, 1000, 750, 500, 250]\n assert 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 candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10]) == []\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1]) == [1]\n assert 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 candidate(nums1 = [1, 10, 100, 1000],nums2 = [1000, 100, 10, 1]) == [1000, 1, 10, 100]\n assert 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 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 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 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 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 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 candidate(nums1 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],nums2 = [90, 100, 110, 120, 130, 140]) == [90, 100]\n assert candidate(nums1 = [1000],nums2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == []\n assert candidate(nums1 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],nums2 = [900, 1000, 1100, 1200, 1300]) == [1000, 900]\n assert candidate(nums1 = [1, 10, 100, 1000],nums2 = [1, 10, 100, 1000]) == [1000, 1, 10, 100]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5]) == [5]\n assert candidate(nums1 = [345, 678, 910, 1112, 1314],nums2 = [1314, 345, 567, 789, 910]) == [345, 1314, 910]\n assert 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 0, -1, -2]) == [1, 2, 3, 4, 5]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [100, 200, 300, 400, 500]) == [100, 200, 300, 400, 500]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [200, 400, 600, 800, 1000]) == [200, 400]\n assert 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 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 5, 5, 5, 5]) == [5]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == [1, 2, 3, 4, 5]\n assert 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 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 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 candidate(nums1 = [1, 2, 3],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 60, 70, 80, 90]) == [50]\n assert candidate(nums1 = [999, 998, 997, 996, 995],nums2 = [995, 996, 997, 998, 999]) == [995, 996, 997, 998, 999]\n assert 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [4, 5, 6, 7, 8]) == [4, 5]\n assert 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 60, 70, 80, 90, 100]) == [50]\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]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [40, 50, 60, 70, 80]) == [40, 50]\n assert 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 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]\n assert candidate(nums1 = [1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1]\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 0]) == [0, 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]) == []\n assert candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [3, 3, 4, 4, 5, 5]) == [3]\n assert 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 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 60, 70, 80, 90]) == [50]\n assert 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 candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [3, 3, 3, 2, 2, 1, 1]) == [1, 2, 3]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 500, 500, 500, 500]) == [500]\n assert candidate(nums1 = [1, 1, 2, 3, 3],nums2 = [2, 2, 3, 3, 4, 4]) == [2, 3]\n assert 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 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 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 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 candidate(nums1 = [7, 14, 21, 28, 35],nums2 = [35, 42, 49, 56, 63]) == [35]\n assert 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 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 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 candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 100],nums2 = [100, 200, 300, 400, 500]) == [100]\n assert 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 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 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 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 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 candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10]) == []\n assert 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 candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [2, 2, 3, 3, 4, 4]) == [2, 3]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 400, 300, 200, 100]) == [100, 200, 300, 400, 500]\n assert 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 candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6]) == []\n assert 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 candidate(nums1 = [500, 500, 500, 500, 500],nums2 = [500, 500, 500, 500, 500]) == [500]\n assert candidate(nums1 = [5, 10, 15, 20, 25, 30],nums2 = [30, 25, 20, 15, 10, 5]) == [5, 10, 15, 20, 25, 30]\n assert 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [150, 250, 350, 450, 550]) == []\n assert candidate(nums1 = [100, 100, 100, 100],nums2 = [100, 100, 100]) == [100]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 600, 700, 800, 900]) == [500]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10]) == []\n assert 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 candidate(nums1 = [100, 200, 300],nums2 = [300, 400, 500, 600, 700]) == [300]\n assert candidate(nums1 = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],nums2 = [2, 4, 6, 8, 10]) == [2, 4]\n assert candidate(nums1 = [100, 200, 300],nums2 = [100, 200, 300, 400, 500]) == [200, 100, 300]\n assert 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 candidate(nums1 = [0, 100, 200, 300, 400],nums2 = [400, 300, 200, 100, 0]) == [0, 100, 200, 300, 400]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [15, 25, 35, 45, 55]) == []\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [100, 300, 500, 700, 900]) == [100, 500, 300]\n assert 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [15, 20, 25, 30, 35]) == [20, 30]\n"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().intersection", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector intersection(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "intersection", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= nums1.length, nums2.length <= 1000\n0 <= nums1[i], nums2[i] <= 1000\n\n \nFollow up:\n\nWhat if the given array is already sorted? How would you optimize your algorithm?\nWhat if nums1's size is small compared to nums2's size? Which algorithm is better?\nWhat 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\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 40, 30, 20, 10]) == [50, 40, 30, 20, 10]\n assert candidate(nums1 = [100, 200, 300],nums2 = [300, 200, 100]) == [300, 200, 100]\n assert candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [3, 3, 3, 3, 1, 1]) == [3, 3, 1, 1]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [2, 4, 6, 8]) == []\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [0, 0, 0, 0]) == [0, 0, 0, 0]\n assert candidate(nums1 = [0, 0, 0],nums2 = [0, 0, 0, 0]) == [0, 0, 0]\n assert candidate(nums1 = [1000, 1000, 1000],nums2 = [1000, 1000, 1000]) == [1000, 1000, 1000]\n assert candidate(nums1 = [1, 1, 2, 2],nums2 = [2, 2, 2, 2]) == [2, 2]\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [30, 40, 50, 60]) == [30, 40]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10]) == []\n assert candidate(nums1 = [1000],nums2 = [1000]) == [1000]\n assert candidate(nums1 = [1, 3, 2, 4],nums2 = [3, 2, 2, 1]) == [3, 2, 1]\n assert candidate(nums1 = [1000, 1000],nums2 = [1000, 1000, 1000]) == [1000, 1000]\n assert candidate(nums1 = [],nums2 = []) == []\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == [5, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 2, 2, 1],nums2 = [2, 2]) == [2, 2]\n assert candidate(nums1 = [1000, 1000, 1000],nums2 = [1000, 1000]) == [1000, 1000]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5]) == [5, 5, 5, 5, 5]\n assert candidate(nums1 = [7, 8, 9],nums2 = [10, 11, 12]) == []\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10]) == []\n assert candidate(nums1 = [1],nums2 = [2]) == []\n assert candidate(nums1 = [4, 9, 5],nums2 = [9, 4, 9, 8, 4]) == [9, 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]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 1, 1]) == [1, 1, 1]\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1]) == [1, 1]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5]) == [5, 5, 5, 5]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6]) == []\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1, 1]) == [1, 1, 1]\n assert candidate(nums1 = [1],nums2 = [1]) == [1]\n assert 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 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 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 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 candidate(nums1 = [500, 500, 500, 500],nums2 = [500, 500, 500, 500, 500, 500, 500]) == [500, 500, 500, 500]\n assert 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 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 40, 30, 20, 10, 10]) == [50, 40, 30, 20, 10]\n assert 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 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 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 candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [11, 12, 13, 14, 15]) == []\n assert 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 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 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 candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1]) == [1]\n assert 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [15, 20, 25, 30, 35, 40, 45, 50]) == [20, 30, 40, 50]\n assert candidate(nums1 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],nums2 = [150, 250, 350, 450, 550, 650, 750, 850, 950]) == []\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]) == [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n assert 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 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 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 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [3, 4, 5, 6, 7]) == [3, 4, 5]\n assert 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 candidate(nums1 = [3, 4, 4, 5, 6, 7, 8, 8, 9],nums2 = [4, 4, 8, 9, 10]) == [4, 4, 8, 9]\n assert 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 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [100, 200, 300, 400, 500]) == [100, 200, 300, 400, 500]\n assert 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 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 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 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 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 candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0]) == [0, 0, 0]\n assert 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 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 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 candidate(nums1 = [7, 7, 7, 7, 7],nums2 = [7, 7, 7, 7, 7, 7, 7]) == [7, 7, 7, 7, 7]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15],nums2 = [2, 4, 6, 8, 10, 12, 14, 16]) == []\n assert 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 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 candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 2, 3, 4, 5]) == [1]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == [5, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [2, 4, 6, 8, 10]) == [2, 4]\n assert candidate(nums1 = [7, 8, 9],nums2 = [1, 2, 3]) == []\n assert 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 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 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 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 candidate(nums1 = [1],nums2 = [2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert 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 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 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 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 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 400, 300, 200, 100, 100]) == [500, 400, 300, 200, 100]\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]\n assert 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 candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [1, 1, 1, 1, 1]) == [1]\n assert candidate(nums1 = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == [9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert 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 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 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 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 candidate(nums1 = [1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1]) == [1, 1, 1]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1]) == [1, 1, 1, 1]\n assert 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 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 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 candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [1, 1, 1, 2, 2, 3]) == [1, 1, 2, 2, 3]\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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10]) == []\n assert 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 candidate(nums1 = [500, 500, 500, 500, 500],nums2 = [500, 500]) == [500, 500]\n assert candidate(nums1 = [1, 2, 2, 3, 4],nums2 = [2, 2, 4, 4, 6]) == [2, 2, 4]\n assert 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 candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 400, 300, 200, 100]) == [500, 400, 300, 200, 100]\n assert 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 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 candidate(nums1 = [1, 2, 2, 3, 3, 4],nums2 = [2, 2, 3, 5]) == [2, 2, 3]\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]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert 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 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 candidate(nums1 = [10, 20, 30, 40, 50, 60],nums2 = [15, 25, 35, 45, 55, 65]) == []\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]) == []\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10]) == []\n assert 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 candidate(nums1 = [7, 7, 7, 8, 8, 9],nums2 = [8, 7, 9, 7, 7, 10]) == [8, 7, 9, 7, 7]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5]) == [5, 5, 5]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [5, 15, 25, 35, 45, 55]) == []\n assert 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 candidate(nums1 = [3, 3, 3, 3, 3],nums2 = [3, 3, 3]) == [3, 3, 3]\n assert 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 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 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 candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2]) == []\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [500, 400, 300, 200, 100]) == [500, 400, 300, 200, 100]\n assert 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 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 candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 40, 30, 20, 10]) == [50, 40, 30, 20, 10]\n assert 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 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 candidate(nums1 = [1, 1, 2, 2, 3, 3],nums2 = [1, 2, 3, 4, 5, 6]) == [1, 2, 3]\n assert candidate(nums1 = [5, 1, 3, 3, 2, 4],nums2 = [3, 2, 2, 5, 1]) == [3, 2, 5, 1]\n assert candidate(nums1 = [500, 500, 500, 500, 500],nums2 = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500]) == [500, 500, 500, 500, 500]\n"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().intersect", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector intersect(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "intersect", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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] = [wi, hi] represents the width and the height of an envelope.\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.\nReturn the maximum number of envelopes you can Russian doll (i.e., put one inside the other).\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\n \nConstraints:\n\n1 <= envelopes.length <= 105\nenvelopes[i].length == 2\n1 <= wi, hi <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["envelopes"], "leetcode_dataset_entry_point": "Solution().maxEnvelopes", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxEnvelopes(vector>& envelopes) {", "container": "Solution", "callable": "maxEnvelopes", "parameters": [{"name": "envelopes", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 357, "task_id": "count-numbers-with-unique-digits", "difficulty": "Medium", "problem_description": "Given an integer n, return the count of all numbers with unique digits, x, where 0 <= x < 10n.\n \nExample 1:\n\nInput: n = 2\nOutput: 91\nExplanation: The answer should be the total numbers in the range of 0 ≤ x < 100, excluding 11,22,33,44,55,66,77,88,99\n\nExample 2:\n\nInput: n = 0\nOutput: 1\n\n \nConstraints:\n\n0 <= n <= 8\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 1\n assert candidate(n = 8) == 2345851\n assert candidate(n = 3) == 739\n assert candidate(n = 4) == 5275\n assert candidate(n = 6) == 168571\n assert candidate(n = 2) == 91\n assert candidate(n = 1) == 10\n assert candidate(n = 7) == 712891\n assert candidate(n = 5) == 32491\n assert candidate(n = 9) == 5611771\n assert candidate(n = 10) == 8877691\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countNumbersWithUniqueDigits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countNumbersWithUniqueDigits(int n) {", "container": "Solution", "callable": "countNumbersWithUniqueDigits", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\nIt is guaranteed that there will be a rectangle with a sum no larger than k.\n \nExample 1:\n\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\n \nConstraints:\n\nm == matrix.length\nn == matrix[i].length\n1 <= m, n <= 100\n-100 <= matrix[i][j] <= 100\n-105 <= k <= 105\n\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, -200, 300, -400, 500], [-500, 400, -300, 200, -100], [100, 200, 300, 400, 500], [0, -1, -2, -3, -4]],k = 100) == 100\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 = [[-10, 0, 10, -20, 0, 20], [-100, 0, 100, -200, 0, 200], [-1000, 0, 1000, -2000, 0, 2000], [-10000, 0, 10000, -20000, 0, 20000]],k = 5000) == 2220\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 = [[100, -100, 200, -200, 300], [10, -10, 20, -20, 30], [1, -1, 2, -2, 3], [100, -100, 200, -200, 300], [10, -10, 20, -20, 30]],k = 250) == 242\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]],k = 0) == -inf\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, 0, 1], [0, -2, 3], [4, 5, 6], [-3, -4, 4, 5]],k = 3) == 3\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 = [[3, 3, 3, 10000], [-10000, -10000, -10000, -3], [3, 3, 3, 10000]],k = 9) == 9\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 = [[1, 10, 100, 1000]],k = 1500) == 1111\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"}, "metadata": {"canonical_parameter_names": ["matrix", "k"], "leetcode_dataset_entry_point": "Solution().maxSumSubmatrix", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxSumSubmatrix(vector>& matrix, int k) {", "container": "Solution", "callable": "maxSumSubmatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "k", "type": "int"}], "return_type": "int", "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\nFill either jug completely with water.\nCompletely empty either jug.\nPour water from one jug into another until the receiving jug is full, or the transferring jug is empty.\n\n \nExample 1: \n\nInput: x = 3, y = 5, target = 4 \nOutput: true \nExplanation:\nFollow these steps to reach a total of 4 liters:\n\nFill the 5-liter jug (0, 5).\nPour from the 5-liter jug into the 3-liter jug, leaving 2 liters (3, 2).\nEmpty the 3-liter jug (0, 2).\nTransfer the 2 liters from the 5-liter jug to the 3-liter jug (2, 0).\nFill the 5-liter jug again (2, 5).\nPour 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).\nEmpty 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\n \nConstraints:\n\n1 <= x, y, target <= 103\n\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 = 666,y = 777,target = 1434) == 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 = 727,y = 1019,target = 1746) == 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 = 750,y = 900,target = 1500) == True\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 = 800,y = 900,target = 1600) == True\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 = 1001,target = 2001) == 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 = 1000,y = 1000,target = 1500) == False\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 = 1,y = 1,target = 0) == 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"}, "metadata": {"canonical_parameter_names": ["x", "y", "target"], "leetcode_dataset_entry_point": "Solution().canMeasureWater", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canMeasureWater(int x, int y, int target) {", "container": "Solution", "callable": "canMeasureWater", "parameters": [{"name": "x", "type": "int"}, {"name": "y", "type": "int"}, {"name": "target", "type": "int"}], "return_type": "bool", "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.\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.\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\n \nConstraints:\n\n1 <= num <= 231 - 1\n\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 = 0) == False\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 = 152415787501905210) == False\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 = 12345678987654321) == True\n assert candidate(num = 10) == False\n assert candidate(num = 361294659455137) == False\n assert candidate(num = 9801) == True\n assert candidate(num = 100000000) == True\n assert candidate(num = 4503599627370496) == True\n assert candidate(num = 401) == False\n assert candidate(num = 12345678987654322) == False\n assert candidate(num = 104976) == True\n assert candidate(num = 1025) == False\n assert candidate(num = 123456789) == False\n assert candidate(num = 18014398509481984) == True\n assert candidate(num = 18014398509481985) == False\n assert candidate(num = 9223372036854775807) == 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 = 4294967296) == True\n assert candidate(num = 2) == False\n assert candidate(num = 46656000000) == True\n assert candidate(num = 3) == False\n assert candidate(num = 141376) == True\n assert candidate(num = 1024) == True\n assert candidate(num = 1000000000000) == 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"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().isPerfectSquare", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isPerfectSquare(int num) {", "container": "Solution", "callable": "isPerfectSquare", "parameters": [{"name": "num", "type": "int"}], "return_type": "bool", "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\nanswer[i] % answer[j] == 0, or\nanswer[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\n \nConstraints:\n\n1 <= nums.length <= 1000\n1 <= nums[i] <= 2 * 109\nAll the integers in nums are unique.\n\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 = [18, 36, 54, 9, 18, 27, 54]) == [54, 54, 18, 18, 9]\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 = [5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625]) == [6103515625, 1220703125, 244140625, 48828125, 9765625, 1953125, 390625, 78125, 15625, 3125, 625, 125, 25, 5]\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 = [3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429506481, 847288519443, 2541865558329]) == [94143178827, 31381059609, 10460353203, 3486784401, 1162261467, 387420489, 129140163, 43046721, 14348907, 4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3]\n assert candidate(nums = [2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 118098, 354294, 1062882, 3188646, 9565938, 28697814, 86093442, 258280326, 774840978, 2324522934]) == [2324522934, 774840978, 258280326, 86093442, 28697814, 9565938, 3188646, 1062882, 354294, 118098, 39366, 13122, 4374, 1458, 486, 162, 54, 18, 6, 2]\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 = [3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467, 3486784401, 10460353203, 31381059609, 94143178827, 282429536481, 847288609443, 2541865828329, 7625597484987, 22876792454961, 68630377364883, 205891132094649, 617673396283947, 1853020188851841, 5559060566555523, 16677181699666569]) == [16677181699666569, 5559060566555523, 1853020188851841, 617673396283947, 205891132094649, 68630377364883, 22876792454961, 7625597484987, 2541865828329, 847288609443, 282429536481, 94143178827, 31381059609, 10460353203, 3486784401, 1162261467, 387420489, 129140163, 43046721, 14348907, 4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3]\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 = [5, 10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840, 327680, 655360, 1310720, 2621440, 5242880, 10485760, 20971520, 41943040, 83886080, 167772160, 335544320, 671088640, 1342177280, 2684354560, 5368709120]) == [5368709120, 2684354560, 1342177280, 671088640, 335544320, 167772160, 83886080, 41943040, 20971520, 10485760, 5242880, 2621440, 1310720, 655360, 327680, 163840, 81920, 40960, 20480, 10240, 5120, 2560, 1280, 640, 320, 160, 80, 40, 20, 10, 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]) == [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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().largestDivisibleSubset", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector largestDivisibleSubset(vector& nums) {", "container": "Solution", "callable": "largestDivisibleSubset", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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:\nInput: a = 1, b = 2\nOutput: 3\nExample 2:\nInput: a = 2, b = 3\nOutput: 5\n\n \nConstraints:\n\n-1000 <= a, b <= 1000\n\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 = 1234,b = -5678) == -4444\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 = -1234,b = 5678) == 4444\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 = 1234,b = -1234) == 0\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 = 1024,b = -1024) == 0\n assert candidate(a = -7,b = 13) == 6\n"}, "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().getSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int getSum(int a, int b) {", "container": "Solution", "callable": "getSum", "parameters": [{"name": "a", "type": "int"}, {"name": "b", "type": "int"}], "return_type": "int", "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.\nDefine a pair (u, v) which consists of one element from the first array and one element from the second array.\nReturn the k pairs (u1, v1), (u2, v2), ..., (uk, vk) 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\n \nConstraints:\n\n1 <= nums1.length, nums2.length <= 105\n-109 <= nums1[i], nums2[i] <= 109\nnums1 and nums2 both are sorted in non-decreasing order.\n1 <= k <= 104\nk <= nums1.length * nums2.length\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [1, 2],nums2 = [3],k = 3) == [[1, 3], [2, 3]]\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, 1, 2],nums2 = [1, 2, 3],k = 10) == [[1, 1], [1, 1], [1, 2], [1, 2], [2, 1], [1, 3], [1, 3], [2, 2], [2, 3]]\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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004],nums2 = [-1000000004, -1000000003, -1000000002, -1000000001, -1000000000],k = 10) == [[1000000000, -1000000004], [1000000000, -1000000003], [1000000001, -1000000004], [1000000000, -1000000002], [1000000001, -1000000003], [1000000002, -1000000004], [1000000000, -1000000001], [1000000001, -1000000002], [1000000002, -1000000003], [1000000003, -1000000004]]\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 = [1000000000, 2000000000, 3000000000],nums2 = [1000000000, 2000000000, 3000000000],k = 3) == [[1000000000, 1000000000], [1000000000, 2000000000], [2000000000, 1000000000]]\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 = [1000000000, 1000000001, 1000000002],nums2 = [999999999, 1000000000, 1000000001],k = 5) == [[1000000000, 999999999], [1000000000, 1000000000], [1000000001, 999999999], [1000000000, 1000000001], [1000000001, 1000000000]]\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, 10, 100, 1000],nums2 = [2, 20, 200, 2000],k = 20) == [[1, 2], [10, 2], [1, 20], [10, 20], [100, 2], [100, 20], [1, 200], [10, 200], [100, 200], [1000, 2], [1000, 20], [1000, 200], [1, 2000], [10, 2000], [100, 2000], [1000, 2000]]\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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3],k = 100) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [2, 3], [3, 2], [4, 1], [3, 3], [4, 2], [5, 1], [4, 3], [5, 2], [6, 1], [5, 3], [6, 2], [7, 1], [6, 3], [7, 2], [8, 1], [7, 3], [8, 2], [9, 1], [8, 3], [9, 2], [10, 1], [9, 3], [10, 2], [10, 3]]\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, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 0) == []\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, 2, 3],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], [1, 5], [2, 4], [3, 3], [1, 6], [2, 5], [3, 4], [1, 7], [2, 6], [3, 5], [1, 8], [2, 7], [3, 6], [1, 9], [2, 8], [3, 7], [1, 10], [2, 9], [3, 8], [2, 10], [3, 9], [3, 10]]\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 = [1000000000, 2000000000, 3000000000],nums2 = [1000000000, 2000000000, 3000000000],k = 9) == [[1000000000, 1000000000], [1000000000, 2000000000], [2000000000, 1000000000], [1000000000, 3000000000], [2000000000, 2000000000], [3000000000, 1000000000], [2000000000, 3000000000], [3000000000, 2000000000], [3000000000, 3000000000]]\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"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2", "k"], "leetcode_dataset_entry_point": "Solution().kSmallestPairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> kSmallestPairs(vector& nums1, vector& nums2, int k) {", "container": "Solution", "callable": "kSmallestPairs", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector>", "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\nI pick a number between 1 and n.\nYou guess a number.\nIf you guess the right number, you win the game.\nIf you guess the wrong number, then I will tell you whether the number I picked is higher or lower, and you will continue guessing.\nEvery 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\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\n \nConstraints:\n\n1 <= n <= 200\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().getMoneyAmount", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int getMoneyAmount(int n) {", "container": "Solution", "callable": "getMoneyAmount", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\nFor example, [1, 7, 4, 9, 2, 5] is a wiggle sequence because the differences (6, -3, 5, -7, 3) alternate between positive and negative.\nIn 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.\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\n \nConstraints:\n\n1 <= nums.length <= 1000\n0 <= nums[i] <= 1000\n\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 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1]) == 2\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().wiggleMaxLength", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int wiggleMaxLength(vector& nums) {", "container": "Solution", "callable": "wiggleMaxLength", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 200\n1 <= nums[i] <= 1000\nAll the elements of nums are unique.\n1 <= target <= 1000\n\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 = [1, 5, 10],target = 100) == 8437020668201\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 = [1, 2, 3, 4, 5],target = 50) == 256641310658978\n assert candidate(nums = [3, 33, 333],target = 33333) == 536100562017203100794406478687994186977009406170595938319227925094657614236234534558497196506399133621225707174188255190262018651187114351423083457111666117940448620061113293355456633188716465870563000681683793687796224312428969140578915943823395340466419187662119723474059441129216706040810975420885186072698747890615839765847357654198486205747679514159771503546254190608498526147691685468717339503106831214240554923976550226131423821899358941678177012767249757000151516175351605183646515289758127657594483351312820284135270121698193471863249963552248305706529133764410797262033127315996385879310273241411999616601791470886920119787124471456014799082324567146236951447774466096290384104870153132091954155668459053293520897201265795242933843325164440604889046037137996023050079472589183707593322481815544873436357989\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, 5],target = 50) == 237139442616\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 464\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 20) == 10000000000\n assert candidate(nums = [4, 11, 3, 4, 1],target = 21) == 46333\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 = 20) == 104857600000000000000000000\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 = [33, 29, 40, 12, 54, 23, 67, 34, 74],target = 1000) == 1004803376074700418269474690624\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 50) == 551742150354112\n assert candidate(nums = [1, 2, 3, 4, 5],target = 50) == 256641310658978\n assert candidate(nums = [7, 14, 21, 28],target = 100) == 0\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64],target = 256) == 1054787931172699885204409659786242855354657339703519197691828406\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50],target = 500) == 154640480926757717819\n assert candidate(nums = [999, 1000],target = 1999) == 2\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 = [1, 2, 3, 4, 5],target = 200) == 27870089767928389254900226744638057842249669417272614584184\n assert candidate(nums = [2, 3, 5],target = 30) == 15778\n assert candidate(nums = [2, 6, 10, 14, 18, 22, 26, 30],target = 300) == 9697818790261047025454697667566\n assert candidate(nums = [1, 2],target = 100) == 573147844013817084101\n assert candidate(nums = [1, 3, 6, 9, 12, 15, 18],target = 100) == 9103419367826082596\n assert candidate(nums = [1, 2, 4, 5],target = 15) == 4185\n assert candidate(nums = [1, 2, 5, 10, 20, 50],target = 1000) == 55418612077363252135298307641829396865446477611253299547057401338234391162164785712545427782637930869475332856306540999148459057137429772224203347607997227631647056712144679002353744573917660746726513112253869324256573236618890333589\n assert candidate(nums = [3, 7, 15],target = 120) == 92796380\n assert candidate(nums = [2, 3, 6, 7],target = 100) == 2724220005886008\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 120) == 541461698816\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 = [2, 3, 7, 8, 10],target = 200) == 3100714643409982098043972616729\n assert candidate(nums = [50, 25, 75, 20, 10],target = 200) == 197308\n assert candidate(nums = [1, 5, 10, 25],target = 100) == 8577828731901\n assert candidate(nums = [3, 33, 333],target = 1000) == 0\n assert candidate(nums = [1, 10, 100, 1000],target = 1111) == 367666448776500415514786890083984627942520976458183669725570752318436882775368470747436\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 = [2, 3, 6, 7, 10],target = 300) == 1885220157798436983841368320280668830805551392497\n assert candidate(nums = [100, 200, 300, 400, 500],target = 1000) == 464\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 500) == 1286219641702273366742255356065111897930066144490719649670364060629213518690220561526989033769595304532418065557510304805412593714309986391307281509696\n assert candidate(nums = [3, 7, 11, 15, 19, 23, 27, 31],target = 300) == 14374578728716948696671279\n assert candidate(nums = [5, 8, 12, 16, 20, 24, 28, 32, 36, 40],target = 500) == 42034412043805359239945977920635459\n assert candidate(nums = [2, 5, 10, 20],target = 100) == 11826629775\n assert candidate(nums = [10, 20, 30, 40, 50],target = 150) == 13624\n assert candidate(nums = [1, 2, 5, 10],target = 100) == 119179977936469835383520\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 = [5, 50, 500],target = 1000) == 1816691941426948\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 464\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],target = 250) == 551742150354112\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 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 300) == 222217726411850455445265344483183426006475036048672509776477817\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 100) == 606147434557459526483161067501\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 = [1, 5, 10, 25, 50, 100],target = 1000) == 3861392372529553044883315945420265874789274045115117175074863427403559146375333246873046775291634059748511012129487397547119298455362\n assert candidate(nums = [15, 25, 35],target = 100) == 25\n assert candidate(nums = [1, 2, 4, 8, 16],target = 100) == 3001542533296576909276367\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 = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],target = 500) == 353368918335207375428\n assert candidate(nums = [1, 3, 4],target = 10) == 64\n assert candidate(nums = [1, 10, 100, 1000],target = 1000) == 753729672939848505929078336767198285353713318174400841581842662144837938547270\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 = [2, 3, 6, 7, 9],target = 120) == 14544576409221128865\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 = [15, 25, 35],target = 1000) == 48781528629177572921\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 50) == 12574441114\n assert candidate(nums = [3, 5, 7],target = 15) == 8\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128],target = 256) == 1054787931172699885204409659788147413348784265452313995416385159\n assert candidate(nums = [3, 5, 10, 20],target = 1000) == 214391693407662746979155838789092372951985494367397337570037572730823254282910703400057102167\n assert candidate(nums = [1, 5, 10, 25, 50, 100],target = 200) == 169121161302579810731290745\n assert candidate(nums = [3, 5, 7, 9],target = 150) == 12883204547325702\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum4", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int combinationSum4(vector& nums, int target) {", "container": "Solution", "callable": "combinationSum4", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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 kth smallest element in the matrix.\nNote that it is the kth smallest element in the sorted order, not the kth distinct element.\nYou must find a solution with a memory complexity better than O(n2).\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 8th smallest number is 13\n\nExample 2:\n\nInput: matrix = [[-5]], k = 1\nOutput: -5\n\n \nConstraints:\n\nn == matrix.length == matrix[i].length\n1 <= n <= 300\n-109 <= matrix[i][j] <= 109\nAll the rows and columns of matrix are guaranteed to be sorted in non-decreasing order.\n1 <= k <= n2\n\n \nFollow up:\n\nCould you solve the problem with a constant memory (i.e., O(1) memory complexity)?\nCould 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\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, 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 = 13) == 1\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 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]],k = 27) == 49\n"}, "metadata": {"canonical_parameter_names": ["matrix", "k"], "leetcode_dataset_entry_point": "Solution().kthSmallest", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int kthSmallest(vector>& matrix, int k) {", "container": "Solution", "callable": "kthSmallest", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "k", "type": "int"}], "return_type": "int", "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.\nEach letter in magazine can only be used once in ransomNote.\n \nExample 1:\nInput: ransomNote = \"a\", magazine = \"b\"\nOutput: false\nExample 2:\nInput: ransomNote = \"aa\", magazine = \"ab\"\nOutput: false\nExample 3:\nInput: ransomNote = \"aa\", magazine = \"aab\"\nOutput: true\n\n \nConstraints:\n\n1 <= ransomNote.length, magazine.length <= 105\nransomNote and magazine consist of lowercase English letters.\n\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 = \"\",magazine = \"abc\") == 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 = \"abc\",magazine = \"\") == False\n assert candidate(ransomNote = \"testcase\",magazine = \"case测试\") == False\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 = \"\",magazine = \"\") == 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 = \"caseinsensitive\",magazine = \"CaseInsensitive\") == False\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"}, "metadata": {"canonical_parameter_names": ["ransomNote", "magazine"], "leetcode_dataset_entry_point": "Solution().canConstruct", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canConstruct(string ransomNote, string magazine) {", "container": "Solution", "callable": "canConstruct", "parameters": [{"name": "ransomNote", "type": "string"}, {"name": "magazine", "type": "string"}], "return_type": "bool", "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.\nYou must write an algorithm that runs in O(n) time and uses O(1) extra space. \n \nExample 1:\nInput: n = 13\nOutput: [1,10,11,12,13,2,3,4,5,6,7,8,9]\nExample 2:\nInput: n = 2\nOutput: [1,2]\n\n \nConstraints:\n\n1 <= n <= 5 * 104\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().lexicalOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector lexicalOrder(int n) {", "container": "Solution", "callable": "lexicalOrder", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= s.length <= 105\ns consists of only lowercase English letters.\n\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 = \"\") == -1\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().firstUniqChar", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int firstUniqChar(string s) {", "container": "Solution", "callable": "firstUniqChar", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 388, "task_id": "longest-absolute-file-path", "difficulty": "Medium", "problem_description": "Suppose we have a file system that stores both files and directories. An example of one system is represented in the following picture:\n\nHere, we have dir as the only directory in the root. dir contains two subdirectories, subdir1 and subdir2. subdir1 contains a file file1.ext and subdirectory subsubdir1. subdir2 contains a subdirectory subsubdir2, which contains a file file2.ext.\nIn text form, it looks like this (with ⟶ representing the tab character):\n\ndir\n⟶ subdir1\n⟶ ⟶ file1.ext\n⟶ ⟶ subsubdir1\n⟶ subdir2\n⟶ ⟶ subsubdir2\n⟶ ⟶ ⟶ file2.ext\n\nIf we were to write this representation in code, it will look like this: \"dir\\n\\tsubdir1\\n\\t\\tfile1.ext\\n\\t\\tsubsubdir1\\n\\tsubdir2\\n\\t\\tsubsubdir2\\n\\t\\t\\tfile2.ext\". Note that the '\\n' and '\\t' are the new-line and tab characters.\nEvery file and directory has a unique absolute path in the file system, which is the order of directories that must be opened to reach the file/directory itself, all concatenated by '/'s. Using the above example, the absolute path to file2.ext is \"dir/subdir2/subsubdir2/file2.ext\". Each directory name consists of letters, digits, and/or spaces. Each file name is of the form name.extension, where name and extension consist of letters, digits, and/or spaces.\nGiven a string input representing the file system in the explained format, return the length of the longest absolute path to a file in the abstracted file system. If there is no file in the system, return 0.\nNote that the testcases are generated such that the file system is valid and no file or directory name has length 0.\n \nExample 1:\n\n\nInput: input = \"dir\\n\\tsubdir1\\n\\tsubdir2\\n\\t\\tfile.ext\"\nOutput: 20\nExplanation: We have only one file, and the absolute path is \"dir/subdir2/file.ext\" of length 20.\n\nExample 2:\n\n\nInput: input = \"dir\\n\\tsubdir1\\n\\t\\tfile1.ext\\n\\t\\tsubsubdir1\\n\\tsubdir2\\n\\t\\tsubsubdir2\\n\\t\\t\\tfile2.ext\"\nOutput: 32\nExplanation: We have two files:\n\"dir/subdir1/file1.ext\" of length 21\n\"dir/subdir2/subsubdir2/file2.ext\" of length 32.\nWe return 32 since it is the longest absolute path to a file.\n\nExample 3:\n\nInput: input = \"a\"\nOutput: 0\nExplanation: We do not have any files, just a single directory named \"a\".\n\n \nConstraints:\n\n1 <= input.length <= 104\ninput may contain lowercase or uppercase English letters, a new line character '\\n', a tab character '\\t', a dot '.', a space ' ', and digits.\nAll file and directory names have positive length.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(input = \"dir\\n\\tsubdir1\\n\\tsubdir2\\n\\t\\tfile.ext\") == 20\n assert candidate(input = \"dir\\n\\tsubdir1\\n\\t\\tfile1.ext\\n\\t\\tsubsubdir1\\n\\tsubdir2\\n\\t\\tsubsubdir2\\n\\t\\t\\tfile2.ext\") == 32\n assert candidate(input = \"a\") == 0\n assert candidate(input = \"file1.txt\\nfile2.txt\\nlongfile.txt\") == 12\n"}, "metadata": {"canonical_parameter_names": ["input"], "leetcode_dataset_entry_point": "Solution().lengthLongestPath", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int lengthLongestPath(string input) {", "container": "Solution", "callable": "lengthLongestPath", "parameters": [{"name": "input", "type": "string"}], "return_type": "int", "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.\nString t is generated by random shuffling string s and then add one more letter at a random position.\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\n \nConstraints:\n\n0 <= s.length <= 1000\nt.length == s.length + 1\ns and t consist of lowercase English letters.\n\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 = \"python\",t = \"ypthon\") == None\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 = \"hello\",t = \"ohell\") == None\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 = \"thisisaverylongstringwithsomerepeatingcharacters\",t = \"thisisaverylongstringwithsomerepeatingcharactersist\") == \"i\"\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 = \"short\",t = \"horst\") == None\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 = \"qwert\",t = \"wqret\") == None\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 = \"uniqueletters\",t = \"enuiqtelrstsu\") == \"s\"\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 = \"specialcharacters!@#$%^&*()\",t = \"specialcharacters!@#$%^&*()s\") == \"s\"\n assert candidate(s = \"repeatedletters\",t = \"repeadetletters\") == None\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzz\") == \"z\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzq\") == \"q\"\n assert candidate(s = \"onetwothree\",t = \"onetwothreefour\") == \"f\"\n assert candidate(s = \"short\",t = \"shorrt\") == \"r\"\n assert candidate(s = \"uniqueletters\",t = \"eniqulettersu\") == None\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 = \"sameletters\",t = \"smaleetters\") == None\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"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().findTheDifference", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "char findTheDifference(string s, string t) {", "container": "Solution", "callable": "findTheDifference", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "char", "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\nStarting from left to right, remove the first number and every other number afterward until you reach the end of the list.\nRepeat the previous step again, but this time from right to left, remove the rightmost number and every other number from the remaining numbers.\nKeep 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\n \nConstraints:\n\n1 <= n <= 109\n\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 = 1000000001) == 534765398\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().lastRemaining", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int lastRemaining(int n) {", "container": "Solution", "callable": "lastRemaining", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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] = [xi, yi, ai, bi] represents an axis-aligned rectangle. The bottom-left point of the rectangle is (xi, yi) and the top-right point of it is (ai, bi).\nReturn true if all the rectangles together form an exact cover of a rectangular region.\n \nExample 1:\n\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\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\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\n \nConstraints:\n\n1 <= rectangles.length <= 2 * 104\nrectangles[i].length == 4\n-105 <= xi < ai <= 105\n-105 <= yi < bi <= 105\n\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, 10, 10], [1, 1, 9, 9], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [5, 5, 5, 5]]) == 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 = [[0, 0, 10, 10], [1, 1, 9, 9], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [5, 5, 5, 5], [0, 10, 10, 11], [0, 11, 10, 12], [0, 12, 10, 13]]) == 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 = [[0, 0, 5, 5], [0, 5, 2, 7], [2, 5, 5, 7], [2, 2, 3, 3], [3, 2, 5, 2]]) == 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 = [[1, 1, 5, 5], [2, 2, 4, 4], [3, 3, 3, 3]]) == 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 = [[-1, -1, 1, 1], [-1, 1, 1, 3], [-1, -1, -1, 3], [-1, 1, -1, 3], [1, -1, 3, 1], [1, 1, 3, 3]]) == 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, 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, 10, 10], [1, 1, 9, 9], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [5, 5, 5, 5], [6, 6, 4, 4], [7, 7, 3, 3], [8, 8, 2, 2], [9, 9, 1, 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 = [[1, 1, 10, 10], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [5, 5, 5, 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, 10, 10], [1, 1, 9, 9], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [5, 5, 5, 5], [1, 4, 2, 5], [4, 1, 5, 2], [3, 6, 4, 7], [6, 3, 7, 4]]) == 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, 5, 5], [2, 2, 4, 4], [3, 3, 3, 4], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [4, 4, 5, 5]]) == False\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3]]) == False\n"}, "metadata": {"canonical_parameter_names": ["rectangles"], "leetcode_dataset_entry_point": "Solution().isRectangleCover", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isRectangleCover(vector>& rectangles) {", "container": "Solution", "callable": "isRectangleCover", "parameters": [{"name": "rectangles", "type": "vector>&"}], "return_type": "bool", "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.\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:\nInput: s = \"abc\", t = \"ahbgdc\"\nOutput: true\nExample 2:\nInput: s = \"axc\", t = \"ahbgdc\"\nOutput: false\n\n \nConstraints:\n\n0 <= s.length <= 100\n0 <= t.length <= 104\ns and t consist only of lowercase English letters.\n\n \nFollow up: Suppose there are lots of incoming s, say s1, s2, ..., sk where k >= 109, and you want to check one by one to see if t has its subsequence. In this scenario, how would you change your code?", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abc\",t = \"abdc\") == True\n assert candidate(s = \"ab\",t = ('baab',)) == False\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"}, "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isSubsequence", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool isSubsequence(string s, string t) {", "container": "Solution", "callable": "isSubsequence", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "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).\nA character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules:\n\nFor a 1-byte character, the first bit is a 0, followed by its Unicode code.\nFor 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.\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\n \nConstraints:\n\n1 <= data.length <= 2 * 104\n0 <= data[i] <= 255\n\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 = [11111000, 10000000, 10000000, 10000000, 10000000]) == False\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"}, "metadata": {"canonical_parameter_names": ["data"], "leetcode_dataset_entry_point": "Solution().validUtf8", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool validUtf8(vector& data) {", "container": "Solution", "callable": "validUtf8", "parameters": [{"name": "data", "type": "vector&"}], "return_type": "bool", "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.\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.\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].\nThe test cases are generated so that the length of the output will never exceed 105.\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\n \nConstraints:\n\n1 <= s.length <= 30\ns consists of lowercase English letters, digits, and square brackets '[]'.\ns is guaranteed to be a valid input.\nAll the integers in s are in the range [1, 300].\n\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 = \"abc2[def3[ghi]]jkl4[mno5[pqr]]stu\") == \"abcdefghighighidefghighighijklmnopqrpqrpqrpqrpqrmnopqrpqrpqrpqrpqrmnopqrpqrpqrpqrpqrmnopqrpqrpqrpqrpqrstu\"\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 = \"9[8[7[6[5[4[3[2[1[0[a]]]]]]]]]]\") == \"\"\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 = \"2[3[4[5[6[7[8[9[0[1[a]]]]]]]]]]\") == \"\"\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[7[8[9[0[x]]]]]]]]]]\") == \"\"\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 = \"1[xyz]2[uvw]3[2[abc]3[def]]4[ghi]\") == \"xyzuvwuvwabcabcdefdefdefabcabcdefdefdefabcabcdefdefdefghighighighi\"\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().decodeString", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string decodeString(string s) {", "container": "Solution", "callable": "decodeString", "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.\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\n \nConstraints:\n\n1 <= s.length <= 104\ns consists of only lowercase English letters.\n1 <= k <= 105\n\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 = \"\",k = 1) == 0\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"}, "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().longestSubstring", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestSubstring(string s, int k) {", "container": "Solution", "callable": "longestSubstring", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "return_type": "int", "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.\nAssume arrk to be an array obtained by rotating nums by k positions clock-wise. We define the rotation function F on nums as follow:\n\nF(k) = 0 * arrk[0] + 1 * arrk[1] + ... + (n - 1) * arrk[n - 1].\n\nReturn the maximum value of F(0), F(1), ..., F(n-1).\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\n \nConstraints:\n\nn == nums.length\n1 <= n <= 105\n-100 <= nums[i] <= 100\n\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 266000\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 33000\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 = [1000, -1000, 2000, -2000, 3000, -3000, 4000, -4000, 5000, -5000]) == 35000\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 = [100, 0, -100, 200, 0, -200, 300, 0, -300, 400]) == 3000\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 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 26600\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 = [1000, -1000, 1000, -1000, 1000, -1000]) == 3000\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 = [100, 0, -100, 200, 0, -200, 300, 0, -300, 400, 0, -400]) == 2800\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 = [100, -100, 200, -200, 300, -300, 400, -400, 500, -500, 600, -600, 700, -700, 800, -800, 900, -900, 1000, -1000]) == 14500\n assert candidate(nums = [100, -50, 200, -25, 300, -75]) == 2000\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxRotateFunction", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int maxRotateFunction(vector& nums) {", "container": "Solution", "callable": "maxRotateFunction", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\nIf n is even, replace n with n / 2.\nIf 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\n \nConstraints:\n\n1 <= n <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().integerReplacement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int integerReplacement(int n) {", "container": "Solution", "callable": "integerReplacement", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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] = [Ai, Bi] and values[i] represent the equation Ai / Bi = values[i]. Each Ai or Bi is a string that represents a single variable.\nYou are also given some queries, where queries[j] = [Cj, Dj] represents the jth query where you must find the answer for Cj / Dj = ?.\nReturn the answers to all queries. If a single answer cannot be determined, return -1.0.\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.\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\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\n \nConstraints:\n\n1 <= equations.length <= 20\nequations[i].length == 2\n1 <= Ai.length, Bi.length <= 5\nvalues.length == equations.length\n0.0 < values[i] <= 20.0\n1 <= queries.length <= 20\nqueries[i].length == 2\n1 <= Cj.length, Dj.length <= 5\nAi, Bi, Cj, Dj consist of lower case English letters and digits.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 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 candidate(equations = [['a', 'b']],values = [0.5],queries = [['a', 'b'], ['b', 'a'], ['a', 'c'], ['x', 'y']]) == [0.5, 2.0, -1, -1]\n assert 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 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 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 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 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 candidate(equations = [['alpha', 'beta'], ['beta', 'gamma'], ['gamma', 'delta'], ['delta', 'epsilon'], ['epsilon', 'zeta'], ['zeta', 'eta'], ['eta', 'theta'], ['theta', 'iota'], ['iota', 'kappa'], ['kappa', 'lambda']],values = [2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0],queries = [['alpha', 'lambda'], ['lambda', 'alpha'], ['beta', 'kappa'], ['kappa', 'beta'], ['gamma', 'iota'], ['iota', 'gamma'], ['delta', 'theta'], ['theta', 'delta'], ['epsilon', 'eta'], ['eta', 'epsilon'], ['alpha', 'mu']]) == [39916800.0, 2.505210838544172e-08, 1814400.0, 5.511463844797178e-07, 60480.0, 1.6534391534391536e-05, 1680.0, 0.0005952380952380953, 42.0, 0.023809523809523808, -1]\n assert 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 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 candidate(equations = [['alpha', 'beta'], ['beta', 'gamma'], ['gamma', 'delta'], ['delta', 'epsilon']],values = [1.2, 1.3, 1.4, 1.5],queries = [['alpha', 'epsilon'], ['epsilon', 'alpha'], ['beta', 'delta'], ['gamma', 'beta'], ['alpha', 'zeta']]) == [3.2759999999999994, 0.30525030525030533, 1.8199999999999996, 0.7692307692307693, -1]\n assert 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 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 candidate(equations = [['alpha', 'beta'], ['beta', 'gamma'], ['gamma', 'delta'], ['delta', 'epsilon'], ['epsilon', 'zeta']],values = [1.2, 1.3, 1.4, 1.5, 1.6],queries = [['alpha', 'zeta'], ['zeta', 'alpha'], ['alpha', 'epsilon'], ['epsilon', 'alpha'], ['alpha', 'delta'], ['delta', 'alpha'], ['alpha', 'gamma'], ['gamma', 'alpha'], ['alpha', 'beta'], ['beta', 'alpha'], ['zeta', 'beta'], ['beta', 'zeta'], ['zeta', 'gamma'], ['gamma', 'zeta'], ['zeta', 'delta'], ['delta', 'zeta'], ['zeta', 'epsilon'], ['epsilon', 'zeta'], ['a', 'a'], ['b', 'b']]) == [5.2416, 0.19078144078144077, 3.276, 0.3052503052503053, 2.1839999999999997, 0.4578754578754579, 1.5599999999999998, 0.6410256410256411, 1.2, 0.8333333333333334, 0.22893772893772893, 4.368, 0.2976190476190476, 3.3600000000000003, 0.41666666666666663, 2.4000000000000004, 0.625, 1.6, -1, -1]\n assert 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 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 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 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 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 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 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 candidate(equations = [['alpha', 'beta'], ['beta', 'gamma'], ['gamma', 'delta'], ['delta', 'epsilon'], ['epsilon', 'zeta'], ['zeta', 'eta']],values = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6],queries = [['alpha', 'zeta'], ['zeta', 'alpha'], ['beta', 'epsilon'], ['epsilon', 'beta'], ['gamma', 'eta'], ['eta', 'gamma']]) == [0.0012000000000000001, 833.3333333333333, 0.024, 41.666666666666664, 0.036, 27.77777777777778]\n assert 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 candidate(equations = [['alpha', 'beta'], ['beta', 'gamma'], ['gamma', 'delta'], ['delta', 'epsilon'], ['epsilon', 'zeta'], ['zeta', 'eta'], ['eta', 'theta'], ['theta', 'iota']],values = [1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9],queries = [['alpha', 'iota'], ['iota', 'alpha'], ['beta', 'theta'], ['gamma', 'delta'], ['z', 'z']]) == [30.4746624, 0.032814145301245407, 13.366080000000002, 1.4, -1]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 candidate(equations = [['x1', 'y1'], ['y1', 'z1'], ['z1', 'w1'], ['x1', 'w1'], ['w1', 'x1'], ['y1', 'w1']],values = [2.0, 3.0, 4.0, 24.0, 0.0416667, 12.0],queries = [['x1', 'z1'], ['z1', 'x1'], ['y1', 'w1'], ['w1', 'y1'], ['x1', 'y1'], ['y1', 'x1']]) == [6.0, 0.16666666666666666, 12.0, 0.08333333333333333, 2.0, 0.5]\n assert 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 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 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 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 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 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 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 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 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 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 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 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 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"}, "metadata": {"canonical_parameter_names": ["equations", "values", "queries"], "leetcode_dataset_entry_point": "Solution().calcEquation", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector calcEquation(vector>& equations, vector& values, vector>& queries) {", "container": "Solution", "callable": "calcEquation", "parameters": [{"name": "equations", "type": "vector>&"}, {"name": "values", "type": "vector&"}, {"name": "queries", "type": "vector>&"}], "return_type": "vector", "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 nth 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 11th 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\n \nConstraints:\n\n1 <= n <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().findNthDigit", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findNthDigit(int n) {", "container": "Solution", "callable": "findNthDigit", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\nFor example, the below binary watch reads \"4:51\".\n\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.\nThe hour must not contain a leading zero.\n\nFor 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\nFor example, \"10:2\" is not valid. It should be \"10:02\".\n\n \nExample 1:\nInput: turnedOn = 1\nOutput: [\"0:01\",\"0:02\",\"0:04\",\"0:08\",\"0:16\",\"0:32\",\"1:00\",\"2:00\",\"4:00\",\"8:00\"]\nExample 2:\nInput: turnedOn = 9\nOutput: []\n\n \nConstraints:\n\n0 <= turnedOn <= 10\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 candidate(turnedOn = 8) == ['7:31', '7:47', '7:55', '7:59', '11:31', '11:47', '11:55', '11:59']\n assert candidate(turnedOn = 0) == ['0:00']\n assert candidate(turnedOn = 9) == []\n assert 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 candidate(turnedOn = 10) == []\n assert 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 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 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 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 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 assert candidate(turnedOn = 11) == []\n"}, "metadata": {"canonical_parameter_names": ["turnedOn"], "leetcode_dataset_entry_point": "Solution().readBinaryWatch", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector readBinaryWatch(int turnedOn) {", "container": "Solution", "callable": "readBinaryWatch", "parameters": [{"name": "turnedOn", "type": "int"}], "return_type": "vector", "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\n \nConstraints:\n\n1 <= k <= num.length <= 105\nnum consists of only digits.\nnum does not have any leading zeros except for the zero itself.\n\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 = \"100000000000000000000000000000000000000000000000\",k = 50) == \"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 assert candidate(num = \"123456789000000000000000000000000000000000000000\",k = 50) == \"0\"\n"}, "metadata": {"canonical_parameter_names": ["num", "k"], "leetcode_dataset_entry_point": "Solution().removeKdigits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string removeKdigits(string num, int k) {", "container": "Solution", "callable": "removeKdigits", "parameters": [{"name": "num", "type": "string"}, {"name": "k", "type": "int"}], "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.\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.\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\n \nConstraints:\n\n2 <= stones.length <= 2000\n0 <= stones[i] <= 231 - 1\nstones[0] == 0\nstones is sorted in a strictly increasing order.\n\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"}, "metadata": {"canonical_parameter_names": ["stones"], "leetcode_dataset_entry_point": "Solution().canCross", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canCross(vector& stones) {", "container": "Solution", "callable": "canCross", "parameters": [{"name": "stones", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 404, "task_id": "sum-of-left-leaves", "difficulty": "Easy", "problem_description": "Given the root of a binary tree, return the sum of all left leaves.\nA leaf is a node with no children. A left leaf is a leaf that is the left child of another node.\n \nExample 1:\n\n\nInput: root = [3,9,20,null,null,15,7]\nOutput: 24\nExplanation: There are two left leaves in the binary tree, with values 9 and 15 respectively.\n\nExample 2:\n\nInput: root = [1]\nOutput: 0\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 1000].\n-1000 <= Node.val <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([0, 2, 4, 1, None, 3, -1, 5, 1, None, 6, None, 8])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5])) == 4\n assert candidate(root = tree_node([3, 9, 20, 15, 7])) == 15\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 0\n assert candidate(root = tree_node([-9, -3, 2, None, 4, 4, 0, -6, None, -5])) == -11\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, None, None, None, 8])) == 7\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, None, 1])) == 1\n assert candidate(root = tree_node([3, 9, 20, 8, None, 15, 7, None, 4])) == 15\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == 40\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == 21\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, None, None, 7])) == 6\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == 24\n assert candidate(root = tree_node([1])) == 0\n assert candidate(root = tree_node([1, None, 2, None, None, None, 3, None, None, None, None, None, 4])) == 0\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9])) == 7\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190])) == 340\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, 6, 8, 13, 17, 22])) == 26\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6])) == 6\n assert candidate(root = tree_node([5, 2, -3, None, -4, None, 1, None, None, -5, None, -6, None, -7, None, -8])) == -8\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40])) == 288\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190, 5, None, 35, None, 45, 65, 85, 95, 105, 135, 145, 155, 165, 185, 195])) == 780\n assert candidate(root = tree_node([33, 18, 50, 8, None, 32, 60, 2, 11, None, 46, None, None, 29, None, None, 59, None, None])) == 29\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, 7, None, None, 8, 9])) == 18\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == 8\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, None, 17])) == 12\n assert candidate(root = tree_node([3, 5, 1, 6, 2, 0, 8, None, None, 7, 4, None, None, None, None, 9, 10])) == 15\n assert candidate(root = tree_node([5, 15, 1, None, 6, None, 7, 8, 9, None, None, None, None, 10, 11])) == 18\n assert candidate(root = tree_node([5, 15, 7, None, 9, None, 11, None, None, 13, 14])) == 13\n assert candidate(root = tree_node([2, 1, 3, 4, None, 5, 6, None, 7, 8, None, 9, 10, 11, None, 12, 13, 14, None, 15])) == 52\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, None, None, 4, 8, 11, 13, 18, 25])) == 36\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, None, 8])) == 10\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 12, 18, 16, 19, 14, 17])) == 39\n assert candidate(root = tree_node([10, 9, 20, 8, None, 15, 25, 7, None, None, 18, 23, 30, 17, None, None, None, 24])) == 41\n assert candidate(root = tree_node([10, 5, 20, None, None, 15, 25, None, None, None, 30])) == 20\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, 6, None, None, None, None, 7, 8, 9])) == 10\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 7, 9, 1, None, None, None, None, None, None, 10])) == 8\n assert candidate(root = tree_node([3, 9, 20, 4, 5, 6, 7, None, None, None, 8, None, None, 9, None, None, 10, None, None, 11, None, None, 12, None, None, 13, None, None, 14, None, None, 15])) == 19\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 1, None, None, None, 2])) == 11\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == 20\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30])) == 0\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180, 5, None, None, 20, None, 40, 70, None, None, 90, 100, 120, 130, 150, None, None, 170, 190, 200])) == 670\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 36\n assert candidate(root = tree_node([5, 3, 8, 2, 4, None, 9, 1, None, 6, 7, None, 10])) == 7\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == 80\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, None, None, 6, None, None, 7, None, None, 8, None, 9])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 44\n assert candidate(root = tree_node([50, 25, 75, 12, 37, 63, 87, 6, 18, 31, 43, 56, 70, 81, 93])) == 174\n assert candidate(root = tree_node([50, 25, 75, 10, 30, 60, 90, 5, None, 28, 40, 55, 65, 85, 100, None, None, None, 26, 32])) == 177\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == 7\n assert candidate(root = tree_node([1, 2, 2, 3, None, 3, None, 4, 4, None, None, 5, 5])) == 8\n assert candidate(root = tree_node([10, 5, 15, None, 7, 12, 20, None, None, 6, 8, 13, 18])) == 19\n assert candidate(root = tree_node([1, None, 2, 3, None, 4, None, 5, 6, 7, None, 8, None, 9, 10, None, 11, 12])) == 12\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 494\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, 2, 6, None, None, 10])) == 6\n assert candidate(root = tree_node([10, None, 20, 30, 40, 50, 60, None, None, 70, 80])) == 70\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 25, 26])) == 49\n assert candidate(root = tree_node([20, 15, 25, 10, 18, None, 30, 5, 12, None, 17, 22, 35, None, None, None, None, None, 16])) == 27\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == 0\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, 16, 17, 18, 19, None, None, None, None, 20])) == 45\n assert candidate(root = tree_node([2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 44\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, 0, 2, 6, None, None, 15, None, None, None, None, 16])) == 22\n assert candidate(root = tree_node([20, 10, 30, None, 15, 25, 35, None, 17, 23, None, None, None, 27, 32, 37])) == 64\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, None, 5, 6, None, None, None, None, 7, 8, None, 9])) == 5\n assert candidate(root = tree_node([20, 15, 25, 10, 18, None, 30, 5, 12, 16, 19, 27, 35, 3, None, 14, 21, 26, 28, 32, 34, 36, None, None, None, None, None, None, None, None, None, None, None, None, None])) == 111\n assert candidate(root = tree_node([5, None, 10, None, 15, None, 20, None, 25, None, 30, None, 35])) == 0\n assert candidate(root = tree_node([100, 50, 200, 25, 75, None, 300, None, 35, None, 85, 150, None, None, 400])) == 150\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 65, 85, 115, 135, 165, 185])) == 355\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, None, 6, 7, None, None, 8, 9])) == 8\n assert candidate(root = tree_node([8, 4, 12, None, 6, 10, 14, 5, None, 7, None, 9, None, 11, None, 13, None, 15])) == 39\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8])) == 7\n assert candidate(root = tree_node([3, 1, 4, None, 2])) == 0\n assert candidate(root = tree_node([12, 6, 18, 3, 9, 15, 21, 1, 5, None, None, 11, None, None, 19, 22])) == 33\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == 200\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6])) == 0\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, 1, None, None, None, None, 8])) == 1\n assert candidate(root = tree_node([8, 6, 10, 5, 7, 9, 11, 4, None, None, None, None, None, 3])) == 16\n assert candidate(root = tree_node([10, None, 20, None, 30, None, 40, None, 50, None, 60, None, 70, None, 80, None, 90, None, 100])) == 0\n assert candidate(root = tree_node([7, 3, 15, None, 8, 10, None, 5, 9, 11, 13, None, None, None, 12])) == 16\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, 6, 7, None, None, None, None, None, 8])) == 6\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 9\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 0\n assert candidate(root = tree_node([10, 5, 15, None, None, None, 25])) == 5\n assert candidate(root = tree_node([0, -1, 2, -2, None, -3, None, -4])) == -7\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, None, 8, 12, 22, 28, None, 32, None, None, 4, 7, None, 9, 11, 13, 14, 16, 17, 18, 19, 21, 23, 24, 26, 27, 29, 31, 33, 34])) == 162\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180])) == 340\n assert candidate(root = tree_node([5, 15, 20, 30, 5, None, 25, 45, None, None, 35, 40, 50])) == 85\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, None, 8, 12, None, None, None, None, None, None, 9, None, 11])) == 46\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, None, None, None, None, None, None, 28, None, 32, None, None, 35, 36])) == 114\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, None, 11, 12, None, 13, None, None, 14])) == 35\n assert candidate(root = tree_node([10, 8, 15, 3, 5, None, 20, 1, 4, 6, None, None, None, 17])) == 23\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30])) == 30\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, 9, None, None, 10, 11])) == 18\n assert candidate(root = tree_node([23, 18, 15, 20, 25, 16, 10, None, 22, None, None, 19, None, None, 8])) == 19\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == 25\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().sumOfLeftLeaves", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int sumOfLeftLeaves(TreeNode* root) {", "container": "Solution", "callable": "sumOfLeftLeaves", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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.\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.\nNote: You are not allowed to use any built-in library method to directly solve this problem.\n \nExample 1:\nInput: num = 26\nOutput: \"1a\"\nExample 2:\nInput: num = -1\nOutput: \"ffffffff\"\n\n \nConstraints:\n\n-231 <= num <= 231 - 1\n\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 = -4294967296) == \"\"\n assert candidate(num = 16777215) == \"ffffff\"\n assert candidate(num = -16777215) == \"ff000001\"\n assert candidate(num = -1) == \"ffffffff\"\n assert candidate(num = 4294967295) == \"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 = 1099511627776) == \"\"\n assert candidate(num = -2147483647) == \"80000001\"\n assert candidate(num = 67553994410557436) == \"fffffffc\"\n assert candidate(num = 1048575) == \"fffff\"\n assert candidate(num = -1024) == \"fffffc00\"\n assert candidate(num = -134217728) == \"f8000000\"\n assert candidate(num = -8589934591) == \"1\"\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 = 8589934591) == \"ffffffff\"\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 = -4294967294) == \"2\"\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 = 4294967294) == \"fffffffe\"\n assert candidate(num = -2) == \"fffffffe\"\n assert candidate(num = 15) == \"f\"\n"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().toHex", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string toHex(int num) {", "container": "Solution", "callable": "toHex", "parameters": [{"name": "num", "type": "int"}], "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] = [hi, ki] represents the ith person of height hi with exactly ki other people in front who have a height greater than or equal to hi.\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] = [hj, kj] is the attributes of the jth 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\n \nConstraints:\n\n1 <= people.length <= 2000\n0 <= hi <= 106\n0 <= ki < people.length\nIt is guaranteed that the queue can be reconstructed.\n\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 = [[12, 2], [11, 3], [10, 4], [9, 5], [8, 6], [7, 7], [6, 8], [5, 9], [4, 10], [3, 11], [2, 12], [1, 13], [0, 14]]) == [[12, 2], [11, 3], [10, 4], [9, 5], [8, 6], [7, 7], [6, 8], [5, 9], [4, 10], [3, 11], [2, 12], [1, 13], [0, 14]]\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"}, "metadata": {"canonical_parameter_names": ["people"], "leetcode_dataset_entry_point": "Solution().reconstructQueue", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> reconstructQueue(vector>& people) {", "container": "Solution", "callable": "reconstructQueue", "parameters": [{"name": "people", "type": "vector>&"}], "return_type": "vector>", "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\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\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\n \nConstraints:\n\nm == heightMap.length\nn == heightMap[i].length\n1 <= m, n <= 200\n0 <= heightMap[i][j] <= 2 * 104\n\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"}, "metadata": {"canonical_parameter_names": ["heightMap"], "leetcode_dataset_entry_point": "Solution().trapRainWater", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int trapRainWater(vector>& heightMap) {", "container": "Solution", "callable": "trapRainWater", "parameters": [{"name": "heightMap", "type": "vector>&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= s.length <= 2000\ns consists of lowercase and/or uppercase English letters only.\n\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 = \"\") == 0\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestPalindrome(string s) {", "container": "Solution", "callable": "longestPalindrome", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\nReturn the minimized largest sum of the split.\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\n \nConstraints:\n\n1 <= nums.length <= 1000\n0 <= nums[i] <= 106\n1 <= k <= min(50, nums.length)\n\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 = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 50) == 10\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().splitArray", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int splitArray(vector& nums, int k) {", "container": "Solution", "callable": "splitArray", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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\nanswer[i] == \"FizzBuzz\" if i is divisible by 3 and 5.\nanswer[i] == \"Fizz\" if i is divisible by 3.\nanswer[i] == \"Buzz\" if i is divisible by 5.\nanswer[i] == i (as a string) if none of the above conditions are true.\n\n \nExample 1:\nInput: n = 3\nOutput: [\"1\",\"2\",\"Fizz\"]\nExample 2:\nInput: n = 5\nOutput: [\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\"]\nExample 3:\nInput: n = 15\nOutput: [\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\",\"Fizz\",\"7\",\"8\",\"Fizz\",\"Buzz\",\"11\",\"Fizz\",\"13\",\"14\",\"FizzBuzz\"]\n\n \nConstraints:\n\n1 <= n <= 104\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().fizzBuzz", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector fizzBuzz(int n) {", "container": "Solution", "callable": "fizzBuzz", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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\nFor 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.\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\n \nConstraints:\n\n1 <= nums.length <= 5000\n-1000 <= nums[i] <= 1000\n\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200]) == 55\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().numberOfArithmeticSlices", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numberOfArithmeticSlices(vector& nums) {", "container": "Solution", "callable": "numberOfArithmeticSlices", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 414, "task_id": "third-maximum-number", "difficulty": "Easy", "problem_description": "Given an integer array nums, return 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\n \nConstraints:\n\n1 <= nums.length <= 104\n-231 <= nums[i] <= 231 - 1\n\n \nFollow up: Can you find an O(n) solution?", "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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().thirdMax", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int thirdMax(vector& nums) {", "container": "Solution", "callable": "thirdMax", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= num1.length, num2.length <= 104\nnum1 and num2 consist of only digits.\nnum1 and num2 don't have any leading zeros except for the zero itself.\n\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"}, "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().addStrings", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string addStrings(string num1, string num2) {", "container": "Solution", "callable": "addStrings", "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\n \nConstraints:\n\n1 <= nums.length <= 200\n1 <= nums[i] <= 100\n\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 = [1, 2, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608]) == 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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == True\n assert candidate(nums = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190]) == False\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == False\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == False\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, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]) == False\n assert candidate(nums = [100, 200, 300, 400, 500, 500]) == True\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 = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == True\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 = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000, 2000000]) == 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 = [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]) == 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 = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == False\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 = [100, 200, 300, 400, 500, 100, 200, 300, 400, 500]) == True\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 = [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]) == False\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]) == False\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]) == 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 = [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118]) == 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, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 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 = [50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350]) == True\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 assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == True\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().canPartition", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canPartition(vector& nums) {", "container": "Solution", "callable": "canPartition", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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.\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).\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.\nReturn a 2D list of grid coordinates result where result[i] = [ri, ci] denotes that rain water can flow from cell (ri, ci) to both the Pacific and Atlantic oceans.\n \nExample 1:\n\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\n \nConstraints:\n\nm == heights.length\nn == heights[r].length\n1 <= m, n <= 200\n0 <= heights[r][c] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["heights"], "leetcode_dataset_entry_point": "Solution().pacificAtlantic", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> pacificAtlantic(vector>& heights) {", "container": "Solution", "callable": "pacificAtlantic", "parameters": [{"name": "heights", "type": "vector>&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 419, "task_id": "battleships-in-a-board", "difficulty": "Medium", "problem_description": "Given an m x n matrix board where each cell is a battleship 'X' or empty '.', return the number of the battleships on board.\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\n\nInput: board = [[\"X\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"]]\nOutput: 2\n\nExample 2:\n\nInput: board = [[\".\"]]\nOutput: 0\n\n \nConstraints:\n\nm == board.length\nn == board[i].length\n1 <= m, n <= 200\nboard[i][j] is either '.' or 'X'.\n\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"}, "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().countBattleships", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countBattleships(vector>& board) {", "container": "Solution", "callable": "countBattleships", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "int", "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\nIt has at least 6 characters and at most 20 characters.\nIt contains at least one lowercase letter, at least one uppercase letter, and at least one digit.\nIt 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.\nIn one step, you can:\n\nInsert one character to password,\nDelete one character from password, or\nReplace one character of password with another character.\n\n \nExample 1:\nInput: password = \"a\"\nOutput: 5\nExample 2:\nInput: password = \"aA1\"\nOutput: 3\nExample 3:\nInput: password = \"1337C0d3\"\nOutput: 0\n\n \nConstraints:\n\n1 <= password.length <= 50\npassword consists of letters, digits, dot '.' or exclamation mark '!'.\n\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 = \"........##@\") == 3\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 = \"Aa1234567890!@#$%^\") == 0\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 = \"!@#$%^&*()_+\") == 3\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 = \"Aa1234567890!@#$%^&*()\") == 2\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 = \"abcABC123!@#\") == 0\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 = \"P@ssw0rd!\") == 0\n assert candidate(password = \"!@#$%^&*()_+~`|}{[]:;?><,./-=!@#$%^&*()\") == 22\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 = \"abcABC123!@#abcABC123!@#abcABC123!@#\") == 16\n assert candidate(password = \"Aa1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 56\n assert candidate(password = \"aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1\") == 28\n assert candidate(password = \"!@#$%^&*()_+~`|}{[]:;?><,./-=\") == 12\n assert candidate(password = \"AaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAa\") == 55\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 = \"Aa1Bb2Cc3Dd4Ee5Ff6Gg7Hh8Ii9Jj0KkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\") == 42\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 = \"1234567890!@#$%^&*()_+~`|}{[]:;?><,./-=\") == 21\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1A1A1A1\") == 7\n assert candidate(password = \"A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z1\") == 33\n assert candidate(password = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 40\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 = \"Aa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!aAa!\") == 44\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 = \"Aa!b@c#d$e%f^g&h*i(j)k\") == 3\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 = \"cccccccccccccccccccccccccccccccccccccccccccccccccccc\") == 38\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 = \"a!b@c#d$e%f^g&h*i(j)\") == 2\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 = \"abcABC123!@#abcABC123!@#\") == 4\n assert candidate(password = \"Aa1Bb2Ccc3Ddd\") == 0\n assert candidate(password = \"AAAbbbCCCccc111111111\") == 7\n assert candidate(password = \"abcABC!@#abcABC!@#abcABC!@#\") == 8\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 = \"Aa1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 40\n assert candidate(password = \"Aa!b@c#d$e%f^g&h*i(j)\") == 2\n assert candidate(password = \"abcABC123abcABC123abcABC123\") == 7\n assert candidate(password = \"Aa1234567890123456789\") == 1\n assert candidate(password = \"!@#$%^&*()\") == 3\n assert candidate(password = \"!@#$%^&*()_+~`1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM\") == 56\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 = \"123!@#abcDEF\") == 0\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 = \"1234567890AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\") == 42\n assert candidate(password = \"abcdefghijABCD1234567890\") == 4\n assert candidate(password = \"Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!\") == 32\n assert candidate(password = \"AaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAa\") == 15\n assert candidate(password = \"Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!\") == 12\n assert candidate(password = \"1234567890!@#$%^&*()_+\") == 4\n assert candidate(password = \"AAAbbbCCCddd111111111111111111\") == 14\n assert candidate(password = \"Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1\") == 31\n assert candidate(password = \"123!@#abcDEF123!@#abcDEF\") == 4\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 13\n assert candidate(password = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 8\n assert candidate(password = \"AAAbbbCCCddd111111111111111111111\") == 17\n assert candidate(password = \"abcdefgHIJKLmnopQR1234567890!@#$%^&*()\") == 18\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!aA\") == 9\n assert candidate(password = \"a!B@c#D$e%F^G&H*I(J)\") == 1\n assert candidate(password = \"!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()!@#$%^&*()\") == 53\n assert candidate(password = \"xXyYzZ0987654321@#\") == 0\n assert candidate(password = \"Password1Password1\") == 0\n assert candidate(password = \"Aa1aA1aA1aA1aA1aA1aA1\") == 1\n assert candidate(password = \"Aa12345678901234567890\") == 2\n assert candidate(password = \"Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1\") == 46\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 = \"111222333444555666777888999000111222333444555666777888999000\") == 42\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 11\n assert candidate(password = \"Aa1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 16\n"}, "metadata": {"canonical_parameter_names": ["password"], "leetcode_dataset_entry_point": "Solution().strongPasswordChecker", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int strongPasswordChecker(string password) {", "container": "Solution", "callable": "strongPasswordChecker", "parameters": [{"name": "password", "type": "string"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= nums.length <= 2 * 105\n0 <= nums[i] <= 231 - 1\n\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 = [3000000000, 2147483647, 1, 0]) == 2147483647\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 = [1000000000, 2000000000, 3000000000, 1, 2, 3, 4, 5]) == 2000000005\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 = [123456789, 987654321, 1122334455, 5566778899, 9988776655]) == 2017140294\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 = [123456789, 987654321, 1122334455, 5566778899, 9988776655, 5544332211, 1111111111, 2222222222, 3333333333, 4444444444]) == 2087766500\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 = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000]) == 2114852352\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 = [123456789, 987654321, 234567891, 198765432, 345678912, 298765431, 456789123, 398765432, 567891234, 498765431, 678912345, 598765432, 789123456, 698765431, 891234567, 798765432, 912345678, 898765431, 1234567890, 9876543210, 1122334455, 2233445566, 3344556677, 4455667788, 5566778899]) == 2146912412\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaximumXOR", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMaximumXOR(vector& nums) {", "container": "Solution", "callable": "findMaximumXOR", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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:\nInput: s = \"owoztneoer\"\nOutput: \"012\"\nExample 2:\nInput: s = \"fviefuro\"\nOutput: \"45\"\n\n \nConstraints:\n\n1 <= s.length <= 105\ns[i] is one of the characters [\"e\",\"g\",\"f\",\"i\",\"h\",\"o\",\"n\",\"s\",\"r\",\"u\",\"t\",\"w\",\"v\",\"x\",\"z\"].\ns is guaranteed to be valid.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().originalDigits", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string originalDigits(string s) {", "container": "Solution", "callable": "originalDigits", "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.\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\n1 <= s.length <= 105\ns consists of only uppercase English letters.\n0 <= k <= s.length\n\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 = \"\",k = 0) == 0\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 = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",k = 100) == 60\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 = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB\",k = 50) == 41\n assert candidate(s = \"MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM\",k = 100) == 44\n assert candidate(s = \"ABCABCABCABCABCABCABCABC\",k = 15) == 23\n assert candidate(s = \"AABBBCCDDEE\",k = 2) == 5\n assert candidate(s = \"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\",k = 1000) == 31\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"}, "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().characterReplacement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int characterReplacement(string s, int k) {", "container": "Solution", "callable": "characterReplacement", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "return_type": "int", "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'.\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\nFor 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.\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.\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\n \nConstraints:\n\n0 <= bank.length <= 10\nstartGene.length == endGene.length == bank[i].length == 8\nstartGene, endGene, and bank[i] consist of only the characters ['A', 'C', 'G', 'T'].\n\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 = \"TTTTCCCC\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGCT', 'AACCGGCG', 'TTACGGCG', 'TTACGGCC', 'TTACGGTC', 'TTACGGTT', 'TTAGGGTT', 'TTAGGGTC', 'TTAGGGCC', 'TTAGGGCG', 'TTTTGGCG', 'TTTTGGCC', 'TTTTGGTC', 'TTTTGGTT', 'TTTTGGGA', 'TTTTGGAA', 'TTTTGGAT', 'TTTTGCAA', 'TTTTGCCA', 'TTTTGCTA', 'TTTTGCAC', 'TTTTGCGA', 'TTTTGCAG', 'TTTTGCGT', 'TTTTGCTC', 'TTTTGCCG', 'TTTTGGCG', 'TTTTGCCC', 'TTTTCCCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGCCGACT\",bank = ['AACCGGCA', 'AACCGGAA', 'AACCGGGA', 'GGCCGGTA', 'GGCCGGCA', 'GGCCGGAA', 'GGCCGGGA', 'GGCCGACT']) == -1\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"TTTTTTTT\",bank = ['AAAAAGGG', 'AAAGGGGG', 'AAGGGGGG', 'AGGGGGGG', 'GGGGGGGG', 'GGGGGGGT', 'GGGGGGTT', 'GGGGGTTT', 'GGGGTTTT', 'GGGTTTTT', 'GGTTTTTT', 'GTTTTTTT', 'TTTTTTTT']) == -1\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"TTTTTTTT\",bank = ['AAAAAACC', 'AAAAACCC', 'AAAAACGG', 'AAAACGGG', 'AAACGGGG', 'AACGGGGG', 'ACGGGGGG', 'CGGGGGGG', 'TTTTTTTA', 'TTTTTTAG', 'TTTTTTCG', 'TTTTTCGG', 'TTTTGCGG', 'TTTTGGGG', 'TTTGCGGG', 'TTTGGGGG', 'TTGCGGGG', 'TTGGGGGG', 'TGCGGGGG', 'TGGGGGGG', 'GCGGGGGG', 'GGGGGGGG']) == -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 = \"AAAACCCC\",endGene = \"CCCCAAAA\",bank = ['AAAACCCA', 'AAAACCAA', 'AAAACCAA', 'AAAACAAA', 'AAACAAAA', 'AACAAAAA', 'ACAAAAAA', 'CAAAAAAA', 'CAAACCAA', 'CCAACCAA', 'CCCCAAAC', 'CCCCACAA', 'CCCCAACC', 'CCCCAAAC', 'CCCCAACA', 'CCCCAAAA']) == -1\n assert candidate(startGene = \"AAAAACCC\",endGene = \"CCCCCCCC\",bank = ['AAAACCCC', 'AAACCCCC', 'AACCCCCC', 'AACCACCC', 'AACCGCCC', 'AACCGCCC', 'AACCGGCC', 'AACCGGTC', 'AACCGGTA', 'AACCGGTT', 'AACCGGCT', 'AACCGGCG', 'AACCGGCA', 'AACCGGCC', 'AACCGGCG', 'AACCGGCA', 'GGCCCCCC', 'GGCCCACC', 'GGCCCCGC', 'GGCCCCGA', 'GGCCCCTC', 'GGCCCCTG', 'GGCCCCTA', 'GGCCGGCC', 'GGCCGGCG', 'GGCCGGCA', 'GGCCGGTC', 'GGCCGGTA', 'GGCCGGTT', 'GGCCGCCC', 'GGCCGGGG', 'CCCCGGGG', 'CCCCGGGC', 'CCCCGGCG', 'CCCCGGCA', 'CCCCGGTC', 'CCCCGGTA', 'CCCCGGTT', 'CCCCGCCC', 'CCCCGGGG', 'CCCCCCCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'TTCGCGTA', 'TTCGCGCG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAGGCGTT\",bank = ['AACCGGTA', 'AACCGGCT', 'AACCGGCA', 'AACCGGCG', 'AACCGGTC', 'AACCGCTA', 'AAACGGTA', 'AACAGGTA', 'AAACGGTC', 'AAACGGCT', 'AAACGGCG', 'AAACGGTT', 'AAGGCGTA', 'AAGGCGTC', 'AAGGCGCA', 'AAGGCGCG', 'AAGGCGCT', 'AAGGCGTT']) == -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 = \"GGGGCCCC\",endGene = \"AACCGGTT\",bank = ['GGGGCCCG', 'GGGGCCCT', 'GGGGCCTT', 'GGGGCCGG', 'GGGGACGG', 'GGGAGCGG', 'GGGAACGG', 'GGAACCGG', 'GAACCGGG', 'AACCGGGG', 'AACCGGTT']) == -1\n assert candidate(startGene = \"TTTTTTTT\",endGene = \"AAAAAAAA\",bank = ['ATTTTTTT', 'AATTTTTT', 'AAATTTTT', 'AAAATTTT', 'AAAAATTT', 'AAAAATTA', 'AAAAAATT', 'AAAAAAAT', 'AAAAAAAC', 'AAAACAAA', 'AAACAAAA', 'AACAAAAA', 'ACAAAAAA', 'CAAAAAAA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AGCTAGCA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AGCTAGCA']) == -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 = \"AGCGGTTA\",bank = ['AACCGGTA', 'AACCGGCT', 'AACCGGCA', 'AACCGGCG', 'AACCGGTC', 'AACCGCTA', 'AAACGGTA', 'AACAGGTA', 'AAACGGTC', 'AAACGGCT', 'AAACGGCG', 'AAACGGTT', 'AAGGCGTA', 'AAGGCGTC', 'AAGGCGCA', 'AAGGCGCG', 'AAGGCGCT', 'AAGGCGTT', 'AGCGGTTA', 'AGCGGCTA', 'AGCGGCTC', 'AGCGGCGT', 'AGCGGCGC', 'AGCGGCCC', 'AGCGGGTA', 'AGCGGGCA', 'AGCGGGCG', 'AGCGGGCT', 'AGCGGGAA', 'AGCGGGAC', 'AGCGGGAG', 'AGCGGCGT']) == -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 = \"AACCGGTT\",endGene = \"ACCGTGGT\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGCG', 'AACCGGCT', 'AACCGGAT', 'AACCGGAA', 'AACCGCAT', 'AACCGCCT', 'AACCGCGT', 'AACCGCGC', 'AAACGGTA', 'AAACGGCA', 'AAACGGCG', 'AAACGGCT', 'AAACGGAT', 'AAACGGAA', 'AAACGGCA', 'AAACGGCC', 'AAACGCCG', 'AAACGCCT', 'ACCGGGTA', 'ACCGGGCA', 'ACCGGGCG', 'ACCGGGCT', 'ACCGGGAT', 'ACCGGGAA', 'ACCGGGCA', 'ACCGGGCC', 'ACCGGGCG', 'ACCGGGCT', 'ACCGGCTA', 'ACCGGCCA', 'ACCGGCGT', 'ACCGGCGC', 'ACCGGCCT', 'ACCGGCCC', 'ACCGGTAA', 'ACCGGTCG', 'ACCGGTTA', 'ACCGGTCA', 'ACCGGTCC', 'ACCGGTCG', 'ACCGGTCA', 'ACCGGTCC', 'ACCGGTCG', 'ACCGGTCA', 'ACCGGTCC', 'ACCGTGGC', 'ACCGTGGT']) == -1\n assert candidate(startGene = \"AAACGGTA\",endGene = \"AACCGGTA\",bank = ['AAACGGTT', 'AACCGGTT', 'AACCGGTA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GACCGGTA\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGAA', 'AACCGGTC', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'GACCGGTA']) == 2\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 = \"GAGGACAA\",endGene = \"AACCGGTA\",bank = ['AACCGGTA', 'GAGGAGAA', 'GAGGAGGA', 'GAGGACGA', 'GAGGACCA', 'GAGGACTA', 'GAGGACAA', 'GAGGACAT', 'GAAGACAA', 'AACGACAA', 'AACGGCAA', 'AACGGGAA', 'AACGGGTA', 'AACCGGTA']) == -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 = \"TTCCGGAA\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'AAACGGCA', 'TTACGGTA', 'TTACGGCA', 'TTCCGGTA', 'TTCCGGCA', 'TTCCGGAA', 'GGCCGGTA', 'GGCCGGCA', 'GGCCGGAA', 'TTCCGGTG', 'TTCCGGTC', 'TTCCGGAU', 'TTCCGGAC', 'TTCCGGAG', 'TTCCGGAT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTC\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'AACCGGTC']) == 1\n assert candidate(startGene = \"AAAAACCC\",endGene = \"GGGGGGGG\",bank = ['AAAACCCC', 'AAACCCCC', 'AACCCCCC', 'AACCACCC', 'AACCGCCC', 'AACCGGCC', 'AACCGGTC', 'AACCGGTA', 'AACCGGTT', 'AACCGGCT', 'AACCGGCG', 'AACCGGCA', 'GGCCCCCC', 'GGCCCACC', 'GGCCCCGC', 'GGCCCCGA', 'GGCCCCTC', 'GGCCCCTG', 'GGCCCCTA', 'GGCCGGCC', 'GGCCGGCG', 'GGCCGGCA', 'GGCCGGTC', 'GGCCGGTA', 'GGCCGGTT', 'GGCCGCCC', 'GGCCGGGG', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'GGGGGGTA', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAAAAAGG\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGCG', 'AACCGGCT', 'AACCGGAT', 'AACCGGAA', 'AACCGCAC', 'AACCGCCA', 'AACCGCCG', 'AACCGCCT', 'AAACGGTA', 'AAACGGCA', 'AAACGGCG', 'AAACGGCT', 'AAACGGAT', 'AAACGGAA', 'AAACGGCA', 'AAACGGCC', 'AAACGCCG', 'AAACGCCT', 'AAAAGGTA', 'AAAAGGCA', 'AAAAGGCG', 'AAAAGGCT', 'AAAAGGAA', 'AAAAGGAC', 'AAAAGGAG', 'AAAAAGTA', 'AAAAAGCA', 'AAAAAGCG', 'AAAAAGCT', 'AAAAAGAA', 'AAAAAGAC', 'AAAAAGAG', 'AAAAAAGT', 'AAAAAAGC', 'AAAAAAGA', 'AAAAAAGG']) == -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 = \"CGGTTTAA\",bank = ['AACCGGTA', 'AACCGGTC', 'AACCGGTA', 'CCCGGGTT', 'CGGTTTTT', 'CGGTTTAA', 'CGGTTTTG', 'CGGTGGAA', 'CGGACGAA', 'AACCGGAG', 'AACCGGCG', 'AACCGGGA', 'AACCGGTT', 'AACCGGAT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTT', 'AACCGGTA', 'AACCGGTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAACGGGA\",bank = ['AACCGGTA', 'AACCGCTA', 'AAACGGTA', 'AAACGGGA', 'AAACGGGC', 'AACCGGGT', 'AACCGGGG']) == 3\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"TTTTTTTT\",bank = ['AAAAAAGA', 'AAAACAAA', 'AAACAAAA', 'AAGAAAAA', 'AGAAAAAA', 'GAAAAAAA', 'TAAAAAAA', 'TTAAAAAA', 'TTTAAAAA', 'TTTTAAAA', 'TTTTTAAA', 'TTTTTTAA', 'TTTTTTTA', 'TTTTTTTT']) == 8\n assert candidate(startGene = \"ACGTACGT\",endGene = \"TGCATGCA\",bank = ['ACGTACGA', 'ACGTACGC', 'ACGTCAGT', 'TACGACGT', 'TGCATGCA', 'TGCATGCG', 'TGCATGTA', 'TGCAACGT', 'TGCGACGT', 'TGCAACGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTCCGCCC\",bank = ['AACCGGTA', 'AACCGGTC', 'AACCGGCA', 'AACCGGCC', 'AACCGGCG', 'AACCGGCT', 'AACCGGAT', 'AACCGGAC', 'AACCGGAG', 'AACCGGAA', 'AACCGCAT', 'AACCGCCT', 'AACCGCGT', 'AACCGCGC', 'AACCGCCT', 'AACCGCCC', 'AACCAGCC', 'AACCAGCA', 'AACCAGCT', 'AACCAGCG', 'AACCGCCA', 'AACCGCCC', 'AACCGCCA', 'AACCGCCC', 'AACCGCCT', 'AACCGCCA', 'AACCGCCG', 'AACCGCCC', 'AACCGCCC', 'AACCGCCC', 'TTACGGCC', 'TTACGGCA', 'TTACGGCT', 'TTACGGCG', 'TTACGGTA', 'TTACGGTC', 'TTACGGAA', 'TTACGGAC', 'TTACGGAG', 'TTACGGCG', 'TTACGGCA', 'TTACGGCT', 'TTACGGCG', 'TTAGGGCC', 'TTAGGGCA', 'TTAGGGCT', 'TTAGGGCG', 'TTAGGGTA', 'TTAGGGTC', 'TTAGGGAA', 'TTAGGGAC', 'TTAGGGAG', 'TTAGGGCG', 'TTAGGGCA', 'TTAGGGCT', 'TTAGGGCG', 'TTTTGGCC', 'TTTTGGCA', 'TTTTGGCT', 'TTTTGGCG', 'TTTTGGTA', 'TTTTGGTC', 'TTTTGGAA', 'TTTTGGAC', 'TTTTGGAG', 'TTTTGGCA', 'TTTTGGCC', 'TTTTGGCT', 'TTTTGGCG', 'TTTTGGAA', 'TTTTGGAC', 'TTTTGGAG', 'TTTTGCAA', 'TTTTGCCA', 'TTTTGCTA', 'TTTTGCAC', 'TTTTGCGA', 'TTTTGCAG', 'TTTTGCGT', 'TTTTGCTC', 'TTTTGCCG', 'TTTTGGCG', 'TTTTGCCC', 'TTTTCCCC']) == -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 = \"AAAAAAAA\",endGene = \"TTTTTTTT\",bank = ['AAAAAAAA', 'AAAACCCC', 'AAAAACCC', 'AAAAAACC', 'AAAAAAAC', 'AAAAAAAT', 'AAAAAATT', 'AAAAATTT', 'AAAATTTT', 'AAATTTTT', 'AATTTTTT', 'ATTTTTTT', 'TTTTTTTT']) == 8\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 = \"AACCGGTC\",bank = ['AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA']) == 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 = \"AAACGGTA\",bank = ['AACCGGTA', 'AACCGCTA', 'AAACGGTA', 'AACCGGCA', 'AACCGGAA', 'AAACGGCA', 'AAACGGAA', 'AACCGGTC', 'AAACGGTC', 'AAACGGCA', 'AAACGGAA', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTC', 'AACCGGTT', 'AACCGGTA', 'AACCGGTT']) == 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 = \"AACCGGTT\",bank = ['AACCGGTA', 'AACCGGCT', 'AACCGGCA', 'AACCGGCG', 'AACCGGTC', 'AACCGCTA', 'AAACGGTA', 'AACAGGTA', 'AAACGGTC', 'AAACGGCT', 'AAACGGCG', 'AAACGGTT', 'AAGGCGTA', 'AAGGCGTC', 'AAGGCGCA', 'AAGGCGCG', 'AAGGCGCT', 'AAGGCGTT']) == 0\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"}, "metadata": {"canonical_parameter_names": ["startGene", "endGene", "bank"], "leetcode_dataset_entry_point": "Solution().minMutation", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minMutation(string startGene, string endGene, vector& bank) {", "container": "Solution", "callable": "minMutation", "parameters": [{"name": "startGene", "type": "string"}, {"name": "endGene", "type": "string"}, {"name": "bank", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 434, "task_id": "number-of-segments-in-a-string", "difficulty": "Easy", "problem_description": "Given a string s, return the number of segments in the string.\nA segment is defined to be a contiguous sequence of non-space characters.\n \nExample 1:\n\nInput: s = \"Hello, my name is John\"\nOutput: 5\nExplanation: The five segments are [\"Hello,\", \"my\", \"name\", \"is\", \"John\"]\n\nExample 2:\n\nInput: s = \"Hello\"\nOutput: 1\n\n \nConstraints:\n\n0 <= s.length <= 300\ns consists of lowercase and uppercase English letters, digits, or one of the following characters \"!@#$%^&*()_+-=',.:\".\nThe only space character in s is ' '.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"Hello, my name is John\") == 5\n assert candidate(s = \"Hello\") == 1\n"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().countSegments", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countSegments(string s) {", "container": "Solution", "callable": "countSegments", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.\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\n \nConstraints:\n\n1 <= intervals.length <= 105\nintervals[i].length == 2\n-5 * 104 <= starti < endi <= 5 * 104\n\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 = [[-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == 5\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, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1]]) == 4\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, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 0\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, 3], [1, 2], [1, 1], [1, 0], [0, 1], [0, 0], [-1, 0], [-2, -1]]) == 3\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 = [[-50000, 50000], [49999, 50001], [-50001, -49999], [-10000, 10000]]) == 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"}, "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().eraseOverlapIntervals", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int eraseOverlapIntervals(vector>& intervals) {", "container": "Solution", "callable": "eraseOverlapIntervals", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "int", "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] = [starti, endi] and each starti is unique.\nThe right interval for an interval i is an interval j such that startj >= endi and startj is minimized. Note that i may equal j.\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 start0 = 3 is the smallest start that is >= end1 = 3.\nThe right interval for [1,2] is [2,3] since start1 = 2 is the smallest start that is >= end2 = 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 start2 = 3 is the smallest start that is >= end1 = 3.\n\n \nConstraints:\n\n1 <= intervals.length <= 2 * 104\nintervals[i].length == 2\n-106 <= starti <= endi <= 106\nThe start point of each interval is unique.\n\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 = [[1000000, 1000001], [999999, 1000000], [999998, 999999], [999997, 999998], [999996, 999997]]) == [-1, 0, 1, 2, 3]\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, 1000000], [1000001, 2000000], [2000001, 3000000], [3000001, 4000000]]) == [1, 2, 3, -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, 1000000], [100000, 2000000], [200000, 3000000], [300000, 4000000], [400000, 5000000]]) == [-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 = [[-5, 0], [-4, -1], [-3, -2], [-2, -3], [-1, -4], [0, -5]]) == [5, 4, 3, 2, 1, 0]\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 = [[1000000, -1000000], [-1000000, 1000000], [500000, 600000], [600000, 700000]]) == [1, 0, 3, 0]\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 = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1]]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\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 = [[1, 1000000], [1000001, 2000000], [2000001, 3000000], [3000001, 4000000], [4000001, 5000000]]) == [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 = [[1000000, 1000001], [500000, 500001], [250000, 250001], [125000, 125001], [62500, 62501], [31250, 31251], [15625, 15626], [7812, 7813], [3906, 3907], [1953, 1954]]) == [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8]\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"}, "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().findRightInterval", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findRightInterval(vector>& intervals) {", "container": "Solution", "callable": "findRightInterval", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 437, "task_id": "path-sum-iii", "difficulty": "Medium", "problem_description": "Given the root of a binary tree and an integer targetSum, return the number of paths where the sum of the values along the path equals targetSum.\nThe path does not need to start or end at the root or a leaf, but it must go downwards (i.e., traveling only from parent nodes to child nodes).\n \nExample 1:\n\n\nInput: root = [10,5,-3,3,2,null,11,3,-2,null,1], targetSum = 8\nOutput: 3\nExplanation: The paths that sum to 8 are shown.\n\nExample 2:\n\nInput: root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22\nOutput: 3\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 1000].\n-109 <= Node.val <= 109\n-1000 <= targetSum <= 1000\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([]),targetSum = 0) == 0\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5]),targetSum = 3) == 2\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1]),targetSum = 8) == 3\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1]),targetSum = 22) == 3\n assert candidate(root = tree_node([1, -2, -3]),targetSum = -2) == 2\n assert candidate(root = tree_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),targetSum = 2) == 47\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, -1, -2]),targetSum = 22) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 33) == 0\n assert candidate(root = tree_node([1000, 500, -300, 300, 200, None, 1100, 300, -200, None, 1000, None, None, None, None]),targetSum = 800) == 2\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, None, -1, None, -1, 2]),targetSum = 8) == 4\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, 2, 3, 4, 5, 6, 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]),targetSum = 45) == 1\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]),targetSum = 10) == 2\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),targetSum = 22) == 3\n assert candidate(root = tree_node([100, -100, -100, -100, -100, -100, -100, -100, None, None, None, -100, None, None, None, -100]),targetSum = -100) == 13\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, None, 2, None, 3, None, 4, None, 5]),targetSum = 8) == 4\n assert candidate(root = tree_node([1, 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, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]),targetSum = 0) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 38) == 0\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),targetSum = 8) == 1\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, 2, None, None, None, None, 3]),targetSum = 22) == 3\n assert candidate(root = tree_node([10, -2, 3, 4, -5, 6, -7, 8, 9, -10, 11, -12, 13, -14, 15]),targetSum = 7) == 1\n assert candidate(root = tree_node([10, 5, 5, 3, 3, 3, 3, None, None, 1, 1, 1, 1, None, None, None, None, 2, 2, 2, 2, 2, 2, 2, 2]),targetSum = 8) == 6\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]),targetSum = 10) == 3\n assert candidate(root = tree_node([0, 0, 0, 0, 0, None, None, 0, 0, 0, None, 0, 0, None, 0, None, 0, None, 0, 0, 0, None, 0, 0, None, 0, 0, None, 0, None, 0, None, 0, 0, 0, None, 0, 0, None, 0, None, 0, None, 0, 0, 0, None, 0]),targetSum = 0) == 186\n assert candidate(root = tree_node([100, 50, -50, 25, 25, -25, -25, 12, None, None, 3, None, None, None, None, -3, None, None, -3]),targetSum = 25) == 5\n assert candidate(root = tree_node([100, -100, 0, 50, -50, 25, -25, None, None, None, None, 10, -10, 5, -5]),targetSum = 0) == 2\n assert candidate(root = tree_node([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]),targetSum = 5) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 45) == 0\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 0, 1, None, -1]),targetSum = 8) == 4\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0]),targetSum = 0) == 25\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 28) == 0\n assert candidate(root = tree_node([10, -1, 3, 5, -2, 2, -3, None, None, None, None, 1, -1, None, -1, None, None, None, None, None, None, -1, None, -1, None, None, None, None, None, -1]),targetSum = 5) == 2\n assert candidate(root = tree_node([-2, None, -3, None, -4, None, -5, None, -6]),targetSum = -6) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]),targetSum = 15) == 4\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),targetSum = 0) == 124\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),targetSum = 35) == 2\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1, None, -3, None, None, None, None, None]),targetSum = -2) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),targetSum = 15) == 4\n assert candidate(root = tree_node([100, 50, -30, 30, 20, None, 110, 30, -20, None, 1, None, None, None, None]),targetSum = 80) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]),targetSum = 15) == 4\n assert candidate(root = tree_node([100, 200, 300, 400, 500, None, 600, None, None, None, None, None, 700]),targetSum = 1000) == 1\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, None, None, None, None, 2, None, None, 3]),targetSum = 22) == 3\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, 1, 1, 1, None, None, None, None, None, None, None, None, None]),targetSum = 8) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 15) == 4\n assert candidate(root = tree_node([-1, None, -2, None, -3, None, -4, -5, None]),targetSum = -6) == 1\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = 3) == 1\n assert candidate(root = tree_node([10, 5, 10, 3, 3, 2, 1, None, None, 3, -2, None, 1, None, -1, 2, None, 1, None, None, None, None, 1]),targetSum = 8) == 3\n assert candidate(root = tree_node([100, 50, 200, 25, 75, 150, 300, 10, 40, 60, 90, 125, 175, 250, 350, 5, 15, 35, 45, 55, 85, 105, 115, 145, 165, 185, 225, 275, 295, 315, 335]),targetSum = 100) == 3\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1]),targetSum = -1) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]),targetSum = 46) == 2\n assert candidate(root = tree_node([5, -10, 15, 20, -20, 25, -25, None, 30, 35, None, 40, 45, None, None, None, None, None, 50, 55]),targetSum = 10) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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]),targetSum = 55) == 2\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 22) == 3\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, -1, -2, None, None, 2, 1]),targetSum = 22) == 3\n assert candidate(root = tree_node([0, 1, 1, 1, None, None, 1, 1, None, None, None, None, 1, None, 1, None, 1]),targetSum = 2) == 8\n assert candidate(root = tree_node([0, 1, 1, 1, None, None, 1, None, None, None, 1, None, None, None, 1]),targetSum = 2) == 5\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1, 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]),targetSum = 22) == 10\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),targetSum = 38) == 1\n assert candidate(root = tree_node([1, -2, -3, 1, 3, -2, None, -1, None, -1, 0, None, -3, None, None, None, -2, None, 1]),targetSum = 3) == 3\n assert candidate(root = tree_node([1, -2, 3, 4, -5, 6, -7, 8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20, 21, -22, 23, -24, 25]),targetSum = 10) == 2\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, None, 2, None, 1, None, None, None, None, 1, 1, None, 2, None, 1, None, None, None, None, 1]),targetSum = 6) == 3\n assert candidate(root = tree_node([-10, -3, -5, -8, -9, -1, -2, -12, None, -4, None, None, None, -6, -7]),targetSum = -8) == 2\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 1, None, 2, None, 1, None, None, None, None, 1]),targetSum = 8) == 4\n assert candidate(root = tree_node([10, 5, 5, 3, 2, 2, 1, 3, -2, None, 1, None, -1, 0, None, None, None, None, None, None, 0, None, None, None, None, None, None, 0, None]),targetSum = 8) == 3\n assert candidate(root = tree_node([-10, -5, -3, -3, -2, -11, -3, -3, -2, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1, None, None, -1]),targetSum = -8) == 4\n assert candidate(root = tree_node([0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]),targetSum = 6) == 16\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),targetSum = 23) == 1\n assert candidate(root = tree_node([10, 15, 3, 7, 20, -15, None, -20, -10, None, 10, None, None, None, 5]),targetSum = 10) == 2\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),targetSum = 10) == 14\n"}, "metadata": {"canonical_parameter_names": ["root", "targetSum"], "leetcode_dataset_entry_point": "Solution().pathSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int pathSum(TreeNode* root, int targetSum) {", "container": "Solution", "callable": "pathSum", "parameters": [{"name": "root", "type": "TreeNode*"}, {"name": "targetSum", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= s.length, p.length <= 3 * 104\ns and p consist of lowercase English letters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"hello\",p = \"billion\") == []\n assert candidate(s = \"aaaaa\",p = \"a\") == [0, 1, 2, 3, 4]\n assert candidate(s = \"bbaa\",p = \"ab\") == [1]\n assert candidate(s = \"abab\",p = \"ab\") == [0, 1, 2]\n assert candidate(s = \"abacbabc\",p = \"abc\") == [1, 2, 3, 5]\n assert candidate(s = \"a\",p = \"a\") == [0]\n assert candidate(s = \"aaaaaa\",p = \"aa\") == [0, 1, 2, 3, 4]\n assert candidate(s = \"cbaebabacd\",p = \"abc\") == [0, 6]\n assert candidate(s = \"xyz\",p = \"zyx\") == [0]\n assert candidate(s = \"aaaaaaaaaa\",p = \"aaa\") == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(s = \"mississippi\",p = \"issi\") == [1, 4]\n assert candidate(s = \"abcabcabc\",p = \"abc\") == [0, 1, 2, 3, 4, 5, 6]\n assert candidate(s = \"aabbcc\",p = \"abc\") == []\n assert candidate(s = \"mississippi\",p = \"issip\") == [4]\n assert candidate(s = \"abcd\",p = \"efgh\") == []\n assert candidate(s = \"abcde\",p = \"fgh\") == []\n assert candidate(s = \"abcdefg\",p = \"gfedcba\") == [0]\n assert candidate(s = \"aabbccdd\",p = \"abcd\") == []\n assert candidate(s = \"hello\",p = \"oll\") == [2]\n assert candidate(s = \"p\",p = \"p\") == [0]\n assert candidate(s = \"zdhfkahfewrfsad\",p = \"fes\") == []\n assert 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 candidate(s = \"ananananan\",p = \"nana\") == [0, 1, 2, 3, 4, 5, 6]\n assert 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 candidate(s = \"zzzzzzzzzzzzzzzz\",p = \"zzzz\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(s = \"anagramanagramanagram\",p = \"anagramanagram\") == [0, 1, 2, 3, 4, 5, 6, 7]\n assert 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 candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",p = \"quick\") == [1]\n assert candidate(s = \"xyzzxyzz\",p = \"xyz\") == [0, 3, 4]\n assert candidate(s = \"almostanagram\",p = \"anagram\") == [6]\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",p = \"abcdefghijklmnop\") == [0, 26]\n assert candidate(s = \"abcdabcdeabcdabcdeabcdabcde\",p = \"abcde\") == [4, 5, 6, 7, 8, 13, 14, 15, 16, 17, 22]\n assert candidate(s = \"aabbccddeeffgghhii\",p = \"abcdefghi\") == []\n assert candidate(s = \"aquickbrownfoxjumpsoverlazydog\",p = \"lazy\") == [23]\n assert 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 candidate(s = \"thisisaverylongstringtocheckanagrams\",p = \"strings\") == []\n assert candidate(s = \"xyxzyzyx\",p = \"zyx\") == [1, 2, 5]\n assert candidate(s = \"bbaaaaab\",p = \"ab\") == [1, 6]\n assert candidate(s = \"bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc\",p = \"bbccbb\") == []\n assert 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 candidate(s = \"abcabcabcabcabcabc\",p = \"abcabc\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(s = \"abcdabcdabcdabcd\",p = \"dcba\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"mnopqrstuvwxyz\") == []\n assert candidate(s = \"thisisanotherexample\",p = \"ample\") == [15]\n assert 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 candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"zyxwvutsrqponmlkjihgfedcba\") == []\n assert candidate(s = \"xyzzzzzyxyzzzzzyxyzzzzzy\",p = \"zzzzzyxy\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert 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 candidate(s = \"eidbaooo\",p = \"ab\") == [3]\n assert candidate(s = \"acdfgdcagdfgdsf\",p = \"gcd\") == [4]\n assert candidate(s = \"abcdefgabcdefg\",p = \"gfedcba\") == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"mnopqrstuvwxzy\") == []\n assert 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 candidate(s = \"bcbcbcbcbcbc\",p = \"bccb\") == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(s = \"abcdefghij\",p = \"ihgfedcba\") == [0]\n assert 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 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 candidate(s = \"aaaaaaaaaabbbbbbbbbbcccccccccc\",p = \"abc\") == []\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",p = \"zyxwvutsrqponmlkjihgfedcba\") == [0]\n assert candidate(s = \"pneumonoultramicroscopicsilicovolcanoconiosis\",p = \"pneumonia\") == []\n assert candidate(s = \"counterexampletofindallanagramsinaverylargeinputstring\",p = \"example\") == [7]\n assert candidate(s = \"zazazazazaz\",p = \"aaa\") == []\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",p = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == [0]\n assert candidate(s = \"thisisateststring\",p = \"test\") == [7]\n assert 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 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 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 candidate(s = \"abcdabcde\",p = \"cde\") == [6]\n assert candidate(s = \"abacbabcabcab\",p = \"abc\") == [1, 2, 3, 5, 6, 7, 8, 9, 10]\n assert 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 candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaab\",p = \"ba\") == [26]\n assert 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 candidate(s = \"aaaaaaaaaaaab\",p = \"aaaab\") == [8]\n assert candidate(s = \"ldfldjflsdkflsdkjfldsjkfldsjfldsjflsdkjfldskjflds\",p = \"sdkjf\") == [13, 19, 35, 41]\n assert candidate(s = \"abababababababababab\",p = \"abab\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert candidate(s = \"aabbccddeeffaabbccddeeff\",p = \"abcdef\") == []\n assert candidate(s = \"zzzzzzzzzz\",p = \"zzz\") == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(s = \"zxyzzxyz\",p = \"xyz\") == [0, 1, 4, 5]\n assert candidate(s = \"thisisanexampleofaverylongstringwherefindinganagramsisnotthatstraightforward\",p = \"anagram\") == [44]\n assert candidate(s = \"anagramananagramananagram\",p = \"anagram\") == [0, 1, 2, 3, 9, 10, 11, 12, 18]\n assert candidate(s = \"anananananananananananananananananana\",p = \"anana\") == [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32]\n assert candidate(s = \"abcdefghij\",p = \"jihgfedcba\") == [0]\n assert 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 candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"mnopqr\") == []\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",p = \"mnbvcxzlkjhgfdsapoiuytrewq\") == [0]\n assert 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 candidate(s = \"hellohellohellohellohellohellohellohellohellohello\",p = \"world\") == []\n assert candidate(s = \"anagramanagramanagram\",p = \"nagaram\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert 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 candidate(s = \"layer\",p = \"relay\") == [0]\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",p = \"thequickbrownfoxjumpsover\") == [0]\n assert 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 candidate(s = \"abababababababababab\",p = \"baba\") == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\",p = \"aab\") == [62]\n assert candidate(s = \"qazwsxedcrfvtgbyhnujmikolp\",p = \"lopihgfytvremkluzxwqjncbv\") == []\n assert candidate(s = \"abacabadabacaba\",p = \"abacab\") == [0, 1, 8, 9]\n assert candidate(s = \"thisisaverylongstringwithseveralrepeatingcharacters\",p = \"characters\") == [41]\n assert candidate(s = \"aabbccddeeffgghhii\",p = \"iihhggffeeddccbbaa\") == [0]\n assert candidate(s = \"thisisanagram\",p = \"nagaram\") == [6]\n assert 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 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 candidate(s = \"aabbccddeeff\",p = \"abcdef\") == []\n"}, "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().findAnagrams", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findAnagrams(string s, string p) {", "container": "Solution", "callable": "findAnagrams", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "vector", "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 kth 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\n \nConstraints:\n\n1 <= k <= n <= 109\n\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 = 2147483647,k = 1073741823) == 1966367637\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 = 2147483647,k = 1000000000) == 1899999999\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 = 2147483647,k = 1500000000) == 417264712\n assert candidate(n = 600000000,k = 300000000) == 369999999\n"}, "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().findKthNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findKthNumber(int n, int k) {", "container": "Solution", "callable": "findKthNumber", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "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 ith row has exactly i coins. The last row of the staircase may be incomplete.\nGiven the integer n, return the number of complete rows of the staircase you will build.\n \nExample 1:\n\n\nInput: n = 5\nOutput: 2\nExplanation: Because the 3rd row is incomplete, we return 2.\n\nExample 2:\n\n\nInput: n = 8\nOutput: 3\nExplanation: Because the 4th row is incomplete, we return 3.\n\n \nConstraints:\n\n1 <= n <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().arrangeCoins", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int arrangeCoins(int n) {", "container": "Solution", "callable": "arrangeCoins", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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:\nInput: nums = [4,3,2,7,8,2,3,1]\nOutput: [2,3]\nExample 2:\nInput: nums = [1,1,2]\nOutput: [1]\nExample 3:\nInput: nums = [1]\nOutput: []\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 105\n1 <= nums[i] <= n\nEach element in nums appears once or twice.\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDuplicates", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findDuplicates(vector& nums) {", "container": "Solution", "callable": "findDuplicates", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 443, "task_id": "string-compression", "difficulty": "Medium", "problem_description": "Given an array of characters chars, compress it using the following algorithm:\nBegin with an empty string s. For each group of consecutive repeating characters in chars:\n\nIf the group's length is 1, append the character to s.\nOtherwise, append the character followed by the group's length.\n\nThe compressed string s should not be returned separately, but instead, be stored in the input character array chars. Note that group lengths that are 10 or longer will be split into multiple characters in chars.\nAfter you are done modifying the input array, return the new length of the array.\nYou must write an algorithm that uses only constant extra space.\n \nExample 1:\n\nInput: chars = [\"a\",\"a\",\"b\",\"b\",\"c\",\"c\",\"c\"]\nOutput: Return 6, and the first 6 characters of the input array should be: [\"a\",\"2\",\"b\",\"2\",\"c\",\"3\"]\nExplanation: The groups are \"aa\", \"bb\", and \"ccc\". This compresses to \"a2b2c3\".\n\nExample 2:\n\nInput: chars = [\"a\"]\nOutput: Return 1, and the first character of the input array should be: [\"a\"]\nExplanation: The only group is \"a\", which remains uncompressed since it's a single character.\n\nExample 3:\n\nInput: chars = [\"a\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\",\"b\"]\nOutput: Return 4, and the first 4 characters of the input array should be: [\"a\",\"b\",\"1\",\"2\"].\nExplanation: The groups are \"a\" and \"bbbbbbbbbbbb\". This compresses to \"ab12\".\n \nConstraints:\n\n1 <= chars.length <= 2000\nchars[i] is a lowercase English letter, uppercase English letter, digit, or symbol.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(chars = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a']) == 3\n assert candidate(chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']) == 10\n assert candidate(chars = ['a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b']) == 4\n assert candidate(chars = ['a', 'a', 'b', 'b', 'c', 'c', 'c']) == 6\n assert candidate(chars = ['a', '2', 'b', '2', 'c', '3']) == 6\n assert candidate(chars = ['a', 'a', 'a', 'b', 'b', 'a', 'a']) == 6\n assert candidate(chars = ['a']) == 1\n assert candidate(chars = ['a', 'b', 'c']) == 3\n assert candidate(chars = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c', 'c']) == 9\n assert candidate(chars = ['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', 'a']) == 3\n assert candidate(chars = ['a', 'a', 'a', 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'e', 'e', 'f', 'f', 'g', 'g', 'g', 'g', 'g', 'g', 'g', 'g']) == 14\n assert candidate(chars = ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b']) == 20\n assert candidate(chars = ['a', '1', '1', '2', '2', '2', '3', '3', '3', '3', '4', '4', '4', '4', '4', '5', '5', '5', '5', '5', '5', '5', '5', '5', '5']) == 12\n assert candidate(chars = ['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', 'x']) == 3\n assert candidate(chars = ['a', 'b', 'b', 'a', 'a', 'a', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'e', 'e', 'e', 'e', 'e', 'e']) == 11\n assert candidate(chars = ['a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c']) == 12\n assert candidate(chars = ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b']) == 20\n assert candidate(chars = ['m', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm', 'm']) == 3\n assert candidate(chars = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'e', 'e', 'e', 'f', 'f', 'f', 'g', 'g', 'g', 'h', 'h', 'h', 'i', 'i', 'i', 'j', 'j', 'j', 'k', 'k', 'k', 'l', 'l', 'l', 'm', 'm', 'm', 'n', 'n', 'n', 'o', 'o', 'o', 'p', 'p', 'p', 'q', 'q', 'q', 'r', 'r', 'r', 's', 's', 's', 't', 't', 't', 'u', 'u', 'u', 'v', 'v', 'v', 'w', 'w', 'w', 'x', 'x', 'x', 'y', 'y', 'y', 'z', 'z', 'z']) == 52\n assert candidate(chars = ['a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd']) == 9\n assert candidate(chars = ['a', 'a', 'b', 'b', 'b', 'b', 'b', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd']) == 9\n assert candidate(chars = ['x', 'y', 'y', 'z', 'z', 'z', 'x', 'y', 'y', 'z', 'z', 'z', 'x', 'y', 'y', 'z', 'z', 'z', 'x', 'y', 'y', 'z', 'z', 'z']) == 20\n assert candidate(chars = ['x', 'x', 'x', 'y', 'y', 'z', 'z', 'z', 'z', 'z', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w', 'w']) == 9\n assert candidate(chars = ['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c']) == 24\n assert candidate(chars = ['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a', 'b']) == 82\n"}, "metadata": {"canonical_parameter_names": ["chars"], "leetcode_dataset_entry_point": "Solution().compress", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int compress(vector& chars) {", "container": "Solution", "callable": "compress", "parameters": [{"name": "chars", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 445, "task_id": "add-two-numbers-ii", "difficulty": "Medium", "problem_description": "You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.\nYou may assume the two numbers do not contain any leading zero, except the number 0 itself.\n \nExample 1:\n\n\nInput: l1 = [7,2,4,3], l2 = [5,6,4]\nOutput: [7,8,0,7]\n\nExample 2:\n\nInput: l1 = [2,4,3], l2 = [5,6,4]\nOutput: [8,0,7]\n\nExample 3:\n\nInput: l1 = [0], l2 = [0]\nOutput: [0]\n\n \nConstraints:\n\nThe number of nodes in each linked list is in the range [1, 100].\n0 <= Node.val <= 9\nIt is guaranteed that the list represents a number that does not have leading zeros.\n\n \nFollow up: Could you solve it without reversing the input lists?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9])), list_node([1, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([9, 8, 7])), list_node([1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([7, 2, 4, 3]),l2 = list_node([5, 6, 4])), list_node([7, 8, 0, 7]))\n assert is_same_list(candidate(l1 = list_node([2, 4, 3]),l2 = list_node([5, 6, 4])), list_node([8, 0, 7]))\n assert is_same_list(candidate(l1 = list_node([0]),l2 = list_node([0])), list_node([0]))\n assert is_same_list(candidate(l1 = list_node([5]),l2 = list_node([5])), list_node([1, 0]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9]),l2 = list_node([1])), list_node([1, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([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, 5])), list_node([6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([5, 6, 4])), list_node([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, 5, 6, 5]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),l2 = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([5]),l2 = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([5, 5, 5, 5, 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, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([4, 5, 6, 7, 8, 9])), list_node([4, 5, 6, 9, 1, 2]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0]),l2 = list_node([1])), list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9])), list_node([1, 2, 3, 4, 5, 6, 7, 9, 0]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9]),l2 = list_node([1, 1, 1, 1])), list_node([1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([3, 2, 1]),l2 = list_node([6, 5, 4, 3, 2, 1])), list_node([6, 5, 4, 6, 4, 2]))\n assert is_same_list(candidate(l1 = list_node([6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]),l2 = list_node([4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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, 0, 0, 0, 0, 0, 0, 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 is_same_list(candidate(l1 = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]),l2 = list_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])), list_node([1, 1, 1, 1, 1, 1, 1, 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 is_same_list(candidate(l1 = list_node([9, 0, 9]),l2 = list_node([1, 0, 1])), list_node([1, 0, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([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])), list_node([6, 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, 7]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([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])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([2, 3, 5, 7, 11, 13, 17, 19]),l2 = list_node([23, 29, 31, 37, 41, 43, 47, 53])), list_node([2, 8, 6, 0, 9, 8, 3, 1, 2]))\n assert is_same_list(candidate(l1 = list_node([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]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9]),l2 = list_node([1, 0, 0, 0])), list_node([1, 9, 9, 9]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([6, 7, 8, 9, 0])), list_node([8, 0, 2, 3, 5]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9]),l2 = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1])), list_node([1, 1, 1, 1, 2, 1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([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, 2]),l2 = list_node([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, 2])), list_node([4, 0, 0, 0, 0, 0, 0, 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]))\n assert is_same_list(candidate(l1 = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),l2 = list_node([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])), list_node([3, 3, 3, 3, 3, 3, 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 is_same_list(candidate(l1 = list_node([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]),l2 = list_node([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])), list_node([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, 2]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([6, 7, 8, 9, 0, 1])), list_node([6, 9, 1, 2, 4, 6]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9]),l2 = list_node([9, 9, 9, 9, 9, 9, 9])), list_node([1, 9, 9, 9, 9, 9, 9, 8]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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, 9, 9, 9, 9, 9, 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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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, 8]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]),l2 = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3]),l2 = list_node([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])), list_node([4, 5, 6, 7, 9, 0, 1, 2, 3, 4, 5, 6, 7, 9, 0, 1, 2, 3, 4, 5, 6, 7, 9, 0, 2, 4, 3]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([1, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0]),l2 = list_node([9, 0, 9, 0, 9, 0, 9, 0, 9, 0])), list_node([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([5, 4, 3, 2, 1]),l2 = list_node([1, 2, 3, 4, 5])), list_node([6, 6, 6, 6, 6]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([9, 8, 7, 6, 6, 6, 6, 6, 6]))\n assert is_same_list(candidate(l1 = list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]),l2 = list_node([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, 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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8])), list_node([8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 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 is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]),l2 = list_node([1])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9, 9, 9, 9, 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]),l2 = list_node([1])), list_node([9, 9, 9, 9, 9, 9, 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 is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([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, 1])), list_node([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, 2]))\n assert is_same_list(candidate(l1 = list_node([9, 9]),l2 = list_node([1, 1, 1])), list_node([2, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([4, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([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, 1]),l2 = list_node([9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9])), list_node([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]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0]),l2 = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([9, 9, 9]),l2 = list_node([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, 1])), list_node([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, 1, 0, 0, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5]),l2 = list_node([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])), list_node([5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 6, 6, 6, 6, 6]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9]),l2 = list_node([9, 8, 7, 6, 5, 4, 3, 2, 1])), list_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 0]))\n assert is_same_list(candidate(l1 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]),l2 = list_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 0])), list_node([2, 4, 6, 9, 1, 3, 5, 7, 8, 0]))\n"}, "metadata": {"canonical_parameter_names": ["l1", "l2"], "leetcode_dataset_entry_point": "Solution().addTwoNumbers", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {", "container": "Solution", "callable": "addTwoNumbers", "parameters": [{"name": "l1", "type": "ListNode*"}, {"name": "l2", "type": "ListNode*"}], "return_type": "ListNode*", "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.\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\nFor example, [1, 3, 5, 7, 9], [7, 7, 7, 7], and [3, -1, -5, -9] are arithmetic sequences.\nFor 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\nFor 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\n \nConstraints:\n\n1  <= nums.length <= 1000\n-231 <= nums[i] <= 231 - 1\n\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 = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 1152921504606845145\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().numberOfArithmeticSlices", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numberOfArithmeticSlices(vector& nums) {", "container": "Solution", "callable": "numberOfArithmeticSlices", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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] = [xi, yi]. 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).\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\n \nConstraints:\n\nn == points.length\n1 <= n <= 500\npoints[i].length == 2\n-104 <= xi, yi <= 104\nAll the points are unique.\n\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 = [[1, 1], [2, 2], [1, 1], [2, 2]]) == 16\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 = [[0, 0], [1, 1], [1, 0], [2, 0], [0, 1], [0, 2], [2, 1], [2, 2], [1, 2], [2, 1]]) == 136\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 = [[10000, 10000], [10001, 10001], [10002, 10002], [10003, 10003], [10004, 10004]]) == 8\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"}, "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().numberOfBoomerangs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int numberOfBoomerangs(vector>& points) {", "container": "Solution", "callable": "numberOfBoomerangs", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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:\nInput: nums = [4,3,2,7,8,2,3,1]\nOutput: [5,6]\nExample 2:\nInput: nums = [1,1]\nOutput: [2]\n\n \nConstraints:\n\nn == nums.length\n1 <= n <= 105\n1 <= nums[i] <= n\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 = [5, 6, 7, 8, 9, 1, 2, 3, 4, 11, 12, 13, 14, 15, 16]) == [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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == []\n assert candidate(nums = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990]) == [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, 1, 2, 3, 4, 5, 6, 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 = [100000, 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, 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 = [50000, 49999, 49998, 49997, 49996, 49995, 49994, 49993, 49992, 49991, 49990, 49989, 49988, 49987, 49986, 49985, 49984, 49983, 49982, 49981, 49980, 49979, 49978, 49977, 49976, 49975, 49974, 49973, 49972, 49971, 49970, 49969, 49968, 49967, 49966, 49965, 49964, 49963, 49962, 49961, 49960, 49959, 49958, 49957, 49956, 49955, 49954, 49953, 49952, 49951, 49950, 49949, 49948, 49947, 49946, 49945, 49944, 49943, 49942, 49941, 49940, 49939, 49938, 49937, 49936, 49935, 49934, 49933, 49932, 49931, 49930, 49929, 49928, 49927, 49926, 49925, 49924, 49923, 49922, 49921, 49920, 49919, 49918, 49917, 49916, 49915, 49914, 49913, 49912, 49911, 49910, 49909, 49908, 49907, 49906, 49905, 49904, 49903, 49902, 49901, 1, 2, 3, 4, 5, 6, 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]\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 = [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, 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 = [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, 99964, 99963, 99962, 99961, 99960, 99959, 99958, 99957, 99956, 99955, 99954, 99953, 99952, 99951, 99950, 99949, 99948, 99947, 99946, 99945, 99944, 99943, 99942, 99941, 99940, 99939, 99938, 99937, 99936, 99935, 99934, 99933, 99932, 99931, 99930, 99929, 99928, 99927, 99926, 99925, 99924, 99923, 99922, 99921, 99920, 99919, 99918, 99917, 99916, 99915, 99914, 99913, 99912, 99911, 99910, 99909, 99908, 99907, 99906, 99905, 99904, 99903, 99902, 99901, 1, 2, 3, 4, 5]) == [6, 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 = [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 = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 1, 2, 3, 4, 5]) == [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == [2, 4, 6, 8, 10, 12, 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, 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 = [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 = [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 = [90000, 80000, 70000, 60000, 50000, 40000, 30000, 20000, 10000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [11, 12, 13, 14, 15, 16, 17, 18, 19]\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 = [100000, 100000, 100000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [11, 12, 13]\n assert candidate(nums = [50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 1, 2, 3, 4, 5, 6, 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]\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDisappearedNumbers", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findDisappearedNumbers(vector& nums) {", "container": "Solution", "callable": "findDisappearedNumbers", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 450, "task_id": "delete-node-in-a-bst", "difficulty": "Medium", "problem_description": "Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.\nBasically, the deletion can be divided into two stages:\n\nSearch for a node to remove.\nIf the node is found, delete the node.\n\n \nExample 1:\n\n\nInput: root = [5,3,6,2,4,null,7], key = 3\nOutput: [5,4,6,2,null,null,7]\nExplanation: Given key to delete is 3. So we find the node with value 3 and delete it.\nOne valid answer is [5,4,6,2,null,null,7], shown in the above BST.\nPlease notice that another valid answer is [5,2,6,null,4,null,7] and it's also accepted.\n\n\nExample 2:\n\nInput: root = [5,3,6,2,4,null,7], key = 0\nOutput: [5,3,6,2,4,null,7]\nExplanation: The tree does not contain a node with value = 0.\n\nExample 3:\n\nInput: root = [], key = 0\nOutput: []\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 104].\n-105 <= Node.val <= 105\nEach node has a unique value.\nroot is a valid binary search tree.\n-105 <= key <= 105\n\n \nFollow up: Could you solve it with time complexity O(height of tree)?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(root = tree_node([1, None, 2]),key = 1), tree_node([2]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7]),key = 7), tree_node([5, 3, 6, 2, 4]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7]),key = 3), tree_node([5, 4, 6, 2, None, None, 7]))\n assert candidate(root = tree_node([]),key = 0) == None\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7]),key = 0), tree_node([5, 3, 6, 2, 4, None, 7]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7]),key = 2), tree_node([5, 3, 6, None, 4, None, 7]))\n assert is_same_tree(candidate(root = tree_node([2, 1, 3]),key = 2), tree_node([3, 1]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, None, 40, 60, 80]),key = 50), tree_node([70, 60, 80, 30, None, None, None, None, 40]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7]),key = 4), tree_node([5, 3, 6, 2, None, None, 7]))\n assert candidate(root = tree_node([1]),key = 1) == None\n assert is_same_tree(candidate(root = tree_node([1, 2, None]),key = 2), tree_node([1, 2]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 8, 12, 16, 19, 21, 24, 27, 32]),key = 20), tree_node([25, 22, 30, 21, 24, 27, 32, 15, None, None, None, None, None, None, None, 10, 18, 8, 12, 16, 19]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 9), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 3), tree_node([10, 5, 15, None, 7, 12, 18]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 55), tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 3), tree_node([1, 2, 7, 4, 5, 14, 15, 8, 9, 10, 11, 6, None, None, None, None, None, None, None, None, None, None, None, 12, 13]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85, 5, 15, None, None, None, None, 32, 42, 47, None, 52, 62, 67, 72, 78, 82, 87, 90, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]),key = 40), tree_node([50, 30, 70, 20, 45, 60, 80, 10, 25, 32, 42, 55, 65, 75, 85, 5, 15, None, None, 35, None, None, None, 47, None, 52, 62, 67, 72, 78, 82, 87, 90]))\n assert is_same_tree(candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75]),key = 50), tree_node([40, 20, 60, 10, 30, 55, 70, 5, 15, 25, 35, 45, None, 65, 75]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 11), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 4), tree_node([7, 5, 8, 2, None, None, None, 1, 3, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 2), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, None, 27, None, None, None, None, None, 8]),key = 15), tree_node([25, 20, 35, 10, None, 30, 40, 5, 12, 27, None, None, None, None, None, 8]))\n assert is_same_tree(candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]),key = 12), tree_node([8, 4, 14, 2, 6, 13, 15, 1, 3, 5, 7, 10, None, None, None, 17, 19, None, None, None, None, None, None, 9, 11]))\n assert is_same_tree(candidate(root = tree_node([70, 30, 100, 20, 50, 80, 110, 10, 25, 40, 60, 75, 85, 105, 120, 5, 15, 22, 27, 35, 45, 55, 72, 78, 82, 87, 102, 108, 115, 125]),key = 70), tree_node([100, 80, 110, 75, 85, 105, 120, 78, 82, 87, 102, 108, 115, 125, None, 30, None, None, None, None, None, None, None, None, None, None, None, None, None, 20, 50, 10, 25, 40, 60, 5, 15, 22, 27, 35, 45, 55, 72]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 16, 19]),key = 10), tree_node([15, 12, 18, 11, 13, 16, 19, 5, None, None, None, None, None, None, None, 3, 7, 1, None, 6, 8]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 7), tree_node([4, 2, 8, 1, 3, 5, None, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 1), tree_node([4, 2, 7, 10, 3, 5, 8, 9]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),key = 15), tree_node([10, 5, 18, 3, 7]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, None, None, 6, 8, None, None, None, None, 16, 25]),key = 7), tree_node([10, 5, 15, 2, 8, None, 20, None, None, 16, 25, None, None, 6]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 25), tree_node([20, 15, 30, 10, 17, 27, 35, 5, 12, 16, 18, 26, 32, 34, None, 3, 8, None, None, None, None, None, 19, 22, None, None, None, 28, 31, None, None, None, 9, 11, None, 21, 23, None, None, None, None, 33, 36, None, None, None, None, None, 24, None, None, None, None, None, 14]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8]),key = 5), tree_node([10, 7, 15, 6, 8, None, 18, 3, None, None, None, None, None, 1]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, None, None, 9, 20]),key = 15), tree_node([7, 3, 20, None, None, 9]))\n assert is_same_tree(candidate(root = tree_node([1, 0, 2, 0, 1]),key = 0), tree_node([1, 1, 2, 0]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 9), tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 12, 3, 7, 10, 15, 2, 4, 6, 9, 11, 13, 14, 17, 1, None, None, None, None, None, None, None, None, None, None, 16, 18]),key = 10), tree_node([8, 5, 12, 3, 7, 13, 15, 2, 4, 6, 9, 11, 16, 14, 17, 1, None, None, None, None, None, None, None, None, None, None, None, 18]))\n assert is_same_tree(candidate(root = tree_node([3, 2, 4, 1, None, None, 5]),key = 4), tree_node([3, 2, 5, 1]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 15), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 4), tree_node([5, 3, 7, 2, None, 6, 8]))\n assert is_same_tree(candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 48, None, None, None, None, None, None, None, None, None, None, None, 33, 42]),key = 15), tree_node([30, 20, 45, 18, 25, 40, 50, 10, None, None, None, 35, 48, None, None, 5, 12, None, 33, 42]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),key = 12), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 85), tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, None, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 3), tree_node([4, 2, 7, 1, None, 5, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 8), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 5), tree_node([20, 15, 25, 10, 17, 22, 30, 8, 12, 16, 18, 21, 23, 27, 35, 3, 9, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, 33, 36, 11, None, None, 14, None, None, None, None, 28, 31]))\n assert is_same_tree(candidate(root = tree_node([30, 10, 40, 5, 15, 35, 50, 1, 7, None, 18, 32, 45, 55, 60, None, None, None, None, 8, None, None, 23, 27, None, None, None, 42, 48, None, None, None, 53, None, 57, None, 62]),key = 30), tree_node([40, 35, 50, 32, 45, 55, 60, 10, 23, 27, None, None, None, 42, 48, 5, 15, None, 53, None, 57, None, 62, None, None, 1, 7, None, 18, None, None, None, None, None, None, None, None, None, None, 8]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 12, 17, 22, 27, 32, 37, 1, 4, 6, 8, 11, 13, 16, 18, 21, 23, 26, 28, 31, 33, 36, 38, 39]),key = 20), tree_node([30, 25, 35, 22, 27, 32, 37, 21, 23, 26, 28, 31, 33, 36, 38, 10, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 5, 15, 3, 7, 12, 17, 1, 4, 6, 8, 11, 13, 16, 18, 39]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5]),key = 3), tree_node([1, None, 2, None, 4, None, 5]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 65), tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 50), tree_node([70, 60, 80, 65, None, None, 85, 30, None, None, None, 20, 40, 10, None, None, 55, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 8), tree_node([4, 2, 7, 1, 3, 5, None, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 13), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, None, 5, 9, 12, None, 7, None, None, None, 11, 13]),key = 8), tree_node([10, 9, 12, 3, None, None, 11, None, 5, None, None, None, 7, 13]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18]),key = 5), tree_node([10, 7, 15, 3, None, None, 18]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 5), tree_node([7, 6, 8, 3, None, None, None, 2, 4]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 2), tree_node([4, 3, 7, 1, None, 5, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 2), tree_node([5, 3, 7, None, 4, 6, 8]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6]),key = 5), tree_node([10, 7, 15, 6, None, 13, 18, 3, None, None, None, None, None, 1]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, None, 75, None, 200, None, 125, 175, 250]),key = 150), tree_node([100, 50, 200, None, 75, 175, 250, None, 125]))\n assert is_same_tree(candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, None, 18, 25, 35, 48, None, None, None, None, 19]),key = 20), tree_node([30, 15, 45, 10, 25, 40, 50, 5, None, 18, None, 35, 48, None, None, None, None, 19]))\n assert is_same_tree(candidate(root = tree_node([30, 20, 40, 15, 25, 35, 45, 10, None, None, 22, 32, 37, 42, 47, 5, None, None, None, None, 18, None, 24, 27, None, None, None, None, None, None, None, None, None, None, None]),key = 20), tree_node([30, 25, 40, 15, 22, 35, 45, 10, None, None, None, 32, 37, 42, 47, 5, None, None, 18, None, 24, 27]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85]),key = 30), tree_node([50, 40, 70, 35, 45, 60, 80, 20, None, None, None, 55, 65, 75, 85, 10, 25]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, None, 14, None, None, 2]),key = 100), tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, None, 14, None, None, 2]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, None, None, 3.5, 4.5]),key = 3), tree_node([5, 4, 6, 3.5, 4.5, None, 7, 2]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 4), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),key = 5), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5]),key = 4), tree_node([1, 2, None, 3, None, 4, None, 5]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 5), tree_node([4, 2, 7, 1, 3, None, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 20), tree_node([25, 22, 30, 21, 23, 27, 35, 15, None, None, 24, 26, 32, 34, None, 10, 17, None, 14, None, None, None, None, 28, 31, 5, 12, 16, 18, None, None, None, None, None, None, 3, 8, None, None, None, None, None, 19, None, None, None, 9, 11, None, 33, 36]))\n assert is_same_tree(candidate(root = tree_node([15, 10, 20, 8, 12, 17, 25, 5, 9, 11, 13, 16, 18, 22, 27, 3, 7, None, None, None, None, 14, None, 19, 21, 23, 26, 28, None, None, None, None, None, None, None, None]),key = 15), tree_node([20, 17, 25, 16, 18, 22, 27, 19, 21, 23, 26, 28, None, None, None, 10, None, None, None, None, None, None, None, None, None, 8, 12, 5, 9, 11, 13, 3, 7, None, None, None, None, 14]))\n assert is_same_tree(candidate(root = tree_node([15, 10, 20, 8, 12, 17, 25, 6, 9, 11, 13, 16, 18, 22, 28]),key = 15), tree_node([20, 17, 25, 16, 18, 22, 28, 10, None, None, None, None, None, None, None, 8, 12, 6, 9, 11, 13]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]),key = 10), tree_node([4, 2, 7, 1, 3, 5, 8, 9, 10]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, None, 17, None, None, None, None, 1, None]),key = 15), tree_node([20, 18, 25, 10, 17, 22, 30, 5, 12, None, None, None, None, None, None, 1]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 8, 2, 4, 7, 9, None, 10, None, None, None, None, 6]),key = 3), tree_node([5, 4, 8, 2, None, 7, 9, None, 10, None, None, 6]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 30), tree_node([20, 15, 25, 10, 17, 22, 35, 5, 12, 16, 18, 21, 23, 34, None, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 28, 31, None, None, None, 9, 11, None, None, 14, 27, None, None, None, 33, 36, None, None, None, None, 26, 32]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 7), tree_node([10, 5, 15, 3, None, 12, 18]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 17, 19]),key = 10), tree_node([15, 12, 18, 11, 13, 17, 19, 5, None, None, None, None, None, None, None, 3, 7, 1, None, 6, 8]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 6), tree_node([5, 3, 7, 2, 4, None, 8]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 12), tree_node([10, 5, 15, 3, 7, None, 18]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 130, 160, 180]),key = 100), tree_node([150, 125, 175, 110, 130, 160, 180, 50, None, None, None, None, None, None, None, 25, 75, 10, 30, 60, 80]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, 4, 6, 8, 11, 13, 16, 19]),key = 5), tree_node([10, 7, 15, 6, 8, 12, 18, 3, None, None, None, 11, 13, 16, 19, 1, 4]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 17, 19]),key = 7), tree_node([10, 5, 15, 3, 8, 12, 18, 1, None, 6, None, 11, 13, 17, 19]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7]),key = 4), tree_node([6, 5, 7, 2, None, None, None, 1, 3]))\n assert is_same_tree(candidate(root = tree_node([5, 4, None, 3, None, 2, None, 1]),key = 5), tree_node([4, 3, None, 2, None, 1]))\n assert is_same_tree(candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]),key = 1), tree_node([2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 1), tree_node([3, 6, 7, 12, 13, 14, 15, 2, None, None, None, None, None, None, None, 4, 5, 8, 9, 10, 11]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 2, 7, None, 18, None, None, 6, 8]),key = 5), tree_node([10, 7, 15, 6, 8, None, 18, 2]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 85, 115, 140, 160, 185, None, None, None, None, 28, None, 55, 90, None, 105, 110, 130, 135, None, None, None, None, None, None, None, None, 190, None, 195]),key = 100), tree_node([150, 125, 175, 115, 140, 160, 185, 50, 105, 110, 130, 135, None, None, None, 25, 75, None, 195, None, None, None, None, None, None, 10, 35, 60, 85, None, None, None, None, None, None, 28, None, 55, 90, None, None, None, None, None, 190]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 17, 19]),key = 15), tree_node([10, 5, 18, 3, 7, 17, 19, 1, None, 6, 8, 12, None, None, None, None, None, None, None, None, None, 11, 13]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 15), tree_node([10, 5, 18, 3, 7, 12]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 15, 25, 35, 45, 55, 65, 75, 85]),key = 60), tree_node([50, 30, 70, 20, 40, 65, 80, 15, 25, 35, 45, 55, None, 75, 85]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13, None, None]),key = 10), tree_node([8, 3, 14, 1, 6, 13, None, None, None, 4, 7]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 11), tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]))\n assert is_same_tree(candidate(root = tree_node([4, 2, 7, 1, 3, 6, 9, None, None, None, None, None, 8]),key = 6), tree_node([4, 2, 7, 1, 3, 8, 9]))\n assert is_same_tree(candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 48, 3, 7, None, 13, 17, None, 23, None, 33, 43, 47, None, 52]),key = 30), tree_node([45, 40, 50, 35, 48, 3, 7, 47, None, 52, None, None, None, None, None, 15, None, None, None, 10, 20, 5, 12, 18, 25, None, 13, 17, None, 23, None, 33, 43]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, 17, 19, 21, 24, 28, 35]),key = 20), tree_node([25, 22, 30, 21, 24, 28, 35, 15, None, None, None, None, None, None, None, 10, 18, 5, 12, 17, 19]))\n assert is_same_tree(candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75]),key = 20), tree_node([40, 30, 60, 25, 35, 50, 70, 10, None, None, None, 45, 55, 65, 75, 5, 15]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 10), tree_node([50, 30, 70, 20, 40, 60, 80, None, None, None, 55, 65, None, None, 85, None, 90]))\n assert is_same_tree(candidate(root = tree_node([25, 10, 30, 5, 15, 28, 35, 3, 7, 12, 18, None, 29, 32, 34, 36]),key = 30), tree_node([25, 10, 35, 5, 15, 32, 34, 3, 7, 12, 18, 28, None, None, None, 36, None, None, None, None, None, None, None, None, 29]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, 13, 18, 23, 17, 22, 21, 24, None, None, None, 16, None, None, None, None, None, None, None, 19]),key = 15), tree_node([7, 3, 20, None, None, 8, 13, 18, 23, 17, 22, 21, 24, None, None, None, 16, None, None, 9, None, None, None, None, 19]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 80), tree_node([50, 30, 70, 20, 40, 60, 85, 10, None, None, 55, 65, None, None, None, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 18), tree_node([10, 5, 15, 3, 7, 12]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 70), tree_node([50, 30, 80, 20, 40, 60, 85, 10, None, None, 55, 65, None, None, None, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18]),key = 10), tree_node([15, 12, 18, 5, None, None, None, 3, 7]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, None, 7, 12, 20, None, None, 6, 8]),key = 10), tree_node([15, 12, 20, 6, 8, None, None, 5, None, None, None, None, 7]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, None, 14, None, None, 2]),key = 10), tree_node([15, 12, 18, 11, 13, None, 14, 5, None, None, None, None, None, 3, 7, 1, None, 6, 8, None, None, 2]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 90), tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 6), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180]),key = 100), tree_node([150, 125, 175, 110, 140, 160, 180, 50, None, None, None, None, None, None, None, 25, 75, 10, 30, 60, 80]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, 1]),key = 3), tree_node([5, 4, 6, 2, None, None, 7, 1]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 12), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6]),key = 15), tree_node([10, 5, 18, 3, 7, 13, None, 1, None, 6]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, 10]),key = 15), tree_node([7, 3, 20, None, None, 8, 10, 9]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 8), tree_node([5, 3, 7, 2, 4, 6]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85]),key = 50), tree_node([70, 60, 80, 55, 65, 75, 85, 30, None, None, None, None, None, None, None, 20, 40, 10, 25, 35, 45]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 12, 18, 23, 28, 33, 37]),key = 10), tree_node([20, 15, 30, 12, 18, 25, 35, 5, None, None, None, 23, 28, 33, 37, 3, 7]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 7), tree_node([1, 2, 3, 4, 5, 6, 15, 8, 9, 10, 11, 12, 13, 14]))\n assert is_same_tree(candidate(root = tree_node([8, 5, 10, 2, 6, 9, 12, None, None, 3, 7, None, None, None, None, None, None]),key = 6), tree_node([8, 5, 10, 2, 7, 9, 12, None, None, 3]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 20), tree_node([50, 30, 70, 10, 40, 60, 80, None, None, None, 55, 65, None, None, 85, None, 90]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, None, None, 12, 17, None, None, None, None, None, None]),key = 10), tree_node([20, 15, 30, 12, 17, 25, 35, 5]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 10), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]),key = 40), tree_node([50, 30, 70, 20, 45, 60, 80, 10, 25, 35, None, 55, 65, 75, 85]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 17, 19]),key = 20), tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 8, 11, 13, 17, 19]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, 16, 18, 21, 23, 27, 35, 3, 8, None, None, None, None, None, 19, None, None, None, 24, 26, 32, 34, None, None, None, None, 9, 11, None, None, 14, None, None, None, None, 28, 31, 33, 36]),key = 15), tree_node([20, 17, 25, 16, 18, 22, 30, 10, None, None, 19, 21, 23, 27, 35, 5, 12, 11, None, None, None, None, 24, 26, 32, 34, None, 3, 8, None, None, None, None, None, 14, None, None, None, None, 28, 31, None, None, None, 9, None, None, None, None, None, None, 33, 36]))\n assert is_same_tree(candidate(root = tree_node([50, 20, 80, 15, 30, 70, 90, 10, 18, 25, 35, 60, 75, 85, 95]),key = 50), tree_node([80, 70, 90, 60, 75, 85, 95, 20, None, None, None, None, None, None, None, 15, 30, 10, 18, 25, 35]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 3), tree_node([5, 4, 7, 2, None, 6, 8]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 14), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]),key = 10), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 85, 110, 140, 160, 180]),key = 100), tree_node([150, 125, 175, 110, 140, 160, 180, 50, None, None, None, None, None, None, None, 25, 75, 10, 35, 60, 85]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 30), tree_node([50, 40, 70, 20, 55, 60, 80, 10, None, None, 90, 65, None, None, 85]))\n assert is_same_tree(candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75]),key = 30), tree_node([40, 20, 60, 10, 35, 50, 70, 5, 15, 25, None, 45, 55, 65, 75]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 40), tree_node([50, 30, 70, 20, 55, 60, 80, 10, None, None, 90, 65, None, None, 85]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 90]),key = 50), tree_node([70, 60, 80, 55, 65, 75, 90, 30, None, None, None, None, None, None, None, 20, 40, 10, 25, 35, 45]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, None, None, 3.5, None, None, 6.5]),key = 3), tree_node([5, 4, 6, 3.5, None, None, 7, 2, None, None, 6.5]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8]),key = 7), tree_node([5, 3, 8, 2, 4, 6]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, None, 55, 65, None, None, 85, None, None, None, 90]),key = 60), tree_node([50, 30, 70, 20, 40, 65, 80, 10, None, None, 55, None, None, None, 85, None, None, None, 90]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, None, None, 4, 5]),key = 2), tree_node([1, 2, 3, None, None, 4, 5]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]),key = 5), tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 23, 28, 33, 38, 1, None, 6, None, 11, 13, None, 17, 19, None, 22, 24, 27, 29, None, 32, 34, None, 37, 39]),key = 20), tree_node([30, 25, 35, 23, 28, 33, 38, 19, None, 22, 24, 27, 29, None, 32, 10, None, None, None, None, None, None, None, None, None, None, None, 5, 15, 2, 7, 12, 18, 1, None, 6, None, 11, 13, None, 17, 34, None, 37, 39]))\n"}, "metadata": {"canonical_parameter_names": ["root", "key"], "leetcode_dataset_entry_point": "Solution().deleteNode", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* deleteNode(TreeNode* root, int key) {", "container": "Solution", "callable": "deleteNode", "parameters": [{"name": "root", "type": "TreeNode*"}, {"name": "key", "type": "int"}], "return_type": "TreeNode*", "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.\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\n \nConstraints:\n\n1 <= s.length <= 5 * 105\ns consists of uppercase and lowercase English letters and digits.\n\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 = \"\") == \"\"\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 = \"!!!!!!@@@@@@########$$$$$$$&&&&&&&&&&(((((()))))))\") == \"&&&&&&&&&&########$$$$$$$)))))))!!!!!!@@@@@@((((((\"\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 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzAABBCCDDEEFFGGHHIİJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ\") == \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzAABBCCDDEEFFGGHHKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZIİJ\"\n assert candidate(s = \"thisisaverylongtestcasewithmixedcharacters1234567890!@#$%^&*()\") == \"tttttssssseeeeeiiiiaaaahhhrrrcccvylongwmxd1234567890!@#$%^&*()\"\n assert candidate(s = \"ZzYyXxWwVvUuTtSsRrQqPpOoNnMmLlKkJjIiHhGgFfEeDdCcBbAa1234567890\") == \"ZzYyXxWwVvUuTtSsRrQqPpOoNnMmLlKkJjIiHhGgFfEeDdCcBbAa1234567890\"\n assert candidate(s = \"abcABC123xyzXYZ!@#\") == \"abcABC123xyzXYZ!@#\"\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().frequencySort", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string frequencySort(string s) {", "container": "Solution", "callable": "frequencySort", "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] = [xstart, xend] denotes a balloon whose horizontal diameter stretches between xstart and xend. You do not know the exact y-coordinates of the balloons.\nArrows can be shot up directly vertically (in the positive y-direction) from different points along the x-axis. A balloon with xstart and xend is burst by an arrow shot at x if xstart <= x <= xend. 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.\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\n \nConstraints:\n\n1 <= points.length <= 105\npoints[i].length == 2\n-231 <= xstart < xend <= 231 - 1\n\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 = [[1, 9], [2, 8], [3, 7], [4, 6], [5, 5]]) == 1\n assert candidate(points = [[-2147483646, -2147483645], [2147483646, 2147483647]]) == 2\n assert candidate(points = [[-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1], [0, 0]]) == 1\n assert candidate(points = [[-1000000000, 1000000000], [-999999999, 999999999], [-999999998, 999999998], [1, 2], [2, 3], [3, 4]]) == 2\n assert candidate(points = [[-1, -1], [-1, 0], [0, 0], [0, 1], [1, 1]]) == 3\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, 1000], [100, 900], [200, 800], [300, 700], [400, 600], [500, 500]]) == 1\n assert candidate(points = [[-100, 100], [-90, 90], [-80, 80], [-70, 70], [-60, 60], [-50, 50], [-40, 40], [-30, 30], [-20, 20], [-10, 10], [0, 0]]) == 1\n assert candidate(points = [[-100000, 100000], [-50000, 50000], [-25000, 25000], [0, 0]]) == 1\n assert candidate(points = [[1, 2], [2, 5], [5, 7], [6, 10], [10, 15], [15, 20]]) == 3\n assert candidate(points = [[-10, 10], [-5, 5], [0, 0], [5, 15], [10, 20], [15, 25], [20, 30]]) == 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, 1], [0, 0], [1, 2], [2, 3], [3, 4], [4, 5]]) == 3\n assert candidate(points = [[-1000000000, 1000000000], [-500000000, 500000000], [0, 0], [500000000, 1000000000], [-1000000000, 500000000], [0, 1000000000], [-500000000, 0]]) == 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 = [[-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == 6\n assert candidate(points = [[10, 20], [10, 15], [10, 10], [15, 20], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50]]) == 4\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 = [[-10, 10], [-5, 5], [0, 0], [1, 3], [-1, 1], [2, 4], [-3, -1]]) == 3\n assert candidate(points = [[-1, 1], [-2, 2], [-3, 3], [0, 0], [1, 1], [2, 2], [3, 3]]) == 4\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 = [[-2147483646, -2147483645], [2147483645, 2147483646], [-2147483647, -2147483646], [2147483647, 2147483648]]) == 3\n assert candidate(points = [[-500, 500], [-400, 400], [-300, 300], [-200, 200], [-100, 100], [0, 0]]) == 1\n assert candidate(points = [[-10, 10], [-9, 9], [-8, 8], [-7, 7], [-6, 6], [-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1], [0, 0]]) == 1\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, 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]]) == 7\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 = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1]]) == 5\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 = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 1\n assert candidate(points = [[1, 1], [1, 2], [2, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 4\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, -5], [0, 0], [5, 10], [15, 20], [25, 30], [35, 40]]) == 6\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"}, "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().findMinArrowShots", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMinArrowShots(vector>& points) {", "container": "Solution", "callable": "findMinArrowShots", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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.\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\n \nConstraints:\n\nn == nums.length\n1 <= nums.length <= 105\n-109 <= nums[i] <= 109\nThe answer is guaranteed to fit in a 32-bit integer.\n\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 = [1000000000, -1000000000, 0]) == 3000000000\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, 1000000000, 2, 999999999, 3, 999999998]) == 2999999997\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 = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000]) == 45000000000\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 assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1]) == 8999999991\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().minMoves", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minMoves(vector& nums) {", "container": "Solution", "callable": "minMoves", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\n0 <= i, j, k, l < n\nnums1[i] + nums2[j] + nums3[k] + nums4[l] == 0\n\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\n \nConstraints:\n\nn == nums1.length\nn == nums2.length\nn == nums3.length\nn == nums4.length\n1 <= n <= 200\n-228 <= nums1[i], nums2[i], nums3[i], nums4[i] <= 228\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [100000000, 200000000],nums2 = [-300000000, -400000000],nums3 = [500000000, 600000000],nums4 = [-700000000, -800000000]) == 0\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"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2", "nums3", "nums4"], "leetcode_dataset_entry_point": "Solution().fourSumCount", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int fourSumCount(vector& nums1, vector& nums2, vector& nums3, vector& nums4) {", "container": "Solution", "callable": "fourSumCount", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "nums3", "type": "vector&"}, {"name": "nums4", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= g.length <= 3 * 104\n0 <= s.length <= 3 * 104\n1 <= g[i], s[j] <= 231 - 1\n\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 = [],s = [1, 2, 3, 4, 5]) == 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 = [],s = [1, 2, 3]) == 0\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, 3, 4, 5, 6, 7, 8, 9, 10],s = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000]) == 5\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 = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000],s = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000]) == 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 = [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 = [],s = [1, 2, 3, 4, 5]) == 0\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"}, "metadata": {"canonical_parameter_names": ["g", "s"], "leetcode_dataset_entry_point": "Solution().findContentChildren", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findContentChildren(vector& g, vector& s) {", "container": "Solution", "callable": "findContentChildren", "parameters": [{"name": "g", "type": "vector&"}, {"name": "s", "type": "vector&"}], "return_type": "int", "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].\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\n \nConstraints:\n\nn == nums.length\n1 <= n <= 2 * 105\n-109 <= nums[i] <= 109\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().find132pattern", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool find132pattern(vector& nums) {", "container": "Solution", "callable": "find132pattern", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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\nIf nums[i] is positive, move nums[i] steps forward, and\nIf nums[i] is negative, move 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.\nA cycle in the array consists of a sequence of indices seq of length k where:\n\nFollowing the movement rules above results in the repeating index sequence seq[0] -> seq[1] -> ... -> seq[k - 1] -> seq[0] -> ...\nEvery nums[seq[j]] is either all positive or all negative.\nk > 1\n\nReturn true if there is a cycle in nums, or false otherwise.\n \nExample 1:\n\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\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\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\n \nConstraints:\n\n1 <= nums.length <= 5000\n-1000 <= nums[i] <= 1000\nnums[i] != 0\n\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, 4, 2, 0, 6, 3]) == True\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 = [0, 1, 1, 4, -1, 2, -1, -3, -2, 4, -5, 5, 6, 7, -7, 8, 9, 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, -40, 41, -41, 42, -42, 43, -43, 44, -44, 45, -45, 46, -46, 47, -47, 48, -48, 49, -49, 50, -50]) == 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 = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5]) == False\n assert candidate(nums = [3, 1, 2, -2, 4, 2]) == True\n assert candidate(nums = [3, 1, 2, 4, 0, 2, -1, -3, -1]) == False\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 = [-2, -3, -4, 0, -1, -6]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, -1, -1, -1, -1, -1]) == False\n"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().circularArrayLoop", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool circularArrayLoop(vector& nums) {", "container": "Solution", "callable": "circularArrayLoop", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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.\nYou can feed the pigs according to these steps:\n\nChoose some live pigs to feed.\nFor 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.\nWait for minutesToDie minutes. You may not feed any other pigs during this time.\nAfter minutesToDie minutes have passed, any pigs that have been fed the poisonous bucket will die, and all others will survive.\nRepeat 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\n \nConstraints:\n\n1 <= buckets <= 1000\n1 <= minutesToDie <= minutesToTest <= 100\n\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 = 1024,minutesToDie = 1,minutesToTest = 10) == 3\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 = 3125,minutesToDie = 5,minutesToTest = 20) == 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 = 1296,minutesToDie = 6,minutesToTest = 18) == 6\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 = 125,minutesToDie = 25,minutesToTest = 125) == 3\n assert candidate(buckets = 450,minutesToDie = 12,minutesToTest = 60) == 4\n assert candidate(buckets = 441,minutesToDie = 20,minutesToTest = 60) == 5\n assert candidate(buckets = 3125,minutesToDie = 15,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 = 1024,minutesToDie = 4,minutesToTest = 12) == 5\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 = 1024,minutesToDie = 10,minutesToTest = 40) == 5\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 = 1024,minutesToDie = 8,minutesToTest = 32) == 5\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 = 3125,minutesToDie = 4,minutesToTest = 20) == 5\n assert candidate(buckets = 200,minutesToDie = 4,minutesToTest = 20) == 3\n"}, "metadata": {"canonical_parameter_names": ["buckets", "minutesToDie", "minutesToTest"], "leetcode_dataset_entry_point": "Solution().poorPigs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int poorPigs(int buckets, int minutesToDie, int minutesToTest) {", "container": "Solution", "callable": "poorPigs", "parameters": [{"name": "buckets", "type": "int"}, {"name": "minutesToDie", "type": "int"}, {"name": "minutesToTest", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= s.length <= 104\ns consists of lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().repeatedSubstringPattern", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool repeatedSubstringPattern(string s) {", "container": "Solution", "callable": "repeatedSubstringPattern", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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.\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\n \nConstraints:\n\n0 <= x, y <= 231 - 1\n\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 = 18446744073709551615,y = 9223372036854775807) == 1\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 = 4294967295,y = 2147483647) == 1\n assert candidate(x = 1357924680,y = 2468135790) == 15\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 = 4294967295,y = 1) == 31\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 = 4294967295,y = 0) == 32\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"}, "metadata": {"canonical_parameter_names": ["x", "y"], "leetcode_dataset_entry_point": "Solution().hammingDistance", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int hammingDistance(int x, int y) {", "container": "Solution", "callable": "hammingDistance", "parameters": [{"name": "x", "type": "int"}, {"name": "y", "type": "int"}], "return_type": "int", "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.\nIn one move, you can increment or decrement an element of the array by 1.\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\n \nConstraints:\n\nn == nums.length\n1 <= nums.length <= 105\n-109 <= nums[i] <= 109\n\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 = [1000000000, -1000000000, 0, 500000000, -500000000]) == 3000000000\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]) == 10\n assert candidate(nums = [-1000000000, -2000000000, -3000000000, -4000000000, -5000000000, -6000000000, -7000000000, -8000000000, -9000000000, -10000000000]) == 25000000000\n assert candidate(nums = [1, 1000000000, 2, 999999999, 3, 999999998, 4, 999999997, 5]) == 3999999984\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 = [1000000000, -1000000000, 500000000, -500000000]) == 3000000000\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 = [1000000000, -1000000000, 2000000000, -2000000000]) == 6000000000\n assert candidate(nums = [1000000000, 2000000000, 3000000000, 4000000000, 5000000000, 6000000000, 7000000000, 8000000000, 9000000000, 10000000000]) == 25000000000\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().minMoves2", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int minMoves2(vector& nums) {", "container": "Solution", "callable": "minMoves2", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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).\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\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\n \nConstraints:\n\nrow == grid.length\ncol == grid[i].length\n1 <= row, col <= 100\ngrid[i][j] is 0 or 1.\nThere is exactly one island in grid.\n\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"}, "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().islandPerimeter", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int islandPerimeter(vector>& grid) {", "container": "Solution", "callable": "islandPerimeter", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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.\nWhat if we change the game so that players cannot re-use integers?\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.\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\n \nConstraints:\n\n1 <= maxChoosableInteger <= 20\n0 <= desiredTotal <= 300\n\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"}, "metadata": {"canonical_parameter_names": ["maxChoosableInteger", "desiredTotal"], "leetcode_dataset_entry_point": "Solution().canIWin", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool canIWin(int maxChoosableInteger, int desiredTotal) {", "container": "Solution", "callable": "canIWin", "parameters": [{"name": "maxChoosableInteger", "type": "int"}, {"name": "desiredTotal", "type": "int"}], "return_type": "bool", "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\nFor 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\nFor 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].\nReturn the maximum integer m such that str = [str2, m] can be obtained from str1.\n \nExample 1:\nInput: s1 = \"acb\", n1 = 4, s2 = \"ab\", n2 = 2\nOutput: 2\nExample 2:\nInput: s1 = \"acb\", n1 = 1, s2 = \"acb\", n2 = 1\nOutput: 1\n\n \nConstraints:\n\n1 <= s1.length, s2.length <= 100\ns1 and s2 consist of lowercase English letters.\n1 <= n1, n2 <= 106\n\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"}, "metadata": {"canonical_parameter_names": ["s1", "n1", "s2", "n2"], "leetcode_dataset_entry_point": "Solution().getMaxRepetitions", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int getMaxRepetitions(string s1, int n1, string s2, int n2) {", "container": "Solution", "callable": "getMaxRepetitions", "parameters": [{"name": "s1", "type": "string"}, {"name": "n1", "type": "int"}, {"name": "s2", "type": "string"}, {"name": "n2", "type": "int"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= s.length <= 105\ns consists of lowercase English letters.\n\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().findSubstringInWraproundString", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findSubstringInWraproundString(string s) {", "container": "Solution", "callable": "findSubstringInWraproundString", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\nA valid IPv4 address is an IP in the form \"x1.x2.x3.x4\" where 0 <= xi <= 255 and xi 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.\nA valid IPv6 address is an IP in the form \"x1:x2:x3:x4:x5:x6:x7:x8\" where:\n\n1 <= xi.length <= 4\nxi is a hexadecimal string which may contain digits, lowercase English letter ('a' to 'f') and upper-case English letters ('A' to 'F').\nLeading zeros are allowed in xi.\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\n \nConstraints:\n\nqueryIP consists only of English letters, digits and the characters '.' and ':'.\n\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 = \"1.2.3. 4\") == \"Neither\"\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 = \"192.168@1.1\") == \"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 = \"192.168.1.-1\") == \"Neither\"\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 = \"1.2.3.-1\") == \"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 = \"192.168.-1.1\") == \"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 = \"-1.192.168.1\") == \"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 = \"192.-1.168.1\") == \"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"}, "metadata": {"canonical_parameter_names": ["queryIP"], "leetcode_dataset_entry_point": "Solution().validIPAddress", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string validIPAddress(string queryIP) {", "container": "Solution", "callable": "validIPAddress", "parameters": [{"name": "queryIP", "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.\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\".\nExample 2:\n\nInput: words = [\"cat\",\"dog\",\"catdog\"]\nOutput: [\"catdog\"]\n\n \nConstraints:\n\n1 <= words.length <= 104\n1 <= words[i].length <= 30\nwords[i] consists of only lowercase English letters.\nAll the strings of words are unique.\n1 <= sum(words[i].length) <= 105\n\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 = ['repetition', 'reprepetition', 'prepetition', 'rep', 'pre', 'replication', 'prepresentation', 'replicationrepetition', 'repetitionreplicationrepetition']) == ['reprepetition', 'replicationrepetition', 'repetitionreplicationrepetition']\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 = ['sun', 'moon', 'star', 'sunnymoon', 'moonstar', 'star', 'sunmoonstar', 'moonmoonsun']) == ['star', 'moonstar', 'sunmoonstar', 'moonmoonsun']\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"}, "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().findAllConcatenatedWordsInADict", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findAllConcatenatedWordsInADict(vector& words) {", "container": "Solution", "callable": "findAllConcatenatedWordsInADict", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector", "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 ith 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.\nReturn true if you can make this square and false otherwise.\n \nExample 1:\n\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\n \nConstraints:\n\n1 <= matchsticks.length <= 15\n1 <= matchsticks[i] <= 108\n\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, 15, 16, 17, 18, 19, 20]) == 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, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 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 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == True\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"}, "metadata": {"canonical_parameter_names": ["matchsticks"], "leetcode_dataset_entry_point": "Solution().makesquare", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool makesquare(vector& matchsticks) {", "container": "Solution", "callable": "makesquare", "parameters": [{"name": "matchsticks", "type": "vector&"}], "return_type": "bool", "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.\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.\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\n \nConstraints:\n\n1 <= strs.length <= 600\n1 <= strs[i].length <= 100\nstrs[i] consists only of digits '0' and '1'.\n1 <= m, n <= 100\n\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 = ['0', '0', '0', '0'],m = 0,n = 4) == 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 = ['0', '0', '0', '0'],m = 0,n = 0) == 0\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"}, "metadata": {"canonical_parameter_names": ["strs", "m", "n"], "leetcode_dataset_entry_point": "Solution().findMaxForm", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMaxForm(vector& strs, int m, int n) {", "container": "Solution", "callable": "findMaxForm", "parameters": [{"name": "strs", "type": "vector&"}, {"name": "m", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "int", "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.\nEvery house can be warmed, as long as the house is within the heater's warm radius range. \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.\nNotice that all the heaters follow your radius standard, and the warm radius will 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\n \nConstraints:\n\n1 <= houses.length, heaters.length <= 3 * 104\n1 <= houses[i], heaters[i] <= 109\n\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, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000],heaters = [50, 500, 5000, 50000, 500000, 5000000, 50000000, 500000000, 1500000000]) == 500000000\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"}, "metadata": {"canonical_parameter_names": ["houses", "heaters"], "leetcode_dataset_entry_point": "Solution().findRadius", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findRadius(vector& houses, vector& heaters) {", "container": "Solution", "callable": "findRadius", "parameters": [{"name": "houses", "type": "vector&"}, {"name": "heaters", "type": "vector&"}], "return_type": "int", "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\nFor 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\n \nConstraints:\n\n1 <= num < 231\n\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 = 4294967295) == 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 = 4294967294) == 1\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"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().findComplement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findComplement(int num) {", "container": "Solution", "callable": "findComplement", "parameters": [{"name": "num", "type": "int"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 104\n0 <= nums[i] <= 109\nThe answer for the given input will fit in a 32-bit integer.\n\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 = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005]) == 25\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 = [67305985, 134611970, 269223940, 538447880, 1076895760, 2153791520]) == 140\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) == 156\n assert candidate(nums = [123456789, 987654321, 1122334455, 5566778899, 9988776655]) == 154\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 = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643]) == 16\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 = [2147483647, 2147483646, 2147483645, 2147483644]) == 8\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 = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642, 2147483641, 2147483640, 2147483639, 2147483638]) == 89\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 = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642, 2147483641, 2147483640]) == 48\n assert candidate(nums = [536870911, 536870910, 536870909, 536870908, 536870907, 536870906]) == 25\n assert candidate(nums = [123456789, 987654321, 1122334455, 5544332211, 1357924680, 2468013579]) == 239\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 = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642]) == 25\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 = [8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823]) == 84\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 = [7, 77, 777, 7777, 77777, 777777, 7777777, 77777777, 777777777, 7777777777]) == 557\n assert candidate(nums = [1073741823, 536870911, 268435455, 134217727, 67108863, 33554431, 16777215, 8388607, 4194303, 2097151, 1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 4495\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 = [123456789, 987654321, 1122334455, 5566778899, 9988776655, 4433221100]) == 248\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 = [1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006, 1000000007, 1000000008]) == 55\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 = [123456789, 987654321, 234567891, 1234567890, 9876543210]) == 158\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().totalHammingDistance", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int totalHammingDistance(vector& nums) {", "container": "Solution", "callable": "totalHammingDistance", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 479, "task_id": "largest-palindrome-product", "difficulty": "Hard", "problem_description": "Given an integer n, return the largest palindromic integer that can be represented as the product of two n-digits integers. Since the answer can be very large, return it modulo 1337.\n \nExample 1:\n\nInput: n = 2\nOutput: 987\nExplanation: 99 x 91 = 9009, 9009 % 1337 = 987\n\nExample 2:\n\nInput: n = 1\nOutput: 9\n\n \nConstraints:\n\n1 <= n <= 8\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == 475\n assert candidate(n = 3) == 123\n assert candidate(n = 4) == 597\n assert candidate(n = 6) == 1218\n assert candidate(n = 2) == 987\n assert candidate(n = 1) == 9\n assert candidate(n = 7) == 877\n assert candidate(n = 5) == 677\n"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().largestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int largestPalindrome(int n) {", "container": "Solution", "callable": "largestPalindrome", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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\nFor examples, if arr = [2,3,4], the median is 3.\nFor 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.\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\n \nConstraints:\n\n1 <= k <= nums.length <= 105\n-231 <= nums[i] <= 231 - 1\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 candidate(nums = [1, 2, 3, 4, 2, 3, 1, 4, 2],k = 3) == [2, 3, 3, 3, 2, 3, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 5) == [3, 4, 5, 6, 7]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 3) == [-2, -3, -4, -5, -6, -7, -8, -9]\n assert candidate(nums = [1, 2, 3],k = 2) == [1.5, 2.5]\n assert candidate(nums = [1, 4, 2, 3],k = 4) == [2.5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == [3, 4, 5, 6, 7, 8]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 5) == [5, 7, 9, 11, 13, 15]\n assert candidate(nums = [1, 2, 3, 4, 5],k = 2) == [1.5, 2.5, 3.5, 4.5]\n assert candidate(nums = [1, 3, 5],k = 1) == [1, 3, 5]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1],k = 1) == [1]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15],k = 8) == [8.0]\n assert candidate(nums = [5, 4, 3, 2, 1],k = 4) == [3.5, 2.5]\n assert 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 candidate(nums = [1, 2],k = 2) == [1.5]\n assert 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 candidate(nums = [1, 3, -1, -3, 5, 3, 6, 7],k = 3) == [1, -1, -1, 3, 5, 6]\n assert 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 candidate(nums = [1, 2, 2, 2, 2, 2, 3],k = 3) == [2, 2, 2, 2, 2]\n assert 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 candidate(nums = [1, 3, 3, 3, 2, 2, 1, 1, 1, 1],k = 5) == [3, 3, 2, 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, 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 3) == [1000000000, 1000000000, 1000000000]\n assert candidate(nums = [-1, -100, 2, -3, 5, 3, 6, 7, 100, 0],k = 5) == [-1, 2, 3, 5, 6, 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, 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 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 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 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 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 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 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 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 candidate(nums = [2147483647, -2147483648, 1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000],k = 3) == [1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000]\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 = 15) == [8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 8, 8, 8]\n assert 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 candidate(nums = [1, 3, 3, 3, 2, 2, 2, 4, 4, 5],k = 3) == [3, 3, 3, 2, 2, 2, 4, 4]\n assert 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1, 1]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 5) == [7, 6, 5, 4, 3, 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],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 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 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 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 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 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 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 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 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 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 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 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 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 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 candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 5) == [30, 40, 50, 60, 70, 80]\n assert 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 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 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 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 candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005],k = 3) == [1000000001, 1000000002, 1000000003, 1000000004]\n assert 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 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 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 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 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 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 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 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 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 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 candidate(nums = [1000000000, -1000000000, 500000000, 250000000, -250000000],k = 3) == [500000000, 250000000, 250000000]\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991],k = 5) == [999999998, 999999997, 999999996, 999999995, 999999994, 999999993]\n assert candidate(nums = [1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000],k = 3) == [500000000, -500000000, 250000000, -250000000]\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 = [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 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 candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 5) == [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]\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) == [5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5]\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 3) == [20, 30, 40, 50, 60, 70, 80, 90]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == [1.0]\n assert 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 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 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 candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [8, 7, 6, 5, 4, 3]\n assert 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 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 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 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 candidate(nums = [5, 2, 9, 1, 5, 6],k = 2) == [3.5, 5.5, 5.0, 3.0, 5.5]\n assert candidate(nums = [1, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 5) == [3, 3, 3, 3, 3, 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, 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 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 candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000],k = 2) == [0.0, 0.0, 0.0, 0.0, 0.0]\n assert candidate(nums = [2147483647, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648],k = 3) == [2147483647, -2147483648, 2147483647, -2147483648]\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 = 3) == [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37]\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],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 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 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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().medianSlidingWindow", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector medianSlidingWindow(vector& nums, int k) {", "container": "Solution", "callable": "medianSlidingWindow", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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 rules:\n\nThe string s is magical because concatenating the number of contiguous occurrences of 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 the occurrences of 1's or 2's in each group are \"1 2 2 1 1 2 1 2 2 1 2 2 ......\". You can see that the occurrence sequence is s itself.\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\n \nConstraints:\n\n1 <= n <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().magicalString", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int magicalString(int n) {", "container": "Solution", "callable": "magicalString", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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.\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.\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\n \nConstraints:\n\n1 <= s.length <= 105\ns consists of English letters, digits, and dashes '-'.\n1 <= k <= 104\n\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 = \"\",k = 1) == \"\"\n assert candidate(s = \"\",k = 10) == \"\"\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"}, "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().licenseKeyFormatting", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string licenseKeyFormatting(string s, int k) {", "container": "Solution", "callable": "licenseKeyFormatting", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "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.\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\n \nConstraints:\n\nn is an integer in the range [3, 1018].\nn does not contain any leading zeros.\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().smallestGoodBase", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string smallestGoodBase(string n) {", "container": "Solution", "callable": "smallestGoodBase", "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\n \nConstraints:\n\n1 <= nums.length <= 105\nnums[i] is either 0 or 1.\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaxConsecutiveOnes", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMaxConsecutiveOnes(vector& nums) {", "container": "Solution", "callable": "findMaxConsecutiveOnes", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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. Two players are playing a game with this array: player 1 and player 2.\nPlayer 1 and player 2 take turns, with player 1 starting first. Both players start the game with a score of 0. At each turn, the player takes one of the numbers from either end of the array (i.e., nums[0] or nums[nums.length - 1]) which reduces the size of the array by 1. The player adds the chosen number to their score. The game ends when there are no more elements in the array.\nReturn true if Player 1 can win the game. If the scores of both players are equal, then player 1 is still the winner, and you should also return true. You may assume that both players are playing optimally.\n \nExample 1:\n\nInput: nums = [1,5,2]\nOutput: false\nExplanation: Initially, player 1 can choose between 1 and 2. \nIf he chooses 2 (or 1), then player 2 can choose from 1 (or 2) and 5. If player 2 chooses 5, then player 1 will be left with 1 (or 2). \nSo, final score of player 1 is 1 + 2 = 3, and player 2 is 5. \nHence, player 1 will never be the winner and you need to return false.\n\nExample 2:\n\nInput: nums = [1,5,233,7]\nOutput: true\nExplanation: Player 1 first chooses 1. Then player 2 has to choose between 5 and 7. No matter which number player 2 choose, player 1 can choose 233.\nFinally, player 1 has more score (234) than player 2 (12), so you need to return True representing player1 can win.\n\n \nConstraints:\n\n1 <= nums.length <= 20\n0 <= nums[i] <= 107\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().predictTheWinner", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool predictTheWinner(vector& nums) {", "container": "Solution", "callable": "predictTheWinner", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 488, "task_id": "zuma-game", "difficulty": "Hard", "problem_description": "You are playing a variation of the game Zuma.\nIn this variation of Zuma, there is a single row of colored balls on a board, where each ball can be colored red 'R', yellow 'Y', blue 'B', green 'G', or white 'W'. You also have several colored balls in your hand.\nYour goal is to clear all of the balls from the board. On each turn:\n\nPick any ball from your hand and insert it in between two balls in the row or on either end of the row.\nIf there is a group of three or more consecutive balls of the same color, remove the group of balls from the board.\n\t\nIf this removal causes more groups of three or more of the same color to form, then continue removing each group until there are none left.\n\n\nIf there are no more balls on the board, then you win the game.\nRepeat this process until you either win or do not have any more balls in your hand.\n\nGiven a string board, representing the row of balls on the board, and a string hand, representing the balls in your hand, return the minimum number of balls you have to insert to clear all the balls from the board. If you cannot clear all the balls from the board using the balls in your hand, return -1.\n \nExample 1:\n\nInput: board = \"WRRBBW\", hand = \"RB\"\nOutput: -1\nExplanation: It is impossible to clear all the balls. The best you can do is:\n- Insert 'R' so the board becomes WRRRBBW. WRRRBBW -> WBBW.\n- Insert 'B' so the board becomes WBBBW. WBBBW -> WW.\nThere are still balls remaining on the board, and you are out of balls to insert.\nExample 2:\n\nInput: board = \"WWRRBBWW\", hand = \"WRBRW\"\nOutput: 2\nExplanation: To make the board empty:\n- Insert 'R' so the board becomes WWRRRBBWW. WWRRRBBWW -> WWBBWW.\n- Insert 'B' so the board becomes WWBBBWW. WWBBBWW -> WWWW -> empty.\n2 balls from your hand were needed to clear the board.\n\nExample 3:\n\nInput: board = \"G\", hand = \"GGGGG\"\nOutput: 2\nExplanation: To make the board empty:\n- Insert 'G' so the board becomes GG.\n- Insert 'G' so the board becomes GGG. GGG -> empty.\n2 balls from your hand were needed to clear the board.\n\n \nConstraints:\n\n1 <= board.length <= 16\n1 <= hand.length <= 5\nboard and hand consist of the characters 'R', 'Y', 'B', 'G', and 'W'.\nThe initial row of balls on the board will not have any groups of three or more consecutive balls of the same color.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = \"RRYYGG\",hand = \"\") == -1\n"}, "metadata": {"canonical_parameter_names": ["board", "hand"], "leetcode_dataset_entry_point": "Solution().findMinStep", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMinStep(string board, string hand) {", "container": "Solution", "callable": "findMinStep", "parameters": [{"name": "board", "type": "string"}, {"name": "hand", "type": "string"}], "return_type": "int", "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\n \nConstraints:\n\n1 <= nums.length <= 15\n-100 <= nums[i] <= 100\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert 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 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 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 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 candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == [[10, 101], [10, 18], [9, 101], [9, 18], [2, 5, 7, 101], [2, 5, 7, 18], [2, 5, 7], [2, 5, 101], [2, 5, 18], [2, 5], [2, 3, 7, 101], [2, 3, 7, 18], [2, 3, 7], [2, 3, 101], [2, 3, 18], [2, 3], [2, 7, 101], [2, 7, 18], [2, 7], [2, 101], [2, 18], [5, 7, 101], [5, 7, 18], [5, 7], [5, 101], [5, 18], [3, 7, 101], [3, 7, 18], [3, 7], [3, 101], [3, 18], [7, 101], [7, 18]]\n assert 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 candidate(nums = [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, 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 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 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 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 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 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 candidate(nums = [5, 5, 5, 5]) == [[5, 5, 5, 5], [5, 5, 5], [5, 5]]\n assert 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 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 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 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 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 candidate(nums = [1, 1, 1, 1, 1]) == [[1, 1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1], [1, 1]]\n assert candidate(nums = [5, 5, 4, 4, 3, 3]) == [[5, 5], [4, 4], [3, 3]]\n assert candidate(nums = [3, 2, 1]) == []\n assert 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 candidate(nums = [7, 7, 7, 7]) == [[7, 7, 7, 7], [7, 7, 7], [7, 7]]\n assert candidate(nums = [1, 2, 3]) == [[1, 2, 3], [1, 2], [1, 3], [2, 3]]\n assert 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 candidate(nums = [4, 4, 3, 2, 1]) == [[4, 4]]\n assert 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 candidate(nums = [100, -100, 0, 0]) == [[-100, 0, 0], [-100, 0], [0, 0]]\n assert 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 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 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 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 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 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]]\n assert 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 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 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, -2, -3, -4, -5]) == []\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 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, 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 candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert 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 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 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 candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]) == []\n assert 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 = [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 candidate(nums = [5, 5, 5, 5, 5]) == [[5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == []\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, 10, 10], [-10, -10, -10, -10, -10, 10], [-10, -10, -10, -10, -10], [10, 10, 10, 10, 10], [-10, 10, 10, 10, 10], [-10, -10, 10, 10, 10], [-10, -10, -10, 10, 10], [-10, -10, -10, -10, 10], [-10, -10, -10, -10], [10, 10, 10, 10], [-10, 10, 10, 10], [-10, -10, 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 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 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 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 candidate(nums = [9, 8, 7, 7, 7, 6, 5, 4, 4, 3, 2, 1]) == [[7, 7, 7], [7, 7], [4, 4]]\n assert 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 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 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 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 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 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 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 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 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 candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == []\n assert 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 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 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 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 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 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 candidate(nums = [100, -100, 100, -100, 100]) == [[100, 100, 100], [-100, 100, 100], [-100, -100, 100], [-100, -100], [100, 100], [-100, 100]]\n assert 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 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 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 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 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 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 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]) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 9], [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, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 8], [1, 2, 3, 4, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 8], [1, 2, 3, 5, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 8], [1, 2, 3, 6, 7], [1, 2, 3, 6, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9, 9], [1, 2, 3, 10], [1, 2, 3, 9], [1, 2, 3, 8], [1, 2, 3, 7], [1, 2, 3, 6], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 8], [1, 2, 4, 5, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 8], [1, 2, 4, 6, 7], [1, 2, 4, 6, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9, 9], [1, 2, 4, 10], [1, 2, 4, 9], [1, 2, 4, 8], [1, 2, 4, 7], [1, 2, 4, 6], [1, 2, 4, 5], [1, 2, 4, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 8], [1, 2, 5, 6, 7], [1, 2, 5, 6, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9, 9], [1, 2, 5, 10], [1, 2, 5, 9], [1, 2, 5, 8], [1, 2, 5, 7], [1, 2, 5, 6], [1, 2, 5, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9, 9], [1, 2, 6, 10], [1, 2, 6, 9], [1, 2, 6, 8], [1, 2, 6, 7], [1, 2, 6, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9, 9], [1, 2, 7, 10], [1, 2, 7, 9], [1, 2, 7, 8], [1, 2, 7, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9, 9], [1, 2, 8, 10], [1, 2, 8, 9], [1, 2, 8, 8], [1, 2, 9, 10], [1, 2, 9, 9], [1, 2, 10], [1, 2, 9], [1, 2, 8], [1, 2, 7], [1, 2, 6], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 8], [1, 3, 4, 5, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 8], [1, 3, 4, 6, 7], [1, 3, 4, 6, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9, 9], [1, 3, 4, 10], [1, 3, 4, 9], [1, 3, 4, 8], [1, 3, 4, 7], [1, 3, 4, 6], [1, 3, 4, 5], [1, 3, 4, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 8], [1, 3, 5, 6, 7], [1, 3, 5, 6, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9, 9], [1, 3, 5, 10], [1, 3, 5, 9], [1, 3, 5, 8], [1, 3, 5, 7], [1, 3, 5, 6], [1, 3, 5, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9, 9], [1, 3, 6, 10], [1, 3, 6, 9], [1, 3, 6, 8], [1, 3, 6, 7], [1, 3, 6, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9, 9], [1, 3, 7, 10], [1, 3, 7, 9], [1, 3, 7, 8], [1, 3, 7, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9, 9], [1, 3, 8, 10], [1, 3, 8, 9], [1, 3, 8, 8], [1, 3, 9, 10], [1, 3, 9, 9], [1, 3, 10], [1, 3, 9], [1, 3, 8], [1, 3, 7], [1, 3, 6], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 8], [1, 4, 5, 6, 7], [1, 4, 5, 6, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9, 9], [1, 4, 5, 10], [1, 4, 5, 9], [1, 4, 5, 8], [1, 4, 5, 7], [1, 4, 5, 6], [1, 4, 5, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9, 9], [1, 4, 6, 10], [1, 4, 6, 9], [1, 4, 6, 8], [1, 4, 6, 7], [1, 4, 6, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9, 9], [1, 4, 7, 10], [1, 4, 7, 9], [1, 4, 7, 8], [1, 4, 7, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9, 9], [1, 4, 8, 10], [1, 4, 8, 9], [1, 4, 8, 8], [1, 4, 9, 10], [1, 4, 9, 9], [1, 4, 10], [1, 4, 9], [1, 4, 8], [1, 4, 7], [1, 4, 6], [1, 4, 5], [1, 4, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9, 9], [1, 5, 6, 10], [1, 5, 6, 9], [1, 5, 6, 8], [1, 5, 6, 7], [1, 5, 6, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9, 9], [1, 5, 7, 10], [1, 5, 7, 9], [1, 5, 7, 8], [1, 5, 7, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9, 9], [1, 5, 8, 10], [1, 5, 8, 9], [1, 5, 8, 8], [1, 5, 9, 10], [1, 5, 9, 9], [1, 5, 10], [1, 5, 9], [1, 5, 8], [1, 5, 7], [1, 5, 6], [1, 5, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9, 9], [1, 6, 7, 10], [1, 6, 7, 9], [1, 6, 7, 8], [1, 6, 7, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9, 9], [1, 6, 8, 10], [1, 6, 8, 9], [1, 6, 8, 8], [1, 6, 9, 10], [1, 6, 9, 9], [1, 6, 10], [1, 6, 9], [1, 6, 8], [1, 6, 7], [1, 6, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9, 9], [1, 7, 8, 10], [1, 7, 8, 9], [1, 7, 8, 8], [1, 7, 9, 10], [1, 7, 9, 9], [1, 7, 10], [1, 7, 9], [1, 7, 8], [1, 7, 7], [1, 8, 9, 10], [1, 8, 9, 9], [1, 8, 10], [1, 8, 9], [1, 8, 8], [1, 9, 10], [1, 9, 9], [1, 10], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 8], [2, 3, 4, 5, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 8], [2, 3, 4, 6, 7], [2, 3, 4, 6, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9, 9], [2, 3, 4, 10], [2, 3, 4, 9], [2, 3, 4, 8], [2, 3, 4, 7], [2, 3, 4, 6], [2, 3, 4, 5], [2, 3, 4, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 8], [2, 3, 5, 6, 7], [2, 3, 5, 6, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9, 9], [2, 3, 5, 10], [2, 3, 5, 9], [2, 3, 5, 8], [2, 3, 5, 7], [2, 3, 5, 6], [2, 3, 5, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9, 9], [2, 3, 6, 10], [2, 3, 6, 9], [2, 3, 6, 8], [2, 3, 6, 7], [2, 3, 6, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9, 9], [2, 3, 7, 10], [2, 3, 7, 9], [2, 3, 7, 8], [2, 3, 7, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9, 9], [2, 3, 8, 10], [2, 3, 8, 9], [2, 3, 8, 8], [2, 3, 9, 10], [2, 3, 9, 9], [2, 3, 10], [2, 3, 9], [2, 3, 8], [2, 3, 7], [2, 3, 6], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 8], [2, 4, 5, 6, 7], [2, 4, 5, 6, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9, 9], [2, 4, 5, 10], [2, 4, 5, 9], [2, 4, 5, 8], [2, 4, 5, 7], [2, 4, 5, 6], [2, 4, 5, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9, 9], [2, 4, 6, 10], [2, 4, 6, 9], [2, 4, 6, 8], [2, 4, 6, 7], [2, 4, 6, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9, 9], [2, 4, 7, 10], [2, 4, 7, 9], [2, 4, 7, 8], [2, 4, 7, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9, 9], [2, 4, 8, 10], [2, 4, 8, 9], [2, 4, 8, 8], [2, 4, 9, 10], [2, 4, 9, 9], [2, 4, 10], [2, 4, 9], [2, 4, 8], [2, 4, 7], [2, 4, 6], [2, 4, 5], [2, 4, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9, 9], [2, 5, 6, 10], [2, 5, 6, 9], [2, 5, 6, 8], [2, 5, 6, 7], [2, 5, 6, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9, 9], [2, 5, 7, 10], [2, 5, 7, 9], [2, 5, 7, 8], [2, 5, 7, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9, 9], [2, 5, 8, 10], [2, 5, 8, 9], [2, 5, 8, 8], [2, 5, 9, 10], [2, 5, 9, 9], [2, 5, 10], [2, 5, 9], [2, 5, 8], [2, 5, 7], [2, 5, 6], [2, 5, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9, 9], [2, 6, 7, 10], [2, 6, 7, 9], [2, 6, 7, 8], [2, 6, 7, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9, 9], [2, 6, 8, 10], [2, 6, 8, 9], [2, 6, 8, 8], [2, 6, 9, 10], [2, 6, 9, 9], [2, 6, 10], [2, 6, 9], [2, 6, 8], [2, 6, 7], [2, 6, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9, 9], [2, 7, 8, 10], [2, 7, 8, 9], [2, 7, 8, 8], [2, 7, 9, 10], [2, 7, 9, 9], [2, 7, 10], [2, 7, 9], [2, 7, 8], [2, 7, 7], [2, 8, 9, 10], [2, 8, 9, 9], [2, 8, 10], [2, 8, 9], [2, 8, 8], [2, 9, 10], [2, 9, 9], [2, 10], [2, 9], [2, 8], [2, 7], [2, 6], [2, 5], [2, 4], [2, 3], [2, 2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 8], [3, 4, 5, 6, 7], [3, 4, 5, 6, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9, 9], [3, 4, 5, 10], [3, 4, 5, 9], [3, 4, 5, 8], [3, 4, 5, 7], [3, 4, 5, 6], [3, 4, 5, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9, 9], [3, 4, 6, 10], [3, 4, 6, 9], [3, 4, 6, 8], [3, 4, 6, 7], [3, 4, 6, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9, 9], [3, 4, 7, 10], [3, 4, 7, 9], [3, 4, 7, 8], [3, 4, 7, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9, 9], [3, 4, 8, 10], [3, 4, 8, 9], [3, 4, 8, 8], [3, 4, 9, 10], [3, 4, 9, 9], [3, 4, 10], [3, 4, 9], [3, 4, 8], [3, 4, 7], [3, 4, 6], [3, 4, 5], [3, 4, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9, 9], [3, 5, 6, 10], [3, 5, 6, 9], [3, 5, 6, 8], [3, 5, 6, 7], [3, 5, 6, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9, 9], [3, 5, 7, 10], [3, 5, 7, 9], [3, 5, 7, 8], [3, 5, 7, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9, 9], [3, 5, 8, 10], [3, 5, 8, 9], [3, 5, 8, 8], [3, 5, 9, 10], [3, 5, 9, 9], [3, 5, 10], [3, 5, 9], [3, 5, 8], [3, 5, 7], [3, 5, 6], [3, 5, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9, 9], [3, 6, 7, 10], [3, 6, 7, 9], [3, 6, 7, 8], [3, 6, 7, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9, 9], [3, 6, 8, 10], [3, 6, 8, 9], [3, 6, 8, 8], [3, 6, 9, 10], [3, 6, 9, 9], [3, 6, 10], [3, 6, 9], [3, 6, 8], [3, 6, 7], [3, 6, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9, 9], [3, 7, 8, 10], [3, 7, 8, 9], [3, 7, 8, 8], [3, 7, 9, 10], [3, 7, 9, 9], [3, 7, 10], [3, 7, 9], [3, 7, 8], [3, 7, 7], [3, 8, 9, 10], [3, 8, 9, 9], [3, 8, 10], [3, 8, 9], [3, 8, 8], [3, 9, 10], [3, 9, 9], [3, 10], [3, 9], [3, 8], [3, 7], [3, 6], [3, 5], [3, 4], [3, 3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9, 9], [4, 5, 6, 10], [4, 5, 6, 9], [4, 5, 6, 8], [4, 5, 6, 7], [4, 5, 6, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9, 9], [4, 5, 7, 10], [4, 5, 7, 9], [4, 5, 7, 8], [4, 5, 7, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9, 9], [4, 5, 8, 10], [4, 5, 8, 9], [4, 5, 8, 8], [4, 5, 9, 10], [4, 5, 9, 9], [4, 5, 10], [4, 5, 9], [4, 5, 8], [4, 5, 7], [4, 5, 6], [4, 5, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9, 9], [4, 6, 7, 10], [4, 6, 7, 9], [4, 6, 7, 8], [4, 6, 7, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9, 9], [4, 6, 8, 10], [4, 6, 8, 9], [4, 6, 8, 8], [4, 6, 9, 10], [4, 6, 9, 9], [4, 6, 10], [4, 6, 9], [4, 6, 8], [4, 6, 7], [4, 6, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9, 9], [4, 7, 8, 10], [4, 7, 8, 9], [4, 7, 8, 8], [4, 7, 9, 10], [4, 7, 9, 9], [4, 7, 10], [4, 7, 9], [4, 7, 8], [4, 7, 7], [4, 8, 9, 10], [4, 8, 9, 9], [4, 8, 10], [4, 8, 9], [4, 8, 8], [4, 9, 10], [4, 9, 9], [4, 10], [4, 9], [4, 8], [4, 7], [4, 6], [4, 5], [4, 4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9, 9], [5, 6, 7, 10], [5, 6, 7, 9], [5, 6, 7, 8], [5, 6, 7, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9, 9], [5, 6, 8, 10], [5, 6, 8, 9], [5, 6, 8, 8], [5, 6, 9, 10], [5, 6, 9, 9], [5, 6, 10], [5, 6, 9], [5, 6, 8], [5, 6, 7], [5, 6, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9, 9], [5, 7, 8, 10], [5, 7, 8, 9], [5, 7, 8, 8], [5, 7, 9, 10], [5, 7, 9, 9], [5, 7, 10], [5, 7, 9], [5, 7, 8], [5, 7, 7], [5, 8, 9, 10], [5, 8, 9, 9], [5, 8, 10], [5, 8, 9], [5, 8, 8], [5, 9, 10], [5, 9, 9], [5, 10], [5, 9], [5, 8], [5, 7], [5, 6], [5, 5], [6, 7, 8, 9, 10], [6, 7, 8, 9, 9], [6, 7, 8, 10], [6, 7, 8, 9], [6, 7, 8, 8], [6, 7, 9, 10], [6, 7, 9, 9], [6, 7, 10], [6, 7, 9], [6, 7, 8], [6, 7, 7], [6, 8, 9, 10], [6, 8, 9, 9], [6, 8, 10], [6, 8, 9], [6, 8, 8], [6, 9, 10], [6, 9, 9], [6, 10], [6, 9], [6, 8], [6, 7], [6, 6], [7, 8, 9, 10], [7, 8, 9, 9], [7, 8, 10], [7, 8, 9], [7, 8, 8], [7, 9, 10], [7, 9, 9], [7, 10], [7, 9], [7, 8], [7, 7], [8, 9, 10], [8, 9, 9], [8, 10], [8, 9], [8, 8], [9, 10], [9, 9]]\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], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 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 = [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 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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findSubsequences", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> findSubsequences(vector& nums) {", "container": "Solution", "callable": "findSubsequences", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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\nThe area of the rectangular web page you designed must equal to the given target area.\nThe width W should not be larger than the length L, which means L >= W.\nThe 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\n \nConstraints:\n\n1 <= area <= 107\n\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 = 987654321) == [379721, 2601]\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 = 87654321) == [14631, 5991]\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 = 123456789) == [11409, 10821]\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 = 12345678) == [14593, 846]\n assert candidate(area = 1000000000) == [32000, 31250]\n assert candidate(area = 12345) == [823, 15]\n assert candidate(area = 50000000) == [8000, 6250]\n assert candidate(area = 1000000) == [1000, 1000]\n assert candidate(area = 100000000) == [10000, 10000]\n assert candidate(area = 20000000) == [5000, 4000]\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 = 135895476) == [11324623, 12]\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 = 216000000) == [15000, 14400]\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 = 100000001) == [5882353, 17]\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 = 1524157875) == [44019, 34625]\n assert candidate(area = 134217728) == [16384, 8192]\n assert candidate(area = 2048) == [64, 32]\n assert candidate(area = 65536) == [256, 256]\n assert candidate(area = 789456123) == [41487, 19029]\n assert candidate(area = 567890123) == [28151, 20173]\n assert candidate(area = 73456) == [4591, 16]\n assert candidate(area = 1000001) == [9901, 101]\n"}, "metadata": {"canonical_parameter_names": ["area"], "leetcode_dataset_entry_point": "Solution().constructRectangle", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector constructRectangle(int area) {", "container": "Solution", "callable": "constructRectangle", "parameters": [{"name": "area", "type": "int"}], "return_type": "vector", "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.\nA reverse pair is a pair (i, j) where:\n\n0 <= i < j < nums.length and\nnums[i] > 2 * nums[j].\n\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\n \nConstraints:\n\n1 <= nums.length <= 5 * 104\n-231 <= nums[i] <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().reversePairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int reversePairs(vector& nums) {", "container": "Solution", "callable": "reversePairs", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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.\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\nFor 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\n \nConstraints:\n\n1 <= nums.length <= 20\n0 <= nums[i] <= 1000\n0 <= sum(nums[i]) <= 1000\n-1000 <= target <= 1000\n\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 = [20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400],target = 2000) == 2865\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 300) == 0\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 3000) == 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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1500) == 31\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 5000) == 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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 2500) == 20\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 = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1500) == 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],target = 0) == 184756\n assert candidate(nums = [100, 200, 300, 400, 500],target = 1500) == 1\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"}, "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().findTargetSumWays", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findTargetSumWays(vector& nums, int target) {", "container": "Solution", "callable": "findTargetSumWays", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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.\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.\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\n1 <= timeSeries.length <= 104\n0 <= timeSeries[i], duration <= 107\ntimeSeries is sorted in non-decreasing order.\n\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"}, "metadata": {"canonical_parameter_names": ["timeSeries", "duration"], "leetcode_dataset_entry_point": "Solution().findPoisonedDuration", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findPoisonedDuration(vector& timeSeries, int duration) {", "container": "Solution", "callable": "findPoisonedDuration", "parameters": [{"name": "timeSeries", "type": "vector&"}, {"name": "duration", "type": "int"}], "return_type": "int", "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.\nYou are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2.\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.\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\n \nConstraints:\n\n1 <= nums1.length <= nums2.length <= 1000\n0 <= nums1[i], nums2[i] <= 104\nAll integers in nums1 and nums2 are unique.\nAll the integers of nums1 also appear in nums2.\n\n \nFollow up: Could you find an O(nums1.length + nums2.length) solution?", "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"}, "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().nextGreaterElement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector nextGreaterElement(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "nextGreaterElement", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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\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\n \nConstraints:\n\nm == mat.length\nn == mat[i].length\n1 <= m, n <= 104\n1 <= m * n <= 104\n-105 <= mat[i][j] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["mat"], "leetcode_dataset_entry_point": "Solution().findDiagonalOrder", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findDiagonalOrder(vector>& mat) {", "container": "Solution", "callable": "findDiagonalOrder", "parameters": [{"name": "mat", "type": "vector>&"}], "return_type": "vector", "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.\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.\nIn the American keyboard:\n\nthe first row consists of the characters \"qwertyuiop\",\nthe second row consists of the characters \"asdfghjkl\", and\nthe third row consists of the characters \"zxcvbnm\".\n\n\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\n \nConstraints:\n\n1 <= words.length <= 20\n1 <= words[i].length <= 100\nwords[i] consists of English letters (both lowercase and uppercase). \n\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 = ['a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T', 'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z']) == ['a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J', 'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T', 'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z']\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 = ['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']\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 = ['Python', 'Java', 'C++', 'JavaScript', 'Ruby', 'Go', 'Swift', 'Kotlin']) == []\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 = ['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(words = ['Shift', 'Ctrl', 'Alt', 'Fn', 'Enter', 'Space', 'Backspace', 'Tab', 'CapsLock', 'Esc', 'PrintScreen', 'ScrollLock', 'Pause', 'Insert', 'Delete', 'Home', 'End', 'PageUp', 'PageDown', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']) == []\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 = ['aaaaaaaaa', 'bbbbbbbbb', 'ccccccccc', 'ddddddddd', 'eeeeeeeee', 'fffffffff', 'ggggggggg', 'hhhhhhhhh', 'iiiiiiiii', 'jjjjjjjjj', 'kkkkkkkkk', 'lllllllll', 'mmmmmmmmm', 'nnnnnnnnn', 'ooooooooo', 'ppppppppp', 'qqqqqqqqq', 'rrrrrrrrr', 'sssssssss', 'ttttttttt', 'uuuuuuuuu', 'vvvvvvvvv', 'wwwwwwwww', 'xxxxxxxxx', 'yyyyyyyyy', 'zzzzzzzzz']) == ['aaaaaaaaa', 'bbbbbbbbb', 'ccccccccc', 'ddddddddd', 'eeeeeeeee', 'fffffffff', 'ggggggggg', 'hhhhhhhhh', 'iiiiiiiii', 'jjjjjjjjj', 'kkkkkkkkk', 'lllllllll', 'mmmmmmmmm', 'nnnnnnnnn', 'ooooooooo', 'ppppppppp', 'qqqqqqqqq', 'rrrrrrrrr', 'sssssssss', 'ttttttttt', 'uuuuuuuuu', 'vvvvvvvvv', 'wwwwwwwww', 'xxxxxxxxx', 'yyyyyyyyy', 'zzzzzzzzz']\n assert candidate(words = ['Mississippi', 'Delaware', 'California', 'Texas', 'Montana', 'Alaska', 'Hawaii', 'Vermont', 'Wyoming', 'RhodeIsland', 'NewJersey', 'Connecticut', 'Pennsylvania', 'NewYork', 'Ohio', 'Michigan', 'Illinois', 'Indiana', 'Wisconsin', 'Minnesota', 'Iowa', 'Kansas', 'Nebraska', 'NorthDakota', 'SouthDakota', 'NorthCarolina', 'SouthCarolina', 'Georgia', 'Florida', 'Alabama', 'Missouri', 'Kentucky', 'Tennessee', 'Virginia', 'WestVirginia', 'Maryland', 'Delaware', 'NewHampshire', 'RhodeIsland', 'Massachusetts', 'Connecticut', 'Vermont', 'NewHampshire', 'Maine']) == ['Alaska']\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 = ['AaAaAaAaAaAa', 'BbBbBbBbBbBb', 'CcCcCcCcCcCc', 'DdDdDdDdDdDd', 'EeEeEeEeEeEe', 'FfFfFfFfFfFf', 'GgGgGgGgGgGg', 'HhHhHhHhHhHh', 'IiIiIiIiIiIi', 'JjJjJjJjJjJj', 'KkKkKkKkKkKk', 'LlLlLlLlLlLl', 'MmMmMmMmMmMm', 'NnNnNnNnNnNn', 'OoOoOoOoOoOo', 'PpPpPpPpPpPp', 'QqQqQqQqQqQq', 'RrRrRrRrRrRr', 'SsSsSsSsSsSs', 'TtTtTtTtTtTt', 'UuUuUuUuUuUu', 'VvVvVvVvVvVv', 'WwWwWwWwWwWw', 'XxXxXxXxXxXx', 'YyYyYyYyYyYy', 'ZzZzZzZzZzZz']) == ['AaAaAaAaAaAa', 'BbBbBbBbBbBb', 'CcCcCcCcCcCc', 'DdDdDdDdDdDd', 'EeEeEeEeEeEe', 'FfFfFfFfFfFf', 'GgGgGgGgGgGg', 'HhHhHhHhHhHh', 'IiIiIiIiIiIi', 'JjJjJjJjJjJj', 'KkKkKkKkKkKk', 'LlLlLlLlLlLl', 'MmMmMmMmMmMm', 'NnNnNnNnNnNn', 'OoOoOoOoOoOo', 'PpPpPpPpPpPp', 'QqQqQqQqQqQq', 'RrRrRrRrRrRr', 'SsSsSsSsSsSs', 'TtTtTtTtTtTt', 'UuUuUuUuUuUu', 'VvVvVvVvVvVv', 'WwWwWwWwWwWw', 'XxXxXxXxXxXx', 'YyYyYyYyYyYy', 'ZzZzZzZzZzZz']\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 = ['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']) == ['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']\n assert candidate(words = ['qwertyuiop', 'ASDFGHJKL', 'zxcvbnm', 'QwErTyUiOp', 'AsDfGhJkL', 'Zx Cv Bn M']) == ['qwertyuiop', 'ASDFGHJKL', 'zxcvbnm', 'QwErTyUiOp', 'AsDfGhJkL']\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 = ['Shift', 'Ctrl', 'Alt', 'Enter', 'Space', 'Esc', 'Tab', 'Backspace', 'Delete', 'Insert', 'Home', 'End', 'PageUp', 'PageDown', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12']) == []\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']) == ['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 = ['aAaAaAaAaA', 'bBbBbBbBbB', 'cCcCcCcCcC', 'dDdDdDdDdD', 'eEeEeEeEeE', 'fFfFfFfFfF', 'gGgGgGgGgG', 'hHhHhHhHhH', 'iIiIiIiIiI', 'jJjJjJjJjJ', 'kKkKkKkKkK', 'lLlLlLlLlL', 'mMmMmMmMmM', 'nNnNnNnNnN', 'oOoOoOoOoO', 'pPpPpPpPpP', 'qQqQqQqQqQ', 'rRrRrRrRrR', 'sSsSsSsSsS', 'tTtTtTtTtT', 'uUuUuUuUuU', 'vVvVvVvVvV', 'wWwWwWwWwW', 'xXxXxXxXxX', 'yYyYyYyYyY', 'zZzZzZzZzZ']) == ['aAaAaAaAaA', 'bBbBbBbBbB', 'cCcCcCcCcC', 'dDdDdDdDdD', 'eEeEeEeEeE', 'fFfFfFfFfF', 'gGgGgGgGgG', 'hHhHhHhHhH', 'iIiIiIiIiI', 'jJjJjJjJjJ', 'kKkKkKkKkK', 'lLlLlLlLlL', 'mMmMmMmMmM', 'nNnNnNnNnN', 'oOoOoOoOoO', 'pPpPpPpPpP', 'qQqQqQqQqQ', 'rRrRrRrRrR', 'sSsSsSsSsS', 'tTtTtTtTtT', 'uUuUuUuUuU', 'vVvVvVvVvV', 'wWwWwWwWwW', 'xXxXxXxXxX', 'yYyYyYyYyY', 'zZzZzZzZzZ']\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 = ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', 'cccccccccccccccccccccccccccccccccccccc', 'dddddddddddddddddddddddddddddddddddddd', 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 'ffffffffffffffffffffffffffffffffffffffff', 'gggggggggggggggggggggggggggggggggggggggg', 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh', 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii', 'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj', 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk', 'llllllllllllllllllllllllllllllllllllll', 'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm', 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn', 'oooooooooooooooooooooooooooooooooooooo', 'pppppppppppppppppppppppppppppppppppppp', 'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq', 'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr', 'ssssssssssssssssssssssssssssssssssssss', 'tttttttttttttttttttttttttttttttttttttt', 'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu', 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv', 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz']) == ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', 'cccccccccccccccccccccccccccccccccccccc', 'dddddddddddddddddddddddddddddddddddddd', 'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', 'ffffffffffffffffffffffffffffffffffffffff', 'gggggggggggggggggggggggggggggggggggggggg', 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh', 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii', 'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj', 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk', 'llllllllllllllllllllllllllllllllllllll', 'mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm', 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn', 'oooooooooooooooooooooooooooooooooooooo', 'pppppppppppppppppppppppppppppppppppppp', 'qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq', 'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr', 'ssssssssssssssssssssssssssssssssssssss', 'tttttttttttttttttttttttttttttttttttttt', 'uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu', 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv', 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz']\n assert candidate(words = ['Typewriter', 'Keyboard', 'Mouse', 'Monitor', 'qwerty', 'zxcvbnm']) == ['Typewriter', 'qwerty', 'zxcvbnm']\n"}, "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().findWords", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findWords(vector& words) {", "container": "Solution", "callable": "findWords", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 501, "task_id": "find-mode-in-binary-search-tree", "difficulty": "Easy", "problem_description": "Given the root of a binary search tree (BST) with duplicates, return all the mode(s) (i.e., the most frequently occurred element) in it.\nIf the tree has more than one mode, return them in any order.\nAssume a BST is defined as follows:\n\nThe left subtree of a node contains only nodes with keys less than or equal to the node's key.\nThe right subtree of a node contains only nodes with keys greater than or equal to the node's key.\nBoth the left and right subtrees must also be binary search trees.\n\n \nExample 1:\n\n\nInput: root = [1,null,2,2]\nOutput: [2]\n\nExample 2:\n\nInput: root = [0]\nOutput: [0]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 104].\n-105 <= Node.val <= 105\n\n \nFollow up: Could you do that without using any extra space? (Assume that the implicit stack space incurred due to recursion does not count).", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([5, 2, 5, None, None, 5, 5, 5])) == [5]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([3, 1, 4, 1, 3, None, 5])) == [1, 3]\n assert candidate(root = tree_node([2, 1, 2])) == [2]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([2, 2, 2])) == [2]\n assert candidate(root = tree_node([1, None, 1, None, 1, None, 1])) == [1]\n assert candidate(root = tree_node([0])) == [0]\n assert candidate(root = tree_node([5, 2, 5, 1, 3, 5, 7])) == [5]\n assert candidate(root = tree_node([1, None, 3, 2, 4, None, 5, None, None, 3, 4])) == [1, 2, 3, 5, 4, 3, 4]\n assert candidate(root = tree_node([1, 1, 2, 2, 3])) == [2, 1, 3, 1, 2]\n assert candidate(root = tree_node([2, 1, 2, 1, 2])) == [2]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 2, 6])) == [2, 6]\n assert candidate(root = tree_node([1, 1, 2, 2, 3, 3])) == [2, 1, 3, 1, 3, 2]\n assert candidate(root = tree_node([1, 1, 2, 2, 3, 3, 4, 4])) == [4, 2, 1, 3, 1, 3, 2, 4]\n assert candidate(root = tree_node([1, None, 2, 2])) == [2]\n assert candidate(root = tree_node([1, None, 2, None, None, 3, 3])) == [1, 2]\n assert candidate(root = tree_node([1, 1, 2, 2, 3, 3, 3])) == [2, 1, 3, 1, 3, 2, 3]\n assert candidate(root = tree_node([1, None, 2, None, 3])) == [1, 2, 3]\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 55, 85, 5, 15, 30, 40, 50, 60, 70, 90, 3, 7, 12, 18, 28, 32, 42, 48, 58, 62, 72, 82, 88, 93, 97])) == [3, 5, 7, 10, 12, 15, 18, 25, 28, 30, 32, 35, 42, 40, 48, 50, 58, 50, 62, 55, 72, 60, 82, 75, 88, 70, 93, 85, 97, 90]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 10, 18, 12, 17, 16, 19])) == [3, 7, 9, 15, 12, 10, 17, 20, 16, 18, 19]\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 23, 27, 32, 37, 42, 3, 7, 11, 13, 16, 19, 22, 24, 26, 28, 31, 33, 36, 38, 41, 43, 1, 4, 6, 8, 9, 14, 15, 17, 21, 29, 34, 35, 39, 40, 44, 45])) == [1, 3, 4, 5, 6, 7, 8, 10, 9, 11, 14, 12, 15, 13, 17, 15, 21, 16, 29, 18, 34, 19, 35, 20, 39, 22, 40, 23, 44, 24, 45, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])) == [9, 5, 9, 3, 10, 5, 10, 2, 6, 3, 6, 1, 7, 4, 7, 2, 8, 4, 8]\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 23, 27, 32, 37, 1, 3, 6, 8, 11, 13, 17, 19, 22, 24, 26, 28, 31, 33, 36, 38])) == [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38]\n assert candidate(root = tree_node([7, 3, 10, 2, 5, 9, 12, 1, 4, 6, 8, 11, 13, None, None, None, None, None, None, None, None, None, None])) == [1, 2, 4, 3, 6, 5, 8, 7, 11, 9, 13, 10, 12]\n assert candidate(root = tree_node([50, 20, 60, 10, 30, 55, 70, 5, 15, 25, 35, 53, 57, 65, 75, 3, 7, 13, 17, 23, 27, 33, 37, 52, 54, 56, 58, 63, 67, 72, 77, 4, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38, 51, 59, 61, 69, 71, 73, 78, 1, 9, 11, 19, 21, 29, 31, 39, 49, 62, 64, 68, 74, 76, 79, 0])) == [64, 4, 68, 3, 74, 6, 76, 5, 79, 8, 0, 7, 12, 10, 14, 13, 16, 15, 18, 17, 22, 20, 24, 23, 26, 25, 28, 27, 32, 30, 34, 33, 36, 35, 38, 37, 51, 50, 59, 52, 61, 53, 69, 54, 71, 55, 73, 56, 78, 57, 1, 58, 9, 60, 11, 63, 19, 65, 21, 67, 29, 70, 31, 72, 39, 75, 49, 77, 62]\n assert candidate(root = tree_node([2, 0, 3, None, 1, None, None, 0, 1])) == [0, 1]\n assert candidate(root = tree_node([1, 2, 3, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3])) == [3]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, 8, 10, 11, 16, 17, 25, 23, 28, 22, 24, 27, 29, 26])) == [3, 7, 26, 17, 8, 25, 9, 23, 10, 28, 15, 22, 11, 24, 20, 27, 16, 29]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37, 1, 4, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38])) == [1, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 37, 38]\n assert candidate(root = tree_node([2, 1, 3, None, None, 1, 3, None, None, 1, 3])) == [3]\n assert candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 7, 9, 11, 13, 14, 17, 18, 22, 21, 23, 24, 26])) == [21, 7, 23, 8, 24, 9, 26, 10, 11, 12, 13, 15, 14, 16, 17, 20, 18, 25, 22]\n assert candidate(root = tree_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7])) == [7]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10])) == [9, 5, 9, 3, 10, 5, 10, 2, 10, 6, 10, 3, 10, 6, 1, 7, 4, 7, 2, 8, 4, 8]\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 2, 6, None, None, None, None, None, 10])) == [2, 6]\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, 4, 6, 8, None, None, 2, None, None, 16, 19])) == [2, 1, 3, 4, 16, 5, 19, 6, 7, 8, 10, 15, 18]\n assert candidate(root = tree_node([1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2])) == [2]\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85])) == [10, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85]\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(root = tree_node([5, 3, 6, 2, 4, None, None, 2, 4, 4, 4, 4, 4])) == [4]\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13])) == [1, 3, 4, 6, 7, 8, 10, 13, 14]\n assert candidate(root = tree_node([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])) == [2]\n assert candidate(root = tree_node([8, 5, 10, 3, 7, 9, 12, 1, 4, 6, 8, 11, 13, None, None, None, None, None, None, None, None, None, None])) == [8]\n assert candidate(root = tree_node([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, 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])) == [2]\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])) == [5]\n assert candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75, 1, 9, 11, 19, 21, 29, 31, 39, 41, 49, 51, 59, 61, 69, 71, 79])) == [1, 5, 9, 10, 11, 15, 19, 20, 21, 25, 29, 30, 31, 35, 39, 40, 41, 45, 49, 50, 51, 55, 59, 60, 61, 65, 69, 70, 71, 75, 79]\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(root = tree_node([1, 1, 2, 1, 1, None, 2, 1, 1, None, None, 2, 2])) == [1]\n assert candidate(root = tree_node([1, 1, 1, 1, 1, 1, 1, 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(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 4, 6, 8, 12, 14, 17, 19, 2, 9, 11, 16, 20])) == [2, 1, 9, 3, 11, 4, 16, 5, 20, 6, 7, 8, 10, 12, 13, 14, 15, 17, 18, 19]\n assert candidate(root = tree_node([5, 1, 5, None, 2, None, 5])) == [5]\n assert candidate(root = tree_node([15, 10, 20, 5, 12, 17, 25, 2, 6, 8, 11, 14, 16, 18, 22, 1, 3, 4, 7, 9, None, None, None, None, None, 13])) == [1, 2, 3, 5, 4, 6, 7, 10, 9, 8, 12, 11, 15, 14, 17, 13, 16, 20, 18, 25, 22]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, 4, 6, 8, None, None, None, None, 12, 17, 16, 19, 20, 21, 22])) == [1, 3, 22, 12, 4, 17, 5, 16, 6, 19, 7, 20, 8, 21, 10, 15, 18]\n assert candidate(root = tree_node([8, 4, 10, 2, 6, 9, 12, 1, 3, 5, 7, 11, 13])) == [1, 2, 3, 4, 5, 6, 7, 8, 11, 9, 13, 10, 12]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7, 1, 2, 3, 4, 5, 6, 7, 8])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7, 0, 1, 1, 1, 1, 1, 1, 1])) == [1]\n assert candidate(root = tree_node([4, 2, 5, 2, 3, 4, 6, 2, 3, None, None, 4, 5])) == [4]\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, 10, 16, 21, 17, 18, 19])) == [3, 7, 9, 15, 19, 16, 8, 21, 20, 17, 10, 18]\n assert candidate(root = tree_node([25, 10, 30, 5, 20, None, None, 3, 7, 15, 22, None, None, 13, 17, 19, 21])) == [3, 5, 13, 7, 17, 10, 19, 15, 21, 20, 22, 25, 30]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 4, 6, 8, 11, 14, 16, 19, 0, 2, None, None, None, None, None, None, None, None, 9, 12, 17, 20])) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 13, 9, 14, 12, 15, 17, 16, 20, 18, 19]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, None, 6, 8, 14, 16, 19, 12, 13, 17, 15, 11])) == [16, 1, 19, 3, 5, 7, 12, 6, 13, 10, 15, 17, 8, 15, 18, 11, 14]\n assert candidate(root = tree_node([1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2])) == [1]\n assert candidate(root = tree_node([1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6])) == [6, 4, 6, 2, 6, 4, 6, 1, 6, 4, 6, 3, 5, 1, 5, 3, 6, 2, 6, 4, 6]\n assert candidate(root = tree_node([4, 2, 6, 1, 3, 5, 7, 0, 1, 4, 6, 8, 9, 2, 5, 3, 5, 6, 7, 8, 9])) == [3, 0, 5, 1, 6, 1, 7, 2, 8, 4, 9, 3, 6, 4, 8, 5, 9, 6, 2, 7, 5]\n assert candidate(root = tree_node([1, 1, 1, 1, 1, None, None, None, None, None, None])) == [1]\n assert candidate(root = tree_node([7, 3, 15, 2, 5, 10, 17, 1, 4, 6, 8, 12, 16, 14, 18])) == [1, 2, 4, 3, 6, 5, 8, 7, 12, 10, 16, 15, 14, 17, 18]\n assert candidate(root = tree_node([1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == [1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 5, 11, 1, 12, 6, 13, 3, 14, 7, 15]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 7, None, 12, 18, 23, 28, 33, None, 3, 6, 9, 11, 13, 16, 17, 19, 22, 24, 26, 29, 32, 34, 36])) == [1, 34, 3, 36, 5, 6, 7, 9, 10, 15, 11, 12, 13, 20, 16, 18, 17, 25, 19, 23, 22, 30, 24, 28, 26, 35, 29, 33, 32]\n assert candidate(root = tree_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])) == [1]\n assert candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 6, 9, 11, 13, 14, 18, 22, 30, 4, 7, 5, 17, 19, 21, 23, 24, 26, 27, 28, 29])) == [4, 6, 7, 8, 5, 9, 17, 10, 19, 11, 21, 12, 23, 13, 24, 15, 26, 14, 27, 16, 28, 18, 29, 20, 22, 25, 30]\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 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(root = tree_node([7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7])) == [7]\n assert candidate(root = tree_node([7, 4, 8, 2, 6, 7, 9, 1, None, 3, 5, 7, 8, None, None, None, None, 10])) == [7]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, 4, 6, 8, 11, 13, 17, 19])) == [1, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 15, 17, 18, 19]\n assert candidate(root = tree_node([1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3])) == [1, 2, 2, 2, 3]\n assert candidate(root = tree_node([5, 3, 6, 3, 5, 6, 7, 3, 3, 5, 5, 6, 6, 6, 7, 3, 3, 5, 5, 5, 6, 6, 6, 7, 3, 3, 5, 5, 5, 6, 6, 6, 7])) == [3]\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 1, 6, 11, 17, 22, 27, 32, 38, 0, 3, 7, 8, 12, 14, 18, 21, 23, 26, 28, 31, 33, 36, 39, 4, 9, 10, 13, 16, 19, 24, 29, 30, 34, 37, 40, 2, 5, 12, 14, 18, 20, 23, 26, 28, 31, 33, 36, 39])) == [20, 23, 26]\n assert candidate(root = tree_node([1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1])) == [1]\n assert candidate(root = tree_node([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, 6, 8, 4, 8, 6, 8, 3, 8, 6, 4, 6, 2, 6, 4, 6, 3, 7, 5, 7, 1, 7, 5, 7, 3, 7, 5, 7, 2, 7, 5, 8, 4, 8, 5, 8]\n assert candidate(root = tree_node([1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 3, 4, 3, 3])) == [3]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == [1, 3, 5, 6, 7, 10, 15, 18]\n assert candidate(root = tree_node([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 4, 8, 12, 14, 17, 19])) == [1, 3, 5, 4, 7, 8, 10, 12, 13, 14, 15, 17, 18, 19]\n assert candidate(root = tree_node([6, 3, 6, 2, 4, None, 7, 1, None, 3, 5, None, None, 8])) == [3, 6]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().findMode", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findMode(TreeNode* root) {", "container": "Solution", "callable": "findMode", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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.\nYou are given n projects where the ith project has a pure profit profits[i] and a minimum capital of capital[i] is needed to start it.\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.\nPick a list of at most k distinct projects from given projects to maximize your final capital, and return the final maximized capital.\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\n \nConstraints:\n\n1 <= k <= 105\n0 <= w <= 109\nn == profits.length\nn == capital.length\n1 <= n <= 105\n0 <= profits[i] <= 104\n0 <= capital[i] <= 109\n\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 = 10,w = 50000,profits = [10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000],capital = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]) == 600000\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 = 1,w = 0,profits = [10000, 20000, 30000],capital = [10000, 20000, 30000]) == 0\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"}, "metadata": {"canonical_parameter_names": ["k", "w", "profits", "capital"], "leetcode_dataset_entry_point": "Solution().findMaximizedCapital", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMaximizedCapital(int k, int w, vector& profits, vector& capital) {", "container": "Solution", "callable": "findMaximizedCapital", "parameters": [{"name": "k", "type": "int"}, {"name": "w", "type": "int"}, {"name": "profits", "type": "vector&"}, {"name": "capital", "type": "vector&"}], "return_type": "int", "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.\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\n \nConstraints:\n\n1 <= nums.length <= 104\n-109 <= nums[i] <= 109\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().nextGreaterElements", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector nextGreaterElements(vector& nums) {", "container": "Solution", "callable": "nextGreaterElements", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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:\nInput: num = 100\nOutput: \"202\"\nExample 2:\nInput: num = -7\nOutput: \"-10\"\n\n \nConstraints:\n\n-107 <= num <= 107\n\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 = -40353607) == \"-1000000000\"\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 = 40353607) == \"1000000000\"\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 = -282475249) == \"-10000000000\"\n assert candidate(num = -49) == \"-100\"\n assert candidate(num = 1000000) == \"11333311\"\n assert candidate(num = 4826464) == \"56011216\"\n assert candidate(num = 282475249) == \"10000000000\"\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"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().convertToBase7", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string convertToBase7(int num) {", "container": "Solution", "callable": "convertToBase7", "parameters": [{"name": "num", "type": "int"}], "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 ith athlete in a competition. All the scores are guaranteed to be unique.\nThe athletes are placed based on their scores, where the 1st place athlete has the highest score, the 2nd place athlete has the 2nd highest score, and so on. The placement of each athlete determines their rank:\n\nThe 1st place athlete's rank is \"Gold Medal\".\nThe 2nd place athlete's rank is \"Silver Medal\".\nThe 3rd place athlete's rank is \"Bronze Medal\".\nFor the 4th place to the nth place athlete, their rank is their placement number (i.e., the xth place athlete's rank is \"x\").\n\nReturn an array answer of size n where answer[i] is the rank of the ith 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 [1st, 2nd, 3rd, 4th, 5th].\nExample 2:\n\nInput: score = [10,3,8,9,4]\nOutput: [\"Gold Medal\",\"5\",\"Bronze Medal\",\"Silver Medal\",\"4\"]\nExplanation: The placements are [1st, 5th, 3rd, 2nd, 4th].\n\n\n \nConstraints:\n\nn == score.length\n1 <= n <= 104\n0 <= score[i] <= 106\nAll the values in score are unique.\n\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 = [42, 23, 35, 56, 78, 89, 12, 34, 56, 78, 90, 101, 112, 134, 145]) == ['11', '14', '12', '9', '7', '6', '15', '13', '10', '8', '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 = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == ['7', '10', '6', '11', 'Bronze Medal', 'Gold Medal', '9', 'Silver Medal', '4', '8', '5']\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 = [23, 45, 12, 67, 34, 89, 90, 11, 2, 3, 5, 7, 9, 13, 15, 17, 19, 21, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]) == ['42', '30', '48', '19', '36', '7', '6', '49', '54', '53', '52', '51', '50', '47', '46', '45', '44', '43', '41', '40', '39', '38', '37', '35', '34', '33', '32', '31', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '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 = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 999999999, 99999999, 9999999, 999999, 99999, 9999, 999, 99, 9]) == ['19', '17', '15', '13', '11', '9', '7', '5', 'Bronze Medal', 'Gold Medal', 'Silver Medal', '4', '6', '8', '10', '12', '14', '16', '18']\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"}, "metadata": {"canonical_parameter_names": ["score"], "leetcode_dataset_entry_point": "Solution().findRelativeRanks", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findRelativeRanks(vector& score) {", "container": "Solution", "callable": "findRelativeRanks", "parameters": [{"name": "score", "type": "vector&"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= num <= 108\n\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 = 672280688) == 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 = 987654321) == 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 = 2147483647) == False\n assert candidate(num = 4690) == False\n assert candidate(num = 8128000) == False\n assert candidate(num = 100000) == False\n assert candidate(num = 1073741823) == False\n assert candidate(num = 600851475143) == 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 = 1073741824) == False\n assert candidate(num = 98765432) == False\n assert candidate(num = 10000) == False\n assert candidate(num = 119439360) == False\n"}, "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().checkPerfectNumber", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool checkPerfectNumber(int num) {", "container": "Solution", "callable": "checkPerfectNumber", "parameters": [{"name": "num", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 508, "task_id": "most-frequent-subtree-sum", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the values with the highest frequency in any order.\nThe subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (including the node itself).\n \nExample 1:\n\n\nInput: root = [5,2,-3]\nOutput: [2,-3,4]\n\nExample 2:\n\n\nInput: root = [5,2,-5]\nOutput: [2]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 104].\n-105 <= Node.val <= 105\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([-1, -2, -3, -4, -5])) == [-4, -5, -11, -3, -15]\n assert candidate(root = tree_node([0, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([1, 2, 3, 4, 5])) == [4, 5, 11, 3, 15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [5, 9, 12, 14, 15]\n assert candidate(root = tree_node([5, 2, -5])) == [2]\n assert candidate(root = tree_node([5, 2, -3])) == [2, -3, 4]\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1])) == [3]\n assert candidate(root = tree_node([0, 1, -1])) == [1, -1, 0]\n assert candidate(root = tree_node([5])) == [5]\n assert candidate(root = tree_node([1])) == [1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [4, 5, 11, 6, 7, 16, 28]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, None, 8, None, 9, None, 10])) == [10, 17, 21, 8, 13, 36, 9, 15, 18, 55]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14])) == [-7, -8, -18, -9, -10, -23, -42, -11, -12, -28, -13, -14, -33, -63, -105]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [10, 19, 27, 34, 40, 45, 49, 52, 54, 55]\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, None, None, 4, None, None, 4])) == [3, 5, 4, 8, 11, 13, 19]\n assert candidate(root = tree_node([5, 3, 2, 1, -1, -2, -3])) == [-3]\n assert candidate(root = tree_node([7, -1, -10, None, 5, None, -3, None, -2, None, 1, None, -4, None, 2])) == [-4, -6, -1, -2, 2, 3, 0, -10, -5]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3])) == [3]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])) == [16, 17, 41, 18, 19, 46, 91, 20, 21, 51, 22, 23, 56, 112, 205, 24, 25, 61, 13, 80, 14, 15, 36, 119, 325]\n assert candidate(root = tree_node([5, 2, -5, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7])) == [2]\n assert candidate(root = tree_node([100, 98, 102, None, 99, None, 105, 97, None, None, 101, None, 106])) == [106, 203, 302, 400, 101, 206, 308, 808]\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, None, None, 4])) == [4, 7, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, 8, None, 10, None, 11, None, 12, None, 13])) == [12, 20, 24, 26, 13, 23, 29, 11, 18, 50, 77]\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 0, 6, None, -1, 8])) == [6]\n assert candidate(root = tree_node([100, -50, -50, 30, 20, -30, -20, 10, 5, -10, -5, 3, -3, 2, -2])) == [5, 0]\n assert candidate(root = tree_node([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15])) == [-6, -8]\n assert candidate(root = tree_node([3, 2, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3])) == [3, 6, 9]\n assert candidate(root = tree_node([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == [7, 8, 18, 9, 10, 23, 42, 11, 12, 28, 13, 14, 33, 63, 105]\n assert candidate(root = tree_node([100, 50, -25, 20, 30, -10, -15, 10, 5, 3, 2, -1, -2])) == [35]\n assert candidate(root = tree_node([-10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9])) == [3, 8, 6]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 3, 4, None, None, 5, None, None, 5, None, None])) == [5, 14]\n assert candidate(root = tree_node([100, 50, 50, 25, 25, 25, 25, 12, 13, 14, 15, 16, 17, 18, 19])) == [12, 13, 50, 14, 15, 54, 154, 16, 17, 58, 18, 19, 62, 170, 424]\n assert candidate(root = tree_node([10, -10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80, -80, 90, -90, 100, -100])) == [-60]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == [91]\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, -1, -1, 0, 0])) == [0, 3, -1]\n assert candidate(root = tree_node([100, 50, -50, 25, 25, -25, -25, 12, 13, -12, -13, 12, 13, -12, -13])) == [12, 13, -12, -13, 0, 100]\n assert candidate(root = tree_node([10, 10, -10, 5, 5, None, -5, None, None, None, None, 2, 3])) == [5, 20]\n assert candidate(root = tree_node([0, 1, -1, 2, -2, 3, -3])) == [2, -2, 1, 3, -3, -1, 0]\n assert candidate(root = tree_node([7, 3, -3, 2, -1, None, -4, 1, -2, None, -5, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([-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(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, -1, 1, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([5, 2, -3, 1, 0, -2, 1])) == [1]\n assert candidate(root = tree_node([1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1])) == [1]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, None, None, None, 8])) == [7, 11, 13, 5, 8, 14, 22, 36]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25])) == [25, 49, 72, 94, 115, 135, 154, 172, 189, 205, 220, 234, 247, 259, 270, 280, 289, 297, 304, 310, 315, 319, 322, 324, 325]\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7])) == [-4, -5, -11, -6, -7, -16, -28]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, None, None, None, None, 8, 9])) == [4, 5, 11, 6, 8, 9, 24, 33, 45]\n assert candidate(root = tree_node([1, -1, 1, -1, 1, -1, 1])) == [1]\n assert candidate(root = tree_node([5, 15, 10, 7, -5, -3, 2, None, -1, None, None, None, None, None, None])) == [-1, 6, -5, 16, -3, 2, 9, 30]\n assert candidate(root = tree_node([5, 2, -3, 4, 1, -1, -4, 6, 0, None, None, None, None, 2, None])) == [6, 0, 10, 1, 13, -1, 2, -2, -6, 12]\n assert candidate(root = tree_node([0, 1, 1, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([5, 2, -3, 2, -2, 1, -1, 3, -3, 4, -4])) == [-3, 2, 4]\n assert candidate(root = tree_node([5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])) == [5]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4, None, None, None, None, 5, 5, 5, 5, 5])) == [5]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [9, 17, 24, 30, 35, 39, 42, 44, 45]\n assert candidate(root = tree_node([5, 15, -10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80, -80, 90, -90, 100, -100])) == [80, -80, 40, 90, -90, -40, 20, 100, -100, 50, -50, -20, 15, 60, -60, 30, 70, -70, -30, -10, 10]\n assert candidate(root = tree_node([-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120, -130, -140, -150])) == [-80, -90, -210, -100, -110, -260, -490, -120, -130, -310, -140, -150, -360, -700, -1200]\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([0, 1, 1, 1, 1, 1, 1])) == [1]\n assert candidate(root = tree_node([-1, -2, -3, 1, 2, 3, 4, -4, -3, -2, -1, 0, 1, 2, 3])) == [-1, 0]\n assert candidate(root = tree_node([100, -50, 50, None, 50, None, -50, None, 25, None, -25, None, 25, None, -25])) == [50, 100, -50]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, 2, 6, 8, 11, 13, 19, 21])) == [6, 21]\n assert candidate(root = tree_node([-10, 9, 20, None, None, 15, 7])) == [9, 15, 7, 42, 41]\n assert candidate(root = tree_node([-10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10])) == [-10]\n assert candidate(root = tree_node([-10, -5, 0, 5, 10])) == [10, 0]\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20])) == [-46]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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, 17, 41, 18, 19, 46, 91, 20, 21, 51, 22, 23, 56, 112, 205, 24, 25, 61, 26, 27, 66, 133, 28, 29, 71, 30, 45, 123, 259, 465]\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == [-8, -9, -21, -10, -11, -26, -49, -12, -13, -31, -14, -15, -36, -70, -120]\n assert candidate(root = tree_node([0, 1, 1, 0, 0, 0, 1, -1, None, -1, None, None, None, -1])) == [-1]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20, None, 21, None, 22, None, 23, None, 24, None, 25, None, 26, None, 27, None, 28, None, 29, None, 30, None, 31, None, 32, None, 33, None, 34, None, 35, None, 36, None, 37, None, 38, None, 39, None, 40])) == [40, 79, 117, 154, 190, 225, 259, 292, 324, 355, 385, 414, 442, 469, 495, 520, 544, 567, 589, 610, 630, 649, 667, 684, 700, 715, 729, 742, 754, 765, 775, 784, 792, 799, 805, 810, 814, 817, 819, 820]\n assert candidate(root = tree_node([5, 2, -5, 1, -4, 0, -6, 2, -1, -3, -5, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [46]\n assert candidate(root = tree_node([1, 2, 3, 4, None, 6, 7, 8, 9, 10, 11, None, None, 14, 15, None, None, 18, None, 20])) == [14, 15, 37, 9, 50, 52, 18, 28, 20, 31, 65, 7, 75, 128]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])) == [5, 6, 14, 7, 8, 19, 35, 9, 10, 22, 11, 12, 27, 51, 87]\n assert candidate(root = tree_node([100, -50, -50, 25, 25, -25, -25, 12, -12, 12, -12, 12, -12, 12, -12])) == [12, -12]\n assert candidate(root = tree_node([0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10])) == [8, -8, 4, 9, -9, -4, 2, 10, -10, 5, -5, -2, 1, 6, -6, 3, 7, -7, -3, -1, 0]\n assert candidate(root = tree_node([10, -10, 0, 5, -5, 5, -5, 3, -3, 3, -3, 3, -3, 3, -3])) == [3, -3]\n assert candidate(root = tree_node([5, 2, -5, 1, 3, None, -2, 4, None, -1, None, 2])) == [2, 9]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [8, 9, 21, 10, 11, 26, 49, 12, 13, 31, 14, 15, 36, 70, 120]\n assert candidate(root = tree_node([10, 15, 3, 7, -2, 9, 12, -1, 4])) == [-1, 4, 10, -2, 23, 9, 12, 24, 57]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4])) == [4]\n assert candidate(root = tree_node([10, 10, -10, 10, -10, 10, -10])) == [10]\n assert candidate(root = tree_node([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) == [0]\n assert candidate(root = tree_node([1, -1, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0])) == [0]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().findFrequentTreeSum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector findFrequentTreeSum(TreeNode* root) {", "container": "Solution", "callable": "findFrequentTreeSum", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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\n \nConstraints:\n\n0 <= n <= 30\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().fib", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int fib(int n) {", "container": "Solution", "callable": "fib", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 513, "task_id": "find-bottom-left-tree-value", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return the leftmost value in the last row of the tree.\n \nExample 1:\n\n\nInput: root = [2,1,3]\nOutput: 1\n\nExample 2:\n\n\nInput: root = [1,2,3,4,null,5,6,null,null,7]\nOutput: 7\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [1, 104].\n-231 <= Node.val <= 231 - 1\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([2, 1, 3])) == 1\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, None, None, 7])) == 7\n assert candidate(root = tree_node([0, None, 1])) == 1\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == 15\n assert candidate(root = tree_node([1])) == 1\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, 1, None, None, None, None, None, None, 9])) == 1\n assert candidate(root = tree_node([2, 2, 2, 3, None, 3, None, 4, None, 4, None, 5, None, 5, None, 6])) == 6\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 10\n assert candidate(root = tree_node([1, -2, -3, -4, None, -5, -6, None, None, None, -7])) == -7\n assert candidate(root = tree_node([1, 2, None, 3, 4, None, 5, None, None, 6, None, 7])) == 7\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == 3\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4])) == 4\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, None, None, None, None, None, None, 8])) == 4\n assert candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13])) == 4\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 0, 7, 5, None, None, 8, 6, None, None, None, 11, None, 13, None, None, None, 14])) == 14\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 90, 110, 140, 160, 190])) == 10\n assert candidate(root = tree_node([6, 2, 8, 0, 4, 7, 9, None, None, 3, 5])) == 3\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 9\n assert candidate(root = tree_node([1, 2, 3, None, 5, None, 6, 7, None, 8, 9, None, None, 10])) == 10\n assert candidate(root = tree_node([1, 2, 3, 4, None, 5, 6, 7, None, 8, 9, None, None, None, 10, None, 11])) == 10\n assert candidate(root = tree_node([0, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15])) == -8\n assert candidate(root = tree_node([1, None, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])) == 9\n assert candidate(root = tree_node([8, 5, 1, 6, 9, None, None, 7, None, 10, 11])) == 7\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 55, 85, 5, 15, 30, 40, 52, 60, 70, 90])) == 5\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, None, 7, 8, 9, 10, None, None, 11, 12, 13, None, None, None, None, 14])) == 14\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, None, 7, 8, None, None, 9])) == 8\n assert candidate(root = tree_node([100, 50, 150, 25, 75, None, 175, 10, 35, 65, 85, None, None, None, None, None, 200, 15, 40, 60, 80, 90, 110, 130, 180, 250])) == 90\n assert candidate(root = tree_node([8, 15, 1, None, -98, 75, None, 94, 93, None, -82, None, -70, None, -52])) == -70\n assert candidate(root = tree_node([2, 2, 2, 3, None, 3, None, 4, None, 4, None, 5, None, 5, None, 6, None, 6, None, 7, None, 7])) == 7\n assert candidate(root = tree_node([1, None, 3, 2, 4, None, None, 5, None, 6])) == 6\n assert candidate(root = tree_node([1, None, 3, None, None, 2])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, None, None, 9])) == 8\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7])) == -4\n assert candidate(root = tree_node([1, None, 2, 3, None, None, 4, None, None, 5])) == 4\n assert candidate(root = tree_node([0, -1, -2, -3, None, -4, -5, -6, None, None, None, -7, -8])) == -6\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, None, 1])) == 7\n assert candidate(root = tree_node([5, 3, 8, 1, 4, None, 9, None, 2, None, None, None, 6, None, 10, 7, None, 11, 12])) == 11\n assert candidate(root = tree_node([20, 15, 25, 10, 17, 22, 30, 5, 12, None, 18, 21, 24, 28, 35, 3, None, 11, 14, 16, None, 19, None, None, 23, 27, 31, None, None, None, None, 33, None, 36, 37])) == 33\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, None, 15])) == 8\n assert candidate(root = tree_node([25, 20, 30, 15, 22, 28, 35, 10, None, 18, 24, None, None, 26, 29, None, None, 5, None, None, None, None, None, None, 12])) == 5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == 8\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, None, None, None, None, 9, 10, 11, 12])) == 12\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6])) == 1\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 5\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, 8, None, 16, 18, 19, 21])) == 19\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 7, 1, None, None, None, None, None, None, 8])) == 8\n assert candidate(root = tree_node([5, None, 6, None, 7, None, 8, None, 9, None, 10])) == 10\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == 3\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])) == 15\n assert candidate(root = tree_node([2147483647])) == 2147483647\n assert candidate(root = tree_node([2, 1, 3, 4, 5, 6, 7, 8, 9, 10, None, None, 11, 12, None, 13, None, None, 14])) == 13\n assert candidate(root = tree_node([4, 2, 7, 1, 3, 6, 9, None, None, None, None, None, None, 8, 10])) == 8\n assert candidate(root = tree_node([-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15])) == -8\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, 4, 6, 8, 11, 13, 18, 25, None, None, None, None, 5.5, 9, 10.5, None, None, 14, 16, 22, None, None, 17, None, None, None, None, None, None, None, None, None, None, 19])) == 19\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, None, 17, 23, None, 27, None, 18])) == 18\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, None, None, 11, None, 12])) == 8\n assert candidate(root = tree_node([0, 0, 0, 0, None, None, 0, None, 0, None, None, 0])) == 0\n assert candidate(root = tree_node([1, 2, 3, 4, 5, None, 6, 7, 8, None, None, 9, 10, None, None, 11])) == 11\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15, None, 16, None, 17, None, 18, None, 19, None, 20])) == 20\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4])) == 4\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, None, 6])) == 1\n assert candidate(root = tree_node([1, 2, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == 8\n assert candidate(root = tree_node([2, 3, 4, 5, None, 6, 7, 8, None, None, None, None, None, None, 9])) == 9\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 7, 9, 1, None, None, None, None, 10])) == 1\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 18, 28, None, 38, 45])) == 5\n assert candidate(root = tree_node([30, 15, 45, 7, 22, 35, 50, 3, 11, 18, 27, 32, 42, 48, 55, 1, 5, 9, 13, 17, 20, 24, 26, 29, 31, 34, 38, 41, 44, 46, 49, 52, 54, 57, 60, 2, 4, 6, 8, 10, 12, 14, 16, 19, 21, 23, 25, 28, 30, 33, 36, 39, 43, 45, 47, 50, 53, 56, 58, 61, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 62])) == 62\n assert candidate(root = tree_node([5, 3, 8, 2, 4, 6, 9, 1, None, None, None, 5, None, 7, 10])) == 1\n assert candidate(root = tree_node([-2147483648, None, 2147483647, -2147483647])) == -2147483647\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180, 5, None, None, 20, 35, 55, 70, None, None, None, None, None, 105, 130, 135, 145, None, None, 155, 175, 185, None, None, None, None, None, None, None, 7])) == 155\n assert candidate(root = tree_node([1, 2, 3, None, 5, 6, None, 7, 8, 9, 10, None, 11, 12])) == 11\n assert candidate(root = tree_node([1, 2, 2, 3, None, None, 3, 4, 4, None, None, 5, 5])) == 5\n assert candidate(root = tree_node([1, 2, 3, None, None, 4, 5, None, None, 6, 7, None, None, 8, 9, None, None, None, None, None, 10])) == 8\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, None, None, 5, 5])) == 5\n assert candidate(root = tree_node([1, 2, 3, None, 4, 5, 6, None, None, 7, 8, None, None, 9, 10])) == 9\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85])) == 10\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 18, 1, None, 6, 9, 11, 13, 17, 20])) == 1\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11])) == 11\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20, None, None, None, 30, 25, 35])) == 25\n assert candidate(root = tree_node([10, 5, -3, 3, 2, None, 11, 3, -2, None, 1])) == 3\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, None])) == 8\n assert candidate(root = tree_node([1, None, 2, None, None, 3, None, None, None, 4, None, None, None, None, 5])) == 2\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, 4, 6, 8, 11, 13, 18, 25])) == 1\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3, 5, 5, None, None, 6, 6, None, None, 7, 7])) == 7\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().findBottomLeftValue", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findBottomLeftValue(TreeNode* root) {", "container": "Solution", "callable": "findBottomLeftValue", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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.\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.\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.\nAt the stage of rotating the ring to spell the key character key[i]:\n\nYou 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].\nIf 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\n \nExample 1:\n\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\n \nConstraints:\n\n1 <= ring.length, key.length <= 100\nring and key consist of only lower case English letters.\nIt is guaranteed that key could always be spelled by rotating ring.\n\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 = \"lkjhgfedcbazyxwvutsrqponml\",key = \"abcdefghijklmnopqrstuvwxyz\") == inf\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 = \"aaaaabbbbcccccdddddeeeeeffffffggggghhhhhhiiiiijjjjjjkkkkkkllllllmmmmmmnnnnnnooooooppppppqqqqqqrrrrrrssssssttttttuuuuuuvvvvvvwwwwwwwxxxxxxxxxyyyyyyyzzzzzzz\",key = \"zyxwvutsrqponmlkjihgfedcba\") == 176\n assert candidate(ring = \"mississippi\",key = \"issi\") == 7\n"}, "metadata": {"canonical_parameter_names": ["ring", "key"], "leetcode_dataset_entry_point": "Solution().findRotateSteps", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findRotateSteps(string ring, string key) {", "container": "Solution", "callable": "findRotateSteps", "parameters": [{"name": "ring", "type": "string"}, {"name": "key", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 515, "task_id": "find-largest-value-in-each-tree-row", "difficulty": "Medium", "problem_description": "Given the root of a binary tree, return an array of the largest value in each row of the tree (0-indexed).\n \nExample 1:\n\n\nInput: root = [1,3,2,5,3,null,9]\nOutput: [1,3,9]\n\nExample 2:\n\nInput: root = [1,2,3]\nOutput: [1,3]\n\n \nConstraints:\n\nThe number of nodes in the tree will be in the range [0, 104].\n-231 <= Node.val <= 231 - 1\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == [1, 2, 3, 4, 5]\n assert candidate(root = tree_node([1, 2, 3])) == [1, 3]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9])) == [1, 3, 9]\n assert candidate(root = tree_node([0])) == [0]\n assert candidate(root = tree_node([])) == []\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7])) == [1, 3, 7]\n assert candidate(root = tree_node([3, 1, 4, 3, None, 1, 5])) == [3, 4, 5]\n assert candidate(root = tree_node([3, 1, 4, None, 2])) == [3, 4, 2]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, 8, 9, 10, 11, 12, 13, None, None, 14])) == [1, 3, 7, 13, 14]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, None, None, 8, 9, 10, 11, None, None, None, 12, None, None, 13, None, None, 14, None, None, 15])) == [1, 3, 7, 11, 14, 15]\n assert candidate(root = tree_node([0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14])) == [0, -1, -3, -7]\n assert candidate(root = tree_node([3, 1, 4, None, None, 2])) == [3, 4, 2]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, 9, 7, 8, 6, 4, None, 11, 13, None, 10, None, None, 12])) == [1, 3, 9, 13, 12]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(root = tree_node([100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50])) == [100, 90, 70, 30]\n assert candidate(root = tree_node([1, None, 3, 2, 4, None, 5, 6, None, None, 7])) == [1, 3, 4, 6, 7]\n assert candidate(root = tree_node([2147483647, -2147483648, None, 2147483647])) == [2147483647, -2147483648, 2147483647]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, None, 7, None, 10, None, None, 8])) == [1, 3, 9, 10, 8]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7, None, None, 8, 12])) == [3, 20, 15, 12]\n assert candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, None, 2, None, None, None, None, 10])) == [5, 8, 9, 10]\n assert candidate(root = tree_node([-10, -5, -3, -6, -20, 0, 5, None, None, -8, None, -15, -1])) == [-10, -3, 5, -1]\n assert candidate(root = tree_node([2, 1, 3, 0, 7, 9, 1, 2, None, 1, 0, None, None, 8, 8, None, None, None, None, 7])) == [2, 3, 9, 8, 7]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, 7, None, None, None, None, 8, 10, 11, 12, 13, 14, 15])) == [1, 3, 9, 7, 12, 15]\n assert candidate(root = tree_node([-10, -5, -15, -3, -8, -18, -12, -20, -4, -7, -17, -13, None, -6])) == [-10, -5, -3, -4]\n assert candidate(root = tree_node([3, 9, 20, None, None, 15, 7])) == [3, 20, 15]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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, 3, 7, 15, 31, 40]\n assert candidate(root = tree_node([10, 5, 15, None, None, 6, 20])) == [10, 15, 20]\n assert candidate(root = tree_node([1, None, 3, None, 5, None, 7, None, 9, None, 11, None, 13])) == [1, 3, 5, 7, 9, 11, 13]\n assert candidate(root = tree_node([100, -100, 50, -50, 25, 0, 25, None, None, -25, 0, 25, None, None, None, -25, None, None, 25])) == [100, 50, 25, 25, 25]\n assert candidate(root = tree_node([0, 0, 0, None, 0, 0, None, None, 0, 0, None, None, 0])) == [0, 0, 0, 0, 0]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, 9, 8, 6, 7, 4, 10])) == [1, 3, 9, 10]\n assert candidate(root = tree_node([5, 3, 9, 1, 7, 8, 10, 0, 2, 6, 4, None, None, None, None, None, 11])) == [5, 9, 10, 6, 11]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == [10, 15, 18]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 12, 20, 1, None, 6, None, None, None, 14, 18])) == [10, 15, 20, 18]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, None, None, 4, 4, 4, 4])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([10, 5, 15, 3, 7, 13, 18, 1, 4, 6, 8, 12, 14, 17, 20])) == [10, 15, 18, 20]\n assert candidate(root = tree_node([1000000000, 999999999, 1000000001, 999999998, 999999997, 1000000002, 1000000003])) == [1000000000, 1000000001, 1000000003]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, None, None, None, None, 21])) == [1, 3, 7, 15, 21]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7])) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, None, 8, None, 10, None, 11, None, 12, -13, None, -14, None, -15])) == [1, 3, 9, 10, 12, -15]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, 7])) == [1, 3, 9, 7]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, 7, None, None, None, None, 8, 10])) == [1, 3, 9, 7, 10]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, 7, None, None, None, 11, 12, None, 13, 14])) == [1, 3, 9, 11, 14]\n assert candidate(root = tree_node([5, 1, None, 4, None, 2, None, None, 3])) == [5, 1, 4, 2, 3]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, None, 8, None, 10, None, 11, None, 12])) == [1, 3, 9, 10, 12]\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8])) == [1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(root = tree_node([5, 1, 4, None, None, 3, 6])) == [5, 4, 6]\n assert candidate(root = tree_node([7, 5, 8, 3, 6, 9, 10, None, None, 4, None, None, 11])) == [7, 8, 10, 11]\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180])) == [100, 150, 175, 180]\n assert candidate(root = tree_node([2147483647])) == [2147483647]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, None, 7, None, 10, None, None, None, 11])) == [1, 3, 9, 10, 11]\n assert candidate(root = tree_node([9, 3, 12, None, None, 11, 13])) == [9, 12, 13]\n assert candidate(root = tree_node([-100, 50, -50, 25, 75, -25, 25])) == [-100, 50, 75]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 7, 8, None, 10, None, 12, None, 14, None, 16])) == [1, 3, 7, 10, 14, 16]\n assert candidate(root = tree_node([7, 10, None, 5, None, 1, None, None, -1, None, -3, None, 6, None, None, -5, None])) == [7, 10, 5, 1, -1, -3, 6]\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, 7])) == [5, 6, 7]\n assert candidate(root = tree_node([1, 2, 3, 4, None, None, 5, 6, None, 7, None, 8, None, 9])) == [1, 3, 5, 7, 9]\n assert candidate(root = tree_node([2147483647, -2147483648, None, -2147483648, None, None, 2147483647])) == [2147483647, -2147483648, -2147483648, 2147483647]\n assert candidate(root = tree_node([1, 3, 2, 5, 3, None, 9, 6, 7, None, None, None, 8])) == [1, 3, 9, 8]\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8, None, None, None, None, None, None, None, 9])) == [5, 7, 8, 9]\n assert candidate(root = tree_node([-10, -20, -30, -40, -50, -60, -70, -80, -90, -100])) == [-10, -20, -40, -80]\n assert candidate(root = tree_node([10, None, 5, None, None, None, 15, None, 7])) == [10, 5]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])) == [1, 3, 7, 15, 20]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == [1, 3, 7, 15]\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190])) == [100, 150, 175, 190]\n assert candidate(root = tree_node([1, 2, 2, 3, 4, 4, 3])) == [1, 2, 4]\n assert candidate(root = tree_node([1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4])) == [1, 2, 3, 4]\n assert candidate(root = tree_node([5, 3, 6, 2, 4, None, None, 1])) == [5, 6, 4, 1]\n assert candidate(root = tree_node([5, 3, 9, -10, None, 2, 8, 6, None, None, None, None, 4, None, None, -1])) == [5, 9, 8, 6, -1]\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 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])) == [1, 3, 7, 15, 31]\n assert candidate(root = tree_node([-1, -2, -3, -4, None, -5, -6])) == [-1, -2, -4]\n assert candidate(root = tree_node([5, 8, 5, 8, None, None, 5, None, 4, None, 9, 7, 6])) == [5, 8, 8, 9, 7]\n assert candidate(root = tree_node([1, None, None, 2, None, None, 3, None, None, 4, None, None, 5, None, None, 6, None, None, 7, None, None, 8, None, None, 9])) == [1]\n assert candidate(root = tree_node([1, None, 3, None, None, 2, None, None, 4, None, None, None, 5, None, None, None, None, None, 6])) == [1, 3]\n assert candidate(root = tree_node([-100, -200, -300, -400, None, -500, -600])) == [-100, -200, -400]\n assert candidate(root = tree_node([5, 4, 8, 11, None, 13, 4, 7, 2, None, None, 5, 1])) == [5, 8, 13, 7]\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().largestValues", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector largestValues(TreeNode* root) {", "container": "Solution", "callable": "largestValues", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "vector", "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.\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\n \nConstraints:\n\n1 <= s.length <= 1000\ns consists only of lowercase English letters.\n\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 = ('elrmenmet',)) == 1\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"}, "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindromeSubseq", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int longestPalindromeSubseq(string s) {", "container": "Solution", "callable": "longestPalindromeSubseq", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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.\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.\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\n \nConstraints:\n\nn == machines.length\n1 <= n <= 104\n0 <= machines[i] <= 105\n\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"}, "metadata": {"canonical_parameter_names": ["machines"], "leetcode_dataset_entry_point": "Solution().findMinMoves", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMinMoves(vector& machines) {", "container": "Solution", "callable": "findMinMoves", "parameters": [{"name": "machines", "type": "vector&"}], "return_type": "int", "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.\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.\nYou may assume that you have an infinite number of each kind of coin.\nThe 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\n \nConstraints:\n\n1 <= coins.length <= 300\n1 <= coins[i] <= 5000\nAll the values of coins are unique.\n0 <= amount <= 5000\n\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 = 6249,coins = [186, 419, 83, 408]) == 19\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 = 5000,coins = [3, 5, 7, 8, 9, 10]) == 351757492460\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 = 1800,coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 120836624716\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 = 8000,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 0\n assert candidate(amount = 3333,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27]) == 186150339220814\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 = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 6877248457909551\n assert candidate(amount = 4800,coins = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]) == 402020904793077\n assert candidate(amount = 3500,coins = [1, 2, 5, 10, 20, 50, 100]) == 298945088016\n assert candidate(amount = 10000,coins = [2, 3, 5, 7, 11, 13, 17, 19, 23]) == 11569288968418829417\n assert candidate(amount = 3750,coins = [125, 250, 500, 1000, 2000]) == 166\n assert candidate(amount = 2750,coins = [4, 9, 14, 19, 24, 29, 34, 39, 44, 49]) == 1980385268761\n assert candidate(amount = 6000,coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 1608946754650872\n assert candidate(amount = 4500,coins = [2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000]) == 17776167706\n assert candidate(amount = 4500,coins = [5, 10, 20, 50, 100, 200]) == 94862488\n assert candidate(amount = 6000,coins = [11, 22, 33, 44, 55, 66]) == 0\n assert candidate(amount = 5555,coins = [7, 14, 21, 28, 35, 42, 49, 56, 63]) == 0\n assert candidate(amount = 2048,coins = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 2320518947\n assert candidate(amount = 4000,coins = [1, 11, 13, 19, 21, 31, 37]) == 95941704933\n assert candidate(amount = 2700,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 385226325096527\n assert candidate(amount = 4999,coins = [1, 2, 5, 10, 25, 50, 100, 200, 500]) == 14978475244405\n assert candidate(amount = 700,coins = [3, 7, 11, 13, 17, 19, 23, 29]) == 45005473\n assert candidate(amount = 4500,coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]) == 171076578684392\n assert candidate(amount = 2500,coins = [2, 3, 5, 7, 11, 13]) == 28227697415\n assert candidate(amount = 500,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 0\n assert candidate(amount = 3500,coins = [7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 1916917910649679\n assert candidate(amount = 500,coins = [11, 22, 33, 44, 55]) == 0\n assert candidate(amount = 8000,coins = [1, 2, 5, 10, 20, 50, 100]) == 39042657518121\n assert candidate(amount = 1500,coins = [3, 5, 7, 11, 13, 17, 19, 23]) == 38017360391\n assert candidate(amount = 3500,coins = [17, 23, 29, 31, 37]) == 519429\n assert candidate(amount = 2700,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27]) == 35818551286815\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 = 5000,coins = [1, 4, 9, 16, 25, 36, 49]) == 928443384056\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 = 4000,coins = [2, 4, 6, 8, 10, 12, 14, 16, 18]) == 19131722793601739\n assert candidate(amount = 3000,coins = [33, 66, 99, 132, 165, 198, 231, 264, 297]) == 0\n assert candidate(amount = 2222,coins = [2, 4, 6, 8, 10, 12, 14, 16, 18]) == 186150339220814\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 = 3333,coins = [13, 23, 33, 43, 53, 63, 73, 83, 93, 103]) == 3570286683\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 = 6000,coins = [1, 2, 3, 5, 11, 23, 37, 41]) == 5179949524521356\n assert candidate(amount = 3000,coins = [1, 10, 25, 50, 100, 200]) == 11051256\n assert candidate(amount = 4999,coins = [1, 3, 9, 27, 81, 243, 729, 2187, 6561]) == 3946672836\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 = 6666,coins = [1, 2, 3, 5, 8, 13, 21, 34, 55]) == 858790214643388609\n assert candidate(amount = 4000,coins = [3, 5, 7, 9, 11, 13, 15]) == 2941614132296\n assert candidate(amount = 1234,coins = [13, 21, 34, 55, 89, 144, 233, 377, 610, 987]) == 10948\n assert candidate(amount = 3500,coins = [1, 2, 4, 8, 16, 32, 64]) == 1356535733168\n assert candidate(amount = 1500,coins = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]) == 23221589514\n assert candidate(amount = 1200,coins = [5, 15, 25, 50, 100, 200]) == 115862\n assert candidate(amount = 3000,coins = [1, 3, 4, 10, 20, 50]) == 18144427661\n assert candidate(amount = 3000,coins = [2, 5, 11, 23, 47]) == 30080239\n assert candidate(amount = 3456,coins = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 35362292367933393\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 = 1800,coins = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 1067122993784732\n assert candidate(amount = 7000,coins = [1, 5, 10, 25, 50, 100, 200, 500]) == 399576201827\n assert candidate(amount = 4000,coins = [8, 16, 24, 32, 40, 48, 56]) == 5078412464\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 = 3500,coins = [5, 15, 25, 35, 45, 55, 65, 75]) == 10998232465\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 = 2000,coins = [1, 3, 5, 7, 9, 11, 13]) == 707531982781\n assert candidate(amount = 4000,coins = [5, 11, 17, 23, 29, 35, 41, 47, 53, 59]) == 7799502297011\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 = 7777,coins = [13, 26, 39, 52, 65, 78, 91, 104, 117]) == 0\n assert candidate(amount = 9000,coins = [15, 25, 35, 45, 55, 65]) == 1244874855\n assert candidate(amount = 4000,coins = [7, 14, 21, 28, 35]) == 0\n assert candidate(amount = 4321,coins = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 8412107116918783059141522248\n assert candidate(amount = 2000,coins = [101, 103, 107, 109]) == 0\n assert candidate(amount = 2500,coins = [2, 5, 11, 17, 23, 29, 35, 41, 47]) == 623719935720\n assert candidate(amount = 500,coins = [1, 2, 5, 10, 20, 50, 100]) == 5824071\n assert candidate(amount = 5000,coins = [1, 2, 5, 10, 20, 50, 100, 200, 500]) == 18682149631801\n assert candidate(amount = 2000,coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 264830889564\n assert candidate(amount = 4500,coins = [7, 13, 19, 23, 37, 41]) == 275308289\n assert candidate(amount = 8888,coins = [11, 22, 33, 44, 55, 66, 77, 88, 99]) == 15453068500547\n assert candidate(amount = 1500,coins = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]) == 0\n assert candidate(amount = 7000,coins = [3, 5, 7, 11, 13, 17, 19]) == 34788754338474\n assert candidate(amount = 3000,coins = [1, 3, 5, 10, 25, 50]) == 11669586691\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 assert candidate(amount = 6000,coins = [3, 6, 12, 24, 48, 96]) == 8807842176\n assert candidate(amount = 5000,coins = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 1027087367648016934506457070508\n"}, "metadata": {"canonical_parameter_names": ["amount", "coins"], "leetcode_dataset_entry_point": "Solution().change", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int change(int amount, vector& coins) {", "container": "Solution", "callable": "change", "parameters": [{"name": "amount", "type": "int"}, {"name": "coins", "type": "vector&"}], "return_type": "int", "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\nAll letters in this word are capitals, like \"USA\".\nAll letters in this word are not capitals, like \"leetcode\".\nOnly 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:\nInput: word = \"USA\"\nOutput: true\nExample 2:\nInput: word = \"FlaG\"\nOutput: false\n\n \nConstraints:\n\n1 <= word.length <= 100\nword consists of lowercase and uppercase English letters.\n\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 = \"MiXeD123\") == 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"}, "metadata": {"canonical_parameter_names": ["word"], "leetcode_dataset_entry_point": "Solution().detectCapitalUse", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool detectCapitalUse(string word) {", "container": "Solution", "callable": "detectCapitalUse", "parameters": [{"name": "word", "type": "string"}], "return_type": "bool", "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.\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\n \nConstraints:\n\n1 <= a.length, b.length <= 100\na and b consist of lower-case English letters.\n\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 = \"\",b = \"\") == -1\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 = \"\",b = \"abcdef\") == 6\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 = \"\",b = \"a\") == 1\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 = \"a\",b = \"\") == 1\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"}, "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().findLUSlength", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findLUSlength(string a, string b) {", "container": "Solution", "callable": "findLUSlength", "parameters": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}], "return_type": "int", "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.\nAn uncommon subsequence between an array of strings is a string that is a subsequence of one string but not the others.\nA subsequence of a string s is a string that can be obtained after deleting any number of characters from s.\n\nFor 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\n \nExample 1:\nInput: strs = [\"aba\",\"cdc\",\"eae\"]\nOutput: 3\nExample 2:\nInput: strs = [\"aaa\",\"aaa\",\"aa\"]\nOutput: -1\n\n \nConstraints:\n\n2 <= strs.length <= 50\n1 <= strs[i].length <= 10\nstrs[i] consists of lowercase English letters.\n\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 = ['programming', 'programing', 'progamming', 'programmig', 'proogramming', 'programmiing']) == 12\n assert candidate(strs = ['mississippi', 'mississipi', 'mississipp', 'mississip', 'mississi', 'mississ', 'missis', 'missi', 'misi', 'msi', 'mi', 'm']) == 11\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 = ['longstring', 'longerstring', 'longeststring', 'longstringer', 'longstringest', 'longstringerer']) == 14\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 = ['mississippi', 'missisipi', 'missippi', 'mssippi', 'msissippi']) == 11\n assert candidate(strs = ['abcdefg', 'bcdefga', 'cdefgab', 'defgabc', 'efgabcd', 'fgabcde', 'gabcdef']) == 7\n assert candidate(strs = ['cat', 'dog', 'caterpillar', 'cattle', 'tall']) == 11\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 = ['xyz', 'zyx', 'yz', 'zx', 'yx', 'x', 'y', 'z', '']) == 3\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 = ['sequence', 'subsequence', 'subseq', 'seq', 'sequencee']) == 11\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"}, "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().findLUSlength", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findLUSlength(vector& strs) {", "container": "Solution", "callable": "findLUSlength", "parameters": [{"name": "strs", "type": "vector&"}], "return_type": "int", "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.\nA good subarray is a subarray where:\n\nits length is at least two, and\nthe sum of the elements of the subarray is a multiple of k.\n\nNote that:\n\nA subarray is a contiguous part of the array.\nAn 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\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\n \nConstraints:\n\n1 <= nums.length <= 105\n0 <= nums[i] <= 109\n0 <= sum(nums[i]) <= 231 - 1\n1 <= k <= 231 - 1\n\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().checkSubarraySum", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "bool checkSubarraySum(vector& nums, int k) {", "container": "Solution", "callable": "checkSubarraySum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "bool", "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\n \nConstraints:\n\n1 <= s.length <= 1000\n1 <= dictionary.length <= 1000\n1 <= dictionary[i].length <= 1000\ns and dictionary[i] consist of lowercase English letters.\n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"\",dictionary = ['a', 'b', 'c']) == \"\"\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 = \"aaaaaaa\",dictionary = ['aaaaaaa', 'aa', 'a', '']) == \"aaaaaaa\"\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 = \"\",dictionary = ['a', 'b', 'c']) == \"\"\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 = []) == \"\"\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"}, "metadata": {"canonical_parameter_names": ["s", "dictionary"], "leetcode_dataset_entry_point": "Solution().findLongestWord", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string findLongestWord(string s, vector& dictionary) {", "container": "Solution", "callable": "findLongestWord", "parameters": [{"name": "s", "type": "string"}, {"name": "dictionary", "type": "vector&"}], "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\n \nConstraints:\n\n1 <= nums.length <= 105\nnums[i] is either 0 or 1.\n\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"}, "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaxLength", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMaxLength(vector& nums) {", "container": "Solution", "callable": "findMaxLength", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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\nperm[i] is divisible by i.\ni 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\n \nConstraints:\n\n1 <= n <= 15\n\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"}, "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countArrangement", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int countArrangement(int n) {", "container": "Solution", "callable": "countArrangement", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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)!\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),\ndigit ('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 = [clickr, clickc] represents the next click position among all the unrevealed squares ('M' or 'E').\nReturn the board after revealing this position according to the following rules:\n\nIf a mine 'M' is revealed, then the game is over. You should change it to 'X'.\nIf 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.\nIf 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.\nReturn the board when no more squares will be revealed.\n\n \nExample 1:\n\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\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\n \nConstraints:\n\nm == board.length\nn == board[i].length\n1 <= m, n <= 50\nboard[i][j] is either 'M', 'E', 'B', or a digit from '1' to '8'.\nclick.length == 2\n0 <= clickr < m\n0 <= clickc < n\nboard[clickr][clickc] is either 'M' or 'E'.\n\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"}, "metadata": {"canonical_parameter_names": ["board", "click"], "leetcode_dataset_entry_point": "Solution().updateBoard", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "vector> updateBoard(vector>& board, vector& click) {", "container": "Solution", "callable": "updateBoard", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "click", "type": "vector&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 530, "task_id": "minimum-absolute-difference-in-bst", "difficulty": "Easy", "problem_description": "Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two different nodes in the tree.\n \nExample 1:\n\n\nInput: root = [4,2,6,1,3]\nOutput: 1\n\nExample 2:\n\n\nInput: root = [1,0,48,null,null,12,49]\nOutput: 1\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [2, 104].\n0 <= Node.val <= 105\n\n \nNote: This question is the same as 783: https://leetcode.com/problems/minimum-distance-between-bst-nodes/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(root = tree_node([4, 2, 6, 1, 3])) == 1\n assert candidate(root = tree_node([1, 30, None, 10, None, None, 15, None, 18])) == -29\n assert candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])) == 1\n assert candidate(root = tree_node([236, 104, 701, None, 227, None, 911])) == 9\n assert candidate(root = tree_node([5, 4, 7])) == 1\n assert candidate(root = tree_node([1, 0, 48, None, None, 12, 49])) == 1\n assert candidate(root = tree_node([5, 3, 7, 2, 4, 6, 8])) == 1\n assert candidate(root = tree_node([50, 25, 75, 15, 35, 65, 85, 10, 20, 30, 40, 60, 70, 80, 90])) == 5\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 80, 110, 140, 160, 190])) == 5\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, 4, 6, 8])) == 1\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])) == 2\n assert candidate(root = tree_node([60, 20, 80, 10, 30, 70, 90, 5, 15, 25, 35, 65, 75, 85, 95, 2, 8, 12, 18, 27, 33, 37, 55, 68, 72, 77, 82, 88, 92, 97, 98])) == -3\n assert candidate(root = tree_node([10, 9, 20, None, None, 15, 21])) == 1\n assert candidate(root = tree_node([25, 10, 30, 5, 15, 26, 40, 2, 7, 12, 18, 27, 35, 38, 45])) == -5\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 22, 35, 43, 48, 55])) == 2\n assert candidate(root = tree_node([10, 5, 15, None, None, 12, 20, 11, None, None, 14])) == -6\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 90, 110, 140, 160, 190])) == 5\n assert candidate(root = tree_node([60, 30, 90, 10, 40, 80, 100, 5, 15, 35, 45, 75, 85, 95, 105])) == 5\n assert candidate(root = tree_node([10000, 5000, 15000, 2500, 7500, 12500, 17500, 1250, 3750, 5875, 8625, 11250, 15250, 16750, 18250])) == -250\n assert candidate(root = tree_node([8, 4, 12, 2, 6, 10, 14, 1, 3, 5, 7, 9, 11, 13, 15])) == 1\n assert candidate(root = tree_node([10, 5, 15, 2, None, 11, 18, 1, None, None, 13])) == 1\n assert candidate(root = tree_node([999, 499, 1499, 249, 749, 1249, 1749, 125, 375, 587, 862, 1124, 1524, 1674, 1824])) == -25\n assert candidate(root = tree_node([150, 75, 225, 37, 112, 188, 263, 18, 56, 87, 100, 163, 200, 242, 284])) == -12\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 17, 22, 27, 32, 37])) == 2\n assert candidate(root = tree_node([9, 3, 15, None, 8, 12, 20, 4, 7, 11, 13, 18, 25])) == -1\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, None, 17])) == -3\n assert candidate(root = tree_node([70, 35, 105, 20, 50, 85, 125, 10, 25, 40, 60, 80, 90, 110, 130])) == 5\n assert candidate(root = tree_node([20, 15, 30, 10, 18, 25, 35, 5, 12, 16, 19, 23, 27, 32, 38])) == 1\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 22, 37, 42, 47, 52])) == 2\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 23, 28, 33, 38])) == 2\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180, 5, 15, 22, 32, 42, 58, 68, 78, 88, 108, 118, 138, 158, 178, 190])) == -12\n assert candidate(root = tree_node([90, 45, 135, 20, 60, 110, 160, 10, 30, 50, 70, 100, 120, 140, 170])) == 5\n assert candidate(root = tree_node([8, 3, 13, None, 7, 10, 18, None, None, 9, 11, None, 15, 19, 22])) == -12\n assert candidate(root = tree_node([8, 3, 13, None, 7, 10, 17, None, None, 9, 12, 14, 16, 18, 20])) == -10\n assert candidate(root = tree_node([250, 125, 375, 62, 188, 312, 438, 31, 93, 156, 220, 275, 356, 400, 480])) == 19\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 12, 18, 23, 28, 33, 37])) == 2\n assert candidate(root = tree_node([15, 10, 20, 5, 12, None, None, 2, None, 11, 14])) == 1\n assert candidate(root = tree_node([30, 10, 50, 5, 20, 40, 60, 1, None, 15, 25, 35, 45, 55, 65])) == 4\n assert candidate(root = tree_node([15, 10, 20, 5, 12, 18, 25, 3, 8, 11, 14, 17, 22, 24, 30])) == -2\n assert candidate(root = tree_node([50, 25, 75, 15, 35, 65, 85, 5, 20, 30, 40, 60, 70, 80, 90])) == 5\n assert candidate(root = tree_node([15, 10, 20, 8, 12, 17, 25, 7, 9, 11, 13, 16, 18, 23, 27, 6, None, 10, None, 14, None, None, 19, 21, 26, 30, None, None, None, None, None, None, None, None, 1])) == -12\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 43, 55, 60])) == -5\n assert candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])) == -10\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 13, 18, 23, 28, 33, 37])) == 2\n assert candidate(root = tree_node([2, None, 3, None, 4, None, 5])) == 1\n assert candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 2, None, 6, 8, 17, 19])) == 1\n assert candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 27, 32, 37, 42])) == 2\n assert candidate(root = tree_node([500, 250, 750, 125, 375, 625, 875, 63, 188, 288, 469, 513, 688, 763, 938, 31, 94, 134, 225, 334, 409, 494, 569, 654, 729, 794, 859, 904, 964, 987])) == -141\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 60, 85, 5, 15, 30, 40, 55, 65, 80, 90, 3, 7, 12, 18, 28, 32, 45, 52, 63, 68, 77, 82, 88, 93, 2, 4, 6, 8, 11, 13, 14, 17, 19, 27, 29, 31, 33, 39, 43, 48, 51, 54, 57, 62, 67, 70, 76, 79, 81, 83, 87, 89, 92, 95, 97, 1, 9, 16, 20, 23, 26, 34, 36, 38, 41, 42, 44, 46, 47, 49, 50, 53, 56, 58, 59, 61, 64, 66, 69, 71, 72, 73, 74, 75, 78, 80, 84, 86, 91, 94, 96, 98, 99])) == -95\n assert candidate(root = tree_node([9, 4, 17, 2, 6, 12, 22, 1, 3, 5, 7, 11, 13, 18, 25])) == 1\n assert candidate(root = tree_node([50, 25, 75, 10, 30, 60, 80, 5, 15, 27, 35, 55, 65, 77, 85])) == 2\n assert candidate(root = tree_node([20, 10, None, 5, 15, None, 25, 2, None, 13, 18, None, None, 16, None])) == -8\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37, 1, 4, 6, 8, 12, 14, 16, 18, 22, 24, 26, 28, 32, 34, 36, 38])) == 1\n assert candidate(root = tree_node([50, 25, 75, 10, 35, 60, 85, 5, 15, 30, 40, 55, 65, 80, 90])) == 5\n assert candidate(root = tree_node([50, 25, 75, 12, 37, 63, 87, 6, 18, 30, 45, 58, 60, 72, 90])) == -3\n assert candidate(root = tree_node([7, 3, 15, None, None, 9, 20, None, None, None, 18])) == -2\n assert candidate(root = tree_node([500, 250, 750, 125, 375, 625, 875, 62, 188, 312, 438, 563, 712, 813, 938])) == 38\n assert candidate(root = tree_node([60, 30, 90, 20, 40, 70, 100, 15, 25, 35, 45, 65, 75, 85, 105])) == -5\n assert candidate(root = tree_node([99, 98, 102, 97, None, 101, 103, 96, None, None, None, None, None, None])) == 1\n assert candidate(root = tree_node([90, 60, 120, 30, 75, 100, 150, 20, 40, 65, 80, 95, 110, 140, 160])) == 5\n assert candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75])) == 5\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 190])) == 10\n assert candidate(root = tree_node([60, 30, 90, 20, 40, 70, 100, 15, 25, 35, 45, 65, 75, 85, 95, 10, 18, 23, 32, 43, 58, 63, 72, 78, 83, 92, 98, 110, 120, 130, 140, 150])) == -140\n assert candidate(root = tree_node([2, 1, 3, None, None, None, 4, None, None, None, None, None, None, 5])) == 1\n assert candidate(root = tree_node([10, 5, 15, None, None, 12, 20, None, None, None, None, 13, 18])) == 2\n assert candidate(root = tree_node([70, 35, 105, 15, 50, 85, 120, 10, 25, 40, 60, 80, 90, 110, 130])) == 5\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37])) == 2\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 180])) == 5\n assert candidate(root = tree_node([7, 3, 15, None, 4, 9, 20, None, None, None, None, 18, 22])) == 1\n assert candidate(root = tree_node([90, 45, 135, 22, 67, 112, 178, 11, 33, 55, 82, 100, 123, 165, 190])) == 8\n assert candidate(root = tree_node([75, 50, 100, 25, 62, 87, 125, 10, 38, 56, 65, 82, 93, 112, 138])) == 3\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 25, 35, 42, 48, 55])) == 2\n assert candidate(root = tree_node([8, 3, 13, 1, None, 7, 15, 0, 2, 6, 9, 14, 17, None, None, None, None, None, None, None, None])) == -2\n assert candidate(root = tree_node([30, 15, None, 10, 20, 18, 25])) == -10\n assert candidate(root = tree_node([75, 40, 100, 30, 55, 85, 110, 20, 35, 50, 60, 80, 90, 105, 115])) == 5\n assert candidate(root = tree_node([30, 10, 50, 5, 25, 40, 60, None, 15, None, 20, 35, 45, 55, 65])) == -5\n assert candidate(root = tree_node([2, 1, None])) == 1\n assert candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 85])) == 5\n assert candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 17, 22, 28, 33, 40])) == 2\n assert candidate(root = tree_node([40, 20, 60, 10, 30, 50, 70, 5, 15, 25, 35, 45, 55, 65, 75, 1, 9, 13, 22, 28, 33, 42, 48, 53, 57, 63, 68, 73, 77, 80, 83, 88, 93, 98, 100])) == -90\n assert candidate(root = tree_node([1, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])) == -1\n assert candidate(root = tree_node([99, 49, 149, 24, 74, 124, 174, 12, 37, 62, 87, 112, 137, 162, 187, 6, 22, 31, 43, 56, 71, 82, 93, 103, 118, 132, 143, 158, 168, 178, 182, 193])) == -187\n assert candidate(root = tree_node([50, 25, 75, 15, 35, 60, 85, 10, 20, 30, 40, 55, 65, 80, 90])) == 5\n assert candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 180])) == 5\n assert candidate(root = tree_node([30, 20, 40, 10, None, 35, 45, 5, None, None, 38, None, 47])) == 2\n assert candidate(root = tree_node([1000, 500, 1500, 250, 750, 1250, 1750, 125, 375, 625, 875, 1125, 1375, 1625, 1875, 63, 225, 313, 438, 563, 688, 763, 894, 1063, 1188, 1313, 1438, 1563, 1688, 1813, 1938])) == 13\n assert candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 17, 25, 35, 47, 49, 55])) == -2\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().getMinimumDifference", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int getMinimumDifference(TreeNode* root) {", "container": "Solution", "callable": "getMinimumDifference", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "int", "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.\nA k-diff pair is an integer pair (nums[i], nums[j]), where the following are true:\n\n0 <= i, j < nums.length\ni != 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\n \nConstraints:\n\n1 <= nums.length <= 104\n-107 <= nums[i] <= 107\n0 <= k <= 107\n\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 = [10000000, -10000000, 0, 5000000, -5000000],k = 20000000) == 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 = 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 = [10000000, -10000000, 5000000, -5000000, 0],k = 15000000) == 2\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 = [10000000, -10000000, 5000000, -5000000, 0, 2500000, -2500000],k = 15000000) == 2\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 = [10000000, 9999999, 9999998, 10000001, 10000000, 9999999, 9999998, 10000001],k = 1) == 3\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"}, "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().findPairs", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findPairs(vector& nums, int k) {", "container": "Solution", "callable": "findPairs", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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\nreal is the real part and is an integer in the range [-100, 100].\nimaginary is the imaginary part and is an integer in the range [-100, 100].\ni2 == -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\n \nConstraints:\n\nnum1 and num2 are valid complex numbers.\n\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"}, "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().complexNumberMultiply", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "string complexNumberMultiply(string num1, string num2) {", "container": "Solution", "callable": "complexNumberMultiply", "parameters": [{"name": "num1", "type": "string"}, {"name": "num2", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} -{"question_id": 538, "task_id": "convert-bst-to-greater-tree", "difficulty": "Medium", "problem_description": "Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum of all keys greater than the original key in BST.\nAs a reminder, a binary search tree is a tree that satisfies these constraints:\n\nThe left subtree of a node contains only nodes with keys less than the node's key.\nThe right subtree of a node contains only nodes with keys greater than the node's key.\nBoth the left and right subtrees must also be binary search trees.\n\n \nExample 1:\n\n\nInput: root = [4,1,6,0,2,5,7,null,null,null,3,null,null,null,8]\nOutput: [30,36,21,36,35,26,15,null,null,null,33,null,null,null,8]\n\nExample 2:\n\nInput: root = [0,null,1]\nOutput: [1,null,1]\n\n \nConstraints:\n\nThe number of nodes in the tree is in the range [0, 104].\n-104 <= Node.val <= 104\nAll the values in the tree are unique.\nroot is guaranteed to be a valid binary search tree.\n\n \nNote: This question is the same as 1038: https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert is_same_tree(candidate(root = tree_node([3, 1, 4, None, 2])), tree_node([7, 10, 4, None, 9]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5])), tree_node([15, None, 14, None, 12, None, 9, None, 5]))\n assert is_same_tree(candidate(root = tree_node([5, 2, 13])), tree_node([18, 20, 13]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18])), tree_node([43, 55, 33, 58, 50, None, 18]))\n assert is_same_tree(candidate(root = tree_node([1, None, 3, None, None, 2])), tree_node([4, None, 3]))\n assert is_same_tree(candidate(root = tree_node([3, 2, 4, 1])), tree_node([7, 9, 4, 10]))\n assert is_same_tree(candidate(root = tree_node([5, None, 14])), tree_node([19, None, 14]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175])), tree_node([550, 675, 325, 700, 625, 450, 175]))\n assert is_same_tree(candidate(root = tree_node([4, 1, 6, 0, 2, 5, 7, None, None, None, 3, None, None, None, 8])), tree_node([30, 36, 21, 36, 35, 26, 15, None, None, None, 33, None, None, None, 8]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3])), tree_node([6, None, 5, None, 3]))\n assert is_same_tree(candidate(root = tree_node([0, None, 1])), tree_node([1, None, 1]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, None, 7, 13, None, None, 8])), tree_node([38, 58, 15, None, 53, 28, None, None, 46]))\n assert candidate(root = tree_node([])) == None\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 130, 160, 180])), tree_node([1130, 1395, 665, 1450, 1285, 920, 355, 1460, 1425, 1345, 1210, 1030, 795, 515, 180]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 2, 7, 12, 18, 23, 27, 32, 37])), tree_node([229, 284, 134, 296, 262, 186, 72, 298, 291, 274, 247, 209, 161, 104, 37]))\n assert is_same_tree(candidate(root = tree_node([2, 1, 4, None, None, 3, 5])), tree_node([14, 15, 9, None, None, 12, 5]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 8, 2, 4, 6, 9, 1, None, None, None, None, None, None, 10])), tree_node([38, 45, 27, 47, 42, 33, 19, 48, None, None, None, None, None, None, 10]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10])), tree_node([55, None, 54, None, 52, None, 49, None, 45, None, 40, None, 34, None, 27, None, 19, None, 10]))\n assert is_same_tree(candidate(root = tree_node([9, 4, 17, 3, 7, 12, 22, 1, 5, None, 8, 11, 15, 18, 26])), tree_node([130, 149, 83, 157, 145, 110, 48, 158, 154, None, 138, 121, 98, 66, 26]))\n assert is_same_tree(candidate(root = tree_node([15, 7, 20, None, 10, 18, 23, None, None, 9, 11, 16, 19, None, None, None, None, None, 17])), tree_node([148, 165, 95, None, 158, 124, 42, None, None, 133, 106, 75, 19, None, None, None, None, None, 59]))\n assert is_same_tree(candidate(root = tree_node([-2147483648, None, 2147483647])), tree_node([-1, None, 2147483647]))\n assert is_same_tree(candidate(root = tree_node([30, 10, 50, 5, 15, 40, 60, 2, 7, 12, 18, 35, 45, 55, 65])), tree_node([380, 435, 230, 447, 413, 315, 125, 449, 442, 425, 398, 350, 275, 180, 65]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190])), tree_node([1150, 1415, 675, 1470, 1305, 940, 365, 1480, 1445, 1365, 1230, 1050, 815, 525, 190]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, None, 12, 20])), tree_node([75, 93, 65, 96, 82, None, 38, 97, None, 88, None, 50, 20]))\n assert is_same_tree(candidate(root = tree_node([12, 7, 17, 4, 9, 14, 20, 2, 5, 8, 11, 13, 16, 18, 22, None, None, None, None, 6, None, 10, None, None, None, None, None, None, None, 15, 19, None, None, 21, None, 23])), tree_node([189, 261, 134, 270, 240, 164, 99, 272, 266, 248, 200, 177, 150, 117, 41, None, None, None, None, 254, None, 210, None, None, None, None, None, None, None, 56, 19, None, None, 231, None, 79]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13])), tree_node([45, 65, 37, 66, 58, None, 14, None, None, 62, 52, 27]))\n assert is_same_tree(candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 6, 9, 11, 13, 18, 22, 28])), tree_node([144, 190, 73, 207, 169, 111, 25, 213, 199, 180, 157, 129, 95, 53]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 8, 2, 4, 7, 9, 1, None, None, None, 6, None, None, 10])), tree_node([45, 52, 27, 54, 49, 34, 19, 55, None, None, None, 40, None, None, 10]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13, None, 14, None, 15])), tree_node([120, None, 119, None, 117, None, 114, None, 110, None, 105, None, 99, None, 92, None, 84, None, 75, None, 65, None, 54, None, 42, None, 29, None, 15]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9])), tree_node([45, None, 44, None, 42, None, 39, None, 35, None, 30, None, 24, None, 17, None, 9]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 18, 22, 28, 32, 38, 45])), tree_node([273, 348, 158, 370, 315, 220, 85, 375, 360, 333, 295, 248, 190, 123, 45]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, 4, 7, 9, 13, None, None, None, None, None, None, None, 12, 15])), tree_node([72, 97, 64, 102, 87, None, 14, None, 101, 94, 81, 42, None, None, None, None, None, None, None, 54, 29]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 130, 160, 180, None, None, None, None, None, None, 12, None, 35, None, None, None, None, 95, None, None, 145, None, 190])), tree_node([1450, 1872, 760, 1927, 1762, 1015, 355, 1937, 1902, 1822, 1530, 1125, 890, 610, 180, None, None, None, None, None, None, 1542, None, 1160, None, None, None, None, 450, None, None, 1687, None, 1350]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, 5, 9, 20, None, None, 2, 6, None, 12, None, None, None, None, 8, 11, 13, 19, 21])), tree_node([95, 151, 35, 152, 146, 88, 20, None, None, 148, 112, None, 66, None, None, None, None, 120, 106, 79, 54, 141]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, None, 4, 7, 13, None, None, None, None, None, 11])), tree_node([56, 76, 48, 77, 69, None, 14, None, None, 73, 63, 27, None, None, None, None, None, 38]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, 5, 9, 20, None, None, 4, 6, 8, 13, None, None, 17, 22])), tree_node([72, 129, 35, 130, 83, 57, 20, None, None, 109, 78, 65, 48, None, None, 126, 105]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, None, 35, 45, 55, 65, None, 75, None, 90])), tree_node([455, 605, 225, 625, 540, 350, 155, 725, None, 575, 500, 405, 290, None, 75, None, 715]))\n assert is_same_tree(candidate(root = tree_node([1, 0, 2, None, -1])), tree_node([3, 2, 2, None, 2]))\n assert is_same_tree(candidate(root = tree_node([-10, -5, 0, None, -8, -3, -1])), tree_node([-14, -27, -1, None, -22, -4, -1]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, None, 6, 9, 12, None, 5, 7, 11, 13])), tree_node([70, 84, 35, None, 81, 55, 12, None, 75, 62, 46, 25]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, 3, 6, 8, None, None, None, None, None, 17])), tree_node([45, 71, 35, 93, 60, None, 20, 94, 91, 66, 53, None, None, None, None, None, 88]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 10, 40, 60, 80, 5, 20, None, 45, 55, 65, 75, 90])), tree_node([545, 660, 315, 690, 630, 440, 170, 695, 680, None, 590, 495, 380, 245, 90]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, 13, 17])), tree_node([73, 99, 63, 102, 88, None, 35, 103, None, 94, 81, 48, 17]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, None, 9, 20, None, 2, None, 18])), tree_node([69, 72, 35, 75, None, 62, 20, None, 74, None, 53]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 9, 14, 17, 20])), tree_node([74, 101, 64, 104, 90, None, 35, 105, None, 96, 83, 49, 17, 125]))\n assert is_same_tree(candidate(root = tree_node([2, 1, 3])), tree_node([5, 6, 3]))\n assert is_same_tree(candidate(root = tree_node([5, None, -3, 2, None, None, -1, None, 4])), tree_node([7, None, -3, 2, None, None, 0, None, 1]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 12, 18, 23, 28, 33, 38])), tree_node([232, 287, 136, 299, 265, 189, 73, 302, 294, 277, 250, 212, 164, 106, 38]))\n assert is_same_tree(candidate(root = tree_node([-10, 5, None, 3, 7, -3, None, -5, None, None, 8])), tree_node([-10, -3, None, 0, -3, 5, None, -8, None, None, 8]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, None, 30, 5, 13, 16, 19, None, 28, 35])), tree_node([103, 171, 83, 194, 140, None, 58, 199, 184, 156, 122, None, 28, 234]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 28, 33, 38, 45])), tree_node([274, 348, 158, 370, 316, 221, 85, 375, 360, 333, 296, 249, 191, 123, 45]))\n assert is_same_tree(candidate(root = tree_node([60, 30, 90, 15, 45, 75, 105, 5, 25, 40, 55, 70, 85, 100, 110])), tree_node([695, 865, 405, 905, 795, 565, 215, 910, 890, 835, 750, 635, 490, 315, 110]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8, None, None, None, None, 14, 19])), tree_node([43, 102, 33, 105, 58, None, 18, 106, None, 83, 51, None, None, None, None, 97, 77]))\n assert is_same_tree(candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 5, 9, 11, 13, 14, 18, 22, 27])), tree_node([157, 203, 94, 220, 182, 128, 52, 225, 212, 193, 170, 142, 112, 74, 27]))\n assert is_same_tree(candidate(root = tree_node([15, 9, 20, 7, 12, 17, 25, 5, 8, 11, 13, 16, 19, 23, 27])), tree_node([162, 207, 95, 222, 187, 131, 52, 227, 215, 198, 175, 147, 114, 75, 27]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])), tree_node([71, 99, 39, 112, 87, 58, 22, 120, 108, 97, 82, 70, 52, 36, 15]))\n assert is_same_tree(candidate(root = tree_node([21, 7, 32, 3, 14, 28, 37, 2, 5, 9, 16, 24, 30, 35, 40])), tree_node([247, 293, 144, 301, 277, 202, 77, 303, 298, 286, 263, 226, 174, 112, 40]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 30, 10, 17, 25, 35, 5, 12, 16, 18, 22, 28, 33, 40])), tree_node([233, 299, 138, 321, 268, 191, 75, 326, 311, 284, 251, 213, 166, 108, 40]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 27, 32, 37, 42])), tree_node([268, 342, 154, 364, 310, 216, 82, 369, 354, 327, 290, 243, 186, 119, 42]))\n assert is_same_tree(candidate(root = tree_node([50, 20, 70, 10, 30, 60, 80, 5, 15, 25, 35, 55, 65, 75, 85])), tree_node([540, 650, 310, 675, 605, 435, 165, 680, 665, 630, 575, 490, 375, 240, 85]))\n assert is_same_tree(candidate(root = tree_node([30, 20, 40, 15, 25, 35, 45, 10, 18, 23, 28, 32, 38, 43, 48])), tree_node([311, 407, 176, 440, 364, 249, 93, 450, 425, 387, 339, 281, 214, 136, 48]))\n assert is_same_tree(candidate(root = tree_node([5, 2, 13, 1, 4, 9, 21, 0, None, None, 6, 8, 11, 19, None])), tree_node([86, 98, 53, 99, 96, 73, 21, 99, None, None, 92, 81, 64, 40]))\n assert is_same_tree(candidate(root = tree_node([5, 2, 13, 1, 4, 9, 18, None, None, 3, 6, 7, 12, 15, None, None, None, None, None, None, 14, 19])), tree_node([112, 127, 46, 128, 122, 86, 18, None, None, 125, 118, 107, 58, 33, None, None, None, None, None, None, 100, 77]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 40, 60, 90, 110, 140, 160, 190, 5, 15, 28, 45, 65, 85, 105, 135, 155, 178, 188, 200])), tree_node([1871, 2536, 675, 2674, 2276, 1328, 365, 2699, 2621, 2421, 2096, 1616, 1015, 525, 190, 2704, 2689, 2649, 2581, 2486, 2361, 2201, 2006, 1771, 1506, 1203, 875]))\n assert is_same_tree(candidate(root = tree_node([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])), tree_node([17, 34, 10, 47, 22, 16, 7, 55, 43, 32]))\n assert is_same_tree(candidate(root = tree_node([5, 3, 8, 1, 4, 7, 9, None, 2, None, None, None, None, None, 10])), tree_node([39, 46, 27, 49, 43, 34, 19, None, 48, None, None, None, None, None, 10]))\n assert is_same_tree(candidate(root = tree_node([3, 2, 5, 1, None, 4, 6, None, None, None, None, None, 7])), tree_node([25, 27, 18, 28, None, 22, 13, None, None, None, None, None, 7]))\n assert is_same_tree(candidate(root = tree_node([20, 10, 30, 5, 15, 25, 35, 3, 7, 13, 17, 23, 27, 33, 37, 1, 4, 6, 8, 11, 14, 16, 19, 21, 24, 26, 29, 31, 34, 36, 39, 41, 43, 44])), tree_node([470, 585, 275, 611, 537, 382, 147, 662, 600, 564, 506, 429, 331, 214, 76, 706, 615, 606, 593, 575, 551, 522, 489, 450, 406, 357, 304, 245, 181, 112, 39, 747, 705, 659]))\n assert is_same_tree(candidate(root = tree_node([50, 25, 75, 10, 30, 60, 90, 5, 15, 20, 35, 55, 65, 85, 100])), tree_node([580, 690, 350, 715, 645, 475, 190, 720, 705, 665, 615, 530, 415, 275, 100]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 80, 110, 140, 160, 190, 5, 15, 20, 35, 55, 65, 70, 85, 105, 115, 135, 145, 155, 170, 180, 195, None, None, None, None, None, None, None, None, None, None, 40, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 120])), tree_node([2470, 3050, 1495, 3160, 2780, 2040, 860, 3185, 3115, 2945, 2635, 2265, 1780, 1190, 505, 3190, 3175, 3135, 3085, 3000, 2845, 2705, 2555, 2370, 2155, 1915, 1640, 1345, 1030, 685, 195, None, None, None, None, None, None, None, None, None, None, 2885, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, 315]))\n assert is_same_tree(candidate(root = tree_node([50, 20, 70, 10, 30, 60, 80, 5, 15, 25, 35, 55, 65, 75, 85, None, None, None, None, None, None, None, 1, None, None, None, None, None, 4, 8, 9, None, None, 17, 33, 34, 36, None, None, None, 76, None, None, 86, None, None, 95, None, None, 99])), tree_node([1037, 1148, 807, 1173, 1103, 932, 532, 1178, 1163, 1128, 1073, 987, 872, 737, 94, None, None, None, None, None, None, None, 1038, None, None, None, None, None, 569, 233, 9, None, None, 662, 565, 267, 225, None, None, None, 645, None, None, 353, None, None, 189, None, None, 452]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 35, 60, 90, 110, 140, 160, 190])), tree_node([1150, 1425, 675, 1485, 1315, 940, 365, 1495, 1460, 1375, 1240, 1050, 815, 525, 190]))\n assert is_same_tree(candidate(root = tree_node([2147483647])), tree_node([2147483647]))\n assert is_same_tree(candidate(root = tree_node([5, 2, 13, 1, 3, 9, 21, None, None, None, None, 7, 15, None, None, 17, None, None, None, 25])), tree_node([112, 117, 34, 118, 115, 58, 21, None, None, None, None, 65, 49, None, None, 82, None, None, None, 107]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, 5, None, 20, None, None, 4, 6])), tree_node([42, 60, 35, 61, 53, None, 20, None, None, 57, 48]))\n assert is_same_tree(candidate(root = tree_node([20, 15, 25, 10, 18, 22, 30, 5, 12, 16, 19, 21, 24, 27, 35])), tree_node([204, 272, 117, 294, 241, 163, 65, 299, 284, 257, 223, 184, 141, 92, 35]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 13, None, 7, 10, 17, 1, None, None, 8, None, None, 11, 14])), tree_node([56, 92, 30, None, 63, 48, 17, 78, None, None, 38, None, None, 89, 77]))\n assert is_same_tree(candidate(root = tree_node([90, 45, 135, 20, 70, 110, 160, 10, 30, 50, 80, 105, 125, 145, 175])), tree_node([1045, 1290, 615, 1340, 1195, 850, 335, 1350, 1320, 1245, 1125, 955, 740, 480, 175]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 13, 1, 5, 10, 18, 0, 2, 4, 7, 9, 11, 14, 20, None, None, None, None, None, 6])), tree_node([103, 128, 65, 131, 115, 86, 38, 131, 130, 125, 110, 95, 76, 52, 20, None, None, None, None, None, 121]))\n assert is_same_tree(candidate(root = tree_node([30, 15, 45, 10, 20, 40, 50, 5, 12, 18, 23, 35, 43, 48, 55])), tree_node([346, 422, 198, 444, 389, 281, 105, 449, 434, 407, 369, 316, 241, 153, 55]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, 6, 8])), tree_node([43, 69, 33, 72, 58, None, 18, 73, None, 64, 51]))\n assert is_same_tree(candidate(root = tree_node([12, 7, 15, 5, 8, 13, 18, 3, 6, 9, 11, 14, 17, 20])), tree_node([109, 144, 53, 155, 128, 83, 18, 158, 150, 137, 120, 97, 70, 38]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, 17, 22, 28, 32, 38, 45])), tree_node([273, 347, 158, 369, 315, 220, 85, 374, 359, 332, 295, 248, 190, 123, 45]))\n assert is_same_tree(candidate(root = tree_node([100, 50, 150, 25, 75, 125, 175, 10, 30, 60, 85, 110, 140, 160, 190])), tree_node([1150, 1420, 675, 1475, 1310, 940, 365, 1485, 1450, 1370, 1235, 1050, 815, 525, 190]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, 1, 5, 9, 20, None, 2, 4, 6, 8, 12, 17, 25])), tree_node([113, 131, 77, 134, 124, 98, 45, None, 133, 128, 119, 106, 89, 62, 25]))\n assert is_same_tree(candidate(root = tree_node([25, 15, 35, 10, 20, 30, 40, 5, 12, None, 17, 22, 28, 33, 45])), tree_node([258, 310, 153, 332, 295, 211, 85, 337, 322, None, 275, 233, 181, 118, 45]))\n assert is_same_tree(candidate(root = tree_node([75, 35, 115, 15, 55, 85, 145, 10, 25, 45, 65, 78, 105, 135, 165])), tree_node([903, 1103, 560, 1143, 1023, 750, 310, 1153, 1128, 1068, 968, 828, 665, 445, 165]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 13, None, 7, 10, 17, 1, None, 5, 9, 12, 15, None, 16])), tree_node([89, 116, 57, None, 96, 76, 32, 113, None, 81, 66, 44, 15, None, 112]))\n assert is_same_tree(candidate(root = tree_node([1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None, 8, None, 9, None, 10, None, 11, None, 12, None, 13])), tree_node([91, None, 90, None, 88, None, 85, None, 81, None, 76, None, 70, None, 63, None, 55, None, 46, None, 36, None, 25, None, 13]))\n assert is_same_tree(candidate(root = tree_node([7, 3, 15, None, 5, 9, 20, None, None, 4, 6, 8, 11, 19, 25, None, 17, 18, 21, 23, 27, 26, 28, None, None, None, None, None, 22, None, None, 24, None, None, None, None, None, None, 29, None, None, 30])), tree_node([389, 397, 219, None, 394, 251, 135, None, None, 280, 242, 164, 38, 356, 276, None, 236, 204, 156, 61, 27, 382, 337, None, None, None, None, None, 186, None, None, 85, None, None, None, None, None, None, 309, None, None, 115]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 3, 7, None, 18, 1, None, None, 6, None, 19])), tree_node([62, 80, 52, 83, 75, None, 37, 84, None, None, 68, None, 19]))\n assert is_same_tree(candidate(root = tree_node([15, 10, 20, 8, 12, 16, 25, 5, 9, 11, 13, 17, 22, 28])), tree_node([143, 189, 73, 206, 168, 111, 25, 211, 198, 179, 156, 128, 95, 53]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, 4, 7, 13, None, None, 9])), tree_node([32, 61, 24, 75, 51, None, 14, None, 65, 58, 45, None, None, 74]))\n assert is_same_tree(candidate(root = tree_node([8, 3, 10, 1, 6, None, 14, None, 4, 7, 13, None, None, 11, 15])), tree_node([32, 61, 24, 92, 51, None, 14, None, 80, 58, 45, None, None, 91, 76]))\n assert is_same_tree(candidate(root = tree_node([12, 7, 17, 5, 9, 14, 20, 3, 6, 8, 11, 13, 16, 19, 22])), tree_node([133, 168, 78, 179, 153, 108, 42, 182, 174, 161, 144, 121, 94, 61, 22]))\n assert is_same_tree(candidate(root = tree_node([50, 30, 70, 20, 40, 60, 80, 10, 25, 35, 45, 55, 65, 75, 90])), tree_node([545, 695, 315, 740, 630, 440, 170, 750, 720, 665, 590, 495, 380, 245, 90]))\n assert is_same_tree(candidate(root = tree_node([10, 5, 15, 2, 7, None, 20, 1, None, 6, None, None, None, 18])), tree_node([45, 63, 35, 65, 52, None, 20, 66, None, 58, None, None, None, 84]))\n"}, "metadata": {"canonical_parameter_names": ["root"], "leetcode_dataset_entry_point": "Solution().convertBST", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "TreeNode* convertBST(TreeNode* root) {", "container": "Solution", "callable": "convertBST", "parameters": [{"name": "root", "type": "TreeNode*"}], "return_type": "TreeNode*", "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:\nInput: timePoints = [\"23:59\",\"00:00\"]\nOutput: 1\nExample 2:\nInput: timePoints = [\"00:00\",\"23:59\",\"00:00\"]\nOutput: 0\n\n \nConstraints:\n\n2 <= timePoints.length <= 2 * 104\ntimePoints[i] is in the format \"HH:MM\".\n\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"}, "metadata": {"canonical_parameter_names": ["timePoints"], "leetcode_dataset_entry_point": "Solution().findMinDifference", "problem_source": "newfacade/LeetCodeDataset", "interface_source": "leetcode/codeSnippets"}, "language": "cpp", "interface": {"raw_signature": "int findMinDifference(vector& timePoints) {", "container": "Solution", "callable": "findMinDifference", "parameters": [{"name": "timePoints", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"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": "cpp", "interface": {"raw_signature": "vector twoSum(vector& nums, int target) {", "container": "Solution", "callable": "twoSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int lengthOfLongestSubstring(string s) {", "container": "Solution", "callable": "lengthOfLongestSubstring", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "double findMedianSortedArrays(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "findMedianSortedArrays", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "double", "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": "cpp", "interface": {"raw_signature": "string longestPalindrome(string s) {", "container": "Solution", "callable": "longestPalindrome", "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": "cpp", "interface": {"raw_signature": "string convert(string s, int numRows) {", "container": "Solution", "callable": "convert", "parameters": [{"name": "s", "type": "string"}, {"name": "numRows", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "int reverse(int x) {", "container": "Solution", "callable": "reverse", "parameters": [{"name": "x", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int myAtoi(string s) {", "container": "Solution", "callable": "myAtoi", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isPalindrome(int x) {", "container": "Solution", "callable": "isPalindrome", "parameters": [{"name": "x", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool isMatch(string s, string p) {", "container": "Solution", "callable": "isMatch", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int maxArea(vector& height) {", "container": "Solution", "callable": "maxArea", "parameters": [{"name": "height", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string intToRoman(int num) {", "container": "Solution", "callable": "intToRoman", "parameters": [{"name": "num", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "int romanToInt(string s) {", "container": "Solution", "callable": "romanToInt", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string longestCommonPrefix(vector& strs) {", "container": "Solution", "callable": "longestCommonPrefix", "parameters": [{"name": "strs", "type": "vector&"}], "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": "cpp", "interface": {"raw_signature": "vector> threeSum(vector& nums) {", "container": "Solution", "callable": "threeSum", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int threeSumClosest(vector& nums, int target) {", "container": "Solution", "callable": "threeSumClosest", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector letterCombinations(string digits) {", "container": "Solution", "callable": "letterCombinations", "parameters": [{"name": "digits", "type": "string"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector> fourSum(vector& nums, int target) {", "container": "Solution", "callable": "fourSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "bool isValid(string s) {", "container": "Solution", "callable": "isValid", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int strStr(string haystack, string needle) {", "container": "Solution", "callable": "strStr", "parameters": [{"name": "haystack", "type": "string"}, {"name": "needle", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int divide(int dividend, int divisor) {", "container": "Solution", "callable": "divide", "parameters": [{"name": "dividend", "type": "int"}, {"name": "divisor", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findSubstring(string s, vector& words) {", "container": "Solution", "callable": "findSubstring", "parameters": [{"name": "s", "type": "string"}, {"name": "words", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int longestValidParentheses(string s) {", "container": "Solution", "callable": "longestValidParentheses", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int search(vector& nums, int target) {", "container": "Solution", "callable": "search", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector searchRange(vector& nums, int target) {", "container": "Solution", "callable": "searchRange", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int searchInsert(vector& nums, int target) {", "container": "Solution", "callable": "searchInsert", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isValidSudoku(vector>& board) {", "container": "Solution", "callable": "isValidSudoku", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string countAndSay(int n) {", "container": "Solution", "callable": "countAndSay", "parameters": [{"name": "n", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "vector> combinationSum(vector& candidates, int target) {", "container": "Solution", "callable": "combinationSum", "parameters": [{"name": "candidates", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> combinationSum2(vector& candidates, int target) {", "container": "Solution", "callable": "combinationSum2", "parameters": [{"name": "candidates", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int firstMissingPositive(vector& nums) {", "container": "Solution", "callable": "firstMissingPositive", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int trap(vector& height) {", "container": "Solution", "callable": "trap", "parameters": [{"name": "height", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string multiply(string num1, string num2) {", "container": "Solution", "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": "cpp", "interface": {"raw_signature": "bool isMatch(string s, string p) {", "container": "Solution", "callable": "isMatch", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int jump(vector& nums) {", "container": "Solution", "callable": "jump", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> permute(vector& nums) {", "container": "Solution", "callable": "permute", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> permuteUnique(vector& nums) {", "container": "Solution", "callable": "permuteUnique", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> groupAnagrams(vector& strs) {", "container": "Solution", "callable": "groupAnagrams", "parameters": [{"name": "strs", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "double myPow(double x, int n) {", "container": "Solution", "callable": "myPow", "parameters": [{"name": "x", "type": "double"}, {"name": "n", "type": "int"}], "return_type": "double", "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": "cpp", "interface": {"raw_signature": "int maxSubArray(vector& nums) {", "container": "Solution", "callable": "maxSubArray", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector spiralOrder(vector>& matrix) {", "container": "Solution", "callable": "spiralOrder", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool canJump(vector& nums) {", "container": "Solution", "callable": "canJump", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector> merge(vector>& intervals) {", "container": "Solution", "callable": "merge", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> insert(vector>& intervals, vector& newInterval) {", "container": "Solution", "callable": "insert", "parameters": [{"name": "intervals", "type": "vector>&"}, {"name": "newInterval", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> generateMatrix(int n) {", "container": "Solution", "callable": "generateMatrix", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "string getPermutation(int n, int k) {", "container": "Solution", "callable": "getPermutation", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "int uniquePaths(int m, int n) {", "container": "Solution", "callable": "uniquePaths", "parameters": [{"name": "m", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int uniquePathsWithObstacles(vector>& obstacleGrid) {", "container": "Solution", "callable": "uniquePathsWithObstacles", "parameters": [{"name": "obstacleGrid", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minPathSum(vector>& grid) {", "container": "Solution", "callable": "minPathSum", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isNumber(string s) {", "container": "Solution", "callable": "isNumber", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector plusOne(vector& digits) {", "container": "Solution", "callable": "plusOne", "parameters": [{"name": "digits", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string addBinary(string a, string b) {", "container": "Solution", "callable": "addBinary", "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": "cpp", "interface": {"raw_signature": "vector fullJustify(vector& words, int maxWidth) {", "container": "Solution", "callable": "fullJustify", "parameters": [{"name": "words", "type": "vector&"}, {"name": "maxWidth", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int mySqrt(int x) {", "container": "Solution", "callable": "mySqrt", "parameters": [{"name": "x", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int climbStairs(int n) {", "container": "Solution", "callable": "climbStairs", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string simplifyPath(string path) {", "container": "Solution", "callable": "simplifyPath", "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": "cpp", "interface": {"raw_signature": "int minDistance(string word1, string word2) {", "container": "Solution", "callable": "minDistance", "parameters": [{"name": "word1", "type": "string"}, {"name": "word2", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool searchMatrix(vector>& matrix, int target) {", "container": "Solution", "callable": "searchMatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "target", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string minWindow(string s, string t) {", "container": "Solution", "callable": "minWindow", "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": "cpp", "interface": {"raw_signature": "vector> combine(int n, int k) {", "container": "Solution", "callable": "combine", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector> subsets(vector& nums) {", "container": "Solution", "callable": "subsets", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "bool exist(vector>& board, string word) {", "container": "Solution", "callable": "exist", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "word", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool search(vector& nums, int target) {", "container": "Solution", "callable": "search", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int largestRectangleArea(vector& heights) {", "container": "Solution", "callable": "largestRectangleArea", "parameters": [{"name": "heights", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maximalRectangle(vector>& matrix) {", "container": "Solution", "callable": "maximalRectangle", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isScramble(string s1, string s2) {", "container": "Solution", "callable": "isScramble", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector grayCode(int n) {", "container": "Solution", "callable": "grayCode", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector> subsetsWithDup(vector& nums) {", "container": "Solution", "callable": "subsetsWithDup", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int numDecodings(string s) {", "container": "Solution", "callable": "numDecodings", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector restoreIpAddresses(string s) {", "container": "Solution", "callable": "restoreIpAddresses", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int numTrees(int n) {", "container": "Solution", "callable": "numTrees", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isInterleave(string s1, string s2, string s3) {", "container": "Solution", "callable": "isInterleave", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}, {"name": "s3", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int numDistinct(string s, string t) {", "container": "Solution", "callable": "numDistinct", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> generate(int numRows) {", "container": "Solution", "callable": "generate", "parameters": [{"name": "numRows", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector getRow(int rowIndex) {", "container": "Solution", "callable": "getRow", "parameters": [{"name": "rowIndex", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int minimumTotal(vector>& triangle) {", "container": "Solution", "callable": "minimumTotal", "parameters": [{"name": "triangle", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int ladderLength(string beginWord, string endWord, vector& wordList) {", "container": "Solution", "callable": "ladderLength", "parameters": [{"name": "beginWord", "type": "string"}, {"name": "endWord", "type": "string"}, {"name": "wordList", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int longestConsecutive(vector& nums) {", "container": "Solution", "callable": "longestConsecutive", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> partition(string s) {", "container": "Solution", "callable": "partition", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int minCut(string s) {", "container": "Solution", "callable": "minCut", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int canCompleteCircuit(vector& gas, vector& cost) {", "container": "Solution", "callable": "canCompleteCircuit", "parameters": [{"name": "gas", "type": "vector&"}, {"name": "cost", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int candy(vector& ratings) {", "container": "Solution", "callable": "candy", "parameters": [{"name": "ratings", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool wordBreak(string s, vector& wordDict) {", "container": "Solution", "callable": "wordBreak", "parameters": [{"name": "s", "type": "string"}, {"name": "wordDict", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector wordBreak(string s, vector& wordDict) {", "container": "Solution", "callable": "wordBreak", "parameters": [{"name": "s", "type": "string"}, {"name": "wordDict", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int maxPoints(vector>& points) {", "container": "Solution", "callable": "maxPoints", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int evalRPN(vector& tokens) {", "container": "Solution", "callable": "evalRPN", "parameters": [{"name": "tokens", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxProduct(vector& nums) {", "container": "Solution", "callable": "maxProduct", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findMin(vector& nums) {", "container": "Solution", "callable": "findMin", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findMin(vector& nums) {", "container": "Solution", "callable": "findMin", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findPeakElement(vector& nums) {", "container": "Solution", "callable": "findPeakElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maximumGap(vector& nums) {", "container": "Solution", "callable": "maximumGap", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int compareVersion(string version1, string version2) {", "container": "Solution", "callable": "compareVersion", "parameters": [{"name": "version1", "type": "string"}, {"name": "version2", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string fractionToDecimal(int numerator, int denominator) {", "container": "Solution", "callable": "fractionToDecimal", "parameters": [{"name": "numerator", "type": "int"}, {"name": "denominator", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "vector twoSum(vector& numbers, int target) {", "container": "Solution", "callable": "twoSum", "parameters": [{"name": "numbers", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string convertToTitle(int columnNumber) {", "container": "Solution", "callable": "convertToTitle", "parameters": [{"name": "columnNumber", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "int majorityElement(vector& nums) {", "container": "Solution", "callable": "majorityElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int titleToNumber(string columnTitle) {", "container": "Solution", "callable": "titleToNumber", "parameters": [{"name": "columnTitle", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int trailingZeroes(int n) {", "container": "Solution", "callable": "trailingZeroes", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int calculateMinimumHP(vector>& dungeon) {", "container": "Solution", "callable": "calculateMinimumHP", "parameters": [{"name": "dungeon", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string largestNumber(vector& nums) {", "container": "Solution", "callable": "largestNumber", "parameters": [{"name": "nums", "type": "vector&"}], "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": "cpp", "interface": {"raw_signature": "vector findRepeatedDnaSequences(string s) {", "container": "Solution", "callable": "findRepeatedDnaSequences", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int maxProfit(int k, vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "k", "type": "int"}, {"name": "prices", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int hammingWeight(int n) {", "container": "Solution", "callable": "hammingWeight", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int rob(vector& nums) {", "container": "Solution", "callable": "rob", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int numIslands(vector>& grid) {", "container": "Solution", "callable": "numIslands", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int rangeBitwiseAnd(int left, int right) {", "container": "Solution", "callable": "rangeBitwiseAnd", "parameters": [{"name": "left", "type": "int"}, {"name": "right", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isHappy(int n) {", "container": "Solution", "callable": "isHappy", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int countPrimes(int n) {", "container": "Solution", "callable": "countPrimes", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isIsomorphic(string s, string t) {", "container": "Solution", "callable": "isIsomorphic", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool canFinish(int numCourses, vector>& prerequisites) {", "container": "Solution", "callable": "canFinish", "parameters": [{"name": "numCourses", "type": "int"}, {"name": "prerequisites", "type": "vector>&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int minSubArrayLen(int target, vector& nums) {", "container": "Solution", "callable": "minSubArrayLen", "parameters": [{"name": "target", "type": "int"}, {"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findOrder(int numCourses, vector>& prerequisites) {", "container": "Solution", "callable": "findOrder", "parameters": [{"name": "numCourses", "type": "int"}, {"name": "prerequisites", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector findWords(vector>& board, vector& words) {", "container": "Solution", "callable": "findWords", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "words", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int rob(vector& nums) {", "container": "Solution", "callable": "rob", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string shortestPalindrome(string s) {", "container": "Solution", "callable": "shortestPalindrome", "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": "cpp", "interface": {"raw_signature": "int findKthLargest(vector& nums, int k) {", "container": "Solution", "callable": "findKthLargest", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> combinationSum3(int k, int n) {", "container": "Solution", "callable": "combinationSum3", "parameters": [{"name": "k", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "bool containsDuplicate(vector& nums) {", "container": "Solution", "callable": "containsDuplicate", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector> getSkyline(vector>& buildings) {", "container": "Solution", "callable": "getSkyline", "parameters": [{"name": "buildings", "type": "vector>&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "bool containsNearbyDuplicate(vector& nums, int k) {", "container": "Solution", "callable": "containsNearbyDuplicate", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool containsNearbyAlmostDuplicate(vector& nums, int indexDiff, int valueDiff) {", "container": "Solution", "callable": "containsNearbyAlmostDuplicate", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "indexDiff", "type": "int"}, {"name": "valueDiff", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int maximalSquare(vector>& matrix) {", "container": "Solution", "callable": "maximalSquare", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int computeArea(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) {", "container": "Solution", "callable": "computeArea", "parameters": [{"name": "ax1", "type": "int"}, {"name": "ay1", "type": "int"}, {"name": "ax2", "type": "int"}, {"name": "ay2", "type": "int"}, {"name": "bx1", "type": "int"}, {"name": "by1", "type": "int"}, {"name": "bx2", "type": "int"}, {"name": "by2", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int calculate(string s) {", "container": "Solution", "callable": "calculate", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int calculate(string s) {", "container": "Solution", "callable": "calculate", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector summaryRanges(vector& nums) {", "container": "Solution", "callable": "summaryRanges", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector majorityElement(vector& nums) {", "container": "Solution", "callable": "majorityElement", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool isPowerOfTwo(int n) {", "container": "Solution", "callable": "isPowerOfTwo", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int countDigitOne(int n) {", "container": "Solution", "callable": "countDigitOne", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector productExceptSelf(vector& nums) {", "container": "Solution", "callable": "productExceptSelf", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector maxSlidingWindow(vector& nums, int k) {", "container": "Solution", "callable": "maxSlidingWindow", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool searchMatrix(vector>& matrix, int target) {", "container": "Solution", "callable": "searchMatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "target", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector diffWaysToCompute(string expression) {", "container": "Solution", "callable": "diffWaysToCompute", "parameters": [{"name": "expression", "type": "string"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool isAnagram(string s, string t) {", "container": "Solution", "callable": "isAnagram", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int addDigits(int num) {", "container": "Solution", "callable": "addDigits", "parameters": [{"name": "num", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector singleNumber(vector& nums) {", "container": "Solution", "callable": "singleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool isUgly(int n) {", "container": "Solution", "callable": "isUgly", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int nthUglyNumber(int n) {", "container": "Solution", "callable": "nthUglyNumber", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int missingNumber(vector& nums) {", "container": "Solution", "callable": "missingNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string numberToWords(int num) {", "container": "Solution", "callable": "numberToWords", "parameters": [{"name": "num", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "int hIndex(vector& citations) {", "container": "Solution", "callable": "hIndex", "parameters": [{"name": "citations", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int hIndex(vector& citations) {", "container": "Solution", "callable": "hIndex", "parameters": [{"name": "citations", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int numSquares(int n) {", "container": "Solution", "callable": "numSquares", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector addOperators(string num, int target) {", "container": "Solution", "callable": "addOperators", "parameters": [{"name": "num", "type": "string"}, {"name": "target", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int findDuplicate(vector& nums) {", "container": "Solution", "callable": "findDuplicate", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool wordPattern(string pattern, string s) {", "container": "Solution", "callable": "wordPattern", "parameters": [{"name": "pattern", "type": "string"}, {"name": "s", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool canWinNim(int n) {", "container": "Solution", "callable": "canWinNim", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string getHint(string secret, string guess) {", "container": "Solution", "callable": "getHint", "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": "cpp", "interface": {"raw_signature": "int lengthOfLIS(vector& nums) {", "container": "Solution", "callable": "lengthOfLIS", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isAdditiveNumber(string num) {", "container": "Solution", "callable": "isAdditiveNumber", "parameters": [{"name": "num", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findMinHeightTrees(int n, vector>& edges) {", "container": "Solution", "callable": "findMinHeightTrees", "parameters": [{"name": "n", "type": "int"}, {"name": "edges", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int maxCoins(vector& nums) {", "container": "Solution", "callable": "maxCoins", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int nthSuperUglyNumber(int n, vector& primes) {", "container": "Solution", "callable": "nthSuperUglyNumber", "parameters": [{"name": "n", "type": "int"}, {"name": "primes", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector countSmaller(vector& nums) {", "container": "Solution", "callable": "countSmaller", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string removeDuplicateLetters(string s) {", "container": "Solution", "callable": "removeDuplicateLetters", "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": "cpp", "interface": {"raw_signature": "int maxProduct(vector& words) {", "container": "Solution", "callable": "maxProduct", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int bulbSwitch(int n) {", "container": "Solution", "callable": "bulbSwitch", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector maxNumber(vector& nums1, vector& nums2, int k) {", "container": "Solution", "callable": "maxNumber", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int coinChange(vector& coins, int amount) {", "container": "Solution", "callable": "coinChange", "parameters": [{"name": "coins", "type": "vector&"}, {"name": "amount", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isPowerOfThree(int n) {", "container": "Solution", "callable": "isPowerOfThree", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int countRangeSum(vector& nums, int lower, int upper) {", "container": "Solution", "callable": "countRangeSum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "lower", "type": "int"}, {"name": "upper", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int longestIncreasingPath(vector>& matrix) {", "container": "Solution", "callable": "longestIncreasingPath", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minPatches(vector& nums, int n) {", "container": "Solution", "callable": "minPatches", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isValidSerialization(string preorder) {", "container": "Solution", "callable": "isValidSerialization", "parameters": [{"name": "preorder", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector findItinerary(vector>& tickets) {", "container": "Solution", "callable": "findItinerary", "parameters": [{"name": "tickets", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool increasingTriplet(vector& nums) {", "container": "Solution", "callable": "increasingTriplet", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool isSelfCrossing(vector& distance) {", "container": "Solution", "callable": "isSelfCrossing", "parameters": [{"name": "distance", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector> palindromePairs(vector& words) {", "container": "Solution", "callable": "palindromePairs", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector countBits(int n) {", "container": "Solution", "callable": "countBits", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool isPowerOfFour(int n) {", "container": "Solution", "callable": "isPowerOfFour", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int integerBreak(int n) {", "container": "Solution", "callable": "integerBreak", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector topKFrequent(vector& nums, int k) {", "container": "Solution", "callable": "topKFrequent", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector intersection(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "intersection", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector intersect(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "intersect", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int maxEnvelopes(vector>& envelopes) {", "container": "Solution", "callable": "maxEnvelopes", "parameters": [{"name": "envelopes", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxSumSubmatrix(vector>& matrix, int k) {", "container": "Solution", "callable": "maxSumSubmatrix", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool canMeasureWater(int x, int y, int target) {", "container": "Solution", "callable": "canMeasureWater", "parameters": [{"name": "x", "type": "int"}, {"name": "y", "type": "int"}, {"name": "target", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool isPerfectSquare(int num) {", "container": "Solution", "callable": "isPerfectSquare", "parameters": [{"name": "num", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector largestDivisibleSubset(vector& nums) {", "container": "Solution", "callable": "largestDivisibleSubset", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int getSum(int a, int b) {", "container": "Solution", "callable": "getSum", "parameters": [{"name": "a", "type": "int"}, {"name": "b", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> kSmallestPairs(vector& nums1, vector& nums2, int k) {", "container": "Solution", "callable": "kSmallestPairs", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int getMoneyAmount(int n) {", "container": "Solution", "callable": "getMoneyAmount", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int wiggleMaxLength(vector& nums) {", "container": "Solution", "callable": "wiggleMaxLength", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int combinationSum4(vector& nums, int target) {", "container": "Solution", "callable": "combinationSum4", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int kthSmallest(vector>& matrix, int k) {", "container": "Solution", "callable": "kthSmallest", "parameters": [{"name": "matrix", "type": "vector>&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool canConstruct(string ransomNote, string magazine) {", "container": "Solution", "callable": "canConstruct", "parameters": [{"name": "ransomNote", "type": "string"}, {"name": "magazine", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector lexicalOrder(int n) {", "container": "Solution", "callable": "lexicalOrder", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int firstUniqChar(string s) {", "container": "Solution", "callable": "firstUniqChar", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "char findTheDifference(string s, string t) {", "container": "Solution", "callable": "findTheDifference", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "char", "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": "cpp", "interface": {"raw_signature": "int lastRemaining(int n) {", "container": "Solution", "callable": "lastRemaining", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool isRectangleCover(vector>& rectangles) {", "container": "Solution", "callable": "isRectangleCover", "parameters": [{"name": "rectangles", "type": "vector>&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool isSubsequence(string s, string t) {", "container": "Solution", "callable": "isSubsequence", "parameters": [{"name": "s", "type": "string"}, {"name": "t", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool validUtf8(vector& data) {", "container": "Solution", "callable": "validUtf8", "parameters": [{"name": "data", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string decodeString(string s) {", "container": "Solution", "callable": "decodeString", "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": "cpp", "interface": {"raw_signature": "int longestSubstring(string s, int k) {", "container": "Solution", "callable": "longestSubstring", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int maxRotateFunction(vector& nums) {", "container": "Solution", "callable": "maxRotateFunction", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int integerReplacement(int n) {", "container": "Solution", "callable": "integerReplacement", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector calcEquation(vector>& equations, vector& values, vector>& queries) {", "container": "Solution", "callable": "calcEquation", "parameters": [{"name": "equations", "type": "vector>&"}, {"name": "values", "type": "vector&"}, {"name": "queries", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int findNthDigit(int n) {", "container": "Solution", "callable": "findNthDigit", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector readBinaryWatch(int turnedOn) {", "container": "Solution", "callable": "readBinaryWatch", "parameters": [{"name": "turnedOn", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string removeKdigits(string num, int k) {", "container": "Solution", "callable": "removeKdigits", "parameters": [{"name": "num", "type": "string"}, {"name": "k", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "bool canCross(vector& stones) {", "container": "Solution", "callable": "canCross", "parameters": [{"name": "stones", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string toHex(int num) {", "container": "Solution", "callable": "toHex", "parameters": [{"name": "num", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "vector> reconstructQueue(vector>& people) {", "container": "Solution", "callable": "reconstructQueue", "parameters": [{"name": "people", "type": "vector>&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int trapRainWater(vector>& heightMap) {", "container": "Solution", "callable": "trapRainWater", "parameters": [{"name": "heightMap", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int longestPalindrome(string s) {", "container": "Solution", "callable": "longestPalindrome", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int splitArray(vector& nums, int k) {", "container": "Solution", "callable": "splitArray", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector fizzBuzz(int n) {", "container": "Solution", "callable": "fizzBuzz", "parameters": [{"name": "n", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int numberOfArithmeticSlices(vector& nums) {", "container": "Solution", "callable": "numberOfArithmeticSlices", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int thirdMax(vector& nums) {", "container": "Solution", "callable": "thirdMax", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string addStrings(string num1, string num2) {", "container": "Solution", "callable": "addStrings", "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": "cpp", "interface": {"raw_signature": "bool canPartition(vector& nums) {", "container": "Solution", "callable": "canPartition", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector> pacificAtlantic(vector>& heights) {", "container": "Solution", "callable": "pacificAtlantic", "parameters": [{"name": "heights", "type": "vector>&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int countBattleships(vector>& board) {", "container": "Solution", "callable": "countBattleships", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int strongPasswordChecker(string password) {", "container": "Solution", "callable": "strongPasswordChecker", "parameters": [{"name": "password", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findMaximumXOR(vector& nums) {", "container": "Solution", "callable": "findMaximumXOR", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string originalDigits(string s) {", "container": "Solution", "callable": "originalDigits", "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": "cpp", "interface": {"raw_signature": "int characterReplacement(string s, int k) {", "container": "Solution", "callable": "characterReplacement", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minMutation(string startGene, string endGene, vector& bank) {", "container": "Solution", "callable": "minMutation", "parameters": [{"name": "startGene", "type": "string"}, {"name": "endGene", "type": "string"}, {"name": "bank", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int eraseOverlapIntervals(vector>& intervals) {", "container": "Solution", "callable": "eraseOverlapIntervals", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findRightInterval(vector>& intervals) {", "container": "Solution", "callable": "findRightInterval", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector findAnagrams(string s, string p) {", "container": "Solution", "callable": "findAnagrams", "parameters": [{"name": "s", "type": "string"}, {"name": "p", "type": "string"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int findKthNumber(int n, int k) {", "container": "Solution", "callable": "findKthNumber", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int arrangeCoins(int n) {", "container": "Solution", "callable": "arrangeCoins", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findDuplicates(vector& nums) {", "container": "Solution", "callable": "findDuplicates", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int numberOfArithmeticSlices(vector& nums) {", "container": "Solution", "callable": "numberOfArithmeticSlices", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int numberOfBoomerangs(vector>& points) {", "container": "Solution", "callable": "numberOfBoomerangs", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector findDisappearedNumbers(vector& nums) {", "container": "Solution", "callable": "findDisappearedNumbers", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string frequencySort(string s) {", "container": "Solution", "callable": "frequencySort", "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": "cpp", "interface": {"raw_signature": "int findMinArrowShots(vector>& points) {", "container": "Solution", "callable": "findMinArrowShots", "parameters": [{"name": "points", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minMoves(vector& nums) {", "container": "Solution", "callable": "minMoves", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int fourSumCount(vector& nums1, vector& nums2, vector& nums3, vector& nums4) {", "container": "Solution", "callable": "fourSumCount", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}, {"name": "nums3", "type": "vector&"}, {"name": "nums4", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findContentChildren(vector& g, vector& s) {", "container": "Solution", "callable": "findContentChildren", "parameters": [{"name": "g", "type": "vector&"}, {"name": "s", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool find132pattern(vector& nums) {", "container": "Solution", "callable": "find132pattern", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "bool circularArrayLoop(vector& nums) {", "container": "Solution", "callable": "circularArrayLoop", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int poorPigs(int buckets, int minutesToDie, int minutesToTest) {", "container": "Solution", "callable": "poorPigs", "parameters": [{"name": "buckets", "type": "int"}, {"name": "minutesToDie", "type": "int"}, {"name": "minutesToTest", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool repeatedSubstringPattern(string s) {", "container": "Solution", "callable": "repeatedSubstringPattern", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int hammingDistance(int x, int y) {", "container": "Solution", "callable": "hammingDistance", "parameters": [{"name": "x", "type": "int"}, {"name": "y", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minMoves2(vector& nums) {", "container": "Solution", "callable": "minMoves2", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int islandPerimeter(vector>& grid) {", "container": "Solution", "callable": "islandPerimeter", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool canIWin(int maxChoosableInteger, int desiredTotal) {", "container": "Solution", "callable": "canIWin", "parameters": [{"name": "maxChoosableInteger", "type": "int"}, {"name": "desiredTotal", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int getMaxRepetitions(string s1, int n1, string s2, int n2) {", "container": "Solution", "callable": "getMaxRepetitions", "parameters": [{"name": "s1", "type": "string"}, {"name": "n1", "type": "int"}, {"name": "s2", "type": "string"}, {"name": "n2", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findSubstringInWraproundString(string s) {", "container": "Solution", "callable": "findSubstringInWraproundString", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string validIPAddress(string queryIP) {", "container": "Solution", "callable": "validIPAddress", "parameters": [{"name": "queryIP", "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": "cpp", "interface": {"raw_signature": "vector findAllConcatenatedWordsInADict(vector& words) {", "container": "Solution", "callable": "findAllConcatenatedWordsInADict", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool makesquare(vector& matchsticks) {", "container": "Solution", "callable": "makesquare", "parameters": [{"name": "matchsticks", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int findMaxForm(vector& strs, int m, int n) {", "container": "Solution", "callable": "findMaxForm", "parameters": [{"name": "strs", "type": "vector&"}, {"name": "m", "type": "int"}, {"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findRadius(vector& houses, vector& heaters) {", "container": "Solution", "callable": "findRadius", "parameters": [{"name": "houses", "type": "vector&"}, {"name": "heaters", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findComplement(int num) {", "container": "Solution", "callable": "findComplement", "parameters": [{"name": "num", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int totalHammingDistance(vector& nums) {", "container": "Solution", "callable": "totalHammingDistance", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector medianSlidingWindow(vector& nums, int k) {", "container": "Solution", "callable": "medianSlidingWindow", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int magicalString(int n) {", "container": "Solution", "callable": "magicalString", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string licenseKeyFormatting(string s, int k) {", "container": "Solution", "callable": "licenseKeyFormatting", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "string smallestGoodBase(string n) {", "container": "Solution", "callable": "smallestGoodBase", "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": "cpp", "interface": {"raw_signature": "int findMaxConsecutiveOnes(vector& nums) {", "container": "Solution", "callable": "findMaxConsecutiveOnes", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool predictTheWinner(vector& nums) {", "container": "Solution", "callable": "predictTheWinner", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "vector> findSubsequences(vector& nums) {", "container": "Solution", "callable": "findSubsequences", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "vector constructRectangle(int area) {", "container": "Solution", "callable": "constructRectangle", "parameters": [{"name": "area", "type": "int"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int reversePairs(vector& nums) {", "container": "Solution", "callable": "reversePairs", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findTargetSumWays(vector& nums, int target) {", "container": "Solution", "callable": "findTargetSumWays", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findPoisonedDuration(vector& timeSeries, int duration) {", "container": "Solution", "callable": "findPoisonedDuration", "parameters": [{"name": "timeSeries", "type": "vector&"}, {"name": "duration", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector nextGreaterElement(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "nextGreaterElement", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector findDiagonalOrder(vector>& mat) {", "container": "Solution", "callable": "findDiagonalOrder", "parameters": [{"name": "mat", "type": "vector>&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "vector findWords(vector& words) {", "container": "Solution", "callable": "findWords", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "int findMaximizedCapital(int k, int w, vector& profits, vector& capital) {", "container": "Solution", "callable": "findMaximizedCapital", "parameters": [{"name": "k", "type": "int"}, {"name": "w", "type": "int"}, {"name": "profits", "type": "vector&"}, {"name": "capital", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector nextGreaterElements(vector& nums) {", "container": "Solution", "callable": "nextGreaterElements", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "string convertToBase7(int num) {", "container": "Solution", "callable": "convertToBase7", "parameters": [{"name": "num", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "vector findRelativeRanks(vector& score) {", "container": "Solution", "callable": "findRelativeRanks", "parameters": [{"name": "score", "type": "vector&"}], "return_type": "vector", "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": "cpp", "interface": {"raw_signature": "bool checkPerfectNumber(int num) {", "container": "Solution", "callable": "checkPerfectNumber", "parameters": [{"name": "num", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int fib(int n) {", "container": "Solution", "callable": "fib", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findRotateSteps(string ring, string key) {", "container": "Solution", "callable": "findRotateSteps", "parameters": [{"name": "ring", "type": "string"}, {"name": "key", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int longestPalindromeSubseq(string s) {", "container": "Solution", "callable": "longestPalindromeSubseq", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findMinMoves(vector& machines) {", "container": "Solution", "callable": "findMinMoves", "parameters": [{"name": "machines", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int change(int amount, vector& coins) {", "container": "Solution", "callable": "change", "parameters": [{"name": "amount", "type": "int"}, {"name": "coins", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool detectCapitalUse(string word) {", "container": "Solution", "callable": "detectCapitalUse", "parameters": [{"name": "word", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int findLUSlength(string a, string b) {", "container": "Solution", "callable": "findLUSlength", "parameters": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findLUSlength(vector& strs) {", "container": "Solution", "callable": "findLUSlength", "parameters": [{"name": "strs", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool checkSubarraySum(vector& nums, int k) {", "container": "Solution", "callable": "checkSubarraySum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "string findLongestWord(string s, vector& dictionary) {", "container": "Solution", "callable": "findLongestWord", "parameters": [{"name": "s", "type": "string"}, {"name": "dictionary", "type": "vector&"}], "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": "cpp", "interface": {"raw_signature": "int findMaxLength(vector& nums) {", "container": "Solution", "callable": "findMaxLength", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int countArrangement(int n) {", "container": "Solution", "callable": "countArrangement", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> updateBoard(vector>& board, vector& click) {", "container": "Solution", "callable": "updateBoard", "parameters": [{"name": "board", "type": "vector>&"}, {"name": "click", "type": "vector&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int findPairs(vector& nums, int k) {", "container": "Solution", "callable": "findPairs", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string complexNumberMultiply(string num1, string num2) {", "container": "Solution", "callable": "complexNumberMultiply", "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": "cpp", "interface": {"raw_signature": "int findMinDifference(vector& timePoints) {", "container": "Solution", "callable": "findMinDifference", "parameters": [{"name": "timePoints", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int singleNonDuplicate(vector& nums) {", "container": "Solution", "callable": "singleNonDuplicate", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string reverseStr(string s, int k) {", "container": "Solution", "callable": "reverseStr", "parameters": [{"name": "s", "type": "string"}, {"name": "k", "type": "int"}], "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": "cpp", "interface": {"raw_signature": "vector> updateMatrix(vector>& mat) {", "container": "Solution", "callable": "updateMatrix", "parameters": [{"name": "mat", "type": "vector>&"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "int removeBoxes(vector& boxes) {", "container": "Solution", "callable": "removeBoxes", "parameters": [{"name": "boxes", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findCircleNum(vector>& isConnected) {", "container": "Solution", "callable": "findCircleNum", "parameters": [{"name": "isConnected", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "bool checkRecord(string s) {", "container": "Solution", "callable": "checkRecord", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int checkRecord(int n) {", "container": "Solution", "callable": "checkRecord", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string optimalDivision(vector& nums) {", "container": "Solution", "callable": "optimalDivision", "parameters": [{"name": "nums", "type": "vector&"}], "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": "cpp", "interface": {"raw_signature": "int leastBricks(vector>& wall) {", "container": "Solution", "callable": "leastBricks", "parameters": [{"name": "wall", "type": "vector>&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int nextGreaterElement(int n) {", "container": "Solution", "callable": "nextGreaterElement", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string reverseWords(string s) {", "container": "Solution", "callable": "reverseWords", "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": "cpp", "interface": {"raw_signature": "int subarraySum(vector& nums, int k) {", "container": "Solution", "callable": "subarraySum", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int arrayPairSum(vector& nums) {", "container": "Solution", "callable": "arrayPairSum", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "string nearestPalindromic(string n) {", "container": "Solution", "callable": "nearestPalindromic", "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": "cpp", "interface": {"raw_signature": "int arrayNesting(vector& nums) {", "container": "Solution", "callable": "arrayNesting", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> matrixReshape(vector>& mat, int r, int c) {", "container": "Solution", "callable": "matrixReshape", "parameters": [{"name": "mat", "type": "vector>&"}, {"name": "r", "type": "int"}, {"name": "c", "type": "int"}], "return_type": "vector>", "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": "cpp", "interface": {"raw_signature": "bool checkInclusion(string s1, string s2) {", "container": "Solution", "callable": "checkInclusion", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}], "return_type": "bool", "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": "cpp", "interface": {"raw_signature": "int distributeCandies(vector& candyType) {", "container": "Solution", "callable": "distributeCandies", "parameters": [{"name": "candyType", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findPaths(int m, int n, int maxMove, int startRow, int startColumn) {", "container": "Solution", "callable": "findPaths", "parameters": [{"name": "m", "type": "int"}, {"name": "n", "type": "int"}, {"name": "maxMove", "type": "int"}, {"name": "startRow", "type": "int"}, {"name": "startColumn", "type": "int"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int findUnsortedSubarray(vector& nums) {", "container": "Solution", "callable": "findUnsortedSubarray", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "int minDistance(string word1, string word2) {", "container": "Solution", "callable": "minDistance", "parameters": [{"name": "word1", "type": "string"}, {"name": "word2", "type": "string"}], "return_type": "int", "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": "cpp", "interface": {"raw_signature": "vector> outerTrees(vector>& trees) {", "container": "Solution", "callable": "outerTrees", "parameters": [{"name": "trees", "type": "vector>&"}], "return_type": "vector>", "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 : TAG_CONTENT. Among them, is the start tag, and is the end tag. The TAG_NAME in start and end tags should be the same. A closed tag is valid if and only if the TAG_NAME and TAG_CONTENT are valid.\n3. A valid TAG_NAME only contain upper-case letters, and has length in range [1,9]. Otherwise, the TAG_NAME is invalid.\n4. A valid TAG_CONTENT may contain other valid closed tags, cdata and any characters (see note1) EXCEPT unmatched <, unmatched start and end tag, and unmatched or closed tags with invalid TAG_NAME. Otherwise, the TAG_CONTENT is invalid.\n5. A start tag is unmatched if no end tag exists with the same TAG_NAME, and vice versa. However, you also need to consider the issue of unbalanced when tags are nested.\n6. A < is unmatched if you cannot find a subsequent >. And when you find a < or should be parsed as TAG_NAME (not necessarily valid).\n7. The cdata has the following format : . The range of CDATA_CONTENT is defined as the characters between .\n8. CDATA_CONTENT may contain any characters. The function of cdata is to forbid the validator to parse CDATA_CONTENT, so even it has some characters that can be parsed as tag (no matter valid or invalid), you should treat it as regular characters.\n\nExample 1:\n\nInput: code = \"
This is the first line ]]>
\"\nOutput: true\nExplanation:\nThe code is wrapped in a closed tag :
and
.\nThe TAG_NAME is valid, the TAG_CONTENT consists of some characters and cdata.\nAlthough CDATA_CONTENT has an unmatched start tag with invalid TAG_NAME, it should be considered as plain text, not parsed as a tag.\nSo TAG_CONTENT is valid, and then the code is valid. Thus return true.\n\nExample 2:\n\nInput: code = \"
>> ![cdata[]] ]>]]>]]>>]
\"\nOutput: true\nExplanation:\nWe first separate the code into : start_tag|tag_content|end_tag.\nstart_tag -> \"
\"\nend_tag -> \"
\"\ntag_content could also be separated into : text1|cdata|text2.\ntext1 -> \">> ![cdata[]] \"\ncdata -> \"]>]]>\", where the CDATA_CONTENT is \"
]>\"\ntext2 -> \"]]>>]\"\nThe reason why start_tag is NOT \"
>>\" is because of the rule 6.\nThe reason why cdata is NOT \"]>]]>]]>\" is because of the rule 7.\n\nExample 3:\n\nInput: code = \" \"\nOutput: false\nExplanation: Unbalanced. If \"\" is closed, then \"\" must be unmatched, and vice versa.\n\nConstraints:\n\n- 1 <= code.length <= 500\n- code consists of English letters, digits, '<', '>', '/', '!', '[', ']', '.', and ' '.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(code = \"abc\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"This is the first line
\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \" \") == True\n assert candidate(code = \">> ![cdata[]]
]>]]>>]\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"This is the first line
\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"456 123 123 \") == False\n assert candidate(code = \" \") == False\n assert candidate(code = \" ]]>\") == True\n assert candidate(code = \"abcdef\") == True\n assert candidate(code = \"sometext\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"sometext\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"abc\") == True\n assert candidate(code = \" ]]>\") == False\n assert candidate(code = \"sometext\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"contentcontent
]]>content\") == False\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"

many

]]>

\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \">\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"content]]>content\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"data]]>\") == True\n assert candidate(code = \"content]]>contentcontent]]>\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"
\") == True\n assert candidate(code = \"content]]>content]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"deep]]>\") == True\n assert candidate(code = \"invalid\") == True\n assert candidate(code = \" inside CDATA]]>\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"Some text more text]]> even more text\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \" here]]>]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"content]]>content\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"contentcontent
]]>content\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"content]]>\") == True\n assert candidate(code = \"INNER]]>\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>]\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"ghi]]>\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"contentcontent]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \">\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"ghi]]>\") == True\n assert candidate(code = \"]]>]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"content\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"data\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \" \") == False\n assert candidate(code = \"![CDATA[wahaha]]]>]]>\") == True\n assert candidate(code = \"content\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \">\") == True\n assert candidate(code = \"CDATA]]>\") == True\n assert candidate(code = \" here]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"some nested tags\") == True\n assert candidate(code = \"content]]>content\") == False\n assert candidate(code = \"
data
\") == False\n assert candidate(code = \"content]]>]]>\") == False\n assert candidate(code = \">\") == True\n assert candidate(code = \">\") == False\n assert candidate(code = \"CONTENT\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"unparsed
]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \">\") == False\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"]]>]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"
\") == False\n assert candidate(code = \"content\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \" and here]]>\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"

]]>text

\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"CONTENT\") == False\n assert candidate(code = \"CDATA]]>\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"INNER]]>\") == True\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"world]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \">\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"

\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"contentcontent]]>\") == True\n assert candidate(code = \"data]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"content]]>content\") == False\n assert candidate(code = \"TEXT \") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"content]]>\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"deep]]>\") == False\n assert candidate(code = \"content\") == True\n assert candidate(code = \" here]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \" test]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"CDATA]]>\") == True\n assert candidate(code = \" tags ]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \" here]]>\") == False\n assert candidate(code = \"]]>]]>\") == True\n assert candidate(code = \"]]>\") == False\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \" with CDATA]]>\") == True\n assert candidate(code = \"\") == False\n assert candidate(code = \"]]>]]>\") == False\n assert candidate(code = \"contentcontent]]>\") == True\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \">\") == False\n assert candidate(code = \"\") == False\n assert candidate(code = \"]]>\") == True\n assert candidate(code = \">\") == True\n assert candidate(code = \"contentcontent]]>\") == True\n assert candidate(code = \"]]>\") == False\n", "comparison": "exact"}, "public_tests": ["\"
This is the first line ]]>
\"", "\"
>> ![cdata[]] ]>]]>]]>>]
\"", "\" \""], "hints": [], "metadata": {"canonical_parameter_names": ["code"], "leetcode_dataset_entry_point": "Solution().isValid", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:56+00:00", "tests_total": 231, "tests_dropped": 14, "flags": [], "topic_tags": ["string", "stack"]}, "language": "cpp", "interface": {"raw_signature": "bool isValid(string code) {", "container": "Solution", "callable": "isValid", "parameters": [{"name": "code", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 592, "task_id": "fraction-addition-and-subtraction", "difficulty": "Medium", "problem_description": "Given a string expression representing an expression of fraction addition and subtraction, return the calculation result in string format.\n\nThe final result should be an irreducible fraction. If your final result is an integer, change it to the format of a fraction that has a denominator 1. So in this case, 2 should be converted to 2/1.\n\nExample 1:\n\nInput: expression = \"-1/2+1/2\"\nOutput: \"0/1\"\n\nExample 2:\n\nInput: expression = \"-1/2+1/2+1/3\"\nOutput: \"1/3\"\n\nExample 3:\n\nInput: expression = \"1/3-1/2\"\nOutput: \"-1/6\"\n\nConstraints:\n\n- The input string only contains '0' to '9', '/', '+' and '-'. So does the output.\n- Each fraction (input and output) has the format ±numerator/denominator. If the first input fraction or the output is positive, then '+' will be omitted.\n- The input only contains valid irreducible fractions, where the numerator and denominator of each fraction will always be in the range [1, 10]. If the denominator is 1, it means this fraction is actually an integer in a fraction format defined above.\n- The number of given fractions will be in the range [1, 10].\n- The numerator and denominator of the final result are guaranteed to be valid and in the range of 32-bit int.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(expression = \"9/10-1/5\") == \"7/10\"\n assert candidate(expression = \"5/6-1/3\") == \"1/2\"\n assert candidate(expression = \"-1/10-2/10-3/10-4/10\") == \"-1/1\"\n assert candidate(expression = \"3/4+1/4-1/2\") == \"1/2\"\n assert candidate(expression = \"1/5+2/5+3/5\") == \"6/5\"\n assert candidate(expression = \"7/10-3/5+1/2\") == \"3/5\"\n assert candidate(expression = \"1/1-1/1+1/1\") == \"1/1\"\n assert candidate(expression = \"1/10+1/10+1/10+1/10+1/10+1/10+1/10+1/10+1/10+1/10\") == \"1/1\"\n assert candidate(expression = \"1/3-1/2\") == \"-1/6\"\n assert candidate(expression = \"7/10+1/5\") == \"9/10\"\n assert candidate(expression = \"1/2-1/3+1/4-1/5+1/6\") == \"23/60\"\n assert candidate(expression = \"7/8-3/4+1/2\") == \"5/8\"\n assert candidate(expression = \"9/10-1/10-3/10\") == \"1/2\"\n assert candidate(expression = \"1/5-1/5-1/5+1/5\") == \"0/1\"\n assert candidate(expression = \"1/9+2/9+3/9+4/9+5/9+6/9+7/9+8/9+1/9\") == \"37/9\"\n assert candidate(expression = \"5/6-1/3+1/2\") == \"1/1\"\n assert candidate(expression = \"1/10+2/10+3/10+4/10\") == \"1/1\"\n assert candidate(expression = \"7/8+1/8\") == \"1/1\"\n assert candidate(expression = \"1/4-1/4+1/4\") == \"1/4\"\n assert candidate(expression = \"1/1-1/1\") == \"0/1\"\n assert candidate(expression = \"2/5+3/10\") == \"7/10\"\n assert candidate(expression = \"1/9+1/9+1/9+1/9+1/9+1/9+1/9+1/9+1/9\") == \"1/1\"\n assert candidate(expression = \"-1/3-1/3-1/3\") == \"-1/1\"\n assert candidate(expression = \"1/1-1/2-1/3\") == \"1/6\"\n assert candidate(expression = \"1/4+1/4+1/4+1/4\") == \"1/1\"\n assert candidate(expression = \"5/6+1/3\") == \"7/6\"\n assert candidate(expression = \"1/10-1/10\") == \"0/1\"\n assert candidate(expression = \"-1/2+1/2+1/3\") == \"1/3\"\n assert candidate(expression = \"-1/2+1/2\") == \"0/1\"\n assert candidate(expression = \"2/3+3/4-1/6\") == \"5/4\"\n assert candidate(expression = \"3/5-2/5+1/5-4/5+2/5\") == \"0/1\"\n assert candidate(expression = \"-7/8+5/6-1/4+3/5\") == \"37/120\"\n assert candidate(expression = \"-1/2+1/2-1/3+1/3-1/4+1/4-1/5+1/5-1/6+1/6\") == \"0/1\"\n assert candidate(expression = \"1/10-2/9+3/8-4/7+5/6-6/5+7/4-8/3+9/2-10/1\") == \"-17897/2520\"\n assert candidate(expression = \"-5/6+3/4-2/3+1/2-1/8\") == \"-3/8\"\n assert candidate(expression = \"-1/2-2/3-3/4-4/5-5/6-6/7-7/8-8/9-9/10\") == \"-17819/2520\"\n assert candidate(expression = \"1/7+1/11+1/13+1/17+1/19\") == \"3191/7560\"\n assert candidate(expression = \"-1/10-2/9-3/8-4/7-5/6-6/5-7/4-8/3-9/2-10/1\") == \"-55991/2520\"\n assert candidate(expression = \"7/9-5/6+11/12-3/4+2/3\") == \"7/9\"\n assert candidate(expression = \"1/3-1/4+1/5-1/6+1/7-1/8+1/9-1/10+1/2\") == \"1627/2520\"\n assert candidate(expression = \"-1/2+1/3-1/4+1/5-1/6\") == \"-23/60\"\n assert candidate(expression = \"-1/2+2/3-3/4+4/5-5/6+6/7-7/8+8/9-9/10\") == \"-1627/2520\"\n assert candidate(expression = \"1/10-2/15+3/20-4/25+5/30\") == \"1243/10080\"\n assert candidate(expression = \"10/1-9/2+8/3-7/4+6/5-5/6+4/7-3/8+2/9-1/10\") == \"17897/2520\"\n assert candidate(expression = \"-1/2+2/3-3/4+4/5-5/6+6/7-7/8+8/9-9/10+10/11-11/12\") == \"-1411/2160\"\n assert candidate(expression = \"1/2+1/4+1/6+1/8+1/10+1/12+1/14+1/16+1/18+1/20\") == \"7381/5040\"\n assert candidate(expression = \"1/3-1/6+1/9-1/12+1/15-1/18+1/21-1/24+1/27-1/30\") == \"1627/7560\"\n assert candidate(expression = \"1/9+1/8+1/7+1/6+1/5+1/4+1/3+1/2+1/1\") == \"7129/2520\"\n assert candidate(expression = \"-1/2+1/3-1/4+1/5-1/6+1/7-1/8+1/9-1/10\") == \"-893/2520\"\n assert candidate(expression = \"-1/8+1/4-3/8+5/8-7/8+9/8-11/8\") == \"-3/4\"\n assert candidate(expression = \"7/10-3/5+2/4-1/2+1/1-9/10+5/6\") == \"31/30\"\n assert candidate(expression = \"1/1+1/2+1/3+1/4+1/5+1/6+1/7+1/8+1/9+1/10+1/11+1/12\") == \"93841/30240\"\n assert candidate(expression = \"5/10+15/20-25/30+35/40-45/50+55/60-65/70+75/80-85/90+95/100\") == \"6667/5040\"\n assert candidate(expression = \"1/10+2/15+3/20+4/25+5/30+6/35+7/40\") == \"15973/15120\"\n assert candidate(expression = \"1/9-1/10+1/11-1/12+1/13\") == \"413/4320\"\n assert candidate(expression = \"1/2+1/4+1/8+1/16+1/32+1/64+1/128+1/256\") == \"4303/4320\"\n assert candidate(expression = \"10/9-9/8+8/7-7/6+6/5-5/4+4/3-3/2+2/1\") == \"4399/2520\"\n assert candidate(expression = \"5/9-3/8+7/6-2/5+1/4\") == \"431/360\"\n assert candidate(expression = \"-1/2+1/3-1/5+1/7-1/9+1/11-1/13+1/15-1/17+1/19\") == \"-1313/5040\"\n assert candidate(expression = \"7/8-5/6+1/4-1/2+3/7\") == \"37/168\"\n assert candidate(expression = \"1/1-2/1+3/1-4/1+5/1-6/1+7/1-8/1+9/1-10/1\") == \"-5/1\"\n assert candidate(expression = \"9/10+1/10-1/5+3/20-1/4\") == \"7/10\"\n assert candidate(expression = \"-1/10+2/9-3/8+4/7-5/6+6/5-7/4+8/3-9/2+10/1\") == \"17897/2520\"\n assert candidate(expression = \"1/5-2/5+3/5-4/5+5/5-6/5+7/5-8/5+9/5-10/5\") == \"-1/1\"\n assert candidate(expression = \"1/9+1/18+1/27+1/36+1/45+1/54+1/63+1/72+1/81+1/90\") == \"9841/30240\"\n assert candidate(expression = \"1/2+1/3+1/4+1/5+1/6+1/7+1/8+1/9+1/10\") == \"4861/2520\"\n assert candidate(expression = \"-1/2-1/3-1/4-1/5-1/6-1/7-1/8-1/9-1/10\") == \"-4861/2520\"\n assert candidate(expression = \"1/10-1/20+1/30-1/40+1/50\") == \"74/945\"\n assert candidate(expression = \"7/8-1/2+3/4-1/4+2/5\") == \"51/40\"\n assert candidate(expression = \"3/5-2/7+1/9-1/11+1/13-1/15+1/17\") == \"6101/15120\"\n assert candidate(expression = \"-1/10+2/10-3/10+4/10-5/10+6/10-7/10+8/10-9/10+10/10\") == \"1/2\"\n assert candidate(expression = \"1/2-1/2+1/2-1/2+1/2-1/2+1/2-1/2+1/2\") == \"1/2\"\n assert candidate(expression = \"-5/6+3/4-2/3+1/2\") == \"-1/4\"\n assert candidate(expression = \"10/10-9/10+8/10-7/10+6/10-5/10+4/10-3/10+2/10-1/10\") == \"1/2\"\n assert candidate(expression = \"1/7-2/7+3/7-4/7+5/7-6/7+8/7\") == \"5/7\"\n assert candidate(expression = \"1/1-1/2+1/3-1/4+1/5-1/6+1/7-1/8+1/9-1/10+1/11-1/12\") == \"19753/30240\"\n assert candidate(expression = \"10/9-9/8+8/7-7/6+6/5-5/4+4/3-3/2+2/1-1/1\") == \"1879/2520\"\n assert candidate(expression = \"1/2+1/3+1/5+1/7+1/11+1/13+1/17+1/19\") == \"11003/7560\"\n assert candidate(expression = \"11/12-10/11+9/10-8/9+7/8-6/7+5/6-4/5+3/4-2/3+1/2\") == \"19753/30240\"\n assert candidate(expression = \"1/10+1/9+1/8+1/7+1/6+1/5+1/4+1/3+1/2+1/1\") == \"7381/2520\"\n assert candidate(expression = \"-1/10-1/9-1/8-1/7-1/6-1/5-1/4-1/3-1/2-1/1\") == \"-7381/2520\"\n assert candidate(expression = \"-1/10+2/9-3/8+4/7-5/6+6/5-7/4+8/3-9/2\") == \"-7303/2520\"\n assert candidate(expression = \"1/2+2/3+3/4+4/5+5/6+6/7+7/8+8/9+9/10\") == \"17819/2520\"\n assert candidate(expression = \"-5/6+2/3-1/4+1/2+3/8-7/10\") == \"-29/120\"\n assert candidate(expression = \"1/10+2/9+3/8+4/7+5/6+6/5+7/4+8/3+9/2+10/1\") == \"55991/2520\"\n assert candidate(expression = \"-1/3+1/6-1/9+1/12-1/15+1/18-1/21+1/24-1/27+1/30\") == \"-1627/7560\"\n assert candidate(expression = \"1/3+2/5-3/7+4/9-5/11+6/13-7/15+8/17-9/19\") == \"1237/4320\"\n assert candidate(expression = \"7/8-3/4+5/6-1/3\") == \"5/8\"\n assert candidate(expression = \"-1/1+1/2-1/3+1/4-1/5+1/6-1/7+1/8-1/9+1/10\") == \"-1627/2520\"\n assert candidate(expression = \"9/10-8/9+7/8-6/7+5/6-4/5+3/4-2/3+1/2\") == \"1627/2520\"\n assert candidate(expression = \"5/9-2/3+1/6-1/12+1/18\") == \"1/36\"\n assert candidate(expression = \"-9/10+8/9-7/8+6/7-5/6+4/5-3/4+2/3-1/2\") == \"-1627/2520\"\n assert candidate(expression = \"1/5+2/5+3/5-4/5-3/5-2/5-1/5\") == \"-4/5\"\n assert candidate(expression = \"1/2+1/2+1/3+1/4+1/5+1/6+1/7+1/8+1/9+1/10\") == \"6121/2520\"\n assert candidate(expression = \"1/10+2/9-3/8+4/7-5/6+6/5-7/4+8/3-9/2+10/1\") == \"18401/2520\"\n assert candidate(expression = \"2/1-1/2+2/3-1/4+2/5-1/6+2/7-1/8+2/9-1/10\") == \"6131/2520\"\n assert candidate(expression = \"1/10+2/10+3/10+4/10+5/10+6/10+7/10+8/10+9/10\") == \"9/2\"\n assert candidate(expression = \"1/10+2/9+3/8+4/7+5/6+6/5+7/4+8/3+9/2+1/1\") == \"33311/2520\"\n assert candidate(expression = \"-1/2+3/4-5/6+7/8-9/10+11/12-13/14+15/16-17/18\") == \"-3161/5040\"\n assert candidate(expression = \"-1/10-1/9-1/8-1/7-1/6-1/5-1/4-1/3-1/2\") == \"-4861/2520\"\n assert candidate(expression = \"-1/3+2/5-3/7+4/9-5/11+6/13-7/15\") == \"-1901/5040\"\n assert candidate(expression = \"-1/2+1/3-1/4+1/5-1/6+1/7-1/8+1/9-1/10+1/11\") == \"-7967/30240\"\n assert candidate(expression = \"7/8-5/12+1/16-3/32\") == \"41/96\"\n assert candidate(expression = \"7/8-3/4+5/6-2/3+1/2\") == \"19/24\"\n assert candidate(expression = \"1/5-1/5+1/5-1/5+1/5-1/5+1/5-1/5+1/5-1/5+1/5\") == \"1/5\"\n assert candidate(expression = \"-1/2+1/3-1/4+1/5-1/6+1/7\") == \"-101/420\"\n assert candidate(expression = \"3/4+2/3-5/6+7/8-9/10+11/12\") == \"59/40\"\n assert candidate(expression = \"1/2+1/2+1/2+1/2+1/2+1/2+1/2+1/2+1/2+1/2\") == \"5/1\"\n assert candidate(expression = \"-1/2+3/4-5/6+7/8-9/10+11/12-13/14+15/16-17/18+19/20\") == \"1627/5040\"\n assert candidate(expression = \"1/1-1/2+1/3-1/4+1/5-1/6+1/7-1/8+1/9-1/10\") == \"1627/2520\"\n assert candidate(expression = \"1/10+2/9-3/8+4/7-5/6\") == \"-793/2520\"\n assert candidate(expression = \"9/10-7/8+5/6-3/4+1/2\") == \"73/120\"\n assert candidate(expression = \"-1/3+1/4-1/5+1/6-1/7+1/8-1/9+1/10-1/2\") == \"-1627/2520\"\n assert candidate(expression = \"-1/2+1/2-1/3+1/3-1/4+1/4-1/5+1/5\") == \"0/1\"\n assert candidate(expression = \"-3/5+2/5-1/5+4/5-3/5+2/5-1/5\") == \"0/1\"\n assert candidate(expression = \"10/1-9/1+8/1-7/1+6/1-5/1+4/1-3/1+2/1-1/1\") == \"5/1\"\n assert candidate(expression = \"1/7+2/7-3/7+4/7-5/7+6/7-1/7\") == \"4/7\"\n assert candidate(expression = \"-1/9+2/7-3/11+4/13-5/17+6/19\") == \"233/1008\"\n assert candidate(expression = \"1/2-1/3+1/4-1/5+1/6-1/7+1/8-1/9+1/10\") == \"893/2520\"\n assert candidate(expression = \"5/6-3/4+7/8-1/2+9/10\") == \"163/120\"\n assert candidate(expression = \"5/9-2/3+4/5-6/7+8/9-10/11\") == \"-5699/30240\"\n assert candidate(expression = \"5/8+7/9-2/5+3/4-1/6\") == \"571/360\"\n assert candidate(expression = \"-5/6+3/4-1/2+7/8\") == \"7/24\"\n assert candidate(expression = \"3/8+5/12-7/15+9/20-11/25+13/30\") == \"11617/15120\"\n assert candidate(expression = \"3/5-1/2+1/3-2/4+5/6-7/8+9/10\") == \"19/24\"\n assert candidate(expression = \"7/8-3/4+2/5-1/6\") == \"43/120\"\n", "comparison": "exact"}, "public_tests": ["\"-1/2+1/2\"", "\"-1/2+1/2+1/3\"", "\"1/3-1/2\""], "hints": [], "metadata": {"canonical_parameter_names": ["expression"], "leetcode_dataset_entry_point": "Solution().fractionAddition", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:58+00:00", "tests_total": 126, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation", "euclidean-algorithm", "greatest-common-divisor"]}, "language": "cpp", "interface": {"raw_signature": "string fractionAddition(string expression) {", "container": "Solution", "callable": "fractionAddition", "parameters": [{"name": "expression", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 593, "task_id": "valid-square", "difficulty": "Medium", "problem_description": "Given the coordinates of four points in 2D space p1, p2, p3 and p4, return true if the four points construct a square.\n\nThe coordinate of a point p_i is represented as [x_i, y_i]. The input is not given in any order.\n\nA valid square has four equal sides with positive length and four equal angles (90-degree angles).\n\nExample 1:\n\nInput: p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,1]\nOutput: true\n\nExample 2:\n\nInput: p1 = [0,0], p2 = [1,1], p3 = [1,0], p4 = [0,12]\nOutput: false\n\nExample 3:\n\nInput: p1 = [1,0], p2 = [-1,0], p3 = [0,1], p4 = [0,-1]\nOutput: true\n\nConstraints:\n\n- p1.length == p2.length == p3.length == p4.length == 2\n- -10^4 <= x_i, y_i <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(p1 = [-1, -1],p2 = [-1, 1],p3 = [1, 1],p4 = [1, -1]) == True\n assert candidate(p1 = [1, 2],p2 = [3, 4],p3 = [5, 6],p4 = [7, 8]) == False\n assert candidate(p1 = [2, 2],p2 = [3, 3],p3 = [4, 4],p4 = [5, 5]) == False\n assert candidate(p1 = [0, 0],p2 = [0, 0],p3 = [0, 0],p4 = [0, 0]) == False\n assert candidate(p1 = [1, 0],p2 = [-1, 0],p3 = [0, 1],p4 = [0, -1]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [1, 0],p4 = [0, 12]) == False\n assert candidate(p1 = [1, 1],p2 = [1, 2],p3 = [2, 1],p4 = [2, 2]) == True\n assert candidate(p1 = [5, 5],p2 = [5, 6],p3 = [6, 6],p4 = [6, 5]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 0],p3 = [1, 1],p4 = [0, 1]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 2],p3 = [3, 2],p4 = [2, 0]) == False\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [2, 2],p4 = [3, 3]) == False\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [1, 2],p4 = [2, 1]) == False\n assert candidate(p1 = [1, 1],p2 = [2, 2],p3 = [3, 3],p4 = [4, 5]) == False\n assert candidate(p1 = [0, 0],p2 = [0, 1],p3 = [1, 1],p4 = [1, 0]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [1, 0],p4 = [0, 1]) == True\n assert candidate(p1 = [0, 0],p2 = [2, 0],p3 = [2, 2],p4 = [0, 2]) == True\n assert candidate(p1 = [0, 0],p2 = [5, 0],p3 = [5, 5],p4 = [0, 5]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 1],p3 = [1, 1],p4 = [1, 1]) == False\n assert candidate(p1 = [2, 2],p2 = [3, 3],p3 = [3, 2],p4 = [2, 3]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 2],p3 = [2, 2],p4 = [2, 1]) == True\n assert candidate(p1 = [1, 2],p2 = [4, 5],p3 = [7, 8],p4 = [10, 11]) == False\n assert candidate(p1 = [0, 0],p2 = [1, 0],p3 = [0, 1],p4 = [1, 1]) == True\n assert candidate(p1 = [-2, -2],p2 = [-2, 2],p3 = [2, 2],p4 = [2, -2]) == True\n assert candidate(p1 = [0, 1],p2 = [1, 0],p3 = [0, -1],p4 = [-1, 0]) == True\n assert candidate(p1 = [-1, -1],p2 = [1, 1],p3 = [0, 0],p4 = [2, 2]) == False\n assert candidate(p1 = [1, 1],p2 = [2, 2],p3 = [2, 3],p4 = [3, 2]) == False\n assert candidate(p1 = [-3, -3],p2 = [-2, -2],p3 = [-2, -1],p4 = [-1, -2]) == False\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [2, 0],p4 = [1, 2]) == False\n assert candidate(p1 = [1000, -1000],p2 = [-1000, 1000],p3 = [1000, 1000],p4 = [-1000, -1000]) == True\n assert candidate(p1 = [-3, -3],p2 = [-3, 0],p3 = [0, -3],p4 = [0, 0]) == True\n assert candidate(p1 = [1, 0],p2 = [0, 1],p3 = [-1, 0],p4 = [0, -1]) == True\n assert candidate(p1 = [-3, -3],p2 = [-3, -2],p3 = [-2, -2],p4 = [-2, -3]) == True\n assert candidate(p1 = [10, 0],p2 = [0, 10],p3 = [-10, 0],p4 = [0, -10]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 3],p3 = [3, 1],p4 = [3, 3]) == True\n assert candidate(p1 = [-5, 2],p2 = [-2, 5],p3 = [1, 2],p4 = [-2, -1]) == True\n assert candidate(p1 = [1, 2],p2 = [3, 4],p3 = [2, 1],p4 = [0, -1]) == False\n assert candidate(p1 = [-1, -1],p2 = [-1, 0],p3 = [0, -1],p4 = [0, 0]) == True\n assert candidate(p1 = [0, 1],p2 = [1, 0],p3 = [1, 2],p4 = [2, 1]) == True\n assert candidate(p1 = [1, 1],p2 = [2, 1],p3 = [2, 2],p4 = [1, 2]) == True\n assert candidate(p1 = [-2, -2],p2 = [-2, 2],p3 = [2, -2],p4 = [2, 2]) == True\n assert candidate(p1 = [1, 0],p2 = [0, 1],p3 = [-1, 0],p4 = [0, -1]) == True\n assert candidate(p1 = [-1, -1],p2 = [0, 0],p3 = [1, -1],p4 = [0, -2]) == True\n assert candidate(p1 = [1000, 1000],p2 = [1001, 1001],p3 = [1001, 1000],p4 = [1000, 1001]) == True\n assert candidate(p1 = [5, 5],p2 = [6, 5],p3 = [6, 6],p4 = [5, 6]) == True\n assert candidate(p1 = [7, 7],p2 = [7, 9],p3 = [9, 7],p4 = [9, 9]) == True\n assert candidate(p1 = [5, 5],p2 = [5, 10],p3 = [10, 10],p4 = [10, 5]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 3],p3 = [3, 3],p4 = [3, 0]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 2],p3 = [2, 1],p4 = [2, 3]) == False\n assert candidate(p1 = [0, 0],p2 = [0, 5],p3 = [5, 5],p4 = [5, 0]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 2],p3 = [2, 0],p4 = [2, 2]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 2],p3 = [2, 2],p4 = [2, 0]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [1, 0],p4 = [0, -1]) == False\n assert candidate(p1 = [10, 10],p2 = [14, 14],p3 = [14, 10],p4 = [10, 14]) == True\n assert candidate(p1 = [-100, -100],p2 = [-99, -99],p3 = [-99, -100],p4 = [-100, -99]) == True\n assert candidate(p1 = [1, 0],p2 = [0, 1],p3 = [1, 2],p4 = [2, 1]) == True\n assert candidate(p1 = [-1000, -1000],p2 = [-999, -999],p3 = [-999, -1000],p4 = [-1000, -999]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 3],p3 = [3, 1],p4 = [3, 3]) == True\n assert candidate(p1 = [1, 1],p2 = [2, 2],p3 = [3, 3],p4 = [4, 4]) == False\n assert candidate(p1 = [0, 0],p2 = [0, 0],p3 = [0, 0],p4 = [0, 0]) == False\n assert candidate(p1 = [-10000, -10000],p2 = [-10000, -9999],p3 = [-9999, -10000],p4 = [-9999, -9999]) == True\n assert candidate(p1 = [5, 5],p2 = [6, 6],p3 = [7, 7],p4 = [8, 8]) == False\n assert candidate(p1 = [3, 3],p2 = [6, 6],p3 = [6, 3],p4 = [3, 6]) == True\n assert candidate(p1 = [-5, -5],p2 = [-10, -5],p3 = [-10, -10],p4 = [-5, -10]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [1, 0],p4 = [0, -1]) == False\n assert candidate(p1 = [3, 3],p2 = [6, 3],p3 = [6, 6],p4 = [3, 6]) == True\n assert candidate(p1 = [-2, -2],p2 = [-1, -1],p3 = [1, 1],p4 = [2, 2]) == False\n assert candidate(p1 = [10, 10],p2 = [10, 20],p3 = [20, 10],p4 = [20, 20]) == True\n assert candidate(p1 = [1, 1],p2 = [1, 3],p3 = [3, 3],p4 = [3, 1]) == True\n assert candidate(p1 = [-1, -1],p2 = [1, 1],p3 = [1, -1],p4 = [-1, 1]) == True\n assert candidate(p1 = [1000, 1000],p2 = [1001, 1001],p3 = [1001, 1000],p4 = [1000, 1001]) == True\n assert candidate(p1 = [0, 0],p2 = [1, 1],p3 = [2, 2],p4 = [3, 3]) == False\n assert candidate(p1 = [5, 5],p2 = [6, 6],p3 = [6, 5],p4 = [5, 6]) == True\n assert candidate(p1 = [1, 2],p2 = [3, 4],p3 = [5, 6],p4 = [7, 8]) == False\n assert candidate(p1 = [1, 2],p2 = [4, 5],p3 = [7, 2],p4 = [4, -1]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 1],p3 = [1, 0],p4 = [2, 1]) == False\n assert candidate(p1 = [-2, -2],p2 = [-2, -3],p3 = [-3, -3],p4 = [-3, -2]) == True\n assert candidate(p1 = [1, 1],p2 = [4, 5],p3 = [5, 4],p4 = [8, 8]) == False\n assert candidate(p1 = [100, 100],p2 = [101, 101],p3 = [101, 100],p4 = [100, 101]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 10000],p3 = [10000, 0],p4 = [10000, 10000]) == True\n assert candidate(p1 = [5, 5],p2 = [5, 10],p3 = [10, 5],p4 = [10, 10]) == True\n assert candidate(p1 = [1000, 1000],p2 = [1000, 2000],p3 = [2000, 2000],p4 = [2000, 1000]) == True\n assert candidate(p1 = [1, 1],p2 = [2, 2],p3 = [3, 3],p4 = [4, 4]) == False\n assert candidate(p1 = [0, 1],p2 = [1, 0],p3 = [0, -1],p4 = [-1, 0]) == True\n assert candidate(p1 = [3, 4],p2 = [6, 8],p3 = [9, 5],p4 = [6, 1]) == False\n assert candidate(p1 = [-2, -2],p2 = [-1, -1],p3 = [-2, -1],p4 = [-1, -2]) == True\n assert candidate(p1 = [5, 5],p2 = [8, 5],p3 = [8, 8],p4 = [5, 8]) == True\n assert candidate(p1 = [10000, 10000],p2 = [10001, 10001],p3 = [10001, 10000],p4 = [10000, 9999]) == False\n assert candidate(p1 = [-5, 5],p2 = [-4, 4],p3 = [-4, 5],p4 = [-5, 4]) == True\n assert candidate(p1 = [0, 0],p2 = [0, 4],p3 = [4, 4],p4 = [4, 0]) == True\n", "comparison": "exact"}, "public_tests": ["[0,0]\n[1,1]\n[1,0]\n[0,1]", "[0,0]\n[1,1]\n[1,0]\n[0,12]", "[1,0]\n[-1,0]\n[0,1]\n[0,-1]"], "hints": [], "metadata": {"canonical_parameter_names": ["p1", "p2", "p3", "p4"], "leetcode_dataset_entry_point": "Solution().validSquare", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:01+00:00", "tests_total": 89, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "geometry"]}, "language": "cpp", "interface": {"raw_signature": "bool validSquare(vector& p1, vector& p2, vector& p3, vector& p4) {", "container": "Solution", "callable": "validSquare", "parameters": [{"name": "p1", "type": "vector&"}, {"name": "p2", "type": "vector&"}, {"name": "p3", "type": "vector&"}, {"name": "p4", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 594, "task_id": "longest-harmonious-subsequence", "difficulty": "Easy", "problem_description": "We define a harmonious array as an array where the difference between its maximum value and its minimum value is exactly 1.\n\nGiven an integer array nums, return the length of its longest harmonious subsequence among all its possible subsequences.\n\nExample 1:\n\nInput: nums = [1,3,2,2,5,2,3,7]\nOutput: 5\nExplanation:\nThe longest harmonious subsequence is [3,2,2,2,3].\n\nExample 2:\n\nInput: nums = [1,2,3,4]\nOutput: 2\nExplanation:\nThe longest harmonious subsequences are [1,2], [2,3], and [3,4], all of which have a length of 2.\n\nExample 3:\n\nInput: nums = [1,1,1,1]\nOutput: 0\nExplanation:\nNo harmonic subsequence exists.\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^4\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 5, 5, 6]) == 4\n assert candidate(nums = [-1, 0, -1, 0, -1, 0, -1]) == 7\n assert candidate(nums = [1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 9\n assert candidate(nums = [2, 1]) == 2\n assert candidate(nums = [1, 2, 2, 1]) == 4\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [5, 5, 5, 6, 6, 7, 7, 7, 7, 8]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [1, 2, 3, 4]) == 2\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5]) == 7\n assert candidate(nums = [0, 0, 0, 1, 1, 2, 2, 2, 2, 2]) == 7\n assert candidate(nums = [0, -1, -2, -3, 1, 2, 3]) == 2\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 2\n assert candidate(nums = [1000000000, -1000000000]) == 0\n assert candidate(nums = [-1, 0, -1, 0, -1, 0, 0]) == 7\n assert candidate(nums = [1, 3, 2, 2, 5, 2, 3, 7]) == 5\n assert candidate(nums = [5, 5, 5, 6, 6, 7]) == 5\n assert candidate(nums = [-1, -1, -1, 0, 0, 1, 1, 1, 2]) == 5\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 4, 5, 4, 5, 6, 5, 6, 7]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 7\n assert candidate(nums = [-1, 0, -1, 1, 0, 0, 1, 1]) == 6\n assert candidate(nums = [10, 9, 9, 8, 8, 11, 11]) == 4\n assert candidate(nums = [5, 4, 2, 3, 3, 4, 5, 6]) == 4\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == 4\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2]) == 6\n assert candidate(nums = [10, 9, 9, 8, 7, 6, 6, 6, 5, 4, 3, 2, 1]) == 4\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]) == 11\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 2\n assert 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]) == 20\n assert candidate(nums = [-10, -9, -9, -8, -8, -7, -6, -5, -4, -4, -4, -3, -2, -1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6]) == 10\n assert candidate(nums = [100, 101, 100, 101, 100, 101, 100, 101, 100, 101, 100, 101, 100, 101, 100, 101, 100, 101, 100, 101]) == 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, 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]) == 39\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]) == 4\n assert candidate(nums = [100, 101, 100, 100, 99, 101, 102, 103, 98, 99, 100, 101, 102]) == 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]) == 4\n assert candidate(nums = [5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 6, 6, 5, 5, 5, 5, 6, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5]) == 34\n assert candidate(nums = [-5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9, 9, 9, 10]) == 6\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6]) == 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]) == 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\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]) == 2\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]) == 22\n assert candidate(nums = [1000000000, -999999999, 1000000000, -999999999, 1000000000, -999999999]) == 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, 11, 13, 12, 14, 13, 15, 14, 16, 15, 17, 16, 18, 17, 19, 18]) == 4\n assert candidate(nums = [5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 40\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]) == 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]) == 2\n assert candidate(nums = [20, 19, 21, 18, 22, 17, 23, 16, 24, 15, 25, 14, 26, 13, 27, 12, 28, 11, 29, 10, 30, 9, 31, 8, 32, 7, 33, 6, 34, 5, 35, 4, 36, 3]) == 2\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]) == 2\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]) == 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, 1, 1, 2, 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, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 4\n assert candidate(nums = [100, 101, 99, 100, 101, 102, 98, 99, 100, 101, 102, 103, 97, 98, 99]) == 6\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 2\n assert candidate(nums = [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]) == 0\n assert candidate(nums = [50, 49, 51, 48, 52, 47, 53, 46, 54, 45, 55, 44, 56, 43, 57, 42, 58, 41, 59, 40, 60, 39, 61, 38, 62, 37, 63, 36, 64, 35]) == 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]) == 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 39\n assert candidate(nums = [5, 6, 5, 6, 6, 7, 8, 5, 6, 7, 7, 7, 8, 8, 8, 8]) == 9\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]) == 44\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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 2\n assert candidate(nums = [3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5, 3, 4, 5]) == 18\n assert candidate(nums = [1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999]) == 10\n assert candidate(nums = [-2, -1, -1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4]) == 7\n assert candidate(nums = [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 6\n assert candidate(nums = [10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9]) == 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]) == 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4\n assert candidate(nums = [10, 10, 10, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 2, 2, 1, 1]) == 6\n assert candidate(nums = [-5, -6, -4, -5, -5, -5, -6, -6, -4, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0]) == 8\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]) == 44\n assert candidate(nums = [10, 9, 9, 8, 7, 6, 6, 5, 4, 4, 4, 3, 3, 2, 2, 1, 0, -1, -2, -2, -2]) == 5\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, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 3\n assert candidate(nums = [5, 4, 5, 6, 7, 8, 5, 6, 5, 6, 5]) == 8\n assert candidate(nums = [5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8]) == 6\n assert candidate(nums = [5, 6, 5, 7, 8, 6, 6, 7, 7, 8, 9, 9, 10, 10, 10, 9]) == 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 41\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 4\n assert candidate(nums = [10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 5]) == 11\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]) == 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, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79]) == 0\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]) == 6\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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 19\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 6\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]) == 20\n assert candidate(nums = [5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8]) == 9\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]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4\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]) == 6\n assert candidate(nums = [10, 9, 10, 8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -1, 0]) == 5\n assert candidate(nums = [-1000000000, -999999999, -1000000000, -999999999, -1000000000, -999999999, -1000000000, -999999999]) == 8\n assert candidate(nums = [1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999]) == 8\n assert candidate(nums = [500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471]) == 2\n assert candidate(nums = [42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23]) == 2\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]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 11\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, 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, 3, 2, 2, 5, 2, 3, 7, 1, 3, 2, 2, 5, 2, 3, 7, 1, 3, 2, 2, 5, 2, 3, 7, 1, 3, 2, 2, 5, 2, 3, 7]) == 20\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 = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000]) == 0\n assert candidate(nums = [1000000000, 999999999, 1000000000, 999999999, 1000000000]) == 5\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]) == 8\n assert candidate(nums = [100, 99, 101, 98, 102, 97, 103, 96, 104, 95, 105, 94, 106, 93, 107, 92, 108, 91, 109, 90]) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9]) == 9\n assert candidate(nums = [0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 16\n assert candidate(nums = [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate(nums = [42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41]) == 28\n", "comparison": "exact"}, "public_tests": ["[1,3,2,2,5,2,3,7]", "[1,2,3,4]", "[1,1,1,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findLHS", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:03+00:00", "tests_total": 116, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "hash-table", "sliding-window", "sorting", "counting"]}, "language": "cpp", "interface": {"raw_signature": "int findLHS(vector& nums) {", "container": "Solution", "callable": "findLHS", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 598, "task_id": "range-addition-ii", "difficulty": "Easy", "problem_description": "You are given an m x n matrix M initialized with all 0's and an array of operations ops, where ops[i] = [a_i, b_i] means M[x][y] should be incremented by one for all 0 <= x < a_i and 0 <= y < b_i.\n\nCount and return the number of maximum integers in the matrix after performing all the operations.\n\nExample 1:\n\nInput: m = 3, n = 3, ops = [[2,2],[3,3]]\nOutput: 4\nExplanation: The maximum integer in M is 2, and there are four of it in M. So return 4.\n\nExample 2:\n\nInput: m = 3, n = 3, ops = [[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3]]\nOutput: 4\n\nExample 3:\n\nInput: m = 3, n = 3, ops = []\nOutput: 9\n\nConstraints:\n\n- 1 <= m, n <= 4 * 10^4\n- 0 <= ops.length <= 10^4\n- ops[i].length == 2\n- 1 <= a_i <= m\n- 1 <= b_i <= n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(m = 5,n = 4,ops = [[2, 2]]) == 4\n assert candidate(m = 1,n = 1,ops = []) == 1\n assert candidate(m = 2,n = 2,ops = [[2, 2], [1, 1], [2, 2]]) == 1\n assert candidate(m = 1,n = 1,ops = [[1, 1]]) == 1\n assert candidate(m = 4,n = 5,ops = [[1, 1], [2, 2], [3, 3]]) == 1\n assert candidate(m = 1,n = 1,ops = [[1, 1], [1, 1], [1, 1]]) == 1\n assert candidate(m = 4,n = 5,ops = [[2, 3], [3, 4]]) == 6\n assert candidate(m = 5,n = 5,ops = [[4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 3,n = 3,ops = [[2, 2], [3, 3]]) == 4\n assert candidate(m = 3,n = 3,ops = [[2, 2], [3, 3], [3, 3], [3, 3], [2, 2], [3, 3], [3, 3], [3, 3], [2, 2], [3, 3], [3, 3], [3, 3]]) == 4\n assert candidate(m = 2,n = 2,ops = [[2, 1], [1, 2]]) == 1\n assert candidate(m = 10000,n = 10000,ops = [[10000, 10000], [5000, 5000]]) == 25000000\n assert candidate(m = 2,n = 2,ops = [[1, 2], [2, 1]]) == 1\n assert candidate(m = 5,n = 5,ops = [[5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 3,n = 3,ops = []) == 9\n assert candidate(m = 12,n = 14,ops = [[6, 7], [9, 10], [4, 5], [11, 12], [3, 4]]) == 12\n assert candidate(m = 6,n = 6,ops = [[3, 3], [3, 3], [3, 3], [3, 3]]) == 9\n assert candidate(m = 6,n = 6,ops = [[2, 3], [3, 4], [4, 5], [5, 6]]) == 6\n assert candidate(m = 12,n = 12,ops = [[4, 4], [8, 8], [6, 6], [12, 12], [2, 2], [10, 10]]) == 4\n assert candidate(m = 9,n = 11,ops = [[6, 7], [3, 4], [8, 9], [2, 2], [5, 5]]) == 4\n assert candidate(m = 10,n = 10,ops = [[5, 5], [3, 3], [8, 8]]) == 9\n assert candidate(m = 3,n = 6,ops = [[1, 2], [2, 3], [3, 4], [2, 5], [1, 6]]) == 2\n assert candidate(m = 7,n = 6,ops = [[5, 5], [3, 3], [2, 2], [4, 4], [6, 6]]) == 4\n assert candidate(m = 4,n = 7,ops = [[2, 3], [3, 4], [1, 2], [4, 5]]) == 2\n assert candidate(m = 7,n = 5,ops = [[3, 3], [5, 4], [2, 2], [4, 3], [3, 3], [5, 5]]) == 4\n assert candidate(m = 5000,n = 5000,ops = [[2500, 2500], [2500, 2500], [2500, 2500], [2500, 2500], [2500, 2500]]) == 6250000\n assert candidate(m = 7,n = 3,ops = [[5, 2], [6, 1], [7, 3], [4, 3]]) == 4\n assert candidate(m = 12,n = 8,ops = [[8, 6], [6, 4], [4, 2], [2, 1]]) == 2\n assert candidate(m = 6,n = 5,ops = [[5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 7,n = 5,ops = [[4, 3], [6, 2], [7, 5]]) == 8\n assert candidate(m = 8,n = 7,ops = [[6, 6], [4, 5], [2, 3], [1, 1]]) == 1\n assert candidate(m = 15,n = 10,ops = [[5, 5], [10, 10], [3, 3], [1, 1], [7, 7], [8, 8]]) == 1\n assert candidate(m = 5,n = 5,ops = [[1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]) == 1\n assert candidate(m = 10,n = 1,ops = [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1]]) == 1\n assert candidate(m = 6,n = 6,ops = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]]) == 1\n assert candidate(m = 40000,n = 40000,ops = [[20000, 20000], [15000, 15000], [10000, 10000]]) == 100000000\n assert candidate(m = 20,n = 15,ops = [[10, 10], [5, 5], [15, 15], [8, 8], [12, 12], [7, 7]]) == 25\n assert candidate(m = 9,n = 6,ops = [[4, 4], [5, 5], [6, 6], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 10,n = 10,ops = [[5, 5], [7, 7], [3, 3], [2, 2]]) == 4\n assert candidate(m = 4000,n = 4000,ops = [[2000, 2000], [1000, 1000], [3000, 3000], [500, 500]]) == 250000\n assert candidate(m = 8,n = 6,ops = [[2, 3], [4, 4], [3, 5], [5, 6]]) == 6\n assert candidate(m = 9,n = 9,ops = [[9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 50,n = 50,ops = [[25, 25], [20, 20], [15, 15], [10, 10], [5, 5]]) == 25\n assert candidate(m = 15,n = 10,ops = [[5, 5], [5, 10], [10, 5], [10, 10]]) == 25\n assert candidate(m = 2000,n = 3000,ops = [[1000, 1500], [500, 1000], [1500, 2000], [750, 1250]]) == 500000\n assert candidate(m = 20,n = 10,ops = [[10, 5], [9, 4], [8, 3], [7, 2], [6, 1]]) == 6\n assert candidate(m = 8,n = 8,ops = [[8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 20,n = 10,ops = [[10, 5], [15, 3], [20, 10]]) == 30\n assert candidate(m = 8,n = 8,ops = [[2, 2], [4, 4], [6, 6], [8, 8], [4, 4], [6, 6], [2, 2]]) == 4\n assert candidate(m = 7,n = 7,ops = [[7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 10,n = 10,ops = [[5, 5], [4, 4], [6, 6], [7, 7]]) == 16\n assert candidate(m = 5,n = 6,ops = [[3, 3], [4, 4], [2, 2]]) == 4\n assert candidate(m = 12,n = 9,ops = [[3, 3], [6, 6], [9, 9], [4, 4], [7, 7], [5, 5]]) == 9\n assert candidate(m = 16,n = 10,ops = [[10, 8], [8, 6], [6, 4], [4, 2], [2, 1]]) == 2\n assert candidate(m = 10,n = 15,ops = [[5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 25\n assert candidate(m = 10000,n = 10000,ops = [[9000, 9000], [8000, 8000], [7000, 7000]]) == 49000000\n assert candidate(m = 9,n = 10,ops = [[3, 5], [6, 7], [2, 4], [8, 9], [5, 6], [4, 8], [7, 10]]) == 8\n assert candidate(m = 100,n = 100,ops = [[50, 50], [75, 75], [25, 25], [100, 100]]) == 625\n assert candidate(m = 10000,n = 10000,ops = [[5000, 5000], [2500, 2500], [7500, 7500]]) == 6250000\n assert candidate(m = 8,n = 6,ops = [[6, 5], [5, 4], [4, 3], [3, 2], [2, 1]]) == 2\n assert candidate(m = 7,n = 8,ops = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]) == 1\n assert candidate(m = 8,n = 8,ops = [[2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]]) == 4\n assert candidate(m = 20,n = 20,ops = [[10, 10], [15, 15], [5, 5], [12, 12], [18, 18], [8, 8]]) == 25\n assert candidate(m = 2,n = 4,ops = [[1, 1], [2, 2], [1, 4], [2, 1]]) == 1\n assert candidate(m = 4,n = 5,ops = [[1, 1], [2, 2], [3, 3], [4, 4], [1, 1], [2, 2], [3, 3]]) == 1\n assert candidate(m = 20,n = 10,ops = [[5, 3], [10, 5], [15, 7], [20, 9]]) == 15\n assert candidate(m = 40000,n = 40000,ops = [[20000, 20000], [30000, 30000]]) == 400000000\n assert candidate(m = 5,n = 6,ops = [[3, 4], [2, 3], [4, 5]]) == 6\n assert candidate(m = 3000,n = 2000,ops = [[1000, 1000], [2000, 1500], [500, 500], [1500, 1000]]) == 250000\n assert candidate(m = 5,n = 5,ops = [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]) == 1\n assert candidate(m = 5,n = 5,ops = [[3, 4], [4, 3], [2, 5], [5, 2], [1, 1]]) == 1\n assert candidate(m = 6,n = 3,ops = [[2, 1], [3, 2], [4, 3]]) == 2\n assert candidate(m = 4000,n = 4000,ops = [[2000, 2000], [3000, 3000], [1000, 1000], [4000, 4000]]) == 1000000\n assert candidate(m = 6,n = 6,ops = [[3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3]]) == 9\n assert candidate(m = 5000,n = 4000,ops = [[4000, 3000], [3500, 2500], [3000, 2000], [2500, 1500], [2000, 1000]]) == 2000000\n assert candidate(m = 40000,n = 40000,ops = [[20000, 20000], [30000, 30000], [40000, 40000]]) == 400000000\n assert candidate(m = 10000,n = 10000,ops = [[9000, 9000], [8000, 8000], [7000, 7000], [6000, 6000]]) == 36000000\n assert candidate(m = 3000,n = 2000,ops = [[1500, 1000], [2500, 1500], [500, 500], [3000, 2000]]) == 250000\n assert candidate(m = 8,n = 8,ops = [[6, 6], [7, 7], [4, 4], [5, 5], [3, 3]]) == 9\n assert candidate(m = 20,n = 20,ops = [[10, 10], [15, 15], [5, 5], [20, 20], [8, 8]]) == 25\n assert candidate(m = 5000,n = 3000,ops = [[2500, 1500], [4000, 2500], [1000, 500], [5000, 3000]]) == 500000\n assert candidate(m = 6,n = 6,ops = [[3, 4], [4, 5], [5, 6], [2, 3]]) == 6\n assert candidate(m = 8,n = 6,ops = [[3, 3], [5, 4], [7, 6]]) == 9\n assert candidate(m = 4,n = 4,ops = [[4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 6,n = 4,ops = [[2, 3], [4, 2], [5, 1]]) == 2\n assert candidate(m = 10,n = 10,ops = [[5, 5], [4, 4], [3, 3], [2, 2], [1, 1]]) == 1\n assert candidate(m = 8,n = 8,ops = [[6, 7], [7, 8], [4, 5], [5, 6], [3, 4], [4, 5], [2, 3], [3, 4]]) == 6\n assert candidate(m = 10,n = 10,ops = [[5, 5], [7, 7], [9, 9], [8, 8]]) == 25\n assert candidate(m = 2000,n = 1000,ops = [[1000, 500], [1500, 750], [500, 250], [2000, 1000]]) == 125000\n assert candidate(m = 10,n = 10,ops = [[5, 5], [7, 7], [8, 8], [9, 9], [10, 10]]) == 25\n assert candidate(m = 8,n = 5,ops = [[2, 3], [4, 5], [6, 4], [7, 3], [5, 2]]) == 4\n assert candidate(m = 15,n = 15,ops = [[10, 10], [12, 12], [14, 14], [15, 15], [1, 1], [2, 2], [3, 3]]) == 1\n assert candidate(m = 15,n = 15,ops = [[10, 10], [5, 5], [12, 12], [7, 7], [8, 8]]) == 25\n assert candidate(m = 1,n = 10,ops = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 1\n assert candidate(m = 2,n = 2,ops = [[1, 1], [1, 2], [2, 1], [2, 2]]) == 1\n assert candidate(m = 100,n = 100,ops = [[50, 50], [25, 25], [75, 75], [90, 90]]) == 625\n assert candidate(m = 15,n = 10,ops = [[3, 5], [4, 6], [10, 8], [15, 10]]) == 15\n assert candidate(m = 10,n = 10,ops = [[5, 5], [3, 3], [7, 7], [2, 2], [8, 8]]) == 4\n assert candidate(m = 10,n = 10,ops = [[9, 9], [8, 8], [7, 7], [6, 6], [5, 5]]) == 25\n assert candidate(m = 5,n = 5,ops = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == 1\n assert candidate(m = 10,n = 15,ops = [[5, 5], [7, 7], [3, 3]]) == 9\n assert candidate(m = 20,n = 15,ops = [[10, 10], [5, 5], [15, 15], [12, 12]]) == 25\n assert candidate(m = 5,n = 4,ops = [[3, 2], [4, 3], [2, 4]]) == 4\n assert candidate(m = 1,n = 10000,ops = [[1, 1], [1, 1], [1, 1], [1, 1]]) == 1\n assert candidate(m = 1000,n = 1000,ops = [[500, 500], [999, 999], [1, 1], [500, 500]]) == 1\n assert candidate(m = 12,n = 15,ops = [[6, 6], [5, 5], [7, 7], [8, 8], [9, 9], [10, 10]]) == 25\n assert candidate(m = 15,n = 20,ops = [[10, 15], [12, 18], [5, 10], [3, 4]]) == 12\n assert candidate(m = 10000,n = 1,ops = [[1, 1], [1, 1], [1, 1], [1, 1]]) == 1\n assert candidate(m = 100,n = 100,ops = [[50, 50], [75, 75], [25, 25]]) == 625\n assert candidate(m = 5,n = 4,ops = [[2, 2], [3, 3], [1, 4]]) == 2\n assert candidate(m = 5,n = 4,ops = [[2, 2], [3, 3], [4, 4], [1, 1]]) == 1\n", "comparison": "exact"}, "public_tests": ["3\n3\n[[2,2],[3,3]]", "3\n3\n[[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3],[2,2],[3,3],[3,3],[3,3]]", "3\n3\n[]"], "hints": [], "metadata": {"canonical_parameter_names": ["m", "n", "ops"], "leetcode_dataset_entry_point": "Solution().maxCount", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:05+00:00", "tests_total": 112, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["array", "math"]}, "language": "cpp", "interface": {"raw_signature": "int maxCount(int m, int n, vector>& ops) {", "container": "Solution", "callable": "maxCount", "parameters": [{"name": "m", "type": "int"}, {"name": "n", "type": "int"}, {"name": "ops", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 599, "task_id": "minimum-index-sum-of-two-lists", "difficulty": "Easy", "problem_description": "Given two arrays of strings list1 and list2, find the common strings with the least index sum.\n\nA common string is a string that appeared in both list1 and list2.\n\nA common string with the least index sum is a common string such that if it appeared at list1[i] and list2[j] then i + j should be the minimum value among all the other common strings.\n\nReturn all the common strings with the least index sum. Return the answer in any order.\n\nExample 1:\n\nInput: list1 = [\"Shogun\",\"Tapioca Express\",\"Burger King\",\"KFC\"], list2 = [\"Piatti\",\"The Grill at Torrey Pines\",\"Hungry Hunter Steakhouse\",\"Shogun\"]\nOutput: [\"Shogun\"]\nExplanation: The only common string is \"Shogun\".\n\nExample 2:\n\nInput: list1 = [\"Shogun\",\"Tapioca Express\",\"Burger King\",\"KFC\"], list2 = [\"KFC\",\"Shogun\",\"Burger King\"]\nOutput: [\"Shogun\"]\nExplanation: The common string with the least index sum is \"Shogun\" with index sum = (0 + 1) = 1.\n\nExample 3:\n\nInput: list1 = [\"happy\",\"sad\",\"good\"], list2 = [\"sad\",\"happy\",\"good\"]\nOutput: [\"sad\",\"happy\"]\nExplanation: There are three common strings:\n\"happy\" with index sum = (0 + 1) = 1.\n\"sad\" with index sum = (1 + 0) = 1.\n\"good\" with index sum = (2 + 2) = 4.\nThe strings with the least index sum are \"sad\" and \"happy\".\n\nConstraints:\n\n- 1 <= list1.length, list2.length <= 1000\n- 1 <= list1[i].length, list2[i].length <= 30\n- list1[i] and list2[i] consist of spaces ' ' and English letters.\n- All the strings of list1 are unique.\n- All the strings of list2 are unique.\n- There is at least a common string between list1 and list2.\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(list1=['a', 'b', 'c', 'd', 'e'], list2=['e', 'd', 'c', 'b', 'a']), ['a', 'b', 'c', 'd', 'e'])\n assert answers_match(candidate(list1=['happy', 'sad', 'good'], list2=['sad', 'happy', 'good']), ['happy', 'sad'])\n assert answers_match(candidate(list1=['apple', 'banana'], list2=['banana', 'apple']), ['apple', 'banana'])\n assert answers_match(candidate(list1=['Shogun', 'Tapioca Express', 'Burger King', 'KFC'], list2=['Piatti', 'The Grill at Torrey Pines', 'Hungry Hunter Steakhouse', 'Shogun']), ['Shogun'])\n assert answers_match(candidate(list1=['Shogun', 'Tapioca Express', 'Burger King', 'KFC'], list2=['KFC', 'Shogun', 'Burger King']), ['Shogun'])\n assert answers_match(candidate(list1=['carrot', 'apple', 'banana', 'date'], list2=['banana', 'date', 'apple', 'fig', 'carrot']), ['banana'])\n assert answers_match(candidate(list1=['x', 'y', 'z'], list2=['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']), ['x'])\n assert answers_match(candidate(list1=['Hotel California', 'Fever Tree', 'Hotel Armenia', 'Hotel Greece'], list2=['Hotel Greece', 'Hotel Armenia', 'Fever Tree', 'Hotel California']), ['Hotel California', 'Fever Tree', 'Hotel Armenia', 'Hotel Greece'])\n assert answers_match(candidate(list1=['dog', 'cat', 'bird', 'fish'], list2=['fish', 'bird', 'cat', 'dog', 'ant', 'bee', 'fly', 'spider']), ['dog', 'cat', 'bird', 'fish'])\n assert answers_match(candidate(list1=['Quickly', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog'], list2=['Dog', 'Lazy', 'Over', 'Jumps', 'Fox', 'Brown', 'Quickly']), ['Quickly', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog'])\n assert answers_match(candidate(list1=['RestaurantA', 'RestaurantB', 'RestaurantC'], list2=['RestaurantD', 'RestaurantB', 'RestaurantE', 'RestaurantA']), ['RestaurantB'])\n assert answers_match(candidate(list1=['Alpha', 'Bravo', 'Charlie', 'Delta'], list2=['Echo', 'Delta', 'Bravo', 'Alpha']), ['Alpha', 'Bravo'])\n assert answers_match(candidate(list1=['Shogun', 'Tapioca Express', 'Burger King', 'KFC', 'Pizza Hut'], list2=['Pizza Hut', 'KFC', 'Burger King', 'Tapioca Express', 'Shogun']), ['Shogun', 'Tapioca Express', 'Burger King', 'KFC', 'Pizza Hut'])\n assert answers_match(candidate(list1=['one', 'two', 'three', 'four', 'five'], list2=['six', 'seven', 'eight', 'nine', 'one', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen']), ['one'])\n assert answers_match(candidate(list1=['Fast Food', 'Quick Eats', 'Snack Bar', 'Food Truck'], list2=['Food Truck', 'Quick Eats', 'Snack Bar', 'Fast Food']), ['Quick Eats'])\n assert answers_match(candidate(list1=['starbucks', 'costa', 'dunkin', 'tim hortons'], list2=['tim hortons', 'dunkin', 'costa', 'starbucks']), ['starbucks', 'costa', 'dunkin', 'tim hortons'])\n assert answers_match(candidate(list1=['pancakes', 'waffles', 'omelette'], list2=['omelette', 'pancakes', 'waffles', 'french toast']), ['pancakes'])\n assert answers_match(candidate(list1=['Steakhouse', 'Seafood Grill', 'Wine Bar'], list2=['Wine Bar', 'Seafood Grill', 'Steakhouse']), ['Steakhouse', 'Seafood Grill', 'Wine Bar'])\n assert answers_match(candidate(list1=['Poke Bar', 'Sushi Spot', 'Tataki House'], list2=['Tataki House', 'Poke Bar', 'Sushi Spot']), ['Poke Bar'])\n assert answers_match(candidate(list1=['laptop', 'phone', 'tablet', 'monitor'], list2=['monitor', 'tablet', 'phone', 'laptop']), ['laptop', 'phone', 'tablet', 'monitor'])\n assert answers_match(candidate(list1=['a', 'b', 'c', 'd', 'e', 'f', 'g'], list2=['g', 'f', 'e', 'd', 'c', 'b', 'a']), ['a', 'b', 'c', 'd', 'e', 'f', 'g'])\n assert answers_match(candidate(list1=['coffee', 'tea', 'soda', 'juice'], list2=['juice', 'soda', 'coffee', 'tea']), ['coffee'])\n assert answers_match(candidate(list1=['Pasta Palace', 'Dumplings Galore', 'Steakhouse', 'Soup Kitchen'], list2=['Soup Kitchen', 'Steakhouse', 'Dumplings Galore', 'Pasta Palace']), ['Pasta Palace', 'Dumplings Galore', 'Steakhouse', 'Soup Kitchen'])\n assert answers_match(candidate(list1=['one', 'two', 'three', 'four', 'five', 'six'], list2=['six', 'five', 'four', 'three', 'two', 'one']), ['one', 'two', 'three', 'four', 'five', 'six'])\n assert answers_match(candidate(list1=['X', 'Y', 'Z', 'W', 'V'], list2=['V', 'W', 'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E']), ['X'])\n assert answers_match(candidate(list1=['One', 'Two', 'Three', 'Four', 'Five'], list2=['Six', 'Seven', 'Eight', 'One', 'Five']), ['One'])\n assert answers_match(candidate(list1=['Red', 'Blue', 'Green', 'Yellow', 'Black'], list2=['Orange', 'Black', 'Pink', 'Green', 'Purple', 'Red']), ['Red', 'Green', 'Black'])\n assert answers_match(candidate(list1=['Shogun', 'Tapioca Express', 'Burger King', 'KFC'], list2=['KFC', 'Burger King', 'Tapioca Express', 'Shogun']), ['Shogun', 'Tapioca Express', 'Burger King', 'KFC'])\n assert answers_match(candidate(list1=['Paris', 'Lyon', 'Marseille', 'Toulouse'], list2=['Lyon', 'Toulouse', 'Marseille', 'Paris']), ['Lyon'])\n assert answers_match(candidate(list1=['apple', 'banana', 'cherry', 'date', 'elderberry'], list2=['elderberry', 'date', 'cherry', 'banana', 'apple']), ['apple', 'banana', 'cherry', 'date', 'elderberry'])\n assert answers_match(candidate(list1=['coke', 'pepsi', 'sprite', 'fanta'], list2=['fanta', 'sprite', 'pepsi', 'coke']), ['coke', 'pepsi', 'sprite', 'fanta'])\n assert answers_match(candidate(list1=['French Laundry', 'California Bistro', 'New England Clam Chowder', 'Texas BBQ'], list2=['Texas BBQ', 'New England Clam Chowder', 'California Bistro', 'French Laundry']), ['French Laundry', 'California Bistro', 'New England Clam Chowder', 'Texas BBQ'])\n assert answers_match(candidate(list1=['happy', 'joy', 'sad', 'angry'], list2=['sad', 'happy', 'angry', 'joy']), ['happy'])\n assert answers_match(candidate(list1=['XYZ', 'ABC', 'DEF', 'GHI'], list2=['JKL', 'MNO', 'XYZ', 'PQR']), ['XYZ'])\n assert answers_match(candidate(list1=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'], list2=['J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A']), ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'])\n assert answers_match(candidate(list1=['Pizza Palace', 'Pasta House', 'Taco Bistro'], list2=['Taco Bistro', 'Pizza Palace', 'Pasta House']), ['Pizza Palace'])\n assert answers_match(candidate(list1=['mexican', 'italian', 'japanese', 'chinese'], list2=['thai', 'japanese', 'italian', 'mexican', 'indian']), ['mexican', 'italian', 'japanese'])\n assert answers_match(candidate(list1=['coffee', 'tea', 'soda', 'water'], list2=['water', 'soda', 'coffee', 'tea']), ['coffee'])\n assert answers_match(candidate(list1=['pizza', 'burger', 'sushi', 'taco'], list2=['taco', 'burger', 'pizza', 'ramen']), ['pizza', 'burger'])\n assert answers_match(candidate(list1=['Central Perk', 'The Beanery', 'Mocha Cafe'], list2=['Latte Lounge', 'The Beanery', 'Central Perk', 'Espresso Bar']), ['Central Perk', 'The Beanery'])\n assert answers_match(candidate(list1=['hello', 'world', 'python', 'programming'], list2=['java', 'programming', 'python', 'world', 'hello']), ['hello', 'world', 'python', 'programming'])\n assert answers_match(candidate(list1=['cat cafe', 'dog cafe', 'parrot cafe'], list2=['parrot cafe', 'dog cafe', 'cat cafe', 'rabbit cafe']), ['cat cafe', 'dog cafe', 'parrot cafe'])\n assert answers_match(candidate(list1=['India Gate', 'Great Wall', 'Berlin Wall', 'Eiffel Tower'], list2=['Eiffel Tower', 'Berlin Wall', 'Great Wall', 'India Gate']), ['India Gate', 'Great Wall', 'Berlin Wall', 'Eiffel Tower'])\n assert answers_match(candidate(list1=['Los Angeles', 'New York', 'Chicago'], list2=['Chicago', 'Los Angeles', 'Houston', 'New York']), ['Los Angeles'])\n assert answers_match(candidate(list1=['pasta', 'pizza', 'lasagna'], list2=['pizza', 'lasagna', 'pasta', 'ravioli']), ['pizza'])\n assert answers_match(candidate(list1=['Fast', 'Food', 'Place', 'Awesome'], list2=['Awesome', 'Place', 'Food', 'Fast']), ['Fast', 'Food', 'Place', 'Awesome'])\n assert answers_match(candidate(list1=['x', 'y', 'z'], list2=['a', 'b', 'c', 'd', 'x', 'y', 'z']), ['x'])\n assert answers_match(candidate(list1=['red', 'blue', 'green', 'yellow'], list2=['yellow', 'green', 'blue', 'red']), ['red', 'blue', 'green', 'yellow'])\n assert answers_match(candidate(list1=['X', 'Y', 'Z'], list2=['W', 'V', 'U', 'X', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M', 'L', 'K', 'J', 'I', 'H', 'G', 'F', 'E', 'D', 'C', 'B', 'A', 'Z']), ['X'])\n assert answers_match(candidate(list1=['apple pie', 'cherry pie', 'blueberry pie'], list2=['blueberry pie', 'cherry pie', 'apple pie', 'pumpkin pie']), ['apple pie', 'cherry pie', 'blueberry pie'])\n assert answers_match(candidate(list1=['x', 'y', 'z'], list2=['z', 'x', 'y', '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 answers_match(candidate(list1=['taco', 'burrito', 'nachos', 'enchilada'], list2=['enchilada', 'taco', 'nachos', 'burrito']), ['taco'])\n assert answers_match(candidate(list1=['mango', 'pineapple', 'kiwi', 'grapefruit'], list2=['grapefruit', 'kiwi', 'pineapple', 'mango']), ['mango', 'pineapple', 'kiwi', 'grapefruit'])\n assert answers_match(candidate(list1=['red', 'blue', 'green', 'yellow'], list2=['yellow', 'green', 'blue', 'red', 'purple', 'orange', 'pink', 'brown']), ['red', 'blue', 'green', 'yellow'])\n assert answers_match(candidate(list1=['orange', 'grape', 'melon', 'kiwi'], list2=['kiwi', 'melon', 'grape', 'orange', 'pineapple', 'mango']), ['orange', 'grape', 'melon', 'kiwi'])\n assert answers_match(candidate(list1=['A', 'B', 'C', 'D', 'E', 'F'], list2=['F', 'E', 'D', 'C', 'B', 'A']), ['A', 'B', 'C', 'D', 'E', 'F'])\n assert answers_match(candidate(list1=['FastFood', 'Italian', 'Chinese', 'American', 'Mexican'], list2=['Thai', 'Indian', 'American', 'Chinese', 'Japanese']), ['Chinese', 'American'])\n assert answers_match(candidate(list1=['apple', 'orange', 'banana', 'grape'], list2=['grape', 'orange', 'banana', 'apple']), ['orange'])\n assert answers_match(candidate(list1=['Sushi Spot', 'Ramen Joint', 'BBQ Pit', 'Pizza Place'], list2=['Pizza Place', 'BBQ Pit', 'Ramen Joint', 'Sushi Spot']), ['Sushi Spot', 'Ramen Joint', 'BBQ Pit', 'Pizza Place'])\n assert answers_match(candidate(list1=['M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V'], list2=['W', 'X', 'Y', 'Z', 'V', 'U', 'T', 'S', 'R', 'Q', 'P', 'O', 'N', 'M']), ['M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V'])\n assert answers_match(candidate(list1=['bread', 'butter', 'jam', 'cheese'], list2=['cheese', 'jam', 'butter', 'bread']), ['bread', 'butter', 'jam', 'cheese'])\n assert answers_match(candidate(list1=['A', 'B', 'C', 'D', 'E', 'F', 'G'], list2=['H', 'I', 'J', 'K', 'A', 'L', 'M', 'F', 'N']), ['A'])\n assert answers_match(candidate(list1=['Savory Bites', 'Italian Delight', 'Vegan Cafe', 'Bakery'], list2=['Bakery', 'Vegan Cafe', 'Italian Delight', 'Savory Bites']), ['Savory Bites', 'Italian Delight', 'Vegan Cafe', 'Bakery'])\n assert answers_match(candidate(list1=['XYZ', 'ABC', 'DEF', 'GHI', 'JKL'], list2=['JKL', 'GHI', 'DEF', 'ABC', 'XYZ']), ['XYZ', 'ABC', 'DEF', 'GHI', 'JKL'])\n assert answers_match(candidate(list1=['salad', 'steak', 'soup', 'chicken'], list2=['chicken', 'salad', 'soup', 'steak']), ['salad'])\n assert answers_match(candidate(list1=['pizza', 'burger', 'sushi', 'taco'], list2=['salad', 'burger', 'taco', 'pizza']), ['burger'])\n assert answers_match(candidate(list1=['Unique', 'String', 'Here', 'Now'], list2=['Not', 'Here', 'Unique', 'String']), ['Unique'])\n assert answers_match(candidate(list1=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'], list2=['j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a']), ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'])\n assert answers_match(candidate(list1=['Pizza', 'Burger', 'Pasta'], list2=['Sushi', 'Pizza', 'Pasta', 'Burger']), ['Pizza'])\n assert answers_match(candidate(list1=['Java Hut', 'Code Brew', 'Data Cafe'], list2=['Algo Eatery', 'Data Cafe', 'Java Hut', 'Code Brew']), ['Java Hut'])\n assert answers_match(candidate(list1=['Foo Bar', 'Foo Baz', 'Bar Baz', 'Foo Bar Baz'], list2=['Bar Baz', 'Foo Baz', 'Foo Bar', 'Foo Bar Baz', 'Baz Bar']), ['Foo Bar', 'Foo Baz', 'Bar Baz'])\n assert answers_match(candidate(list1=['Burger King', 'Shogun', 'KFC', 'Tapioca Express'], list2=['KFC', 'Tapioca Express', 'Shogun', 'Burger King', 'Sushi']), ['KFC'])\n assert answers_match(candidate(list1=['Breakfast', 'Lunch', 'Dinner'], list2=['Dinner', 'Breakfast', 'Lunch']), ['Breakfast'])\n assert answers_match(candidate(list1=['x', 'y', 'z', 'a', 'b', 'c'], list2=['c', 'b', 'a', 'z', 'y', 'x']), ['x', 'y', 'z', 'a', 'b', 'c'])\n assert answers_match(candidate(list1=['pizza', 'burger', 'sushi', 'taco'], list2=['salad', 'taco', 'pizza', 'burger']), ['pizza'])\n assert answers_match(candidate(list1=['alpha', 'beta', 'gamma', 'delta', 'epsilon'], list2=['epsilon', 'delta', 'gamma', 'beta', 'alpha', 'omega', 'psi']), ['alpha', 'beta', 'gamma', 'delta', 'epsilon'])\n assert answers_match(candidate(list1=['One', 'Two', 'Three', 'Four', 'Five'], list2=['Five', 'Four', 'Three', 'Two', 'One']), ['One', 'Two', 'Three', 'Four', 'Five'])\n assert answers_match(candidate(list1=['Coffee Spot', 'Deluxe Lounge', 'Burger Spot', 'Pancake House'], list2=['Pancake House', 'Burger Spot', 'Deluxe Lounge', 'Coffee Spot']), ['Coffee Spot', 'Deluxe Lounge', 'Burger Spot', 'Pancake House'])\n assert answers_match(candidate(list1=['X', 'Y', 'Z', 'W'], list2=['W', 'V', 'U', 'X', 'Y', 'Z']), ['X', 'W'])\n assert answers_match(candidate(list1=['Alpha', 'Beta', 'Gamma', 'Delta'], list2=['Epsilon', 'Zeta', 'Delta', 'Alpha', 'Eta', 'Theta']), ['Alpha'])\n assert answers_match(candidate(list1=['Paris Bistro', 'La Belle Vie', 'Sushi Place', 'Taco Bell'], list2=['Taco Bell', 'Sushi Place', 'La Belle Vie', 'Pizza Hut']), ['La Belle Vie', 'Sushi Place', 'Taco Bell'])\n assert answers_match(candidate(list1=['m', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'], list2=['z', 'y', 'x', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm']), ['m', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'])\n assert answers_match(candidate(list1=['Alice', 'Bob', 'Charlie', 'David'], list2=['David', 'Charlie', 'Bob', 'Alice']), ['Alice', 'Bob', 'Charlie', 'David'])\n assert answers_match(candidate(list1=['apple', 'banana', 'cherry', 'date', 'elderberry'], list2=['elderberry', 'date', 'cherry', 'banana', 'apple', 'fig', 'grape']), ['apple', 'banana', 'cherry', 'date', 'elderberry'])\n assert answers_match(candidate(list1=['Grill Room', 'BBQ Joint', 'Smokers Bar'], list2=['Smokers Bar', 'Grill Room', 'BBQ Joint']), ['Grill Room'])\n assert answers_match(candidate(list1=['pasta', 'burger', 'pizza', 'sushi'], list2=['pizza', 'sushi', 'burger', 'pasta']), ['pizza'])\n assert answers_match(candidate(list1=['Sushi Bar', 'Pasta Place', 'Taco Stand', 'Burger Joint'], list2=['Steak House', 'Taco Stand', 'Pasta Place', 'Sushi Bar']), ['Sushi Bar', 'Pasta Place', 'Taco Stand'])\n", "comparison": "unordered"}, "public_tests": ["[\"Shogun\",\"Tapioca Express\",\"Burger King\",\"KFC\"]\n[\"Piatti\",\"The Grill at Torrey Pines\",\"Hungry Hunter Steakhouse\",\"Shogun\"]", "[\"Shogun\",\"Tapioca Express\",\"Burger King\",\"KFC\"]\n[\"KFC\",\"Shogun\",\"Burger King\"]", "[\"happy\",\"sad\",\"good\"]\n[\"sad\",\"happy\",\"good\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["list1", "list2"], "leetcode_dataset_entry_point": "Solution().findRestaurant", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:08+00:00", "tests_total": 93, "tests_dropped": 6, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "string"]}, "language": "cpp", "interface": {"raw_signature": "vector findRestaurant(vector& list1, vector& list2) {", "container": "Solution", "callable": "findRestaurant", "parameters": [{"name": "list1", "type": "vector&"}, {"name": "list2", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 600, "task_id": "non-negative-integers-without-consecutive-ones", "difficulty": "Hard", "problem_description": "Given a positive integer n, return the number of the integers in the range [0, n] whose binary representations do not contain consecutive ones.\n\nExample 1:\n\nInput: n = 5\nOutput: 5\nExplanation:\nHere are the non-negative integers <= 5 with their corresponding binary representations:\n0 : 0\n1 : 1\n2 : 10\n3 : 11\n4 : 100\n5 : 101\nAmong them, only integer 3 disobeys the rule (two consecutive ones) and the other 5 satisfy the rule.\n\nExample 2:\n\nInput: n = 1\nOutput: 2\n\nExample 3:\n\nInput: n = 2\nOutput: 3\n\nConstraints:\n\n- 1 <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 100) == 34\n assert candidate(n = 15) == 8\n assert candidate(n = 1000000) == 17711\n assert candidate(n = 32) == 14\n assert candidate(n = 2) == 3\n assert candidate(n = 1) == 2\n assert candidate(n = 1000000000) == 2178309\n assert candidate(n = 1000) == 144\n assert candidate(n = 10) == 8\n assert candidate(n = 5) == 5\n assert candidate(n = 987654321) == 2178309\n assert candidate(n = 888888888) == 2178309\n assert candidate(n = 333333333) == 1149851\n assert candidate(n = 777777777) == 2178309\n assert candidate(n = 999999999) == 2178309\n assert candidate(n = 110011001) == 514229\n assert candidate(n = 314159265) == 1149851\n assert candidate(n = 500000000) == 1346269\n assert candidate(n = 123456789) == 514229\n assert candidate(n = 555555555) == 1496319\n assert candidate(n = 101010101) == 514229\n assert candidate(n = 100000000) == 514229\n assert candidate(n = 111111111) == 514229\n assert candidate(n = 800000000) == 2178309\n", "comparison": "exact"}, "public_tests": ["5", "1", "2"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().findIntegers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:10+00:00", "tests_total": 26, "tests_dropped": 2, "flags": [], "topic_tags": ["dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int findIntegers(int n) {", "container": "Solution", "callable": "findIntegers", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 605, "task_id": "can-place-flowers", "difficulty": "Easy", "problem_description": "You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots.\n\nGiven an integer array flowerbed containing 0's and 1's, where 0 means empty and 1 means not empty, and an integer n, return true if n new flowers can be planted in the flowerbed without violating the no-adjacent-flowers rule and false otherwise.\n\nExample 1:\n\nInput: flowerbed = [1,0,0,0,1], n = 1\nOutput: true\n\nExample 2:\n\nInput: flowerbed = [1,0,0,0,1], n = 2\nOutput: false\n\nConstraints:\n\n- 1 <= flowerbed.length <= 2 * 10^4\n- flowerbed[i] is 0 or 1.\n- There are no two adjacent flowers in flowerbed.\n- 0 <= n <= flowerbed.length\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1],n = 2) == False\n assert candidate(flowerbed = [1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 1],n = 1) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 1],n = 2) == False\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 1],n = 1) == False\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0],n = 2) == True\n assert candidate(flowerbed = [0],n = 1) == True\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 1, 0, 0],n = 2) == False\n assert candidate(flowerbed = [0, 1, 0, 1, 0],n = 1) == False\n assert candidate(flowerbed = [0, 1, 0, 0, 1, 0, 0, 1, 0],n = 0) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0],n = 1) == True\n assert candidate(flowerbed = [0, 0],n = 1) == True\n assert candidate(flowerbed = [1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1],n = 2) == True\n assert candidate(flowerbed = [1, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 10) == False\n assert candidate(flowerbed = [0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 2) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0],n = 2) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 3) == False\n assert candidate(flowerbed = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 2) == False\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],n = 0) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [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],n = 3) == False\n assert candidate(flowerbed = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0],n = 2) == True\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0],n = 6) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 4) == False\n assert candidate(flowerbed = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 7) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 6) == True\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],n = 5) == False\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 4) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 5) == False\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0],n = 3) == False\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 2) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0],n = 5) == True\n assert candidate(flowerbed = [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],n = 15) == False\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 8) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 4) == True\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 2) == False\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],n = 2) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 2) == False\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 8) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1],n = 4) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 6) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 6) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1],n = 2) == False\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [0, 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 = 10) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1],n = 2) == False\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],n = 4) == True\n assert candidate(flowerbed = [1, 0, 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 = 0) == True\n assert candidate(flowerbed = [0, 0, 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 = 13) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [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],n = 3) == True\n assert candidate(flowerbed = [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 1],n = 3) == False\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],n = 4) == False\n assert candidate(flowerbed = [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],n = 5) == True\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 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 = 0) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 3) == False\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],n = 3) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0],n = 5) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1],n = 3) == False\n assert candidate(flowerbed = [0, 0, 1, 0, 1, 0, 1, 0, 0],n = 1) == True\n assert candidate(flowerbed = [1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],n = 2) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],n = 4) == True\n assert candidate(flowerbed = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],n = 2) == False\n assert candidate(flowerbed = [0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 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 = 15) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],n = 5) == True\n assert candidate(flowerbed = [0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0],n = 4) == True\n assert candidate(flowerbed = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],n = 10) == True\n assert candidate(flowerbed = [1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0],n = 3) == True\n assert candidate(flowerbed = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],n = 0) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0],n = 3) == True\n assert candidate(flowerbed = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0],n = 6) == True\n", "comparison": "exact"}, "public_tests": ["[1,0,0,0,1]\n1", "[1,0,0,0,1]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["flowerbed", "n"], "leetcode_dataset_entry_point": "Solution().canPlaceFlowers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:12+00:00", "tests_total": 107, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "bool canPlaceFlowers(vector& flowerbed, int n) {", "container": "Solution", "callable": "canPlaceFlowers", "parameters": [{"name": "flowerbed", "type": "vector&"}, {"name": "n", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 609, "task_id": "find-duplicate-file-in-system", "difficulty": "Medium", "problem_description": "Given a list paths of directory info, including the directory path, and all the files with contents in this directory, return all the duplicate files in the file system in terms of their paths. You may return the answer in any order.\n\nA group of duplicate files consists of at least two files that have the same content.\n\nA single directory info string in the input list has the following format:\n\n- \"root/d1/d2/.../dm f1.txt(f1_content) f2.txt(f2_content) ... fn.txt(fn_content)\"\n\nIt means there are n files (f1.txt, f2.txt ... fn.txt) with content (f1_content, f2_content ... fn_content) respectively in the directory \"root/d1/d2/.../dm\". Note that n >= 1 and m >= 0. If m = 0, it means the directory is just the root directory.\n\nThe output is a list of groups of duplicate file paths. For each group, it contains all the file paths of the files that have the same content. A file path is a string that has the following format:\n\n- \"directory_path/file_name.txt\"\n\nExample 1:\n\nInput: paths = [\"root/a 1.txt(abcd) 2.txt(efgh)\",\"root/c 3.txt(abcd)\",\"root/c/d 4.txt(efgh)\",\"root 4.txt(efgh)\"]\nOutput: [[\"root/a/2.txt\",\"root/c/d/4.txt\",\"root/4.txt\"],[\"root/a/1.txt\",\"root/c/3.txt\"]]\n\nExample 2:\n\nInput: paths = [\"root/a 1.txt(abcd) 2.txt(efgh)\",\"root/c 3.txt(abcd)\",\"root/c/d 4.txt(efgh)\"]\nOutput: [[\"root/a/2.txt\",\"root/c/d/4.txt\"],[\"root/a/1.txt\",\"root/c/3.txt\"]]\n\nConstraints:\n\n- 1 <= paths.length <= 2 * 10^4\n- 1 <= paths[i].length <= 3000\n- 1 <= sum(paths[i].length) <= 5 * 10^5\n- paths[i] consist of English letters, digits, '/', '.', '(', ')', and ' '.\n- You may assume no files or directories share the same name in the same directory.\n- You may assume each given directory info represents a unique directory. A single blank space separates the directory path and file info.\n\nFollow up:\n\n- Imagine you are given a real file system, how will you search files? DFS or BFS?\n- If the file content is very large (GB level), how will you modify your solution?\n- If you can only read the file by 1kb each time, how will you modify your solution?\n- What is the time complexity of your modified solution? What is the most time-consuming part and memory-consuming part of it? How to optimize?\n- How to make sure the duplicated files you find are not false positive?\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(paths=['root/a 1.txt(abcd)', 'root/b 2.txt(efgh)', 'root/c 3.txt(efgh)', 'root/d 4.txt(abcd)']), [['root/a/1.txt', 'root/d/4.txt'], ['root/b/2.txt', 'root/c/3.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)', 'root/e 5.txt(efgh)']), [['root/1.txt', 'root/c/3.txt'], ['root/2.txt', 'root/c/d/4.txt', 'root/e/5.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)']), [['root/a/1.txt', 'root/c/3.txt'], ['root/a/2.txt', 'root/c/d/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd)', 'root/b 2.txt(efgh)', 'root/c 3.txt(efgh)', 'root/d 4.txt(efgh)']), [['root/b/2.txt', 'root/c/3.txt', 'root/d/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)', 'root 4.txt(efgh)']), [['root/a/1.txt', 'root/c/3.txt'], ['root/a/2.txt', 'root/c/d/4.txt', 'root/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abcd)', 'root/c 2.txt(efgh)', 'root/c/d 3.txt(ghij)', 'root/c/d/e 4.txt(klmn)']), [])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efsfgh)', 'root/c 3.txt(abdfcd)', 'root/c/d 4.txt(efggdfh)', 'root 4.txt(efggdfh)']), [['root/c/d/4.txt', 'root/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(a) 2.txt(ab) 3.txt(abc) 4.txt(abcd)']), [])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efsfgh)', 'root/b 3.txt(efsfgh) 4.txt(efgh)']), [['root/a/2.txt', 'root/b/3.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/a 3.txt(abcd)', 'root/b 4.txt(efgh) 5.txt(abcd)']), [['root/a/1.txt', 'root/a/3.txt', 'root/b/5.txt'], ['root/a/2.txt', 'root/b/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abcd) 2.txt(efgh)', 'root 3.txt(abcd)', 'root 4.txt(efgh)', 'root 5.txt(abcd)', 'root 6.txt(efgh)']), [['root/1.txt', 'root/3.txt', 'root/5.txt'], ['root/2.txt', 'root/4.txt', 'root/6.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)', 'root 4.txt(efgh)']), [['root/a/1.txt', 'root/c/3.txt'], ['root/a/2.txt', 'root/c/d/4.txt', 'root/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/a 3.txt(abcd) 4.txt(efgh)']), [['root/a/1.txt', 'root/a/3.txt'], ['root/a/2.txt', 'root/a/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abcd) 2.txt(efsfgh)', 'root/c 3.txt(abdfcd)', 'root/c/d 4.txt(efggdfh)']), [])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)']), [['root/a/1.txt', 'root/c/3.txt'], ['root/a/2.txt', 'root/c/d/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abc)', 'root/c 2.txt(abc)', 'root/c/d 3.txt(abc)', 'root/c/d/e 4.txt(abc)']), [['root/1.txt', 'root/c/2.txt', 'root/c/d/3.txt', 'root/c/d/e/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd)', 'root/c/d 4.txt(efgh)', 'root 4.txt(efasdfgh)']), [['root/a/1.txt', 'root/c/3.txt'], ['root/a/2.txt', 'root/c/d/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd)', 'root/b 2.txt(efgh)', 'root/c 3.txt(efgh)']), [['root/b/2.txt', 'root/c/3.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd)', 'root/b 1.txt(efgh)', 'root/c 1.txt(abcd)']), [['root/a/1.txt', 'root/c/1.txt']])\n assert answers_match(candidate(paths=['dir1 1.txt(xyz) 2.txt(abc)', 'dir1/subdir1 3.txt(abc)', 'dir1/subdir2 4.txt(xyz) 5.txt(ghi)', 'dir1/subdir2/subsubdir 6.txt(ghi) 7.txt(jkl)']), [['dir1/1.txt', 'dir1/subdir2/4.txt'], ['dir1/2.txt', 'dir1/subdir1/3.txt'], ['dir1/subdir2/5.txt', 'dir1/subdir2/subsubdir/6.txt']])\n assert answers_match(candidate(paths=['root/source/file1.txt(largeContentX)', 'root/source/file2.txt(largeContentY)', 'root/source/file3.txt(largeContentZ)', 'root/source/file4.txt(largeContentX)', 'root/source/file5.txt(largeContentY)', 'root/source/file6.txt(largeContentZ)', 'root/source/file7.txt(largeContentW)']), [])\n assert answers_match(candidate(paths=['root/a/b/c/d/e/f/g 1.txt(abcd) 2.txt(efgh)', 'root/a/b/c/d/e/f 3.txt(abcd)', 'root/a/b/c/d/e 4.txt(efgh)', 'root/a/b/c/d 5.txt(efgh)', 'root/a/b/c 6.txt(abcd)']), [['root/a/b/c/d/e/f/g/1.txt', 'root/a/b/c/d/e/f/3.txt', 'root/a/b/c/6.txt'], ['root/a/b/c/d/e/f/g/2.txt', 'root/a/b/c/d/e/4.txt', 'root/a/b/c/d/5.txt']])\n assert answers_match(candidate(paths=['root/user/docs 1.pdf(abcdef)', 'root/user/downloads 2.pdf(abcdef)', 'root/user/music 3.mp3(ghijkl)', 'root/user/music 4.mp3(ghijkl)', 'root/user/photos 5.jpg(mnopqr)', 'root/user/photos 6.jpg(mnopqr)']), [['root/user/docs/1.pdf', 'root/user/downloads/2.pdf'], ['root/user/music/3.mp3', 'root/user/music/4.mp3'], ['root/user/photos/5.jpg', 'root/user/photos/6.jpg']])\n assert answers_match(candidate(paths=['app/assets 1.css(abc) 2.js(def)', 'app/assets/css 3.css(abc)', 'app/assets/js 4.js(def) 5.js(ghi)', 'app/assets/js/libs 6.js(ghi)', 'app/assets/images 7.png(xyz)', 'app/assets/images/icons 8.png(xyz) 9.png(wxyz)']), [['app/assets/1.css', 'app/assets/css/3.css'], ['app/assets/2.js', 'app/assets/js/4.js'], ['app/assets/js/5.js', 'app/assets/js/libs/6.js'], ['app/assets/images/7.png', 'app/assets/images/icons/8.png']])\n assert answers_match(candidate(paths=['root/user1/docs/file1.txt(contentA)', 'root/user1/docs/file2.txt(contentB)', 'root/user2/docs/file1.txt(contentA)', 'root/user2/docs/file3.txt(contentC)', 'root/user3/docs/file4.txt(contentB)', 'root/user3/docs/file5.txt(contentD)']), [])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd123) 2.txt(efgh456)', 'root/a/b/d 3.txt(abcd123) 4.txt(efgh456)', 'root/e/f/g 5.txt(abcd123) 6.txt(efgh456)', 'root/h/i/j 7.txt(abcd123) 8.txt(efgh456)', 'root/k/l/m/n/o 9.txt(abcd123) 10.txt(efgh456)', 'root/p/q/r/s/t/u/v/w 11.txt(abcd123) 12.txt(efgh456)', 'root/x/y/z 13.txt(abcd123) 14.txt(efgh456)', 'root 15.txt(abcd123) 16.txt(efgh456)']), [['root/a/b/c/1.txt', 'root/a/b/d/3.txt', 'root/e/f/g/5.txt', 'root/h/i/j/7.txt', 'root/k/l/m/n/o/9.txt', 'root/p/q/r/s/t/u/v/w/11.txt', 'root/x/y/z/13.txt', 'root/15.txt'], ['root/a/b/c/2.txt', 'root/a/b/d/4.txt', 'root/e/f/g/6.txt', 'root/h/i/j/8.txt', 'root/k/l/m/n/o/10.txt', 'root/p/q/r/s/t/u/v/w/12.txt', 'root/x/y/z/14.txt', 'root/16.txt']])\n assert answers_match(candidate(paths=['root/x 6.txt(ijkl) 7.txt(mnop)', 'root/y 8.txt(ijkl)', 'root/z 9.txt(mnop) 10.txt(ijkl)', 'root/a 11.txt(mnop)']), [['root/x/6.txt', 'root/y/8.txt', 'root/z/10.txt'], ['root/x/7.txt', 'root/z/9.txt', 'root/a/11.txt']])\n assert answers_match(candidate(paths=['deep/nested/folder1/1.txt(x)', 'deep/nested/folder1/2.txt(y)', 'deep/nested/folder2/3.txt(x)', 'deep/nested/folder2/4.txt(z)', 'deep/nested/folder3/5.txt(y)', 'deep/nested/folder3/6.txt(x)', 'deep/nested/folder4/7.txt(z)']), [])\n assert answers_match(candidate(paths=['root/1/2/3 1.file(a)', 'root/1/2 2.file(a)', 'root/1 3.file(a)', 'root/1/2/3/4 4.file(a)', 'root/5 5.file(b)', 'root/5/6 6.file(b)', 'root/5/6/7 7.file(b)']), [['root/1/2/3/1.file', 'root/1/2/2.file', 'root/1/3.file', 'root/1/2/3/4/4.file'], ['root/5/5.file', 'root/5/6/6.file', 'root/5/6/7/7.file']])\n assert answers_match(candidate(paths=['root/dir1/file1.txt(abc) file2.txt(def)', 'root/dir2/file3.txt(ghi)', 'root/dir3/file4.txt(abc) file5.txt(def)', 'root/dir4/file6.txt(ghi) file7.txt(jkl)', 'root/dir5/file8.txt(abc)']), [['root/dir1/file1.txt(abc)/file2.txt', 'root/dir3/file4.txt(abc)/file5.txt']])\n assert answers_match(candidate(paths=['folder1/subfolder1/1.txt(xyz) folder1/subfolder1/2.txt(abc)', 'folder1/subfolder2/3.txt(xyz) folder1/subfolder2/4.txt(def)', 'folder2/subfolder1/5.txt(abc) folder2/subfolder1/6.txt(xyz)', 'folder2/subfolder2/7.txt(def) folder2/subfolder2/8.txt(ghi)']), [])\n assert answers_match(candidate(paths=['root/subdir1/subsubdir1/0.txt(aaaaa) subsubdir2/b.txt(aaaaa)', 'root/subdir1/subsubdir2/c.txt(bbbbb)', 'root/subdir2/1.txt(bbbbb)', 'root/subdir3/2.txt(ccccc)', 'root/subdir4/3.txt(ddddd)', 'root/subdir5/4.txt(ccccc)', 'root/subdir6/5.txt(ddddd)', 'root/subdir7/6.txt(aaaaa)']), [])\n assert answers_match(candidate(paths=['root 1.txt(xyz) 2.txt(abc) 3.txt(def)', 'root/x 4.txt(xyz)', 'root/y 5.txt(abc)', 'root/z 6.txt(def)', 'root/a/b 7.txt(xyz) 8.txt(abc)', 'root/c/d 9.txt(def)', 'root/e/f 10.txt(xyz)', 'root/g/h 11.txt(abc)', 'root/i/j 12.txt(def)']), [['root/1.txt', 'root/x/4.txt', 'root/a/b/7.txt', 'root/e/f/10.txt'], ['root/2.txt', 'root/y/5.txt', 'root/a/b/8.txt', 'root/g/h/11.txt'], ['root/3.txt', 'root/z/6.txt', 'root/c/d/9.txt', 'root/i/j/12.txt']])\n assert answers_match(candidate(paths=['base 20.txt(stu) 21.txt(vwx)', 'base/sub1 22.txt(yza) 23.txt(stu)', 'base/sub2 24.txt(vwx) 25.txt(yza)', 'base/sub3 26.txt(yza)']), [['base/20.txt', 'base/sub1/23.txt'], ['base/21.txt', 'base/sub2/24.txt'], ['base/sub1/22.txt', 'base/sub2/25.txt', 'base/sub3/26.txt']])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd123) 2.txt(efgh456)', 'root/a/b/d 3.txt(abcd123)', 'root/a/b/e 4.txt(efgh456)', 'root/a/b/f 5.txt(abcd123)', 'root/a/b/g 6.txt(efgh456)', 'root/a/b/h 7.txt(abcd123)', 'root/a/b/i 8.txt(efgh456)']), [['root/a/b/c/1.txt', 'root/a/b/d/3.txt', 'root/a/b/f/5.txt', 'root/a/b/h/7.txt'], ['root/a/b/c/2.txt', 'root/a/b/e/4.txt', 'root/a/b/g/6.txt', 'root/a/b/i/8.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd)', 'root/b 2.txt(abcd)', 'root/c 3.txt(abcd)', 'root/d 4.txt(abcd)', 'root/e 5.txt(abcd)', 'root/f 6.txt(abcd)', 'root/g 7.txt(abcd)', 'root/h 8.txt(abcd)', 'root/i 9.txt(abcd)', 'root/j 10.txt(abcd)', 'root/k 11.txt(abcd)', 'root/l 12.txt(abcd)', 'root/m 13.txt(abcd)', 'root/n 14.txt(abcd)', 'root/o 15.txt(abcd)', 'root/p 16.txt(abcd)', 'root/q 17.txt(abcd)', 'root/r 18.txt(abcd)', 'root/s 19.txt(abcd)', 'root/t 20.txt(abcd)']), [['root/a/1.txt', 'root/b/2.txt', 'root/c/3.txt', 'root/d/4.txt', 'root/e/5.txt', 'root/f/6.txt', 'root/g/7.txt', 'root/h/8.txt', 'root/i/9.txt', 'root/j/10.txt', 'root/k/11.txt', 'root/l/12.txt', 'root/m/13.txt', 'root/n/14.txt', 'root/o/15.txt', 'root/p/16.txt', 'root/q/17.txt', 'root/r/18.txt', 'root/s/19.txt', 'root/t/20.txt']])\n assert answers_match(candidate(paths=['root 1.txt(abcd) 2.txt(efgh) 3.txt(ijkl)', 'root/d 4.txt(efgh) 5.txt(mnop)', 'root/e 6.txt(abcd) 7.txt(efgh)', 'root/f 8.txt(mnop)']), [['root/1.txt', 'root/e/6.txt'], ['root/2.txt', 'root/d/4.txt', 'root/e/7.txt'], ['root/d/5.txt', 'root/f/8.txt']])\n assert answers_match(candidate(paths=['root/data/logs/error.log(log1)', 'root/data/logs/access.log(log2)', 'root/data/backup/error.log(log1)', 'root/data/backup/access.log(log2)', 'root/data/temp/error.log(log1)']), [])\n assert answers_match(candidate(paths=['root 1.txt(abc) 2.txt(def) 3.txt(ghi)', 'root 4.txt(abc) 5.txt(jkl)', 'root 6.txt(mno) 7.txt(def)', 'root 8.txt(pqr) 9.txt(ghi)', 'root 10.txt(stu) 11.txt(vwx)', 'root 12.txt(yza) 13.txt(abc)', 'root 14.txt(mno) 15.txt(def)', 'root 16.txt(ghi) 17.txt(jkl)', 'root 18.txt(stu) 19.txt(vwx)', 'root 20.txt(yza) 21.txt(abc)', 'root 22.txt(mno) 23.txt(def)', 'root 24.txt(ghi) 25.txt(jkl)', 'root 26.txt(stu) 27.txt(vwx)', 'root 28.txt(yza) 29.txt(abc)', 'root 30.txt(mno) 31.txt(def)']), [['root/1.txt', 'root/4.txt', 'root/13.txt', 'root/21.txt', 'root/29.txt'], ['root/2.txt', 'root/7.txt', 'root/15.txt', 'root/23.txt', 'root/31.txt'], ['root/3.txt', 'root/9.txt', 'root/16.txt', 'root/24.txt'], ['root/5.txt', 'root/17.txt', 'root/25.txt'], ['root/6.txt', 'root/14.txt', 'root/22.txt', 'root/30.txt'], ['root/10.txt', 'root/18.txt', 'root/26.txt'], ['root/11.txt', 'root/19.txt', 'root/27.txt'], ['root/12.txt', 'root/20.txt', 'root/28.txt']])\n assert answers_match(candidate(paths=['root/project1/src/main.py(code123)', 'root/project2/src/main.py(code456)', 'root/project3/src/main.py(code123)', 'root/project4/src/main.py(code789)', 'root/project5/src/main.py(code456)']), [])\n assert answers_match(candidate(paths=['root/a/b 1.txt(abcd) 2.txt(efgh)', 'root/a/b/c 3.txt(abcd)', 'root/a/b/c/d 4.txt(efgh)', 'root/a/b/e 5.txt(efgh)', 'root/f/g 6.txt(abcd)']), [['root/a/b/1.txt', 'root/a/b/c/3.txt', 'root/f/g/6.txt'], ['root/a/b/2.txt', 'root/a/b/c/d/4.txt', 'root/a/b/e/5.txt']])\n assert answers_match(candidate(paths=['root/complex/structure/with/different/contents/1.txt(abc)', 'root/complex/structure/with/different/contents/2.txt(def)', 'root/complex/structure/with/3.txt(ghi)', 'root/complex/structure/with/4.txt(jkl)', 'root/complex/structure/5.txt(mno)', 'root/complex/structure/with/different/contents/6.txt(abc)', 'root/complex/structure/with/different/contents/7.txt(def)', 'root/complex/structure/with/different/contents/8.txt(ghi)', 'root/complex/structure/with/different/contents/9.txt(jkl)', 'root/complex/structure/with/different/contents/10.txt(mno)', 'root/complex/structure/with/different/contents/11.txt(abc)', 'root/complex/structure/with/different/contents/12.txt(def)', 'root/complex/structure/with/different/contents/13.txt(ghi)', 'root/complex/structure/with/different/contents/14.txt(jkl)', 'root/complex/structure/with/different/contents/15.txt(mno)']), [])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd) 2.txt(efgh) 3.txt(ijkl)', 'root/d/e/f 4.txt(abcd) 5.txt(mnop) 6.txt(ijkl)', 'root/g/h 7.txt(efgh) 8.txt(mnop) 9.txt(pqrs)', 'root/i/j/k/l 10.txt(abcd) 11.txt(ijkl) 12.txt(mnop)']), [['root/a/b/c/1.txt', 'root/d/e/f/4.txt', 'root/i/j/k/l/10.txt'], ['root/a/b/c/2.txt', 'root/g/h/7.txt'], ['root/a/b/c/3.txt', 'root/d/e/f/6.txt', 'root/i/j/k/l/11.txt'], ['root/d/e/f/5.txt', 'root/g/h/8.txt', 'root/i/j/k/l/12.txt']])\n assert answers_match(candidate(paths=['dir1 12.txt(abc) 13.txt(def)', 'dir2 14.txt(ghi) 15.txt(jkl)', 'dir3 16.txt(mno) 17.txt(pqr)', 'dir4 18.txt(abc) 19.txt(def)']), [['dir1/12.txt', 'dir4/18.txt'], ['dir1/13.txt', 'dir4/19.txt']])\n assert answers_match(candidate(paths=['root/logs/2023/01/01/log1.log(logdata1)', 'root/logs/2023/01/02/log2.log(logdata2)', 'root/logs/2023/01/03/log3.log(logdata1)', 'root/logs/2023/01/04/log4.log(logdata2)', 'root/logs/2023/01/05/log5.log(logdata3)', 'root/logs/2023/01/06/log6.log(logdata1)', 'root/logs/2023/01/07/log7.log(logdata2)']), [])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd123) 2.txt(efgh456)', 'root/a/b/d 3.txt(abcd123)', 'root/e/f/g 4.txt(efgh456)', 'root/h 5.txt(abcd123)', 'root/i/j 6.txt(efgh456)', 'root/k/l/m 7.txt(abcd123)']), [['root/a/b/c/1.txt', 'root/a/b/d/3.txt', 'root/h/5.txt', 'root/k/l/m/7.txt'], ['root/a/b/c/2.txt', 'root/e/f/g/4.txt', 'root/i/j/6.txt']])\n assert answers_match(candidate(paths=['root/project/src/main.java(code1)', 'root/project/src/test.java(code2)', 'root/project/docs/requirements.txt(code1)', 'root/project/docs/design.txt(code2)', 'root/project/bin/main.java(code1)']), [])\n assert answers_match(candidate(paths=['root/a/b 1.txt(abcd) 2.txt(efgh)', 'root/a/b/c 3.txt(abcd)', 'root/a/b/d 4.txt(efgh)', 'root/e/f/g 5.txt(efgh)', 'root/e/f/g 6.txt(abcd)']), [['root/a/b/1.txt', 'root/a/b/c/3.txt', 'root/e/f/g/6.txt'], ['root/a/b/2.txt', 'root/a/b/d/4.txt', 'root/e/f/g/5.txt']])\n assert answers_match(candidate(paths=['root/d1 1.txt(abcd123) 2.txt(efgh456)', 'root/d2 3.txt(abcd123)', 'root/d3 4.txt(efgh456)', 'root/d4 5.txt(abcd123)', 'root/d5 6.txt(efgh456)']), [['root/d1/1.txt', 'root/d2/3.txt', 'root/d4/5.txt'], ['root/d1/2.txt', 'root/d3/4.txt', 'root/d5/6.txt']])\n assert answers_match(candidate(paths=['root 1.txt(12345678901234567890)', 'root/a 2.txt(12345678901234567890)', 'root/b 3.txt(09876543210987654321)', 'root/b/c 4.txt(09876543210987654321)', 'root/d 5.txt(12345678901234567890)']), [['root/1.txt', 'root/a/2.txt', 'root/d/5.txt'], ['root/b/3.txt', 'root/b/c/4.txt']])\n assert answers_match(candidate(paths=['root 1.txt(a)', 'root 2.txt(a)', 'root 3.txt(a)', 'root 4.txt(a)', 'root 5.txt(a)', 'root 6.txt(a)', 'root 7.txt(a)', 'root 8.txt(a)', 'root 9.txt(a)', 'root 10.txt(a)', 'root 11.txt(a)', 'root 12.txt(a)', 'root 13.txt(a)', 'root 14.txt(a)', 'root 15.txt(a)']), [['root/1.txt', 'root/2.txt', 'root/3.txt', 'root/4.txt', 'root/5.txt', 'root/6.txt', 'root/7.txt', 'root/8.txt', 'root/9.txt', 'root/10.txt', 'root/11.txt', 'root/12.txt', 'root/13.txt', 'root/14.txt', 'root/15.txt']])\n assert answers_match(candidate(paths=['home/user/documents 1.docx(abcdefg) 2.txt(hijklm)', 'home/user/downloads 3.txt(abcdefg)', 'home/user/pictures 4.txt(hijklm) 5.txt(opqrstu)', 'home/user/videos 6.txt(opqrstu) 7.txt(vwxyz)']), [['home/user/documents/1.docx', 'home/user/downloads/3.txt'], ['home/user/documents/2.txt', 'home/user/pictures/4.txt'], ['home/user/pictures/5.txt', 'home/user/videos/6.txt']])\n assert answers_match(candidate(paths=['root/user/documents/report.txt(data123) notes.txt(data123)', 'root/user/photos/vacation.jpg(data456)', 'root/user/backup/report.txt(data123)', 'root/user/music/song.mp3(data789)', 'root/user/videos/trip.mp4(data456)']), [])\n assert answers_match(candidate(paths=['root/level1/level2/level3/1.txt(a)', 'root/level1/level2/2.txt(b)', 'root/level1/3.txt(a)', 'root/level1/4.txt(b)', 'root/5.txt(a)', 'root/6.txt(b)', 'root/7.txt(c)', 'root/8.txt(d)', 'root/level2/9.txt(c)', 'root/level2/level3/10.txt(d)']), [])\n assert answers_match(candidate(paths=['root/folder1/subfolder1/file1.txt(data123)', 'root/folder2/subfolder2/file2.txt(data456)', 'root/folder1/subfolder1/file3.txt(data789)', 'root/folder2/subfolder2/file4.txt(data123)', 'root/folder1/subfolder1/file5.txt(data456)']), [])\n assert answers_match(candidate(paths=['root 1.txt(abcd) 2.txt(efgh)', 'root/c 3.txt(abcd) 4.txt(efgh)', 'root/c/d 5.txt(abcd) 6.txt(efgh)', 'root/e 7.txt(abcd) 8.txt(efgh)', 'root/e/f 9.txt(abcd) 10.txt(efgh)', 'root/e/f/g 11.txt(abcd) 12.txt(efgh)', 'root/e/f/g/h 13.txt(abcd) 14.txt(efgh)', 'root/e/f/g/h/i 15.txt(abcd) 16.txt(efgh)']), [['root/1.txt', 'root/c/3.txt', 'root/c/d/5.txt', 'root/e/7.txt', 'root/e/f/9.txt', 'root/e/f/g/11.txt', 'root/e/f/g/h/13.txt', 'root/e/f/g/h/i/15.txt'], ['root/2.txt', 'root/c/4.txt', 'root/c/d/6.txt', 'root/e/8.txt', 'root/e/f/10.txt', 'root/e/f/g/12.txt', 'root/e/f/g/h/14.txt', 'root/e/f/g/h/i/16.txt']])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd) 2.txt(efgh)', 'root/a/b/d 3.txt(abcd)', 'root/a/b/e 4.txt(efgh) 5.txt(abcd)', 'root/a/b/f 6.txt(ghij)']), [['root/a/b/c/1.txt', 'root/a/b/d/3.txt', 'root/a/b/e/5.txt'], ['root/a/b/c/2.txt', 'root/a/b/e/4.txt']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh) 3.txt(ijkl)', 'root/b 4.txt(mnop) 5.txt(abcd)', 'root/c 6.txt(efgh) 7.txt(mnop)', 'root/d 8.txt(ijkl)']), [['root/a/1.txt', 'root/b/5.txt'], ['root/a/2.txt', 'root/c/6.txt'], ['root/a/3.txt', 'root/d/8.txt'], ['root/b/4.txt', 'root/c/7.txt']])\n assert answers_match(candidate(paths=['server/logs 1.log(err) 2.log(warn)', 'server/data 3.log(info) 4.log(err)', 'server/data/cache 5.log(warn) 6.log(info)', 'server/data/cache/temp 7.log(err) 8.log(info) 9.log(warn)']), [['server/logs/1.log', 'server/data/4.log', 'server/data/cache/temp/7.log'], ['server/logs/2.log', 'server/data/cache/5.log', 'server/data/cache/temp/9.log'], ['server/data/3.log', 'server/data/cache/6.log', 'server/data/cache/temp/8.log']])\n assert answers_match(candidate(paths=['customer/profiles 1.json(abc) 2.json(def)', 'customer/orders 3.json(abc) 4.json(ghi)', 'customer/orders/2022 5.json(def)', 'customer/orders/2022/01 6.json(ghi) 7.json(jkl)', 'customer/orders/2022/02 8.json(abc) 9.json(jkl)']), [['customer/profiles/1.json', 'customer/orders/3.json', 'customer/orders/2022/02/8.json'], ['customer/profiles/2.json', 'customer/orders/2022/5.json'], ['customer/orders/4.json', 'customer/orders/2022/01/6.json'], ['customer/orders/2022/01/7.json', 'customer/orders/2022/02/9.json']])\n assert answers_match(candidate(paths=['projects/code 1.py(def) 2.py(abc)', 'projects/docs 3.txt(abc)', 'projects/tests 4.py(def) 5.py(ghi)', 'projects/tests/unit 6.py(ghi)', 'projects/tests/integration 7.py(ghi)']), [['projects/code/1.py', 'projects/tests/4.py'], ['projects/code/2.py', 'projects/docs/3.txt'], ['projects/tests/5.py', 'projects/tests/unit/6.py', 'projects/tests/integration/7.py']])\n assert answers_match(candidate(paths=['dir1/subdir1/file1.txt(aaa) dir1/subdir2/file2.txt(bbb)', 'dir2/subdir1/file3.txt(aaa) dir2/subdir2/file4.txt(ccc)', 'dir3/subdir1/file5.txt(bbb) dir3/subdir2/file6.txt(aaa)']), [])\n assert answers_match(candidate(paths=['root/user/john/docs/report.docx(abc123def456)', 'root/user/jane/docs/report.docx(abc123def456)', 'root/user/john/pics/photo.png(gif789)', 'root/user/jane/pics/photo.png(gif789)']), [])\n assert answers_match(candidate(paths=['projects/1/src/main.java(code)', 'projects/2/src/main.java(code)', 'projects/1/docs/report.pdf(doc)', 'projects/3/src/main.java(code)', 'projects/3/docs/report.pdf(doc)', 'projects/4/src/main.java(code)']), [])\n assert answers_match(candidate(paths=['root/test/folder1/file1.txt(a)', 'root/test/folder1/file2.txt(b)', 'root/test/folder2/file3.txt(a)', 'root/test/folder2/file4.txt(b)', 'root/test/folder3/file5.txt(a)', 'root/test/folder3/file6.txt(b)', 'root/test/folder4/file7.txt(a)', 'root/test/folder4/file8.txt(b)', 'root/test/folder5/file9.txt(a)', 'root/test/folder5/file10.txt(b)', 'root/test/folder6/file11.txt(a)', 'root/test/folder6/file12.txt(b)', 'root/test/folder7/file13.txt(a)', 'root/test/folder7/file14.txt(b)']), [])\n assert answers_match(candidate(paths=['root/x/y/z 1.txt(1234) 2.txt(5678)', 'root/x/y/z 3.txt(1234)', 'root/x/y 4.txt(5678)', 'root/w 5.txt(1234)', 'root/v 6.txt(5678)', 'root/u 7.txt(9012)']), [['root/x/y/z/1.txt', 'root/x/y/z/3.txt', 'root/w/5.txt'], ['root/x/y/z/2.txt', 'root/x/y/4.txt', 'root/v/6.txt']])\n assert answers_match(candidate(paths=['root/2023/01/01/file1.txt(content1)', 'root/2023/01/02/file2.txt(content2)', 'root/2023/01/03/file3.txt(content1)', 'root/2023/01/04/file4.txt(content2)', 'root/2023/01/05/file5.txt(content3)']), [])\n assert answers_match(candidate(paths=['root/subdir1 0001.txt(a)', 'root/subdir1 0002.txt(b)', 'root/subdir1 0003.txt(c)', 'root/subdir2 0001.txt(d)', 'root/subdir3 0001.txt(a)', 'root/subdir5 0001.txt(e)', 'root/subdir5 0002.txt(f)', 'root/subdir5 0003.txt(g)', 'root/subdir5 0004.txt(a)']), [['root/subdir1/0001.txt', 'root/subdir3/0001.txt', 'root/subdir5/0004.txt']])\n assert answers_match(candidate(paths=['root 1.txt(a) 2.txt(b) 3.txt(c)', 'root 4.txt(a) 5.txt(b) 6.txt(c)', 'root 7.txt(d) 8.txt(e) 9.txt(f)', 'root 10.txt(d) 11.txt(e) 12.txt(f)']), [['root/1.txt', 'root/4.txt'], ['root/2.txt', 'root/5.txt'], ['root/3.txt', 'root/6.txt'], ['root/7.txt', 'root/10.txt'], ['root/8.txt', 'root/11.txt'], ['root/9.txt', 'root/12.txt']])\n assert answers_match(candidate(paths=['user/documents/1.txt(A)', 'user/documents/2.txt(B)', 'user/downloads/3.txt(A)', 'user/photos/4.txt(C)', 'user/photos/5.txt(A)', 'user/videos/6.txt(B)', 'user/videos/7.txt(A)', 'user/music/8.txt(C)']), [])\n assert answers_match(candidate(paths=['root/0 0.file(a)', 'root/1 1.file(b)', 'root/2 2.file(c)', 'root/3 3.file(d)', 'root/4 4.file(e)', 'root/5 5.file(f)', 'root/6 6.file(g)', 'root/7 7.file(h)', 'root/8 8.file(i)', 'root/9 9.file(j)', 'root/0/1 01.file(a)', 'root/0/1/2 012.file(b)', 'root/0/1/2/3 0123.file(c)']), [['root/0/0.file', 'root/0/1/01.file'], ['root/1/1.file', 'root/0/1/2/012.file'], ['root/2/2.file', 'root/0/1/2/3/0123.file']])\n assert answers_match(candidate(paths=['root/folder1/1.txt(abcdefg) 2.txt(hijklmno)', 'root/folder1/3.txt(abcdefg)', 'root/folder2/4.txt(hijklmno)', 'root/folder3/5.txt(pqrst)', 'root/folder3/6.txt(pqrst)', 'root/folder3/7.txt(abcdefg)', 'root/folder4/8.txt(hijklmno)', 'root/folder4/9.txt(pqrst)', 'root/folder5/10.txt(pqrst)', 'root/folder5/11.txt(hijklmno)', 'root/folder5/12.txt(abcdefg)']), [])\n assert answers_match(candidate(paths=['root/a/b/c 1.txt(abcd) 2.txt(efgh)', 'root/d/e/f 3.txt(abcd) 4.txt(efgh)', 'root/g/h/i 5.txt(abcd) 6.txt(efgh)', 'root/j/k/l 7.txt(abcd) 8.txt(efgh)', 'root/m/n/o 9.txt(abcd) 10.txt(efgh)', 'root/p/q/r 11.txt(abcd) 12.txt(efgh)', 'root/s/t/u 13.txt(abcd) 14.txt(efgh)', 'root/v/w/x 15.txt(abcd) 16.txt(efgh)', 'root/y/z 17.txt(abcd) 18.txt(efgh)', 'root 19.txt(abcd) 20.txt(efgh)', 'root/a 21.txt(abcd)', 'root/a/b 22.txt(abcd)', 'root/a/b/c/d 23.txt(abcd)', 'root/d 24.txt(abcd)', 'root/d/e 25.txt(abcd)', 'root/d/e/f/g 26.txt(abcd)', 'root/g 27.txt(abcd)', 'root/g/h 28.txt(abcd)', 'root/g/h/i/j 29.txt(abcd)', 'root/j 30.txt(abcd)', 'root/j/k 31.txt(abcd)', 'root/j/k/l/m 32.txt(abcd)', 'root/m 33.txt(abcd)', 'root/m/n 34.txt(abcd)', 'root/m/n/o/p 35.txt(abcd)', 'root/p 36.txt(abcd)', 'root/p/q 37.txt(abcd)', 'root/p/q/r/s 38.txt(abcd)', 'root/s 39.txt(abcd)', 'root/s/t 40.txt(abcd)', 'root/s/t/u/v 41.txt(abcd)', 'root/v 42.txt(abcd)', 'root/v/w 43.txt(abcd)', 'root/v/w/x/y 44.txt(abcd)', 'root/y 45.txt(abcd)', 'root/y/z/a 46.txt(abcd)']), [['root/a/b/c/1.txt', 'root/d/e/f/3.txt', 'root/g/h/i/5.txt', 'root/j/k/l/7.txt', 'root/m/n/o/9.txt', 'root/p/q/r/11.txt', 'root/s/t/u/13.txt', 'root/v/w/x/15.txt', 'root/y/z/17.txt', 'root/19.txt', 'root/a/21.txt', 'root/a/b/22.txt', 'root/a/b/c/d/23.txt', 'root/d/24.txt', 'root/d/e/25.txt', 'root/d/e/f/g/26.txt', 'root/g/27.txt', 'root/g/h/28.txt', 'root/g/h/i/j/29.txt', 'root/j/30.txt', 'root/j/k/31.txt', 'root/j/k/l/m/32.txt', 'root/m/33.txt', 'root/m/n/34.txt', 'root/m/n/o/p/35.txt', 'root/p/36.txt', 'root/p/q/37.txt', 'root/p/q/r/s/38.txt', 'root/s/39.txt', 'root/s/t/40.txt', 'root/s/t/u/v/41.txt', 'root/v/42.txt', 'root/v/w/43.txt', 'root/v/w/x/y/44.txt', 'root/y/45.txt', 'root/y/z/a/46.txt'], ['root/a/b/c/2.txt', 'root/d/e/f/4.txt', 'root/g/h/i/6.txt', 'root/j/k/l/8.txt', 'root/m/n/o/10.txt', 'root/p/q/r/12.txt', 'root/s/t/u/14.txt', 'root/v/w/x/16.txt', 'root/y/z/18.txt', 'root/20.txt']])\n assert answers_match(candidate(paths=['root/a/b/c/d 1.txt(xyz) 2.txt(mnop)', 'root/a/b/c 3.txt(xyz)', 'root/a/b 4.txt(mnop)', 'root/a 5.txt(pqrs)', 'root 6.txt(pqrs)']), [['root/a/b/c/d/1.txt', 'root/a/b/c/3.txt'], ['root/a/b/c/d/2.txt', 'root/a/b/4.txt'], ['root/a/5.txt', 'root/6.txt']])\n assert answers_match(candidate(paths=['root/x/y/z 1.txt(abcd) 2.txt(efgh)', 'root/x/y/z 3.txt(abcd) 4.txt(efgh)', 'root/x/y 5.txt(abcd)', 'root/x 6.txt(efgh)', 'root 7.txt(abcd) 8.txt(efgh)', 'root/a/b/c 9.txt(efgh)', 'root/a/b 10.txt(abcd)', 'root/a 11.txt(efgh)']), [['root/x/y/z/1.txt', 'root/x/y/z/3.txt', 'root/x/y/5.txt', 'root/7.txt', 'root/a/b/10.txt'], ['root/x/y/z/2.txt', 'root/x/y/z/4.txt', 'root/x/6.txt', 'root/8.txt', 'root/a/b/c/9.txt', 'root/a/11.txt']])\n assert answers_match(candidate(paths=['root 1.txt(a) 2.txt(b) 3.txt(c)', 'root/a 4.txt(a) 5.txt(b)', 'root/a/b 6.txt(c) 7.txt(d)', 'root/a/b/c 8.txt(e) 9.txt(f)', 'root/a/b/c/d 10.txt(e)']), [['root/1.txt', 'root/a/4.txt'], ['root/2.txt', 'root/a/5.txt'], ['root/3.txt', 'root/a/b/6.txt'], ['root/a/b/c/8.txt', 'root/a/b/c/d/10.txt']])\n assert answers_match(candidate(paths=['home/user/documents/report.txt(secret) home/user/backup/report.txt(secret)', 'home/user/photos/photo1.jpg(data) home/user/album/photo2.jpg(data)', 'home/user/downloads/photo3.jpg(data) home/user/trash/photo4.jpg(data)', 'home/user/videos/video1.mp4(movie) home/user/backup/video2.mp4(movie)']), [['home/user/photos/photo1.jpg(data)/home/user/album/photo2.jpg', 'home/user/downloads/photo3.jpg(data)/home/user/trash/photo4.jpg']])\n assert answers_match(candidate(paths=['root/a 1.txt(abcd) 2.txt(efgh)', 'root/a 3.txt(abcd) 4.txt(efgh)', 'root/b 5.txt(abcd) 6.txt(efgh)', 'root/c 7.txt(abcd) 8.txt(efgh)', 'root/d 9.txt(abcd) 10.txt(efgh)']), [['root/a/1.txt', 'root/a/3.txt', 'root/b/5.txt', 'root/c/7.txt', 'root/d/9.txt'], ['root/a/2.txt', 'root/a/4.txt', 'root/b/6.txt', 'root/c/8.txt', 'root/d/10.txt']])\n assert answers_match(candidate(paths=['/ 36.txt(ab) 37.txt(cd)', '/a 38.txt(cd) 39.txt(ab)', '/b 40.txt(ab) 41.txt(cd)', '/c 42.txt(cd) 43.txt(ab) 44.txt(ab)', '/d 45.txt(cd) 46.txt(cd)']), [['//36.txt', '/a/39.txt', '/b/40.txt', '/c/43.txt', '/c/44.txt'], ['//37.txt', '/a/38.txt', '/b/41.txt', '/c/42.txt', '/d/45.txt', '/d/46.txt']])\n assert answers_match(candidate(paths=['a/b/c 27.txt(pqr) 28.txt(stu)', 'a/b 29.txt(pqr)', 'a/b/d 30.txt(stu) 31.txt(vwx)', 'a/b/e 32.txt(vwx) 33.txt(yza)', 'a/b/f 34.txt(yza) 35.txt(pqr)']), [['a/b/c/27.txt', 'a/b/29.txt', 'a/b/f/35.txt'], ['a/b/c/28.txt', 'a/b/d/30.txt'], ['a/b/d/31.txt', 'a/b/e/32.txt'], ['a/b/e/33.txt', 'a/b/f/34.txt']])\n assert answers_match(candidate(paths=['root/very/deep/folder/structure/here/and/now/1.txt(xyz)', 'root/very/deep/folder/structure/here/and/now/2.txt(xyz)', 'root/very/deep/folder/structure/here/and/3.txt(xyz)', 'root/very/deep/folder/structure/here/4.txt(xyz)', 'root/very/deep/folder/structure/5.txt(xyz)', 'root/very/deep/folder/6.txt(xyz)', 'root/very/deep/folder/7.txt(xyz)', 'root/very/deep/folder/8.txt(xyz)', 'root/very/deep/folder/9.txt(xyz)', 'root/very/deep/folder/10.txt(xyz)', 'root/very/deep/11.txt(xyz)', 'root/very/deep/12.txt(xyz)', 'root/very/13.txt(xyz)', 'root/14.txt(xyz)']), [])\n assert answers_match(candidate(paths=['root/data/batch1/data1.csv(csvdata1)', 'root/data/batch1/data2.csv(csvdata2)', 'root/data/batch1/data3.csv(csvdata1)', 'root/data/batch2/data4.csv(csvdata2)', 'root/data/batch2/data5.csv(csvdata3)', 'root/data/batch2/data6.csv(csvdata1)']), [])\n assert answers_match(candidate(paths=['root/project/src 1.java(abcd)', 'root/project/src 2.java(abcd)', 'root/project/src 3.java(abcd)', 'root/project/tests 4.java(abcd)', 'root/project/tests 5.java(efgh)', 'root/project/tests 6.java(efgh)', 'root/project/docs 7.java(efgh)', 'root/project/docs 8.java(ijkl)']), [['root/project/src/1.java', 'root/project/src/2.java', 'root/project/src/3.java', 'root/project/tests/4.java'], ['root/project/tests/5.java', 'root/project/tests/6.java', 'root/project/docs/7.java']])\n", "comparison": "unordered_groups"}, "public_tests": ["[\"root/a 1.txt(abcd) 2.txt(efgh)\",\"root/c 3.txt(abcd)\",\"root/c/d 4.txt(efgh)\",\"root 4.txt(efgh)\"]", "[\"root/a 1.txt(abcd) 2.txt(efgh)\",\"root/c 3.txt(abcd)\",\"root/c/d 4.txt(efgh)\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["paths"], "leetcode_dataset_entry_point": "Solution().findDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:17+00:00", "tests_total": 83, "tests_dropped": 0, "flags": ["unordered_groups"], "topic_tags": ["array", "hash-table", "string"]}, "language": "cpp", "interface": {"raw_signature": "vector> findDuplicate(vector& paths) {", "container": "Solution", "callable": "findDuplicate", "parameters": [{"name": "paths", "type": "vector&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 611, "task_id": "valid-triangle-number", "difficulty": "Medium", "problem_description": "Given an integer array nums, return the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle.\n\nExample 1:\n\nInput: nums = [2,2,3,4]\nOutput: 3\nExplanation: Valid combinations are:\n2,3,4 (using the first 2)\n2,3,4 (using the second 2)\n2,2,3\n\nExample 2:\n\nInput: nums = [4,2,3,4]\nOutput: 4\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- 0 <= nums[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 2, 3, 4, 5]) == 7\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 22\n assert candidate(nums = [1, 1, 1, 1]) == 4\n assert candidate(nums = [4, 2, 3, 4]) == 4\n assert candidate(nums = [0, 1, 0, 1]) == 0\n assert candidate(nums = [10, 21, 32, 43, 54, 65]) == 7\n assert candidate(nums = [1, 1, 1, 2, 3, 5, 8, 13, 21, 34]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 52\n assert candidate(nums = [10, 20, 30, 40, 50]) == 3\n assert candidate(nums = [5, 5, 5, 5]) == 4\n assert candidate(nums = [2, 2, 3, 4]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5]) == 3\n assert candidate(nums = [0, 1, 1, 1]) == 1\n assert candidate(nums = [10, 21, 22, 100, 101, 200, 300]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 120\n assert candidate(nums = [0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6]) == 7\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [5, 10, 15, 20, 25]) == 3\n assert candidate(nums = [1, 2, 2, 3, 4]) == 4\n assert candidate(nums = [1000, 1000, 1000, 1000]) == 4\n assert candidate(nums = [1, 2, 2, 3, 4, 6]) == 5\n assert candidate(nums = [1, 2, 3]) == 0\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 1, 2]) == 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]) == 1028\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11]) == 333\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]) == 9500\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 252\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10]) == 150\n assert candidate(nums = [500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515]) == 560\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 50\n assert candidate(nums = [3, 4, 5, 6, 7, 8]) == 17\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36]) == 372\n assert candidate(nums = [5, 6, 7, 8, 9, 10]) == 20\n assert candidate(nums = [0, 0, 0, 0, 1, 2, 3, 4, 5]) == 3\n assert candidate(nums = [10, 21, 31, 41, 51, 61, 71, 81, 91, 101]) == 62\n assert candidate(nums = [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]) == 1370\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]) == 230\n assert candidate(nums = [1, 2, 2, 3, 4, 5]) == 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]) == 1140\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 525\n assert candidate(nums = [990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000]) == 165\n assert candidate(nums = [5, 10, 25, 50, 100]) == 0\n assert candidate(nums = [5, 4, 3, 2, 1]) == 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]) == 1395\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 6, 7, 8]) == 48\n assert candidate(nums = [3, 3, 3, 3, 3]) == 10\n assert candidate(nums = [1, 3, 3, 4, 5, 6, 7, 8, 9]) == 40\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 203\n assert candidate(nums = [1, 3, 5, 7, 9, 11]) == 7\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, 10]) == 156\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 512\n assert candidate(nums = [1, 1000, 500, 300, 200, 100, 50, 25, 10, 5, 1]) == 0\n assert candidate(nums = [0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4]) == 24\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 486\n assert candidate(nums = [250, 500, 750, 1000, 250, 500, 750, 1000, 250, 500]) == 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]) == 530\n assert candidate(nums = [1, 3, 5, 7, 9, 11]) == 7\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]) == 367\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40]) == 22\n assert candidate(nums = [1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]) == 602\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 5]) == 31\n assert candidate(nums = [10, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100]) == 94\n assert candidate(nums = [0, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [100, 150, 200, 250, 300, 350, 400, 450, 500]) == 50\n assert candidate(nums = [33, 33, 33, 66, 66, 66, 99, 99, 99, 132, 132, 132]) == 103\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900]) == 34\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]) == 165\n assert candidate(nums = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77]) == 525\n assert candidate(nums = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190]) == 444\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35]) == 372\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 120\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90]) == 372\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 444\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2]) == 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]) == 525\n assert candidate(nums = [5, 25, 45, 65, 85, 105, 125, 145, 165, 185, 205]) == 70\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4]) == 24\n assert candidate(nums = [998, 999, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]) == 220\n assert candidate(nums = [333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333]) == 286\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, 10]) == 1945\n assert candidate(nums = [2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 325\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]) == 1078\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 50\n assert candidate(nums = [8, 15, 17, 10, 12, 6, 9, 11, 7, 4, 3, 2, 1]) == 108\n assert candidate(nums = [10, 20, 20, 20, 30, 30, 40, 50, 60]) == 35\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == 56\n assert candidate(nums = [10, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 283\n assert candidate(nums = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500]) == 1140\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6]) == 7\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 203\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 508\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 1140\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128]) == 0\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]) == 24\n assert candidate(nums = [3, 3, 3, 3, 3, 3]) == 20\n assert candidate(nums = [2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8]) == 898\n assert candidate(nums = [2, 3, 3, 4, 5, 6, 7, 8, 9, 10]) == 65\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 525\n assert candidate(nums = [1000, 0, 500, 500, 0, 500, 500, 0, 500, 500]) == 20\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]) == 420\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1140\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210]) == 211\n assert candidate(nums = [5, 6, 7, 8, 9]) == 10\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 50\n assert candidate(nums = [300, 200, 100, 400, 500, 600, 700, 800, 900, 1000]) == 50\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 4, 5]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 1591\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 50\n assert candidate(nums = [999, 1000, 1000, 1000, 1000, 999, 999, 999, 999, 998, 998, 998, 998]) == 286\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 455\n assert candidate(nums = [1, 10, 100, 1000, 10, 100, 1000, 10, 100, 1000]) == 39\n", "comparison": "exact"}, "public_tests": ["[2,2,3,4]", "[4,2,3,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().triangleNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:19+00:00", "tests_total": 115, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "greedy", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "int triangleNumber(vector& nums) {", "container": "Solution", "callable": "triangleNumber", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 621, "task_id": "task-scheduler", "difficulty": "Medium", "problem_description": "You are given an array of CPU tasks, each labeled with a letter from A to Z, and a number n. Each CPU interval can be idle or allow the completion of one task. Tasks can be completed in any order, but there's a constraint: there has to be a gap of at least n intervals between two tasks with the same label.\n\nReturn the minimum number of CPU intervals required to complete all tasks.\n\nExample 1:\n\nInput: tasks = [\"A\",\"A\",\"A\",\"B\",\"B\",\"B\"], n = 2\nOutput: 8\nExplanation: A possible sequence is: A -> B -> idle -> A -> B -> idle -> A -> B.\nAfter completing task A, you must wait two intervals before doing A again. The same applies to task B. In the 3^rd interval, neither A nor B can be done, so you idle. By the 4^th interval, you can do A again as 2 intervals have passed.\n\nExample 2:\n\nInput: tasks = [\"A\",\"C\",\"A\",\"B\",\"D\",\"B\"], n = 1\nOutput: 6\nExplanation: A possible sequence is: A -> B -> C -> D -> A -> B.\nWith a cooling interval of 1, you can repeat a task after just one other task.\n\nExample 3:\n\nInput: tasks = [\"A\",\"A\",\"A\", \"B\",\"B\",\"B\"], n = 3\nOutput: 10\nExplanation: A possible sequence is: A -> B -> idle -> idle -> A -> B -> idle -> idle -> A -> B.\nThere are only two types of tasks, A and B, which need to be separated by 3 intervals. This leads to idling twice between repetitions of these tasks.\n\nConstraints:\n\n- 1 <= tasks.length <= 10^4\n- tasks[i] is an uppercase English letter.\n- 0 <= n <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(tasks = ['A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D'],n = 3) == 13\n assert candidate(tasks = ['A', 'B', 'C', 'D'],n = 0) == 4\n assert candidate(tasks = ['A', 'B', 'C', 'D', 'E', 'F', 'G'],n = 2) == 7\n assert candidate(tasks = ['A'],n = 5) == 1\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'C', 'D'],n = 2) == 16\n assert candidate(tasks = ['A', 'A', 'B', 'B'],n = 0) == 4\n assert candidate(tasks = ['A', 'B', 'C', 'D', 'E', 'F', 'G'],n = 0) == 7\n assert candidate(tasks = ['A'],n = 0) == 1\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B'],n = 2) == 8\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B'],n = 3) == 10\n assert candidate(tasks = ['A', 'B', 'C', 'D', 'E', 'F'],n = 0) == 6\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C'],n = 2) == 13\n assert candidate(tasks = ['A', 'B', 'A', 'B', 'A', 'B'],n = 2) == 8\n assert candidate(tasks = ['A', 'C', 'A', 'B', 'D', 'B'],n = 1) == 6\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D'],n = 4) == 14\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'C', 'D', 'E', 'F', 'G'],n = 2) == 16\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D'],n = 2) == 20\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C'],n = 6) == 45\n assert candidate(tasks = ['X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z'],n = 3) == 35\n assert candidate(tasks = ['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 = 10) == 52\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E'],n = 3) == 20\n assert candidate(tasks = ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E', 'F', 'F', 'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L', 'M', 'M', 'N', 'N', 'O', 'O', 'P', 'P', 'Q', 'Q', 'R', 'R', 'S', 'S', 'T', 'T', 'U', 'U', 'V', 'V', 'W', 'W', 'X', 'X', 'Y', 'Y', 'Z', 'Z'],n = 1) == 52\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J', 'K', 'K', 'K', 'L', 'L', 'L'],n = 10) == 36\n assert candidate(tasks = ['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 = 5) == 52\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E', 'E', 'E', 'E', 'E'],n = 4) == 27\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'E'],n = 4) == 25\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 5) == 58\n assert candidate(tasks = ['X', 'X', 'X', 'Y', 'Y', 'Y', 'Z', 'Z', 'W', 'W', 'W', 'W', 'W', 'V', 'V', 'V', 'V', 'V'],n = 5) == 26\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'],n = 2) == 35\n assert candidate(tasks = ['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 = 0) == 26\n assert candidate(tasks = ['X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z'],n = 2) == 24\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J', 'K', 'K', 'K', 'L', 'L', 'L', 'M', 'M', 'M', 'N', 'N', 'N', 'O', 'O', 'O', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'R', 'R', 'R', 'S', 'S', 'S', 'T', 'T', 'T', 'U', 'U', 'U', 'V', 'V', 'V', 'W', 'W', 'W', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z'],n = 10) == 78\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E', 'F', 'F', 'G', 'G'],n = 3) == 17\n assert candidate(tasks = ['P', 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'Q', 'R', 'R', 'R', 'R', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T', 'U', 'U', 'U', 'U'],n = 4) == 26\n assert candidate(tasks = ['X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z', 'Z', 'Z', 'W', 'W', 'W', 'W', 'W', 'W'],n = 6) == 36\n assert candidate(tasks = ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C'],n = 2) == 24\n assert candidate(tasks = ['X', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z', 'Z', 'Z', 'W', 'W', 'W', 'W', 'W'],n = 5) == 28\n assert candidate(tasks = ['X', 'X', 'X', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z', 'Z', 'Z'],n = 5) == 25\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J'],n = 7) == 30\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J', 'K', 'K', 'K'],n = 2) == 33\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H'],n = 7) == 64\n assert candidate(tasks = ['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'],n = 7) == 78\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C'],n = 5) == 33\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E'],n = 5) == 31\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D'],n = 4) == 19\n assert candidate(tasks = ['X', 'Y', 'X', 'Y', 'X', 'Y', 'X', 'Y', 'X', 'Y', 'Z', 'Z', 'Z', 'Z', 'Z', 'W', 'W', 'W', 'W', 'W'],n = 3) == 20\n assert candidate(tasks = ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'],n = 1) == 62\n assert candidate(tasks = ['F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H', 'F', 'G', 'H'],n = 2) == 27\n assert candidate(tasks = ['A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E', 'E', 'F', 'F', 'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L', 'M', 'M', 'N', 'N', 'O', 'O', 'P', 'P', 'Q', 'Q', 'R', 'R', 'S', 'S', 'T', 'T', 'U', 'U', 'V', 'V', 'W', 'W', 'X', 'X', 'Y', 'Y', 'Z', 'Z'],n = 10) == 52\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J', 'K', 'K', 'K'],n = 4) == 33\n assert candidate(tasks = ['Q', 'Q', 'Q', 'R', 'R', 'R', 'S', 'S', 'T', 'T', 'U', 'U', 'V', 'V', 'W', 'W', 'X', 'X', 'Y', 'Y', 'Z', 'Z'],n = 7) == 22\n assert candidate(tasks = ['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 = 25) == 26\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 8) == 58\n assert candidate(tasks = ['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', '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', 'A', 'A', 'A', 'A', 'A', 'A'],n = 0) == 68\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G'],n = 15) == 119\n assert candidate(tasks = ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C'],n = 1) == 30\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F'],n = 3) == 18\n assert candidate(tasks = ['A', 'B', 'A', 'C', 'A', 'D', 'A', 'E', 'A', 'F', 'A', 'G', 'A', 'H', 'A', 'I', 'A', 'J', 'A'],n = 5) == 55\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'E'],n = 4) == 17\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C'],n = 5) == 27\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J', 'K', 'K', 'K', 'L', 'L', 'L', 'M', 'M', 'M', 'N', 'N', 'N', 'O', 'O', 'O', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'R', 'R', 'R', 'S', 'S', 'S', 'T', 'T', 'T', 'U', 'U', 'U', 'V', 'V', 'V', 'W', 'W', 'W', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z'],n = 2) == 78\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'],n = 1) == 27\n assert candidate(tasks = ['U', 'V', 'W', 'X', 'Y', 'Z', 'U', 'V', 'W', 'X', 'Y', 'Z', 'U', 'V', 'W', 'X', 'Y', 'Z', 'U', 'V', 'W', 'X', 'Y', 'Z'],n = 6) == 27\n assert candidate(tasks = ['X', 'X', 'X', 'X', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Z', 'Z', 'Z', 'Z', 'Z', 'Z', 'Z', 'Z'],n = 6) == 52\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H', 'I', 'I', 'I', 'J', 'J', 'J'],n = 2) == 31\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C'],n = 4) == 23\n assert candidate(tasks = ['M', 'M', 'M', 'M', 'M', 'M', 'N', 'N', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O', 'O', 'O', 'P', 'P', 'P', 'P', 'P', 'P'],n = 6) == 39\n assert candidate(tasks = ['M', 'M', 'M', 'N', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O', 'O', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'Q', 'Q', 'Q'],n = 5) == 38\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'G', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H'],n = 6) == 59\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 3) == 32\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', 'H', 'H'],n = 7) == 32\n assert candidate(tasks = ['A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E', 'E', 'F', 'F', 'F', 'G', 'G', 'G', 'H', 'H', 'H'],n = 2) == 24\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D'],n = 5) == 28\n assert candidate(tasks = ['Q', 'Q', 'Q', 'Q', 'Q', 'R', 'R', 'R', 'R', 'R', 'R', 'S', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T', 'T'],n = 5) == 31\n assert candidate(tasks = ['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 = 10) == 26\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 6) == 45\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', 'H', 'H'],n = 8) == 37\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', 'H', 'H', 'I', 'I', 'I', 'I'],n = 10) == 42\n assert candidate(tasks = ['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 = 25) == 26\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'C', 'C', 'D', 'E', 'E', 'F', 'F', 'F'],n = 4) == 16\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'D', 'D', 'D', 'E', 'E'],n = 4) == 26\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', 'F', 'F', 'F', 'F'],n = 3) == 24\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'],n = 5) == 45\n assert candidate(tasks = ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'],n = 0) == 20\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 6) == 50\n assert candidate(tasks = ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'C', 'C', 'C', 'C', 'C', 'C', 'D', 'D', 'D', 'D', 'D', 'D', 'D'],n = 3) == 25\n", "comparison": "exact"}, "public_tests": ["[\"A\",\"A\",\"A\",\"B\",\"B\",\"B\"]\n2", "[\"A\",\"C\",\"A\",\"B\",\"D\",\"B\"]\n1", "[\"A\",\"A\",\"A\", \"B\",\"B\",\"B\"]\n3"], "hints": ["There are many different solutions for this problem, including a greedy algorithm.", "For every cycle, find the most frequent letter that can be placed in this cycle. After placing, decrease the frequency of that letter by one.", "Use Priority Queue."], "metadata": {"canonical_parameter_names": ["tasks", "n"], "leetcode_dataset_entry_point": "Solution().leastInterval", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:26+00:00", "tests_total": 86, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "greedy", "sorting", "heap-priority-queue", "counting"]}, "language": "cpp", "interface": {"raw_signature": "int leastInterval(vector& tasks, int n) {", "container": "Solution", "callable": "leastInterval", "parameters": [{"name": "tasks", "type": "vector&"}, {"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 624, "task_id": "maximum-distance-in-arrays", "difficulty": "Medium", "problem_description": "You are given m arrays, where each array is sorted in ascending order.\n\nYou can pick up two integers from two different arrays (each array picks one) and calculate the distance. We define the distance between two integers a and b to be their absolute difference |a - b|.\n\nReturn the maximum distance.\n\nExample 1:\n\nInput: arrays = [[1,2,3],[4,5],[1,2,3]]\nOutput: 4\nExplanation: One way to reach the maximum distance 4 is to pick 1 in the first or third array and pick 5 in the second array.\n\nExample 2:\n\nInput: arrays = [[1],[1]]\nOutput: 0\n\nConstraints:\n\n- m == arrays.length\n- 2 <= m <= 10^5\n- 1 <= arrays[i].length <= 500\n- -10^4 <= arrays[i][j] <= 10^4\n- arrays[i] is sorted in ascending order.\n- There will be at most 10^5 integers in all the arrays.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(arrays = [[1, 2], [3, 4], [5, 6], [7, 8]]) == 7\n assert candidate(arrays = [[1, 2, 3], [4, 5], [1, 2, 3]]) == 4\n assert candidate(arrays = [[1, 3, 5], [2, 4, 6], [0, 7, 9]]) == 8\n assert candidate(arrays = [[-10000, 10000], [-10000, 10000], [-10000, 10000]]) == 20000\n assert candidate(arrays = [[10, 20, 30], [15, 25, 35], [20, 30, 40]]) == 30\n assert candidate(arrays = [[-10, -5, -1], [0, 3, 5], [10, 20, 30]]) == 40\n assert candidate(arrays = [[1, 2], [3, 4], [5, 6], [7, 8]]) == 7\n assert candidate(arrays = [[-1], [-2], [-3], [-4], [-5]]) == 4\n assert candidate(arrays = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [0, 1, 2, 3, 4]]) == 10\n assert candidate(arrays = [[100], [200], [300], [400], [500]]) == 400\n assert candidate(arrays = [[-10, -5, -2], [0, 2, 5], [10, 15, 20]]) == 30\n assert candidate(arrays = [[1], [1]]) == 0\n assert candidate(arrays = [[1], [2, 3, 4], [5, 6, 7, 8], [9, 10]]) == 9\n assert candidate(arrays = [[-10, 0, 10], [5, 6, 7], [1, 2, 3]]) == 17\n assert candidate(arrays = [[-10000, 10000], [-5000, 5000]]) == 15000\n assert candidate(arrays = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10]]) == 9\n assert candidate(arrays = [[-10000, 10000], [-9999, 9999], [1, 10000]]) == 20000\n assert candidate(arrays = [[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], [-15, -14, -13, -12, -11]]) == 30\n assert candidate(arrays = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == 19\n assert candidate(arrays = [[-100, -90, -80], [-70, -60, -50], [-40, -30, -20], [-10, 0, 10], [20, 30, 40], [50, 60, 70], [80, 90, 100]]) == 200\n assert candidate(arrays = [[-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]]) == 65\n assert candidate(arrays = [[-10000], [-9999], [-9998], [-9997], [-9996]]) == 4\n assert candidate(arrays = [[1], [1, 1, 1, 1, 1], [1], [1, 1, 1, 1], [1]]) == 0\n assert candidate(arrays = [[10000], [9999], [9998], [9997], [9996]]) == 4\n assert candidate(arrays = [[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], [15, 986], [16, 985], [17, 984], [18, 983], [19, 982], [20, 981]]) == 998\n assert candidate(arrays = [[-1000], [-900, -800, -700], [-600, -500, -400], [-300, -200, -100], [0, 100, 200], [300, 400, 500], [600, 700, 800], [900], [1000]]) == 2000\n assert candidate(arrays = [[-1000, -500, 0, 500, 1000], [-900, -400, 100, 600, 1100], [-800, -300, 200, 700, 1200], [-700, -200, 300, 800, 1300]]) == 2300\n assert candidate(arrays = [[-1000, -500, -100], [-900, -800, -700], [1000, 1100, 1200], [1300, 1400, 1500]]) == 2500\n assert candidate(arrays = [[-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]]) == 34\n assert candidate(arrays = [[-10000, -9000, -8000], [10000], [5000, 6000, 7000], [1000, 2000, 3000, 4000]]) == 20000\n assert candidate(arrays = [[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]]) == 25\n assert candidate(arrays = [[-500], [-400], [-300], [-200], [-100], [0], [100], [200], [300], [400], [500]]) == 1000\n assert candidate(arrays = [[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]]) == 24\n assert candidate(arrays = [[1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 7]]) == 6\n assert candidate(arrays = [[-1, 0, 1], [2, 3, 4, 5], [-5, -4, -3, -2], [6, 7, 8], [-8, -7, -6, -5], [9, 10, 11], [-11, -10, -9, -8]]) == 22\n assert candidate(arrays = [[1, 2, 3, 4, 5], [10, 11, 12, 13, 14], [20, 21, 22, 23, 24], [30, 31, 32, 33, 34], [40, 41, 42, 43, 44], [50, 51, 52, 53, 54], [60, 61, 62, 63, 64]]) == 63\n assert candidate(arrays = [[-10000, -9000, -8000], [-7000, -6000, -5000], [-4000, -3000, -2000], [-1000, 0, 1000], [2000, 3000, 4000]]) == 14000\n assert candidate(arrays = [[-5, -3, -1], [-2, 0, 2], [1, 3, 5], [4, 6, 8], [7, 9, 11]]) == 16\n assert candidate(arrays = [[-10000], [-9000], [-8000], [-7000], [-6000], [-5000], [-4000], [-3000], [-2000], [-1000]]) == 9000\n assert candidate(arrays = [[-10, -5, -1], [0, 0, 0], [1, 1, 1], [5, 5, 5], [10, 10, 10]]) == 20\n assert candidate(arrays = [[-1000], [-500], [0], [500], [1000], [-1001], [-501], [-1], [1], [501], [1001], [-1002], [-502], [-2], [2], [502], [1002]]) == 2004\n assert candidate(arrays = [[-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0], [-1, 0]]) == 1\n assert candidate(arrays = [[-500, -400, -300], [-200, -100, 0], [100, 200, 300], [400, 500, 600], [700, 800, 900], [1000]]) == 1500\n assert candidate(arrays = [[1, 2, 3, 4, 5, 6, 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(arrays = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == 19\n assert candidate(arrays = [[1, 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(arrays = [[-100, 0, 100], [-99, -1, 99], [-98, -2, 98], [-97, -3, 97], [-96, -4, 96]]) == 199\n assert candidate(arrays = [[-1], [-1], [0], [0], [1], [1]]) == 2\n assert candidate(arrays = [[-100, -90, -80], [-70, -60, -50], [-40, -30, -20], [-10, 0, 10], [20, 30, 40]]) == 140\n assert candidate(arrays = [[-100, -50, 0], [50, 100, 150], [-200, -150, -100], [200, 250, 300], [-300, -250, -200]]) == 600\n assert candidate(arrays = [[-10000], [-9999, -9998, -9997], [-9996, -9995, -9994], [-9993, -9992, -9991], [-9990], [9990], [9991, 9992, 9993], [9994, 9995, 9996], [9997, 9998, 9999], [10000]]) == 20000\n assert candidate(arrays = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96]]) == 98\n assert candidate(arrays = [[-1, 0, 1, 2, 3], [100, 101, 102, 103, 104], [200, 201, 202, 203, 204], [300, 301, 302, 303, 304], [400, 401, 402, 403, 404], [500, 501, 502, 503, 504]]) == 505\n assert candidate(arrays = [[-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]]) == 24\n assert candidate(arrays = [[-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1], [0, 0]]) == 9\n assert candidate(arrays = [[1, 1000], [1001, 2000], [2001, 3000], [3001, 4000], [4001, 5000]]) == 4999\n assert candidate(arrays = [[-1000, -500, -200], [100, 200, 300], [500, 600, 700, 800], [900, 1000]]) == 2000\n assert candidate(arrays = [[-1, 0, 1], [-2, -1, 0], [0, 1, 2], [1, 2, 3], [2, 3, 4]]) == 6\n assert candidate(arrays = [[1], [1, 1, 1, 1], [1, 1, 1, 1], [1000]]) == 999\n assert candidate(arrays = [[1, 2, 3, 4, 5], [-5, -4, -3, -2, -1], [0], [6, 7, 8, 9, 10]]) == 15\n assert candidate(arrays = [[-1, 0, 1], [-2, -1, 0, 1, 2], [-3, -2, -1, 0, 1, 2, 3], [-4, -3, -2, -1, 0, 1, 2, 3, 4], [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]]) == 9\n assert candidate(arrays = [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 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(arrays = [[-100], [-99], [-98], [-97], [-96], [-95], [-94], [-93], [-92], [-91], [-90], [-89], [-88], [-87], [-86], [-85], [-84], [-83], [-82], [-81]]) == 19\n assert candidate(arrays = [[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]]) == 9\n assert candidate(arrays = [[-1], [0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]]) == 21\n assert candidate(arrays = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]]) == 999\n assert candidate(arrays = [[-1000, -900, -800], [-700, -600], [-500, -400, -300, -200], [-100, 0, 100], [200, 300, 400], [500, 600, 700, 800], [900, 1000]]) == 2000\n assert candidate(arrays = [[-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]]) == 60\n assert candidate(arrays = [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10], [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]]) == 1100\n assert candidate(arrays = [[-1000], [-900], [-800], [-700], [-600], [-500], [-400], [-300], [-200], [-100], [0], [100], [200], [300], [400], [500], [600], [700], [800], [900], [1000]]) == 2000\n assert candidate(arrays = [[-10000], [-9000], [-8000], [-7000], [-6000], [-5000], [-4000], [-3000], [-2000], [-1000], [0], [1000], [2000], [3000], [4000], [5000], [6000], [7000], [8000], [9000], [10000]]) == 20000\n assert candidate(arrays = [[-5000, -4000], [-3000, -2000], [-1000, 0], [1000, 2000], [3000, 4000], [5000, 6000], [7000, 8000], [9000, 10000]]) == 15000\n assert candidate(arrays = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]]) == 19\n assert candidate(arrays = [[-1, 0, 1], [-2, -1, 0], [-3, -2, -1, 0], [-4, -3, -2, -1], [-5, -4, -3, -2, -1], [-6, -5, -4, -3, -2]]) == 7\n assert candidate(arrays = [[-10000, -9999, -9998], [10000], [-5000, -4999, -4998], [9999]]) == 20000\n assert candidate(arrays = [[-5000], [-4900], [-4800], [-4700], [-4600], [-4500], [-4400], [-4300], [-4200], [-4100], [-4000]]) == 1000\n assert candidate(arrays = [[-5000, -4000, -3000], [-2000, -1000, 0], [1000, 2000, 3000], [4000, 5000, 6000]]) == 11000\n assert candidate(arrays = [[-1000, -900, -800], [-700, -600, -500], [-400, -300, -200], [-100, 0, 100], [200, 300, 400], [500, 600, 700], [800, 900, 1000]]) == 2000\n assert candidate(arrays = [[-5, -4, -3], [-2, -1, 0, 1, 2], [3, 4, 5, 6], [7, 8, 9], [10]]) == 15\n assert candidate(arrays = [[-10000, -9999], [9998, 9999, 10000], [-5000, -4000, -3000, -2000]]) == 20000\n assert candidate(arrays = [[-1, 0, 1], [-2, 0, 2], [-3, 0, 3], [-4, 0, 4], [-5, 0, 5], [-6, 0, 6], [-7, 0, 7], [-8, 0, 8], [-9, 0, 9], [-10, 0, 10]]) == 19\n assert candidate(arrays = [[1], [2], [3], [4], [5], [6], [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]]) == 49\n assert candidate(arrays = [[-10, -9], [-8, -7], [-6, -5], [-4, -3], [-2, -1], [0], [1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == 20\n assert candidate(arrays = [[-1000, -999, -998], [-997, -996, -995], [-994, -993, -992], [-991, -990, -989], [-988, -987, 1000]]) == 2000\n assert candidate(arrays = [[-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], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == 70\n assert candidate(arrays = [[-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]]) == 24\n assert candidate(arrays = [[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], [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], [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], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5]]) == 4\n assert candidate(arrays = [[-10000, -9999, -9998], [0, 1, 2], [9998, 9999, 10000]]) == 20000\n assert candidate(arrays = [[1000], [999, 1001], [998, 999, 1002], [997, 998, 999, 1003], [996, 997, 998, 999, 1004]]) == 7\n assert candidate(arrays = [[1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 100]]) == 99\n assert candidate(arrays = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [20, 22, 24, 26, 28]]) == 27\n assert candidate(arrays = [[-9999], [-9998], [-9997], [-9996], [-9995], [-9994], [-9993], [-9992], [-9991], [-9990], [9990], [9991], [9992], [9993], [9994], [9995], [9996], [9997], [9998], [9999]]) == 19998\n assert candidate(arrays = [[1, 2, 3, 4, 5], [6, 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(arrays = [[-10000], [-9999], [-9998], [-9997], [-9996], [-9995], [-9994], [-9993], [-9992], [-9991]]) == 9\n assert candidate(arrays = [[-100, -50, -10], [-8, -4, -1], [-5, 0, 5], [10, 20, 30], [40, 50, 60]]) == 160\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[4,5],[1,2,3]]", "[[1],[1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["arrays"], "leetcode_dataset_entry_point": "Solution().maxDistance", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:31+00:00", "tests_total": 100, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "int maxDistance(vector>& arrays) {", "container": "Solution", "callable": "maxDistance", "parameters": [{"name": "arrays", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 628, "task_id": "maximum-product-of-three-numbers", "difficulty": "Easy", "problem_description": "You are given an integer array nums.\n\nFind three numbers whose product is maximum and return the maximum product.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: 6\nExplanation:\nThe only three numbers are 1, 2, and 3, so the maximum product is 1 * 2 * 3 = 6.\n\nExample 2:\n\nInput: nums = [1,2,3,4]\nOutput: 24\nExplanation:\nThe largest product comes from the three greatest numbers: 2 * 3 * 4 = 24.\n\nExample 3:\n\nInput: nums = [-1,-2,-3]\nOutput: -6\nExplanation:\nThe only three numbers are -1, -2, and -3, so the maximum product is (-1) * (-2) * (-3) = -6.\n\nConstraints:\n\n- 3 <= nums.length <= 10^4\n- -1000 <= nums[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-10, -10, 5, 2]) == 500\n assert candidate(nums = [1, 2, 3, 4]) == 24\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 99]) == 99\n assert candidate(nums = [0, 2, 3, 5]) == 30\n assert candidate(nums = [0, 2, 3, -1, 5]) == 30\n assert candidate(nums = [1, 2, 3]) == 6\n assert candidate(nums = [-10, -10, 5, 2]) == 500\n assert candidate(nums = [0, 2, 3, 5, 7]) == 105\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3, -4]) == 36\n assert candidate(nums = [-1, -2, -3, -4, -5]) == -6\n assert candidate(nums = [-1, -2, -3, -4]) == -6\n assert candidate(nums = [1, 10, -5, 1, -100]) == 5000\n assert candidate(nums = [0, 2, 3, 5, 9]) == 135\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 720\n assert candidate(nums = [-1, -2, -3]) == -6\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 24273\n assert candidate(nums = [-1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-10, 1, 2, 3, 100, 200]) == 60000\n assert candidate(nums = [0, 0, 0, 0, 0, 1, -1]) == 0\n assert candidate(nums = [-10, -20, 0, 5, 15, 25]) == 5000\n assert candidate(nums = [-1000, 1000, 500, -500, 250, -250, 125, -125]) == 500000000\n assert candidate(nums = [10, -10, 20, -20, 30, -30]) == 18000\n assert candidate(nums = [-1000, -999, -998, -997, -996, -995]) == -988046940\n assert candidate(nums = [-5, -5, -5, -5, -5, 5, 5, 5, 5, 5]) == 125\n assert candidate(nums = [-10, -20, -30, 1, 2, 3]) == 1800\n assert candidate(nums = [-5, -6, -7, 1, 2, 3]) == 126\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 = [-1000, 1000, 500, -500, 0, 1, -1]) == 500000000\n assert candidate(nums = [-1000, -900, -800, -700, -600, -500, 400, 300, 200, 100, 0]) == 360000000\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125]) == 500000000\n assert candidate(nums = [1, 2, 3, 4, 5, -1000, -1000, -1000]) == 5000000\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4]) == 48\n assert candidate(nums = [-5, -4, -3, -2, -1]) == -6\n assert candidate(nums = [100, 200, 300, -100, -200, -300]) == 18000000\n assert candidate(nums = [-1, 0, 1]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 2, 3]) == 6\n assert candidate(nums = [-1, 0, 1, 2, -2, -3, 3]) == 18\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 100\n assert candidate(nums = [100, 200, 300, 400, 500]) == 60000000\n assert candidate(nums = [-1, -2, 0, 2, 1]) == 4\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 0\n assert candidate(nums = [-10, 0, 10, 20, -30, 40]) == 12000\n assert candidate(nums = [0, 0, 0, 0, 1]) == 0\n assert candidate(nums = [-1, -2, 3, 4, -5, 6, -7, 8, 9, -10]) == 630\n assert candidate(nums = [0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [-1000, -999, -998, 0, 1, 2]) == 1998000\n assert candidate(nums = [-1, -1, -1, 1000, 1000, 1000]) == 1000000000\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) == 27\n assert candidate(nums = [-100, 0, 50, 100]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, -11, -13]) == 1287\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == 100\n assert candidate(nums = [1000, 999, 998, 997, 996, 995]) == 997002000\n assert candidate(nums = [1, 10, -5, 1, -100]) == 5000\n assert candidate(nums = [0, 0, 0, -1, -2, -3]) == 0\n assert candidate(nums = [-10, -20, 5, 6, 2]) == 1200\n assert candidate(nums = [1, 1, 1, 1000, 1000, 1000]) == 1000000000\n assert candidate(nums = [-10, -20, -30, 1, 2]) == 1200\n assert candidate(nums = [-100, 0, 100]) == 0\n assert candidate(nums = [1000, 999, 998, 1, 2, 3]) == 997002000\n assert candidate(nums = [-1, -2, -3, -4, -5]) == -6\n assert candidate(nums = [-1, -2, -3, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1000]) == 1000\n assert candidate(nums = [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 = [-1, -2, 3, 4, 5, 6]) == 120\n assert candidate(nums = [-999, -998, -997, 997, 998, 999]) == 996004998\n assert candidate(nums = [1000, 500, 200, 100, 50, 25]) == 100000000\n assert candidate(nums = [10, 20, 30, -1, -2, -3]) == 6000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 720\n assert candidate(nums = [1, 2, 3, 4, 5, -6, -7, -8]) == 280\n assert candidate(nums = [-10, 20, -30, 40, -50, 60, -70, 80]) == 280000\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10]) == 720\n assert candidate(nums = [-1000, -999, -998, -1, -2, -3]) == -6\n assert candidate(nums = [10, 20, 30, 40, 50, -10, -20, -30, -40, -50]) == 100000\n assert candidate(nums = [-10, -20, 5, 6, 7]) == 1400\n assert candidate(nums = [100, 200, 300, 400, 500, -100, -200]) == 60000000\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 100\n assert candidate(nums = [-10, -20, 5, 10, 15]) == 3000\n assert candidate(nums = [-1000, -1000, -1000, 1, 2, 3]) == 3000000\n assert candidate(nums = [1, 2, 3, -1, -2, -3, 4, 5, 6, 7, 8, 9]) == 504\n assert candidate(nums = [500, 400, 300, 200, 100, 0, -100, -200, -300, -400, -500]) == 100000000\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5]) == 125\n assert candidate(nums = [1000, 999, 998, 1, 2, 3]) == 997002000\n assert candidate(nums = [-5, -6, -7, -8, -9]) == -210\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 64\n assert candidate(nums = [-1000, 1000, 500, -500, 250, -250, 125, -125, 62, -62, 31, -31]) == 500000000\n assert candidate(nums = [1000, 999, 998, -1000]) == 997002000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-1000, 1000, 500, -500, 200, -200]) == 500000000\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\n assert candidate(nums = [0, 0, 0, 1, 2, 3]) == 6\n assert candidate(nums = [-10, 20, 30, -40, 50]) == 30000\n assert candidate(nums = [-10, -5, -2, 0, 2, 5, 10]) == 500\n assert candidate(nums = [-5, -5, -5, -5, -5, -5, -5]) == -125\n assert candidate(nums = [10, 20, -30, -40, 50, 60]) == 72000\n assert candidate(nums = [-5, -6, 2, 3, 4]) == 120\n assert candidate(nums = [1, 2, 3, -4, -5, -6]) == 90\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == -6\n assert candidate(nums = [-100, -90, -80, 70, 60, 50, 40, 30, 20, 10]) == 630000\n assert candidate(nums = [-10, -9, -8, -7, -6, -5]) == -210\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5]) == 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\n assert candidate(nums = [-1000, -999, -998, 998, 999, 1000]) == 999000000\n assert candidate(nums = [100, 90, 80, -100, -90]) == 900000\n assert candidate(nums = [-1000, -999, -998, 1000, 999, 998]) == 999000000\n assert candidate(nums = [-1, -2, -3, 4, 5, 6, 7, 8, 9]) == 504\n assert candidate(nums = [-10, -20, -30, -40, 100]) == 120000\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 1]) == 0\n assert candidate(nums = [-5, -4, -3, 1, 2, 3]) == 60\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990]) == 997002000\n assert candidate(nums = [1, 2, -3, 4, -5, 6]) == 90\n", "comparison": "exact"}, "public_tests": ["[1,2,3]", "[1,2,3,4]", "[-1,-2,-3]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maximumProduct", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:35+00:00", "tests_total": 111, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "math", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "int maximumProduct(vector& nums) {", "container": "Solution", "callable": "maximumProduct", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 629, "task_id": "k-inverse-pairs-array", "difficulty": "Hard", "problem_description": "For an integer array nums, an inverse pair is a pair of integers [i, j] where 0 <= i < j < nums.length and nums[i] > nums[j].\n\nGiven two integers n and k, return the number of different arrays consisting of numbers from 1 to n such that there are exactly k inverse pairs. Since the answer can be huge, return it modulo 10^9 + 7.\n\nExample 1:\n\nInput: n = 3, k = 0\nOutput: 1\nExplanation: Only the array [1,2,3] which consists of numbers from 1 to 3 has exactly 0 inverse pairs.\n\nExample 2:\n\nInput: n = 3, k = 1\nOutput: 2\nExplanation: The array [1,3,2] and [2,1,3] have exactly 1 inverse pair.\n\nConstraints:\n\n- 1 <= n <= 1000\n- 0 <= k <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 1000,k = 500) == 955735232\n assert candidate(n = 100,k = 0) == 1\n assert candidate(n = 20,k = 50) == 788876615\n assert candidate(n = 1000,k = 0) == 1\n assert candidate(n = 10,k = 10) == 21670\n assert candidate(n = 3,k = 0) == 1\n assert candidate(n = 100,k = 50) == 445329159\n assert candidate(n = 10,k = 20) == 230131\n assert candidate(n = 10,k = 5) == 1068\n assert candidate(n = 6,k = 4) == 49\n assert candidate(n = 500,k = 500) == 334048938\n assert candidate(n = 4,k = 2) == 5\n assert candidate(n = 5,k = 3) == 15\n assert candidate(n = 3,k = 1) == 2\n assert candidate(n = 1000,k = 1000) == 663677020\n assert candidate(n = 7,k = 10) == 573\n assert candidate(n = 6,k = 5) == 71\n assert candidate(n = 100,k = 100) == 959322173\n assert candidate(n = 500,k = 250) == 340232605\n assert candidate(n = 400,k = 200) == 155930478\n assert candidate(n = 300,k = 150) == 954108341\n assert candidate(n = 250,k = 125) == 963392607\n assert candidate(n = 450,k = 350) == 817469743\n assert candidate(n = 550,k = 350) == 753008434\n assert candidate(n = 200,k = 100) == 372936062\n assert candidate(n = 900,k = 700) == 867124875\n assert candidate(n = 950,k = 600) == 304125714\n assert candidate(n = 650,k = 325) == 651704209\n assert candidate(n = 750,k = 300) == 319486156\n assert candidate(n = 500,k = 1) == 499\n assert candidate(n = 750,k = 200) == 784163913\n assert candidate(n = 500,k = 600) == 423901727\n assert candidate(n = 800,k = 350) == 167531348\n assert candidate(n = 800,k = 600) == 545089101\n assert candidate(n = 200,k = 199) == 113707737\n assert candidate(n = 350,k = 100) == 882052434\n assert candidate(n = 800,k = 500) == 237860861\n assert candidate(n = 200,k = 150) == 691281198\n assert candidate(n = 850,k = 750) == 613893680\n assert candidate(n = 550,k = 275) == 829312124\n assert candidate(n = 750,k = 250) == 998393645\n assert candidate(n = 700,k = 250) == 533593353\n assert candidate(n = 750,k = 700) == 199653602\n assert candidate(n = 200,k = 300) == 818876359\n assert candidate(n = 100,k = 75) == 472228743\n assert candidate(n = 999,k = 999) == 570203540\n assert candidate(n = 700,k = 350) == 622326263\n assert candidate(n = 825,k = 412) == 680368220\n assert candidate(n = 900,k = 450) == 610615323\n assert candidate(n = 300,k = 299) == 425310890\n assert candidate(n = 900,k = 900) == 218855132\n assert candidate(n = 400,k = 399) == 759251773\n assert candidate(n = 990,k = 500) == 863155312\n assert candidate(n = 600,k = 100) == 777381270\n assert candidate(n = 600,k = 800) == 139677600\n assert candidate(n = 150,k = 75) == 532579469\n assert candidate(n = 750,k = 600) == 37939667\n assert candidate(n = 800,k = 750) == 420581417\n assert candidate(n = 120,k = 119) == 156717557\n assert candidate(n = 500,k = 0) == 1\n assert candidate(n = 900,k = 100) == 68842652\n assert candidate(n = 800,k = 0) == 1\n assert candidate(n = 250,k = 250) == 946579835\n assert candidate(n = 850,k = 700) == 259344610\n assert candidate(n = 950,k = 900) == 333369296\n assert candidate(n = 950,k = 450) == 946420580\n assert candidate(n = 650,k = 400) == 449625333\n assert candidate(n = 150,k = 149) == 480922327\n assert candidate(n = 900,k = 300) == 64634329\n assert candidate(n = 300,k = 100) == 86577949\n assert candidate(n = 600,k = 300) == 537290507\n assert candidate(n = 998,k = 0) == 1\n assert candidate(n = 350,k = 150) == 604337481\n assert candidate(n = 800,k = 400) == 628007887\n assert candidate(n = 750,k = 500) == 620935219\n assert candidate(n = 400,k = 150) == 958391787\n assert candidate(n = 500,k = 100) == 725526442\n assert candidate(n = 600,k = 200) == 785265253\n assert candidate(n = 50,k = 25) == 913564693\n assert candidate(n = 600,k = 550) == 430003494\n", "comparison": "exact"}, "public_tests": ["3\n0", "3\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().kInversePairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:38+00:00", "tests_total": 80, "tests_dropped": 0, "flags": [], "topic_tags": ["dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int kInversePairs(int n, int k) {", "container": "Solution", "callable": "kInversePairs", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 630, "task_id": "course-schedule-iii", "difficulty": "Hard", "problem_description": "There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [duration_i, lastDay_i] indicate that the i^th course should be taken continuously for duration_i days and must be finished before or on lastDay_i.\n\nYou will start on the 1^st day and you cannot take two or more courses simultaneously.\n\nReturn the maximum number of courses that you can take.\n\nExample 1:\n\nInput: courses = [[100,200],[200,1300],[1000,1250],[2000,3200]]\nOutput: 3\nExplanation:\nThere are totally 4 courses, but you can take 3 courses at most:\nFirst, take the 1^st course, it costs 100 days so you will finish it on the 100^th day, and ready to take the next course on the 101^st day.\nSecond, take the 3^rd course, it costs 1000 days so you will finish it on the 1100^th day, and ready to take the next course on the 1101^st day.\nThird, take the 2^nd course, it costs 200 days so you will finish it on the 1300^th day.\nThe 4^th course cannot be taken now, since you will finish it on the 3300^th day, which exceeds the closed date.\n\nExample 2:\n\nInput: courses = [[1,2]]\nOutput: 1\n\nExample 3:\n\nInput: courses = [[3,2],[4,3]]\nOutput: 0\n\nConstraints:\n\n- 1 <= courses.length <= 10^4\n- 1 <= duration_i, lastDay_i <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(courses = [[7, 17], [3, 12], [10, 20], [9, 10], [11, 15], [11, 16], [8, 13], [11, 17], [4, 11], [2, 12]]) == 4\n assert candidate(courses = [[100, 200], [200, 1300], [1000, 1250], [300, 3100]]) == 4\n assert candidate(courses = [[10, 100], [10, 100], [10, 100], [10, 100], [10, 100]]) == 5\n assert candidate(courses = [[5, 5], [3, 6], [7, 8], [2, 4]]) == 2\n assert candidate(courses = [[5, 5], [2, 5], [4, 6]]) == 2\n assert candidate(courses = [[7, 17], [3, 12], [10, 20], [9, 10], [5, 16], [8, 14]]) == 3\n assert candidate(courses = [[10, 15], [20, 30], [10, 25]]) == 2\n assert candidate(courses = [[1, 2]]) == 1\n assert candidate(courses = [[100, 100], [200, 200], [300, 300]]) == 1\n assert candidate(courses = [[3, 7], [4, 9], [4, 10], [2, 5]]) == 3\n assert candidate(courses = [[3, 2], [4, 3]]) == 0\n assert candidate(courses = [[100, 200], [200, 1300], [1000, 1250], [2000, 3200]]) == 3\n assert candidate(courses = [[10, 100], [20, 200], [30, 300], [40, 400]]) == 4\n assert candidate(courses = [[100, 200], [200, 1000], [500, 1500]]) == 3\n assert candidate(courses = [[9, 14], [2, 11], [8, 12], [8, 13], [10, 14], [2, 4]]) == 3\n assert candidate(courses = [[7, 16], [2, 3], [3, 12], [3, 14], [10, 19], [10, 16], [6, 10], [4, 8]]) == 4\n assert candidate(courses = [[5, 5], [5, 6], [6, 10]]) == 1\n assert candidate(courses = [[5, 20], [10, 25], [15, 30]]) == 3\n assert candidate(courses = [[4, 7], [2, 10], [3, 10]]) == 3\n assert candidate(courses = [[5, 5], [4, 6], [2, 6]]) == 2\n assert candidate(courses = [[1, 3], [2, 5], [3, 7], [4, 9]]) == 3\n assert candidate(courses = [[1, 2], [2, 3], [3, 4], [4, 5]]) == 2\n assert candidate(courses = [[5, 15], [3, 19], [6, 7], [2, 10], [5, 16], [8, 14], [10, 11], [2, 19]]) == 5\n assert candidate(courses = [[2, 5], [2, 7], [2, 10], [3, 15]]) == 4\n assert candidate(courses = [[7, 17], [3, 12], [10, 20], [9, 10], [5, 16], [8, 14], [10, 16], [4, 8]]) == 3\n assert candidate(courses = [[5, 15], [10, 20], [15, 30]]) == 3\n assert candidate(courses = [[1, 2], [2, 5], [4, 6], [7, 8]]) == 2\n assert candidate(courses = [[1, 20], [2, 30], [3, 40], [4, 50]]) == 4\n assert candidate(courses = [[10, 20], [20, 40], [30, 60]]) == 3\n assert candidate(courses = [[1, 100], [2, 101], [3, 102], [4, 103], [5, 104]]) == 5\n assert candidate(courses = [[1, 10000], [2, 9999], [3, 9998], [4, 9997], [5, 9996]]) == 5\n assert candidate(courses = [[10, 100], [10, 200], [10, 300], [10, 400], [10, 500], [10, 600], [10, 700], [10, 800], [10, 900], [10, 1000], [10, 1100], [10, 1200]]) == 12\n assert candidate(courses = [[100, 200], [150, 300], [50, 250], [200, 500], [100, 400]]) == 4\n assert candidate(courses = [[1, 100], [2, 200], [3, 300], [4, 400], [5, 500], [6, 600], [7, 700], [8, 800], [9, 900], [10, 1000], [11, 1100], [12, 1200], [13, 1300], [14, 1400], [15, 1500]]) == 15\n assert candidate(courses = [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12], [7, 14], [8, 16], [9, 18], [10, 20], [1, 3], [2, 5], [3, 7], [4, 9], [5, 11], [6, 13], [7, 15], [8, 17], [9, 19], [10, 21]]) == 5\n assert candidate(courses = [[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], [150, 160]]) == 2\n assert candidate(courses = [[300, 500], [200, 400], [100, 300], [200, 500], [100, 400], [300, 600]]) == 3\n assert candidate(courses = [[100, 500], [50, 250], [200, 600], [300, 900], [100, 400], [250, 700]]) == 5\n assert candidate(courses = [[5, 10], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 2\n assert candidate(courses = [[1, 3], [2, 5], [3, 7], [4, 9], [5, 11], [6, 13], [7, 15], [8, 17], [9, 19], [10, 21], [11, 23], [12, 25], [13, 27], [14, 29], [15, 31]]) == 5\n assert candidate(courses = [[100, 300], [200, 700], [100, 500], [200, 800], [100, 600], [200, 900], [100, 700], [200, 1000]]) == 7\n assert candidate(courses = [[5, 5], [10, 10], [15, 15], [20, 20], [25, 25], [30, 30], [35, 35], [40, 40]]) == 1\n assert candidate(courses = [[100, 250], [100, 300], [100, 350], [100, 400], [100, 450], [100, 500], [100, 550], [100, 600]]) == 6\n assert candidate(courses = [[100, 300], [200, 500], [100, 400], [200, 600], [300, 800], [100, 500], [200, 700]]) == 5\n assert candidate(courses = [[100, 200], [200, 400], [300, 600], [400, 800], [500, 1000], [600, 1200], [700, 1400], [800, 1600], [900, 1800]]) == 4\n assert candidate(courses = [[5, 5], [3, 6], [2, 10], [10, 12], [4, 8]]) == 3\n assert candidate(courses = [[500, 1000], [1000, 2000], [500, 1500], [1000, 2500], [500, 2000], [1000, 3000], [500, 2500], [1000, 3500], [500, 3000], [1000, 4000]]) == 6\n assert candidate(courses = [[100, 200], [50, 150], [30, 100], [200, 300], [10, 50]]) == 4\n assert candidate(courses = [[100, 300], [200, 400], [300, 500], [400, 600], [500, 700], [600, 800], [700, 900], [800, 1000]]) == 2\n assert candidate(courses = [[1, 10000], [2, 9999], [3, 9998], [4, 9997], [5, 9996], [6, 9995], [7, 9994], [8, 9993], [9, 9992], [10, 9991]]) == 10\n assert candidate(courses = [[5, 10], [3, 8], [4, 9], [2, 6], [7, 12], [1, 5], [6, 11], [8, 13], [9, 14], [10, 15]]) == 3\n assert candidate(courses = [[10, 20], [9, 19], [8, 18], [7, 17], [6, 16], [5, 15], [4, 14], [3, 13], [2, 12], [1, 11], [11, 21], [12, 22], [13, 23], [14, 24], [15, 25]]) == 5\n assert candidate(courses = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994], [8, 993], [9, 992], [10, 991]]) == 10\n assert candidate(courses = [[100, 200], [200, 300], [300, 400], [400, 500], [500, 600], [600, 700], [700, 800], [800, 900], [900, 1000]]) == 2\n assert candidate(courses = [[100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300], [100, 300]]) == 3\n assert candidate(courses = [[100, 50], [200, 150], [300, 250], [400, 350], [500, 450], [600, 550]]) == 0\n assert candidate(courses = [[1000, 1000], [900, 900], [800, 800], [700, 700], [600, 600], [500, 500]]) == 1\n assert candidate(courses = [[300, 600], [200, 500], [100, 400], [50, 300], [25, 250], [10, 200], [5, 150], [2, 100]]) == 7\n assert candidate(courses = [[10, 15], [20, 20], [30, 25], [40, 30], [50, 35], [60, 40], [70, 45], [80, 50], [90, 55], [100, 60]]) == 1\n assert candidate(courses = [[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], [150, 160], [160, 170], [170, 180], [180, 190], [190, 200]]) == 2\n assert candidate(courses = [[1000, 2000], [500, 1500], [250, 1000], [125, 500], [62, 250], [31, 125], [15, 62], [7, 31], [3, 15], [1, 7]]) == 10\n assert candidate(courses = [[1, 10000], [2, 9999], [3, 9998], [4, 9997], [5, 9996], [6, 9995], [7, 9994], [8, 9993], [9, 9992], [10, 9991]]) == 10\n assert candidate(courses = [[100, 100], [200, 200], [300, 300], [400, 400], [500, 500], [600, 600], [700, 700], [800, 800], [900, 900], [1000, 1000], [100, 200], [200, 300], [300, 400], [400, 500], [500, 600], [600, 700], [700, 800], [800, 900], [900, 1000], [1000, 1100]]) == 2\n assert candidate(courses = [[500, 1000], [100, 1000], [500, 2000], [100, 3000], [500, 2500]]) == 5\n assert candidate(courses = [[10, 20], [10, 30], [10, 40], [10, 50], [10, 60], [10, 70], [10, 80], [10, 90], [10, 100], [10, 110], [10, 120], [10, 130], [10, 140], [10, 150], [10, 160], [10, 170], [10, 180], [10, 190], [10, 200], [10, 210], [10, 220], [10, 230], [10, 240], [10, 250], [10, 260], [10, 270], [10, 280], [10, 290], [10, 300]]) == 29\n assert candidate(courses = [[1, 1], [2, 3], [3, 6], [4, 10], [5, 15], [6, 21]]) == 6\n assert candidate(courses = [[5, 10], [4, 15], [6, 20], [3, 25], [7, 30], [2, 35], [8, 40], [1, 45]]) == 8\n assert candidate(courses = [[500, 600], [500, 700], [500, 800], [500, 900], [500, 1000], [500, 1100]]) == 2\n assert candidate(courses = [[10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80], [90, 90], [100, 100]]) == 1\n assert candidate(courses = [[10, 20], [40, 50], [20, 100], [10, 11], [5, 6]]) == 3\n assert candidate(courses = [[200, 500], [100, 400], [150, 300], [50, 200], [300, 700], [400, 800]]) == 4\n assert candidate(courses = [[1000, 2000], [500, 1500], [300, 1000], [100, 400], [50, 300]]) == 5\n assert candidate(courses = [[500, 1000], [200, 500], [300, 800], [400, 1200], [100, 300]]) == 4\n assert candidate(courses = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == 3\n assert candidate(courses = [[1000, 2000], [1500, 2500], [2000, 3000], [500, 1500], [1000, 2500], [1500, 3000], [2000, 3500], [500, 2000], [1000, 3000], [1500, 3500]]) == 4\n assert candidate(courses = [[100, 200], [200, 1300], [1000, 1250], [2000, 3200], [500, 2500], [800, 3000], [1500, 4000]]) == 5\n assert candidate(courses = [[1000, 1200], [500, 700], [250, 400], [125, 200], [62, 100], [31, 50], [15, 25], [7, 12], [3, 6], [1, 3]]) == 6\n assert candidate(courses = [[100, 200], [200, 300], [300, 400], [400, 500], [500, 600], [600, 700], [700, 800], [800, 900], [900, 1000], [1000, 1100]]) == 2\n assert candidate(courses = [[50, 100], [10, 20], [40, 150], [30, 120], [15, 80]]) == 5\n assert candidate(courses = [[1000, 1500], [2000, 2500], [3000, 3500], [4000, 4500], [5000, 5500]]) == 1\n assert candidate(courses = [[1000, 2000], [900, 1900], [800, 1800], [700, 1700], [600, 1600], [500, 1500], [400, 1400], [300, 1300], [200, 1200], [100, 1100]]) == 5\n assert candidate(courses = [[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]]) == 3\n assert candidate(courses = [[50, 100], [25, 100], [75, 150], [50, 150], [25, 150], [100, 200], [75, 200], [125, 250]]) == 4\n assert candidate(courses = [[10, 30], [20, 50], [30, 70], [40, 90], [50, 110], [60, 130], [70, 150]]) == 4\n assert candidate(courses = [[300, 400], [200, 300], [100, 200], [50, 150], [10, 100]]) == 3\n assert candidate(courses = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 2\n assert candidate(courses = [[50, 100], [50, 150], [50, 200], [50, 250], [50, 300], [50, 350], [50, 400]]) == 7\n assert candidate(courses = [[150, 300], [100, 450], [50, 300], [200, 600], [250, 750], [100, 500], [50, 350], [300, 800]]) == 6\n assert candidate(courses = [[100, 200], [200, 300], [300, 400], [400, 500], [500, 600], [600, 700], [700, 800]]) == 2\n assert candidate(courses = [[10, 20], [20, 40], [30, 60], [40, 80], [50, 100], [60, 120], [70, 140], [80, 160], [90, 180], [100, 200]]) == 4\n assert candidate(courses = [[500, 700], [600, 1200], [100, 600], [400, 900], [300, 800], [200, 500]]) == 4\n assert candidate(courses = [[1000, 1000], [2000, 2000], [3000, 3000], [4000, 4000], [5000, 5000], [6000, 6000], [7000, 7000], [8000, 8000], [9000, 9000], [10000, 10000]]) == 1\n assert candidate(courses = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 2\n assert candidate(courses = [[300, 600], [500, 900], [200, 500], [400, 800], [600, 1200], [100, 400], [700, 1100]]) == 4\n assert candidate(courses = [[1, 1000], [1, 999], [1, 998], [1, 997], [1, 996], [1, 995], [1, 994], [1, 993], [1, 992], [1, 991]]) == 10\n assert candidate(courses = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 2\n assert candidate(courses = [[50, 200], [100, 250], [150, 300], [200, 350], [250, 400], [300, 450], [350, 500], [400, 550], [450, 600]]) == 3\n assert candidate(courses = [[500, 900], [200, 1000], [300, 1200], [400, 1500], [100, 600], [200, 800]]) == 5\n assert candidate(courses = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50], [50, 55]]) == 2\n assert candidate(courses = [[100, 200], [200, 1300], [1000, 1250], [2000, 3200], [500, 2500]]) == 4\n assert candidate(courses = [[500, 800], [200, 600], [400, 1000], [300, 750], [100, 500]]) == 4\n assert candidate(courses = [[100, 200], [50, 250], [200, 400], [150, 350], [50, 200]]) == 4\n assert candidate(courses = [[50, 150], [100, 250], [150, 350], [200, 450], [250, 550], [300, 650], [350, 750], [400, 850]]) == 4\n assert candidate(courses = [[100, 500], [100, 1000], [100, 1500], [100, 2000], [100, 2500], [100, 3000]]) == 6\n assert candidate(courses = [[10, 50], [20, 60], [30, 70], [40, 80], [50, 90], [60, 100], [70, 110], [80, 120], [90, 130], [100, 140]]) == 3\n assert candidate(courses = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [10, 110], [20, 120], [30, 130], [40, 140], [50, 150], [60, 160], [70, 170], [80, 180], [90, 190], [100, 200]]) == 6\n assert candidate(courses = [[1000, 2000], [500, 1500], [200, 500], [100, 300], [50, 250]]) == 5\n assert candidate(courses = [[300, 500], [300, 400], [200, 300], [400, 600], [100, 200]]) == 2\n assert candidate(courses = [[5, 5], [10, 10], [15, 15], [20, 20], [25, 25], [30, 30], [35, 35], [40, 40], [45, 45], [50, 50]]) == 1\n assert candidate(courses = [[500, 1000], [1000, 2000], [1500, 2500], [2000, 3000], [2500, 3500]]) == 2\n assert candidate(courses = [[5, 10], [1, 2], [3, 7], [1, 5], [2, 4]]) == 4\n assert candidate(courses = [[7, 10], [3, 9], [2, 5], [4, 11], [6, 12]]) == 3\n assert candidate(courses = [[5, 5], [6, 10], [7, 12], [2, 3], [3, 8], [1, 4]]) == 3\n assert candidate(courses = [[1000, 2000], [1000, 3000], [1000, 4000], [1000, 5000], [1000, 6000]]) == 5\n assert candidate(courses = [[100, 100], [200, 200], [300, 300], [400, 400], [500, 500], [600, 600], [700, 700], [800, 800], [900, 900], [1000, 1000]]) == 1\n assert candidate(courses = [[500, 1000], [1000, 2000], [1500, 3000], [2000, 4000], [2500, 5000], [3000, 6000]]) == 4\n assert candidate(courses = [[100, 200], [200, 1300], [1000, 1250], [2000, 3200], [50, 100], [150, 400]]) == 5\n assert candidate(courses = [[100, 150], [100, 100], [100, 250], [100, 300], [100, 350]]) == 3\n assert candidate(courses = [[100, 200], [100, 200], [100, 200], [100, 200], [100, 200], [100, 200], [100, 200], [100, 200], [100, 200], [100, 200]]) == 2\n assert candidate(courses = [[5, 10], [10, 20], [15, 30], [20, 40], [25, 50], [30, 60], [35, 70], [40, 80], [45, 90], [50, 100], [55, 110], [60, 120], [65, 130], [70, 140], [75, 150], [80, 160], [85, 170], [90, 180], [95, 190], [100, 200]]) == 5\n assert candidate(courses = [[500, 1000], [300, 600], [200, 1000], [100, 1200], [400, 800], [600, 1200]]) == 4\n assert candidate(courses = [[100, 200], [100, 250], [100, 300], [100, 350], [100, 400], [100, 450], [100, 500], [100, 550], [100, 600], [100, 650], [100, 700]]) == 7\n assert candidate(courses = [[1000, 2000], [500, 1000], [250, 750], [125, 500], [63, 350], [32, 250], [16, 175], [8, 125], [4, 80], [2, 50]]) == 10\n assert candidate(courses = [[100, 250], [200, 500], [300, 750], [400, 1000], [500, 1250], [600, 1500], [700, 1750], [800, 2000]]) == 5\n assert candidate(courses = [[2000, 3000], [1000, 2500], [500, 1500], [250, 1000], [125, 500], [62, 250], [31, 125], [15, 62], [7, 31]]) == 8\n assert candidate(courses = [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60], [7, 70], [8, 80], [9, 90], [10, 100]]) == 10\n assert candidate(courses = [[500, 1000], [300, 600], [200, 800], [400, 900], [100, 500], [700, 1200]]) == 3\n assert candidate(courses = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12]]) == 2\n assert candidate(courses = [[300, 500], [200, 400], [100, 300], [50, 200], [25, 100], [12, 50], [6, 25], [3, 12], [1, 6]]) == 8\n", "comparison": "exact"}, "public_tests": ["[[100,200],[200,1300],[1000,1250],[2000,3200]]", "[[1,2]]", "[[3,2],[4,3]]"], "hints": ["During iteration, say I want to add the current course, currentTotalTime being total time of all courses taken till now, but adding the current course might exceed my deadline or it doesn’t. 1. If it doesn’t, then I have added one new course. Increment the currentTotalTime with duration of current course.", "2. If it exceeds deadline, I can swap current course with current courses that has biggest duration. * No harm done and I might have just reduced the currentTotalTime, right? * What preprocessing do I need to do on my course processing order so that this swap is always legal?"], "metadata": {"canonical_parameter_names": ["courses"], "leetcode_dataset_entry_point": "Solution().scheduleCourse", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:40+00:00", "tests_total": 130, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "greedy", "sorting", "heap-priority-queue"]}, "language": "cpp", "interface": {"raw_signature": "int scheduleCourse(vector>& courses) {", "container": "Solution", "callable": "scheduleCourse", "parameters": [{"name": "courses", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 632, "task_id": "smallest-range-covering-elements-from-k-lists", "difficulty": "Hard", "problem_description": "You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists.\n\nWe define the range [a, b] is smaller than range [c, d] if b - a < d - c or a < c if b - a == d - c.\n\nExample 1:\n\nInput: nums = [[4,10,15,24,26],[0,9,12,20],[5,18,22,30]]\nOutput: [20,24]\nExplanation:\nList 1: [4, 10, 15, 24,26], 24 is in range [20,24].\nList 2: [0, 9, 12, 20], 20 is in range [20,24].\nList 3: [5, 18, 22, 30], 22 is in range [20,24].\n\nExample 2:\n\nInput: nums = [[1,2,3],[1,2,3],[1,2,3]]\nOutput: [1,1]\n\nConstraints:\n\n- nums.length == k\n- 1 <= k <= 3500\n- 1 <= nums[i].length <= 50\n- -10^5 <= nums[i][j] <= 10^5\n- nums[i] is sorted in non-decreasing order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [[-10, -5, -3, -1], [0, 2, 4, 6], [5, 10, 15, 20]]) == [-1, 5]\n assert candidate(nums = [[1, 2, 3], [1, 2, 3], [1, 2, 3]]) == [1, 1]\n assert candidate(nums = [[1, 5, 9], [2, 6, 10], [3, 7, 11]]) == [1, 3]\n assert candidate(nums = [[5, 10, 15], [3, 6, 9], [12, 14, 18]]) == [9, 12]\n assert candidate(nums = [[-10, -9, -8], [-7, -6, -5], [-4, -3, -2]]) == [-8, -4]\n assert candidate(nums = [[-10, -9, -8], [-4, -3, -2], [-1, 0, 1]]) == [-8, -1]\n assert candidate(nums = [[-10, -5, 0, 5, 10], [-5, 0, 5, 10, 15], [0, 5, 10, 15, 20]]) == [0, 0]\n assert candidate(nums = [[1, 5, 9], [0, 6, 8], [2, 3, 7]]) == [0, 2]\n assert candidate(nums = [[10, 10, 10], [10, 10, 10], [10, 10, 10]]) == [10, 10]\n assert candidate(nums = [[4, 10, 15, 24, 26], [0, 9, 12, 20], [5, 18, 22, 30]]) == [20, 24]\n assert candidate(nums = [[1, 3, 5, 7], [2, 4, 6, 8], [0, 9, 10, 11]]) == [0, 2]\n assert candidate(nums = [[-10, -8, -6], [-6, -4, -2], [0, 2, 4]]) == [-6, 0]\n assert candidate(nums = [[1], [2], [3], [4], [5]]) == [1, 5]\n assert candidate(nums = [[5, 10, 15], [3, 6, 9], [12, 18, 24]]) == [9, 12]\n assert candidate(nums = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15], [0, 16, 17, 18, 19]]) == [0, 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]]) == [2, 19]\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]]) == [-1, 15]\n assert candidate(nums = [[1000, 2000, 3000], [500, 1500, 2500, 3500], [-1000, 0, 1000, 2000]]) == [500, 1000]\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]]) == [1, 4]\n assert candidate(nums = [[1], [2], [3], [4], [5]]) == [1, 5]\n assert candidate(nums = [[-1000, -900, -800, -700, -600, -500], [-950, -850, -750, -650, -550, -450], [-900, -800, -700, -600, -500, -400], [-850, -750, -650, -550, -450, -350]]) == [-900, -850]\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]]) == [10, 31]\n assert candidate(nums = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]]) == [9, 10]\n assert candidate(nums = [[5], [10], [15], [20], [25], [30], [35], [40], [45], [50]]) == [5, 50]\n assert candidate(nums = [[-100, -99, -98], [-97, -96, -95], [-94, -93, -92], [-91, -90, -89], [-88, -87, -86]]) == [-98, -88]\n assert candidate(nums = [[1000, 2000, 3000, 4000, 5000], [1500, 2500, 3500, 4500, 5500], [2000, 3000, 4000, 5000, 6000], [2500, 3500, 4500, 5500, 6500]]) == [2000, 2500]\n assert candidate(nums = [[-1, 0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 8, 9]]) == [3, 3]\n assert candidate(nums = [[-10, -5, 0], [0, 5, 10], [10, 15, 20], [20, 25, 30], [30, 35, 40]]) == [0, 30]\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], [-95, -85, -75, -65, -55, -45, -35, -25, -15, -5, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105]]) == [-100, -95]\n assert candidate(nums = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]]) == [6, 6]\n assert candidate(nums = [[1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105]]) == [1, 5]\n assert candidate(nums = [[10, 20, 30, 40, 50], [15, 25, 35, 45, 55], [20, 30, 40, 50, 60], [25, 35, 45, 55, 65]]) == [20, 25]\n assert candidate(nums = [[5, 10, 15, 20, 25, 30, 35, 40, 45, 50], [1, 6, 11, 16, 21, 26, 31, 36, 41, 46], [2, 7, 12, 17, 22, 27, 32, 37, 42, 47]]) == [5, 7]\n assert candidate(nums = [[-100, -50, 0, 50, 100], [-200, -150, -100, -50, 0], [50, 100, 150, 200, 250]]) == [0, 50]\n assert candidate(nums = [[-100, -50, -25, 0, 25, 50, 100], [5, 15, 25, 35, 45, 55, 65], [10, 20, 30, 40, 50, 60, 70]]) == [20, 25]\n assert candidate(nums = [[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], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]]) == [1, 2]\n assert candidate(nums = [[1, 5, 9, 13, 17], [2, 6, 10, 14, 18], [3, 7, 11, 15, 19], [4, 8, 12, 16, 20]]) == [1, 4]\n assert candidate(nums = [[-5, -3, -1], [-4, -2, 0], [-3, -1, 1], [-2, 0, 2], [-1, 1, 3], [0, 2, 4], [1, 3, 5], [2, 4, 6], [3, 5, 7], [4, 6, 8]]) == [-1, 4]\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, 110, 120, 130, 140]]) == [-60, 100]\n assert candidate(nums = [[-100, 0, 100], [50, 60, 70], [90, 100, 110], [200, 210, 220]]) == [70, 200]\n assert candidate(nums = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 20, 30, 40, 50], [1, 11, 21, 31, 41, 51]]) == [10, 11]\n assert candidate(nums = [[-10, -5, -1], [0, 1, 5], [10, 15, 20], [25, 30, 35], [40, 45, 50]]) == [-1, 40]\n assert candidate(nums = [[-10, -5, 0, 5, 10], [0, 2, 4, 6, 8], [3, 7, 11, 15, 19], [1, 3, 5, 7, 9]]) == [3, 5]\n assert candidate(nums = [[-10, -5, -1], [0, 1, 5, 10, 15], [20, 25, 30, 35, 40], [45, 50, 55, 60, 65]]) == [-1, 45]\n assert candidate(nums = [[1, 100000], [2, 99999], [3, 99998], [4, 99997], [5, 99996], [6, 99995], [7, 99994], [8, 99993], [9, 99992], [10, 99991]]) == [1, 10]\n assert candidate(nums = [[-100, -50, 0, 50, 100], [-90, -40, -10, 40, 90], [-80, -30, -20, 30, 80]]) == [-100, -80]\n assert candidate(nums = [[-100, -50, -25, -10, 0, 10, 25, 50, 100], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]]) == [5, 10]\n assert candidate(nums = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [0, 21, 22, 23, 24, 25, 26, 27, 28, 29]]) == [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]]) == [5, 21]\n assert candidate(nums = [[10, 20, 30, 40, 50], [11, 21, 31, 41, 51], [12, 22, 32, 42, 52], [13, 23, 33, 43, 53], [14, 24, 34, 44, 54]]) == [10, 14]\n assert candidate(nums = [[-10, 0, 10, 20], [0, 1, 2, 3], [5, 6, 7, 8, 9]]) == [0, 5]\n assert candidate(nums = [[1, 10, 20, 30, 40], [2, 12, 22, 32, 42], [3, 13, 23, 33, 43]]) == [1, 3]\n assert candidate(nums = [[1, 3, 5, 7, 9, 11], [2, 4, 6, 8, 10, 12], [0, 9, 12, 20, 24, 26], [5, 18, 22, 30, 35, 40]]) == [5, 9]\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], [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]]) == [1000, 1000]\n assert candidate(nums = [[-1000, -500, -250, -100, -50, -25, 0, 25, 50, 100, 250, 500, 1000], [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000], [0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500]]) == [500, 500]\n assert candidate(nums = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]) == [1, 10]\n assert candidate(nums = [[1, 20, 30], [2, 25, 35], [3, 30, 40], [4, 35, 45], [5, 40, 50]]) == [1, 5]\n assert candidate(nums = [[100, 200, 300, 400, 500], [50, 150, 250, 350, 450], [25, 75, 125, 175, 225]]) == [50, 100]\n assert candidate(nums = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [3, 5, 7, 9, 11], [4, 6, 8, 10, 12]]) == [3, 4]\n assert candidate(nums = [[1, 4, 10, 14], [0, 9, 10, 20, 24], [5, 18, 22, 30], [3, 13, 15, 17]]) == [0, 5]\n assert candidate(nums = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15]]) == [1, 3]\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, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]]) == [-100, 1000]\n assert candidate(nums = [[1, 10, 19, 28, 37], [2, 11, 20, 29, 38], [3, 12, 21, 30, 39], [4, 13, 22, 31, 40], [5, 14, 23, 32, 41]]) == [1, 5]\n assert candidate(nums = [[-10, -5, 0, 5, 10], [-20, -15, -10, -5, 0], [1, 6, 11, 16, 21]]) == [0, 1]\n assert candidate(nums = [[10, 20, 30, 40, 50], [15, 25, 35, 45, 55], [20, 30, 40, 50, 60], [5, 10, 15, 20, 25]]) == [15, 20]\n assert candidate(nums = [[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4], [-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3]]) == [-5, -5]\n assert candidate(nums = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]]) == [6, 6]\n assert candidate(nums = [[100, 200, 300, 400], [50, 150, 250, 350], [25, 125, 225, 325, 425]]) == [100, 150]\n assert candidate(nums = [[1, 4, 7, 10, 13, 16, 19, 22, 25, 28], [2, 5, 8, 11, 14, 17, 20, 23, 26, 29], [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]]) == [1, 3]\n assert candidate(nums = [[-100000, 0, 100000], [-99999, 99999], [-99998, 99998], [-99997, 99997]]) == [-100000, -99997]\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]]) == [50, 51]\n assert candidate(nums = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105]]) == [0, 5]\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]]) == [1, 5]\n assert candidate(nums = [[1, 100000], [2, 99999], [3, 99998], [4, 99997], [5, 99996]]) == [1, 5]\n assert candidate(nums = [[-100, -50, 0, 50, 100], [5, 15, 25, 35, 45], [1, 2, 3, 4, 5], [0, 0, 0, 0, 0]]) == [0, 5]\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], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [0, 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, 5]\n assert candidate(nums = [[1, 10, 20, 30, 40], [5, 15, 25, 35, 45], [10, 20, 30, 40, 50], [5, 15, 25, 35, 45]]) == [5, 10]\n assert candidate(nums = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) == [1, 2]\n assert candidate(nums = [[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]]) == [3, 3]\n assert candidate(nums = [[10, 20, 30], [11, 21, 31], [12, 22, 32], [13, 23, 33], [14, 24, 34], [15, 25, 35], [16, 26, 36], [17, 27, 37], [18, 28, 38], [19, 29, 39]]) == [10, 19]\n assert candidate(nums = [[1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [2, 11, 21, 31, 41, 51, 61, 71, 81, 91, 101], [3, 12, 22, 32, 42, 52, 62, 72, 82, 92, 102], [4, 13, 23, 33, 43, 53, 63, 73, 83, 93, 103], [5, 14, 24, 34, 44, 54, 64, 74, 84, 94, 104]]) == [1, 5]\n assert candidate(nums = [[-1, 0, 1], [-2, -1, 0, 1, 2], [-3, -2, -1, 0, 1, 2, 3]]) == [-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]]) == [5, 21]\n assert candidate(nums = [[-100, -90, -80, -70, -60], [-95, -85, -75, -65, -55], [-90, -80, -70, -60, -50], [-85, -75, -65, -55, -45]]) == [-90, -85]\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]]) == [10, 21]\n assert candidate(nums = [[-10, -5, 0, 5, 10], [1, 3, 6, 9, 12], [2, 4, 7, 11, 13], [0, 8, 16, 24, 32]]) == [0, 2]\n assert candidate(nums = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]) == [1, 10]\n assert candidate(nums = [[100, 200, 300], [150, 250, 350], [200, 250, 300, 350]]) == [150, 200]\n assert candidate(nums = [[-100000, 100000], [-90000, 90000], [-80000, 80000], [-70000, 70000], [-60000, 60000]]) == [-100000, -60000]\n assert candidate(nums = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]]) == [1, 15]\n", "comparison": "exact"}, "public_tests": ["[[4,10,15,24,26],[0,9,12,20],[5,18,22,30]]", "[[1,2,3],[1,2,3],[1,2,3]]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().smallestRange", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:42+00:00", "tests_total": 97, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "hash-table", "greedy", "sliding-window", "sorting", "heap-priority-queue"]}, "language": "cpp", "interface": {"raw_signature": "vector smallestRange(vector>& nums) {", "container": "Solution", "callable": "smallestRange", "parameters": [{"name": "nums", "type": "vector>&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 633, "task_id": "sum-of-square-numbers", "difficulty": "Medium", "problem_description": "Given a non-negative integer c, decide whether there're two integers a and b such that a^2 + b^2 = c.\n\nExample 1:\n\nInput: c = 5\nOutput: true\nExplanation: 1 * 1 + 2 * 2 = 5\n\nExample 2:\n\nInput: c = 3\nOutput: false\n\nConstraints:\n\n- 0 <= c <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(c = 0) == True\n assert candidate(c = 1000000001) == False\n assert candidate(c = 25) == True\n assert candidate(c = 2) == True\n assert candidate(c = 3) == False\n assert candidate(c = 5) == True\n assert candidate(c = 1) == True\n assert candidate(c = 2147483647) == False\n assert candidate(c = 4) == True\n assert candidate(c = 1000000000) == True\n assert candidate(c = 999999999) == False\n assert candidate(c = 500000000) == True\n assert candidate(c = 846625) == True\n assert candidate(c = 314159265) == False\n assert candidate(c = 840000000) == False\n assert candidate(c = 16777217) == True\n assert candidate(c = 1000000) == True\n assert candidate(c = 1215436930) == False\n assert candidate(c = 16777216) == True\n assert candidate(c = 100) == True\n assert candidate(c = 10000) == True\n assert candidate(c = 325) == True\n assert candidate(c = 1805306457) == False\n assert candidate(c = 1000000003) == False\n assert candidate(c = 2147483600) == True\n assert candidate(c = 2000000000) == True\n assert candidate(c = 1800000000) == True\n assert candidate(c = 250000000) == True\n assert candidate(c = 1000000002) == False\n assert candidate(c = 846456943) == False\n assert candidate(c = 13) == True\n assert candidate(c = 123456789) == False\n assert candidate(c = 1805355528) == False\n assert candidate(c = 675) == False\n assert candidate(c = 65535) == False\n assert candidate(c = 50) == True\n assert candidate(c = 1600000000) == True\n assert candidate(c = 500) == True\n assert candidate(c = 1234567890) == False\n assert candidate(c = 10001) == True\n assert candidate(c = 82) == True\n", "comparison": "exact"}, "public_tests": ["5", "3"], "hints": [], "metadata": {"canonical_parameter_names": ["c"], "leetcode_dataset_entry_point": "Solution().judgeSquareSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:45+00:00", "tests_total": 52, "tests_dropped": 11, "flags": [], "topic_tags": ["math", "two-pointers", "binary-search"]}, "language": "cpp", "interface": {"raw_signature": "bool judgeSquareSum(int c) {", "container": "Solution", "callable": "judgeSquareSum", "parameters": [{"name": "c", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 636, "task_id": "exclusive-time-of-functions", "difficulty": "Medium", "problem_description": "On a single-threaded CPU, we execute a program containing n functions. Each function has a unique ID between 0 and n - 1.\n\nFunction calls are stored in a call stack: when a function call starts, its ID is pushed onto the stack, and when a function call ends, its ID is popped off the stack. The function whose ID is at the top of the stack is the current function being executed. Each time a function starts or ends, we write a log with the ID, whether it started or ended, and the timestamp.\n\nYou are given a list logs, where logs[i] represents the i^th log message formatted as a string \"{function_id}:{\"start\" | \"end\"}:{timestamp}\". For example, \"0:start:3\" means a function call with function ID 0 started at the beginning of timestamp 3, and \"1:end:2\" means a function call with function ID 1 ended at the end of timestamp 2. Note that a function can be called multiple times, possibly recursively.\n\nA function's exclusive time is the sum of execution times for all function calls in the program. For example, if a function is called twice, one call executing for 2 time units and another call executing for 1 time unit, the exclusive time is 2 + 1 = 3.\n\nReturn the exclusive time of each function in an array, where the value at the i^th index represents the exclusive time for the function with ID i.\n\nExample 1:\n\nInput: n = 2, logs = [\"0:start:0\",\"1:start:2\",\"1:end:5\",\"0:end:6\"]\nOutput: [3,4]\nExplanation:\nFunction 0 starts at the beginning of time 0, then it executes 2 for units of time and reaches the end of time 1.\nFunction 1 starts at the beginning of time 2, executes for 4 units of time, and ends at the end of time 5.\nFunction 0 resumes execution at the beginning of time 6 and executes for 1 unit of time.\nSo function 0 spends 2 + 1 = 3 units of total time executing, and function 1 spends 4 units of total time executing.\n\nExample 2:\n\nInput: n = 1, logs = [\"0:start:0\",\"0:start:2\",\"0:end:5\",\"0:start:6\",\"0:end:6\",\"0:end:7\"]\nOutput: [8]\nExplanation:\nFunction 0 starts at the beginning of time 0, executes for 2 units of time, and recursively calls itself.\nFunction 0 (recursive call) starts at the beginning of time 2 and executes for 4 units of time.\nFunction 0 (initial call) resumes execution then immediately calls itself again.\nFunction 0 (2nd recursive call) starts at the beginning of time 6 and executes for 1 unit of time.\nFunction 0 (initial call) resumes execution at the beginning of time 7 and executes for 1 unit of time.\nSo function 0 spends 2 + 4 + 1 + 1 = 8 units of total time executing.\n\nExample 3:\n\nInput: n = 2, logs = [\"0:start:0\",\"0:start:2\",\"0:end:5\",\"1:start:6\",\"1:end:6\",\"0:end:7\"]\nOutput: [7,1]\nExplanation:\nFunction 0 starts at the beginning of time 0, executes for 2 units of time, and recursively calls itself.\nFunction 0 (recursive call) starts at the beginning of time 2 and executes for 4 units of time.\nFunction 0 (initial call) resumes execution then immediately calls function 1.\nFunction 1 starts at the beginning of time 6, executes 1 unit of time, and ends at the end of time 6.\nFunction 0 resumes execution at the beginning of time 7 and executes for 1 unit of time.\nSo function 0 spends 2 + 4 + 1 = 7 units of total time executing, and function 1 spends 1 unit of total time executing.\n\nConstraints:\n\n- 1 <= n <= 100\n- 2 <= logs.length <= 500\n- 0 <= function_id < n\n- 0 <= timestamp <= 10^9\n- No two start events will happen at the same timestamp.\n- No two end events will happen at the same timestamp.\n- Each function has an \"end\" log for each \"start\" log.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 1,logs = ['0:start:0', '0:end:1']) == [2]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '1:end:4', '0:end:5', '3:start:6', '3:end:7']) == [2, 2, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '1:end:2', '2:start:3', '2:end:4', '3:start:5', '3:end:6', '0:end:7']) == [2, 2, 2, 2]\n assert candidate(n = 2,logs = ['0:start:0', '1:start:1', '1:end:2', '0:end:3']) == [2, 2]\n assert candidate(n = 1,logs = ['0:start:0', '0:start:2', '0:end:5', '0:start:6', '0:end:6', '0:end:7']) == [8]\n assert candidate(n = 2,logs = ['0:start:0', '0:start:2', '0:end:5', '1:start:6', '1:end:6', '0:end:7']) == [7, 1]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '0:end:5', '1:start:6', '1:end:9', '2:start:10', '2:end:12', '0:end:13']) == [7, 4, 3]\n assert candidate(n = 2,logs = ['0:start:0', '1:start:2', '1:end:5', '0:end:6']) == [3, 4]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:4', '0:end:5', '2:start:6', '2:end:7']) == [4, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:5', '0:end:6', '2:start:7', '2:end:8']) == [4, 3, 2]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '1:end:4', '0:end:5', '0:start:6', '1:start:7', '2:start:8', '2:end:9', '1:end:10', '0:end:11', '0:start:12', '1:start:13', '2:start:14', '2:end:15', '1:end:16', '0:end:17']) == [6, 6, 6]\n assert candidate(n = 5,logs = ['0:start:0', '0:start:1', '1:start:2', '1:start:3', '1:end:4', '2:start:5', '2:end:6', '1:end:7', '0:end:8', '4:start:9', '4:end:10']) == [3, 4, 2, 0, 2]\n assert candidate(n = 6,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '4:start:4', '5:start:5', '5:end:6', '4:end:7', '3:end:8', '2:end:9', '1:end:10', '0:end:11']) == [2, 2, 2, 2, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '0:start:1', '1:start:2', '1:start:3', '1:end:4', '0:end:5', '2:start:6', '2:end:7', '3:start:8', '3:start:9', '3:end:10', '3:end:11', '2:end:12', '0:end:13']) == [4, 4, 2, 4]\n assert candidate(n = 7,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '4:start:4', '5:start:5', '6:start:6', '6:end:7', '5:end:8', '4:end:9', '3:end:10', '2:end:11', '1:end:12', '0:end:13']) == [2, 2, 2, 2, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '0:start:2', '0:end:3', '0:end:4', '0:end:5', '1:start:6', '1:end:7', '2:start:8', '2:end:9']) == [6, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '0:start:2', '0:start:3', '0:end:4', '0:end:5', '0:end:6', '0:end:7', '1:start:8', '1:start:9', '1:end:10', '1:end:11', '2:start:12', '2:end:13']) == [8, 4, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '1:start:2', '1:end:3', '1:start:4', '1:end:5', '2:start:6', '2:end:7', '3:start:8', '3:end:9', '4:start:10', '4:end:11']) == [1, 5, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '0:start:4', '0:end:5', '0:end:7', '0:end:9', '1:start:10', '1:end:11', '2:start:12', '2:end:13']) == [10, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '1:start:2', '1:start:3', '1:end:4', '1:end:5', '1:end:6', '0:end:7', '2:start:8', '2:start:9', '2:end:10', '2:end:11', '0:start:12', '0:end:13']) == [4, 6, 4]\n assert candidate(n = 2,logs = ['0:start:0', '0:start:1', '0:start:2', '0:start:3', '0:end:4', '0:end:5', '0:end:6', '0:end:7', '1:start:8', '1:end:9']) == [8, 2]\n assert candidate(n = 4,logs = ['0:start:0', '0:start:1', '1:start:2', '1:end:3', '0:end:4', '0:start:5', '0:start:6', '2:start:7', '2:end:8', '0:end:9', '0:end:10', '3:start:11', '3:end:12', '0:start:13', '0:end:14']) == [9, 2, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '0:start:1', '1:start:2', '1:end:3', '1:start:4', '1:end:5', '0:end:6', '2:start:7', '2:end:8', '3:start:9', '3:end:10']) == [3, 4, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:5', '2:start:6', '2:end:9', '0:end:10', '3:start:11', '4:start:12', '4:end:14', '3:end:15']) == [4, 3, 4, 2, 3]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '1:start:3', '2:end:4', '1:end:5', '0:end:6', '3:start:7', '3:start:8', '3:end:9', '3:end:10']) == [1, 4, 2, 4]\n assert candidate(n = 10,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '4:start:4', '5:start:5', '6:start:6', '7:start:7', '8:start:8', '9:start:9', '9:end:11', '8:end:12', '7:end:13', '6:end:14', '5:end:15', '4:end:16', '3:end:17', '2:end:18', '1:end:19', '0:end:20']) == [2, 2, 2, 2, 2, 2, 2, 2, 2, 3]\n assert candidate(n = 6,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:4', '0:end:5', '2:start:6', '2:start:7', '3:start:8', '3:end:9', '2:end:10', '2:end:11', '0:end:12', '4:start:13', '4:end:14', '5:start:15', '5:end:16']) == [5, 2, 4, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '1:start:2', '1:start:3', '1:end:4', '1:end:5', '1:end:6', '2:start:7', '2:start:8', '2:end:9', '2:end:10']) == [1, 6, 4]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '2:start:4', '3:start:5', '3:end:6', '2:end:7', '1:end:8', '0:end:9', '0:start:10', '0:end:11']) == [4, 2, 4, 2]\n assert candidate(n = 6,logs = ['0:start:0', '0:start:2', '0:end:3', '1:start:4', '1:start:6', '1:end:7', '1:end:9', '0:end:10']) == [5, 6, 0, 0, 0, 0]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '1:start:2', '1:start:3', '1:end:4', '1:end:5', '0:end:6', '0:end:7', '2:start:8', '2:start:9', '2:start:10', '2:end:11', '2:end:12', '2:end:13', '0:start:14', '0:end:15']) == [6, 4, 6]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '0:start:4', '0:end:5', '0:end:6', '0:end:7']) == [8, 0, 0]\n assert candidate(n = 7,logs = ['0:start:0', '0:start:1', '0:start:2', '1:start:3', '1:start:4', '1:start:5', '2:start:6', '2:start:7', '2:end:8', '2:end:9', '1:end:10', '1:end:11', '1:end:12', '0:end:13', '0:end:14', '0:end:15', '3:start:16', '3:end:17', '4:start:18', '4:end:19', '5:start:20', '5:end:21', '6:start:22', '6:end:23']) == [6, 6, 4, 2, 2, 2, 2]\n assert candidate(n = 2,logs = ['0:start:0', '1:start:1', '1:start:2', '1:end:3', '1:start:4', '1:end:5', '0:end:6']) == [1, 6]\n assert candidate(n = 4,logs = ['0:start:0', '0:start:1', '0:start:2', '0:end:3', '0:end:4', '0:end:5', '1:start:6', '1:start:7', '1:start:8', '1:end:9', '1:end:10', '1:end:11', '2:start:12', '2:start:13', '2:start:14', '2:end:15', '2:end:16', '2:end:17', '3:start:18', '3:start:19', '3:start:20', '3:end:21', '3:end:22', '3:end:23']) == [6, 6, 6, 6]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '4:start:4', '4:end:5', '3:end:6', '2:end:7', '1:end:8', '0:end:9']) == [2, 2, 2, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '1:start:2', '1:end:3', '2:start:4', '2:end:5', '3:start:6', '3:end:7', '4:start:8', '4:end:9', '1:start:10', '1:end:11', '0:end:12']) == [1, 6, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '1:end:4', '1:start:5', '1:end:6', '0:end:7', '0:start:8', '2:start:9', '2:end:10', '0:end:11']) == [4, 4, 4]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '3:end:4', '3:start:5', '3:end:6', '2:end:7', '1:end:8', '0:end:9']) == [2, 2, 2, 4]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '1:start:2', '1:end:3', '2:start:4', '2:end:5', '0:end:6']) == [3, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:2', '2:start:4', '3:start:6', '3:end:8', '2:end:10', '1:end:12', '0:end:14']) == [4, 4, 4, 3, 0]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '1:end:4', '0:end:5', '3:start:6', '3:start:7', '3:end:8', '3:end:9']) == [2, 2, 2, 4]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '4:start:4', '4:end:5', '3:end:6', '2:end:7', '1:end:8', '0:end:9', '0:start:10', '1:start:11', '2:start:12', '3:start:13', '4:start:14', '4:end:15', '3:end:16', '2:end:17', '1:end:18', '0:end:19']) == [4, 4, 4, 4, 4]\n assert candidate(n = 2,logs = ['0:start:0', '1:start:1', '1:start:2', '1:start:3', '1:end:4', '1:end:5', '1:end:6', '0:end:7']) == [2, 6]\n assert candidate(n = 5,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:4', '2:start:5', '2:end:6', '0:end:7', '3:start:8', '4:start:9', '4:end:10', '3:end:11', '0:start:12', '0:end:13']) == [6, 2, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '1:start:3', '1:start:4', '1:end:5', '1:end:6', '0:end:7', '0:end:8', '2:start:9', '2:end:10']) == [5, 4, 2]\n assert candidate(n = 2,logs = ['0:start:0', '0:start:1', '0:start:2', '0:end:3', '0:end:4', '0:end:5', '0:start:6', '0:start:7', '0:end:8', '0:end:9']) == [10, 0]\n assert candidate(n = 6,logs = ['0:start:0', '1:start:1', '1:start:2', '2:start:3', '2:end:5', '1:end:6', '0:end:7', '3:start:8', '3:start:9', '4:start:10', '4:end:12', '3:end:13', '5:start:14', '5:end:16']) == [1, 4, 3, 3, 3, 3]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '1:start:2', '1:start:3', '1:end:4', '1:end:5', '1:end:6', '2:start:7', '2:end:8', '0:end:9']) == [2, 6, 2]\n assert candidate(n = 3,logs = ['0:start:0', '1:start:1', '2:start:2', '1:end:3', '2:end:4', '0:end:5', '0:start:6', '1:start:7', '2:start:8', '2:end:9', '1:end:10', '0:end:11', '0:start:12', '1:start:13', '2:start:14', '2:end:15', '1:end:16', '0:end:17']) == [6, 6, 6]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '2:end:4', '1:end:5', '0:end:6', '3:start:7', '3:end:8', '2:start:9', '2:end:10', '1:start:11', '1:end:12', '0:start:13', '0:end:14']) == [3, 4, 4, 4]\n assert candidate(n = 5,logs = ['0:start:0', '0:start:1', '1:start:2', '1:start:3', '2:start:4', '2:end:5', '1:end:6', '1:end:7', '0:end:8', '3:start:9', '3:end:10', '4:start:11', '4:end:12']) == [3, 4, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '1:start:2', '1:end:3', '2:start:4', '2:start:5', '2:end:6', '1:start:7', '1:end:8', '0:end:9']) == [2, 4, 4]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:1', '0:start:2', '0:end:3', '0:end:4', '0:end:5', '1:start:6', '1:start:7', '1:end:8', '1:end:9', '2:start:10', '2:end:11']) == [6, 4, 2]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '3:end:4', '2:end:5', '1:end:6', '0:end:7', '0:start:8', '0:end:9']) == [4, 2, 2, 2]\n assert candidate(n = 6,logs = ['0:start:0', '0:start:1', '1:start:2', '1:end:3', '0:end:4', '0:start:5', '2:start:6', '2:end:7', '3:start:8', '3:end:9', '0:end:10', '4:start:11', '4:end:12', '5:start:13', '5:end:14']) == [5, 2, 2, 2, 2, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '1:start:3', '1:start:4', '1:end:5', '0:end:6', '2:start:7', '2:end:8']) == [3, 4, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '2:start:2', '2:end:3', '1:end:4', '0:end:5', '3:start:6', '4:start:7', '4:end:8', '3:end:9', '0:start:10', '0:end:11']) == [4, 2, 2, 2, 2]\n assert candidate(n = 7,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:5', '0:end:6', '2:start:7', '2:start:8', '3:start:9', '3:end:11', '2:end:12', '2:end:13', '4:start:14', '4:end:16', '5:start:17', '5:end:19', '6:start:20', '6:end:22']) == [4, 3, 4, 3, 3, 3, 3]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '2:start:2', '2:start:3', '3:start:4', '3:end:5', '2:end:6', '2:end:7', '1:end:8', '0:end:9', '4:start:10', '4:end:11']) == [2, 2, 4, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '3:end:4', '2:end:5', '1:end:6', '0:end:7']) == [2, 2, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '1:start:2', '2:start:3', '2:end:4', '1:end:5', '0:end:6', '3:start:7', '4:start:8', '4:end:9', '3:end:10', '0:start:11', '1:start:12', '2:start:13', '2:end:14', '1:end:15', '0:end:16']) == [3, 6, 4, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '0:start:1', '0:end:2', '1:start:3', '1:end:4', '0:start:5', '0:end:6', '2:start:7', '2:end:8', '3:start:9', '3:end:10']) == [5, 2, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '0:start:1', '0:start:2', '1:start:3', '1:end:4', '0:end:5', '0:end:6', '2:start:7', '2:start:8', '2:end:9', '2:end:10', '3:start:11', '3:end:12', '4:start:13', '4:end:14']) == [5, 2, 4, 2, 2]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '1:end:2', '0:start:3', '2:start:4', '2:end:5', '0:start:6', '3:start:7', '3:end:8', '0:start:9', '2:start:10', '2:end:11', '0:start:12', '1:start:13', '1:end:14', '0:end:15', '0:start:16', '2:start:17', '2:end:18', '0:end:19']) == [8, 4, 6, 2]\n assert candidate(n = 3,logs = ['0:start:0', '0:start:2', '1:start:3', '1:end:4', '1:start:5', '1:end:6', '0:end:7', '0:start:8', '0:end:9']) == [6, 4, 0]\n assert candidate(n = 4,logs = ['0:start:0', '1:start:1', '1:start:2', '1:end:3', '2:start:4', '2:end:5', '3:start:6', '3:end:7', '1:start:8', '1:end:9', '0:end:10']) == [1, 6, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:2', '2:start:3', '2:end:4', '1:end:5', '3:start:6', '4:start:7', '4:end:8', '3:end:9', '0:end:10']) == [3, 2, 2, 2, 2]\n assert candidate(n = 5,logs = ['0:start:0', '1:start:1', '2:start:2', '3:start:3', '3:end:4', '2:end:5', '1:end:6', '0:end:7']) == [2, 2, 2, 2, 0]\n", "comparison": "exact"}, "public_tests": ["2\n[\"0:start:0\",\"1:start:2\",\"1:end:5\",\"0:end:6\"]", "1\n[\"0:start:0\",\"0:start:2\",\"0:end:5\",\"0:start:6\",\"0:end:6\",\"0:end:7\"]", "2\n[\"0:start:0\",\"0:start:2\",\"0:end:5\",\"1:start:6\",\"1:end:6\",\"0:end:7\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "logs"], "leetcode_dataset_entry_point": "Solution().exclusiveTime", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:49+00:00", "tests_total": 69, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "stack"]}, "language": "cpp", "interface": {"raw_signature": "vector exclusiveTime(int n, vector& logs) {", "container": "Solution", "callable": "exclusiveTime", "parameters": [{"name": "n", "type": "int"}, {"name": "logs", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 638, "task_id": "shopping-offers", "difficulty": "Medium", "problem_description": "In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or more different kinds of items with a sale price.\n\nYou are given an integer array price where price[i] is the price of the i^th item, and an integer array needs where needs[i] is the number of pieces of the i^th item you want to buy.\n\nYou are also given an array special where special[i] is of size n + 1 where special[i][j] is the number of pieces of the j^th item in the i^th offer and special[i][n] (i.e., the last integer in the array) is the price of the i^th offer.\n\nReturn the lowest price you have to pay for exactly certain items as given, where you could make optimal use of the special offers. You are not allowed to buy more items than you want, even if that would lower the overall price. You could use any of the special offers as many times as you want.\n\nExample 1:\n\nInput: price = [2,5], special = [[3,0,5],[1,2,10]], needs = [3,2]\nOutput: 14\nExplanation: There are two kinds of items, A and B. Their prices are $2 and $5 respectively.\nIn special offer 1, you can pay $5 for 3A and 0B\nIn special offer 2, you can pay $10 for 1A and 2B.\nYou need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A.\n\nExample 2:\n\nInput: price = [2,3,4], special = [[1,1,0,4],[2,2,1,9]], needs = [1,2,1]\nOutput: 11\nExplanation: The price of A is $2, and $3 for B, $4 for C.\nYou may pay $4 for 1A and 1B, and $9 for 2A ,2B and 1C.\nYou need to buy 1A ,2B and 1C, so you may pay $4 for 1A and 1B (special offer #1), and $3 for 1B, $4 for 1C.\nYou cannot add more items, though only $9 for 2A ,2B and 1C.\n\nConstraints:\n\n- n == price.length == needs.length\n- 1 <= n <= 6\n- 0 <= price[i], needs[i] <= 10\n- 1 <= special.length <= 100\n- special[i].length == n + 1\n- 0 <= special[i][j] <= 50\n- The input is generated that at least one of special[i][j] is non-zero for 0 <= j <= n - 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(price = [10, 10, 10],special = [[3, 1, 0, 10], [1, 2, 1, 15]],needs = [2, 2, 1]) == 25\n assert candidate(price = [4, 10, 1, 1, 1],special = [[1, 1, 1, 1, 1, 7]],needs = [4, 10, 1, 1, 1]) == 109\n assert candidate(price = [10, 10, 10],special = [[3, 3, 3, 15]],needs = [9, 9, 9]) == 45\n assert candidate(price = [5, 5],special = [[1, 0, 5], [0, 1, 5]],needs = [10, 10]) == 100\n assert candidate(price = [1, 2, 3],special = [[2, 2, 2, 3]],needs = [1, 1, 1]) == 6\n assert candidate(price = [5, 4, 3, 2, 1],special = [[1, 1, 1, 1, 1, 10], [0, 1, 0, 1, 0, 8]],needs = [1, 1, 1, 1, 1]) == 10\n assert candidate(price = [2, 5],special = [[3, 0, 5], [1, 2, 10]],needs = [3, 2]) == 14\n assert candidate(price = [1, 2, 3, 4, 5, 6],special = [[1, 1, 1, 1, 1, 1, 10], [2, 2, 2, 2, 2, 2, 15]],needs = [1, 2, 3, 4, 5, 6]) == 80\n assert candidate(price = [4, 10, 1],special = [[1, 1, 0, 4], [2, 2, 1, 9]],needs = [1, 2, 1]) == 15\n assert candidate(price = [1, 2, 3],special = [[1, 1, 0, 3], [2, 2, 1, 10]],needs = [2, 2, 1]) == 9\n assert candidate(price = [5, 5],special = [[2, 2, 9]],needs = [1, 1]) == 10\n assert candidate(price = [1, 2, 3, 4, 5, 6],special = [[1, 1, 1, 1, 1, 1, 10]],needs = [5, 5, 5, 5, 5, 5]) == 50\n assert candidate(price = [2, 3, 4],special = [[1, 1, 0, 4], [2, 2, 1, 9]],needs = [1, 2, 1]) == 11\n assert candidate(price = [5, 4, 3, 2, 1],special = [[1, 1, 1, 1, 1, 6], [2, 2, 2, 2, 2, 11]],needs = [3, 3, 3, 3, 3]) == 17\n assert candidate(price = [5, 4, 2, 7],special = [[1, 0, 0, 0, 1], [0, 1, 0, 1, 2], [0, 0, 1, 0, 3]],needs = [0, 2, 3, 1]) == 12\n assert candidate(price = [1, 2],special = [[0, 1, 1], [1, 0, 2], [1, 1, 3]],needs = [1, 1]) == 2\n assert candidate(price = [1, 2, 3],special = [[1, 1, 1, 3]],needs = [2, 2, 2]) == 6\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 0]],needs = [0, 0, 0, 0, 0, 0]) == 0\n assert candidate(price = [1, 2, 3, 4],special = [[1, 1, 1, 0, 5], [2, 2, 2, 1, 15]],needs = [2, 2, 2, 1]) == 14\n assert candidate(price = [8, 6, 4, 2],special = [[2, 0, 1, 0, 12], [0, 3, 0, 1, 15], [1, 1, 1, 1, 10]],needs = [4, 6, 3, 2]) == 56\n assert candidate(price = [1, 3, 5, 7, 9],special = [[2, 1, 1, 0, 0, 15], [1, 1, 2, 0, 0, 12], [0, 0, 0, 2, 1, 10], [1, 1, 0, 1, 1, 18], [3, 0, 0, 0, 0, 5]],needs = [4, 5, 6, 3, 4]) == 85\n assert candidate(price = [5, 7, 3, 4, 2],special = [[3, 1, 2, 0, 0, 12], [1, 2, 1, 1, 0, 15], [0, 0, 1, 2, 2, 10]],needs = [5, 4, 3, 2, 1]) == 45\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 0, 4], [0, 0, 0, 0, 0, 1, 1]],needs = [5, 5, 5, 5, 5, 5]) == 25\n assert candidate(price = [2, 4, 6, 8, 10],special = [[1, 1, 1, 1, 1, 25], [2, 2, 2, 2, 2, 40], [3, 0, 0, 0, 0, 30]],needs = [6, 6, 6, 6, 6]) == 120\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 1, 1]],needs = [6, 6, 6, 6, 6, 6]) == 36\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 5], [2, 2, 2, 2, 2, 2, 10], [1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 1, 1]],needs = [6, 6, 6, 6, 6, 6]) == 30\n assert candidate(price = [2, 4, 6, 8],special = [[2, 2, 0, 0, 15], [1, 1, 2, 2, 20], [0, 0, 3, 3, 25]],needs = [6, 6, 6, 6]) == 78\n assert candidate(price = [2, 3, 5, 7],special = [[1, 1, 0, 1, 12], [2, 0, 1, 0, 10], [0, 2, 1, 1, 18]],needs = [3, 3, 2, 3]) == 46\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 0, 5], [2, 2, 2, 2, 2, 2, 10], [1, 0, 1, 0, 1, 0, 7]],needs = [6, 6, 6, 6, 6, 6]) == 30\n assert candidate(price = [7, 5, 3, 1, 2, 4],special = [[1, 1, 0, 0, 0, 0, 12], [0, 1, 1, 0, 0, 0, 15], [0, 0, 1, 1, 1, 1, 20], [1, 0, 1, 0, 1, 0, 18]],needs = [6, 5, 4, 3, 2, 1]) == 90\n assert candidate(price = [9, 5, 1, 8, 6],special = [[1, 0, 2, 1, 0, 13], [2, 2, 0, 0, 1, 20], [0, 1, 1, 1, 0, 12]],needs = [5, 4, 7, 3, 2]) == 74\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[2, 2, 2, 2, 2, 2, 10], [1, 0, 1, 0, 1, 0, 5], [0, 1, 0, 1, 0, 1, 5]],needs = [5, 5, 5, 5, 5, 5]) == 26\n assert candidate(price = [1, 2, 3, 4, 5],special = [[2, 2, 2, 2, 2, 20], [1, 1, 1, 1, 1, 10], [3, 3, 3, 3, 3, 30], [0, 0, 0, 0, 1, 5], [0, 0, 0, 1, 0, 4], [0, 0, 1, 0, 0, 3], [0, 1, 0, 0, 0, 2]],needs = [3, 4, 2, 1, 0]) == 21\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 6], [2, 2, 2, 2, 2, 2, 12], [3, 3, 3, 3, 3, 3, 18]],needs = [6, 6, 6, 6, 6, 6]) == 36\n assert candidate(price = [2, 3, 4, 5, 6, 7],special = [[1, 1, 1, 1, 1, 0, 20], [2, 2, 2, 2, 2, 1, 40], [0, 0, 0, 0, 0, 5, 30]],needs = [2, 3, 4, 5, 6, 5]) == 118\n assert candidate(price = [1, 2, 3, 4, 5, 6],special = [[1, 0, 1, 0, 1, 0, 10], [0, 1, 0, 1, 0, 1, 11], [1, 1, 1, 1, 1, 1, 15]],needs = [4, 4, 4, 4, 4, 4]) == 60\n assert candidate(price = [7, 6, 5, 4, 3, 2],special = [[2, 1, 1, 1, 0, 0, 12], [1, 2, 1, 0, 1, 0, 13], [1, 1, 2, 0, 0, 1, 14], [1, 0, 1, 2, 1, 1, 15]],needs = [4, 5, 6, 3, 2, 1]) == 63\n assert candidate(price = [5, 3, 2, 6, 7],special = [[2, 1, 1, 0, 0, 15], [0, 3, 0, 1, 1, 18], [1, 2, 3, 0, 0, 20]],needs = [3, 6, 5, 2, 2]) == 61\n assert candidate(price = [4, 8, 1, 2, 9, 3],special = [[2, 4, 1, 0, 2, 1, 10], [1, 0, 0, 0, 1, 0, 7], [0, 0, 3, 1, 0, 0, 5], [0, 0, 0, 0, 0, 2, 2]],needs = [5, 8, 2, 2, 9, 4]) == 69\n assert candidate(price = [1, 3, 5, 7, 9],special = [[1, 1, 1, 1, 1, 10], [2, 2, 2, 2, 2, 20], [3, 3, 3, 3, 3, 30]],needs = [4, 4, 4, 4, 4]) == 40\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 5], [2, 2, 2, 2, 2, 2, 10], [3, 3, 3, 3, 3, 3, 15]],needs = [6, 6, 6, 6, 6, 6]) == 30\n assert candidate(price = [5, 5, 5, 5, 5, 5],special = [[3, 3, 3, 3, 3, 3, 15], [2, 2, 2, 2, 2, 2, 10], [1, 1, 1, 1, 1, 1, 5]],needs = [10, 10, 10, 10, 10, 10]) == 50\n assert candidate(price = [3, 5, 7],special = [[1, 0, 2, 10], [0, 2, 1, 12], [3, 1, 1, 20]],needs = [5, 4, 4]) == 46\n assert candidate(price = [2, 3, 4, 5, 6],special = [[1, 1, 1, 0, 0, 6], [0, 2, 2, 1, 1, 10], [2, 0, 0, 2, 1, 14]],needs = [3, 4, 5, 3, 2]) == 35\n assert candidate(price = [7, 5, 3, 1],special = [[1, 1, 1, 1, 15], [0, 2, 2, 0, 15], [2, 0, 0, 2, 15]],needs = [5, 5, 5, 5]) == 75\n assert candidate(price = [6, 3, 7, 2, 9],special = [[1, 0, 0, 0, 0, 3], [0, 1, 0, 0, 0, 2], [0, 0, 1, 0, 0, 4], [0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 1, 5], [2, 1, 1, 1, 1, 20]],needs = [6, 6, 6, 6, 6]) == 90\n assert candidate(price = [1, 2, 3, 4, 5, 6],special = [[1, 1, 0, 0, 0, 0, 6], [0, 1, 1, 0, 0, 0, 8], [0, 0, 1, 1, 0, 0, 10], [0, 0, 0, 1, 1, 0, 12], [0, 0, 0, 0, 1, 1, 14], [1, 0, 1, 0, 1, 0, 20]],needs = [3, 3, 3, 3, 3, 3]) == 63\n assert candidate(price = [2, 3, 4, 5, 6],special = [[1, 0, 1, 1, 0, 12], [0, 2, 0, 0, 1, 15], [1, 2, 1, 0, 2, 30], [2, 1, 0, 2, 1, 40]],needs = [4, 3, 2, 5, 2]) == 62\n assert candidate(price = [3, 2, 5, 7, 1, 4],special = [[2, 1, 1, 0, 0, 1, 10], [0, 2, 0, 1, 1, 0, 12], [1, 0, 1, 1, 0, 1, 14]],needs = [3, 4, 6, 5, 3, 2]) == 81\n assert candidate(price = [8, 6, 7, 3, 5],special = [[2, 2, 0, 1, 1, 16], [0, 2, 2, 0, 1, 18], [1, 1, 0, 0, 0, 9], [0, 0, 0, 2, 2, 15], [1, 0, 1, 1, 0, 13]],needs = [8, 6, 7, 3, 5]) == 123\n assert candidate(price = [5, 7, 3, 2, 6],special = [[2, 3, 1, 0, 0, 15], [1, 1, 2, 0, 1, 10], [0, 0, 0, 3, 3, 20]],needs = [3, 6, 2, 1, 4]) == 70\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 5], [2, 2, 2, 2, 2, 2, 10], [1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 0, 1, 1]],needs = [5, 5, 5, 5, 5, 5]) == 25\n assert candidate(price = [2, 3, 4, 5, 6],special = [[1, 1, 0, 0, 0, 10], [0, 0, 1, 1, 0, 12], [1, 0, 1, 0, 1, 15], [0, 1, 0, 1, 1, 17]],needs = [5, 5, 5, 5, 5]) == 100\n assert candidate(price = [1, 1, 1, 1, 1, 1],special = [[1, 1, 1, 1, 1, 1, 6], [2, 2, 2, 2, 2, 2, 10], [3, 3, 3, 3, 3, 3, 12]],needs = [6, 6, 6, 6, 6, 6]) == 24\n", "comparison": "exact"}, "public_tests": ["[2,5]\n[[3,0,5],[1,2,10]]\n[3,2]", "[2,3,4]\n[[1,1,0,4],[2,2,1,9]]\n[1,2,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["price", "special", "needs"], "leetcode_dataset_entry_point": "Solution().shoppingOffers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:54+00:00", "tests_total": 90, "tests_dropped": 36, "flags": [], "topic_tags": ["array", "dynamic-programming", "backtracking", "bit-manipulation", "memoization", "bitmask", "knapsack-problem", "complete-knapsack"]}, "language": "cpp", "interface": {"raw_signature": "int shoppingOffers(vector& price, vector>& special, vector& needs) {", "container": "Solution", "callable": "shoppingOffers", "parameters": [{"name": "price", "type": "vector&"}, {"name": "special", "type": "vector>&"}, {"name": "needs", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 639, "task_id": "decode-ways-ii", "difficulty": "Hard", "problem_description": "A message containing letters from A-Z can be encoded into numbers using the following mapping:\n\n'A' -> \"1\"\n'B' -> \"2\"\n...\n'Z' -> \"26\"\n\nTo decode an encoded message, all the digits must be grouped then mapped back into letters using the reverse of the mapping above (there may be multiple ways). For example, \"11106\" can be mapped into:\n\n- \"AAJF\" with the grouping (1 1 10 6)\n- \"KJF\" with the grouping (11 10 6)\n\nNote that the grouping (1 11 06) is invalid because \"06\" cannot be mapped into 'F' since \"6\" is different from \"06\".\n\nIn addition to the mapping above, an encoded message may contain the '*' character, which can represent any digit from '1' to '9' ('0' is excluded). For example, the encoded message \"1*\" may represent any of the encoded messages \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", or \"19\". Decoding \"1*\" is equivalent to decoding any of the encoded messages it can represent.\n\nGiven a string s consisting of digits and '*' characters, return the number of ways to decode it.\n\nSince the answer may be very large, return it modulo 10^9 + 7.\n\nExample 1:\n\nInput: s = \"*\"\nOutput: 9\nExplanation: The encoded message can represent any of the encoded messages \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", or \"9\".\nEach of these can be decoded to the strings \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", and \"I\" respectively.\nHence, there are a total of 9 ways to decode \"*\".\n\nExample 2:\n\nInput: s = \"1*\"\nOutput: 18\nExplanation: The encoded message can represent any of the encoded messages \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", or \"19\".\nEach of these encoded messages have 2 ways to be decoded (e.g. \"11\" can be decoded to \"AA\" or \"K\").\nHence, there are a total of 9 * 2 = 18 ways to decode \"1*\".\n\nExample 3:\n\nInput: s = \"2*\"\nOutput: 15\nExplanation: The encoded message can represent any of the encoded messages \"21\", \"22\", \"23\", \"24\", \"25\", \"26\", \"27\", \"28\", or \"29\".\n\"21\", \"22\", \"23\", \"24\", \"25\", and \"26\" have 2 ways of being decoded, but \"27\", \"28\", and \"29\" only have 1 way.\nHence, there are a total of (6 * 2) + (3 * 1) = 12 + 3 = 15 ways to decode \"2*\".\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s[i] is a digit or '*'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"*1*2*3*4*5*6*7*8*9*\") == 554657727\n assert candidate(s = \"26\") == 2\n assert candidate(s = \"2*\") == 15\n assert candidate(s = \"11106\") == 2\n assert candidate(s = \"210\") == 1\n assert candidate(s = \"**********\") == 483456820\n assert candidate(s = \"*0*0*0*0*0\") == 32\n assert candidate(s = \"111\") == 3\n assert candidate(s = \"2626262626\") == 32\n assert candidate(s = \"10*\") == 9\n assert candidate(s = \"26262626262626262626262626262626262626262626262626262626262626262626262626262626262626\") == 92960636\n assert candidate(s = \"1234567890\") == 0\n assert candidate(s = \"27272727272727272727272727272727272727272727272727272727272727272727272727272727272727\") == 1\n assert candidate(s = \"0\") == 0\n assert candidate(s = \"*9*\") == 90\n assert candidate(s = \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\") == 1\n assert candidate(s = \"1111111111\") == 89\n assert candidate(s = \"*0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \"2929292929\") == 1\n assert candidate(s = \"1*2*3*4*5*6*7*8*9*\") == 929111979\n assert candidate(s = \"1*1*1*1*1*1*1*1*1*\") == 949421471\n assert candidate(s = \"2*2*2*2*2*2*2*2*2*\") == 73712584\n assert candidate(s = \"12*\") == 24\n assert candidate(s = \"1*\") == 18\n assert candidate(s = \"1*2*3*4*5*6*7*8*9*0*1*2*3*4*5*6*7*8*9*0*\") == 463661243\n assert candidate(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*1*1*1*1*1*1*1*1*1*1*1*1*1\") == 100804801\n assert candidate(s = \"*1*\") == 180\n assert candidate(s = \"*\") == 9\n assert candidate(s = \"10\") == 1\n assert candidate(s = \"*0*\") == 18\n assert candidate(s = \"***************************\") == 928290058\n assert candidate(s = \"*1\") == 11\n assert candidate(s = \"2**\") == 150\n assert candidate(s = \"12\") == 2\n assert candidate(s = \"1010101010\") == 1\n assert candidate(s = \"*123\") == 31\n assert candidate(s = \"2101010101\") == 1\n assert candidate(s = \"12121212121212121212121212\") == 196418\n assert candidate(s = \"*0\") == 2\n assert candidate(s = \"**************************************************\") == 362622276\n assert candidate(s = \"1*2*3*4*5*6*7*8*9*0\") == 873136000\n assert candidate(s = \"2727272727\") == 1\n assert candidate(s = \"*1*2*3*4*5*6*7*8*9*0*\") == 109315447\n assert candidate(s = \"*************************\") == 714729152\n assert candidate(s = \"**\") == 96\n assert candidate(s = \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \"*2*\") == 153\n assert candidate(s = \"00000\") == 0\n assert candidate(s = \"2222222222\") == 89\n assert candidate(s = \"*10\") == 9\n assert candidate(s = \"*19*\") == 180\n assert candidate(s = \"222222222222222222222222222222\") == 1346269\n assert candidate(s = \"210*12\") == 20\n assert candidate(s = \"*27*28*29*\") == 11979\n assert candidate(s = \"*27\") == 11\n assert candidate(s = \"*0*1*2*3*4*5*6*7*8*9*\") == 109315447\n assert candidate(s = \"*11*\") == 279\n assert candidate(s = \"98765432101234567890\") == 0\n assert candidate(s = \"*10*\") == 81\n assert candidate(s = \"*26*26*26*26*26*26*26*26*26*26*\") == 999354887\n assert candidate(s = \"*9*8*7*6*5*4*3*2*1*0*\") == 119149678\n assert candidate(s = \"1*0*0*0*0*0*0*0*0*0*\") == 4608\n assert candidate(s = \"26262626262626262626\") == 1024\n assert candidate(s = \"**11**22**33**44**55**66**77**88**99**\") == 379740674\n assert candidate(s = \"*1*1*1*1*1*1*1*1*1*\") == 771576448\n assert candidate(s = \"2*2*2*2*2*2*2*2*2*2*\") == 331096887\n assert candidate(s = \"111111111111111111111\") == 17711\n assert candidate(s = \"123456789*\") == 27\n assert candidate(s = \"21*21*21*21*21*21*\") == 615528657\n assert candidate(s = \"*29*\") == 99\n assert candidate(s = \"*2*2*2*\") == 40545\n assert candidate(s = \"27*28*29*\") == 1089\n assert candidate(s = \"1*2*1*2*\") == 89064\n assert candidate(s = \"********\") == 123775776\n assert candidate(s = \"11111111111111111111*\") == 159399\n assert candidate(s = \"1*9*8*7*6*5*4*3*2*1*0*9876543210\") == 362649321\n assert candidate(s = \"9*8*7*6*5*4*3*2*1*\") == 322023172\n assert candidate(s = \"11111111112222222222\") == 10946\n assert candidate(s = \"*0*0*\") == 36\n assert candidate(s = \"1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*\") == 309857393\n assert candidate(s = \"1*2*3*\") == 2952\n assert candidate(s = \"*1*2*3*4*5*6*7*8*9*0123456789\") == 369771818\n assert candidate(s = \"11111111111111111111\") == 10946\n assert candidate(s = \"10*20*30*40*50*60*70*80*90*\") == 0\n assert candidate(s = \"12*12*12*12*12*\") == 11773344\n assert candidate(s = \"1*2*3*4*5*6*7*8*9*0*\") == 858223951\n assert candidate(s = \"1*1*1*1*1*1*1*1*1*1*\") == 316369624\n assert candidate(s = \"*27*\") == 99\n assert candidate(s = \"1*9*8*7*6*5*4*3*2*1*\") == 118440226\n assert candidate(s = \"2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*\") == 962879550\n assert candidate(s = \"22222222222222222222*\") == 139104\n assert candidate(s = \"123*56*78*90*\") == 0\n assert candidate(s = \"9876543210\") == 1\n assert candidate(s = \"*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*\") == 305358957\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*\") == 186702587\n assert candidate(s = \"12*23*34*45*56*67*78*89*\") == 685198800\n assert candidate(s = \"227*227*227*\") == 7200\n assert candidate(s = \"121212121212121212121212121212121212121212121212\") == 778742000\n assert candidate(s = \"*1*1*1*1*1*1*1*1*1*1*1*1*1*\") == 331004313\n assert candidate(s = \"26*3*1\") == 242\n assert candidate(s = \"3*5*7*9*1*\") == 198000\n assert candidate(s = \"1111111111111111111111111111\") == 514229\n assert candidate(s = \"0123456789\") == 0\n assert candidate(s = \"*1*2*\") == 2898\n assert candidate(s = \"*123*\") == 279\n assert candidate(s = \"2*********\") == 34523561\n assert candidate(s = \"*1*2*3*4*5*6*7*8*9*0*1*2*3*4*5*6*7*8*9*0*\") == 429906752\n assert candidate(s = \"0123456789*\") == 0\n assert candidate(s = \"9*9*9*9*9*9*9*9*9*\") == 900000000\n assert candidate(s = \"*27624*1*2*\") == 63756\n assert candidate(s = \"12*34*56*78*90*12*34*56*78*90*\") == 0\n assert candidate(s = \"26*26*26*26*26*26*26*26*26*26*\") == 999935495\n assert candidate(s = \"*0*12*\") == 492\n assert candidate(s = \"1*9*\") == 171\n assert candidate(s = \"2626262626262626262626262626\") == 16384\n assert candidate(s = \"00000000000000000000\") == 0\n assert candidate(s = \"123123123123123123\") == 729\n assert candidate(s = \"*0123456789*\") == 54\n assert candidate(s = \"123456789012345678901234567890\") == 0\n assert candidate(s = \"111111111111111111111111111111\") == 1346269\n assert candidate(s = \"*0*0*0*0*0*0*0*0*0*\") == 4608\n assert candidate(s = \"12*12*12*12*12*12*\") == 311447616\n assert candidate(s = \"***\") == 999\n assert candidate(s = \"*12*21*3*\") == 75834\n assert candidate(s = \"262*1*\") == 576\n assert candidate(s = \"*26*\") == 180\n assert candidate(s = \"1234567890*1234567890\") == 0\n assert candidate(s = \"*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*\") == 824428070\n assert candidate(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*1*1*\") == 443646845\n assert candidate(s = \"262626262626262626\") == 512\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*\") == 13494534\n assert candidate(s = \"21*21*21\") == 1718\n assert candidate(s = \"1*9*8*7*6*5*4*3*2*1*0*\") == 626384391\n assert candidate(s = \"1*1*1*1*1*1*1*1*1*1*1*\") == 237806079\n assert candidate(s = \"1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*1*\") == 276158816\n assert candidate(s = \"*20*\") == 81\n assert candidate(s = \"11111*11111*11111*11111*\") == 238835889\n assert candidate(s = \"*9*2\") == 110\n assert candidate(s = \"11*11*11*11*11*11*11*11*11*\") == 184486483\n assert candidate(s = \"*12*\") == 246\n assert candidate(s = \"2*6*2*\") == 2601\n assert candidate(s = \"*30*\") == 0\n assert candidate(s = \"1*9*3*\") == 1881\n assert candidate(s = \"**2*2*2*2*2*2*2*2*\") == 416857892\n assert candidate(s = \"*12*34*56*78*90\") == 0\n assert candidate(s = \"27272727272727272727\") == 1\n assert candidate(s = \"**1**\") == 18720\n assert candidate(s = \"10101010101010101010\") == 1\n assert candidate(s = \"1*2*\") == 288\n assert candidate(s = \"26*12\") == 40\n assert candidate(s = \"*9*8*7*6*5*4*3*2*1*0*9*8*7*6*5*4*3*2*1*0*\") == 185347464\n assert candidate(s = \"*1*1*1*\") == 65520\n assert candidate(s = \"*28*\") == 99\n assert candidate(s = \"22222222222222222222\") == 10946\n assert candidate(s = \"*2*2*2*2*2*2*2*2*2*2*\") == 757514735\n assert candidate(s = \"*26*26*26*26*26*26*26*26*26*\") == 999967751\n assert candidate(s = \"27*\") == 9\n", "comparison": "exact"}, "public_tests": ["\"*\"", "\"1*\"", "\"2*\""], "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:54:56+00:00", "tests_total": 157, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int numDecodings(string s) {", "container": "Solution", "callable": "numDecodings", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 640, "task_id": "solve-the-equation", "difficulty": "Medium", "problem_description": "Solve a given equation and return the value of 'x' in the form of a string \"x=#value\". The equation contains only '+', '-' operation, the variable 'x' and its coefficient. You should return \"No solution\" if there is no solution for the equation, or \"Infinite solutions\" if there are infinite solutions for the equation.\n\nIf there is exactly one solution for the equation, we ensure that the value of 'x' is an integer.\n\nExample 1:\n\nInput: equation = \"x+5-3+x=6+x-2\"\nOutput: \"x=2\"\n\nExample 2:\n\nInput: equation = \"x=x\"\nOutput: \"Infinite solutions\"\n\nExample 3:\n\nInput: equation = \"2x=x\"\nOutput: \"x=0\"\n\nConstraints:\n\n- 3 <= equation.length <= 1000\n- equation has exactly one '='.\n- equation consists of integers with an absolute value in the range [0, 100] without any leading zeros, and the variable 'x'.\n- The input is generated that if there is a single solution, it will be an integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(equation = \"-x=x\") == \"x=0\"\n assert candidate(equation = \"0x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"x+3x=4x\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+3=3x+1\") == \"x=2\"\n assert candidate(equation = \"3x+2=5x-4\") == \"x=3\"\n assert candidate(equation = \"2x-2=2x+2\") == \"No solution\"\n assert candidate(equation = \"3x+2=2x+3\") == \"x=1\"\n assert candidate(equation = \"x=x\") == \"Infinite solutions\"\n assert candidate(equation = \"2x-2x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"-x=-1\") == \"x=1\"\n assert candidate(equation = \"2x+3x-6x=x+2\") == \"x=-1\"\n assert candidate(equation = \"x=2x\") == \"x=0\"\n assert candidate(equation = \"x+3x=3x+1\") == \"x=1\"\n assert candidate(equation = \"x+3x=2x+2x\") == \"Infinite solutions\"\n assert candidate(equation = \"3x=3x\") == \"Infinite solutions\"\n assert candidate(equation = \"4x+3=4x+3\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+3=5\") == \"x=1\"\n assert candidate(equation = \"x+5-3+x=6+x-2\") == \"x=2\"\n assert candidate(equation = \"3x+1=2x+2\") == \"x=1\"\n assert candidate(equation = \"0=0x+0\") == \"Infinite solutions\"\n assert candidate(equation = \"3x+5-2=7x-3\") == \"x=1\"\n assert candidate(equation = \"2x+3=2x+3\") == \"Infinite solutions\"\n assert candidate(equation = \"4x=4x\") == \"Infinite solutions\"\n assert candidate(equation = \"x+x+x+x=4\") == \"x=1\"\n assert candidate(equation = \"x+2=2+x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-1=x+1\") == \"No solution\"\n assert candidate(equation = \"x-1=0\") == \"x=1\"\n assert candidate(equation = \"x+2x+3x=6\") == \"x=1\"\n assert candidate(equation = \"0=0\") == \"Infinite solutions\"\n assert candidate(equation = \"-x=-2x+1\") == \"x=1\"\n assert candidate(equation = \"5-3x=2x+1\") == \"x=0\"\n assert candidate(equation = \"3x+3=3\") == \"x=0\"\n assert candidate(equation = \"3x+2=5x-8\") == \"x=5\"\n assert candidate(equation = \"1=0\") == \"No solution\"\n assert candidate(equation = \"1=1\") == \"Infinite solutions\"\n assert candidate(equation = \"-2x=-2\") == \"x=1\"\n assert candidate(equation = \"5=5x\") == \"x=1\"\n assert candidate(equation = \"2x+3x-5x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"2x=x\") == \"x=0\"\n assert candidate(equation = \"x=0\") == \"x=0\"\n assert candidate(equation = \"x=-x\") == \"x=0\"\n assert candidate(equation = \"1=2\") == \"No solution\"\n assert candidate(equation = \"2x+3=3x+2\") == \"x=1\"\n assert candidate(equation = \"x+0=0x\") == \"x=0\"\n assert candidate(equation = \"-x+2=3x-1\") == \"x=0\"\n assert candidate(equation = \"5x-2x+1=3x-2+4\") == \"No solution\"\n assert candidate(equation = \"-x+5=-2x+10\") == \"x=5\"\n assert candidate(equation = \"7x+3=3x+7\") == \"x=1\"\n assert candidate(equation = \"5x=10x+5\") == \"x=-1\"\n assert candidate(equation = \"-2x+3=4-3x\") == \"x=1\"\n assert candidate(equation = \"x+x+x=3x\") == \"Infinite solutions\"\n assert candidate(equation = \"0=3x\") == \"x=0\"\n assert candidate(equation = \"2x-3=5x+7\") == \"x=-4\"\n assert candidate(equation = \"-3x=-3x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-1=2x-3\") == \"x=2\"\n assert candidate(equation = \"x+3=3x+1\") == \"x=1\"\n assert candidate(equation = \"0x+1=0x+2\") == \"No solution\"\n assert candidate(equation = \"x-2x+3x-4x+5x=6x-7x+8x-9x\") == \"x=0\"\n assert candidate(equation = \"-x+2x-3=4-5x\") == \"x=1\"\n assert candidate(equation = \"7x-3=3x-7\") == \"x=-1\"\n assert candidate(equation = \"x-5x+2=7-3x\") == \"x=-5\"\n assert candidate(equation = \"-100x+50=50x-100\") == \"x=1\"\n assert candidate(equation = \"-1x-2x-3x-4x-5x=-15x\") == \"Infinite solutions\"\n assert candidate(equation = \"-3x+2x-5=4x-3+2x\") == \"x=-1\"\n assert candidate(equation = \"-x=-x+0\") == \"Infinite solutions\"\n assert candidate(equation = \"x+5=5x-5-3x\") == \"x=10\"\n assert candidate(equation = \"0=x\") == \"x=0\"\n assert candidate(equation = \"x-2x+3x=4\") == \"x=2\"\n assert candidate(equation = \"-x-2x-3x=-6\") == \"x=1\"\n assert candidate(equation = \"-x+3=5-2x\") == \"x=2\"\n assert candidate(equation = \"x-1x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+3-4x=5x-6+7x\") == \"x=0\"\n assert candidate(equation = \"2x+2x+2x+2x+2x=10\") == \"x=1\"\n assert candidate(equation = \"-3x+5=2x-10\") == \"x=3\"\n assert candidate(equation = \"-10x+20-30x+40=50x-60+70x-80\") == \"x=1\"\n assert candidate(equation = \"7x-2x-5=5-3x\") == \"x=1\"\n assert candidate(equation = \"10x-9x+8x-7x+6x-5x+4x-3x+2x-x=0\") == \"x=0\"\n assert candidate(equation = \"0x+0=0\") == \"Infinite solutions\"\n assert candidate(equation = \"x=0x\") == \"x=0\"\n assert candidate(equation = \"x+1=1-x\") == \"x=0\"\n assert candidate(equation = \"x-2x+3x-4x+5x=0\") == \"x=0\"\n assert candidate(equation = \"2x+2x+2x=6x\") == \"Infinite solutions\"\n assert candidate(equation = \"-3x+9x=9x-3x\") == \"Infinite solutions\"\n assert candidate(equation = \"10x+5=10x+5\") == \"Infinite solutions\"\n assert candidate(equation = \"x-10000=10000x-10000\") == \"x=0\"\n assert candidate(equation = \"-3x+2=7x-8\") == \"x=1\"\n assert candidate(equation = \"100x-50=50x+100\") == \"x=3\"\n assert candidate(equation = \"5x+10=5x+10\") == \"Infinite solutions\"\n assert candidate(equation = \"20x-15=15-20x\") == \"x=0\"\n assert candidate(equation = \"10x-5=5x+10\") == \"x=3\"\n assert candidate(equation = \"1x+2x+3x+4x+5x=0\") == \"x=0\"\n assert candidate(equation = \"2x+3x+4x=9x\") == \"Infinite solutions\"\n assert candidate(equation = \"2x=4x-2x\") == \"Infinite solutions\"\n assert candidate(equation = \"-2x+3x-4x=-3x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-2x+3x-4x+5x-6x+7x-8x+9x=9x-8x+7x-6x+5x-4x+3x-2x+x\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+3-4x=5x-2+3x\") == \"x=0\"\n assert candidate(equation = \"5=5\") == \"Infinite solutions\"\n assert candidate(equation = \"x=1x\") == \"Infinite solutions\"\n assert candidate(equation = \"5x+10=3x+20\") == \"x=5\"\n assert candidate(equation = \"-2x+4x-3=5x-4+2x\") == \"x=0\"\n assert candidate(equation = \"x+2x+3x+4x+5x=6x+5x+4x+3x+2x+x\") == \"x=0\"\n assert candidate(equation = \"2x+3x-5=4x-2\") == \"x=3\"\n assert candidate(equation = \"2x-3x+4x-5x+6x=6x-5x+4x-3x+2x\") == \"Infinite solutions\"\n assert candidate(equation = \"-1000x+1000=1000x-1000\") == \"x=1\"\n assert candidate(equation = \"x+x+x+x+x+x+x+x+x+x=10\") == \"x=1\"\n assert candidate(equation = \"x+2x+3x=6x\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+5x=5+2x-2x\") == \"x=0\"\n assert candidate(equation = \"x+0=0+x\") == \"Infinite solutions\"\n assert candidate(equation = \"-100x+100=100x-100\") == \"x=1\"\n assert candidate(equation = \"2x+4x-5=3x-2x+4\") == \"x=1\"\n assert candidate(equation = \"-x=-2x\") == \"x=0\"\n assert candidate(equation = \"10x-20=5x-5+3x\") == \"x=7\"\n assert candidate(equation = \"x+x+x+x+x+x=x+x+x+x+x\") == \"x=0\"\n assert candidate(equation = \"x+5=2x+3\") == \"x=2\"\n assert candidate(equation = \"1=x\") == \"x=1\"\n assert candidate(equation = \"2x+3x-4x=5x+6x-7x\") == \"x=0\"\n assert candidate(equation = \"5x-5=5x+5\") == \"No solution\"\n assert candidate(equation = \"3x+5=2x+10-3\") == \"x=2\"\n assert candidate(equation = \"100x-100=100x-100\") == \"Infinite solutions\"\n assert candidate(equation = \"-x-x-x-x-x=-5x\") == \"Infinite solutions\"\n assert candidate(equation = \"10x+20x+30x=30x+20x+10x\") == \"Infinite solutions\"\n assert candidate(equation = \"10x+20-30x+40=50x-60+70x-80\") == \"x=1\"\n assert candidate(equation = \"2x+3-4x=5x-2x+3\") == \"x=0\"\n assert candidate(equation = \"10x+5-2x=8x-3+5x\") == \"x=1\"\n assert candidate(equation = \"x+1000=1000\") == \"x=0\"\n assert candidate(equation = \"-2x-3+5x=3x-2+4\") == \"No solution\"\n assert candidate(equation = \"-3x+2x+5=4x-3x+2\") == \"x=1\"\n assert candidate(equation = \"-2x-3=-5x+2\") == \"x=1\"\n assert candidate(equation = \"-3x+7=7-3x\") == \"Infinite solutions\"\n assert candidate(equation = \"-3x+4x-5x+6x=7x-8x+9x\") == \"x=0\"\n assert candidate(equation = \"-x+2x-3x+4x-5x=5x-4x+3x-2x+x\") == \"x=0\"\n assert candidate(equation = \"100x-99x+98x=100\") == \"x=1\"\n assert candidate(equation = \"10x-5x+2x=7x\") == \"Infinite solutions\"\n assert candidate(equation = \"-5x+10=2x-8+3x\") == \"x=1\"\n assert candidate(equation = \"-5x+10=15x-20\") == \"x=1\"\n assert candidate(equation = \"-x-2x-3x=-6x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-2x+3x-4x+5x=x\") == \"x=0\"\n assert candidate(equation = \"0x+1=0\") == \"No solution\"\n assert candidate(equation = \"10x-20x=5x-5x+3x\") == \"x=0\"\n assert candidate(equation = \"2x-4x+5=3x-2x+4\") == \"x=0\"\n assert candidate(equation = \"-x=-x\") == \"Infinite solutions\"\n assert candidate(equation = \"6x+7x+8x=11x+12x\") == \"x=0\"\n assert candidate(equation = \"x-2x+3x-4x=0x\") == \"x=0\"\n assert candidate(equation = \"100x-200=200x-100\") == \"x=-1\"\n assert candidate(equation = \"5x-5=5x-5\") == \"Infinite solutions\"\n assert candidate(equation = \"x+x+x+x+x=5x\") == \"Infinite solutions\"\n assert candidate(equation = \"x+x+x+x+x=5x+5x-5x\") == \"Infinite solutions\"\n assert candidate(equation = \"5x-3x+2=3x-2x+5\") == \"x=3\"\n assert candidate(equation = \"x-1=-1+x\") == \"Infinite solutions\"\n assert candidate(equation = \"10=10\") == \"Infinite solutions\"\n assert candidate(equation = \"10x+20+30x-40=50x-60+70x-80\") == \"x=1\"\n assert candidate(equation = \"2x-3x+4x=3x-2x+x\") == \"x=0\"\n assert candidate(equation = \"2x=4x-2\") == \"x=1\"\n assert candidate(equation = \"2x-3x+5=5x-10\") == \"x=2\"\n assert candidate(equation = \"-x+2x-3x+4x=5-6+7-8\") == \"x=-1\"\n assert candidate(equation = \"10x+20=20x-10\") == \"x=3\"\n assert candidate(equation = \"5x-3x+2x=4x\") == \"Infinite solutions\"\n assert candidate(equation = \"-1x-2x-3x-4x-5x=0\") == \"x=0\"\n assert candidate(equation = \"2x+5=5+2x\") == \"Infinite solutions\"\n assert candidate(equation = \"3x-2x+5=2x-3x+4\") == \"x=-1\"\n assert candidate(equation = \"3x+5-2x=4x-1+2\") == \"x=1\"\n assert candidate(equation = \"-x+2-3x=4-5x+6\") == \"x=8\"\n assert candidate(equation = \"3x-3=6-3x\") == \"x=1\"\n assert candidate(equation = \"-3x+7x=7-3x+3x\") == \"x=1\"\n assert candidate(equation = \"10x+20=30x-40\") == \"x=3\"\n assert candidate(equation = \"3x-2x+4=2x-4x+3\") == \"x=-1\"\n assert candidate(equation = \"10x+20x+30x+40x+50x=150x\") == \"Infinite solutions\"\n assert candidate(equation = \"10x-10=10x-10\") == \"Infinite solutions\"\n assert candidate(equation = \"-3x+2x+4=5x-2x+3\") == \"x=0\"\n assert candidate(equation = \"x+1=1+x\") == \"Infinite solutions\"\n assert candidate(equation = \"3x+3x+3x=3x+3x+3x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-x+x-x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"100x-50=50x+50\") == \"x=2\"\n assert candidate(equation = \"x+2x+3x+4x+5x=15x\") == \"Infinite solutions\"\n assert candidate(equation = \"-10x+5x-2x=-7x\") == \"Infinite solutions\"\n assert candidate(equation = \"x+2x+3x+4x+5x=5+4+3+2+1\") == \"x=1\"\n assert candidate(equation = \"5x+3x-2=4x-3x+5\") == \"x=1\"\n assert candidate(equation = \"1x+2x+3x+4x+5x=15\") == \"x=1\"\n assert candidate(equation = \"3x-2x+4x=5x-2x+2\") == \"x=1\"\n assert candidate(equation = \"0x+5=0x+5\") == \"Infinite solutions\"\n assert candidate(equation = \"x+2-3x+4=5x-6+7\") == \"x=0\"\n assert candidate(equation = \"-5x+10x=2x-8x+3x\") == \"x=0\"\n assert candidate(equation = \"1000x-500=500x+500\") == \"x=2\"\n assert candidate(equation = \"x+2+3x+4=4x+5-6x\") == \"x=-1\"\n assert candidate(equation = \"0x+5x=5x\") == \"Infinite solutions\"\n assert candidate(equation = \"3x+1=2x-2x+x+1\") == \"x=0\"\n assert candidate(equation = \"10x-5=15-5x\") == \"x=1\"\n assert candidate(equation = \"-2=-1\") == \"No solution\"\n assert candidate(equation = \"15x+20=20x-10\") == \"x=6\"\n assert candidate(equation = \"-1x-2x-3x-4x-5x=-15\") == \"x=1\"\n assert candidate(equation = \"x-2x+3x-4x+5x=6x-7x+8x\") == \"x=0\"\n assert candidate(equation = \"-2x+5=5-2x\") == \"Infinite solutions\"\n assert candidate(equation = \"x+2x-3x=0\") == \"Infinite solutions\"\n assert candidate(equation = \"2x+3x-5=7x-10\") == \"x=2\"\n assert candidate(equation = \"-3x+9=9-3x\") == \"Infinite solutions\"\n assert candidate(equation = \"12x-4x+5=8x+3\") == \"No solution\"\n assert candidate(equation = \"0x+5=5\") == \"Infinite solutions\"\n assert candidate(equation = \"-x+3x-4=2x-5+3x\") == \"x=0\"\n assert candidate(equation = \"5x-3x+2=2x-3x+5\") == \"x=1\"\n assert candidate(equation = \"x+1=2x-1\") == \"x=2\"\n assert candidate(equation = \"-5x+10=-10+5x\") == \"x=2\"\n assert candidate(equation = \"x-2+3x=4-2x+6x\") == \"No solution\"\n assert candidate(equation = \"x+2x+3x+4x+5x=5x+5x-5x+5x\") == \"x=0\"\n assert candidate(equation = \"3x+5x-7x=10\") == \"x=10\"\n assert candidate(equation = \"100x-50x+25x=75x\") == \"Infinite solutions\"\n assert candidate(equation = \"-5x+10=5x-10\") == \"x=2\"\n assert candidate(equation = \"5x+5x+5x+5x+5x=25\") == \"x=1\"\n assert candidate(equation = \"3x=0\") == \"x=0\"\n assert candidate(equation = \"x-0=0\") == \"x=0\"\n assert candidate(equation = \"-x+2=3x-4\") == \"x=1\"\n assert candidate(equation = \"-x+2x-3x=-4\") == \"x=2\"\n assert candidate(equation = \"-x+2x-3x+4x-5x+6x=6x-5x+4x-3x+2x-1x\") == \"Infinite solutions\"\n assert candidate(equation = \"x+2x+3x-4x+5x=5x+5x-5x\") == \"x=0\"\n assert candidate(equation = \"x-2x+3x-4x+5x-6x=6x-5x+4x-3x+2x-x\") == \"x=0\"\n assert candidate(equation = \"x=1\") == \"x=1\"\n assert candidate(equation = \"3x-2x+5=2x-4x+3\") == \"x=-1\"\n assert candidate(equation = \"-5x+2x+3=4x-3x+5\") == \"x=-1\"\n assert candidate(equation = \"-x+2x-3=5-2x\") == \"x=2\"\n assert candidate(equation = \"5-2x=3x+6\") == \"x=-1\"\n assert candidate(equation = \"x+3=2x+2\") == \"x=1\"\n assert candidate(equation = \"-x+2x-3x=4x-5x+6x\") == \"x=0\"\n assert candidate(equation = \"5x-5-3x+2=2x+3-4x\") == \"x=1\"\n assert candidate(equation = \"x=2x-3x+4x-5x+6x\") == \"x=0\"\n assert candidate(equation = \"-x+1=2x+3\") == \"x=-1\"\n assert candidate(equation = \"5x+7=3x-2\") == \"x=-5\"\n assert candidate(equation = \"x+x+x+x+x=x+x+x+x\") == \"x=0\"\n assert candidate(equation = \"10x+5-3x=7x+2-5x\") == \"x=-1\"\n assert candidate(equation = \"10x-5+3x=2x-4+5x\") == \"x=0\"\n assert candidate(equation = \"-10x+20=10x-20\") == \"x=2\"\n assert candidate(equation = \"x+3=3x+3\") == \"x=0\"\n assert candidate(equation = \"-2x+5=10-3x\") == \"x=5\"\n assert candidate(equation = \"2x+3x-5=4x+2\") == \"x=7\"\n assert candidate(equation = \"x+2x+3x+4x+5x=5x+4x+3x+2x+x\") == \"Infinite solutions\"\n assert candidate(equation = \"x-2x+3x-4x=0\") == \"x=0\"\n assert candidate(equation = \"5x-2+3x=4x-5+2x\") == \"x=-2\"\n assert candidate(equation = \"5-5x=5-5x\") == \"Infinite solutions\"\n assert candidate(equation = \"-5x+10-3x=2x-3+4x\") == \"x=0\"\n assert candidate(equation = \"6x+4-2x=3x+1\") == \"x=-3\"\n assert candidate(equation = \"-1=-1\") == \"Infinite solutions\"\n assert candidate(equation = \"100x-100=100x-101\") == \"No solution\"\n assert candidate(equation = \"2x-3=5x+4\") == \"x=-3\"\n assert candidate(equation = \"20x-10x+5x=5x+5x+5x\") == \"Infinite solutions\"\n assert candidate(equation = \"10x-5=2x-3+8x\") == \"No solution\"\n assert candidate(equation = \"x=2x-3+4x-5\") == \"x=1\"\n assert candidate(equation = \"3x+4-5x+6=2x-8+9\") == \"x=2\"\n assert candidate(equation = \"x-5+2x=3x-5\") == \"Infinite solutions\"\n assert candidate(equation = \"x-2x+3x-4x+5x-6x=6x-5x+4x-3x+2x-1x\") == \"x=0\"\n assert candidate(equation = \"x+5x=5x+5-3x\") == \"x=1\"\n assert candidate(equation = \"x+2-3x+4-5x+6=6x-5+4x-3+2x-1\") == \"x=1\"\n assert candidate(equation = \"5x-10+2x=7x-20+3x\") == \"x=3\"\n assert candidate(equation = \"3x-2x+4x=5x-3x+2\") == \"x=0\"\n assert candidate(equation = \"-2x+3x-4=5x-6x+7\") == \"x=5\"\n assert candidate(equation = \"x+2x+3x=4x+5x\") == \"x=0\"\n", "comparison": "exact"}, "public_tests": ["\"x+5-3+x=6+x-2\"", "\"x=x\"", "\"2x=x\""], "hints": [], "metadata": {"canonical_parameter_names": ["equation"], "leetcode_dataset_entry_point": "Solution().solveEquation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:54:58+00:00", "tests_total": 253, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation", "linear-algebra"]}, "language": "cpp", "interface": {"raw_signature": "string solveEquation(string equation) {", "container": "Solution", "callable": "solveEquation", "parameters": [{"name": "equation", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 643, "task_id": "maximum-average-subarray-i", "difficulty": "Easy", "problem_description": "You are given an integer array nums consisting of n elements, and an integer k.\n\nFind a contiguous subarray whose length is equal to k that has the maximum average value and return this value. Any answer with a calculation error less than 10^-5 will be accepted.\n\nExample 1:\n\nInput: nums = [1,12,-5,-6,50,3], k = 4\nOutput: 12.75000\nExplanation: Maximum average is (12 - 5 - 6 + 50) / 4 = 51 / 4 = 12.75\n\nExample 2:\n\nInput: nums = [5], k = 1\nOutput: 5.00000\n\nConstraints:\n\n- n == nums.length\n- 1 <= k <= n <= 10^5\n- -10^4 <= nums[i] <= 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(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=5), 8.0)\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0], k=5), 0.0)\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5], k=2), 4.5)\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=3), 9.0)\n assert answers_match(candidate(nums=[0, 1, 0, 1, 0, 1, 0, 1, 0, 1], k=2), 0.5)\n assert answers_match(candidate(nums=[10000, -10000, 10000, -10000, 10000], k=5), 2000.0)\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=5), -3.0)\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=3), -2.0)\n assert answers_match(candidate(nums=[1, 12, -5, -6, 50, 3], k=4), 12.75)\n assert answers_match(candidate(nums=[5], k=1), 5.0)\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], k=2), 0.0)\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5], k=3), -2.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], k=10), 0.5)\n assert answers_match(candidate(nums=[-10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000], k=20), -10000.0)\n assert answers_match(candidate(nums=[100, -100, 200, -200, 300, -300, 400, -400, 500, -500], k=4), 50.0)\n assert answers_match(candidate(nums=[100, -50, 200, -300, 400, -500, 600, -700, 800, -900], k=4), 62.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=20), 1.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], k=19), 11.0)\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500], k=12), 950.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=1), 1.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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=10), 1.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], k=5), 8.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), 30.0)\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], k=3), 0.6666666666666666)\n assert answers_match(candidate(nums=[-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991], k=5), -9993.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=1), 1.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=15), 18.0)\n assert answers_match(candidate(nums=[1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 0, -100, -200, -300, -400], k=7), 700.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=7), 22.0)\n assert answers_match(candidate(nums=[10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000], k=5), 2000.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=5), 1.0)\n assert answers_match(candidate(nums=[-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991], k=3), -9992.0)\n assert answers_match(candidate(nums=[5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75], k=10), 52.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], k=15), 23.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], k=1), 20.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], k=7), 2.4285714285714284)\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), 0.5)\n assert answers_match(candidate(nums=[-9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990], k=4), -9991.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=15), -1.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], k=20), 105.0)\n assert answers_match(candidate(nums=[5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000], k=12), 5000.0)\n assert answers_match(candidate(nums=[5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000], k=10), 5000.0)\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500], k=1), 1500.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], k=15), -8.0)\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], k=7), 12.0)\n assert answers_match(candidate(nums=[-10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000], k=3), 3333.3333333333335)\n assert answers_match(candidate(nums=[1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15], k=6), 0.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=2), 10.0)\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100], k=10), 55.0)\n assert answers_match(candidate(nums=[10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000], k=20), 10000.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], k=1), 20.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=20), 1.0)\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], k=10), 1550.0)\n assert answers_match(candidate(nums=[10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981], k=15), 9993.0)\n assert answers_match(candidate(nums=[100, -100, 50, -50, 25, -25, 125, -125, 625, -625], k=4), 150.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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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)\n assert answers_match(candidate(nums=[5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10, -20, 30, 40, 50, 60, 70, 80, 90, 100], k=12), 51.166666666666664)\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], k=20), 10.5)\n assert answers_match(candidate(nums=[-10000, -9000, -8000, -7000, -6000, -5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000], k=15), -3000.0)\n assert answers_match(candidate(nums=[-10000, -9000, -8000, -7000, -6000, -5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000], k=5), 7000.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], k=10), -5.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, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], k=5), 0.2)\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15], k=5), -3.0)\n assert answers_match(candidate(nums=[5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000], k=15), 5000.0)\n assert answers_match(candidate(nums=[10000, -9999, 9999, -9998, 9998, -9997, 9997, -9996, 9996, -9995], k=5), 2000.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], k=7), 17.0)\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, 0], k=6), 0.0)\n assert answers_match(candidate(nums=[5, 8, 10, 12, 15, 18, 20, 22, 25, 28, 30, 32, 35, 38, 40, 42, 45, 48, 50, 52], k=15), 35.0)\n assert answers_match(candidate(nums=[5, 3, 8, 4, 2, 9, 1, 6, 7, 0, 11, 13, 12, 14, 15, 16, 17, 18, 19, 20], k=5), 18.0)\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], k=10), 550.0)\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], k=7), 12.0)\n assert answers_match(candidate(nums=[-9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990], k=5), -9992.0)\n assert answers_match(candidate(nums=[10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000], k=3), 3333.3333333333335)\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=10), 0.0)\n assert answers_match(candidate(nums=[10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000], k=3), 3333.3333333333335)\n assert answers_match(candidate(nums=[1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000], k=3), 9000.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=15), 1.0)\n assert answers_match(candidate(nums=[10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 0, -1000, -2000, -3000, -4000], k=8), 6500.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], k=20), 10.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=10), 15.5)\n assert answers_match(candidate(nums=[-10, 20, -30, 40, -50, 60, -70, 80, -90, 100, -110], k=5), 16.0)\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=9), 5.0)\n assert answers_match(candidate(nums=[5, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=5), 2.4)\n assert answers_match(candidate(nums=[5, -4, 3, -2, 1, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15], k=10), 0.5)\n assert answers_match(candidate(nums=[9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999, -9999, 9999], k=11), 909.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], k=10), 15.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, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], k=25), 38.0)\n assert answers_match(candidate(nums=[-5, 15, -25, 35, -45, 55, -65, 75, -85, 95, -105, 115, -125, 135, -145], k=6), 5.0)\n assert answers_match(candidate(nums=[10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991], k=3), 9999.0)\n assert answers_match(candidate(nums=[5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000], k=5), 5000.0)\n assert answers_match(candidate(nums=[1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], k=8), 0.0)\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)\n assert answers_match(candidate(nums=[0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000], k=11), 1500.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), 0.3333333333333333)\n", "comparison": "float"}, "public_tests": ["[1,12,-5,-6,50,3]\n4", "[5]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().findMaxAverage", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:01+00:00", "tests_total": 95, "tests_dropped": 1, "flags": ["decimal_answer"], "topic_tags": ["array", "sliding-window"]}, "language": "cpp", "interface": {"raw_signature": "double findMaxAverage(vector& nums, int k) {", "container": "Solution", "callable": "findMaxAverage", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "double", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 645, "task_id": "set-mismatch", "difficulty": "Easy", "problem_description": "You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another number.\n\nYou are given an integer array nums representing the data status of this set after the error.\n\nFind the number that occurs twice and the number that is missing and return them in the form of an array.\n\nExample 1:\n\nInput: nums = [1,2,2,4]\nOutput: [2,3]\n\nExample 2:\n\nInput: nums = [1,1]\nOutput: [1,2]\n\nConstraints:\n\n- 2 <= nums.length <= 10^4\n- 1 <= nums[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [3, 1, 2, 5, 3]) == [3, 4]\n assert candidate(nums = [10, 2, 8, 2, 5, 3, 9, 1, 4, 7]) == [2, 6]\n assert candidate(nums = [9, 1, 8, 5, 6, 7, 9, 2, 4]) == [9, 3]\n assert candidate(nums = [1, 2, 4, 6, 6]) == [6, 2]\n assert candidate(nums = [4, 2, 2, 5, 3]) == [2, 1]\n assert candidate(nums = [5, 3, 2, 5, 1]) == [5, 4]\n assert candidate(nums = [5, 5, 3, 2, 1]) == [5, 4]\n assert candidate(nums = [8, 7, 3, 5, 3, 6, 4, 2]) == [3, 1]\n assert candidate(nums = [1, 2, 2, 4]) == [2, 3]\n assert candidate(nums = [1, 1]) == [1, 2]\n assert candidate(nums = [4, 3, 2, 7, 8, 2, 3, 1]) == [5, 11]\n assert candidate(nums = [6, 2, 3, 4, 5, 2]) == [2, 1]\n assert candidate(nums = [1, 5, 3, 2, 2]) == [2, 4]\n assert candidate(nums = [3, 3, 1, 4, 2]) == [3, 5]\n assert candidate(nums = [2, 2]) == [2, 1]\n assert candidate(nums = [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5009, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [5009, -49880]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 20, 19]) == [20, 21]\n assert candidate(nums = [1, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == [1, 2]\n assert candidate(nums = [1, 3, 4, 5, 6, 7, 8, 9, 10, 10]) == [10, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10]) == [0, 0]\n assert candidate(nums = [6, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == [6, 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, 2]) == [2, 101]\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 7, 8, 9, 10]) == [5, 6]\n assert candidate(nums = [10, 1, 2, 3, 4, 5, 6, 7, 8, 10]) == [10, 9]\n assert candidate(nums = [9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9990, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [9990, -99780]\n assert candidate(nums = [1, 3, 4, 2, 2, 5, 6, 8, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [2, 21]\n assert candidate(nums = [1, 2, 2, 4, 5, 6, 7, 8, 9, 10, 3]) == [2, 11]\n assert candidate(nums = [8, 7, 3, 5, 7, 1, 9, 2]) == [7, 1]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 2]) == [2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == [1, 10]\n assert candidate(nums = [1000, 2, 3, 4, 5, 6, 7, 8, 9, 1000]) == [1000, -989]\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10]) == [5, 11]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [5, 21]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]) == [10, 11]\n assert candidate(nums = [5, 5, 3, 2, 1, 4, 6, 7, 8, 9, 10]) == [5, 11]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5]) == [5, 11]\n assert candidate(nums = [1, 3, 4, 2, 5, 6, 7, 8, 9, 10, 10]) == [10, 11]\n assert candidate(nums = [1000, 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, 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]) == [1000, -799]\n assert candidate(nums = [3, 3, 1, 4, 5, 6, 7, 8, 9, 10, 2]) == [3, 11]\n assert candidate(nums = [10, 5, 3, 4, 5, 6, 7, 8, 9, 1]) == [5, 2]\n assert candidate(nums = [7, 3, 1, 3, 5, 6, 4, 8, 2, 9]) == [3, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9]) == [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, 1, 20, 21]) == [1, 22]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4]) == [4, 11]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 8, 10, 9]) == [8, 11]\n assert candidate(nums = [10, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2]) == [2, 11]\n assert candidate(nums = [1, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == [1, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10]) == [9, 11]\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, 20]) == [20, 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, 30]) == [30, 31]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 10]) == [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, 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, 101]\n assert candidate(nums = [10, 4, 3, 2, 7, 10, 6, 5, 8, 1]) == [10, 9]\n assert candidate(nums = [4000, 4000, 1, 2, 3, 4, 5, 6, 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, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400]) == [4000, -3197]\n assert candidate(nums = [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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 9900, 9999]) == [9999, -989799]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 10]) == [5, 11]\n assert candidate(nums = [10, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [10, 1]\n assert candidate(nums = [7, 3, 4, 1, 6, 2, 5, 5, 9, 8]) == [5, 10]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 20]) == [45, 135]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20]) == [30, 43]\n assert candidate(nums = [9999, 10000, 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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 9900, 9900]) == [9900, -999697]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 7, 9, 10, 8]) == [7, 11]\n assert candidate(nums = [6, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]) == [6, 22]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11]) == [10, 12]\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 2, 10]) == [2, 9]\n assert candidate(nums = [2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 11]\n assert candidate(nums = [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, 100, 100]) == [200, 102]\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 7, 8, 9, 10, 6]) == [5, 11]\n assert candidate(nums = [7, 3, 1, 5, 4, 6, 7]) == [7, 2]\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, 9949, 9948, 9947, 9946, 9945, 9944, 9943, 9942, 9941, 9940, 9939, 9938, 9937, 9936, 9935, 9934, 9933, 9932, 9931, 9930, 9929, 9928, 9927, 9926, 9925, 9924, 9923, 9922, 9921, 9920, 9919, 9918, 9917, 9916, 9915, 9914, 9913, 9912, 9911, 9910, 9909, 9908, 9907, 9906, 9905, 9904, 9903, 9902, 9901, 9900, 9899, 9898, 9897, 9896, 9895, 9894, 9893, 9892, 9891, 9890, 9889, 9888, 9887, 9886, 9885, 9884, 9883, 9882, 9881, 9880, 9879, 9878, 9877, 9876, 9875, 9874, 9873, 9872, 9871, 9870, 9869, 9868, 9867, 9866, 9865, 9864, 9863, 9862, 9861, 9860, 9859, 9858, 9857, 9856, 9855, 9854, 9853, 9852, 9851, 9850, 9849, 9848, 9847, 9846, 9845, 9844, 9843, 9842, 9841, 9840, 9839, 9838, 9837, 9836, 9835, 9834, 9833, 9832, 9831, 9830, 9829, 9828, 9827, 9826, 9825, 9824, 9823, 9822, 9821, 9820, 9819, 9818, 9817, 9816, 9815, 9814, 9813, 9812, 9811, 9810, 9809, 9808, 9807, 9806, 9805, 9804, 9803, 9802, 9801, 9800, 9799, 9798, 9797, 9796, 9795, 9794, 9793, 9792, 9791, 9790, 9789, 9788, 9787, 9786, 9785, 9784, 9783, 9782, 9781, 9780, 9779, 9778, 9777, 9776, 9775, 9774, 9773, 9772, 9771, 9770, 9769, 9768, 9767, 9766, 9765, 9764, 9763, 9762, 9761, 9760, 9759, 9758, 9757, 9756, 9755, 9754, 9753, 9752, 9751, 9750, 9749, 9748, 9747, 9746, 9745, 9744, 9743, 9742, 9741, 9740, 9739, 9738, 9737, 9736, 9735, 9734, 9733, 9732, 9731, 9730, 9729, 9728, 9727, 9726, 9725, 9724, 9723, 9722, 9721, 9720, 9719, 9718, 9717, 9716, 9715, 9714, 9713, 9712, 9711, 9710, 9709, 9708, 9707, 9706, 9705, 9704, 9703, 9702, 9701, 9700]) == [0, -2919399]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 7, 9, 10]) == [7, 8]\n assert candidate(nums = [20, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [20, 21]\n assert candidate(nums = [10000, 9999, 9998, 9997, 9997, 9996, 9995, 9994, 9993, 9992, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [9997, -89809]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 6, 8, 9, 10, 7]) == [6, 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, 1]) == [1, 101]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9]) == [9, 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, 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, 4799, 4798, 4797, 4796, 4795, 4794, 4793, 4792, 4791, 4790, 4789, 4788, 4787, 4786, 4785, 4784, 4783, 4782, 4781, 4780, 4779, 4778, 4777, 4776, 4775, 4774, 4773, 4772, 4771, 4770, 4769, 4768, 4767, 4766, 4765, 4764, 4763, 4762, 4761, 4760, 4759, 4758, 4757, 4756, 4755, 4754, 4753, 4752, 4751, 4750, 4749, 4748, 4747, 4746, 4745, 4744, 4743, 4742, 4741, 4740, 4739, 4738, 4737, 4736, 4735, 4734, 4733, 4732, 4731, 4730, 4729, 4728, 4727, 4726, 4725, 4724, 4723, 4722, 4721, 4720, 4719, 4718, 4717, 4716, 4715, 4714, 4713, 4712, 4711, 4710, 4709, 4708, 4707, 4706, 4705, 4704, 4703, 4702, 4701, 4700]) == [0, -1414399]\n assert candidate(nums = [10, 2, 5, 3, 7, 8, 8, 1, 4, 6]) == [8, 9]\n assert candidate(nums = [1, 2, 2, 2, 5, 6, 7, 8, 9, 10]) == [4, 7]\n assert candidate(nums = [6, 3, 5, 4, 1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 5]) == [5, 20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 12]) == [0, -2]\n assert candidate(nums = [10000, 2, 3, 4, 5, 6, 7, 8, 9, 10000]) == [10000, -9989]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 11]) == [11, 10]\n assert candidate(nums = [8, 1, 5, 3, 4, 2, 8, 6, 7]) == [8, 9]\n assert candidate(nums = [100, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 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, -79]\n assert candidate(nums = [2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 11]\n assert candidate(nums = [10, 2, 5, 3, 7, 8, 8, 1, 4, 6, 9]) == [8, 11]\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]) == [0, -99]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3]) == [4, 23]\n", "comparison": "exact"}, "public_tests": ["[1,2,2,4]", "[1,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findErrorNums", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:05+00:00", "tests_total": 89, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "bit-manipulation", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "vector findErrorNums(vector& nums) {", "container": "Solution", "callable": "findErrorNums", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 646, "task_id": "maximum-length-of-pair-chain", "difficulty": "Medium", "problem_description": "You are given an array of n pairs pairs where pairs[i] = [left_i, right_i] and left_i < right_i.\n\nA pair p2 = [c, d] follows a pair p1 = [a, b] if b < c. A chain of pairs can be formed in this fashion.\n\nReturn the length longest chain which can be formed.\n\nYou do not need to use up all the given intervals. You can select pairs in any order.\n\nExample 1:\n\nInput: pairs = [[1,2],[2,3],[3,4]]\nOutput: 2\nExplanation: The longest chain is [1,2] -> [3,4].\n\nExample 2:\n\nInput: pairs = [[1,2],[7,8],[4,5]]\nOutput: 3\nExplanation: The longest chain is [1,2] -> [4,5] -> [7,8].\n\nConstraints:\n\n- n == pairs.length\n- 1 <= n <= 1000\n- -1000 <= left_i < right_i <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(pairs = [[1, 20], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]]) == 5\n assert candidate(pairs = [[-10, -5], [-3, -1], [0, 2], [5, 6]]) == 4\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == 5\n assert candidate(pairs = [[1, 5], [2, 3], [4, 6], [5, 7], [6, 8]]) == 2\n assert candidate(pairs = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == 1\n assert candidate(pairs = [[1, 5], [2, 3], [4, 6], [7, 8]]) == 3\n assert candidate(pairs = [[-1, 0], [0, 1], [1, 2], [2, 3]]) == 2\n assert candidate(pairs = [[7, 9], [4, 5], [2, 3]]) == 3\n assert candidate(pairs = [[-1000, 1000], [-999, 999], [0, 1], [2, 3], [4, 5]]) == 3\n assert candidate(pairs = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9]]) == 4\n assert candidate(pairs = [[1, 2], [7, 8], [4, 5]]) == 3\n assert candidate(pairs = [[-10, 10], [-20, -10], [0, 5]]) == 2\n assert candidate(pairs = [[1, 2], [2, 3], [3, 4]]) == 2\n assert candidate(pairs = [[-1, 0], [0, 1], [1, 2]]) == 2\n assert candidate(pairs = [[-10, -9], [-8, -7], [-6, -5], [-4, -3], [-2, -1]]) == 5\n assert candidate(pairs = [[1, 5], [2, 3], [4, 7], [6, 8]]) == 2\n assert candidate(pairs = [[0, 3], [1, 2], [3, 4], [4, 5]]) == 2\n assert candidate(pairs = [[1, 3], [3, 5], [0, 6], [5, 7], [8, 10], [11, 13]]) == 4\n assert candidate(pairs = [[1, 5], [2, 3], [4, 6], [7, 8], [8, 10]]) == 3\n assert candidate(pairs = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7]]) == 3\n assert candidate(pairs = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 1\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [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(pairs = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == 2\n assert candidate(pairs = [[-5, -3], [-2, 0], [1, 3], [4, 6], [7, 9], [10, 12]]) == 6\n assert candidate(pairs = [[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(pairs = [[-5, -2], [-4, -1], [0, 3], [3, 7], [8, 10]]) == 3\n assert candidate(pairs = [[-1000, 1000], [-999, 999], [-998, 998], [-997, 997], [-996, 996], [-995, 995], [-994, 994], [-993, 993], [-992, 992], [-991, 991]]) == 1\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]) == 8\n assert candidate(pairs = [[-5, -1], [-2, -1], [0, 3], [1, 4], [2, 5], [3, 6], [4, 7]]) == 3\n assert candidate(pairs = [[1, 2], [1, 3], [1, 4], [1, 5], [2, 3], [2, 4], [2, 5], [3, 4], [3, 5], [4, 5]]) == 2\n assert candidate(pairs = [[1, 4], [2, 5], [3, 6], [0, 4], [1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10]]) == 2\n assert candidate(pairs = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 3\n assert candidate(pairs = [[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, 20]]) == 5\n assert candidate(pairs = [[1, 50], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 5\n assert candidate(pairs = [[1, 10], [2, 5], [3, 9], [4, 8], [5, 7], [6, 11]]) == 2\n assert candidate(pairs = [[-1, 5], [0, 6], [1, 7], [2, 8], [3, 9], [4, 10], [5, 11], [6, 12], [7, 13], [8, 14]]) == 2\n assert candidate(pairs = [[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]]) == 3\n assert candidate(pairs = [[-5, 0], [-4, -3], [-2, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8]]) == 4\n assert candidate(pairs = [[-10, -5], [-5, 0], [0, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40]]) == 5\n assert candidate(pairs = [[-5, -4], [-4, -3], [-3, -2], [-2, -1], [-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5]]) == 5\n assert candidate(pairs = [[-1, 1], [-2, 0], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 4\n assert candidate(pairs = [[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(pairs = [[1, 5], [2, 3], [4, 6], [7, 8], [8, 10], [9, 11]]) == 4\n assert candidate(pairs = [[-100, 0], [-99, 1], [-98, 2], [-97, 3], [-96, 4], [-95, 5], [-94, 6], [-93, 7], [-92, 8], [-91, 9]]) == 1\n assert candidate(pairs = [[-10, -5], [-5, 0], [0, 5], [5, 10]]) == 2\n assert candidate(pairs = [[1, 3], [2, 4], [5, 7], [6, 8], [9, 11], [10, 12], [13, 15], [14, 16], [17, 19], [18, 20]]) == 5\n assert candidate(pairs = [[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(pairs = [[-10, -5], [-8, -3], [-6, -1], [-4, 0], [-2, 2], [0, 4], [2, 6], [4, 8], [6, 10]]) == 3\n assert candidate(pairs = [[-5, -3], [-2, -1], [0, 2], [3, 5], [6, 8], [9, 11], [12, 14], [15, 17], [18, 20]]) == 9\n assert candidate(pairs = [[1, 5], [2, 6], [3, 4], [4, 7], [5, 8], [6, 9], [7, 10]]) == 2\n assert candidate(pairs = [[-10, -2], [-5, 0], [0, 5], [3, 8], [6, 11], [8, 13], [10, 15]]) == 3\n assert candidate(pairs = [[-10, -9], [-8, -7], [-6, -5], [-4, -3], [-2, -1], [0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]]) == 11\n assert candidate(pairs = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == 1\n assert candidate(pairs = [[1, 20], [2, 19], [3, 18], [4, 17], [5, 16], [6, 15], [7, 14], [8, 13], [9, 12], [10, 11]]) == 1\n assert candidate(pairs = [[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(pairs = [[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], [21, 80], [22, 79], [23, 78], [24, 77], [25, 76], [26, 75], [27, 74], [28, 73], [29, 72], [30, 71], [31, 70], [32, 69], [33, 68], [34, 67], [35, 66], [36, 65], [37, 64], [38, 63], [39, 62], [40, 61], [41, 60], [42, 59], [43, 58], [44, 57], [45, 56], [46, 55], [47, 54], [48, 53], [49, 52], [50, 51]]) == 1\n assert candidate(pairs = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 11], [7, 12]]) == 2\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == 10\n assert candidate(pairs = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13]]) == 2\n assert candidate(pairs = [[1, 10], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 4\n assert candidate(pairs = [[-100, -50], [-50, 0], [0, 50], [50, 100], [100, 150], [150, 200], [200, 250], [250, 300], [300, 350], [350, 400]]) == 5\n assert candidate(pairs = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12]]) == 4\n assert candidate(pairs = [[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\n assert candidate(pairs = [[-10, -1], [-9, -8], [-7, -6], [-5, -4], [-3, -2], [-1, 0], [1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == 10\n assert candidate(pairs = [[-10, -9], [-8, -7], [-6, -5], [-4, -3], [-2, -1], [0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]) == 10\n assert candidate(pairs = [[1, 3], [2, 5], [4, 6], [5, 8], [6, 10], [7, 12]]) == 3\n assert candidate(pairs = [[-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\n assert candidate(pairs = [[-500, -250], [-250, 0], [0, 250], [250, 500], [500, 750], [750, 1000], [-499, -249], [-249, 1], [1, 251], [251, 501]]) == 4\n assert candidate(pairs = [[-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, 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(pairs = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 5\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == 10\n assert candidate(pairs = [[1, 10], [11, 20], [21, 30], [12, 29], [13, 28], [14, 27], [15, 26], [16, 25], [17, 24], [18, 23], [19, 22], [20, 21]]) == 3\n assert candidate(pairs = [[-1000, -999], [-999, -998], [-998, -997], [-997, -996], [-996, -995], [-995, -994], [-994, -993], [-993, -992], [-992, -991], [-991, -990]]) == 5\n assert candidate(pairs = [[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, 21], [20, 22]]) == 7\n assert candidate(pairs = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [11, 20], [12, 19], [13, 18], [14, 17], [15, 16]]) == 2\n assert candidate(pairs = [[1, 2], [3, 5], [4, 7], [6, 9], [8, 11], [10, 13], [12, 15]]) == 4\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [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(pairs = [[-100, -90], [-95, -85], [-80, -70], [-75, -65], [-60, -50], [-55, -45], [-40, -30], [-35, -25], [-20, -10], [-15, -5]]) == 5\n assert candidate(pairs = [[1, 2], [3, 10], [4, 6], [6, 9], [8, 12], [10, 15], [13, 18], [16, 20]]) == 4\n assert candidate(pairs = [[-5, -3], [-2, -1], [0, 2], [3, 5], [6, 8]]) == 5\n assert candidate(pairs = [[-500, -200], [-300, -100], [-250, -50], [-200, 0], [-150, 50], [-100, 100], [-50, 150], [0, 200], [50, 250], [100, 300]]) == 3\n assert candidate(pairs = [[-10, 10], [-9, 9], [-8, 8], [-7, 7], [-6, 6], [-5, 5], [-4, 4], [-3, 3], [-2, 2], [-1, 1]]) == 1\n assert candidate(pairs = [[1, 3], [2, 5], [4, 7], [5, 8], [6, 9], [7, 10], [8, 11], [9, 12], [10, 13], [11, 14]]) == 3\n assert candidate(pairs = [[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]]) == 5\n assert candidate(pairs = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [1, 25], [2, 26], [3, 27], [4, 28], [5, 29]]) == 3\n assert candidate(pairs = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91]]) == 1\n assert candidate(pairs = [[-10, -5], [-6, -2], [-3, -1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6]]) == 4\n assert candidate(pairs = [[-1000, -999], [-998, -997], [-996, -995], [-994, -993], [-992, -991], [-990, -989], [-988, -987], [-986, -985]]) == 8\n assert candidate(pairs = [[1, 100], [50, 150], [100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [350, 450], [400, 500], [450, 550]]) == 4\n assert candidate(pairs = [[-5, -3], [-4, -2], [-3, -1], [-2, 0], [-1, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8]]) == 4\n assert candidate(pairs = [[-10, -5], [-4, -2], [0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]]) == 8\n assert candidate(pairs = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [11, 20], [12, 19], [13, 18], [14, 17], [15, 16]]) == 2\n assert candidate(pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 11], [2, 12], [3, 13], [4, 14], [5, 15]]) == 5\n assert candidate(pairs = [[-10, -1], [-5, -2], [-3, 0], [0, 3], [2, 5], [4, 7], [6, 9], [8, 10]]) == 4\n assert candidate(pairs = [[-100, -50], [-75, -25], [-50, -10], [-25, 10], [0, 20], [10, 30], [20, 40], [30, 50], [40, 60], [50, 70]]) == 4\n assert candidate(pairs = [[-5, 0], [-3, -1], [0, 5], [2, 4], [3, 7], [5, 9]]) == 3\n assert candidate(pairs = [[-50, 0], [-40, 10], [-30, 20], [-20, 30], [-10, 40], [0, 50], [10, 60], [20, 70], [30, 80], [40, 90]]) == 2\n assert candidate(pairs = [[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]]) == 5\n", "comparison": "exact"}, "public_tests": ["[[1,2],[2,3],[3,4]]", "[[1,2],[7,8],[4,5]]"], "hints": [], "metadata": {"canonical_parameter_names": ["pairs"], "leetcode_dataset_entry_point": "Solution().findLongestChain", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:08+00:00", "tests_total": 106, "tests_dropped": 8, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy", "sorting", "longest-increasing-subsequence"]}, "language": "cpp", "interface": {"raw_signature": "int findLongestChain(vector>& pairs) {", "container": "Solution", "callable": "findLongestChain", "parameters": [{"name": "pairs", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 647, "task_id": "palindromic-substrings", "difficulty": "Medium", "problem_description": "Given a string s, return the number of palindromic substrings in it.\n\nA string is a palindrome when it reads the same backward as forward.\n\nA substring is a contiguous sequence of characters within the string.\n\nExample 1:\n\nInput: s = \"abc\"\nOutput: 3\nExplanation: Three palindromic strings: \"a\", \"b\", \"c\".\n\nExample 2:\n\nInput: s = \"aaa\"\nOutput: 6\nExplanation: Six palindromic strings: \"a\", \"a\", \"a\", \"aa\", \"aa\", \"aaa\".\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abba\") == 6\n assert candidate(s = \"aaaaa\") == 15\n assert candidate(s = \"babad\") == 7\n assert candidate(s = \"noon\") == 6\n assert candidate(s = \"banana\") == 10\n assert candidate(s = \"aabbbaa\") == 14\n assert candidate(s = \"abc\") == 3\n assert candidate(s = \"level\") == 7\n assert candidate(s = \"aaa\") == 6\n assert candidate(s = \"civic\") == 7\n assert candidate(s = \"rotor\") == 7\n assert candidate(s = \"racecar\") == 10\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"abcdefg\") == 7\n assert candidate(s = \"zxcvbnmmlkjhgfdsapoiuytrewq\") == 28\n assert candidate(s = \"abcbaabccbaabcba\") == 34\n assert candidate(s = \"amoreinimorac\") == 14\n assert candidate(s = \"atoyota\") == 10\n assert candidate(s = \"aabbcccbbbaa\") == 23\n assert candidate(s = \"abccbaabcbaabc\") == 28\n assert candidate(s = \"rotorrotor\") == 19\n assert candidate(s = \"abracadabra\") == 13\n assert candidate(s = \"levelmadam\") == 14\n assert candidate(s = \"ab\") == 2\n assert candidate(s = \"steponnopets\") == 18\n assert candidate(s = \"noonnoon\") == 16\n assert candidate(s = \"aaaaabbbb\") == 25\n assert candidate(s = \"aaaaaaaaaa\") == 55\n assert candidate(s = \"abcddcbaabcddcba\") == 32\n assert candidate(s = \"racecarracecarracecarracecar\") == 82\n assert candidate(s = \"madaminnadammadam\") == 27\n assert candidate(s = \"xyxzyzyzyxzyzyxzyzyxzyx\") == 34\n assert candidate(s = \"noonabnoon\") == 14\n assert candidate(s = \"bbaabbccddeebbaabbccddee\") == 40\n assert candidate(s = \"qwertyuiopoiuytrewq\") == 28\n assert candidate(s = \"abccbaabccba\") == 24\n assert candidate(s = \"aba\") == 4\n assert candidate(s = \"xyzyzyzyzyzyzyzy\") == 65\n assert candidate(s = \"abacbacbacbacba\") == 16\n assert candidate(s = \"noonnoonnoonnoon\") == 48\n assert candidate(s = \"aabbccddeee\") == 18\n assert candidate(s = \"abacaba\") == 12\n assert candidate(s = \"madamracecar\") == 17\n assert candidate(s = \"rotorcarrot\") == 14\n assert candidate(s = \"abca\") == 4\n assert candidate(s = \"aabbcccbbbbaaa\") == 30\n assert candidate(s = \"aabbccddeeeeeddccbbaa\") == 47\n assert candidate(s = \"aaaaaabbbb\") == 31\n assert candidate(s = \"aabbabaabbaa\") == 23\n assert candidate(s = \"abcba\") == 7\n assert candidate(s = \"abcdcba\") == 10\n assert candidate(s = \"xyzzyxzyxzyzyxzyz\") == 23\n assert candidate(s = \"madaminnakayak\") == 20\n assert candidate(s = \"abccbaabccbaabccba\") == 45\n assert candidate(s = \"aabbccccbbaa\") == 26\n assert candidate(s = \"rotorcentralrotor\") == 21\n assert candidate(s = \"racecarracecarracecar\") == 51\n assert candidate(s = \"aabbbaaabbbaaa\") == 37\n assert candidate(s = \"xxyyyxyxx\") == 17\n assert candidate(s = \"aabbccddeeefffggghhhh\") == 40\n assert candidate(s = \"abacdfgdcabaabacdfgdcaba\") == 33\n assert candidate(s = \"racecarbanana\") == 20\n assert candidate(s = \"levelup\") == 9\n assert candidate(s = \"abcdeedcba\") == 15\n assert candidate(s = \"deeee\") == 11\n assert candidate(s = \"abaaabaaab\") == 24\n assert candidate(s = \"abbaabbaba\") == 20\n assert candidate(s = \"abcbaabcbaabcbaabcba\") == 58\n assert candidate(s = \"bcbcbcbcbcbcbc\") == 56\n assert candidate(s = \"abaaabbaaabaaa\") == 35\n assert candidate(s = \"abcababcababc\") == 17\n assert candidate(s = \"levellevel\") == 19\n assert candidate(s = \"abcdefedcba\") == 16\n assert candidate(s = \"abcdefgfedcbafedcbagfedcbafedcbagfedcba\") == 45\n assert candidate(s = \"acdcacdcacdc\") == 27\n assert candidate(s = \"zxcvbnmmnbvcxz\") == 21\n assert candidate(s = \"thisisnotapalindrome\") == 23\n assert candidate(s = \"abbaeae\") == 11\n assert candidate(s = \"aaaaaaa\") == 28\n assert candidate(s = \"levellevellevel\") == 36\n assert candidate(s = \"abcdcbaabcdcba\") == 27\n assert candidate(s = \"abccbaabc\") == 15\n assert candidate(s = \"xyzyzyxzyzyzyx\") == 25\n assert candidate(s = \"abacdfgdcabaabacdfgdcabaabacdfgdcaba\") == 52\n assert candidate(s = \"leveloneeleven\") == 19\n assert candidate(s = \"babcbabcba\") == 20\n assert candidate(s = \"zyzzyzzyzyzy\") == 29\n assert candidate(s = \"abababa\") == 16\n assert candidate(s = \"xyxzyxyzyx\") == 15\n assert candidate(s = \"abacabadabacaba\") == 32\n assert candidate(s = \"civicciviccivicciviccivic\") == 85\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\") == 210\n assert candidate(s = \"abcbaba\") == 11\n assert candidate(s = \"abcbabcba\") == 17\n assert candidate(s = \"deifiedrotor\") == 17\n assert candidate(s = \"noonracecarrace\") == 24\n assert candidate(s = \"civiccivic\") == 19\n assert candidate(s = \"aabbccddeeffgg\") == 21\n assert candidate(s = \"abccba\") == 9\n assert candidate(s = \"aabbccddeeff\") == 18\n assert candidate(s = \"madamimadam\") == 20\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 78\n assert candidate(s = \"racecarannakayak\") == 25\n assert candidate(s = \"amanaplanacanalpanama\") == 37\n assert candidate(s = \"abbabababa\") == 24\n assert candidate(s = \"abcdefgfeijklmmlkjihgf\") == 29\n assert candidate(s = \"racecarracecar\") == 27\n assert candidate(s = \"noonnoonnoon\") == 30\n assert candidate(s = \"deified\") == 10\n assert candidate(s = \"bcbcbcbcb\") == 25\n assert candidate(s = \"abcdef\") == 6\n assert candidate(s = \"rotorrotorrotor\") == 36\n assert candidate(s = \"abcdedcba\") == 13\n assert candidate(s = \"noonhighnoon\") == 16\n assert candidate(s = \"abcbaabcbaabcba\") == 36\n assert candidate(s = \"rotorrotorrotorrotor\") == 58\n assert candidate(s = \"abacdfgdcaba\") == 14\n assert candidate(s = \"abbaabba\") == 16\n assert candidate(s = \"ababababab\") == 30\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzzzzz\") == 141\n assert candidate(s = \"abcddcba\") == 12\n assert candidate(s = \"aaaaabaaa\") == 25\n assert candidate(s = \"abcdefghihgfedcba\") == 25\n assert candidate(s = \"xyzyxzyzyx\") == 14\n assert candidate(s = \"xyxxyxyxxyxyxyx\") == 40\n assert candidate(s = \"xyzzzyzx\") == 13\n assert candidate(s = \"abcdefgfedcbafedcbagfedcba\") == 32\n assert candidate(s = \"aabbccddeeaabbccddee\") == 30\n assert candidate(s = \"abacdfgdcababa\") == 19\n assert candidate(s = \"civicciviccivic\") == 36\n assert candidate(s = \"aabbcc\") == 9\n assert candidate(s = \"mississippi\") == 20\n assert candidate(s = \"xyzyxyzyx\") == 17\n assert candidate(s = \"abbababaabbaba\") == 28\n assert candidate(s = \"xyxzyzyxzyzyzyxzyxzyzyzyxzyzyzyzyx\") == 61\n assert candidate(s = \"forgeeksskeegfor\") == 23\n assert candidate(s = \"bananaabababa\") == 27\n assert candidate(s = \"abcbba\") == 8\n assert candidate(s = \"zzzzzzzzzzz\") == 66\n", "comparison": "exact"}, "public_tests": ["\"abc\"", "\"aaa\""], "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().countSubstrings", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:10+00:00", "tests_total": 140, "tests_dropped": 1, "flags": [], "topic_tags": ["two-pointers", "string", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int countSubstrings(string s) {", "container": "Solution", "callable": "countSubstrings", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 648, "task_id": "replace-words", "difficulty": "Medium", "problem_description": "In English, we have a concept called root, which can be followed by some other word to form another longer word - let's call this word derivative. For example, when the root \"help\" is followed by the word \"ful\", we can form a derivative \"helpful\".\n\nGiven a dictionary consisting of many roots and a sentence consisting of words separated by spaces, replace all the derivatives in the sentence with the root forming it. If a derivative can be replaced by more than one root, replace it with the root that has the shortest length.\n\nReturn the sentence after the replacement.\n\nExample 1:\n\nInput: dictionary = [\"cat\",\"bat\",\"rat\"], sentence = \"the cattle was rattled by the battery\"\nOutput: \"the cat was rat by the bat\"\n\nExample 2:\n\nInput: dictionary = [\"a\",\"b\",\"c\"], sentence = \"aadsfasf absbs bbab cadsfafs\"\nOutput: \"a a b c\"\n\nConstraints:\n\n- 1 <= dictionary.length <= 1000\n- 1 <= dictionary[i].length <= 100\n- dictionary[i] consists of only lower-case letters.\n- 1 <= sentence.length <= 10^6\n- sentence consists of only lower-case letters and spaces.\n- The number of words in sentence is in the range [1, 1000]\n- The length of each word in sentence is in the range [1, 1000]\n- Every two consecutive words in sentence will be separated by exactly one space.\n- sentence does not have leading or trailing spaces.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(dictionary = ['a', 'aa', 'aaa'],sentence = \"aaaa aaa aa a\") == \"a a a a\"\n assert candidate(dictionary = ['base', 'bat', 'ba'],sentence = \"baseball batman bat\") == \"ba ba ba\"\n assert candidate(dictionary = ['dog', 'cat'],sentence = \"dog cat\") == \"dog cat\"\n assert candidate(dictionary = ['hello', 'hell', 'he', 'h'],sentence = \"hello hello hello\") == \"h h h\"\n assert candidate(dictionary = ['base', 'bat'],sentence = \"baseball bat\") == \"base bat\"\n assert candidate(dictionary = ['appl', 'app', 'ap'],sentence = \"apple apples applying apply\") == \"ap ap ap ap\"\n assert candidate(dictionary = ['dog', 'cat'],sentence = \"cattledog\") == \"cat\"\n assert candidate(dictionary = ['hello'],sentence = \"hellonow\") == \"hello\"\n assert candidate(dictionary = ['dog', 'cat'],sentence = \"thecatwasadog\") == \"thecatwasadog\"\n assert candidate(dictionary = ['a', 'b', 'c'],sentence = \"aadsfasf absbs bbab cadsfafs\") == \"a a b c\"\n assert candidate(dictionary = ['car', 'card', 'care', 'cared'],sentence = \"car card care cared carding careds\") == \"car car car car car car\"\n assert candidate(dictionary = ['hello', 'hell', 'he'],sentence = \"hello there helpful helper\") == \"he there he he\"\n assert candidate(dictionary = ['zebra', 'dog'],sentence = \"dog zebra zoo\") == \"dog zebra zoo\"\n assert candidate(dictionary = ['base', 'bas', 'ba'],sentence = \"baseball basebasket baskeyball\") == \"ba ba ba\"\n assert candidate(dictionary = ['dog', 'cat'],sentence = \"caterpillar catalog dogmatic\") == \"cat cat dog\"\n assert candidate(dictionary = ['apple', 'app', 'ap'],sentence = \"apple app ap appleapp appapple\") == \"ap ap ap ap ap\"\n assert candidate(dictionary = ['hi', 'him', 'himself'],sentence = \"himself\") == \"hi\"\n assert candidate(dictionary = ['go', 'gone'],sentence = \"go going gone\") == \"go go go\"\n assert candidate(dictionary = ['quick', 'qui', 'q'],sentence = \"quick quietly quicking quiquick\") == \"q q q q\"\n assert candidate(dictionary = ['sun', 'sungod'],sentence = \"sunshine sungod solar system\") == \"sun sun solar system\"\n assert candidate(dictionary = ['hello', 'hell', 'he'],sentence = \"hello world hellish heaven\") == \"he world he he\"\n assert candidate(dictionary = ['a', 'aa', 'aaa'],sentence = \"aa aaa\") == \"a a\"\n assert candidate(dictionary = ['hello', 'hell', 'he'],sentence = \"hello hell\") == \"he he\"\n assert candidate(dictionary = ['c', 'cc'],sentence = \"c cc ccc cccc\") == \"c c c c\"\n assert candidate(dictionary = ['car', 'cat'],sentence = \"carmodel carshow cat\") == \"car car cat\"\n assert candidate(dictionary = ['baseball', 'bat', 'ba'],sentence = \"baseball bat ball baseball bat\") == \"ba ba ba ba ba\"\n assert candidate(dictionary = ['do', 'don', 'donate', 'donation'],sentence = \"donation do donate don\") == \"do do do do\"\n assert candidate(dictionary = ['tree', 'trie', 'tr'],sentence = \"the tree is an evergreen tree\") == \"the tr is an evergreen tr\"\n assert candidate(dictionary = ['a'],sentence = \"a aa aaa aaaa aaaaa\") == \"a a a a a\"\n assert candidate(dictionary = ['him', 'himm'],sentence = \"him\") == \"him\"\n assert candidate(dictionary = ['rat', 'cat', 'bat'],sentence = \"rat cat bat ratcatbat\") == \"rat cat bat rat\"\n assert candidate(dictionary = ['cat', 'bat', 'rat'],sentence = \"the cattle was rattled by the battery\") == \"the cat was rat by the bat\"\n assert candidate(dictionary = ['go', 'gone', 'going'],sentence = \"go going gone\") == \"go go go\"\n assert candidate(dictionary = ['go', 'gone', 'going'],sentence = \"going gone go\") == \"go go go\"\n assert candidate(dictionary = ['hi', 'him', 'hii'],sentence = \"him hii\") == \"hi hi\"\n assert candidate(dictionary = ['a', 'aa', 'aaa'],sentence = \"aa aaa aaaa\") == \"a a a\"\n assert candidate(dictionary = ['quest', 'questi', 'questio', 'questioo'],sentence = \"question questioo quest questio\") == \"quest quest quest quest\"\n assert candidate(dictionary = ['auto', 'automotive', 'automatic', 'autograph', 'automobile'],sentence = \"automobile automatic auto autograph automotive\") == \"auto auto auto auto auto\"\n assert candidate(dictionary = ['micro', 'mic', 'mi', 'm'],sentence = \"microscopic microscopic microscopy micro\") == \"m m m m\"\n assert candidate(dictionary = ['ab', 'abc', 'abcd', 'abcde'],sentence = \"ab abc abcd abcde abcdef\") == \"ab ab ab ab ab\"\n assert candidate(dictionary = ['in', 'int', 'inte', 'inter', 'intera', 'interac', 'interact', 'interactiv', 'interactive', 'interactivit'],sentence = \"interactive interact interactivit interactiv interac inter inte int in\") == \"in in in in in in in in in\"\n assert candidate(dictionary = ['eco', 'ec', 'e'],sentence = \"ecological ecofriendly ecosphere eco\") == \"e e e e\"\n assert candidate(dictionary = ['test', 'testing', 'tested'],sentence = \"testing tested test testable\") == \"test test test test\"\n assert candidate(dictionary = ['tech', 'techi', 'techno', 'technol', 'technolog'],sentence = \"technology technological technologist technologic\") == \"tech tech tech tech\"\n assert candidate(dictionary = ['trans', 'tran', 'tr', 't'],sentence = \"transmission transfer transmigration transmit\") == \"t t t t\"\n assert candidate(dictionary = ['quick', 'qui', 'qu', 'q'],sentence = \"quickly quitting qu quack quest\") == \"q q q q q\"\n assert candidate(dictionary = ['pro', 'progr', 'progra', 'progran', 'program', 'programm', 'programmi', 'programmin', 'programming'],sentence = \"programming programmatic programmer\") == \"pro pro pro\"\n assert candidate(dictionary = ['complex', 'comple', 'complx', 'compl', 'com'],sentence = \"complex comple complx compl com\") == \"com com com com com\"\n assert candidate(dictionary = ['hyper', 'hyp', 'hy', 'h'],sentence = \"hyperactive hyperbole hypercritical hyper\") == \"h h h h\"\n assert candidate(dictionary = ['app', 'appl', 'apple', 'applet'],sentence = \"apples apple applet application apparatus\") == \"app app app app app\"\n assert candidate(dictionary = ['micro', 'microwave', 'microchip', 'microphone', 'microscope'],sentence = \"microchip microphone microscope microwave\") == \"micro micro micro micro\"\n assert candidate(dictionary = ['pre', 'pres', 'presi', 'presid', 'preside'],sentence = \"presidential presidency preside presides president\") == \"pre pre pre pre pre\"\n assert candidate(dictionary = ['aardvark', 'aard', 'aardva', 'aardvar'],sentence = \"aardvark aard aardva aardvar aardvarcoal\") == \"aard aard aard aard aard\"\n assert candidate(dictionary = ['con', 'cons', 'consc', 'consci', 'conscio', 'consciou', 'conscious'],sentence = \"conscious conscience consciousless consciously\") == \"con con con con\"\n assert candidate(dictionary = ['tech', 'te', 'techno', 'television', 'techology'],sentence = \"technology television tech techology\") == \"te te te te\"\n assert candidate(dictionary = ['micro', 'microb', 'microbi', 'microbia', 'microbian', 'microbiana'],sentence = \"microbial microbials microbially\") == \"micro micro micro\"\n assert candidate(dictionary = ['fast', 'faster', 'fastest'],sentence = \"he runs fast but his friend runs faster and is the fastest\") == \"he runs fast but his friend runs fast and is the fast\"\n assert candidate(dictionary = ['pre', 'pres', 'presi', 'presid'],sentence = \"presidency president preside preside\") == \"pre pre pre pre\"\n assert candidate(dictionary = ['re', 'replay', 'rewrite', 'remark', 'remarkable'],sentence = \"after rewriting the script he gave a remarkable replay of his remarkable performance\") == \"after re the script he gave a re re of his re performance\"\n assert candidate(dictionary = ['macro', 'mac', 'ma', 'm'],sentence = \"macroeconomic macroeconomics macroscopic macro\") == \"m m m m\"\n assert candidate(dictionary = ['multi', 'mult', 'mul', 'mu'],sentence = \"multi mult mul mu\") == \"mu mu mu mu\"\n assert candidate(dictionary = ['qu', 'qui', 'quic', 'quick', 'quicks', 'quickly'],sentence = \"quick quicks quickness quickly quicker quickening\") == \"qu qu qu qu qu qu\"\n assert candidate(dictionary = ['photo', 'phot', 'photog', 'photogr'],sentence = \"photography photographer photograph photogenic\") == \"phot phot phot phot\"\n assert candidate(dictionary = ['tiny', 'tin', 'tinny'],sentence = \"tin tinny tiny tinnytin\") == \"tin tin tin tin\"\n assert candidate(dictionary = ['th', 'the', 'ther', 'therm', 'thermal'],sentence = \"thermal the thermals thermalize thermalization\") == \"th th th th th\"\n assert candidate(dictionary = ['un', 'un', 'un', 'un', 'un'],sentence = \"united unification uncomfortable underway undone\") == \"un un un un un\"\n assert candidate(dictionary = ['incredible', 'inc', 'incr', 'incredi', 'incredi', 'incredib'],sentence = \"incredible incr incredible incredi incredi incredib\") == \"inc inc inc inc inc inc\"\n assert candidate(dictionary = ['pre', 'prefix', 'preprocessing', 'preprocessor'],sentence = \"preprocessing the prefix of a string using a preprocessor\") == \"pre the pre of a string using a pre\"\n assert candidate(dictionary = ['fast', 'faster', 'fastest'],sentence = \"fastest fast fasterr fastestest\") == \"fast fast fast fast\"\n assert candidate(dictionary = ['co', 'con', 'cons', 'const', 'consti', 'constit', 'constitu', 'constitue'],sentence = \"constituent constituents constitution constitutionalize constitutional\") == \"co co co co co\"\n assert candidate(dictionary = ['quick', 'qui', 'quit'],sentence = \"the quick brown fox quit quietly\") == \"the qui brown fox qui qui\"\n assert candidate(dictionary = ['inter', 'in', 'interac', 'interact'],sentence = \"interaction interactive intercept intercepting\") == \"in in in in\"\n assert candidate(dictionary = ['pre', 'prel', 'preli', 'prelim', 'prelimi', 'prelimin', 'prelimina', 'preliminar', 'preliminary'],sentence = \"preliminary preliminarys\") == \"pre pre\"\n assert candidate(dictionary = ['hello', 'hell', 'he', 'h'],sentence = \"hello helpful hercules\") == \"h h h\"\n assert candidate(dictionary = ['base', 'basic', 'basics', 'basis'],sentence = \"baseline base basic basics basis basket\") == \"base base basic basic basis basket\"\n assert candidate(dictionary = ['micro', 'microscope', 'microprocessor', 'microphone'],sentence = \"microscopy microprocessor microphone microscopic micro\") == \"micro micro micro micro micro\"\n assert candidate(dictionary = ['auto', 'autom', 'automat', 'automate', 'automation'],sentence = \"automotive automation automated automobile automatic\") == \"auto auto auto auto auto\"\n assert candidate(dictionary = ['graph', 'graphic', 'graphite', 'graphing', 'graphology'],sentence = \"graphology graphite graph graphic graphing\") == \"graph graph graph graph graph\"\n assert candidate(dictionary = ['cat', 'ca', 'bat', 'ba', 'rat'],sentence = \"the cattle was rattled by the battery\") == \"the ca was rat by the ba\"\n assert candidate(dictionary = ['ca', 'cat', 'catt', 'cattl', 'cattle'],sentence = \"cattle cattleshed\") == \"ca ca\"\n assert candidate(dictionary = ['pro', 'prom', 'promo'],sentence = \"promotional promising programmer promote\") == \"pro pro pro pro\"\n assert candidate(dictionary = ['a', 'aa', 'aaa', 'aaaa'],sentence = \"aaaaaaaaa abababab abab aa\") == \"a a a a\"\n assert candidate(dictionary = ['throne', 'thr', 'th'],sentence = \"throne thrilled thrush thorn thieves\") == \"th th th th th\"\n assert candidate(dictionary = ['bat', 'banana', 'band', 'bandana', 'bandwidth'],sentence = \"bandanna batman band bandana bandwidth\") == \"band bat band band band\"\n assert candidate(dictionary = ['super', 'superman', 'superhero', 'supervillain'],sentence = \"superman is a superhero but lex luthor is a supervillain\") == \"super is a super but lex luthor is a super\"\n assert candidate(dictionary = ['in', 'inn', 'inne', 'inner'],sentence = \"inner inne inn in\") == \"in in in in\"\n assert candidate(dictionary = ['superduper', 'super', 'superdup', 'superdu', 'superdupera'],sentence = \"superduper super superdup superdu superdupera\") == \"super super super super super\"\n assert candidate(dictionary = ['tr', 'tre', 'tree', 'treet', 'treeto'],sentence = \"tree treehouse treelike treetops\") == \"tr tr tr tr\"\n assert candidate(dictionary = ['sun', 'sunny', 'sunshine', 'sunbeam'],sentence = \"sunset sunny sunshine sunbeam\") == \"sun sun sun sun\"\n assert candidate(dictionary = ['a', 'ab', 'abc', 'abcd'],sentence = \"abcd abc abc ab a\") == \"a a a a a\"\n assert candidate(dictionary = ['micro', 'microwave', 'microscope'],sentence = \"microscopy microwave microprocessor micro\") == \"micro micro micro micro\"\n assert candidate(dictionary = ['b', 'be', 'bee', 'been', 'beef'],sentence = \"beef bee been before being beefy\") == \"b b b b b b\"\n assert candidate(dictionary = ['rat', 'ratt', 'ratta', 'rattle'],sentence = \"rattling rattlesnake rattan ratter\") == \"rat rat rat rat\"\n assert candidate(dictionary = ['inter', 'inte', 'int', 'in', 'i'],sentence = \"inter integration interim interfere interfere\") == \"i i i i i\"\n assert candidate(dictionary = ['pre', 'prefix', 'preference', 'presume', 'presumably'],sentence = \"prefer prefix presumption presumably\") == \"pre pre pre pre\"\n assert candidate(dictionary = ['small', 'smal', 'sma', 'sm'],sentence = \"smaller small smallness sm\") == \"sm sm sm sm\"\n assert candidate(dictionary = ['nano', 'nanob', 'nanobo', 'nanobio', 'nanobiol', 'nanobiolo', 'nanobiolog', 'nanobiologi', 'nanobiologic', 'nanobiological'],sentence = \"nanobiological nanobiologicals\") == \"nano nano\"\n assert candidate(dictionary = ['over', 'overly', 'overall'],sentence = \"he was overly critical of the overall performance\") == \"he was over critical of the over performance\"\n assert candidate(dictionary = ['auto', 'autom', 'automat', 'automate'],sentence = \"automatic automobile automate automaton\") == \"auto auto auto auto\"\n assert candidate(dictionary = ['super', 'supera', 'superb', 'superba', 'superba', 'superba', 'superba'],sentence = \"superb superlative superabound superbest superbowl\") == \"super super super super super\"\n assert candidate(dictionary = ['a', 'an', 'and', 'ands'],sentence = \"and ands anding anderson\") == \"a a a a\"\n assert candidate(dictionary = ['elephant', 'ele', 'eleph', 'elepha', 'elephantastic'],sentence = \"elephant elephants eleph elepha elephantastic\") == \"ele ele ele ele ele\"\n assert candidate(dictionary = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg'],sentence = \"abcdefghi abcdefghij\") == \"a a\"\n assert candidate(dictionary = ['pro', 'pre', 'pros', 'pres', 'presi', 'presid'],sentence = \"president proportional prefix pseudoprefix preprocess\") == \"pre pro pre pseudoprefix pre\"\n assert candidate(dictionary = ['a', 'ab', 'abc', 'abcd', 'abcde'],sentence = \"abcdefgh abcdefg abcdef abcde abcd abc ab a\") == \"a a a a a a a a\"\n assert candidate(dictionary = ['edu', 'educ', 'educc', 'educat', 'educati', 'educatio', 'education'],sentence = \"educational education educations\") == \"edu edu edu\"\n assert candidate(dictionary = ['car', 'cart', 'card', 'cartographer'],sentence = \"car cartography card catalog carter\") == \"car car car catalog car\"\n assert candidate(dictionary = ['inter', 'in', 'i'],sentence = \"international intergalactic interconnected inter\") == \"i i i i\"\n assert candidate(dictionary = ['big', 'bigger', 'biggest'],sentence = \"bigger biggerest big biggger\") == \"big big big big\"\n assert candidate(dictionary = ['hello', 'hell', 'he', 'h'],sentence = \"hello hellish helper high heels\") == \"h h h h h\"\n assert candidate(dictionary = ['in', 'inside', 'into', 'input', 'insert'],sentence = \"he went inside the building and then into the room to insert an input\") == \"he went in the building and then in the room to in an in\"\n assert candidate(dictionary = ['bat', 'ba', 'batt'],sentence = \"battery batten batted\") == \"ba ba ba\"\n assert candidate(dictionary = ['prefix', 'prefixe', 'prefixes'],sentence = \"prefix prefixer prefixest prefixes\") == \"prefix prefix prefix prefix\"\n assert candidate(dictionary = ['micro', 'micr', 'micros', 'microso', 'microsof', 'microsoft'],sentence = \"microsoft microsofts microsof microso micros micr micro\") == \"micr micr micr micr micr micr micr\"\n assert candidate(dictionary = ['hello', 'hell', 'he', 'h'],sentence = \"hello hell he h\") == \"h h h h\"\n assert candidate(dictionary = ['geo', 'ge', 'g'],sentence = \"geography geological geomorphology geo\") == \"g g g g\"\n assert candidate(dictionary = ['quick', 'qui', 'quic'],sentence = \"quick quicky quic quickness\") == \"qui qui qui qui\"\n assert candidate(dictionary = ['mi', 'min', 'mine', 'minera', 'mineral', 'minerals'],sentence = \"minerals mineral mining mine\") == \"mi mi mi mi\"\n assert candidate(dictionary = ['re', 'rep', 'repl', 'repla'],sentence = \"replace replacement replacer replacable\") == \"re re re re\"\n assert candidate(dictionary = ['algorithm', 'algo', 'algori', 'algorit'],sentence = \"algorithm algorithms algo algori algorit\") == \"algo algo algo algo algo\"\n assert candidate(dictionary = ['un', 'unp', 'unpr', 'unpre'],sentence = \"unpredictable unpre un unpr\") == \"un un un un\"\n assert candidate(dictionary = ['hel', 'help', 'helpl'],sentence = \"helpful helpline helpless helper\") == \"hel hel hel hel\"\n assert candidate(dictionary = ['fast', 'faster', 'fastest'],sentence = \"fast fasters fastest\") == \"fast fast fast\"\n assert candidate(dictionary = ['sub', 'suba', 'subac', 'subact', 'subacti', 'subacti', 'subacti'],sentence = \"subact subact subact subactive subacted\") == \"sub sub sub sub sub\"\n assert candidate(dictionary = ['inter', 'intera', 'interac', 'interact', 'interacti', 'interacti', 'interacti'],sentence = \"interactive interact interaction intersect\") == \"inter inter inter inter\"\n assert candidate(dictionary = ['supercalifragilisticexpialidocious', 'supercalifragilisticexpi', 'supercali', 'super'],sentence = \"supercalifragilisticexpialidocious supercalifragilisticexpi supercali super\") == \"super super super super\"\n assert candidate(dictionary = ['root', 'rooting', 'roots', 'rooted'],sentence = \"rooting is a fundamental concept rooted in the roots of understanding\") == \"root is a fundamental concept root in the root of understanding\"\n assert candidate(dictionary = ['ba', 'bat', 'batt', 'batte', 'battea'],sentence = \"batman battled batted battle batt\") == \"ba ba ba ba ba\"\n assert candidate(dictionary = ['boundary', 'bound', 'bounda', 'boundar'],sentence = \"boundary boundaries bound bounda boundar\") == \"bound bound bound bound bound\"\n assert candidate(dictionary = ['tele', 'telev', 'telec', 'tel'],sentence = \"telephone telegraph telecommunication tele\") == \"tel tel tel tel\"\n assert candidate(dictionary = ['super', 'su', 's'],sentence = \"superhero superpower supernatural super\") == \"s s s s\"\n assert candidate(dictionary = ['tr', 'try', 'trie', 'tried'],sentence = \"trier tries trying triangle\") == \"tr tr tr tr\"\n assert candidate(dictionary = ['progr', 'progra', 'program', 'programm'],sentence = \"program programm programing programmer\") == \"progr progr progr progr\"\n assert candidate(dictionary = ['uni', 'univ', 'unive', 'univer', 'univers', 'universi', 'universit', 'universiti', 'university'],sentence = \"university universities\") == \"uni uni\"\n assert candidate(dictionary = ['ex', 'exa', 'exac', 'exact', 'exactly', 'exactly', 'exactly'],sentence = \"exactly exactly exact exactitude exacter\") == \"ex ex ex ex ex\"\n assert candidate(dictionary = ['rat', 'ratt', 'ratta', 'rattl', 'rattled'],sentence = \"rattled rattler rattlesnake\") == \"rat rat rat\"\n assert candidate(dictionary = ['mo', 'mon', 'mond', 'monde', 'monday'],sentence = \"monday mondo mondaying mondane\") == \"mo mo mo mo\"\n assert candidate(dictionary = ['a', 'ap', 'app', 'appl', 'apple'],sentence = \"apple app application apples\") == \"a a a a\"\n assert candidate(dictionary = ['un', 'uni', 'university', 'universe'],sentence = \"the university is in the universe\") == \"the un is in the un\"\n assert candidate(dictionary = ['a', 'an', 'and', 'andw', 'anda'],sentence = \"and andw anda andanda and wander andwind\") == \"a a a a a wander a\"\n assert candidate(dictionary = ['transformation', 'trans', 'tran', 'transfo', 'transfo', 'transformat', 'transforma', 'transfor'],sentence = \"transformation trans tran transfo transfo transformat transforma transfor\") == \"tran tran tran tran tran tran tran tran\"\n assert candidate(dictionary = ['dis', 'disa', 'disab', 'disabl'],sentence = \"disable disabling disabled disablity\") == \"dis dis dis dis\"\n assert candidate(dictionary = ['hel', 'help', 'helpl', 'helpf', 'helpfu', 'helpful'],sentence = \"helpful helpfulness\") == \"hel hel\"\n assert candidate(dictionary = ['fantastic', 'fant', 'fan', 'fantasy'],sentence = \"fantastic fantasies fanta fantasticastic\") == \"fan fan fan fan\"\n assert candidate(dictionary = ['re', 'rec', 'rece', 'recei', 'receiv', 'receiving'],sentence = \"receiving reception recipient receiver\") == \"re re re re\"\n assert candidate(dictionary = ['prefix', 'pre', 'pref', 'preference'],sentence = \"preference prefix prefixed prefixing\") == \"pre pre pre pre\"\n assert candidate(dictionary = ['a', 'ab', 'abc', 'abcd'],sentence = \"abc abd ab ac abcd\") == \"a a a a a\"\n assert candidate(dictionary = ['hel', 'help', 'helpl'],sentence = \"helpful helpline helps help\") == \"hel hel hel hel\"\n assert candidate(dictionary = ['prefix', 'pre', 'p'],sentence = \"prefix prediction preprint perimeter\") == \"p p p p\"\n assert candidate(dictionary = ['computer', 'com', 'co', 'c'],sentence = \"computer computing compute coherence\") == \"c c c c\"\n assert candidate(dictionary = ['con', 'cons', 'const', 'consti', 'constit'],sentence = \"con constitution constant consistency construct\") == \"con con con con con\"\n assert candidate(dictionary = ['micro', 'microscope', 'microorganism', 'micron'],sentence = \"microscopes are used to see microorganisms which are smaller than a micron\") == \"micro are used to see micro which are smaller than a micro\"\n assert candidate(dictionary = ['bio', 'biol', 'biolo', 'biolog', 'biologica', 'biological', 'biologically'],sentence = \"biological biologically biologicallys\") == \"bio bio bio\"\n assert candidate(dictionary = ['multi', 'multimedia', 'multiply', 'multiplication', 'multiplier'],sentence = \"multiply multiplication multimedia multiplier\") == \"multi multi multi multi\"\n assert candidate(dictionary = ['pro', 'prov', 'provi', 'provii', 'proviii'],sentence = \"providence provision providential\") == \"pro pro pro\"\n assert candidate(dictionary = ['re', 'republic', 'republican', 'reproduce', 'reproduction'],sentence = \"republic republican reproduce reproduction resentful\") == \"re re re re re\"\n assert candidate(dictionary = ['nano', 'nan', 'na', 'n'],sentence = \"nanometer nanotechnology nanobot nan\") == \"n n n n\"\n assert candidate(dictionary = ['hel', 'help', 'hell', 'helper'],sentence = \"helpful helpline helpfulness hellhole\") == \"hel hel hel hel\"\n assert candidate(dictionary = ['re', 'ref', 'refer', 'referen', 'referenc'],sentence = \"reference references referencing referential\") == \"re re re re\"\n assert candidate(dictionary = ['algorithm', 'algo', 'alg', 'a'],sentence = \"algorithm algorithms algorithmic algorithmically\") == \"a a a a\"\n assert candidate(dictionary = ['happy', 'happiness', 'hap', 'happily'],sentence = \"happily living a happy life brings much happiness\") == \"hap living a hap life brings much hap\"\n assert candidate(dictionary = ['ba', 'bat', 'batt', 'batta', 'battery'],sentence = \"batteries battery batty batting battled\") == \"ba ba ba ba ba\"\n assert candidate(dictionary = ['auto', 'automobile', 'automotive'],sentence = \"automobile automotives automatic automation\") == \"auto auto auto auto\"\n assert candidate(dictionary = ['hello', 'hell', 'he'],sentence = \"hello hell h ello he\") == \"he he h ello he\"\n assert candidate(dictionary = ['un', 'unp', 'unpr', 'unpre', 'unprem', 'unpreme', 'unpremier'],sentence = \"unpremier unprepared unpremeditated unpreventable\") == \"un un un un\"\n assert candidate(dictionary = ['nano', 'nanot', 'nanoto', 'nanoton', 'nanotube', 'nanotubes'],sentence = \"nanotube nanotubes\") == \"nano nano\"\n assert candidate(dictionary = ['inter', 'inte', 'int', 'in'],sentence = \"international integrate inter inter\") == \"in in in in\"\n assert candidate(dictionary = ['television', 'tele', 'telegraph', 'telecom'],sentence = \"telegraph telecommunication telescope television tele\") == \"tele tele tele tele tele\"\n assert candidate(dictionary = ['apple', 'app', 'bat', 'ba', 'batman'],sentence = \"apples are batman and batmen\") == \"app are ba and ba\"\n assert candidate(dictionary = ['un', 'uno', 'united'],sentence = \"united nations unification unstoppable\") == \"un nations un un\"\n assert candidate(dictionary = ['xylophone', 'xylo', 'xylop', 'xylopho'],sentence = \"xylophone xylo xylop xylopho xylophonic\") == \"xylo xylo xylo xylo xylo\"\n assert candidate(dictionary = ['com', 'comm', 'comma', 'commaa'],sentence = \"commas comma commaa communicate\") == \"com com com com\"\n assert candidate(dictionary = ['auto', 'autom', 'automat', 'automati', 'automati', 'automatiz', 'automatize'],sentence = \"automatically automatize automation automaton\") == \"auto auto auto auto\"\n assert candidate(dictionary = ['apple', 'app', 'application'],sentence = \"apples are appetizing and application development is fun\") == \"app are app and app development is fun\"\n assert candidate(dictionary = ['inter', 'internal', 'internet', 'interface'],sentence = \"internet interface internals interaction\") == \"inter inter inter inter\"\n assert candidate(dictionary = ['int', 'inte', 'integ', 'integri', 'integr', 'integrit', 'integriti', 'integrity'],sentence = \"integrity integritys\") == \"int int\"\n assert candidate(dictionary = ['ex', 'exa', 'exam', 'examp'],sentence = \"example examine examination exam\") == \"ex ex ex ex\"\n assert candidate(dictionary = ['unbelievable', 'un', 'unbe', 'unbeli', 'unbeliev'],sentence = \"unbelievable unbelieve unbeliev un unbe\") == \"un un un un un\"\n assert candidate(dictionary = ['hel', 'help', 'helpl'],sentence = \"helpful helpfulness helpfulhelper\") == \"hel hel hel\"\n assert candidate(dictionary = ['bio', 'bi', 'b'],sentence = \"biological biotechnology biochemistry bio\") == \"b b b b\"\n assert candidate(dictionary = ['micro', 'microc', 'microce', 'microcel', 'microcell', 'microcells'],sentence = \"microcell microcells microcellular microcellulars\") == \"micro micro micro micro\"\n assert candidate(dictionary = ['nano', 'nanos', 'nanoso', 'nanosol', 'nanosolu', 'nanosolut', 'nanosolute', 'nanosolutes'],sentence = \"nanosolute nanosolutes\") == \"nano nano\"\n", "comparison": "exact"}, "public_tests": ["[\"cat\",\"bat\",\"rat\"]\n\"the cattle was rattled by the battery\"", "[\"a\",\"b\",\"c\"]\n\"aadsfasf absbs bbab cadsfafs\""], "hints": [], "metadata": {"canonical_parameter_names": ["dictionary", "sentence"], "leetcode_dataset_entry_point": "Solution().replaceWords", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:12+00:00", "tests_total": 184, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "hash-table", "string", "trie"]}, "language": "cpp", "interface": {"raw_signature": "string replaceWords(vector& dictionary, string sentence) {", "container": "Solution", "callable": "replaceWords", "parameters": [{"name": "dictionary", "type": "vector&"}, {"name": "sentence", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 649, "task_id": "dota2-senate", "difficulty": "Medium", "problem_description": "In the world of Dota2, there are two parties: the Radiant and the Dire.\n\nThe Dota2 senate consists of senators coming from two parties. Now the Senate wants to decide on a change in the Dota2 game. The voting for this change is a round-based procedure. In each round, each senator can exercise one of the two rights:\n\n- Ban one senator's right: A senator can make another senator lose all his rights in this and all the following rounds.\n- Announce the victory: If this senator found the senators who still have rights to vote are all from the same party, he can announce the victory and decide on the change in the game.\n\nGiven a string senate representing each senator's party belonging. The character 'R' and 'D' represent the Radiant party and the Dire party. Then if there are n senators, the size of the given string will be n.\n\nThe round-based procedure starts from the first senator to the last senator in the given order. This procedure will last until the end of voting. All the senators who have lost their rights will be skipped during the procedure.\n\nSuppose every senator is smart enough and will play the best strategy for his own party. Predict which party will finally announce the victory and change the Dota2 game. The output should be \"Radiant\" or \"Dire\".\n\nExample 1:\n\nInput: senate = \"RD\"\nOutput: \"Radiant\"\nExplanation:\nThe first senator comes from Radiant and he can just ban the next senator's right in round 1.\nAnd the second senator can't exercise any rights anymore since his right has been banned.\nAnd in round 2, the first senator can just announce the victory since he is the only guy in the senate who can vote.\n\nExample 2:\n\nInput: senate = \"RDD\"\nOutput: \"Dire\"\nExplanation:\nThe first senator comes from Radiant and he can just ban the next senator's right in round 1.\nAnd the second senator can't exercise any rights anymore since his right has been banned.\nAnd the third senator comes from Dire and he can ban the first senator's right in round 1.\nAnd in round 2, the third senator can just announce the victory since he is the only guy in the senate who can vote.\n\nConstraints:\n\n- n == senate.length\n- 1 <= n <= 10^4\n- senate[i] is either 'R' or 'D'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(senate = \"RDDRDR\") == \"Dire\"\n assert candidate(senate = \"RDD\") == \"Dire\"\n assert candidate(senate = \"DRDR\") == \"Dire\"\n assert candidate(senate = \"RDDRRD\") == \"Radiant\"\n assert candidate(senate = \"RDRDRDRDRDRDRD\") == \"Radiant\"\n assert candidate(senate = \"RD\") == \"Radiant\"\n assert candidate(senate = \"DRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRDDD\") == \"Radiant\"\n assert candidate(senate = \"DDDD\") == \"Dire\"\n assert candidate(senate = \"RRDDRR\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRRDDDDRRRR\") == \"Dire\"\n assert candidate(senate = \"RRDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDRRRR\") == \"Dire\"\n assert candidate(senate = \"RDRDRD\") == \"Radiant\"\n assert candidate(senate = \"DDRRR\") == \"Dire\"\n assert candidate(senate = \"DDDRRR\") == \"Dire\"\n assert candidate(senate = \"DDDDDDRRRRRR\") == \"Dire\"\n assert candidate(senate = \"RRDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDDRRDDRR\") == \"Radiant\"\n assert candidate(senate = \"RRDDD\") == \"Radiant\"\n assert candidate(senate = \"DRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"DRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"DDRR\") == \"Dire\"\n assert candidate(senate = \"DDRDRR\") == \"Dire\"\n assert candidate(senate = \"RRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRR\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RDRD\") == \"Radiant\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD\") == \"Dire\"\n assert candidate(senate = \"RRDDDRRRRDDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RDRRDDRRDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"DDDDDRRRRRRDDDDRRRRRRRRDDDRRR\") == \"Radiant\"\n assert candidate(senate = \"RDDDRDRDRRDDRR\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDRRRRRDDD\") == \"Dire\"\n assert candidate(senate = \"RRDDRRDDRRDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRRRRDDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RDRDRDRDRDRDRDRD\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDRRDDDRRDDDRRDDRRRRRR\") == \"Radiant\"\n assert candidate(senate = \"DDDRRDDDRRRDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDRRRRRR\") == \"Dire\"\n assert candidate(senate = \"RDRRDDDRRDDDRRDDDRDD\") == \"Dire\"\n assert candidate(senate = \"RRDDDDRRRRDDDDRR\") == \"Radiant\"\n assert candidate(senate = \"DRRDDDDDDRRRRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRRRRRRRDDDDDDDDDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDRRDDDRRDDDRRDDDRRDDDRRDDDR\") == \"Radiant\"\n assert candidate(senate = \"RDDDRRDDDRRDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDRRRDDDDRRRDDDDRRRDDDD\") == \"Dire\"\n assert candidate(senate = \"DDRDRDRDRDRDRDRDRDRD\") == \"Dire\"\n assert candidate(senate = \"RRDDDDDDRRRRRRDDDDDDRRRRRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRRDDDDDDRRRRRRDDDDDDRRRRRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRDDDDDRDDRRDDDR\") == \"Dire\"\n assert candidate(senate = \"DDDDDDRRRRRRRRRR\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDRRDDDRRDDDRRDDRR\") == \"Radiant\"\n assert candidate(senate = \"RRDDDDDDRRRDDDRRRRDD\") == \"Dire\"\n assert candidate(senate = \"RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRRDRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RDDDRRRRDDDDRRRR\") == \"Radiant\"\n assert candidate(senate = \"RRDRRDDDRRDDDRDD\") == \"Radiant\"\n assert candidate(senate = \"DDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDDRDD\") == \"Dire\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRRRRRDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDRRRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDRRDDDRRDDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRRDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDRRRRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRRRRDDDDDDDDDDDDDDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"RRDDDDRRRRRDDDDRRRR\") == \"Radiant\"\n assert candidate(senate = \"DDDDDDRRRRRRRRRRRRRR\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRDDRRRDDRRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRRDDDDDDRRRRRDDDDDDRRRRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRDDRRRDRDDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRDDDDRRDDDDRRDDDDRRDDDDRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RRDDDRRDDDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RDDRRRDDDDRRRDDDDRRRDD\") == \"Dire\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDRRRDDDDRRRDDDDRRRDDDDRRRDD\") == \"Dire\"\n assert candidate(senate = \"RRDRDRDRDRDRDRDRDRDR\") == \"Radiant\"\n assert candidate(senate = \"RRDDRRDDRRDDRRDDRRDDRRDDRRDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDRRDDDRRDDDRRDDRRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DDRRDDRRDDRRDDRRDDRRDDRRDDRRDDRRDDRRDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDRRRDDDRRRDD\") == \"Dire\"\n assert candidate(senate = \"DRRRRRDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"RDRDRDRDRDRDRDRDRDRDRDRDRDRDRD\") == \"Radiant\"\n assert candidate(senate = \"DDDDDDRRRRRRDDDDDDRRRRRRDDDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDRRRDDRRRRRR\") == \"Radiant\"\n assert candidate(senate = \"DDRRDDRRDDRRDDRRDDRRDDRRDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DRDDRRDDRRDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRRRDRDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DDDRRRDDRRRDD\") == \"Dire\"\n assert candidate(senate = \"DDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRD\") == \"Dire\"\n assert candidate(senate = \"RRRRDDDDDDDDRRRRRRDDDD\") == \"Dire\"\n assert candidate(senate = \"DDRDRDRDRDRDRDRDRDRDRDRDRDRD\") == \"Dire\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDDRRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDDDRRRRRRRRRR\") == \"Dire\"\n assert candidate(senate = \"DRDDRRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRRDDDDDDDDRRRR\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRDDD\") == \"Dire\"\n assert candidate(senate = \"DDRRRRRRRRDD\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRRRRRRRRRRDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDRDDRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRDDDDDDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDDRRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"DDDDRRRRRR\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRDDDDRRDDRRDDRRDDRRDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRRRRRRRRDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDRRRDDDDRRRDDDDRRRDDDDRRRDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDRRRRRRRRDDDDDDDDRRRRRRRR\") == \"Dire\"\n assert candidate(senate = \"DDRRRRDDDDRRRRDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDRRDDDRRDDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRDRRDDRRRDDRRDR\") == \"Radiant\"\n assert candidate(senate = \"RRRRRDDDDDRRRRDDDDDRRRRDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DRRRRDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDDDDDDDRRRRRRRRRRRRRR\") == \"Dire\"\n assert candidate(senate = \"RRRRRRRDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRDRRDDDRRDRRDDDRRDRRDDDRRD\") == \"Radiant\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"RDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR\") == \"Radiant\"\n assert candidate(senate = \"RRRDDDDRRRDDDDRRRDDDDRRRDDDDRR\") == \"Dire\"\n assert candidate(senate = \"RDRDRDRDRDRDRDRDRDRD\") == \"Radiant\"\n assert candidate(senate = \"RRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDRDR\") == \"Radiant\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRDRDDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"DDDDDDRRRRDDDDDDRRRRDDDDDDRRRR\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDDDRRRRRDDDDDDRRRRRDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRDDDDRRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRDDRRDDRRDDRRDDRRDDRRDD\") == \"Radiant\"\n assert candidate(senate = \"RRDRDRDRDRDRDR\") == \"Radiant\"\n assert candidate(senate = \"DRDDDRRDDDRRDDDRRDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDRRRRRRDDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDRRRRRRDDRRRRR\") == \"Dire\"\n assert candidate(senate = \"DDDRRRDDDDRRRRRDDDDDDRRRRRDDDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDRRRRDDDDRRRRDDDDRRRRDDDDRRRRDDDDRRRR\") == \"Dire\"\n assert candidate(senate = \"RRDDRRDDRRDDRRDDRRDDRRDDRRDDRR\") == \"Radiant\"\n assert candidate(senate = \"DRRDDDRRDDDRRDDDRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDDRRRRDDDDRRRRRDDDDDRR\") == \"Radiant\"\n assert candidate(senate = \"RRRRRDDDDDDDDDRRRRDDDDDDDDDRRRRDDDDDDDDDRRRRDDDDDDDDDRRRRDDDDDD\") == \"Dire\"\n assert candidate(senate = \"DDDDDDDDDDRRRRRRR\") == \"Dire\"\n assert candidate(senate = \"DDDDRRRRDDDDRRRR\") == \"Dire\"\n assert candidate(senate = \"DDDDRRDDDDRRDDDDRRDDDDRRDDDDRR\") == \"Dire\"\n assert candidate(senate = \"RRRRRDDDDDDDDDRRRDDDRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRRDDDDRRRRDDDDRRRRDDDDRRRRDDDDRRRRDDDD\") == \"Radiant\"\n assert candidate(senate = \"RRRRRRRRRRRRRDDDDDDDDDDDDDRRRRRRRRRRRRDDDDDDDDDDDDDRRRRRRRRRRRRDDDDDDDDD\") == \"Radiant\"\n assert candidate(senate = \"DDDDDDDDRRRRRRRR\") == \"Dire\"\n assert candidate(senate = \"DDRRRDDDDRRRRDDDRRR\") == \"Dire\"\n assert candidate(senate = \"DDRRDDRRDDRRDDRR\") == \"Dire\"\n assert candidate(senate = \"RRDDDRRDDDRRDDDRRDDDRRDDDRRDDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DDDDRRDDRRDDRRDDRRDD\") == \"Dire\"\n assert candidate(senate = \"DRDDRRDDRRDDRRDR\") == \"Dire\"\n assert candidate(senate = \"DRDRDRDRDRDRDRDR\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDDRRRRDDDDDRRRRDDDDDRRRRDDDDDRRRRDDDD\") == \"Dire\"\n assert candidate(senate = \"RRRDDDDRRRDDDDRR\") == \"Radiant\"\n assert candidate(senate = \"RDDDRDDDRDDDRDDD\") == \"Dire\"\n assert candidate(senate = \"RRDRDRDRDRDRDRDRDRDRDRDRDRDR\") == \"Radiant\"\n assert candidate(senate = \"DDRRDDRRDDRRDDRRDDRRDDRRDDRRDDRR\") == \"Dire\"\n assert candidate(senate = \"DDRDRDRDRDRDRDRD\") == \"Dire\"\n assert candidate(senate = \"DDRDDDRRDDDRRDDDRRDDDRRDDDRRDDDR\") == \"Dire\"\n assert candidate(senate = \"RRRDDDRRDDDRRDDDRRDDRRRR\") == \"Radiant\"\n assert candidate(senate = \"RRRRRDDDDRRRDDDDRRRDDDDRRRDD\") == \"Radiant\"\n", "comparison": "exact"}, "public_tests": ["\"RD\"", "\"RDD\""], "hints": [], "metadata": {"canonical_parameter_names": ["senate"], "leetcode_dataset_entry_point": "Solution().predictPartyVictory", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:14+00:00", "tests_total": 177, "tests_dropped": 11, "flags": [], "topic_tags": ["string", "greedy", "queue"]}, "language": "cpp", "interface": {"raw_signature": "string predictPartyVictory(string senate) {", "container": "Solution", "callable": "predictPartyVictory", "parameters": [{"name": "senate", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 650, "task_id": "2-keys-keyboard", "difficulty": "Medium", "problem_description": "There is only one character 'A' on the screen of a notepad. You can perform one of two operations on this notepad for each step:\n\n- Copy All: You can copy all the characters present on the screen (a partial copy is not allowed).\n- Paste: You can paste the characters which are copied last time.\n\nGiven an integer n, return the minimum number of operations to get the character 'A' exactly n times on the screen.\n\nExample 1:\n\nInput: n = 3\nOutput: 3\nExplanation: Initially, we have one character 'A'.\nIn step 1, we use Copy All operation.\nIn step 2, we use Paste operation to get 'AA'.\nIn step 3, we use Paste operation to get 'AAA'.\n\nExample 2:\n\nInput: n = 1\nOutput: 0\n\nConstraints:\n\n- 1 <= n <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == 3\n assert candidate(n = 12) == 7\n assert candidate(n = 100) == 14\n assert candidate(n = 10) == 7\n assert candidate(n = 1000) == 21\n assert candidate(n = 5) == 5\n assert candidate(n = 4) == 4\n assert candidate(n = 16) == 8\n assert candidate(n = 17) == 17\n assert candidate(n = 2) == 2\n assert candidate(n = 8) == 6\n assert candidate(n = 27) == 9\n assert candidate(n = 18) == 8\n assert candidate(n = 20) == 9\n assert candidate(n = 19) == 19\n assert candidate(n = 11) == 11\n assert candidate(n = 15) == 8\n assert candidate(n = 14) == 9\n assert candidate(n = 9) == 6\n assert candidate(n = 6) == 5\n assert candidate(n = 1) == 0\n assert candidate(n = 7) == 7\n assert candidate(n = 13) == 13\n assert candidate(n = 625) == 20\n assert candidate(n = 97) == 97\n assert candidate(n = 729) == 18\n assert candidate(n = 144) == 14\n assert candidate(n = 49) == 14\n assert candidate(n = 125) == 15\n assert candidate(n = 300) == 17\n assert candidate(n = 841) == 58\n assert candidate(n = 60) == 12\n assert candidate(n = 30) == 10\n assert candidate(n = 600) == 19\n assert candidate(n = 64) == 12\n assert candidate(n = 72) == 12\n assert candidate(n = 99) == 17\n assert candidate(n = 343) == 21\n assert candidate(n = 225) == 16\n assert candidate(n = 819) == 26\n assert candidate(n = 128) == 14\n assert candidate(n = 999) == 46\n assert candidate(n = 96) == 13\n assert candidate(n = 256) == 16\n assert candidate(n = 997) == 997\n assert candidate(n = 36) == 10\n assert candidate(n = 529) == 46\n assert candidate(n = 91) == 20\n assert candidate(n = 77) == 18\n assert candidate(n = 81) == 12\n assert candidate(n = 48) == 11\n assert candidate(n = 961) == 62\n assert candidate(n = 200) == 16\n assert candidate(n = 400) == 18\n assert candidate(n = 512) == 18\n assert candidate(n = 196) == 18\n assert candidate(n = 750) == 20\n assert candidate(n = 121) == 22\n assert candidate(n = 361) == 38\n assert candidate(n = 441) == 20\n assert candidate(n = 500) == 19\n assert candidate(n = 55) == 16\n assert candidate(n = 25) == 10\n", "comparison": "exact"}, "public_tests": ["3", "1"], "hints": ["How many characters may be there in the clipboard at the last step if n = 3? n = 7? n = 10? n = 24?"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().minSteps", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:17+00:00", "tests_total": 65, "tests_dropped": 2, "flags": [], "topic_tags": ["math", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int minSteps(int n) {", "container": "Solution", "callable": "minSteps", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 657, "task_id": "robot-return-to-origin", "difficulty": "Easy", "problem_description": "There is a robot starting at the position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves.\n\nYou are given a string moves that represents the move sequence of the robot where moves[i] represents its i^th move. Valid moves are 'R' (right), 'L' (left), 'U' (up), and 'D' (down).\n\nReturn true if the robot returns to the origin after it finishes all of its moves, or false otherwise.\n\nNote: The way that the robot is \"facing\" is irrelevant. 'R' will always make the robot move to the right once, 'L' will always make it move left, etc. Also, assume that the magnitude of the robot's movement is the same for each move.\n\nExample 1:\n\nInput: moves = \"UD\"\nOutput: true\nExplanation: The robot moves up once, and then down once. All moves have the same magnitude, so it ended up at the origin where it started. Therefore, we return true.\n\nExample 2:\n\nInput: moves = \"LL\"\nOutput: false\nExplanation: The robot moves left twice. It ends up two \"moves\" to the left of the origin. We return false because it is not at the origin at the end of its moves.\n\nConstraints:\n\n- 1 <= moves.length <= 2 * 10^4\n- moves only contains the characters 'U', 'D', 'L' and 'R'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(moves = \"LULLDDRRUURRDDLL\") == False\n assert candidate(moves = \"UUUUUUUUUUDDDDDDDDDDLLLLRRRR\") == True\n assert candidate(moves = \"UDLR\") == True\n assert candidate(moves = \"UUDDRRLL\") == True\n assert candidate(moves = \"LUDD\") == False\n assert candidate(moves = \"RLUD\") == True\n assert candidate(moves = \"RRDDLLUURR\") == False\n assert candidate(moves = \"LRLRLRLR\") == True\n assert candidate(moves = \"ULDRULDRULDR\") == True\n assert candidate(moves = \"LDRU\") == True\n assert candidate(moves = \"UDLRUDLRUDLR\") == True\n assert candidate(moves = \"UUUUUUUUUUUUUUDDDDDDDDDDDDDDLLLLLLLLRRRRRRRRRRRR\") == False\n assert candidate(moves = \"LDRRLU\") == True\n assert candidate(moves = \"UUDDLLRR\") == True\n assert candidate(moves = \"RLUDRLUD\") == True\n assert candidate(moves = \"LLLLRRRR\") == True\n assert candidate(moves = \"RULD\") == True\n assert candidate(moves = \"UUUUUUUUUUDDDDDDDDDDLLLLLLLLRRRRRRRR\") == True\n assert candidate(moves = \"UDUDUDUD\") == True\n assert candidate(moves = \"UUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDLLLLLLLLLLLLRRRRRRRRRRRRRR\") == False\n assert candidate(moves = \"RRDDLLUU\") == True\n assert candidate(moves = \"LL\") == False\n assert candidate(moves = \"UUUUDDDDLLLLRRRR\") == True\n assert candidate(moves = \"LRUD\") == True\n assert candidate(moves = \"UUDDLLRRUUDDLLRR\") == True\n assert candidate(moves = \"UUUUDDDD\") == True\n assert candidate(moves = \"RRDD\") == False\n assert candidate(moves = \"UUUUUUUUUUUUDDDDDDDDDDDDLLLLRRRRRRRRRRRR\") == False\n assert candidate(moves = \"RRRLLLDDDUUU\") == True\n assert candidate(moves = \"UD\") == True\n assert candidate(moves = \"UUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRR\") == True\n assert candidate(moves = \"UDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLR\") == True\n assert candidate(moves = \"LDDRUURLDDRUURLDDRUURLDDRUURLDDR\") == False\n assert candidate(moves = \"LLLLLRRRRRRLLLLRRRRRRLLL\") == True\n assert candidate(moves = \"UUDDDDUUUUUUUUUUDDDD\") == False\n assert candidate(moves = \"UDUDUDUDUDUDUDUDUDUDUDUDUDUD\") == True\n assert candidate(moves = \"UDUDUDUDUDUDUDUD\") == True\n assert candidate(moves = \"LLLLRRRRUUUUDDDDLRRRLLLLUUUUDDDD\") == False\n assert candidate(moves = \"RRDDLLUURRDDLLUURRDDLLUU\") == True\n assert candidate(moves = \"LRLRLRLRLRLRLRLR\") == True\n assert candidate(moves = \"LLRRLLRRLLRRLLRRLLRRLLRRLLRR\") == True\n assert candidate(moves = \"LDRULDRULDRU\") == True\n assert candidate(moves = \"LLLLRRRRLLLLRRRRLLLLRRRRLLLLRRRR\") == True\n assert candidate(moves = \"LLRRDDUULLRRDDUULLRRDDUULLRRDDUULL\") == False\n assert candidate(moves = \"RULLDDRRULLDDRRULLDDRR\") == False\n assert candidate(moves = \"LLLLUUUUUURRRRRRRRDDDDDD\") == False\n assert candidate(moves = \"RULLDRLDURDURLDLURDURLDLURDURLDL\") == False\n assert candidate(moves = \"UDLRUDLRUDLRUDLR\") == True\n assert candidate(moves = \"UUDDUUDDUUDDUUDDLLLLRRRRLLLLRRRR\") == True\n assert candidate(moves = \"RLRLRLRLRLRLRLRL\") == True\n assert candidate(moves = \"UUDDUUDDUUDDUUDDUUDDUUDD\") == True\n assert candidate(moves = \"UDLLRRUUDDLLRRUUDDLLRRUUDDLLRR\") == True\n assert candidate(moves = \"UUUDDDLLLRRR\") == True\n assert candidate(moves = \"UUUUDDDDLLLLRRRRUUUUDDDDLLLLRRRRUUUUDDDDLLLLRRRR\") == True\n assert candidate(moves = \"UUDDUUDDUUDDUUDDUUDDUUDDUUDD\") == True\n assert candidate(moves = \"UUUUDDDDLLLLRRRRUUUUDDDDLLLLRRRR\") == True\n assert candidate(moves = \"UUDDLLLLRRRRUUDDLLRR\") == True\n assert candidate(moves = \"UDUDUDUDUD\") == True\n assert candidate(moves = \"RLRLRLRLUDUDUDUD\") == True\n assert candidate(moves = \"URDLURDLURDLURDL\") == True\n assert candidate(moves = \"ULDRULDRLDURDLURDLURDLURDLURDL\") == False\n assert candidate(moves = \"RRDDLLUURRDDLLUURRDDLLUURRDDLLUU\") == True\n assert candidate(moves = \"LUDRLUDRLUDRLUDRLUDRLUDR\") == True\n assert candidate(moves = \"LRRLRLRLUDUDUDUD\") == True\n assert candidate(moves = \"UUDDUUDDUUDDUUDD\") == True\n assert candidate(moves = \"RRDDUULLRRDDUULL\") == True\n assert candidate(moves = \"LRUDLRUDLRUD\") == True\n assert candidate(moves = \"LURDLURDLURDLURD\") == True\n assert candidate(moves = \"LLLLRRRRUUDDUUDD\") == True\n assert candidate(moves = \"UDUDLRRLRLUDUDLR\") == True\n assert candidate(moves = \"LLLLLLLLRRRRRRRRUUUUUUUUDDDDDDDD\") == True\n assert candidate(moves = \"UDLRUDLRUDLRUDLRUDLRUDLR\") == True\n assert candidate(moves = \"UUDDDDUUDDDDUUDD\") == False\n assert candidate(moves = \"LLLLRRRRLLLLRRRR\") == True\n assert candidate(moves = \"ULLDRRDUULLDRRDU\") == True\n assert candidate(moves = \"UUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDDUUDD\") == True\n assert candidate(moves = \"RRRRRRRRRRLLLLLLLLLLDDDDDDDDDDUUUUUUUUUU\") == True\n assert candidate(moves = \"RLRLRLRLRL\") == True\n assert candidate(moves = \"LLLLDDDDUUUURRRR\") == True\n assert candidate(moves = \"UUDDLLRRUUDDDDLLRRUUDDLLRR\") == False\n assert candidate(moves = \"LLRRUUDDUUDDLLRR\") == True\n assert candidate(moves = \"LRRLRLRLUDUDUDUDLRRLRLRLUDUDUDUD\") == True\n assert candidate(moves = \"RLRLRLRLRLRLRLRLRLRL\") == True\n assert candidate(moves = \"UUDDUURRDD\") == False\n assert candidate(moves = \"UUDDUULLRR\") == False\n assert candidate(moves = \"RRRRDDDDLLLLUUUU\") == True\n assert candidate(moves = \"UDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLR\") == True\n assert candidate(moves = \"LLLLRRRRUUUDDDUUUDDDLLLLRRRR\") == True\n assert candidate(moves = \"UUUUUUUUDDDDDDDDLLLLLLLLRRRRRRRRRRLLRRUUDDLL\") == True\n assert candidate(moves = \"DDUUUUDDLLRRRR\") == False\n assert candidate(moves = \"UUDDLLUURRDDDDLLRR\") == False\n assert candidate(moves = \"RURURURURURURULULULULULULULU\") == False\n assert candidate(moves = \"UUUUUUDDDDDDLLLLRRRRRR\") == False\n assert candidate(moves = \"UUDDDDLLLLRRRRUUDDDD\") == False\n assert candidate(moves = \"LLLLLLLLRRRRRRRRUUUUUUUUDDDDDDDDLLLLLLLLRRRRRRRRUUUUUUUUDDDDDDDD\") == True\n assert candidate(moves = \"RRRDDDLLLUUUUUDDDD\") == False\n assert candidate(moves = \"UUUUUUUUUUDDDDDDDDDDLLLLLLLLRRRRRRRRRR\") == False\n assert candidate(moves = \"RUDLRUDLRUDLRUDL\") == True\n assert candidate(moves = \"UUDDLLRRUUDDLLRRUUDDLLRR\") == True\n assert candidate(moves = \"RUDLRULDRLUDLRULDRLUDLRULDRL\") == False\n assert candidate(moves = \"UDUDUDUDUDUDUDUDUDUDUDUD\") == True\n assert candidate(moves = \"URDLURDLURDL\") == True\n assert candidate(moves = \"UUDDDDDDDLLLLRRRRUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDLLLLRRRR\") == False\n assert candidate(moves = \"RRDDLLUURRDDLLUU\") == True\n assert candidate(moves = \"UUUUUUUUDDDDDDDDLLLLRRRR\") == True\n assert candidate(moves = \"RRRLLLLDDDUUUUUDDDLLLLURRRDDDDUUU\") == False\n assert candidate(moves = \"DDDDLLLLUUUUUUUUDDDDLLLLRRRRRRRR\") == True\n assert candidate(moves = \"UDUDUDUDLRRLRLRL\") == True\n assert candidate(moves = \"LURDLURDLURDLURDLURDLURDLURDLURDL\") == False\n assert candidate(moves = \"UUUUUUUUDDDDDDDDLLLLRRRRRRRR\") == False\n assert candidate(moves = \"RRUUDDLLDDUURLLR\") == True\n assert candidate(moves = \"ULURDLDRULURDLDRULURDLDRULURDLDR\") == True\n", "comparison": "exact"}, "public_tests": ["\"UD\"", "\"LL\""], "hints": [], "metadata": {"canonical_parameter_names": ["moves"], "leetcode_dataset_entry_point": "Solution().judgeCircle", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:30+00:00", "tests_total": 112, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "simulation"]}, "language": "cpp", "interface": {"raw_signature": "bool judgeCircle(string moves) {", "container": "Solution", "callable": "judgeCircle", "parameters": [{"name": "moves", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 658, "task_id": "find-k-closest-elements", "difficulty": "Medium", "problem_description": "Given a sorted integer array arr, two integers k and x, return the k closest integers to x in the array. The result should also be sorted in ascending order.\n\nAn integer a is closer to x than an integer b if:\n\n- |a - x| < |b - x|, or\n- |a - x| == |b - x| and a < b\n\nExample 1:\n\nInput: arr = [1,2,3,4,5], k = 4, x = 3\nOutput: [1,2,3,4]\n\nExample 2:\n\nInput: arr = [1,1,2,3,4,5], k = 4, x = -1\nOutput: [1,1,2,3]\n\nConstraints:\n\n- 1 <= k <= arr.length\n- 1 <= arr.length <= 10^4\n- arr is sorted in ascending order.\n- -10^4 <= arr[i], x <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(arr = [1, 3, 5, 7, 9],k = 4,x = 6) == [3, 5, 7, 9]\n assert candidate(arr = [1, 3, 5, 7, 9],k = 2,x = 6) == [5, 7]\n assert candidate(arr = [1, 3, 5, 7, 9],k = 1,x = 6) == [5]\n assert candidate(arr = [1, 3, 5, 7, 9],k = 5,x = 6) == [1, 3, 5, 7, 9]\n assert candidate(arr = [1, 2, 3, 4, 5],k = 2,x = 3) == [2, 3]\n assert candidate(arr = [1, 1, 1, 1, 1],k = 3,x = 1) == [1, 1, 1]\n assert candidate(arr = [1, 3, 5, 7, 9],k = 5,x = 8) == [1, 3, 5, 7, 9]\n assert candidate(arr = [1, 2, 3, 4, 5],k = 4,x = 3) == [1, 2, 3, 4]\n assert candidate(arr = [1, 2, 2, 2, 3, 3, 4, 5],k = 4,x = 2) == [1, 2, 2, 2]\n assert candidate(arr = [1, 1, 2, 3, 4, 5],k = 4,x = -1) == [1, 1, 2, 3]\n assert candidate(arr = [1, 2, 3, 4, 5],k = 1,x = 2) == [2]\n assert candidate(arr = [1, 2, 3, 4, 5],k = 5,x = 3) == [1, 2, 3, 4, 5]\n assert candidate(arr = [1, 3, 5, 7, 9],k = 3,x = 6) == [3, 5, 7]\n assert candidate(arr = [1, 2, 3, 4, 5],k = 3,x = 6) == [3, 4, 5]\n assert candidate(arr = [0, 0, 1, 2, 3, 3, 4, 7, 7, 8],k = 3,x = 5) == [3, 3, 4]\n assert candidate(arr = [1, 2, 2, 2, 3, 4, 5],k = 3,x = 2) == [2, 2, 2]\n assert candidate(arr = [1, 2, 2, 2, 5, 5, 5, 8, 9],k = 3,x = 4) == [5, 5, 5]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 1,x = 5) == [5]\n assert candidate(arr = [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6],k = 7,x = 3) == [2, 2, 2, 3, 3, 3, 4]\n assert candidate(arr = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],k = 7,x = 13) == [6, 8, 10, 12, 14, 16, 18]\n assert candidate(arr = [1, 2, 3, 100, 101, 102],k = 3,x = 99) == [100, 101, 102]\n assert candidate(arr = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90],k = 5,x = -90) == [-94, -93, -92, -91, -90]\n assert candidate(arr = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],k = 4,x = 90) == [100, 101, 102, 103]\n assert candidate(arr = [-10, -5, -2, 0, 3, 8, 12, 16, 20],k = 5,x = -1) == [-10, -5, -2, 0, 3]\n assert candidate(arr = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 4,x = 5) == [10, 10, 10, 10]\n assert candidate(arr = [-10, -5, 0, 5, 10],k = 3,x = -6) == [-10, -5, 0]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 5) == [3, 4, 5, 6, 7]\n assert candidate(arr = [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10],k = 9,x = 4) == [3, 3, 3, 3, 4, 4, 4, 5, 5]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 4,x = 5) == [3, 4, 5, 6]\n assert candidate(arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],k = 5,x = 6) == [4, 4, 5, 5, 5]\n assert candidate(arr = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10,x = 0) == [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 7,x = 15) == [4, 5, 6, 7, 8, 9, 10]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20,x = 10) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],k = 5,x = 10) == [5, 7, 9, 11, 13]\n assert candidate(arr = [-100, -50, -30, -20, -10, 0, 10, 20, 30, 50, 100],k = 5,x = -25) == [-50, -30, -20, -10, 0]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 4,x = 12) == [9, 11, 13, 15]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 7,x = 10) == [7, 8, 9, 10, 11, 12, 13]\n assert candidate(arr = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90],k = 5,x = -99) == [-100, -99, -98, -97, -96]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 3) == [1, 2, 3, 4, 5]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],k = 5,x = 28) == [23, 25, 27, 29, 31]\n assert candidate(arr = [-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10],k = 5,x = 1) == [-4, -2, 0, 2, 4]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 4,x = 10) == [7, 9, 11, 13]\n assert candidate(arr = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2],k = 5,x = 1) == [1, 1, 1, 1, 1]\n assert candidate(arr = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 7,x = 0) == [5, 5, 5, 5, 5, 5, 5]\n assert candidate(arr = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],k = 4,x = -5) == [-7, -6, -5, -4]\n assert candidate(arr = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3],k = 6,x = 1) == [1, 1, 1, 1, 1, 2]\n assert candidate(arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],k = 5,x = 0) == [1, 1, 1, 2, 2]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 6,x = 14) == [9, 11, 13, 15, 17, 19]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 10,x = 8) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10,x = 1) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 0) == [1, 2, 3, 4, 5]\n assert candidate(arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],k = 5,x = 3) == [2, 2, 3, 3, 3]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 7,x = 0) == [1, 2, 3, 4, 5, 6, 7]\n assert candidate(arr = [1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 4,x = 1) == [1, 1, 1, 2]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 5) == [3, 4, 5, 6, 7]\n assert candidate(arr = [1, 2, 2, 2, 3, 3, 4, 5],k = 3,x = 5) == [3, 4, 5]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1],k = 4,x = 1) == [1, 1, 1, 1]\n assert candidate(arr = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0],k = 5,x = 0) == [-4, -3, -2, -1, 0]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 4,x = 11) == [7, 8, 9, 10]\n assert candidate(arr = [1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10],k = 8,x = 5) == [3, 4, 4, 5, 5, 5, 6, 6]\n assert candidate(arr = [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6],k = 15,x = 3) == [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5,x = 1) == [1, 1, 1, 1, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 15) == [6, 7, 8, 9, 10]\n assert candidate(arr = [-10, -5, -3, -1, 0, 1, 3, 5, 7, 10],k = 4,x = 12) == [3, 5, 7, 10]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 0) == [1, 2, 3, 4, 5]\n assert candidate(arr = [1, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 4,x = 15) == [12, 14, 16, 18]\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10,x = 10) == [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(arr = [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10],k = 10,x = 5) == [4, 4, 4, 4, 5, 5, 5, 5, 5, 6]\n assert candidate(arr = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7],k = 8,x = 4) == [3, 3, 3, 4, 4, 5, 5, 5]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 8,x = 16) == [8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = 0) == [1, 2, 3]\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 7,x = 5) == [2, 3, 4, 5, 6, 7, 8]\n assert candidate(arr = [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10,x = 5) == [-40, -30, -20, -10, 0, 10, 20, 30, 40, 50]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = 15) == [8, 9, 10]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5,x = 11) == [6, 7, 8, 9, 10]\n assert candidate(arr = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],k = 5,x = 12) == [7, 9, 11, 13, 15]\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10,x = 15) == [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 3,x = 2) == [1, 1, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 4,x = 10) == [7, 8, 9, 10]\n assert candidate(arr = [1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9],k = 4,x = 4) == [3, 4, 5, 5]\n assert candidate(arr = [-10, -5, -3, -1, 0, 1, 2, 3, 5, 7],k = 3,x = -4) == [-5, -3, -1]\n assert candidate(arr = [-10, -5, -2, 0, 1, 3, 5, 8, 12],k = 3,x = -3) == [-5, -2, 0]\n assert candidate(arr = [1, 2, 3, 3, 3, 3, 4, 5, 6],k = 4,x = 3) == [3, 3, 3, 3]\n assert candidate(arr = [1, 2, 2, 2, 3, 3, 4, 5],k = 3,x = 1) == [1, 2, 2]\n assert candidate(arr = [1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8],k = 5,x = 2) == [1, 1, 1, 2, 2]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = 11) == [8, 9, 10]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 5,x = 10) == [5, 7, 9, 11, 13]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5,x = 1) == [1, 1, 1, 1, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = 0) == [1, 2, 3]\n assert candidate(arr = [1, 2, 2, 2, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 9],k = 6,x = 5) == [4, 5, 5, 5, 6, 6]\n assert candidate(arr = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90],k = 5,x = -94) == [-96, -95, -94, -93, -92]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],k = 6,x = 10) == [5, 7, 9, 11, 13, 15]\n assert candidate(arr = [1, 2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 7, 8, 9],k = 5,x = 4) == [3, 3, 4, 5, 5]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = 12) == [8, 9, 10]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 6,x = 5.5) == [3, 4, 5, 6, 7, 8]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 7,x = 10) == [7, 8, 9, 10, 11, 12, 13]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 2,x = 5) == [4, 5]\n assert candidate(arr = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 3,x = 55) == [40, 50, 60]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 7,x = 7) == [4, 5, 6, 7, 8, 9, 10]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25],k = 5,x = 12) == [7, 9, 11, 13, 15]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 6,x = 5) == [2, 3, 4, 5, 6, 7]\n assert candidate(arr = [-20, -15, -10, -5, 0, 5, 10, 15, 20],k = 4,x = 0) == [-10, -5, 0, 5]\n assert candidate(arr = [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6],k = 10,x = 3) == [1, 2, 2, 2, 3, 3, 3, 4, 4, 4]\n assert candidate(arr = [0, 1, 1, 1, 1, 2, 3, 4, 4, 4, 5, 5, 6, 7, 8, 9],k = 6,x = 0) == [0, 1, 1, 1, 1, 2]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 15,x = 10) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]\n assert candidate(arr = [1, 2, 3, 6, 7, 8, 9, 10],k = 3,x = 5) == [3, 6, 7]\n assert candidate(arr = [-10, -5, -2, -1, 0, 1, 2, 3, 5, 6, 7, 10, 15],k = 5,x = -3) == [-5, -2, -1, 0, 1]\n assert candidate(arr = [0, 0, 1, 1, 1, 1, 2, 2, 3, 3],k = 5,x = 1) == [0, 1, 1, 1, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 7,x = 11) == [4, 5, 6, 7, 8, 9, 10]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3,x = -2) == [1, 2, 3]\n assert candidate(arr = [1, 2, 3, 6, 9, 12, 15, 18, 21, 24],k = 5,x = 16) == [9, 12, 15, 18, 21]\n assert candidate(arr = [-10, -5, -3, -1, 0, 1, 3, 5, 7, 10],k = 5,x = -2) == [-5, -3, -1, 0, 1]\n assert candidate(arr = [-10, -5, -1, 0, 1, 5, 10],k = 3,x = -3) == [-5, -1, 0]\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5,x = 2) == [1, 1, 1, 1, 1]\n assert candidate(arr = [1, 3, 3, 3, 5, 5, 5, 7, 7, 9],k = 4,x = 6) == [5, 5, 5, 7]\n assert candidate(arr = [1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5],k = 7,x = 4) == [4, 4, 4, 4, 4, 4, 4]\n assert candidate(arr = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60],k = 5,x = 53) == [40, 45, 50, 55, 60]\n assert candidate(arr = [-5, -3, -2, -1, 0, 1, 2, 3, 4, 5],k = 6,x = -4) == [-5, -3, -2, -1, 0, 1]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10,x = 5) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(arr = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],k = 12,x = 2) == [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10,x = 5) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 6,x = 15) == [12, 13, 14, 15, 16, 17]\n assert candidate(arr = [-10, -5, 0, 3, 9, 12],k = 3,x = -7) == [-10, -5, 0]\n assert candidate(arr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5,x = 0) == [0, 0, 0, 0, 0]\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 4,x = 10) == [7, 9, 11, 13]\n assert candidate(arr = [-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50],k = 6,x = 15) == [-10, 0, 10, 20, 30, 40]\n assert candidate(arr = [1, 3, 4, 5, 8, 10, 15, 20, 30, 50, 100],k = 4,x = 12) == [5, 8, 10, 15]\n assert candidate(arr = [1, 3, 3, 4, 4, 4, 4, 5, 6, 8, 9],k = 5,x = 4) == [3, 4, 4, 4, 4]\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4,5]\n4\n3", "[1,1,2,3,4,5]\n4\n-1"], "hints": [], "metadata": {"canonical_parameter_names": ["arr", "k", "x"], "leetcode_dataset_entry_point": "Solution().findClosestElements", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:33+00:00", "tests_total": 129, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "sliding-window", "sorting", "heap-priority-queue"]}, "language": "cpp", "interface": {"raw_signature": "vector findClosestElements(vector& arr, int k, int x) {", "container": "Solution", "callable": "findClosestElements", "parameters": [{"name": "arr", "type": "vector&"}, {"name": "k", "type": "int"}, {"name": "x", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 659, "task_id": "split-array-into-consecutive-subsequences", "difficulty": "Medium", "problem_description": "You are given an integer array nums that is sorted in non-decreasing order.\n\nDetermine if it is possible to split nums into one or more subsequences such that both of the following conditions are true:\n\n- Each subsequence is a consecutive increasing sequence (i.e. each integer is exactly one more than the previous integer).\n- All subsequences have a length of 3 or more.\n\nReturn true if you can split nums according to the above conditions, or false otherwise.\n\nA subsequence of an array is a new array that is formed from the original array by deleting some (can be none) of the elements without disturbing the relative positions of the remaining elements. (i.e., [1,3,5] is a subsequence of [1,2,3,4,5] while [1,3,2] is not).\n\nExample 1:\n\nInput: nums = [1,2,3,3,4,5]\nOutput: true\nExplanation: nums can be split into the following subsequences:\n[1,2,3,3,4,5] --> 1, 2, 3\n[1,2,3,3,4,5] --> 3, 4, 5\n\nExample 2:\n\nInput: nums = [1,2,3,3,4,4,5,5]\nOutput: true\nExplanation: nums can be split into the following subsequences:\n[1,2,3,3,4,4,5,5] --> 1, 2, 3, 4, 5\n[1,2,3,3,4,4,5,5] --> 3, 4, 5\n\nExample 3:\n\nInput: nums = [1,2,3,4,4,5]\nOutput: false\nExplanation: It is impossible to split nums into consecutive increasing subsequences of length 3 or more.\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -1000 <= nums[i] <= 1000\n- nums is sorted in non-decreasing order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 4, 4, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10]) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5]) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 5]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == True\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 6]) == False\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 4, 5, 5, 5, 6, 7]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 5, 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]) == True\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 7, 7, 8, 9, 9, 9, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15]) == False\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10]) == False\n assert candidate(nums = [-1000, -999, -999, -998, -997, -996, -995, -994, -993, -992, -991, -990, -899, -898, -897, -896, -895, -894, -893, -892, -891, -890]) == False\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 16]) == False\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, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 12]) == False\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]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 14, 15, 16, 16, 17, 18, 19]) == True\n assert candidate(nums = [1, 2, 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]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 15, 15, 15]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]) == False\n assert candidate(nums = [1, 2, 2, 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, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20]) == True\n assert candidate(nums = [1, 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]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 6, 7, 8, 8, 8, 9, 10, 10, 10, 11, 12, 13, 13, 13, 14, 15, 15, 16, 17, 18, 18, 18, 19, 20, 20, 21, 22, 23, 24, 25, 25]) == 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]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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]) == True\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 7, 8, 8, 9, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 15]) == True\n assert candidate(nums = [1, 2, 2, 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]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == False\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14]) == False\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, 11]) == 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, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11]) == False\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, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10]) == False\n assert candidate(nums = [1, 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, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 26, 26, 26, 27, 27, 28, 28, 29, 29, 30]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 12]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 11, 12, 12, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16]) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 9, 10, 10]) == False\n assert candidate(nums = [1, 1, 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]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9]) == False\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13]) == True\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [-3, -2, -1, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == True\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 13, 14, 15]) == False\n assert candidate(nums = [1, 2, 3, 3, 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]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == True\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 14, 15]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 11]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12]) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == False\n assert candidate(nums = [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 15]) == False\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 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]) == True\n assert candidate(nums = [-5, -4, -4, -3, -3, -2, -2, -1, -1, 0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13]) == False\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 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(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, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17]) == True\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, 7, 7, 7, 7, 7, 7, 7]) == False\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13]) == False\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10]) == 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, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 16, 17, 18, 19, 20, 20, 20, 20, 20]) == False\n assert candidate(nums = [1, 2, 3, 3, 3, 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]) == False\n assert candidate(nums = [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]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 20]) == False\n assert candidate(nums = [-1, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10]) == True\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 3, 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]) == True\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 13, 14, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 22, 23, 24, 25, 25, 25]) == False\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, 7, 7, 8, 8, 9, 9]) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [1, 2, 3, 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]) == True\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, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15]) == False\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16]) == True\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8]) == False\n assert candidate(nums = [5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [1, 2, 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]) == True\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]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15]) == True\n assert candidate(nums = [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, 17, 18, 18, 19, 19, 20, 20]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, 17, 18]) == True\n assert candidate(nums = [1, 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]) == True\n assert candidate(nums = [1, 2, 2, 2, 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]) == True\n assert candidate(nums = [1, 2, 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]) == True\n", "comparison": "exact"}, "public_tests": ["[1,2,3,3,4,5]", "[1,2,3,3,4,4,5,5]", "[1,2,3,4,4,5]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().isPossible", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:35+00:00", "tests_total": 123, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "greedy", "heap-priority-queue"]}, "language": "cpp", "interface": {"raw_signature": "bool isPossible(vector& nums) {", "container": "Solution", "callable": "isPossible", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 661, "task_id": "image-smoother", "difficulty": "Easy", "problem_description": "An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the average of the cell and the eight surrounding cells (i.e., the average of the nine cells in the blue smoother). If one or more of the surrounding cells of a cell is not present, we do not consider it in the average (i.e., the average of the four cells in the red smoother).\n\nGiven an m x n integer matrix img representing the grayscale of an image, return the image after applying the smoother on each cell of it.\n\nExample 1:\n\nInput: img = [[1,1,1],[1,0,1],[1,1,1]]\nOutput: [[0,0,0],[0,0,0],[0,0,0]]\nExplanation:\nFor the points (0,0), (0,2), (2,0), (2,2): floor(3/4) = floor(0.75) = 0\nFor the points (0,1), (1,0), (1,2), (2,1): floor(5/6) = floor(0.83333333) = 0\nFor the point (1,1): floor(8/9) = floor(0.88888889) = 0\n\nExample 2:\n\nInput: img = [[100,200,100],[200,50,200],[100,200,100]]\nOutput: [[137,141,137],[141,138,141],[137,141,137]]\nExplanation:\nFor the points (0,0), (0,2), (2,0), (2,2): floor((100+200+200+50)/4) = floor(137.5) = 137\nFor the points (0,1), (1,0), (1,2), (2,1): floor((200+200+50+200+100+100)/6) = floor(141.666667) = 141\nFor the point (1,1): floor((50+200+200+200+200+100+100+100+100)/9) = floor(138.888889) = 138\n\nConstraints:\n\n- m == img.length\n- n == img[i].length\n- 1 <= m, n <= 200\n- 0 <= img[i][j] <= 255\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(img = [[100, 200, 100], [200, 50, 200], [100, 200, 100]]) == [[137, 141, 137], [141, 138, 141], [137, 141, 137]]\n assert candidate(img = [[10, 20, 30], [40, 50, 60], [70, 80, 90]]) == [[30, 35, 40], [45, 50, 55], [60, 65, 70]]\n assert candidate(img = [[1]]) == [[1]]\n assert candidate(img = [[255, 255, 255], [255, 255, 255], [255, 255, 255]]) == [[255, 255, 255], [255, 255, 255], [255, 255, 255]]\n assert candidate(img = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [[3, 3, 4], [4, 5, 5], [6, 6, 7]]\n assert candidate(img = [[1, 1, 1], [1, 0, 1], [1, 1, 1]]) == [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n assert candidate(img = [[1, 2], [3, 4]]) == [[2, 2], [2, 2]]\n assert candidate(img = [[1, 2, 3], [4, 5, 6]]) == [[3, 3, 4], [3, 3, 4]]\n assert candidate(img = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]) == [[3, 4, 5, 5], [5, 6, 7, 7], [9, 10, 11, 11], [11, 12, 13, 13]]\n assert candidate(img = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n assert candidate(img = [[255]]) == [[255]]\n assert candidate(img = [[1, 1], [1, 1]]) == [[1, 1], [1, 1]]\n assert candidate(img = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [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(img = [[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) == [[191, 170, 170, 191], [170, 141, 141, 170], [170, 141, 141, 170], [191, 170, 170, 191]]\n assert candidate(img = [[128, 64, 32, 16, 8], [8, 128, 64, 32, 16], [16, 8, 128, 64, 32], [32, 16, 8, 128, 64], [64, 32, 16, 8, 128]]) == [[82, 70, 56, 28, 18], [58, 64, 59, 43, 28], [34, 45, 64, 59, 56], [28, 35, 45, 64, 70], [36, 28, 34, 58, 82]]\n assert candidate(img = [[255, 0, 255], [0, 255, 0], [255, 0, 255]]) == [[127, 127, 127], [127, 141, 127], [127, 127, 127]]\n assert candidate(img = [[123, 45, 67], [89, 101, 113], [125, 137, 149], [161, 173, 185], [197, 209, 221]]) == [[89, 89, 81], [103, 105, 102], [131, 137, 143], [167, 173, 179], [185, 191, 197]]\n assert candidate(img = [[255, 0, 0], [0, 255, 0], [0, 0, 255]]) == [[127, 85, 63], [85, 85, 85], [63, 85, 127]]\n assert candidate(img = [[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]]) == [[40, 45, 55, 65, 70], [65, 70, 80, 90, 95], [115, 120, 130, 140, 145], [165, 170, 180, 190, 195], [190, 195, 205, 215, 220]]\n assert candidate(img = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == [[1, 1, 1, 1, 1, 1], [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(img = [[1, 2, 3, 4, 5, 6], [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, 5, 6, 7, 8, 8], [7, 8, 9, 10, 11, 11], [13, 14, 15, 16, 17, 17], [19, 20, 21, 22, 23, 23], [22, 23, 24, 25, 26, 26]]\n assert candidate(img = [[255, 127, 63, 31], [15, 7, 3, 1], [255, 255, 255, 255], [255, 255, 255, 255]]) == [[101, 78, 38, 24], [152, 137, 110, 101], [173, 172, 171, 170], [255, 255, 255, 255]]\n assert candidate(img = [[10, 20], [30, 40]]) == [[25, 25], [25, 25]]\n assert candidate(img = [[200, 150, 100], [50, 0, 50], [100, 150, 200]]) == [[100, 91, 75], [108, 111, 108], [75, 91, 100]]\n assert candidate(img = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]) == [[3, 3, 4], [4, 5, 5], [7, 8, 8], [10, 11, 11], [12, 12, 13]]\n assert candidate(img = [[0, 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, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]\n assert candidate(img = [[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]]) == [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [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(img = [[255, 0, 0, 255], [0, 0, 0, 0], [0, 0, 0, 0], [255, 0, 0, 255]]) == [[63, 42, 42, 63], [42, 28, 28, 42], [42, 28, 28, 42], [63, 42, 42, 63]]\n assert candidate(img = [[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 candidate(img = [[255, 0, 255, 0, 255], [0, 255, 0, 255, 0], [255, 0, 255, 0, 255], [0, 255, 0, 255, 0], [255, 0, 255, 0, 255]]) == [[127, 127, 127, 127, 127], [127, 141, 113, 141, 127], [127, 113, 141, 113, 127], [127, 141, 113, 141, 127], [127, 127, 127, 127, 127]]\n assert candidate(img = [[255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255]]) == [[255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255], [255, 255, 255, 255, 255]]\n assert candidate(img = [[200, 50, 50], [50, 200, 50], [50, 50, 200]]) == [[125, 100, 87], [100, 100, 100], [87, 100, 125]]\n assert candidate(img = [[0, 0, 0, 0], [0, 255, 255, 0], [0, 255, 255, 0], [0, 0, 0, 0]]) == [[63, 85, 85, 63], [85, 113, 113, 85], [85, 113, 113, 85], [63, 85, 85, 63]]\n assert candidate(img = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0], [0, 1, 255, 255, 255, 1, 0], [0, 1, 255, 0, 255, 1, 0], [0, 1, 255, 255, 255, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == [[0, 0, 0, 0, 0, 0, 0], [0, 28, 57, 85, 57, 28, 0], [0, 57, 85, 142, 85, 57, 0], [0, 85, 142, 226, 142, 85, 0], [0, 57, 85, 142, 85, 57, 0], [0, 28, 57, 85, 57, 28, 0], [0, 0, 0, 0, 0, 0, 0]]\n assert candidate(img = [[10, 20, 30], [40, 50, 60], [70, 80, 90], [100, 110, 120], [130, 140, 150]]) == [[30, 35, 40], [45, 50, 55], [75, 80, 85], [105, 110, 115], [120, 125, 130]]\n assert candidate(img = [[255, 0, 0, 0, 255], [0, 255, 255, 255, 0], [0, 255, 0, 255, 0], [0, 255, 255, 255, 0], [255, 0, 0, 0, 255]]) == [[127, 127, 127, 127, 127], [127, 113, 141, 113, 127], [127, 141, 226, 141, 127], [127, 113, 141, 113, 127], [127, 127, 127, 127, 127]]\n assert candidate(img = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 255, 1, 0], [0, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == [[0, 0, 0, 0, 0], [0, 28, 28, 28, 0], [0, 28, 29, 28, 0], [0, 28, 28, 28, 0], [0, 0, 0, 0, 0]]\n assert candidate(img = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]) == [[3, 4, 5, 5], [5, 6, 7, 7], [9, 10, 11, 11], [11, 12, 13, 13]]\n assert candidate(img = [[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]]) == [[5, 5, 6, 7, 8, 9, 10, 11, 12], [9, 10, 11, 12, 13, 14, 15, 16, 16], [14, 14, 15, 16, 17, 18, 19, 20, 21]]\n assert candidate(img = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == [[4, 4, 5, 6, 7], [6, 7, 8, 9, 9], [11, 12, 13, 14, 14], [14, 14, 15, 16, 17]]\n assert candidate(img = [[0, 1, 2, 3, 4, 5], [5, 4, 3, 2, 1, 0], [0, 1, 2, 3, 4, 5], [5, 4, 3, 2, 1, 0], [0, 1, 2, 3, 4, 5], [5, 4, 3, 2, 1, 0]]) == [[2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 3, 3], [3, 3, 2, 2, 2, 1], [1, 2, 2, 2, 3, 3], [3, 3, 2, 2, 2, 1], [2, 2, 2, 2, 2, 2]]\n assert candidate(img = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]]) == [[1, 1, 1, 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(img = [[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, 0, 0, 0, 1], [1, 0, 0, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]]\n assert candidate(img = [[10, 20, 30, 40], [50, 60, 70, 80], [90, 100, 110, 120], [130, 140, 150, 160], [170, 180, 190, 200]]) == [[35, 40, 50, 55], [55, 60, 70, 75], [95, 100, 110, 115], [135, 140, 150, 155], [155, 160, 170, 175]]\n assert candidate(img = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == [[0, 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(img = [[1, 2, 3, 4, 5, 6], [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]]) == [[4, 5, 6, 7, 8, 8], [7, 8, 9, 10, 11, 11], [13, 14, 15, 16, 17, 17], [19, 20, 21, 22, 23, 23], [25, 26, 27, 28, 29, 29], [28, 29, 30, 31, 32, 32]]\n assert candidate(img = [[255, 100, 50, 25, 0], [25, 50, 100, 255, 255], [0, 25, 50, 100, 255], [255, 255, 100, 50, 25], [25, 100, 255, 255, 0]]) == [[107, 96, 96, 114, 133], [75, 72, 83, 121, 148], [101, 95, 109, 132, 156], [110, 118, 132, 121, 114], [158, 165, 169, 114, 82]]\n assert candidate(img = [[50, 100, 150, 200], [250, 50, 100, 150], [200, 250, 50, 100], [100, 150, 200, 250]]) == [[112, 116, 125, 150], [150, 133, 127, 125], [166, 150, 144, 141], [175, 158, 166, 150]]\n assert candidate(img = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == [[4, 4, 5, 6, 7], [6, 7, 8, 9, 9], [11, 12, 13, 14, 14], [16, 17, 18, 19, 19], [19, 19, 20, 21, 22]]\n assert candidate(img = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == [[1, 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(img = [[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 255, 255], [255, 255, 255, 255]]) == [[191, 170, 170, 191], [170, 170, 170, 212], [170, 170, 170, 212], [191, 212, 212, 255]]\n assert candidate(img = [[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(img = [[10, 10, 10], [10, 10, 10], [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 candidate(img = [[100, 150, 200, 250], [100, 150, 200, 250], [100, 150, 200, 250], [100, 150, 200, 250], [100, 150, 200, 250], [100, 150, 200, 250]]) == [[125, 150, 200, 225], [125, 150, 200, 225], [125, 150, 200, 225], [125, 150, 200, 225], [125, 150, 200, 225], [125, 150, 200, 225]]\n assert candidate(img = [[0, 255, 255], [255, 255, 0], [255, 0, 0]]) == [[191, 170, 191], [170, 141, 127], [191, 127, 63]]\n assert candidate(img = [[100, 200, 150], [175, 200, 125], [100, 150, 200]]) == [[168, 158, 168], [154, 155, 170], [156, 158, 168]]\n assert candidate(img = [[50, 50, 50, 50], [50, 50, 50, 50], [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 candidate(img = [[255, 255, 255], [255, 0, 255], [255, 255, 255]]) == [[191, 212, 191], [212, 226, 212], [191, 212, 191]]\n assert candidate(img = [[128, 64, 32], [16, 8, 4], [2, 1, 0]]) == [[54, 42, 27], [36, 28, 18], [6, 5, 3]]\n assert candidate(img = [[50, 100, 150, 200, 250], [250, 50, 100, 150, 200], [200, 250, 50, 100, 150], [150, 200, 250, 50, 100], [100, 150, 200, 250, 50]]) == [[112, 116, 125, 175, 200], [150, 133, 127, 150, 175], [183, 166, 133, 127, 125], [175, 172, 166, 133, 116], [150, 175, 183, 150, 112]]\n assert candidate(img = [[255, 0, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0], [0, 255, 0, 255]]) == [[127, 127, 127, 127], [127, 141, 113, 127], [127, 113, 141, 127], [127, 127, 127, 127]]\n assert candidate(img = [[100, 200, 150, 125], [250, 50, 75, 200], [150, 250, 100, 50], [200, 100, 250, 150]]) == [[150, 137, 133, 137], [166, 147, 133, 116], [166, 158, 136, 137], [175, 175, 150, 137]]\n assert candidate(img = [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [65, 70, 75, 80]]) == [[17, 20, 25, 27], [27, 30, 35, 37], [47, 50, 55, 57], [57, 60, 65, 67]]\n assert candidate(img = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]) == [[3, 3, 4], [4, 5, 5], [7, 8, 8], [10, 11, 11], [13, 14, 14], [15, 15, 16]]\n assert candidate(img = [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]]) == [[255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255], [255, 255, 255, 255]]\n assert candidate(img = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]) == [[3, 3, 4], [4, 5, 5], [7, 8, 8], [10, 11, 11], [12, 12, 13]]\n assert candidate(img = [[10, 20, 30, 40, 50], [20, 30, 40, 50, 60], [30, 40, 50, 60, 70], [40, 50, 60, 70, 80], [50, 60, 70, 80, 90]]) == [[20, 25, 35, 45, 50], [25, 30, 40, 50, 55], [35, 40, 50, 60, 65], [45, 50, 60, 70, 75], [50, 55, 65, 75, 80]]\n assert candidate(img = [[255, 255, 255, 255], [255, 0, 0, 255], [255, 0, 0, 255], [255, 255, 255, 255]]) == [[191, 170, 170, 191], [170, 141, 141, 170], [170, 141, 141, 170], [191, 170, 170, 191]]\n assert candidate(img = [[50, 60, 70, 80], [40, 50, 60, 70], [30, 40, 50, 60], [20, 30, 40, 50]]) == [[50, 55, 65, 70], [45, 50, 60, 65], [35, 40, 50, 55], [30, 35, 45, 50]]\n assert candidate(img = [[128, 128, 128], [128, 128, 128], [128, 128, 128], [128, 128, 128], [128, 128, 128]]) == [[128, 128, 128], [128, 128, 128], [128, 128, 128], [128, 128, 128], [128, 128, 128]]\n assert candidate(img = [[0, 0, 0, 0, 0], [0, 255, 255, 255, 0], [0, 255, 255, 255, 0], [0, 255, 255, 255, 0], [0, 0, 0, 0, 0]]) == [[63, 85, 127, 85, 63], [85, 113, 170, 113, 85], [127, 170, 255, 170, 127], [85, 113, 170, 113, 85], [63, 85, 127, 85, 63]]\n assert candidate(img = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 7, 5, 3, 1], [2, 4, 6, 8, 10, 8, 6, 4, 2], [1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2], [3, 2, 1, 4, 5, 6, 9, 8, 7], [7, 8, 9, 6, 5, 4, 1, 2, 3]]) == [[5, 5, 5, 5, 5, 5, 5, 5, 5], [4, 4, 5, 5, 5, 5, 5, 4, 4], [4, 5, 6, 7, 7, 6, 4, 3, 2], [2, 2, 4, 5, 5, 5, 4, 2, 2], [2, 2, 3, 4, 5, 5, 5, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 5, 5, 6, 6, 6, 6], [6, 6, 6, 5, 5, 5, 4, 4, 4], [5, 5, 5, 5, 5, 5, 5, 5, 5]]\n assert candidate(img = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == [[4, 4, 5, 6, 7], [6, 7, 8, 9, 9], [11, 12, 13, 14, 14], [16, 17, 18, 19, 19], [19, 19, 20, 21, 22]]\n assert candidate(img = [[0, 0, 0, 0, 0, 0], [0, 255, 255, 255, 255, 0], [0, 255, 0, 0, 255, 0], [0, 255, 0, 0, 255, 0], [0, 255, 255, 255, 255, 0], [0, 0, 0, 0, 0, 0]]) == [[63, 85, 127, 127, 85, 63], [85, 85, 113, 113, 85, 85], [127, 113, 141, 141, 113, 127], [127, 113, 141, 141, 113, 127], [85, 85, 113, 113, 85, 85], [63, 85, 127, 127, 85, 63]]\n assert candidate(img = [[255, 0, 0, 255, 0], [0, 255, 0, 255, 0], [0, 0, 255, 0, 0], [0, 255, 0, 255, 0], [255, 0, 0, 255, 0]]) == [[127, 85, 127, 85, 127], [85, 85, 113, 85, 85], [85, 85, 141, 85, 85], [85, 85, 113, 85, 85], [127, 85, 127, 85, 127]]\n assert candidate(img = [[255, 0, 255, 0], [0, 255, 0, 255], [255, 0, 255, 0], [0, 255, 0, 255]]) == [[127, 127, 127, 127], [127, 141, 113, 127], [127, 113, 141, 127], [127, 127, 127, 127]]\n assert candidate(img = [[255, 0, 0, 0], [0, 255, 0, 0], [0, 0, 255, 0], [0, 0, 0, 255]]) == [[127, 85, 42, 0], [85, 85, 56, 42], [42, 56, 85, 85], [0, 42, 85, 127]]\n assert candidate(img = [[200, 100, 150, 200, 50], [50, 100, 150, 200, 250], [250, 200, 150, 100, 50], [50, 100, 150, 200, 250], [250, 200, 150, 100, 50]]) == [[112, 125, 150, 166, 175], [150, 150, 150, 144, 141], [125, 133, 150, 166, 175], [175, 166, 150, 133, 125], [150, 150, 150, 150, 150]]\n", "comparison": "exact"}, "public_tests": ["[[1,1,1],[1,0,1],[1,1,1]]", "[[100,200,100],[200,50,200],[100,200,100]]"], "hints": [], "metadata": {"canonical_parameter_names": ["img"], "leetcode_dataset_entry_point": "Solution().imageSmoother", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:39+00:00", "tests_total": 81, "tests_dropped": 3, "flags": ["has_images"], "topic_tags": ["array", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "vector> imageSmoother(vector>& img) {", "container": "Solution", "callable": "imageSmoother", "parameters": [{"name": "img", "type": "vector>&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 664, "task_id": "strange-printer", "difficulty": "Hard", "problem_description": "There is a strange printer with the following two special properties:\n\n- The printer can only print a sequence of the same character each time.\n- At each turn, the printer can print new characters starting from and ending at any place and will cover the original existing characters.\n\nGiven a string s, return the minimum number of turns the printer needed to print it.\n\nExample 1:\n\nInput: s = \"aaabbb\"\nOutput: 2\nExplanation: Print \"aaa\" first and then print \"bbb\".\n\nExample 2:\n\nInput: s = \"aba\"\nOutput: 2\nExplanation: Print \"aaa\" first and then print \"b\" from the second place of the string, which will cover the existing character 'a'.\n\nConstraints:\n\n- 1 <= s.length <= 100\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"pppppppp\") == 1\n assert candidate(s = \"abcba\") == 3\n assert candidate(s = \"aabbaa\") == 2\n assert candidate(s = \"zzzzy\") == 2\n assert candidate(s = \"abababab\") == 5\n assert candidate(s = \"ppqpqr\") == 4\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"abcabcabc\") == 7\n assert candidate(s = \"aabbc\") == 3\n assert candidate(s = \"aabaa\") == 2\n assert candidate(s = \"abcabc\") == 5\n assert candidate(s = \"abcdabcd\") == 7\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\") == 26\n assert candidate(s = \"abcdabcdabcd\") == 10\n assert candidate(s = \"abc\") == 3\n assert candidate(s = \"abcd\") == 4\n assert candidate(s = \"aaabbb\") == 2\n assert candidate(s = \"zzzzyyyxx\") == 3\n assert candidate(s = \"aabbccddeeff\") == 6\n assert candidate(s = \"aba\") == 2\n assert candidate(s = \"aabbcc\") == 3\n assert candidate(s = \"abacaba\") == 4\n assert candidate(s = \"abca\") == 3\n assert candidate(s = \"abacabadabacabadabacaba\") == 12\n assert candidate(s = \"aabbaabbaabb\") == 4\n assert candidate(s = \"abababababaabababa\") == 9\n assert candidate(s = \"abcabcabcabc\") == 9\n assert candidate(s = \"abacabadabacabadabacabadabacabad\") == 17\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg\") == 43\n assert candidate(s = \"zzyzxzyzxzyzxzyzxzyzxzyzxzyz\") == 14\n assert candidate(s = \"aabbccddeeaabbccddeeaabbcc\") == 11\n assert candidate(s = \"aabbaaabbbaaa\") == 3\n assert candidate(s = \"abcdefghabcdeghijklmno\") == 21\n assert candidate(s = \"aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbcccccccccccccccccc\") == 3\n assert candidate(s = \"aabbccddeeaabbccddeeaabbccddeeaabbcc\") == 15\n assert candidate(s = \"zzzzzyyyzzzzyyy\") == 3\n assert candidate(s = \"ababababababababababababababababababababababababababababababababababababababababababababa\") == 45\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\") == 21\n assert candidate(s = \"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghij\") == 46\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\") == 33\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzz\") == 26\n assert candidate(s = \"abacabad\") == 5\n assert candidate(s = \"aaaabbbbccccddddeeeeaabbcc\") == 7\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"abcabcabcabcabcabc\") == 13\n assert candidate(s = \"zzzzzzzzzzzzzzy\") == 2\n assert candidate(s = \"aabbccddeeffgghhii\") == 9\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzy\") == 2\n assert candidate(s = \"abcdeffedcba\") == 6\n assert candidate(s = \"aaaaaaaaaabbbbbbbbccccccccddddddddeeeeeeeefffffffff\") == 6\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 1\n assert candidate(s = \"abcdefedcba\") == 6\n assert candidate(s = \"aabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabbaabb\") == 13\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 1\n assert candidate(s = \"abababababababababababababab\") == 15\n assert candidate(s = \"abcdeedcbaedcbaedcba\") == 13\n assert candidate(s = \"abacabadabacaba\") == 8\n assert candidate(s = \"abababababababababababababababababababababababab\") == 25\n assert candidate(s = \"aaaaaaaaaabbbbbbbbbbcccccccccc\") == 3\n assert candidate(s = \"aaabbbcccdddfffgggaaa\") == 6\n assert candidate(s = \"aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbccccccccccccccccccccdddddddddddddddddd\") == 4\n assert candidate(s = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccba\") == 26\n assert candidate(s = \"aabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeff\") == 21\n assert candidate(s = \"abcdefghijihgfedcba\") == 10\n assert candidate(s = \"aabbccddeeaabbccddeeaabbccddeeee\") == 13\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\") == 33\n assert candidate(s = \"abacabadabacabadabacabadabacabadabacabad\") == 21\n assert candidate(s = \"zzzyyxxwvvuuttrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == 25\n assert candidate(s = \"ababababababababababababab\") == 14\n assert candidate(s = \"aabbccddeeffgg\") == 7\n assert candidate(s = \"abacabadabacabadabacabadabacabadabacabadabacabadabacabad\") == 29\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 26\n assert candidate(s = \"aabbccddeeffgghhiijj\") == 10\n assert candidate(s = \"abacabadabacabadabacabadabacabadabacabadabacabad\") == 25\n assert candidate(s = \"abcdefg\") == 7\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 26\n assert candidate(s = \"abcabcabcabcabcabcabcabcaabbcc\") == 19\n assert candidate(s = \"abacabadabacabadabacabad\") == 13\n assert candidate(s = \"aaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaabaaab\") == 13\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 26\n assert candidate(s = \"abcbaabcbaabcba\") == 7\n assert candidate(s = \"aabbbcccdddaaabbccccddeee\") == 8\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllll\") == 12\n assert candidate(s = \"ababababab\") == 6\n assert candidate(s = \"abcddcba\") == 4\n assert candidate(s = \"aabbaabbccddeeffaabb\") == 8\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcd\") == 25\n assert candidate(s = \"abcdefghihgfedcba\") == 9\n assert candidate(s = \"abcabcabcabcabcabcabcabcabc\") == 19\n assert candidate(s = \"abcabcabcabcabcabcabcabc\") == 17\n assert candidate(s = \"abcdabcdbaba\") == 8\n assert candidate(s = \"xyzyxzyzyxzyzyxzyz\") == 11\n assert candidate(s = \"abcdefghijhgfedcba\") == 10\n assert candidate(s = \"mississippi\") == 5\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"ababababababababababababababababababababababababababa\") == 27\n assert candidate(s = \"abcabcabcabcabc\") == 11\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 37\n assert candidate(s = \"aabbccddeeaabbcc\") == 7\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n", "comparison": "exact"}, "public_tests": ["\"aaabbb\"", "\"aba\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().strangePrinter", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:46+00:00", "tests_total": 102, "tests_dropped": 1, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int strangePrinter(string s) {", "container": "Solution", "callable": "strangePrinter", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 665, "task_id": "non-decreasing-array", "difficulty": "Medium", "problem_description": "Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most one element.\n\nWe define an array is non-decreasing if nums[i] <= nums[i + 1] holds for every i (0-based) such that (0 <= i <= n - 2).\n\nExample 1:\n\nInput: nums = [4,2,3]\nOutput: true\nExplanation: You could modify the first 4 to 1 to get a non-decreasing array.\n\nExample 2:\n\nInput: nums = [4,2,1]\nOutput: false\nExplanation: You cannot get a non-decreasing array by modifying at most one element.\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^4\n- -10^5 <= nums[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 5, 4, 6]) == True\n assert candidate(nums = [10, 5, 7]) == True\n assert candidate(nums = [1, 2, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 5, 4]) == True\n assert candidate(nums = [1, 1, 1]) == True\n assert candidate(nums = [3, 3, 2, 2]) == False\n assert candidate(nums = [2, 2, 3, 2, 4]) == True\n assert candidate(nums = [1, 2, 4]) == True\n assert candidate(nums = [1]) == True\n assert candidate(nums = [2, 2, 2]) == True\n assert candidate(nums = [4, 2, 1]) == False\n assert candidate(nums = [3, 4, 2, 3]) == False\n assert candidate(nums = [1, 2, 3, 4, 5]) == True\n assert candidate(nums = [1, 3, 2]) == True\n assert candidate(nums = [4, 2, 3]) == True\n assert candidate(nums = [5, 7, 1, 8]) == True\n assert candidate(nums = [1, 3, 2, 4, 3]) == False\n assert candidate(nums = [1, 5, 4, 6]) == True\n assert candidate(nums = [1, 2]) == True\n assert candidate(nums = [1, 2, 3]) == True\n assert candidate(nums = [1, 2, 4, 5, 3]) == True\n assert candidate(nums = [1, 4, 5, 6, 3, 7]) == True\n assert candidate(nums = [2, 3, 3, 2, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 5, 4, 5, 6]) == True\n assert candidate(nums = [5, 6, 3, 4, 7]) == False\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == True\n assert candidate(nums = [1, 3, 2, 3, 2, 2, 3]) == False\n assert candidate(nums = [1, 3, 5, 4, 7, 6, 8]) == False\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 3, 3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3]) == True\n assert candidate(nums = [1, 3, 2, 4, 2, 5]) == False\n assert candidate(nums = [1, 2, 5, 4, 3, 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 = [1, 3, 2, 2, 2]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 3, 7, 8, 9, 10, 11, 12]) == True\n assert candidate(nums = [1, 5, 3, 5, 6]) == True\n assert candidate(nums = [1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 12]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 10]) == True\n assert candidate(nums = [1, 3, 5, 4, 2]) == False\n assert candidate(nums = [1, 5, 3, 4, 5, 6, 2]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6]) == False\n assert candidate(nums = [3, 5, 2, 5, 1, 6, 7, 8, 9]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 2]) == True\n assert candidate(nums = [1, 4, 2, 3, 5]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 2, 3, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11]) == True\n assert candidate(nums = [1, 2, 4, 5, 3, 5]) == True\n assert candidate(nums = [1, 3, 2, 3, 5, 6, 4, 7, 8, 9, 10]) == False\n assert candidate(nums = [5, 1, 3, 4, 2]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 1]) == True\n assert candidate(nums = [1, 3, 2, 2, 5]) == True\n assert candidate(nums = [3, 3, 3, 3, 2, 3, 3, 3, 3]) == True\n assert candidate(nums = [1, 2, 3, 3, 3, 2, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 6]) == True\n assert candidate(nums = [1, 2, 3, 4, 6, 5, 7, 8, 9]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 9, 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, 19]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 7, 8]) == True\n assert candidate(nums = [1, 5, 4, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 5, 4, 6, 7, 8]) == True\n assert candidate(nums = [100000, -100000, 0, 100000, -100000]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 6, 7]) == False\n assert candidate(nums = [1, 3, 2, 3, 2, 3]) == False\n assert candidate(nums = [1, 3, 5, 7, 9, 8, 11, 13, 15, 17, 19]) == True\n assert candidate(nums = [1, 3, 2, 4, 3, 5]) == False\n assert candidate(nums = [1, 3, 2, 2, 5]) == True\n assert candidate(nums = [1, 3, 5, 4, 7]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 6, 7]) == True\n assert candidate(nums = [1, 3, 5, 4, 6, 7]) == True\n assert candidate(nums = [8, 9, 10, 2, 11, 12]) == True\n assert candidate(nums = [1, 5, 3, 5, 7, 9, 11, 10]) == False\n assert candidate(nums = [1, 2, 3, 2, 1, 4]) == False\n assert candidate(nums = [1, 2, 3, 3, 2, 2, 3, 4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 10, 17]) == True\n assert candidate(nums = [3, 3, 3, 3, 2, 3, 3, 3]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 3, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 3, 5]) == True\n assert candidate(nums = [5, 6, 3, 4, 7, 8, 9]) == False\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 5, 7]) == True\n assert candidate(nums = [3, 5, 4, 5, 6]) == True\n assert candidate(nums = [1, 2, 4, 3, 6, 5, 7, 8]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 1, 1, 1]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [6, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [100, 200, 150, 250, 300, 350, 400, 450, 500, 550, 600]) == True\n assert candidate(nums = [-1, -3, -2, -4, 0]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 8, 11]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 7, 8, 9, 10, 11, 12, 10]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 2, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10]) == True\n assert candidate(nums = [100, 200, 150, 250, 300]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 7, 9]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 3, 5]) == True\n assert candidate(nums = [1, 5, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [1, 2, 3, 2, 1, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 10]) == True\n assert candidate(nums = [5, 1, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [3, 3, 3, 2, 2, 2]) == False\n assert candidate(nums = [1, 3, 2, 3, 4, 5]) == True\n assert candidate(nums = [5, 1, 3, 4, 2, 5]) == False\n assert candidate(nums = [1, 2, 3, 5, 4, 6, 7, 8, 9]) == True\n assert candidate(nums = [1, 2, 4, 5, 3, 6]) == True\n assert candidate(nums = [-1, 4, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 8]) == True\n assert candidate(nums = [1, 2, 5, 4, 3, 6, 7, 8, 9]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 9]) == True\n assert candidate(nums = [5, 6, 2, 7, 8, 9]) == 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]) == True\n assert candidate(nums = [6, 2, 3, 4, 5, 6]) == True\n assert candidate(nums = [5, 7, 1, 8]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 7, 6, 8, 9, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 3, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 10]) == True\n assert candidate(nums = [1, 3, 2, 3, 5, 4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 3, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6]) == False\n assert candidate(nums = [1, 2, 3, 5, 4, 6, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 10]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5]) == False\n assert candidate(nums = [10, 9, 2, 5, 7, 7, 8]) == False\n assert candidate(nums = [1, 2, 3, 5, 4, 7, 6]) == False\n assert candidate(nums = [3, 4, 2, 3]) == False\n assert candidate(nums = [1, 4, 5, 3, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 7, 8, 6, 9, 10]) == False\n assert candidate(nums = [1, 2, 3, 2, 4, 5, 3]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 11]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 2, 3]) == True\n assert candidate(nums = [1, 3, 2, 3, 5, 3]) == False\n assert candidate(nums = [5, 1, 3, 2, 4]) == 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, 19]) == False\n assert candidate(nums = [1, 2, 3, 5, 4, 7, 8, 6, 9]) == False\n assert candidate(nums = [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, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 6, 7, 8]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10]) == True\n assert candidate(nums = [1, 3, 2, 3, 3, 2, 4, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 3, 5, 6]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 6, 7, 8, 9, 10, 11]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 6, 5, 7, 6, 8]) == False\n assert candidate(nums = [3, 5, 4, 5, 6, 7]) == True\n assert candidate(nums = [3, 5, 6, 3, 4, 5]) == False\n assert candidate(nums = [1, 2, 3, 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, 3, 2]) == False\n assert candidate(nums = [1, 2, 3, 2, 2, 3, 4]) == True\n", "comparison": "exact"}, "public_tests": ["[4,2,3]", "[4,2,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().checkPossibility", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:49+00:00", "tests_total": 165, "tests_dropped": 0, "flags": [], "topic_tags": ["array"]}, "language": "cpp", "interface": {"raw_signature": "bool checkPossibility(vector& nums) {", "container": "Solution", "callable": "checkPossibility", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 667, "task_id": "beautiful-arrangement-ii", "difficulty": "Medium", "problem_description": "Given two integers n and k, construct a list answer that contains n different positive integers ranging from 1 to n and obeys the following requirement:\n\n- Suppose this list is answer = [a_1, a_2, a_3, ... , a_n], then the list [|a_1 - a_2|, |a_2 - a_3|, |a_3 - a_4|, ... , |a_{n-1} - a_n|] has exactly k distinct integers.\n\nReturn the list answer. If there multiple valid answers, return any of them.\n\nExample 1:\n\nInput: n = 3, k = 1\nOutput: [1,2,3]\nExplanation: The [1,2,3] has three different positive integers ranging from 1 to 3, and the [1,1] has exactly 1 distinct integer: 1\n\nExample 2:\n\nInput: n = 3, k = 2\nOutput: [1,3,2]\nExplanation: The [1,3,2] has three different positive integers ranging from 1 to 3, and the [2,1] has exactly 2 distinct integers: 1 and 2.\n\nConstraints:\n\n- 1 <= k < n <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3,k = 1) == [1, 2, 3]\n assert candidate(n = 7,k = 4) == [1, 7, 2, 6, 5, 4, 3]\n assert candidate(n = 10,k = 5) == [1, 10, 2, 9, 3, 4, 5, 6, 7, 8]\n assert candidate(n = 5,k = 2) == [1, 5, 4, 3, 2]\n assert candidate(n = 3,k = 2) == [1, 3, 2]\n assert candidate(n = 100,k = 50) == [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, 21, 80, 22, 79, 23, 78, 24, 77, 25, 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]\n assert candidate(n = 100,k = 99) == [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, 21, 80, 22, 79, 23, 78, 24, 77, 25, 76, 26, 75, 27, 74, 28, 73, 29, 72, 30, 71, 31, 70, 32, 69, 33, 68, 34, 67, 35, 66, 36, 65, 37, 64, 38, 63, 39, 62, 40, 61, 41, 60, 42, 59, 43, 58, 44, 57, 45, 56, 46, 55, 47, 54, 48, 53, 49, 52, 50, 51]\n assert candidate(n = 5,k = 3) == [1, 5, 2, 3, 4]\n assert candidate(n = 5,k = 4) == [1, 5, 2, 4, 3]\n assert candidate(n = 1000,k = 500) == [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, 15, 986, 16, 985, 17, 984, 18, 983, 19, 982, 20, 981, 21, 980, 22, 979, 23, 978, 24, 977, 25, 976, 26, 975, 27, 974, 28, 973, 29, 972, 30, 971, 31, 970, 32, 969, 33, 968, 34, 967, 35, 966, 36, 965, 37, 964, 38, 963, 39, 962, 40, 961, 41, 960, 42, 959, 43, 958, 44, 957, 45, 956, 46, 955, 47, 954, 48, 953, 49, 952, 50, 951, 51, 950, 52, 949, 53, 948, 54, 947, 55, 946, 56, 945, 57, 944, 58, 943, 59, 942, 60, 941, 61, 940, 62, 939, 63, 938, 64, 937, 65, 936, 66, 935, 67, 934, 68, 933, 69, 932, 70, 931, 71, 930, 72, 929, 73, 928, 74, 927, 75, 926, 76, 925, 77, 924, 78, 923, 79, 922, 80, 921, 81, 920, 82, 919, 83, 918, 84, 917, 85, 916, 86, 915, 87, 914, 88, 913, 89, 912, 90, 911, 91, 910, 92, 909, 93, 908, 94, 907, 95, 906, 96, 905, 97, 904, 98, 903, 99, 902, 100, 901, 101, 900, 102, 899, 103, 898, 104, 897, 105, 896, 106, 895, 107, 894, 108, 893, 109, 892, 110, 891, 111, 890, 112, 889, 113, 888, 114, 887, 115, 886, 116, 885, 117, 884, 118, 883, 119, 882, 120, 881, 121, 880, 122, 879, 123, 878, 124, 877, 125, 876, 126, 875, 127, 874, 128, 873, 129, 872, 130, 871, 131, 870, 132, 869, 133, 868, 134, 867, 135, 866, 136, 865, 137, 864, 138, 863, 139, 862, 140, 861, 141, 860, 142, 859, 143, 858, 144, 857, 145, 856, 146, 855, 147, 854, 148, 853, 149, 852, 150, 851, 151, 850, 152, 849, 153, 848, 154, 847, 155, 846, 156, 845, 157, 844, 158, 843, 159, 842, 160, 841, 161, 840, 162, 839, 163, 838, 164, 837, 165, 836, 166, 835, 167, 834, 168, 833, 169, 832, 170, 831, 171, 830, 172, 829, 173, 828, 174, 827, 175, 826, 176, 825, 177, 824, 178, 823, 179, 822, 180, 821, 181, 820, 182, 819, 183, 818, 184, 817, 185, 816, 186, 815, 187, 814, 188, 813, 189, 812, 190, 811, 191, 810, 192, 809, 193, 808, 194, 807, 195, 806, 196, 805, 197, 804, 198, 803, 199, 802, 200, 801, 201, 800, 202, 799, 203, 798, 204, 797, 205, 796, 206, 795, 207, 794, 208, 793, 209, 792, 210, 791, 211, 790, 212, 789, 213, 788, 214, 787, 215, 786, 216, 785, 217, 784, 218, 783, 219, 782, 220, 781, 221, 780, 222, 779, 223, 778, 224, 777, 225, 776, 226, 775, 227, 774, 228, 773, 229, 772, 230, 771, 231, 770, 232, 769, 233, 768, 234, 767, 235, 766, 236, 765, 237, 764, 238, 763, 239, 762, 240, 761, 241, 760, 242, 759, 243, 758, 244, 757, 245, 756, 246, 755, 247, 754, 248, 753, 249, 752, 250, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251]\n assert candidate(n = 400,k = 200) == [1, 400, 2, 399, 3, 398, 4, 397, 5, 396, 6, 395, 7, 394, 8, 393, 9, 392, 10, 391, 11, 390, 12, 389, 13, 388, 14, 387, 15, 386, 16, 385, 17, 384, 18, 383, 19, 382, 20, 381, 21, 380, 22, 379, 23, 378, 24, 377, 25, 376, 26, 375, 27, 374, 28, 373, 29, 372, 30, 371, 31, 370, 32, 369, 33, 368, 34, 367, 35, 366, 36, 365, 37, 364, 38, 363, 39, 362, 40, 361, 41, 360, 42, 359, 43, 358, 44, 357, 45, 356, 46, 355, 47, 354, 48, 353, 49, 352, 50, 351, 51, 350, 52, 349, 53, 348, 54, 347, 55, 346, 56, 345, 57, 344, 58, 343, 59, 342, 60, 341, 61, 340, 62, 339, 63, 338, 64, 337, 65, 336, 66, 335, 67, 334, 68, 333, 69, 332, 70, 331, 71, 330, 72, 329, 73, 328, 74, 327, 75, 326, 76, 325, 77, 324, 78, 323, 79, 322, 80, 321, 81, 320, 82, 319, 83, 318, 84, 317, 85, 316, 86, 315, 87, 314, 88, 313, 89, 312, 90, 311, 91, 310, 92, 309, 93, 308, 94, 307, 95, 306, 96, 305, 97, 304, 98, 303, 99, 302, 100, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 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]\n assert candidate(n = 60,k = 50) == [1, 60, 2, 59, 3, 58, 4, 57, 5, 56, 6, 55, 7, 54, 8, 53, 9, 52, 10, 51, 11, 50, 12, 49, 13, 48, 14, 47, 15, 46, 16, 45, 17, 44, 18, 43, 19, 42, 20, 41, 21, 40, 22, 39, 23, 38, 24, 37, 25, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26]\n assert candidate(n = 9,k = 5) == [1, 9, 2, 8, 3, 4, 5, 6, 7]\n assert candidate(n = 200,k = 100) == [1, 200, 2, 199, 3, 198, 4, 197, 5, 196, 6, 195, 7, 194, 8, 193, 9, 192, 10, 191, 11, 190, 12, 189, 13, 188, 14, 187, 15, 186, 16, 185, 17, 184, 18, 183, 19, 182, 20, 181, 21, 180, 22, 179, 23, 178, 24, 177, 25, 176, 26, 175, 27, 174, 28, 173, 29, 172, 30, 171, 31, 170, 32, 169, 33, 168, 34, 167, 35, 166, 36, 165, 37, 164, 38, 163, 39, 162, 40, 161, 41, 160, 42, 159, 43, 158, 44, 157, 45, 156, 46, 155, 47, 154, 48, 153, 49, 152, 50, 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]\n assert candidate(n = 18,k = 13) == [1, 18, 2, 17, 3, 16, 4, 15, 5, 14, 6, 13, 7, 8, 9, 10, 11, 12]\n assert candidate(n = 100,k = 90) == [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, 21, 80, 22, 79, 23, 78, 24, 77, 25, 76, 26, 75, 27, 74, 28, 73, 29, 72, 30, 71, 31, 70, 32, 69, 33, 68, 34, 67, 35, 66, 36, 65, 37, 64, 38, 63, 39, 62, 40, 61, 41, 60, 42, 59, 43, 58, 44, 57, 45, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46]\n assert candidate(n = 500,k = 249) == [1, 500, 2, 499, 3, 498, 4, 497, 5, 496, 6, 495, 7, 494, 8, 493, 9, 492, 10, 491, 11, 490, 12, 489, 13, 488, 14, 487, 15, 486, 16, 485, 17, 484, 18, 483, 19, 482, 20, 481, 21, 480, 22, 479, 23, 478, 24, 477, 25, 476, 26, 475, 27, 474, 28, 473, 29, 472, 30, 471, 31, 470, 32, 469, 33, 468, 34, 467, 35, 466, 36, 465, 37, 464, 38, 463, 39, 462, 40, 461, 41, 460, 42, 459, 43, 458, 44, 457, 45, 456, 46, 455, 47, 454, 48, 453, 49, 452, 50, 451, 51, 450, 52, 449, 53, 448, 54, 447, 55, 446, 56, 445, 57, 444, 58, 443, 59, 442, 60, 441, 61, 440, 62, 439, 63, 438, 64, 437, 65, 436, 66, 435, 67, 434, 68, 433, 69, 432, 70, 431, 71, 430, 72, 429, 73, 428, 74, 427, 75, 426, 76, 425, 77, 424, 78, 423, 79, 422, 80, 421, 81, 420, 82, 419, 83, 418, 84, 417, 85, 416, 86, 415, 87, 414, 88, 413, 89, 412, 90, 411, 91, 410, 92, 409, 93, 408, 94, 407, 95, 406, 96, 405, 97, 404, 98, 403, 99, 402, 100, 401, 101, 400, 102, 399, 103, 398, 104, 397, 105, 396, 106, 395, 107, 394, 108, 393, 109, 392, 110, 391, 111, 390, 112, 389, 113, 388, 114, 387, 115, 386, 116, 385, 117, 384, 118, 383, 119, 382, 120, 381, 121, 380, 122, 379, 123, 378, 124, 377, 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, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376]\n assert candidate(n = 200,k = 99) == [1, 200, 2, 199, 3, 198, 4, 197, 5, 196, 6, 195, 7, 194, 8, 193, 9, 192, 10, 191, 11, 190, 12, 189, 13, 188, 14, 187, 15, 186, 16, 185, 17, 184, 18, 183, 19, 182, 20, 181, 21, 180, 22, 179, 23, 178, 24, 177, 25, 176, 26, 175, 27, 174, 28, 173, 29, 172, 30, 171, 31, 170, 32, 169, 33, 168, 34, 167, 35, 166, 36, 165, 37, 164, 38, 163, 39, 162, 40, 161, 41, 160, 42, 159, 43, 158, 44, 157, 45, 156, 46, 155, 47, 154, 48, 153, 49, 152, 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]\n assert candidate(n = 10,k = 8) == [1, 10, 2, 9, 3, 8, 4, 7, 6, 5]\n assert candidate(n = 7,k = 3) == [1, 7, 2, 3, 4, 5, 6]\n assert candidate(n = 9,k = 8) == [1, 9, 2, 8, 3, 7, 4, 6, 5]\n assert candidate(n = 12,k = 9) == [1, 12, 2, 11, 3, 10, 4, 9, 5, 6, 7, 8]\n assert candidate(n = 4999,k = 2499) == [1, 4999, 2, 4998, 3, 4997, 4, 4996, 5, 4995, 6, 4994, 7, 4993, 8, 4992, 9, 4991, 10, 4990, 11, 4989, 12, 4988, 13, 4987, 14, 4986, 15, 4985, 16, 4984, 17, 4983, 18, 4982, 19, 4981, 20, 4980, 21, 4979, 22, 4978, 23, 4977, 24, 4976, 25, 4975, 26, 4974, 27, 4973, 28, 4972, 29, 4971, 30, 4970, 31, 4969, 32, 4968, 33, 4967, 34, 4966, 35, 4965, 36, 4964, 37, 4963, 38, 4962, 39, 4961, 40, 4960, 41, 4959, 42, 4958, 43, 4957, 44, 4956, 45, 4955, 46, 4954, 47, 4953, 48, 4952, 49, 4951, 50, 4950, 51, 4949, 52, 4948, 53, 4947, 54, 4946, 55, 4945, 56, 4944, 57, 4943, 58, 4942, 59, 4941, 60, 4940, 61, 4939, 62, 4938, 63, 4937, 64, 4936, 65, 4935, 66, 4934, 67, 4933, 68, 4932, 69, 4931, 70, 4930, 71, 4929, 72, 4928, 73, 4927, 74, 4926, 75, 4925, 76, 4924, 77, 4923, 78, 4922, 79, 4921, 80, 4920, 81, 4919, 82, 4918, 83, 4917, 84, 4916, 85, 4915, 86, 4914, 87, 4913, 88, 4912, 89, 4911, 90, 4910, 91, 4909, 92, 4908, 93, 4907, 94, 4906, 95, 4905, 96, 4904, 97, 4903, 98, 4902, 99, 4901, 100, 4900, 101, 4899, 102, 4898, 103, 4897, 104, 4896, 105, 4895, 106, 4894, 107, 4893, 108, 4892, 109, 4891, 110, 4890, 111, 4889, 112, 4888, 113, 4887, 114, 4886, 115, 4885, 116, 4884, 117, 4883, 118, 4882, 119, 4881, 120, 4880, 121, 4879, 122, 4878, 123, 4877, 124, 4876, 125, 4875, 126, 4874, 127, 4873, 128, 4872, 129, 4871, 130, 4870, 131, 4869, 132, 4868, 133, 4867, 134, 4866, 135, 4865, 136, 4864, 137, 4863, 138, 4862, 139, 4861, 140, 4860, 141, 4859, 142, 4858, 143, 4857, 144, 4856, 145, 4855, 146, 4854, 147, 4853, 148, 4852, 149, 4851, 150, 4850, 151, 4849, 152, 4848, 153, 4847, 154, 4846, 155, 4845, 156, 4844, 157, 4843, 158, 4842, 159, 4841, 160, 4840, 161, 4839, 162, 4838, 163, 4837, 164, 4836, 165, 4835, 166, 4834, 167, 4833, 168, 4832, 169, 4831, 170, 4830, 171, 4829, 172, 4828, 173, 4827, 174, 4826, 175, 4825, 176, 4824, 177, 4823, 178, 4822, 179, 4821, 180, 4820, 181, 4819, 182, 4818, 183, 4817, 184, 4816, 185, 4815, 186, 4814, 187, 4813, 188, 4812, 189, 4811, 190, 4810, 191, 4809, 192, 4808, 193, 4807, 194, 4806, 195, 4805, 196, 4804, 197, 4803, 198, 4802, 199, 4801, 200, 4800, 201, 4799, 202, 4798, 203, 4797, 204, 4796, 205, 4795, 206, 4794, 207, 4793, 208, 4792, 209, 4791, 210, 4790, 211, 4789, 212, 4788, 213, 4787, 214, 4786, 215, 4785, 216, 4784, 217, 4783, 218, 4782, 219, 4781, 220, 4780, 221, 4779, 222, 4778, 223, 4777, 224, 4776, 225, 4775, 226, 4774, 227, 4773, 228, 4772, 229, 4771, 230, 4770, 231, 4769, 232, 4768, 233, 4767, 234, 4766, 235, 4765, 236, 4764, 237, 4763, 238, 4762, 239, 4761, 240, 4760, 241, 4759, 242, 4758, 243, 4757, 244, 4756, 245, 4755, 246, 4754, 247, 4753, 248, 4752, 249, 4751, 250, 4750, 251, 4749, 252, 4748, 253, 4747, 254, 4746, 255, 4745, 256, 4744, 257, 4743, 258, 4742, 259, 4741, 260, 4740, 261, 4739, 262, 4738, 263, 4737, 264, 4736, 265, 4735, 266, 4734, 267, 4733, 268, 4732, 269, 4731, 270, 4730, 271, 4729, 272, 4728, 273, 4727, 274, 4726, 275, 4725, 276, 4724, 277, 4723, 278, 4722, 279, 4721, 280, 4720, 281, 4719, 282, 4718, 283, 4717, 284, 4716, 285, 4715, 286, 4714, 287, 4713, 288, 4712, 289, 4711, 290, 4710, 291, 4709, 292, 4708, 293, 4707, 294, 4706, 295, 4705, 296, 4704, 297, 4703, 298, 4702, 299, 4701, 300, 4700, 301, 4699, 302, 4698, 303, 4697, 304, 4696, 305, 4695, 306, 4694, 307, 4693, 308, 4692, 309, 4691, 310, 4690, 311, 4689, 312, 4688, 313, 4687, 314, 4686, 315, 4685, 316, 4684, 317, 4683, 318, 4682, 319, 4681, 320, 4680, 321, 4679, 322, 4678, 323, 4677, 324, 4676, 325, 4675, 326, 4674, 327, 4673, 328, 4672, 329, 4671, 330, 4670, 331, 4669, 332, 4668, 333, 4667, 334, 4666, 335, 4665, 336, 4664, 337, 4663, 338, 4662, 339, 4661, 340, 4660, 341, 4659, 342, 4658, 343, 4657, 344, 4656, 345, 4655, 346, 4654, 347, 4653, 348, 4652, 349, 4651, 350, 4650, 351, 4649, 352, 4648, 353, 4647, 354, 4646, 355, 4645, 356, 4644, 357, 4643, 358, 4642, 359, 4641, 360, 4640, 361, 4639, 362, 4638, 363, 4637, 364, 4636, 365, 4635, 366, 4634, 367, 4633, 368, 4632, 369, 4631, 370, 4630, 371, 4629, 372, 4628, 373, 4627, 374, 4626, 375, 4625, 376, 4624, 377, 4623, 378, 4622, 379, 4621, 380, 4620, 381, 4619, 382, 4618, 383, 4617, 384, 4616, 385, 4615, 386, 4614, 387, 4613, 388, 4612, 389, 4611, 390, 4610, 391, 4609, 392, 4608, 393, 4607, 394, 4606, 395, 4605, 396, 4604, 397, 4603, 398, 4602, 399, 4601, 400, 4600, 401, 4599, 402, 4598, 403, 4597, 404, 4596, 405, 4595, 406, 4594, 407, 4593, 408, 4592, 409, 4591, 410, 4590, 411, 4589, 412, 4588, 413, 4587, 414, 4586, 415, 4585, 416, 4584, 417, 4583, 418, 4582, 419, 4581, 420, 4580, 421, 4579, 422, 4578, 423, 4577, 424, 4576, 425, 4575, 426, 4574, 427, 4573, 428, 4572, 429, 4571, 430, 4570, 431, 4569, 432, 4568, 433, 4567, 434, 4566, 435, 4565, 436, 4564, 437, 4563, 438, 4562, 439, 4561, 440, 4560, 441, 4559, 442, 4558, 443, 4557, 444, 4556, 445, 4555, 446, 4554, 447, 4553, 448, 4552, 449, 4551, 450, 4550, 451, 4549, 452, 4548, 453, 4547, 454, 4546, 455, 4545, 456, 4544, 457, 4543, 458, 4542, 459, 4541, 460, 4540, 461, 4539, 462, 4538, 463, 4537, 464, 4536, 465, 4535, 466, 4534, 467, 4533, 468, 4532, 469, 4531, 470, 4530, 471, 4529, 472, 4528, 473, 4527, 474, 4526, 475, 4525, 476, 4524, 477, 4523, 478, 4522, 479, 4521, 480, 4520, 481, 4519, 482, 4518, 483, 4517, 484, 4516, 485, 4515, 486, 4514, 487, 4513, 488, 4512, 489, 4511, 490, 4510, 491, 4509, 492, 4508, 493, 4507, 494, 4506, 495, 4505, 496, 4504, 497, 4503, 498, 4502, 499, 4501, 500, 4500, 501, 4499, 502, 4498, 503, 4497, 504, 4496, 505, 4495, 506, 4494, 507, 4493, 508, 4492, 509, 4491, 510, 4490, 511, 4489, 512, 4488, 513, 4487, 514, 4486, 515, 4485, 516, 4484, 517, 4483, 518, 4482, 519, 4481, 520, 4480, 521, 4479, 522, 4478, 523, 4477, 524, 4476, 525, 4475, 526, 4474, 527, 4473, 528, 4472, 529, 4471, 530, 4470, 531, 4469, 532, 4468, 533, 4467, 534, 4466, 535, 4465, 536, 4464, 537, 4463, 538, 4462, 539, 4461, 540, 4460, 541, 4459, 542, 4458, 543, 4457, 544, 4456, 545, 4455, 546, 4454, 547, 4453, 548, 4452, 549, 4451, 550, 4450, 551, 4449, 552, 4448, 553, 4447, 554, 4446, 555, 4445, 556, 4444, 557, 4443, 558, 4442, 559, 4441, 560, 4440, 561, 4439, 562, 4438, 563, 4437, 564, 4436, 565, 4435, 566, 4434, 567, 4433, 568, 4432, 569, 4431, 570, 4430, 571, 4429, 572, 4428, 573, 4427, 574, 4426, 575, 4425, 576, 4424, 577, 4423, 578, 4422, 579, 4421, 580, 4420, 581, 4419, 582, 4418, 583, 4417, 584, 4416, 585, 4415, 586, 4414, 587, 4413, 588, 4412, 589, 4411, 590, 4410, 591, 4409, 592, 4408, 593, 4407, 594, 4406, 595, 4405, 596, 4404, 597, 4403, 598, 4402, 599, 4401, 600, 4400, 601, 4399, 602, 4398, 603, 4397, 604, 4396, 605, 4395, 606, 4394, 607, 4393, 608, 4392, 609, 4391, 610, 4390, 611, 4389, 612, 4388, 613, 4387, 614, 4386, 615, 4385, 616, 4384, 617, 4383, 618, 4382, 619, 4381, 620, 4380, 621, 4379, 622, 4378, 623, 4377, 624, 4376, 625, 4375, 626, 4374, 627, 4373, 628, 4372, 629, 4371, 630, 4370, 631, 4369, 632, 4368, 633, 4367, 634, 4366, 635, 4365, 636, 4364, 637, 4363, 638, 4362, 639, 4361, 640, 4360, 641, 4359, 642, 4358, 643, 4357, 644, 4356, 645, 4355, 646, 4354, 647, 4353, 648, 4352, 649, 4351, 650, 4350, 651, 4349, 652, 4348, 653, 4347, 654, 4346, 655, 4345, 656, 4344, 657, 4343, 658, 4342, 659, 4341, 660, 4340, 661, 4339, 662, 4338, 663, 4337, 664, 4336, 665, 4335, 666, 4334, 667, 4333, 668, 4332, 669, 4331, 670, 4330, 671, 4329, 672, 4328, 673, 4327, 674, 4326, 675, 4325, 676, 4324, 677, 4323, 678, 4322, 679, 4321, 680, 4320, 681, 4319, 682, 4318, 683, 4317, 684, 4316, 685, 4315, 686, 4314, 687, 4313, 688, 4312, 689, 4311, 690, 4310, 691, 4309, 692, 4308, 693, 4307, 694, 4306, 695, 4305, 696, 4304, 697, 4303, 698, 4302, 699, 4301, 700, 4300, 701, 4299, 702, 4298, 703, 4297, 704, 4296, 705, 4295, 706, 4294, 707, 4293, 708, 4292, 709, 4291, 710, 4290, 711, 4289, 712, 4288, 713, 4287, 714, 4286, 715, 4285, 716, 4284, 717, 4283, 718, 4282, 719, 4281, 720, 4280, 721, 4279, 722, 4278, 723, 4277, 724, 4276, 725, 4275, 726, 4274, 727, 4273, 728, 4272, 729, 4271, 730, 4270, 731, 4269, 732, 4268, 733, 4267, 734, 4266, 735, 4265, 736, 4264, 737, 4263, 738, 4262, 739, 4261, 740, 4260, 741, 4259, 742, 4258, 743, 4257, 744, 4256, 745, 4255, 746, 4254, 747, 4253, 748, 4252, 749, 4251, 750, 4250, 751, 4249, 752, 4248, 753, 4247, 754, 4246, 755, 4245, 756, 4244, 757, 4243, 758, 4242, 759, 4241, 760, 4240, 761, 4239, 762, 4238, 763, 4237, 764, 4236, 765, 4235, 766, 4234, 767, 4233, 768, 4232, 769, 4231, 770, 4230, 771, 4229, 772, 4228, 773, 4227, 774, 4226, 775, 4225, 776, 4224, 777, 4223, 778, 4222, 779, 4221, 780, 4220, 781, 4219, 782, 4218, 783, 4217, 784, 4216, 785, 4215, 786, 4214, 787, 4213, 788, 4212, 789, 4211, 790, 4210, 791, 4209, 792, 4208, 793, 4207, 794, 4206, 795, 4205, 796, 4204, 797, 4203, 798, 4202, 799, 4201, 800, 4200, 801, 4199, 802, 4198, 803, 4197, 804, 4196, 805, 4195, 806, 4194, 807, 4193, 808, 4192, 809, 4191, 810, 4190, 811, 4189, 812, 4188, 813, 4187, 814, 4186, 815, 4185, 816, 4184, 817, 4183, 818, 4182, 819, 4181, 820, 4180, 821, 4179, 822, 4178, 823, 4177, 824, 4176, 825, 4175, 826, 4174, 827, 4173, 828, 4172, 829, 4171, 830, 4170, 831, 4169, 832, 4168, 833, 4167, 834, 4166, 835, 4165, 836, 4164, 837, 4163, 838, 4162, 839, 4161, 840, 4160, 841, 4159, 842, 4158, 843, 4157, 844, 4156, 845, 4155, 846, 4154, 847, 4153, 848, 4152, 849, 4151, 850, 4150, 851, 4149, 852, 4148, 853, 4147, 854, 4146, 855, 4145, 856, 4144, 857, 4143, 858, 4142, 859, 4141, 860, 4140, 861, 4139, 862, 4138, 863, 4137, 864, 4136, 865, 4135, 866, 4134, 867, 4133, 868, 4132, 869, 4131, 870, 4130, 871, 4129, 872, 4128, 873, 4127, 874, 4126, 875, 4125, 876, 4124, 877, 4123, 878, 4122, 879, 4121, 880, 4120, 881, 4119, 882, 4118, 883, 4117, 884, 4116, 885, 4115, 886, 4114, 887, 4113, 888, 4112, 889, 4111, 890, 4110, 891, 4109, 892, 4108, 893, 4107, 894, 4106, 895, 4105, 896, 4104, 897, 4103, 898, 4102, 899, 4101, 900, 4100, 901, 4099, 902, 4098, 903, 4097, 904, 4096, 905, 4095, 906, 4094, 907, 4093, 908, 4092, 909, 4091, 910, 4090, 911, 4089, 912, 4088, 913, 4087, 914, 4086, 915, 4085, 916, 4084, 917, 4083, 918, 4082, 919, 4081, 920, 4080, 921, 4079, 922, 4078, 923, 4077, 924, 4076, 925, 4075, 926, 4074, 927, 4073, 928, 4072, 929, 4071, 930, 4070, 931, 4069, 932, 4068, 933, 4067, 934, 4066, 935, 4065, 936, 4064, 937, 4063, 938, 4062, 939, 4061, 940, 4060, 941, 4059, 942, 4058, 943, 4057, 944, 4056, 945, 4055, 946, 4054, 947, 4053, 948, 4052, 949, 4051, 950, 4050, 951, 4049, 952, 4048, 953, 4047, 954, 4046, 955, 4045, 956, 4044, 957, 4043, 958, 4042, 959, 4041, 960, 4040, 961, 4039, 962, 4038, 963, 4037, 964, 4036, 965, 4035, 966, 4034, 967, 4033, 968, 4032, 969, 4031, 970, 4030, 971, 4029, 972, 4028, 973, 4027, 974, 4026, 975, 4025, 976, 4024, 977, 4023, 978, 4022, 979, 4021, 980, 4020, 981, 4019, 982, 4018, 983, 4017, 984, 4016, 985, 4015, 986, 4014, 987, 4013, 988, 4012, 989, 4011, 990, 4010, 991, 4009, 992, 4008, 993, 4007, 994, 4006, 995, 4005, 996, 4004, 997, 4003, 998, 4002, 999, 4001, 1000, 4000, 1001, 3999, 1002, 3998, 1003, 3997, 1004, 3996, 1005, 3995, 1006, 3994, 1007, 3993, 1008, 3992, 1009, 3991, 1010, 3990, 1011, 3989, 1012, 3988, 1013, 3987, 1014, 3986, 1015, 3985, 1016, 3984, 1017, 3983, 1018, 3982, 1019, 3981, 1020, 3980, 1021, 3979, 1022, 3978, 1023, 3977, 1024, 3976, 1025, 3975, 1026, 3974, 1027, 3973, 1028, 3972, 1029, 3971, 1030, 3970, 1031, 3969, 1032, 3968, 1033, 3967, 1034, 3966, 1035, 3965, 1036, 3964, 1037, 3963, 1038, 3962, 1039, 3961, 1040, 3960, 1041, 3959, 1042, 3958, 1043, 3957, 1044, 3956, 1045, 3955, 1046, 3954, 1047, 3953, 1048, 3952, 1049, 3951, 1050, 3950, 1051, 3949, 1052, 3948, 1053, 3947, 1054, 3946, 1055, 3945, 1056, 3944, 1057, 3943, 1058, 3942, 1059, 3941, 1060, 3940, 1061, 3939, 1062, 3938, 1063, 3937, 1064, 3936, 1065, 3935, 1066, 3934, 1067, 3933, 1068, 3932, 1069, 3931, 1070, 3930, 1071, 3929, 1072, 3928, 1073, 3927, 1074, 3926, 1075, 3925, 1076, 3924, 1077, 3923, 1078, 3922, 1079, 3921, 1080, 3920, 1081, 3919, 1082, 3918, 1083, 3917, 1084, 3916, 1085, 3915, 1086, 3914, 1087, 3913, 1088, 3912, 1089, 3911, 1090, 3910, 1091, 3909, 1092, 3908, 1093, 3907, 1094, 3906, 1095, 3905, 1096, 3904, 1097, 3903, 1098, 3902, 1099, 3901, 1100, 3900, 1101, 3899, 1102, 3898, 1103, 3897, 1104, 3896, 1105, 3895, 1106, 3894, 1107, 3893, 1108, 3892, 1109, 3891, 1110, 3890, 1111, 3889, 1112, 3888, 1113, 3887, 1114, 3886, 1115, 3885, 1116, 3884, 1117, 3883, 1118, 3882, 1119, 3881, 1120, 3880, 1121, 3879, 1122, 3878, 1123, 3877, 1124, 3876, 1125, 3875, 1126, 3874, 1127, 3873, 1128, 3872, 1129, 3871, 1130, 3870, 1131, 3869, 1132, 3868, 1133, 3867, 1134, 3866, 1135, 3865, 1136, 3864, 1137, 3863, 1138, 3862, 1139, 3861, 1140, 3860, 1141, 3859, 1142, 3858, 1143, 3857, 1144, 3856, 1145, 3855, 1146, 3854, 1147, 3853, 1148, 3852, 1149, 3851, 1150, 3850, 1151, 3849, 1152, 3848, 1153, 3847, 1154, 3846, 1155, 3845, 1156, 3844, 1157, 3843, 1158, 3842, 1159, 3841, 1160, 3840, 1161, 3839, 1162, 3838, 1163, 3837, 1164, 3836, 1165, 3835, 1166, 3834, 1167, 3833, 1168, 3832, 1169, 3831, 1170, 3830, 1171, 3829, 1172, 3828, 1173, 3827, 1174, 3826, 1175, 3825, 1176, 3824, 1177, 3823, 1178, 3822, 1179, 3821, 1180, 3820, 1181, 3819, 1182, 3818, 1183, 3817, 1184, 3816, 1185, 3815, 1186, 3814, 1187, 3813, 1188, 3812, 1189, 3811, 1190, 3810, 1191, 3809, 1192, 3808, 1193, 3807, 1194, 3806, 1195, 3805, 1196, 3804, 1197, 3803, 1198, 3802, 1199, 3801, 1200, 3800, 1201, 3799, 1202, 3798, 1203, 3797, 1204, 3796, 1205, 3795, 1206, 3794, 1207, 3793, 1208, 3792, 1209, 3791, 1210, 3790, 1211, 3789, 1212, 3788, 1213, 3787, 1214, 3786, 1215, 3785, 1216, 3784, 1217, 3783, 1218, 3782, 1219, 3781, 1220, 3780, 1221, 3779, 1222, 3778, 1223, 3777, 1224, 3776, 1225, 3775, 1226, 3774, 1227, 3773, 1228, 3772, 1229, 3771, 1230, 3770, 1231, 3769, 1232, 3768, 1233, 3767, 1234, 3766, 1235, 3765, 1236, 3764, 1237, 3763, 1238, 3762, 1239, 3761, 1240, 3760, 1241, 3759, 1242, 3758, 1243, 3757, 1244, 3756, 1245, 3755, 1246, 3754, 1247, 3753, 1248, 3752, 1249, 3751, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 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, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 3750]\n assert candidate(n = 5000,k = 100) == [1, 5000, 2, 4999, 3, 4998, 4, 4997, 5, 4996, 6, 4995, 7, 4994, 8, 4993, 9, 4992, 10, 4991, 11, 4990, 12, 4989, 13, 4988, 14, 4987, 15, 4986, 16, 4985, 17, 4984, 18, 4983, 19, 4982, 20, 4981, 21, 4980, 22, 4979, 23, 4978, 24, 4977, 25, 4976, 26, 4975, 27, 4974, 28, 4973, 29, 4972, 30, 4971, 31, 4970, 32, 4969, 33, 4968, 34, 4967, 35, 4966, 36, 4965, 37, 4964, 38, 4963, 39, 4962, 40, 4961, 41, 4960, 42, 4959, 43, 4958, 44, 4957, 45, 4956, 46, 4955, 47, 4954, 48, 4953, 49, 4952, 50, 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, 4799, 4798, 4797, 4796, 4795, 4794, 4793, 4792, 4791, 4790, 4789, 4788, 4787, 4786, 4785, 4784, 4783, 4782, 4781, 4780, 4779, 4778, 4777, 4776, 4775, 4774, 4773, 4772, 4771, 4770, 4769, 4768, 4767, 4766, 4765, 4764, 4763, 4762, 4761, 4760, 4759, 4758, 4757, 4756, 4755, 4754, 4753, 4752, 4751, 4750, 4749, 4748, 4747, 4746, 4745, 4744, 4743, 4742, 4741, 4740, 4739, 4738, 4737, 4736, 4735, 4734, 4733, 4732, 4731, 4730, 4729, 4728, 4727, 4726, 4725, 4724, 4723, 4722, 4721, 4720, 4719, 4718, 4717, 4716, 4715, 4714, 4713, 4712, 4711, 4710, 4709, 4708, 4707, 4706, 4705, 4704, 4703, 4702, 4701, 4700, 4699, 4698, 4697, 4696, 4695, 4694, 4693, 4692, 4691, 4690, 4689, 4688, 4687, 4686, 4685, 4684, 4683, 4682, 4681, 4680, 4679, 4678, 4677, 4676, 4675, 4674, 4673, 4672, 4671, 4670, 4669, 4668, 4667, 4666, 4665, 4664, 4663, 4662, 4661, 4660, 4659, 4658, 4657, 4656, 4655, 4654, 4653, 4652, 4651, 4650, 4649, 4648, 4647, 4646, 4645, 4644, 4643, 4642, 4641, 4640, 4639, 4638, 4637, 4636, 4635, 4634, 4633, 4632, 4631, 4630, 4629, 4628, 4627, 4626, 4625, 4624, 4623, 4622, 4621, 4620, 4619, 4618, 4617, 4616, 4615, 4614, 4613, 4612, 4611, 4610, 4609, 4608, 4607, 4606, 4605, 4604, 4603, 4602, 4601, 4600, 4599, 4598, 4597, 4596, 4595, 4594, 4593, 4592, 4591, 4590, 4589, 4588, 4587, 4586, 4585, 4584, 4583, 4582, 4581, 4580, 4579, 4578, 4577, 4576, 4575, 4574, 4573, 4572, 4571, 4570, 4569, 4568, 4567, 4566, 4565, 4564, 4563, 4562, 4561, 4560, 4559, 4558, 4557, 4556, 4555, 4554, 4553, 4552, 4551, 4550, 4549, 4548, 4547, 4546, 4545, 4544, 4543, 4542, 4541, 4540, 4539, 4538, 4537, 4536, 4535, 4534, 4533, 4532, 4531, 4530, 4529, 4528, 4527, 4526, 4525, 4524, 4523, 4522, 4521, 4520, 4519, 4518, 4517, 4516, 4515, 4514, 4513, 4512, 4511, 4510, 4509, 4508, 4507, 4506, 4505, 4504, 4503, 4502, 4501, 4500, 4499, 4498, 4497, 4496, 4495, 4494, 4493, 4492, 4491, 4490, 4489, 4488, 4487, 4486, 4485, 4484, 4483, 4482, 4481, 4480, 4479, 4478, 4477, 4476, 4475, 4474, 4473, 4472, 4471, 4470, 4469, 4468, 4467, 4466, 4465, 4464, 4463, 4462, 4461, 4460, 4459, 4458, 4457, 4456, 4455, 4454, 4453, 4452, 4451, 4450, 4449, 4448, 4447, 4446, 4445, 4444, 4443, 4442, 4441, 4440, 4439, 4438, 4437, 4436, 4435, 4434, 4433, 4432, 4431, 4430, 4429, 4428, 4427, 4426, 4425, 4424, 4423, 4422, 4421, 4420, 4419, 4418, 4417, 4416, 4415, 4414, 4413, 4412, 4411, 4410, 4409, 4408, 4407, 4406, 4405, 4404, 4403, 4402, 4401, 4400, 4399, 4398, 4397, 4396, 4395, 4394, 4393, 4392, 4391, 4390, 4389, 4388, 4387, 4386, 4385, 4384, 4383, 4382, 4381, 4380, 4379, 4378, 4377, 4376, 4375, 4374, 4373, 4372, 4371, 4370, 4369, 4368, 4367, 4366, 4365, 4364, 4363, 4362, 4361, 4360, 4359, 4358, 4357, 4356, 4355, 4354, 4353, 4352, 4351, 4350, 4349, 4348, 4347, 4346, 4345, 4344, 4343, 4342, 4341, 4340, 4339, 4338, 4337, 4336, 4335, 4334, 4333, 4332, 4331, 4330, 4329, 4328, 4327, 4326, 4325, 4324, 4323, 4322, 4321, 4320, 4319, 4318, 4317, 4316, 4315, 4314, 4313, 4312, 4311, 4310, 4309, 4308, 4307, 4306, 4305, 4304, 4303, 4302, 4301, 4300, 4299, 4298, 4297, 4296, 4295, 4294, 4293, 4292, 4291, 4290, 4289, 4288, 4287, 4286, 4285, 4284, 4283, 4282, 4281, 4280, 4279, 4278, 4277, 4276, 4275, 4274, 4273, 4272, 4271, 4270, 4269, 4268, 4267, 4266, 4265, 4264, 4263, 4262, 4261, 4260, 4259, 4258, 4257, 4256, 4255, 4254, 4253, 4252, 4251, 4250, 4249, 4248, 4247, 4246, 4245, 4244, 4243, 4242, 4241, 4240, 4239, 4238, 4237, 4236, 4235, 4234, 4233, 4232, 4231, 4230, 4229, 4228, 4227, 4226, 4225, 4224, 4223, 4222, 4221, 4220, 4219, 4218, 4217, 4216, 4215, 4214, 4213, 4212, 4211, 4210, 4209, 4208, 4207, 4206, 4205, 4204, 4203, 4202, 4201, 4200, 4199, 4198, 4197, 4196, 4195, 4194, 4193, 4192, 4191, 4190, 4189, 4188, 4187, 4186, 4185, 4184, 4183, 4182, 4181, 4180, 4179, 4178, 4177, 4176, 4175, 4174, 4173, 4172, 4171, 4170, 4169, 4168, 4167, 4166, 4165, 4164, 4163, 4162, 4161, 4160, 4159, 4158, 4157, 4156, 4155, 4154, 4153, 4152, 4151, 4150, 4149, 4148, 4147, 4146, 4145, 4144, 4143, 4142, 4141, 4140, 4139, 4138, 4137, 4136, 4135, 4134, 4133, 4132, 4131, 4130, 4129, 4128, 4127, 4126, 4125, 4124, 4123, 4122, 4121, 4120, 4119, 4118, 4117, 4116, 4115, 4114, 4113, 4112, 4111, 4110, 4109, 4108, 4107, 4106, 4105, 4104, 4103, 4102, 4101, 4100, 4099, 4098, 4097, 4096, 4095, 4094, 4093, 4092, 4091, 4090, 4089, 4088, 4087, 4086, 4085, 4084, 4083, 4082, 4081, 4080, 4079, 4078, 4077, 4076, 4075, 4074, 4073, 4072, 4071, 4070, 4069, 4068, 4067, 4066, 4065, 4064, 4063, 4062, 4061, 4060, 4059, 4058, 4057, 4056, 4055, 4054, 4053, 4052, 4051, 4050, 4049, 4048, 4047, 4046, 4045, 4044, 4043, 4042, 4041, 4040, 4039, 4038, 4037, 4036, 4035, 4034, 4033, 4032, 4031, 4030, 4029, 4028, 4027, 4026, 4025, 4024, 4023, 4022, 4021, 4020, 4019, 4018, 4017, 4016, 4015, 4014, 4013, 4012, 4011, 4010, 4009, 4008, 4007, 4006, 4005, 4004, 4003, 4002, 4001, 4000, 3999, 3998, 3997, 3996, 3995, 3994, 3993, 3992, 3991, 3990, 3989, 3988, 3987, 3986, 3985, 3984, 3983, 3982, 3981, 3980, 3979, 3978, 3977, 3976, 3975, 3974, 3973, 3972, 3971, 3970, 3969, 3968, 3967, 3966, 3965, 3964, 3963, 3962, 3961, 3960, 3959, 3958, 3957, 3956, 3955, 3954, 3953, 3952, 3951, 3950, 3949, 3948, 3947, 3946, 3945, 3944, 3943, 3942, 3941, 3940, 3939, 3938, 3937, 3936, 3935, 3934, 3933, 3932, 3931, 3930, 3929, 3928, 3927, 3926, 3925, 3924, 3923, 3922, 3921, 3920, 3919, 3918, 3917, 3916, 3915, 3914, 3913, 3912, 3911, 3910, 3909, 3908, 3907, 3906, 3905, 3904, 3903, 3902, 3901, 3900, 3899, 3898, 3897, 3896, 3895, 3894, 3893, 3892, 3891, 3890, 3889, 3888, 3887, 3886, 3885, 3884, 3883, 3882, 3881, 3880, 3879, 3878, 3877, 3876, 3875, 3874, 3873, 3872, 3871, 3870, 3869, 3868, 3867, 3866, 3865, 3864, 3863, 3862, 3861, 3860, 3859, 3858, 3857, 3856, 3855, 3854, 3853, 3852, 3851, 3850, 3849, 3848, 3847, 3846, 3845, 3844, 3843, 3842, 3841, 3840, 3839, 3838, 3837, 3836, 3835, 3834, 3833, 3832, 3831, 3830, 3829, 3828, 3827, 3826, 3825, 3824, 3823, 3822, 3821, 3820, 3819, 3818, 3817, 3816, 3815, 3814, 3813, 3812, 3811, 3810, 3809, 3808, 3807, 3806, 3805, 3804, 3803, 3802, 3801, 3800, 3799, 3798, 3797, 3796, 3795, 3794, 3793, 3792, 3791, 3790, 3789, 3788, 3787, 3786, 3785, 3784, 3783, 3782, 3781, 3780, 3779, 3778, 3777, 3776, 3775, 3774, 3773, 3772, 3771, 3770, 3769, 3768, 3767, 3766, 3765, 3764, 3763, 3762, 3761, 3760, 3759, 3758, 3757, 3756, 3755, 3754, 3753, 3752, 3751, 3750, 3749, 3748, 3747, 3746, 3745, 3744, 3743, 3742, 3741, 3740, 3739, 3738, 3737, 3736, 3735, 3734, 3733, 3732, 3731, 3730, 3729, 3728, 3727, 3726, 3725, 3724, 3723, 3722, 3721, 3720, 3719, 3718, 3717, 3716, 3715, 3714, 3713, 3712, 3711, 3710, 3709, 3708, 3707, 3706, 3705, 3704, 3703, 3702, 3701, 3700, 3699, 3698, 3697, 3696, 3695, 3694, 3693, 3692, 3691, 3690, 3689, 3688, 3687, 3686, 3685, 3684, 3683, 3682, 3681, 3680, 3679, 3678, 3677, 3676, 3675, 3674, 3673, 3672, 3671, 3670, 3669, 3668, 3667, 3666, 3665, 3664, 3663, 3662, 3661, 3660, 3659, 3658, 3657, 3656, 3655, 3654, 3653, 3652, 3651, 3650, 3649, 3648, 3647, 3646, 3645, 3644, 3643, 3642, 3641, 3640, 3639, 3638, 3637, 3636, 3635, 3634, 3633, 3632, 3631, 3630, 3629, 3628, 3627, 3626, 3625, 3624, 3623, 3622, 3621, 3620, 3619, 3618, 3617, 3616, 3615, 3614, 3613, 3612, 3611, 3610, 3609, 3608, 3607, 3606, 3605, 3604, 3603, 3602, 3601, 3600, 3599, 3598, 3597, 3596, 3595, 3594, 3593, 3592, 3591, 3590, 3589, 3588, 3587, 3586, 3585, 3584, 3583, 3582, 3581, 3580, 3579, 3578, 3577, 3576, 3575, 3574, 3573, 3572, 3571, 3570, 3569, 3568, 3567, 3566, 3565, 3564, 3563, 3562, 3561, 3560, 3559, 3558, 3557, 3556, 3555, 3554, 3553, 3552, 3551, 3550, 3549, 3548, 3547, 3546, 3545, 3544, 3543, 3542, 3541, 3540, 3539, 3538, 3537, 3536, 3535, 3534, 3533, 3532, 3531, 3530, 3529, 3528, 3527, 3526, 3525, 3524, 3523, 3522, 3521, 3520, 3519, 3518, 3517, 3516, 3515, 3514, 3513, 3512, 3511, 3510, 3509, 3508, 3507, 3506, 3505, 3504, 3503, 3502, 3501, 3500, 3499, 3498, 3497, 3496, 3495, 3494, 3493, 3492, 3491, 3490, 3489, 3488, 3487, 3486, 3485, 3484, 3483, 3482, 3481, 3480, 3479, 3478, 3477, 3476, 3475, 3474, 3473, 3472, 3471, 3470, 3469, 3468, 3467, 3466, 3465, 3464, 3463, 3462, 3461, 3460, 3459, 3458, 3457, 3456, 3455, 3454, 3453, 3452, 3451, 3450, 3449, 3448, 3447, 3446, 3445, 3444, 3443, 3442, 3441, 3440, 3439, 3438, 3437, 3436, 3435, 3434, 3433, 3432, 3431, 3430, 3429, 3428, 3427, 3426, 3425, 3424, 3423, 3422, 3421, 3420, 3419, 3418, 3417, 3416, 3415, 3414, 3413, 3412, 3411, 3410, 3409, 3408, 3407, 3406, 3405, 3404, 3403, 3402, 3401, 3400, 3399, 3398, 3397, 3396, 3395, 3394, 3393, 3392, 3391, 3390, 3389, 3388, 3387, 3386, 3385, 3384, 3383, 3382, 3381, 3380, 3379, 3378, 3377, 3376, 3375, 3374, 3373, 3372, 3371, 3370, 3369, 3368, 3367, 3366, 3365, 3364, 3363, 3362, 3361, 3360, 3359, 3358, 3357, 3356, 3355, 3354, 3353, 3352, 3351, 3350, 3349, 3348, 3347, 3346, 3345, 3344, 3343, 3342, 3341, 3340, 3339, 3338, 3337, 3336, 3335, 3334, 3333, 3332, 3331, 3330, 3329, 3328, 3327, 3326, 3325, 3324, 3323, 3322, 3321, 3320, 3319, 3318, 3317, 3316, 3315, 3314, 3313, 3312, 3311, 3310, 3309, 3308, 3307, 3306, 3305, 3304, 3303, 3302, 3301, 3300, 3299, 3298, 3297, 3296, 3295, 3294, 3293, 3292, 3291, 3290, 3289, 3288, 3287, 3286, 3285, 3284, 3283, 3282, 3281, 3280, 3279, 3278, 3277, 3276, 3275, 3274, 3273, 3272, 3271, 3270, 3269, 3268, 3267, 3266, 3265, 3264, 3263, 3262, 3261, 3260, 3259, 3258, 3257, 3256, 3255, 3254, 3253, 3252, 3251, 3250, 3249, 3248, 3247, 3246, 3245, 3244, 3243, 3242, 3241, 3240, 3239, 3238, 3237, 3236, 3235, 3234, 3233, 3232, 3231, 3230, 3229, 3228, 3227, 3226, 3225, 3224, 3223, 3222, 3221, 3220, 3219, 3218, 3217, 3216, 3215, 3214, 3213, 3212, 3211, 3210, 3209, 3208, 3207, 3206, 3205, 3204, 3203, 3202, 3201, 3200, 3199, 3198, 3197, 3196, 3195, 3194, 3193, 3192, 3191, 3190, 3189, 3188, 3187, 3186, 3185, 3184, 3183, 3182, 3181, 3180, 3179, 3178, 3177, 3176, 3175, 3174, 3173, 3172, 3171, 3170, 3169, 3168, 3167, 3166, 3165, 3164, 3163, 3162, 3161, 3160, 3159, 3158, 3157, 3156, 3155, 3154, 3153, 3152, 3151, 3150, 3149, 3148, 3147, 3146, 3145, 3144, 3143, 3142, 3141, 3140, 3139, 3138, 3137, 3136, 3135, 3134, 3133, 3132, 3131, 3130, 3129, 3128, 3127, 3126, 3125, 3124, 3123, 3122, 3121, 3120, 3119, 3118, 3117, 3116, 3115, 3114, 3113, 3112, 3111, 3110, 3109, 3108, 3107, 3106, 3105, 3104, 3103, 3102, 3101, 3100, 3099, 3098, 3097, 3096, 3095, 3094, 3093, 3092, 3091, 3090, 3089, 3088, 3087, 3086, 3085, 3084, 3083, 3082, 3081, 3080, 3079, 3078, 3077, 3076, 3075, 3074, 3073, 3072, 3071, 3070, 3069, 3068, 3067, 3066, 3065, 3064, 3063, 3062, 3061, 3060, 3059, 3058, 3057, 3056, 3055, 3054, 3053, 3052, 3051, 3050, 3049, 3048, 3047, 3046, 3045, 3044, 3043, 3042, 3041, 3040, 3039, 3038, 3037, 3036, 3035, 3034, 3033, 3032, 3031, 3030, 3029, 3028, 3027, 3026, 3025, 3024, 3023, 3022, 3021, 3020, 3019, 3018, 3017, 3016, 3015, 3014, 3013, 3012, 3011, 3010, 3009, 3008, 3007, 3006, 3005, 3004, 3003, 3002, 3001, 3000, 2999, 2998, 2997, 2996, 2995, 2994, 2993, 2992, 2991, 2990, 2989, 2988, 2987, 2986, 2985, 2984, 2983, 2982, 2981, 2980, 2979, 2978, 2977, 2976, 2975, 2974, 2973, 2972, 2971, 2970, 2969, 2968, 2967, 2966, 2965, 2964, 2963, 2962, 2961, 2960, 2959, 2958, 2957, 2956, 2955, 2954, 2953, 2952, 2951, 2950, 2949, 2948, 2947, 2946, 2945, 2944, 2943, 2942, 2941, 2940, 2939, 2938, 2937, 2936, 2935, 2934, 2933, 2932, 2931, 2930, 2929, 2928, 2927, 2926, 2925, 2924, 2923, 2922, 2921, 2920, 2919, 2918, 2917, 2916, 2915, 2914, 2913, 2912, 2911, 2910, 2909, 2908, 2907, 2906, 2905, 2904, 2903, 2902, 2901, 2900, 2899, 2898, 2897, 2896, 2895, 2894, 2893, 2892, 2891, 2890, 2889, 2888, 2887, 2886, 2885, 2884, 2883, 2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2848, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2779, 2778, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2743, 2742, 2741, 2740, 2739, 2738, 2737, 2736, 2735, 2734, 2733, 2732, 2731, 2730, 2729, 2728, 2727, 2726, 2725, 2724, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2689, 2688, 2687, 2686, 2685, 2684, 2683, 2682, 2681, 2680, 2679, 2678, 2677, 2676, 2675, 2674, 2673, 2672, 2671, 2670, 2669, 2668, 2667, 2666, 2665, 2664, 2663, 2662, 2661, 2660, 2659, 2658, 2657, 2656, 2655, 2654, 2653, 2652, 2651, 2650, 2649, 2648, 2647, 2646, 2645, 2644, 2643, 2642, 2641, 2640, 2639, 2638, 2637, 2636, 2635, 2634, 2633, 2632, 2631, 2630, 2629, 2628, 2627, 2626, 2625, 2624, 2623, 2622, 2621, 2620, 2619, 2618, 2617, 2616, 2615, 2614, 2613, 2612, 2611, 2610, 2609, 2608, 2607, 2606, 2605, 2604, 2603, 2602, 2601, 2600, 2599, 2598, 2597, 2596, 2595, 2594, 2593, 2592, 2591, 2590, 2589, 2588, 2587, 2586, 2585, 2584, 2583, 2582, 2581, 2580, 2579, 2578, 2577, 2576, 2575, 2574, 2573, 2572, 2571, 2570, 2569, 2568, 2567, 2566, 2565, 2564, 2563, 2562, 2561, 2560, 2559, 2558, 2557, 2556, 2555, 2554, 2553, 2552, 2551, 2550, 2549, 2548, 2547, 2546, 2545, 2544, 2543, 2542, 2541, 2540, 2539, 2538, 2537, 2536, 2535, 2534, 2533, 2532, 2531, 2530, 2529, 2528, 2527, 2526, 2525, 2524, 2523, 2522, 2521, 2520, 2519, 2518, 2517, 2516, 2515, 2514, 2513, 2512, 2511, 2510, 2509, 2508, 2507, 2506, 2505, 2504, 2503, 2502, 2501, 2500, 2499, 2498, 2497, 2496, 2495, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2468, 2467, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2438, 2437, 2436, 2435, 2434, 2433, 2432, 2431, 2430, 2429, 2428, 2427, 2426, 2425, 2424, 2423, 2422, 2421, 2420, 2419, 2418, 2417, 2416, 2415, 2414, 2413, 2412, 2411, 2410, 2409, 2408, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2380, 2379, 2378, 2377, 2376, 2375, 2374, 2373, 2372, 2371, 2370, 2369, 2368, 2367, 2366, 2365, 2364, 2363, 2362, 2361, 2360, 2359, 2358, 2357, 2356, 2355, 2354, 2353, 2352, 2351, 2350, 2349, 2348, 2347, 2346, 2345, 2344, 2343, 2342, 2341, 2340, 2339, 2338, 2337, 2336, 2335, 2334, 2333, 2332, 2331, 2330, 2329, 2328, 2327, 2326, 2325, 2324, 2323, 2322, 2321, 2320, 2319, 2318, 2317, 2316, 2315, 2314, 2313, 2312, 2311, 2310, 2309, 2308, 2307, 2306, 2305, 2304, 2303, 2302, 2301, 2300, 2299, 2298, 2297, 2296, 2295, 2294, 2293, 2292, 2291, 2290, 2289, 2288, 2287, 2286, 2285, 2284, 2283, 2282, 2281, 2280, 2279, 2278, 2277, 2276, 2275, 2274, 2273, 2272, 2271, 2270, 2269, 2268, 2267, 2266, 2265, 2264, 2263, 2262, 2261, 2260, 2259, 2258, 2257, 2256, 2255, 2254, 2253, 2252, 2251, 2250, 2249, 2248, 2247, 2246, 2245, 2244, 2243, 2242, 2241, 2240, 2239, 2238, 2237, 2236, 2235, 2234, 2233, 2232, 2231, 2230, 2229, 2228, 2227, 2226, 2225, 2224, 2223, 2222, 2221, 2220, 2219, 2218, 2217, 2216, 2215, 2214, 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 2205, 2204, 2203, 2202, 2201, 2200, 2199, 2198, 2197, 2196, 2195, 2194, 2193, 2192, 2191, 2190, 2189, 2188, 2187, 2186, 2185, 2184, 2183, 2182, 2181, 2180, 2179, 2178, 2177, 2176, 2175, 2174, 2173, 2172, 2171, 2170, 2169, 2168, 2167, 2166, 2165, 2164, 2163, 2162, 2161, 2160, 2159, 2158, 2157, 2156, 2155, 2154, 2153, 2152, 2151, 2150, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 2142, 2141, 2140, 2139, 2138, 2137, 2136, 2135, 2134, 2133, 2132, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2123, 2122, 2121, 2120, 2119, 2118, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2097, 2096, 2095, 2094, 2093, 2092, 2091, 2090, 2089, 2088, 2087, 2086, 2085, 2084, 2083, 2082, 2081, 2080, 2079, 2078, 2077, 2076, 2075, 2074, 2073, 2072, 2071, 2070, 2069, 2068, 2067, 2066, 2065, 2064, 2063, 2062, 2061, 2060, 2059, 2058, 2057, 2056, 2055, 2054, 2053, 2052, 2051, 2050, 2049, 2048, 2047, 2046, 2045, 2044, 2043, 2042, 2041, 2040, 2039, 2038, 2037, 2036, 2035, 2034, 2033, 2032, 2031, 2030, 2029, 2028, 2027, 2026, 2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, 1899, 1898, 1897, 1896, 1895, 1894, 1893, 1892, 1891, 1890, 1889, 1888, 1887, 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 1878, 1877, 1876, 1875, 1874, 1873, 1872, 1871, 1870, 1869, 1868, 1867, 1866, 1865, 1864, 1863, 1862, 1861, 1860, 1859, 1858, 1857, 1856, 1855, 1854, 1853, 1852, 1851, 1850, 1849, 1848, 1847, 1846, 1845, 1844, 1843, 1842, 1841, 1840, 1839, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1830, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 1822, 1821, 1820, 1819, 1818, 1817, 1816, 1815, 1814, 1813, 1812, 1811, 1810, 1809, 1808, 1807, 1806, 1805, 1804, 1803, 1802, 1801, 1800, 1799, 1798, 1797, 1796, 1795, 1794, 1793, 1792, 1791, 1790, 1789, 1788, 1787, 1786, 1785, 1784, 1783, 1782, 1781, 1780, 1779, 1778, 1777, 1776, 1775, 1774, 1773, 1772, 1771, 1770, 1769, 1768, 1767, 1766, 1765, 1764, 1763, 1762, 1761, 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 1752, 1751, 1750, 1749, 1748, 1747, 1746, 1745, 1744, 1743, 1742, 1741, 1740, 1739, 1738, 1737, 1736, 1735, 1734, 1733, 1732, 1731, 1730, 1729, 1728, 1727, 1726, 1725, 1724, 1723, 1722, 1721, 1720, 1719, 1718, 1717, 1716, 1715, 1714, 1713, 1712, 1711, 1710, 1709, 1708, 1707, 1706, 1705, 1704, 1703, 1702, 1701, 1700, 1699, 1698, 1697, 1696, 1695, 1694, 1693, 1692, 1691, 1690, 1689, 1688, 1687, 1686, 1685, 1684, 1683, 1682, 1681, 1680, 1679, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 1671, 1670, 1669, 1668, 1667, 1666, 1665, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1639, 1638, 1637, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1616, 1615, 1614, 1613, 1612, 1611, 1610, 1609, 1608, 1607, 1606, 1605, 1604, 1603, 1602, 1601, 1600, 1599, 1598, 1597, 1596, 1595, 1594, 1593, 1592, 1591, 1590, 1589, 1588, 1587, 1586, 1585, 1584, 1583, 1582, 1581, 1580, 1579, 1578, 1577, 1576, 1575, 1574, 1573, 1572, 1571, 1570, 1569, 1568, 1567, 1566, 1565, 1564, 1563, 1562, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1553, 1552, 1551, 1550, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, 1540, 1539, 1538, 1537, 1536, 1535, 1534, 1533, 1532, 1531, 1530, 1529, 1528, 1527, 1526, 1525, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1516, 1515, 1514, 1513, 1512, 1511, 1510, 1509, 1508, 1507, 1506, 1505, 1504, 1503, 1502, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251, 1250, 1249, 1248, 1247, 1246, 1245, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1237, 1236, 1235, 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1218, 1217, 1216, 1215, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1207, 1206, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, 1187, 1186, 1185, 1184, 1183, 1182, 1181, 1180, 1179, 1178, 1177, 1176, 1175, 1174, 1173, 1172, 1171, 1170, 1169, 1168, 1167, 1166, 1165, 1164, 1163, 1162, 1161, 1160, 1159, 1158, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141, 1140, 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1126, 1125, 1124, 1123, 1122, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 1087, 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1079, 1078, 1077, 1076, 1075, 1074, 1073, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001, 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, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 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]\n assert candidate(n = 200,k = 199) == [1, 200, 2, 199, 3, 198, 4, 197, 5, 196, 6, 195, 7, 194, 8, 193, 9, 192, 10, 191, 11, 190, 12, 189, 13, 188, 14, 187, 15, 186, 16, 185, 17, 184, 18, 183, 19, 182, 20, 181, 21, 180, 22, 179, 23, 178, 24, 177, 25, 176, 26, 175, 27, 174, 28, 173, 29, 172, 30, 171, 31, 170, 32, 169, 33, 168, 34, 167, 35, 166, 36, 165, 37, 164, 38, 163, 39, 162, 40, 161, 41, 160, 42, 159, 43, 158, 44, 157, 45, 156, 46, 155, 47, 154, 48, 153, 49, 152, 50, 151, 51, 150, 52, 149, 53, 148, 54, 147, 55, 146, 56, 145, 57, 144, 58, 143, 59, 142, 60, 141, 61, 140, 62, 139, 63, 138, 64, 137, 65, 136, 66, 135, 67, 134, 68, 133, 69, 132, 70, 131, 71, 130, 72, 129, 73, 128, 74, 127, 75, 126, 76, 125, 77, 124, 78, 123, 79, 122, 80, 121, 81, 120, 82, 119, 83, 118, 84, 117, 85, 116, 86, 115, 87, 114, 88, 113, 89, 112, 90, 111, 91, 110, 92, 109, 93, 108, 94, 107, 95, 106, 96, 105, 97, 104, 98, 103, 99, 102, 100, 101]\n assert candidate(n = 8,k = 6) == [1, 8, 2, 7, 3, 6, 5, 4]\n assert candidate(n = 10,k = 3) == [1, 10, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(n = 10,k = 9) == [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]\n assert candidate(n = 4000,k = 2000) == [1, 4000, 2, 3999, 3, 3998, 4, 3997, 5, 3996, 6, 3995, 7, 3994, 8, 3993, 9, 3992, 10, 3991, 11, 3990, 12, 3989, 13, 3988, 14, 3987, 15, 3986, 16, 3985, 17, 3984, 18, 3983, 19, 3982, 20, 3981, 21, 3980, 22, 3979, 23, 3978, 24, 3977, 25, 3976, 26, 3975, 27, 3974, 28, 3973, 29, 3972, 30, 3971, 31, 3970, 32, 3969, 33, 3968, 34, 3967, 35, 3966, 36, 3965, 37, 3964, 38, 3963, 39, 3962, 40, 3961, 41, 3960, 42, 3959, 43, 3958, 44, 3957, 45, 3956, 46, 3955, 47, 3954, 48, 3953, 49, 3952, 50, 3951, 51, 3950, 52, 3949, 53, 3948, 54, 3947, 55, 3946, 56, 3945, 57, 3944, 58, 3943, 59, 3942, 60, 3941, 61, 3940, 62, 3939, 63, 3938, 64, 3937, 65, 3936, 66, 3935, 67, 3934, 68, 3933, 69, 3932, 70, 3931, 71, 3930, 72, 3929, 73, 3928, 74, 3927, 75, 3926, 76, 3925, 77, 3924, 78, 3923, 79, 3922, 80, 3921, 81, 3920, 82, 3919, 83, 3918, 84, 3917, 85, 3916, 86, 3915, 87, 3914, 88, 3913, 89, 3912, 90, 3911, 91, 3910, 92, 3909, 93, 3908, 94, 3907, 95, 3906, 96, 3905, 97, 3904, 98, 3903, 99, 3902, 100, 3901, 101, 3900, 102, 3899, 103, 3898, 104, 3897, 105, 3896, 106, 3895, 107, 3894, 108, 3893, 109, 3892, 110, 3891, 111, 3890, 112, 3889, 113, 3888, 114, 3887, 115, 3886, 116, 3885, 117, 3884, 118, 3883, 119, 3882, 120, 3881, 121, 3880, 122, 3879, 123, 3878, 124, 3877, 125, 3876, 126, 3875, 127, 3874, 128, 3873, 129, 3872, 130, 3871, 131, 3870, 132, 3869, 133, 3868, 134, 3867, 135, 3866, 136, 3865, 137, 3864, 138, 3863, 139, 3862, 140, 3861, 141, 3860, 142, 3859, 143, 3858, 144, 3857, 145, 3856, 146, 3855, 147, 3854, 148, 3853, 149, 3852, 150, 3851, 151, 3850, 152, 3849, 153, 3848, 154, 3847, 155, 3846, 156, 3845, 157, 3844, 158, 3843, 159, 3842, 160, 3841, 161, 3840, 162, 3839, 163, 3838, 164, 3837, 165, 3836, 166, 3835, 167, 3834, 168, 3833, 169, 3832, 170, 3831, 171, 3830, 172, 3829, 173, 3828, 174, 3827, 175, 3826, 176, 3825, 177, 3824, 178, 3823, 179, 3822, 180, 3821, 181, 3820, 182, 3819, 183, 3818, 184, 3817, 185, 3816, 186, 3815, 187, 3814, 188, 3813, 189, 3812, 190, 3811, 191, 3810, 192, 3809, 193, 3808, 194, 3807, 195, 3806, 196, 3805, 197, 3804, 198, 3803, 199, 3802, 200, 3801, 201, 3800, 202, 3799, 203, 3798, 204, 3797, 205, 3796, 206, 3795, 207, 3794, 208, 3793, 209, 3792, 210, 3791, 211, 3790, 212, 3789, 213, 3788, 214, 3787, 215, 3786, 216, 3785, 217, 3784, 218, 3783, 219, 3782, 220, 3781, 221, 3780, 222, 3779, 223, 3778, 224, 3777, 225, 3776, 226, 3775, 227, 3774, 228, 3773, 229, 3772, 230, 3771, 231, 3770, 232, 3769, 233, 3768, 234, 3767, 235, 3766, 236, 3765, 237, 3764, 238, 3763, 239, 3762, 240, 3761, 241, 3760, 242, 3759, 243, 3758, 244, 3757, 245, 3756, 246, 3755, 247, 3754, 248, 3753, 249, 3752, 250, 3751, 251, 3750, 252, 3749, 253, 3748, 254, 3747, 255, 3746, 256, 3745, 257, 3744, 258, 3743, 259, 3742, 260, 3741, 261, 3740, 262, 3739, 263, 3738, 264, 3737, 265, 3736, 266, 3735, 267, 3734, 268, 3733, 269, 3732, 270, 3731, 271, 3730, 272, 3729, 273, 3728, 274, 3727, 275, 3726, 276, 3725, 277, 3724, 278, 3723, 279, 3722, 280, 3721, 281, 3720, 282, 3719, 283, 3718, 284, 3717, 285, 3716, 286, 3715, 287, 3714, 288, 3713, 289, 3712, 290, 3711, 291, 3710, 292, 3709, 293, 3708, 294, 3707, 295, 3706, 296, 3705, 297, 3704, 298, 3703, 299, 3702, 300, 3701, 301, 3700, 302, 3699, 303, 3698, 304, 3697, 305, 3696, 306, 3695, 307, 3694, 308, 3693, 309, 3692, 310, 3691, 311, 3690, 312, 3689, 313, 3688, 314, 3687, 315, 3686, 316, 3685, 317, 3684, 318, 3683, 319, 3682, 320, 3681, 321, 3680, 322, 3679, 323, 3678, 324, 3677, 325, 3676, 326, 3675, 327, 3674, 328, 3673, 329, 3672, 330, 3671, 331, 3670, 332, 3669, 333, 3668, 334, 3667, 335, 3666, 336, 3665, 337, 3664, 338, 3663, 339, 3662, 340, 3661, 341, 3660, 342, 3659, 343, 3658, 344, 3657, 345, 3656, 346, 3655, 347, 3654, 348, 3653, 349, 3652, 350, 3651, 351, 3650, 352, 3649, 353, 3648, 354, 3647, 355, 3646, 356, 3645, 357, 3644, 358, 3643, 359, 3642, 360, 3641, 361, 3640, 362, 3639, 363, 3638, 364, 3637, 365, 3636, 366, 3635, 367, 3634, 368, 3633, 369, 3632, 370, 3631, 371, 3630, 372, 3629, 373, 3628, 374, 3627, 375, 3626, 376, 3625, 377, 3624, 378, 3623, 379, 3622, 380, 3621, 381, 3620, 382, 3619, 383, 3618, 384, 3617, 385, 3616, 386, 3615, 387, 3614, 388, 3613, 389, 3612, 390, 3611, 391, 3610, 392, 3609, 393, 3608, 394, 3607, 395, 3606, 396, 3605, 397, 3604, 398, 3603, 399, 3602, 400, 3601, 401, 3600, 402, 3599, 403, 3598, 404, 3597, 405, 3596, 406, 3595, 407, 3594, 408, 3593, 409, 3592, 410, 3591, 411, 3590, 412, 3589, 413, 3588, 414, 3587, 415, 3586, 416, 3585, 417, 3584, 418, 3583, 419, 3582, 420, 3581, 421, 3580, 422, 3579, 423, 3578, 424, 3577, 425, 3576, 426, 3575, 427, 3574, 428, 3573, 429, 3572, 430, 3571, 431, 3570, 432, 3569, 433, 3568, 434, 3567, 435, 3566, 436, 3565, 437, 3564, 438, 3563, 439, 3562, 440, 3561, 441, 3560, 442, 3559, 443, 3558, 444, 3557, 445, 3556, 446, 3555, 447, 3554, 448, 3553, 449, 3552, 450, 3551, 451, 3550, 452, 3549, 453, 3548, 454, 3547, 455, 3546, 456, 3545, 457, 3544, 458, 3543, 459, 3542, 460, 3541, 461, 3540, 462, 3539, 463, 3538, 464, 3537, 465, 3536, 466, 3535, 467, 3534, 468, 3533, 469, 3532, 470, 3531, 471, 3530, 472, 3529, 473, 3528, 474, 3527, 475, 3526, 476, 3525, 477, 3524, 478, 3523, 479, 3522, 480, 3521, 481, 3520, 482, 3519, 483, 3518, 484, 3517, 485, 3516, 486, 3515, 487, 3514, 488, 3513, 489, 3512, 490, 3511, 491, 3510, 492, 3509, 493, 3508, 494, 3507, 495, 3506, 496, 3505, 497, 3504, 498, 3503, 499, 3502, 500, 3501, 501, 3500, 502, 3499, 503, 3498, 504, 3497, 505, 3496, 506, 3495, 507, 3494, 508, 3493, 509, 3492, 510, 3491, 511, 3490, 512, 3489, 513, 3488, 514, 3487, 515, 3486, 516, 3485, 517, 3484, 518, 3483, 519, 3482, 520, 3481, 521, 3480, 522, 3479, 523, 3478, 524, 3477, 525, 3476, 526, 3475, 527, 3474, 528, 3473, 529, 3472, 530, 3471, 531, 3470, 532, 3469, 533, 3468, 534, 3467, 535, 3466, 536, 3465, 537, 3464, 538, 3463, 539, 3462, 540, 3461, 541, 3460, 542, 3459, 543, 3458, 544, 3457, 545, 3456, 546, 3455, 547, 3454, 548, 3453, 549, 3452, 550, 3451, 551, 3450, 552, 3449, 553, 3448, 554, 3447, 555, 3446, 556, 3445, 557, 3444, 558, 3443, 559, 3442, 560, 3441, 561, 3440, 562, 3439, 563, 3438, 564, 3437, 565, 3436, 566, 3435, 567, 3434, 568, 3433, 569, 3432, 570, 3431, 571, 3430, 572, 3429, 573, 3428, 574, 3427, 575, 3426, 576, 3425, 577, 3424, 578, 3423, 579, 3422, 580, 3421, 581, 3420, 582, 3419, 583, 3418, 584, 3417, 585, 3416, 586, 3415, 587, 3414, 588, 3413, 589, 3412, 590, 3411, 591, 3410, 592, 3409, 593, 3408, 594, 3407, 595, 3406, 596, 3405, 597, 3404, 598, 3403, 599, 3402, 600, 3401, 601, 3400, 602, 3399, 603, 3398, 604, 3397, 605, 3396, 606, 3395, 607, 3394, 608, 3393, 609, 3392, 610, 3391, 611, 3390, 612, 3389, 613, 3388, 614, 3387, 615, 3386, 616, 3385, 617, 3384, 618, 3383, 619, 3382, 620, 3381, 621, 3380, 622, 3379, 623, 3378, 624, 3377, 625, 3376, 626, 3375, 627, 3374, 628, 3373, 629, 3372, 630, 3371, 631, 3370, 632, 3369, 633, 3368, 634, 3367, 635, 3366, 636, 3365, 637, 3364, 638, 3363, 639, 3362, 640, 3361, 641, 3360, 642, 3359, 643, 3358, 644, 3357, 645, 3356, 646, 3355, 647, 3354, 648, 3353, 649, 3352, 650, 3351, 651, 3350, 652, 3349, 653, 3348, 654, 3347, 655, 3346, 656, 3345, 657, 3344, 658, 3343, 659, 3342, 660, 3341, 661, 3340, 662, 3339, 663, 3338, 664, 3337, 665, 3336, 666, 3335, 667, 3334, 668, 3333, 669, 3332, 670, 3331, 671, 3330, 672, 3329, 673, 3328, 674, 3327, 675, 3326, 676, 3325, 677, 3324, 678, 3323, 679, 3322, 680, 3321, 681, 3320, 682, 3319, 683, 3318, 684, 3317, 685, 3316, 686, 3315, 687, 3314, 688, 3313, 689, 3312, 690, 3311, 691, 3310, 692, 3309, 693, 3308, 694, 3307, 695, 3306, 696, 3305, 697, 3304, 698, 3303, 699, 3302, 700, 3301, 701, 3300, 702, 3299, 703, 3298, 704, 3297, 705, 3296, 706, 3295, 707, 3294, 708, 3293, 709, 3292, 710, 3291, 711, 3290, 712, 3289, 713, 3288, 714, 3287, 715, 3286, 716, 3285, 717, 3284, 718, 3283, 719, 3282, 720, 3281, 721, 3280, 722, 3279, 723, 3278, 724, 3277, 725, 3276, 726, 3275, 727, 3274, 728, 3273, 729, 3272, 730, 3271, 731, 3270, 732, 3269, 733, 3268, 734, 3267, 735, 3266, 736, 3265, 737, 3264, 738, 3263, 739, 3262, 740, 3261, 741, 3260, 742, 3259, 743, 3258, 744, 3257, 745, 3256, 746, 3255, 747, 3254, 748, 3253, 749, 3252, 750, 3251, 751, 3250, 752, 3249, 753, 3248, 754, 3247, 755, 3246, 756, 3245, 757, 3244, 758, 3243, 759, 3242, 760, 3241, 761, 3240, 762, 3239, 763, 3238, 764, 3237, 765, 3236, 766, 3235, 767, 3234, 768, 3233, 769, 3232, 770, 3231, 771, 3230, 772, 3229, 773, 3228, 774, 3227, 775, 3226, 776, 3225, 777, 3224, 778, 3223, 779, 3222, 780, 3221, 781, 3220, 782, 3219, 783, 3218, 784, 3217, 785, 3216, 786, 3215, 787, 3214, 788, 3213, 789, 3212, 790, 3211, 791, 3210, 792, 3209, 793, 3208, 794, 3207, 795, 3206, 796, 3205, 797, 3204, 798, 3203, 799, 3202, 800, 3201, 801, 3200, 802, 3199, 803, 3198, 804, 3197, 805, 3196, 806, 3195, 807, 3194, 808, 3193, 809, 3192, 810, 3191, 811, 3190, 812, 3189, 813, 3188, 814, 3187, 815, 3186, 816, 3185, 817, 3184, 818, 3183, 819, 3182, 820, 3181, 821, 3180, 822, 3179, 823, 3178, 824, 3177, 825, 3176, 826, 3175, 827, 3174, 828, 3173, 829, 3172, 830, 3171, 831, 3170, 832, 3169, 833, 3168, 834, 3167, 835, 3166, 836, 3165, 837, 3164, 838, 3163, 839, 3162, 840, 3161, 841, 3160, 842, 3159, 843, 3158, 844, 3157, 845, 3156, 846, 3155, 847, 3154, 848, 3153, 849, 3152, 850, 3151, 851, 3150, 852, 3149, 853, 3148, 854, 3147, 855, 3146, 856, 3145, 857, 3144, 858, 3143, 859, 3142, 860, 3141, 861, 3140, 862, 3139, 863, 3138, 864, 3137, 865, 3136, 866, 3135, 867, 3134, 868, 3133, 869, 3132, 870, 3131, 871, 3130, 872, 3129, 873, 3128, 874, 3127, 875, 3126, 876, 3125, 877, 3124, 878, 3123, 879, 3122, 880, 3121, 881, 3120, 882, 3119, 883, 3118, 884, 3117, 885, 3116, 886, 3115, 887, 3114, 888, 3113, 889, 3112, 890, 3111, 891, 3110, 892, 3109, 893, 3108, 894, 3107, 895, 3106, 896, 3105, 897, 3104, 898, 3103, 899, 3102, 900, 3101, 901, 3100, 902, 3099, 903, 3098, 904, 3097, 905, 3096, 906, 3095, 907, 3094, 908, 3093, 909, 3092, 910, 3091, 911, 3090, 912, 3089, 913, 3088, 914, 3087, 915, 3086, 916, 3085, 917, 3084, 918, 3083, 919, 3082, 920, 3081, 921, 3080, 922, 3079, 923, 3078, 924, 3077, 925, 3076, 926, 3075, 927, 3074, 928, 3073, 929, 3072, 930, 3071, 931, 3070, 932, 3069, 933, 3068, 934, 3067, 935, 3066, 936, 3065, 937, 3064, 938, 3063, 939, 3062, 940, 3061, 941, 3060, 942, 3059, 943, 3058, 944, 3057, 945, 3056, 946, 3055, 947, 3054, 948, 3053, 949, 3052, 950, 3051, 951, 3050, 952, 3049, 953, 3048, 954, 3047, 955, 3046, 956, 3045, 957, 3044, 958, 3043, 959, 3042, 960, 3041, 961, 3040, 962, 3039, 963, 3038, 964, 3037, 965, 3036, 966, 3035, 967, 3034, 968, 3033, 969, 3032, 970, 3031, 971, 3030, 972, 3029, 973, 3028, 974, 3027, 975, 3026, 976, 3025, 977, 3024, 978, 3023, 979, 3022, 980, 3021, 981, 3020, 982, 3019, 983, 3018, 984, 3017, 985, 3016, 986, 3015, 987, 3014, 988, 3013, 989, 3012, 990, 3011, 991, 3010, 992, 3009, 993, 3008, 994, 3007, 995, 3006, 996, 3005, 997, 3004, 998, 3003, 999, 3002, 1000, 3001, 3000, 2999, 2998, 2997, 2996, 2995, 2994, 2993, 2992, 2991, 2990, 2989, 2988, 2987, 2986, 2985, 2984, 2983, 2982, 2981, 2980, 2979, 2978, 2977, 2976, 2975, 2974, 2973, 2972, 2971, 2970, 2969, 2968, 2967, 2966, 2965, 2964, 2963, 2962, 2961, 2960, 2959, 2958, 2957, 2956, 2955, 2954, 2953, 2952, 2951, 2950, 2949, 2948, 2947, 2946, 2945, 2944, 2943, 2942, 2941, 2940, 2939, 2938, 2937, 2936, 2935, 2934, 2933, 2932, 2931, 2930, 2929, 2928, 2927, 2926, 2925, 2924, 2923, 2922, 2921, 2920, 2919, 2918, 2917, 2916, 2915, 2914, 2913, 2912, 2911, 2910, 2909, 2908, 2907, 2906, 2905, 2904, 2903, 2902, 2901, 2900, 2899, 2898, 2897, 2896, 2895, 2894, 2893, 2892, 2891, 2890, 2889, 2888, 2887, 2886, 2885, 2884, 2883, 2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2848, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2779, 2778, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2743, 2742, 2741, 2740, 2739, 2738, 2737, 2736, 2735, 2734, 2733, 2732, 2731, 2730, 2729, 2728, 2727, 2726, 2725, 2724, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2689, 2688, 2687, 2686, 2685, 2684, 2683, 2682, 2681, 2680, 2679, 2678, 2677, 2676, 2675, 2674, 2673, 2672, 2671, 2670, 2669, 2668, 2667, 2666, 2665, 2664, 2663, 2662, 2661, 2660, 2659, 2658, 2657, 2656, 2655, 2654, 2653, 2652, 2651, 2650, 2649, 2648, 2647, 2646, 2645, 2644, 2643, 2642, 2641, 2640, 2639, 2638, 2637, 2636, 2635, 2634, 2633, 2632, 2631, 2630, 2629, 2628, 2627, 2626, 2625, 2624, 2623, 2622, 2621, 2620, 2619, 2618, 2617, 2616, 2615, 2614, 2613, 2612, 2611, 2610, 2609, 2608, 2607, 2606, 2605, 2604, 2603, 2602, 2601, 2600, 2599, 2598, 2597, 2596, 2595, 2594, 2593, 2592, 2591, 2590, 2589, 2588, 2587, 2586, 2585, 2584, 2583, 2582, 2581, 2580, 2579, 2578, 2577, 2576, 2575, 2574, 2573, 2572, 2571, 2570, 2569, 2568, 2567, 2566, 2565, 2564, 2563, 2562, 2561, 2560, 2559, 2558, 2557, 2556, 2555, 2554, 2553, 2552, 2551, 2550, 2549, 2548, 2547, 2546, 2545, 2544, 2543, 2542, 2541, 2540, 2539, 2538, 2537, 2536, 2535, 2534, 2533, 2532, 2531, 2530, 2529, 2528, 2527, 2526, 2525, 2524, 2523, 2522, 2521, 2520, 2519, 2518, 2517, 2516, 2515, 2514, 2513, 2512, 2511, 2510, 2509, 2508, 2507, 2506, 2505, 2504, 2503, 2502, 2501, 2500, 2499, 2498, 2497, 2496, 2495, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2468, 2467, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2438, 2437, 2436, 2435, 2434, 2433, 2432, 2431, 2430, 2429, 2428, 2427, 2426, 2425, 2424, 2423, 2422, 2421, 2420, 2419, 2418, 2417, 2416, 2415, 2414, 2413, 2412, 2411, 2410, 2409, 2408, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2380, 2379, 2378, 2377, 2376, 2375, 2374, 2373, 2372, 2371, 2370, 2369, 2368, 2367, 2366, 2365, 2364, 2363, 2362, 2361, 2360, 2359, 2358, 2357, 2356, 2355, 2354, 2353, 2352, 2351, 2350, 2349, 2348, 2347, 2346, 2345, 2344, 2343, 2342, 2341, 2340, 2339, 2338, 2337, 2336, 2335, 2334, 2333, 2332, 2331, 2330, 2329, 2328, 2327, 2326, 2325, 2324, 2323, 2322, 2321, 2320, 2319, 2318, 2317, 2316, 2315, 2314, 2313, 2312, 2311, 2310, 2309, 2308, 2307, 2306, 2305, 2304, 2303, 2302, 2301, 2300, 2299, 2298, 2297, 2296, 2295, 2294, 2293, 2292, 2291, 2290, 2289, 2288, 2287, 2286, 2285, 2284, 2283, 2282, 2281, 2280, 2279, 2278, 2277, 2276, 2275, 2274, 2273, 2272, 2271, 2270, 2269, 2268, 2267, 2266, 2265, 2264, 2263, 2262, 2261, 2260, 2259, 2258, 2257, 2256, 2255, 2254, 2253, 2252, 2251, 2250, 2249, 2248, 2247, 2246, 2245, 2244, 2243, 2242, 2241, 2240, 2239, 2238, 2237, 2236, 2235, 2234, 2233, 2232, 2231, 2230, 2229, 2228, 2227, 2226, 2225, 2224, 2223, 2222, 2221, 2220, 2219, 2218, 2217, 2216, 2215, 2214, 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 2205, 2204, 2203, 2202, 2201, 2200, 2199, 2198, 2197, 2196, 2195, 2194, 2193, 2192, 2191, 2190, 2189, 2188, 2187, 2186, 2185, 2184, 2183, 2182, 2181, 2180, 2179, 2178, 2177, 2176, 2175, 2174, 2173, 2172, 2171, 2170, 2169, 2168, 2167, 2166, 2165, 2164, 2163, 2162, 2161, 2160, 2159, 2158, 2157, 2156, 2155, 2154, 2153, 2152, 2151, 2150, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 2142, 2141, 2140, 2139, 2138, 2137, 2136, 2135, 2134, 2133, 2132, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2123, 2122, 2121, 2120, 2119, 2118, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2097, 2096, 2095, 2094, 2093, 2092, 2091, 2090, 2089, 2088, 2087, 2086, 2085, 2084, 2083, 2082, 2081, 2080, 2079, 2078, 2077, 2076, 2075, 2074, 2073, 2072, 2071, 2070, 2069, 2068, 2067, 2066, 2065, 2064, 2063, 2062, 2061, 2060, 2059, 2058, 2057, 2056, 2055, 2054, 2053, 2052, 2051, 2050, 2049, 2048, 2047, 2046, 2045, 2044, 2043, 2042, 2041, 2040, 2039, 2038, 2037, 2036, 2035, 2034, 2033, 2032, 2031, 2030, 2029, 2028, 2027, 2026, 2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, 1899, 1898, 1897, 1896, 1895, 1894, 1893, 1892, 1891, 1890, 1889, 1888, 1887, 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 1878, 1877, 1876, 1875, 1874, 1873, 1872, 1871, 1870, 1869, 1868, 1867, 1866, 1865, 1864, 1863, 1862, 1861, 1860, 1859, 1858, 1857, 1856, 1855, 1854, 1853, 1852, 1851, 1850, 1849, 1848, 1847, 1846, 1845, 1844, 1843, 1842, 1841, 1840, 1839, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1830, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 1822, 1821, 1820, 1819, 1818, 1817, 1816, 1815, 1814, 1813, 1812, 1811, 1810, 1809, 1808, 1807, 1806, 1805, 1804, 1803, 1802, 1801, 1800, 1799, 1798, 1797, 1796, 1795, 1794, 1793, 1792, 1791, 1790, 1789, 1788, 1787, 1786, 1785, 1784, 1783, 1782, 1781, 1780, 1779, 1778, 1777, 1776, 1775, 1774, 1773, 1772, 1771, 1770, 1769, 1768, 1767, 1766, 1765, 1764, 1763, 1762, 1761, 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 1752, 1751, 1750, 1749, 1748, 1747, 1746, 1745, 1744, 1743, 1742, 1741, 1740, 1739, 1738, 1737, 1736, 1735, 1734, 1733, 1732, 1731, 1730, 1729, 1728, 1727, 1726, 1725, 1724, 1723, 1722, 1721, 1720, 1719, 1718, 1717, 1716, 1715, 1714, 1713, 1712, 1711, 1710, 1709, 1708, 1707, 1706, 1705, 1704, 1703, 1702, 1701, 1700, 1699, 1698, 1697, 1696, 1695, 1694, 1693, 1692, 1691, 1690, 1689, 1688, 1687, 1686, 1685, 1684, 1683, 1682, 1681, 1680, 1679, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 1671, 1670, 1669, 1668, 1667, 1666, 1665, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1639, 1638, 1637, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1616, 1615, 1614, 1613, 1612, 1611, 1610, 1609, 1608, 1607, 1606, 1605, 1604, 1603, 1602, 1601, 1600, 1599, 1598, 1597, 1596, 1595, 1594, 1593, 1592, 1591, 1590, 1589, 1588, 1587, 1586, 1585, 1584, 1583, 1582, 1581, 1580, 1579, 1578, 1577, 1576, 1575, 1574, 1573, 1572, 1571, 1570, 1569, 1568, 1567, 1566, 1565, 1564, 1563, 1562, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1553, 1552, 1551, 1550, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, 1540, 1539, 1538, 1537, 1536, 1535, 1534, 1533, 1532, 1531, 1530, 1529, 1528, 1527, 1526, 1525, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1516, 1515, 1514, 1513, 1512, 1511, 1510, 1509, 1508, 1507, 1506, 1505, 1504, 1503, 1502, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251, 1250, 1249, 1248, 1247, 1246, 1245, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1237, 1236, 1235, 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1218, 1217, 1216, 1215, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1207, 1206, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, 1187, 1186, 1185, 1184, 1183, 1182, 1181, 1180, 1179, 1178, 1177, 1176, 1175, 1174, 1173, 1172, 1171, 1170, 1169, 1168, 1167, 1166, 1165, 1164, 1163, 1162, 1161, 1160, 1159, 1158, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141, 1140, 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1126, 1125, 1124, 1123, 1122, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 1087, 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1079, 1078, 1077, 1076, 1075, 1074, 1073, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001]\n assert candidate(n = 30,k = 20) == [1, 30, 2, 29, 3, 28, 4, 27, 5, 26, 6, 25, 7, 24, 8, 23, 9, 22, 10, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11]\n assert candidate(n = 250,k = 120) == [1, 250, 2, 249, 3, 248, 4, 247, 5, 246, 6, 245, 7, 244, 8, 243, 9, 242, 10, 241, 11, 240, 12, 239, 13, 238, 14, 237, 15, 236, 16, 235, 17, 234, 18, 233, 19, 232, 20, 231, 21, 230, 22, 229, 23, 228, 24, 227, 25, 226, 26, 225, 27, 224, 28, 223, 29, 222, 30, 221, 31, 220, 32, 219, 33, 218, 34, 217, 35, 216, 36, 215, 37, 214, 38, 213, 39, 212, 40, 211, 41, 210, 42, 209, 43, 208, 44, 207, 45, 206, 46, 205, 47, 204, 48, 203, 49, 202, 50, 201, 51, 200, 52, 199, 53, 198, 54, 197, 55, 196, 56, 195, 57, 194, 58, 193, 59, 192, 60, 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]\n assert candidate(n = 950,k = 475) == [1, 950, 2, 949, 3, 948, 4, 947, 5, 946, 6, 945, 7, 944, 8, 943, 9, 942, 10, 941, 11, 940, 12, 939, 13, 938, 14, 937, 15, 936, 16, 935, 17, 934, 18, 933, 19, 932, 20, 931, 21, 930, 22, 929, 23, 928, 24, 927, 25, 926, 26, 925, 27, 924, 28, 923, 29, 922, 30, 921, 31, 920, 32, 919, 33, 918, 34, 917, 35, 916, 36, 915, 37, 914, 38, 913, 39, 912, 40, 911, 41, 910, 42, 909, 43, 908, 44, 907, 45, 906, 46, 905, 47, 904, 48, 903, 49, 902, 50, 901, 51, 900, 52, 899, 53, 898, 54, 897, 55, 896, 56, 895, 57, 894, 58, 893, 59, 892, 60, 891, 61, 890, 62, 889, 63, 888, 64, 887, 65, 886, 66, 885, 67, 884, 68, 883, 69, 882, 70, 881, 71, 880, 72, 879, 73, 878, 74, 877, 75, 876, 76, 875, 77, 874, 78, 873, 79, 872, 80, 871, 81, 870, 82, 869, 83, 868, 84, 867, 85, 866, 86, 865, 87, 864, 88, 863, 89, 862, 90, 861, 91, 860, 92, 859, 93, 858, 94, 857, 95, 856, 96, 855, 97, 854, 98, 853, 99, 852, 100, 851, 101, 850, 102, 849, 103, 848, 104, 847, 105, 846, 106, 845, 107, 844, 108, 843, 109, 842, 110, 841, 111, 840, 112, 839, 113, 838, 114, 837, 115, 836, 116, 835, 117, 834, 118, 833, 119, 832, 120, 831, 121, 830, 122, 829, 123, 828, 124, 827, 125, 826, 126, 825, 127, 824, 128, 823, 129, 822, 130, 821, 131, 820, 132, 819, 133, 818, 134, 817, 135, 816, 136, 815, 137, 814, 138, 813, 139, 812, 140, 811, 141, 810, 142, 809, 143, 808, 144, 807, 145, 806, 146, 805, 147, 804, 148, 803, 149, 802, 150, 801, 151, 800, 152, 799, 153, 798, 154, 797, 155, 796, 156, 795, 157, 794, 158, 793, 159, 792, 160, 791, 161, 790, 162, 789, 163, 788, 164, 787, 165, 786, 166, 785, 167, 784, 168, 783, 169, 782, 170, 781, 171, 780, 172, 779, 173, 778, 174, 777, 175, 776, 176, 775, 177, 774, 178, 773, 179, 772, 180, 771, 181, 770, 182, 769, 183, 768, 184, 767, 185, 766, 186, 765, 187, 764, 188, 763, 189, 762, 190, 761, 191, 760, 192, 759, 193, 758, 194, 757, 195, 756, 196, 755, 197, 754, 198, 753, 199, 752, 200, 751, 201, 750, 202, 749, 203, 748, 204, 747, 205, 746, 206, 745, 207, 744, 208, 743, 209, 742, 210, 741, 211, 740, 212, 739, 213, 738, 214, 737, 215, 736, 216, 735, 217, 734, 218, 733, 219, 732, 220, 731, 221, 730, 222, 729, 223, 728, 224, 727, 225, 726, 226, 725, 227, 724, 228, 723, 229, 722, 230, 721, 231, 720, 232, 719, 233, 718, 234, 717, 235, 716, 236, 715, 237, 714, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713]\n assert candidate(n = 25,k = 20) == [1, 25, 2, 24, 3, 23, 4, 22, 5, 21, 6, 20, 7, 19, 8, 18, 9, 17, 10, 16, 15, 14, 13, 12, 11]\n assert candidate(n = 499,k = 249) == [1, 499, 2, 498, 3, 497, 4, 496, 5, 495, 6, 494, 7, 493, 8, 492, 9, 491, 10, 490, 11, 489, 12, 488, 13, 487, 14, 486, 15, 485, 16, 484, 17, 483, 18, 482, 19, 481, 20, 480, 21, 479, 22, 478, 23, 477, 24, 476, 25, 475, 26, 474, 27, 473, 28, 472, 29, 471, 30, 470, 31, 469, 32, 468, 33, 467, 34, 466, 35, 465, 36, 464, 37, 463, 38, 462, 39, 461, 40, 460, 41, 459, 42, 458, 43, 457, 44, 456, 45, 455, 46, 454, 47, 453, 48, 452, 49, 451, 50, 450, 51, 449, 52, 448, 53, 447, 54, 446, 55, 445, 56, 444, 57, 443, 58, 442, 59, 441, 60, 440, 61, 439, 62, 438, 63, 437, 64, 436, 65, 435, 66, 434, 67, 433, 68, 432, 69, 431, 70, 430, 71, 429, 72, 428, 73, 427, 74, 426, 75, 425, 76, 424, 77, 423, 78, 422, 79, 421, 80, 420, 81, 419, 82, 418, 83, 417, 84, 416, 85, 415, 86, 414, 87, 413, 88, 412, 89, 411, 90, 410, 91, 409, 92, 408, 93, 407, 94, 406, 95, 405, 96, 404, 97, 403, 98, 402, 99, 401, 100, 400, 101, 399, 102, 398, 103, 397, 104, 396, 105, 395, 106, 394, 107, 393, 108, 392, 109, 391, 110, 390, 111, 389, 112, 388, 113, 387, 114, 386, 115, 385, 116, 384, 117, 383, 118, 382, 119, 381, 120, 380, 121, 379, 122, 378, 123, 377, 124, 376, 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, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375]\n assert candidate(n = 100,k = 75) == [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, 21, 80, 22, 79, 23, 78, 24, 77, 25, 76, 26, 75, 27, 74, 28, 73, 29, 72, 30, 71, 31, 70, 32, 69, 33, 68, 34, 67, 35, 66, 36, 65, 37, 64, 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]\n assert candidate(n = 7,k = 6) == [1, 7, 2, 6, 3, 5, 4]\n assert candidate(n = 30,k = 25) == [1, 30, 2, 29, 3, 28, 4, 27, 5, 26, 6, 25, 7, 24, 8, 23, 9, 22, 10, 21, 11, 20, 12, 19, 13, 14, 15, 16, 17, 18]\n assert candidate(n = 900,k = 450) == [1, 900, 2, 899, 3, 898, 4, 897, 5, 896, 6, 895, 7, 894, 8, 893, 9, 892, 10, 891, 11, 890, 12, 889, 13, 888, 14, 887, 15, 886, 16, 885, 17, 884, 18, 883, 19, 882, 20, 881, 21, 880, 22, 879, 23, 878, 24, 877, 25, 876, 26, 875, 27, 874, 28, 873, 29, 872, 30, 871, 31, 870, 32, 869, 33, 868, 34, 867, 35, 866, 36, 865, 37, 864, 38, 863, 39, 862, 40, 861, 41, 860, 42, 859, 43, 858, 44, 857, 45, 856, 46, 855, 47, 854, 48, 853, 49, 852, 50, 851, 51, 850, 52, 849, 53, 848, 54, 847, 55, 846, 56, 845, 57, 844, 58, 843, 59, 842, 60, 841, 61, 840, 62, 839, 63, 838, 64, 837, 65, 836, 66, 835, 67, 834, 68, 833, 69, 832, 70, 831, 71, 830, 72, 829, 73, 828, 74, 827, 75, 826, 76, 825, 77, 824, 78, 823, 79, 822, 80, 821, 81, 820, 82, 819, 83, 818, 84, 817, 85, 816, 86, 815, 87, 814, 88, 813, 89, 812, 90, 811, 91, 810, 92, 809, 93, 808, 94, 807, 95, 806, 96, 805, 97, 804, 98, 803, 99, 802, 100, 801, 101, 800, 102, 799, 103, 798, 104, 797, 105, 796, 106, 795, 107, 794, 108, 793, 109, 792, 110, 791, 111, 790, 112, 789, 113, 788, 114, 787, 115, 786, 116, 785, 117, 784, 118, 783, 119, 782, 120, 781, 121, 780, 122, 779, 123, 778, 124, 777, 125, 776, 126, 775, 127, 774, 128, 773, 129, 772, 130, 771, 131, 770, 132, 769, 133, 768, 134, 767, 135, 766, 136, 765, 137, 764, 138, 763, 139, 762, 140, 761, 141, 760, 142, 759, 143, 758, 144, 757, 145, 756, 146, 755, 147, 754, 148, 753, 149, 752, 150, 751, 151, 750, 152, 749, 153, 748, 154, 747, 155, 746, 156, 745, 157, 744, 158, 743, 159, 742, 160, 741, 161, 740, 162, 739, 163, 738, 164, 737, 165, 736, 166, 735, 167, 734, 168, 733, 169, 732, 170, 731, 171, 730, 172, 729, 173, 728, 174, 727, 175, 726, 176, 725, 177, 724, 178, 723, 179, 722, 180, 721, 181, 720, 182, 719, 183, 718, 184, 717, 185, 716, 186, 715, 187, 714, 188, 713, 189, 712, 190, 711, 191, 710, 192, 709, 193, 708, 194, 707, 195, 706, 196, 705, 197, 704, 198, 703, 199, 702, 200, 701, 201, 700, 202, 699, 203, 698, 204, 697, 205, 696, 206, 695, 207, 694, 208, 693, 209, 692, 210, 691, 211, 690, 212, 689, 213, 688, 214, 687, 215, 686, 216, 685, 217, 684, 218, 683, 219, 682, 220, 681, 221, 680, 222, 679, 223, 678, 224, 677, 225, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226]\n assert candidate(n = 75,k = 50) == [1, 75, 2, 74, 3, 73, 4, 72, 5, 71, 6, 70, 7, 69, 8, 68, 9, 67, 10, 66, 11, 65, 12, 64, 13, 63, 14, 62, 15, 61, 16, 60, 17, 59, 18, 58, 19, 57, 20, 56, 21, 55, 22, 54, 23, 53, 24, 52, 25, 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]\n assert candidate(n = 999,k = 499) == [1, 999, 2, 998, 3, 997, 4, 996, 5, 995, 6, 994, 7, 993, 8, 992, 9, 991, 10, 990, 11, 989, 12, 988, 13, 987, 14, 986, 15, 985, 16, 984, 17, 983, 18, 982, 19, 981, 20, 980, 21, 979, 22, 978, 23, 977, 24, 976, 25, 975, 26, 974, 27, 973, 28, 972, 29, 971, 30, 970, 31, 969, 32, 968, 33, 967, 34, 966, 35, 965, 36, 964, 37, 963, 38, 962, 39, 961, 40, 960, 41, 959, 42, 958, 43, 957, 44, 956, 45, 955, 46, 954, 47, 953, 48, 952, 49, 951, 50, 950, 51, 949, 52, 948, 53, 947, 54, 946, 55, 945, 56, 944, 57, 943, 58, 942, 59, 941, 60, 940, 61, 939, 62, 938, 63, 937, 64, 936, 65, 935, 66, 934, 67, 933, 68, 932, 69, 931, 70, 930, 71, 929, 72, 928, 73, 927, 74, 926, 75, 925, 76, 924, 77, 923, 78, 922, 79, 921, 80, 920, 81, 919, 82, 918, 83, 917, 84, 916, 85, 915, 86, 914, 87, 913, 88, 912, 89, 911, 90, 910, 91, 909, 92, 908, 93, 907, 94, 906, 95, 905, 96, 904, 97, 903, 98, 902, 99, 901, 100, 900, 101, 899, 102, 898, 103, 897, 104, 896, 105, 895, 106, 894, 107, 893, 108, 892, 109, 891, 110, 890, 111, 889, 112, 888, 113, 887, 114, 886, 115, 885, 116, 884, 117, 883, 118, 882, 119, 881, 120, 880, 121, 879, 122, 878, 123, 877, 124, 876, 125, 875, 126, 874, 127, 873, 128, 872, 129, 871, 130, 870, 131, 869, 132, 868, 133, 867, 134, 866, 135, 865, 136, 864, 137, 863, 138, 862, 139, 861, 140, 860, 141, 859, 142, 858, 143, 857, 144, 856, 145, 855, 146, 854, 147, 853, 148, 852, 149, 851, 150, 850, 151, 849, 152, 848, 153, 847, 154, 846, 155, 845, 156, 844, 157, 843, 158, 842, 159, 841, 160, 840, 161, 839, 162, 838, 163, 837, 164, 836, 165, 835, 166, 834, 167, 833, 168, 832, 169, 831, 170, 830, 171, 829, 172, 828, 173, 827, 174, 826, 175, 825, 176, 824, 177, 823, 178, 822, 179, 821, 180, 820, 181, 819, 182, 818, 183, 817, 184, 816, 185, 815, 186, 814, 187, 813, 188, 812, 189, 811, 190, 810, 191, 809, 192, 808, 193, 807, 194, 806, 195, 805, 196, 804, 197, 803, 198, 802, 199, 801, 200, 800, 201, 799, 202, 798, 203, 797, 204, 796, 205, 795, 206, 794, 207, 793, 208, 792, 209, 791, 210, 790, 211, 789, 212, 788, 213, 787, 214, 786, 215, 785, 216, 784, 217, 783, 218, 782, 219, 781, 220, 780, 221, 779, 222, 778, 223, 777, 224, 776, 225, 775, 226, 774, 227, 773, 228, 772, 229, 771, 230, 770, 231, 769, 232, 768, 233, 767, 234, 766, 235, 765, 236, 764, 237, 763, 238, 762, 239, 761, 240, 760, 241, 759, 242, 758, 243, 757, 244, 756, 245, 755, 246, 754, 247, 753, 248, 752, 249, 751, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 750]\n assert candidate(n = 2000,k = 1000) == [1, 2000, 2, 1999, 3, 1998, 4, 1997, 5, 1996, 6, 1995, 7, 1994, 8, 1993, 9, 1992, 10, 1991, 11, 1990, 12, 1989, 13, 1988, 14, 1987, 15, 1986, 16, 1985, 17, 1984, 18, 1983, 19, 1982, 20, 1981, 21, 1980, 22, 1979, 23, 1978, 24, 1977, 25, 1976, 26, 1975, 27, 1974, 28, 1973, 29, 1972, 30, 1971, 31, 1970, 32, 1969, 33, 1968, 34, 1967, 35, 1966, 36, 1965, 37, 1964, 38, 1963, 39, 1962, 40, 1961, 41, 1960, 42, 1959, 43, 1958, 44, 1957, 45, 1956, 46, 1955, 47, 1954, 48, 1953, 49, 1952, 50, 1951, 51, 1950, 52, 1949, 53, 1948, 54, 1947, 55, 1946, 56, 1945, 57, 1944, 58, 1943, 59, 1942, 60, 1941, 61, 1940, 62, 1939, 63, 1938, 64, 1937, 65, 1936, 66, 1935, 67, 1934, 68, 1933, 69, 1932, 70, 1931, 71, 1930, 72, 1929, 73, 1928, 74, 1927, 75, 1926, 76, 1925, 77, 1924, 78, 1923, 79, 1922, 80, 1921, 81, 1920, 82, 1919, 83, 1918, 84, 1917, 85, 1916, 86, 1915, 87, 1914, 88, 1913, 89, 1912, 90, 1911, 91, 1910, 92, 1909, 93, 1908, 94, 1907, 95, 1906, 96, 1905, 97, 1904, 98, 1903, 99, 1902, 100, 1901, 101, 1900, 102, 1899, 103, 1898, 104, 1897, 105, 1896, 106, 1895, 107, 1894, 108, 1893, 109, 1892, 110, 1891, 111, 1890, 112, 1889, 113, 1888, 114, 1887, 115, 1886, 116, 1885, 117, 1884, 118, 1883, 119, 1882, 120, 1881, 121, 1880, 122, 1879, 123, 1878, 124, 1877, 125, 1876, 126, 1875, 127, 1874, 128, 1873, 129, 1872, 130, 1871, 131, 1870, 132, 1869, 133, 1868, 134, 1867, 135, 1866, 136, 1865, 137, 1864, 138, 1863, 139, 1862, 140, 1861, 141, 1860, 142, 1859, 143, 1858, 144, 1857, 145, 1856, 146, 1855, 147, 1854, 148, 1853, 149, 1852, 150, 1851, 151, 1850, 152, 1849, 153, 1848, 154, 1847, 155, 1846, 156, 1845, 157, 1844, 158, 1843, 159, 1842, 160, 1841, 161, 1840, 162, 1839, 163, 1838, 164, 1837, 165, 1836, 166, 1835, 167, 1834, 168, 1833, 169, 1832, 170, 1831, 171, 1830, 172, 1829, 173, 1828, 174, 1827, 175, 1826, 176, 1825, 177, 1824, 178, 1823, 179, 1822, 180, 1821, 181, 1820, 182, 1819, 183, 1818, 184, 1817, 185, 1816, 186, 1815, 187, 1814, 188, 1813, 189, 1812, 190, 1811, 191, 1810, 192, 1809, 193, 1808, 194, 1807, 195, 1806, 196, 1805, 197, 1804, 198, 1803, 199, 1802, 200, 1801, 201, 1800, 202, 1799, 203, 1798, 204, 1797, 205, 1796, 206, 1795, 207, 1794, 208, 1793, 209, 1792, 210, 1791, 211, 1790, 212, 1789, 213, 1788, 214, 1787, 215, 1786, 216, 1785, 217, 1784, 218, 1783, 219, 1782, 220, 1781, 221, 1780, 222, 1779, 223, 1778, 224, 1777, 225, 1776, 226, 1775, 227, 1774, 228, 1773, 229, 1772, 230, 1771, 231, 1770, 232, 1769, 233, 1768, 234, 1767, 235, 1766, 236, 1765, 237, 1764, 238, 1763, 239, 1762, 240, 1761, 241, 1760, 242, 1759, 243, 1758, 244, 1757, 245, 1756, 246, 1755, 247, 1754, 248, 1753, 249, 1752, 250, 1751, 251, 1750, 252, 1749, 253, 1748, 254, 1747, 255, 1746, 256, 1745, 257, 1744, 258, 1743, 259, 1742, 260, 1741, 261, 1740, 262, 1739, 263, 1738, 264, 1737, 265, 1736, 266, 1735, 267, 1734, 268, 1733, 269, 1732, 270, 1731, 271, 1730, 272, 1729, 273, 1728, 274, 1727, 275, 1726, 276, 1725, 277, 1724, 278, 1723, 279, 1722, 280, 1721, 281, 1720, 282, 1719, 283, 1718, 284, 1717, 285, 1716, 286, 1715, 287, 1714, 288, 1713, 289, 1712, 290, 1711, 291, 1710, 292, 1709, 293, 1708, 294, 1707, 295, 1706, 296, 1705, 297, 1704, 298, 1703, 299, 1702, 300, 1701, 301, 1700, 302, 1699, 303, 1698, 304, 1697, 305, 1696, 306, 1695, 307, 1694, 308, 1693, 309, 1692, 310, 1691, 311, 1690, 312, 1689, 313, 1688, 314, 1687, 315, 1686, 316, 1685, 317, 1684, 318, 1683, 319, 1682, 320, 1681, 321, 1680, 322, 1679, 323, 1678, 324, 1677, 325, 1676, 326, 1675, 327, 1674, 328, 1673, 329, 1672, 330, 1671, 331, 1670, 332, 1669, 333, 1668, 334, 1667, 335, 1666, 336, 1665, 337, 1664, 338, 1663, 339, 1662, 340, 1661, 341, 1660, 342, 1659, 343, 1658, 344, 1657, 345, 1656, 346, 1655, 347, 1654, 348, 1653, 349, 1652, 350, 1651, 351, 1650, 352, 1649, 353, 1648, 354, 1647, 355, 1646, 356, 1645, 357, 1644, 358, 1643, 359, 1642, 360, 1641, 361, 1640, 362, 1639, 363, 1638, 364, 1637, 365, 1636, 366, 1635, 367, 1634, 368, 1633, 369, 1632, 370, 1631, 371, 1630, 372, 1629, 373, 1628, 374, 1627, 375, 1626, 376, 1625, 377, 1624, 378, 1623, 379, 1622, 380, 1621, 381, 1620, 382, 1619, 383, 1618, 384, 1617, 385, 1616, 386, 1615, 387, 1614, 388, 1613, 389, 1612, 390, 1611, 391, 1610, 392, 1609, 393, 1608, 394, 1607, 395, 1606, 396, 1605, 397, 1604, 398, 1603, 399, 1602, 400, 1601, 401, 1600, 402, 1599, 403, 1598, 404, 1597, 405, 1596, 406, 1595, 407, 1594, 408, 1593, 409, 1592, 410, 1591, 411, 1590, 412, 1589, 413, 1588, 414, 1587, 415, 1586, 416, 1585, 417, 1584, 418, 1583, 419, 1582, 420, 1581, 421, 1580, 422, 1579, 423, 1578, 424, 1577, 425, 1576, 426, 1575, 427, 1574, 428, 1573, 429, 1572, 430, 1571, 431, 1570, 432, 1569, 433, 1568, 434, 1567, 435, 1566, 436, 1565, 437, 1564, 438, 1563, 439, 1562, 440, 1561, 441, 1560, 442, 1559, 443, 1558, 444, 1557, 445, 1556, 446, 1555, 447, 1554, 448, 1553, 449, 1552, 450, 1551, 451, 1550, 452, 1549, 453, 1548, 454, 1547, 455, 1546, 456, 1545, 457, 1544, 458, 1543, 459, 1542, 460, 1541, 461, 1540, 462, 1539, 463, 1538, 464, 1537, 465, 1536, 466, 1535, 467, 1534, 468, 1533, 469, 1532, 470, 1531, 471, 1530, 472, 1529, 473, 1528, 474, 1527, 475, 1526, 476, 1525, 477, 1524, 478, 1523, 479, 1522, 480, 1521, 481, 1520, 482, 1519, 483, 1518, 484, 1517, 485, 1516, 486, 1515, 487, 1514, 488, 1513, 489, 1512, 490, 1511, 491, 1510, 492, 1509, 493, 1508, 494, 1507, 495, 1506, 496, 1505, 497, 1504, 498, 1503, 499, 1502, 500, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251, 1250, 1249, 1248, 1247, 1246, 1245, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1237, 1236, 1235, 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1218, 1217, 1216, 1215, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1207, 1206, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, 1187, 1186, 1185, 1184, 1183, 1182, 1181, 1180, 1179, 1178, 1177, 1176, 1175, 1174, 1173, 1172, 1171, 1170, 1169, 1168, 1167, 1166, 1165, 1164, 1163, 1162, 1161, 1160, 1159, 1158, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141, 1140, 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1126, 1125, 1124, 1123, 1122, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 1087, 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1079, 1078, 1077, 1076, 1075, 1074, 1073, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001, 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, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501]\n assert candidate(n = 8,k = 3) == [1, 8, 2, 3, 4, 5, 6, 7]\n assert candidate(n = 8,k = 4) == [1, 8, 2, 7, 6, 5, 4, 3]\n assert candidate(n = 15,k = 10) == [1, 15, 2, 14, 3, 13, 4, 12, 5, 11, 10, 9, 8, 7, 6]\n assert candidate(n = 150,k = 75) == [1, 150, 2, 149, 3, 148, 4, 147, 5, 146, 6, 145, 7, 144, 8, 143, 9, 142, 10, 141, 11, 140, 12, 139, 13, 138, 14, 137, 15, 136, 16, 135, 17, 134, 18, 133, 19, 132, 20, 131, 21, 130, 22, 129, 23, 128, 24, 127, 25, 126, 26, 125, 27, 124, 28, 123, 29, 122, 30, 121, 31, 120, 32, 119, 33, 118, 34, 117, 35, 116, 36, 115, 37, 114, 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]\n assert candidate(n = 18,k = 9) == [1, 18, 2, 17, 3, 16, 4, 15, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(n = 300,k = 199) == [1, 300, 2, 299, 3, 298, 4, 297, 5, 296, 6, 295, 7, 294, 8, 293, 9, 292, 10, 291, 11, 290, 12, 289, 13, 288, 14, 287, 15, 286, 16, 285, 17, 284, 18, 283, 19, 282, 20, 281, 21, 280, 22, 279, 23, 278, 24, 277, 25, 276, 26, 275, 27, 274, 28, 273, 29, 272, 30, 271, 31, 270, 32, 269, 33, 268, 34, 267, 35, 266, 36, 265, 37, 264, 38, 263, 39, 262, 40, 261, 41, 260, 42, 259, 43, 258, 44, 257, 45, 256, 46, 255, 47, 254, 48, 253, 49, 252, 50, 251, 51, 250, 52, 249, 53, 248, 54, 247, 55, 246, 56, 245, 57, 244, 58, 243, 59, 242, 60, 241, 61, 240, 62, 239, 63, 238, 64, 237, 65, 236, 66, 235, 67, 234, 68, 233, 69, 232, 70, 231, 71, 230, 72, 229, 73, 228, 74, 227, 75, 226, 76, 225, 77, 224, 78, 223, 79, 222, 80, 221, 81, 220, 82, 219, 83, 218, 84, 217, 85, 216, 86, 215, 87, 214, 88, 213, 89, 212, 90, 211, 91, 210, 92, 209, 93, 208, 94, 207, 95, 206, 96, 205, 97, 204, 98, 203, 99, 202, 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]\n assert candidate(n = 75,k = 60) == [1, 75, 2, 74, 3, 73, 4, 72, 5, 71, 6, 70, 7, 69, 8, 68, 9, 67, 10, 66, 11, 65, 12, 64, 13, 63, 14, 62, 15, 61, 16, 60, 17, 59, 18, 58, 19, 57, 20, 56, 21, 55, 22, 54, 23, 53, 24, 52, 25, 51, 26, 50, 27, 49, 28, 48, 29, 47, 30, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31]\n assert candidate(n = 2000,k = 1999) == [1, 2000, 2, 1999, 3, 1998, 4, 1997, 5, 1996, 6, 1995, 7, 1994, 8, 1993, 9, 1992, 10, 1991, 11, 1990, 12, 1989, 13, 1988, 14, 1987, 15, 1986, 16, 1985, 17, 1984, 18, 1983, 19, 1982, 20, 1981, 21, 1980, 22, 1979, 23, 1978, 24, 1977, 25, 1976, 26, 1975, 27, 1974, 28, 1973, 29, 1972, 30, 1971, 31, 1970, 32, 1969, 33, 1968, 34, 1967, 35, 1966, 36, 1965, 37, 1964, 38, 1963, 39, 1962, 40, 1961, 41, 1960, 42, 1959, 43, 1958, 44, 1957, 45, 1956, 46, 1955, 47, 1954, 48, 1953, 49, 1952, 50, 1951, 51, 1950, 52, 1949, 53, 1948, 54, 1947, 55, 1946, 56, 1945, 57, 1944, 58, 1943, 59, 1942, 60, 1941, 61, 1940, 62, 1939, 63, 1938, 64, 1937, 65, 1936, 66, 1935, 67, 1934, 68, 1933, 69, 1932, 70, 1931, 71, 1930, 72, 1929, 73, 1928, 74, 1927, 75, 1926, 76, 1925, 77, 1924, 78, 1923, 79, 1922, 80, 1921, 81, 1920, 82, 1919, 83, 1918, 84, 1917, 85, 1916, 86, 1915, 87, 1914, 88, 1913, 89, 1912, 90, 1911, 91, 1910, 92, 1909, 93, 1908, 94, 1907, 95, 1906, 96, 1905, 97, 1904, 98, 1903, 99, 1902, 100, 1901, 101, 1900, 102, 1899, 103, 1898, 104, 1897, 105, 1896, 106, 1895, 107, 1894, 108, 1893, 109, 1892, 110, 1891, 111, 1890, 112, 1889, 113, 1888, 114, 1887, 115, 1886, 116, 1885, 117, 1884, 118, 1883, 119, 1882, 120, 1881, 121, 1880, 122, 1879, 123, 1878, 124, 1877, 125, 1876, 126, 1875, 127, 1874, 128, 1873, 129, 1872, 130, 1871, 131, 1870, 132, 1869, 133, 1868, 134, 1867, 135, 1866, 136, 1865, 137, 1864, 138, 1863, 139, 1862, 140, 1861, 141, 1860, 142, 1859, 143, 1858, 144, 1857, 145, 1856, 146, 1855, 147, 1854, 148, 1853, 149, 1852, 150, 1851, 151, 1850, 152, 1849, 153, 1848, 154, 1847, 155, 1846, 156, 1845, 157, 1844, 158, 1843, 159, 1842, 160, 1841, 161, 1840, 162, 1839, 163, 1838, 164, 1837, 165, 1836, 166, 1835, 167, 1834, 168, 1833, 169, 1832, 170, 1831, 171, 1830, 172, 1829, 173, 1828, 174, 1827, 175, 1826, 176, 1825, 177, 1824, 178, 1823, 179, 1822, 180, 1821, 181, 1820, 182, 1819, 183, 1818, 184, 1817, 185, 1816, 186, 1815, 187, 1814, 188, 1813, 189, 1812, 190, 1811, 191, 1810, 192, 1809, 193, 1808, 194, 1807, 195, 1806, 196, 1805, 197, 1804, 198, 1803, 199, 1802, 200, 1801, 201, 1800, 202, 1799, 203, 1798, 204, 1797, 205, 1796, 206, 1795, 207, 1794, 208, 1793, 209, 1792, 210, 1791, 211, 1790, 212, 1789, 213, 1788, 214, 1787, 215, 1786, 216, 1785, 217, 1784, 218, 1783, 219, 1782, 220, 1781, 221, 1780, 222, 1779, 223, 1778, 224, 1777, 225, 1776, 226, 1775, 227, 1774, 228, 1773, 229, 1772, 230, 1771, 231, 1770, 232, 1769, 233, 1768, 234, 1767, 235, 1766, 236, 1765, 237, 1764, 238, 1763, 239, 1762, 240, 1761, 241, 1760, 242, 1759, 243, 1758, 244, 1757, 245, 1756, 246, 1755, 247, 1754, 248, 1753, 249, 1752, 250, 1751, 251, 1750, 252, 1749, 253, 1748, 254, 1747, 255, 1746, 256, 1745, 257, 1744, 258, 1743, 259, 1742, 260, 1741, 261, 1740, 262, 1739, 263, 1738, 264, 1737, 265, 1736, 266, 1735, 267, 1734, 268, 1733, 269, 1732, 270, 1731, 271, 1730, 272, 1729, 273, 1728, 274, 1727, 275, 1726, 276, 1725, 277, 1724, 278, 1723, 279, 1722, 280, 1721, 281, 1720, 282, 1719, 283, 1718, 284, 1717, 285, 1716, 286, 1715, 287, 1714, 288, 1713, 289, 1712, 290, 1711, 291, 1710, 292, 1709, 293, 1708, 294, 1707, 295, 1706, 296, 1705, 297, 1704, 298, 1703, 299, 1702, 300, 1701, 301, 1700, 302, 1699, 303, 1698, 304, 1697, 305, 1696, 306, 1695, 307, 1694, 308, 1693, 309, 1692, 310, 1691, 311, 1690, 312, 1689, 313, 1688, 314, 1687, 315, 1686, 316, 1685, 317, 1684, 318, 1683, 319, 1682, 320, 1681, 321, 1680, 322, 1679, 323, 1678, 324, 1677, 325, 1676, 326, 1675, 327, 1674, 328, 1673, 329, 1672, 330, 1671, 331, 1670, 332, 1669, 333, 1668, 334, 1667, 335, 1666, 336, 1665, 337, 1664, 338, 1663, 339, 1662, 340, 1661, 341, 1660, 342, 1659, 343, 1658, 344, 1657, 345, 1656, 346, 1655, 347, 1654, 348, 1653, 349, 1652, 350, 1651, 351, 1650, 352, 1649, 353, 1648, 354, 1647, 355, 1646, 356, 1645, 357, 1644, 358, 1643, 359, 1642, 360, 1641, 361, 1640, 362, 1639, 363, 1638, 364, 1637, 365, 1636, 366, 1635, 367, 1634, 368, 1633, 369, 1632, 370, 1631, 371, 1630, 372, 1629, 373, 1628, 374, 1627, 375, 1626, 376, 1625, 377, 1624, 378, 1623, 379, 1622, 380, 1621, 381, 1620, 382, 1619, 383, 1618, 384, 1617, 385, 1616, 386, 1615, 387, 1614, 388, 1613, 389, 1612, 390, 1611, 391, 1610, 392, 1609, 393, 1608, 394, 1607, 395, 1606, 396, 1605, 397, 1604, 398, 1603, 399, 1602, 400, 1601, 401, 1600, 402, 1599, 403, 1598, 404, 1597, 405, 1596, 406, 1595, 407, 1594, 408, 1593, 409, 1592, 410, 1591, 411, 1590, 412, 1589, 413, 1588, 414, 1587, 415, 1586, 416, 1585, 417, 1584, 418, 1583, 419, 1582, 420, 1581, 421, 1580, 422, 1579, 423, 1578, 424, 1577, 425, 1576, 426, 1575, 427, 1574, 428, 1573, 429, 1572, 430, 1571, 431, 1570, 432, 1569, 433, 1568, 434, 1567, 435, 1566, 436, 1565, 437, 1564, 438, 1563, 439, 1562, 440, 1561, 441, 1560, 442, 1559, 443, 1558, 444, 1557, 445, 1556, 446, 1555, 447, 1554, 448, 1553, 449, 1552, 450, 1551, 451, 1550, 452, 1549, 453, 1548, 454, 1547, 455, 1546, 456, 1545, 457, 1544, 458, 1543, 459, 1542, 460, 1541, 461, 1540, 462, 1539, 463, 1538, 464, 1537, 465, 1536, 466, 1535, 467, 1534, 468, 1533, 469, 1532, 470, 1531, 471, 1530, 472, 1529, 473, 1528, 474, 1527, 475, 1526, 476, 1525, 477, 1524, 478, 1523, 479, 1522, 480, 1521, 481, 1520, 482, 1519, 483, 1518, 484, 1517, 485, 1516, 486, 1515, 487, 1514, 488, 1513, 489, 1512, 490, 1511, 491, 1510, 492, 1509, 493, 1508, 494, 1507, 495, 1506, 496, 1505, 497, 1504, 498, 1503, 499, 1502, 500, 1501, 501, 1500, 502, 1499, 503, 1498, 504, 1497, 505, 1496, 506, 1495, 507, 1494, 508, 1493, 509, 1492, 510, 1491, 511, 1490, 512, 1489, 513, 1488, 514, 1487, 515, 1486, 516, 1485, 517, 1484, 518, 1483, 519, 1482, 520, 1481, 521, 1480, 522, 1479, 523, 1478, 524, 1477, 525, 1476, 526, 1475, 527, 1474, 528, 1473, 529, 1472, 530, 1471, 531, 1470, 532, 1469, 533, 1468, 534, 1467, 535, 1466, 536, 1465, 537, 1464, 538, 1463, 539, 1462, 540, 1461, 541, 1460, 542, 1459, 543, 1458, 544, 1457, 545, 1456, 546, 1455, 547, 1454, 548, 1453, 549, 1452, 550, 1451, 551, 1450, 552, 1449, 553, 1448, 554, 1447, 555, 1446, 556, 1445, 557, 1444, 558, 1443, 559, 1442, 560, 1441, 561, 1440, 562, 1439, 563, 1438, 564, 1437, 565, 1436, 566, 1435, 567, 1434, 568, 1433, 569, 1432, 570, 1431, 571, 1430, 572, 1429, 573, 1428, 574, 1427, 575, 1426, 576, 1425, 577, 1424, 578, 1423, 579, 1422, 580, 1421, 581, 1420, 582, 1419, 583, 1418, 584, 1417, 585, 1416, 586, 1415, 587, 1414, 588, 1413, 589, 1412, 590, 1411, 591, 1410, 592, 1409, 593, 1408, 594, 1407, 595, 1406, 596, 1405, 597, 1404, 598, 1403, 599, 1402, 600, 1401, 601, 1400, 602, 1399, 603, 1398, 604, 1397, 605, 1396, 606, 1395, 607, 1394, 608, 1393, 609, 1392, 610, 1391, 611, 1390, 612, 1389, 613, 1388, 614, 1387, 615, 1386, 616, 1385, 617, 1384, 618, 1383, 619, 1382, 620, 1381, 621, 1380, 622, 1379, 623, 1378, 624, 1377, 625, 1376, 626, 1375, 627, 1374, 628, 1373, 629, 1372, 630, 1371, 631, 1370, 632, 1369, 633, 1368, 634, 1367, 635, 1366, 636, 1365, 637, 1364, 638, 1363, 639, 1362, 640, 1361, 641, 1360, 642, 1359, 643, 1358, 644, 1357, 645, 1356, 646, 1355, 647, 1354, 648, 1353, 649, 1352, 650, 1351, 651, 1350, 652, 1349, 653, 1348, 654, 1347, 655, 1346, 656, 1345, 657, 1344, 658, 1343, 659, 1342, 660, 1341, 661, 1340, 662, 1339, 663, 1338, 664, 1337, 665, 1336, 666, 1335, 667, 1334, 668, 1333, 669, 1332, 670, 1331, 671, 1330, 672, 1329, 673, 1328, 674, 1327, 675, 1326, 676, 1325, 677, 1324, 678, 1323, 679, 1322, 680, 1321, 681, 1320, 682, 1319, 683, 1318, 684, 1317, 685, 1316, 686, 1315, 687, 1314, 688, 1313, 689, 1312, 690, 1311, 691, 1310, 692, 1309, 693, 1308, 694, 1307, 695, 1306, 696, 1305, 697, 1304, 698, 1303, 699, 1302, 700, 1301, 701, 1300, 702, 1299, 703, 1298, 704, 1297, 705, 1296, 706, 1295, 707, 1294, 708, 1293, 709, 1292, 710, 1291, 711, 1290, 712, 1289, 713, 1288, 714, 1287, 715, 1286, 716, 1285, 717, 1284, 718, 1283, 719, 1282, 720, 1281, 721, 1280, 722, 1279, 723, 1278, 724, 1277, 725, 1276, 726, 1275, 727, 1274, 728, 1273, 729, 1272, 730, 1271, 731, 1270, 732, 1269, 733, 1268, 734, 1267, 735, 1266, 736, 1265, 737, 1264, 738, 1263, 739, 1262, 740, 1261, 741, 1260, 742, 1259, 743, 1258, 744, 1257, 745, 1256, 746, 1255, 747, 1254, 748, 1253, 749, 1252, 750, 1251, 751, 1250, 752, 1249, 753, 1248, 754, 1247, 755, 1246, 756, 1245, 757, 1244, 758, 1243, 759, 1242, 760, 1241, 761, 1240, 762, 1239, 763, 1238, 764, 1237, 765, 1236, 766, 1235, 767, 1234, 768, 1233, 769, 1232, 770, 1231, 771, 1230, 772, 1229, 773, 1228, 774, 1227, 775, 1226, 776, 1225, 777, 1224, 778, 1223, 779, 1222, 780, 1221, 781, 1220, 782, 1219, 783, 1218, 784, 1217, 785, 1216, 786, 1215, 787, 1214, 788, 1213, 789, 1212, 790, 1211, 791, 1210, 792, 1209, 793, 1208, 794, 1207, 795, 1206, 796, 1205, 797, 1204, 798, 1203, 799, 1202, 800, 1201, 801, 1200, 802, 1199, 803, 1198, 804, 1197, 805, 1196, 806, 1195, 807, 1194, 808, 1193, 809, 1192, 810, 1191, 811, 1190, 812, 1189, 813, 1188, 814, 1187, 815, 1186, 816, 1185, 817, 1184, 818, 1183, 819, 1182, 820, 1181, 821, 1180, 822, 1179, 823, 1178, 824, 1177, 825, 1176, 826, 1175, 827, 1174, 828, 1173, 829, 1172, 830, 1171, 831, 1170, 832, 1169, 833, 1168, 834, 1167, 835, 1166, 836, 1165, 837, 1164, 838, 1163, 839, 1162, 840, 1161, 841, 1160, 842, 1159, 843, 1158, 844, 1157, 845, 1156, 846, 1155, 847, 1154, 848, 1153, 849, 1152, 850, 1151, 851, 1150, 852, 1149, 853, 1148, 854, 1147, 855, 1146, 856, 1145, 857, 1144, 858, 1143, 859, 1142, 860, 1141, 861, 1140, 862, 1139, 863, 1138, 864, 1137, 865, 1136, 866, 1135, 867, 1134, 868, 1133, 869, 1132, 870, 1131, 871, 1130, 872, 1129, 873, 1128, 874, 1127, 875, 1126, 876, 1125, 877, 1124, 878, 1123, 879, 1122, 880, 1121, 881, 1120, 882, 1119, 883, 1118, 884, 1117, 885, 1116, 886, 1115, 887, 1114, 888, 1113, 889, 1112, 890, 1111, 891, 1110, 892, 1109, 893, 1108, 894, 1107, 895, 1106, 896, 1105, 897, 1104, 898, 1103, 899, 1102, 900, 1101, 901, 1100, 902, 1099, 903, 1098, 904, 1097, 905, 1096, 906, 1095, 907, 1094, 908, 1093, 909, 1092, 910, 1091, 911, 1090, 912, 1089, 913, 1088, 914, 1087, 915, 1086, 916, 1085, 917, 1084, 918, 1083, 919, 1082, 920, 1081, 921, 1080, 922, 1079, 923, 1078, 924, 1077, 925, 1076, 926, 1075, 927, 1074, 928, 1073, 929, 1072, 930, 1071, 931, 1070, 932, 1069, 933, 1068, 934, 1067, 935, 1066, 936, 1065, 937, 1064, 938, 1063, 939, 1062, 940, 1061, 941, 1060, 942, 1059, 943, 1058, 944, 1057, 945, 1056, 946, 1055, 947, 1054, 948, 1053, 949, 1052, 950, 1051, 951, 1050, 952, 1049, 953, 1048, 954, 1047, 955, 1046, 956, 1045, 957, 1044, 958, 1043, 959, 1042, 960, 1041, 961, 1040, 962, 1039, 963, 1038, 964, 1037, 965, 1036, 966, 1035, 967, 1034, 968, 1033, 969, 1032, 970, 1031, 971, 1030, 972, 1029, 973, 1028, 974, 1027, 975, 1026, 976, 1025, 977, 1024, 978, 1023, 979, 1022, 980, 1021, 981, 1020, 982, 1019, 983, 1018, 984, 1017, 985, 1016, 986, 1015, 987, 1014, 988, 1013, 989, 1012, 990, 1011, 991, 1010, 992, 1009, 993, 1008, 994, 1007, 995, 1006, 996, 1005, 997, 1004, 998, 1003, 999, 1002, 1000, 1001]\n assert candidate(n = 20,k = 15) == [1, 20, 2, 19, 3, 18, 4, 17, 5, 16, 6, 15, 7, 14, 8, 9, 10, 11, 12, 13]\n assert candidate(n = 7,k = 5) == [1, 7, 2, 6, 3, 4, 5]\n assert candidate(n = 50,k = 30) == [1, 50, 2, 49, 3, 48, 4, 47, 5, 46, 6, 45, 7, 44, 8, 43, 9, 42, 10, 41, 11, 40, 12, 39, 13, 38, 14, 37, 15, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16]\n assert candidate(n = 60,k = 15) == [1, 60, 2, 59, 3, 58, 4, 57, 5, 56, 6, 55, 7, 54, 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]\n assert candidate(n = 3000,k = 1500) == [1, 3000, 2, 2999, 3, 2998, 4, 2997, 5, 2996, 6, 2995, 7, 2994, 8, 2993, 9, 2992, 10, 2991, 11, 2990, 12, 2989, 13, 2988, 14, 2987, 15, 2986, 16, 2985, 17, 2984, 18, 2983, 19, 2982, 20, 2981, 21, 2980, 22, 2979, 23, 2978, 24, 2977, 25, 2976, 26, 2975, 27, 2974, 28, 2973, 29, 2972, 30, 2971, 31, 2970, 32, 2969, 33, 2968, 34, 2967, 35, 2966, 36, 2965, 37, 2964, 38, 2963, 39, 2962, 40, 2961, 41, 2960, 42, 2959, 43, 2958, 44, 2957, 45, 2956, 46, 2955, 47, 2954, 48, 2953, 49, 2952, 50, 2951, 51, 2950, 52, 2949, 53, 2948, 54, 2947, 55, 2946, 56, 2945, 57, 2944, 58, 2943, 59, 2942, 60, 2941, 61, 2940, 62, 2939, 63, 2938, 64, 2937, 65, 2936, 66, 2935, 67, 2934, 68, 2933, 69, 2932, 70, 2931, 71, 2930, 72, 2929, 73, 2928, 74, 2927, 75, 2926, 76, 2925, 77, 2924, 78, 2923, 79, 2922, 80, 2921, 81, 2920, 82, 2919, 83, 2918, 84, 2917, 85, 2916, 86, 2915, 87, 2914, 88, 2913, 89, 2912, 90, 2911, 91, 2910, 92, 2909, 93, 2908, 94, 2907, 95, 2906, 96, 2905, 97, 2904, 98, 2903, 99, 2902, 100, 2901, 101, 2900, 102, 2899, 103, 2898, 104, 2897, 105, 2896, 106, 2895, 107, 2894, 108, 2893, 109, 2892, 110, 2891, 111, 2890, 112, 2889, 113, 2888, 114, 2887, 115, 2886, 116, 2885, 117, 2884, 118, 2883, 119, 2882, 120, 2881, 121, 2880, 122, 2879, 123, 2878, 124, 2877, 125, 2876, 126, 2875, 127, 2874, 128, 2873, 129, 2872, 130, 2871, 131, 2870, 132, 2869, 133, 2868, 134, 2867, 135, 2866, 136, 2865, 137, 2864, 138, 2863, 139, 2862, 140, 2861, 141, 2860, 142, 2859, 143, 2858, 144, 2857, 145, 2856, 146, 2855, 147, 2854, 148, 2853, 149, 2852, 150, 2851, 151, 2850, 152, 2849, 153, 2848, 154, 2847, 155, 2846, 156, 2845, 157, 2844, 158, 2843, 159, 2842, 160, 2841, 161, 2840, 162, 2839, 163, 2838, 164, 2837, 165, 2836, 166, 2835, 167, 2834, 168, 2833, 169, 2832, 170, 2831, 171, 2830, 172, 2829, 173, 2828, 174, 2827, 175, 2826, 176, 2825, 177, 2824, 178, 2823, 179, 2822, 180, 2821, 181, 2820, 182, 2819, 183, 2818, 184, 2817, 185, 2816, 186, 2815, 187, 2814, 188, 2813, 189, 2812, 190, 2811, 191, 2810, 192, 2809, 193, 2808, 194, 2807, 195, 2806, 196, 2805, 197, 2804, 198, 2803, 199, 2802, 200, 2801, 201, 2800, 202, 2799, 203, 2798, 204, 2797, 205, 2796, 206, 2795, 207, 2794, 208, 2793, 209, 2792, 210, 2791, 211, 2790, 212, 2789, 213, 2788, 214, 2787, 215, 2786, 216, 2785, 217, 2784, 218, 2783, 219, 2782, 220, 2781, 221, 2780, 222, 2779, 223, 2778, 224, 2777, 225, 2776, 226, 2775, 227, 2774, 228, 2773, 229, 2772, 230, 2771, 231, 2770, 232, 2769, 233, 2768, 234, 2767, 235, 2766, 236, 2765, 237, 2764, 238, 2763, 239, 2762, 240, 2761, 241, 2760, 242, 2759, 243, 2758, 244, 2757, 245, 2756, 246, 2755, 247, 2754, 248, 2753, 249, 2752, 250, 2751, 251, 2750, 252, 2749, 253, 2748, 254, 2747, 255, 2746, 256, 2745, 257, 2744, 258, 2743, 259, 2742, 260, 2741, 261, 2740, 262, 2739, 263, 2738, 264, 2737, 265, 2736, 266, 2735, 267, 2734, 268, 2733, 269, 2732, 270, 2731, 271, 2730, 272, 2729, 273, 2728, 274, 2727, 275, 2726, 276, 2725, 277, 2724, 278, 2723, 279, 2722, 280, 2721, 281, 2720, 282, 2719, 283, 2718, 284, 2717, 285, 2716, 286, 2715, 287, 2714, 288, 2713, 289, 2712, 290, 2711, 291, 2710, 292, 2709, 293, 2708, 294, 2707, 295, 2706, 296, 2705, 297, 2704, 298, 2703, 299, 2702, 300, 2701, 301, 2700, 302, 2699, 303, 2698, 304, 2697, 305, 2696, 306, 2695, 307, 2694, 308, 2693, 309, 2692, 310, 2691, 311, 2690, 312, 2689, 313, 2688, 314, 2687, 315, 2686, 316, 2685, 317, 2684, 318, 2683, 319, 2682, 320, 2681, 321, 2680, 322, 2679, 323, 2678, 324, 2677, 325, 2676, 326, 2675, 327, 2674, 328, 2673, 329, 2672, 330, 2671, 331, 2670, 332, 2669, 333, 2668, 334, 2667, 335, 2666, 336, 2665, 337, 2664, 338, 2663, 339, 2662, 340, 2661, 341, 2660, 342, 2659, 343, 2658, 344, 2657, 345, 2656, 346, 2655, 347, 2654, 348, 2653, 349, 2652, 350, 2651, 351, 2650, 352, 2649, 353, 2648, 354, 2647, 355, 2646, 356, 2645, 357, 2644, 358, 2643, 359, 2642, 360, 2641, 361, 2640, 362, 2639, 363, 2638, 364, 2637, 365, 2636, 366, 2635, 367, 2634, 368, 2633, 369, 2632, 370, 2631, 371, 2630, 372, 2629, 373, 2628, 374, 2627, 375, 2626, 376, 2625, 377, 2624, 378, 2623, 379, 2622, 380, 2621, 381, 2620, 382, 2619, 383, 2618, 384, 2617, 385, 2616, 386, 2615, 387, 2614, 388, 2613, 389, 2612, 390, 2611, 391, 2610, 392, 2609, 393, 2608, 394, 2607, 395, 2606, 396, 2605, 397, 2604, 398, 2603, 399, 2602, 400, 2601, 401, 2600, 402, 2599, 403, 2598, 404, 2597, 405, 2596, 406, 2595, 407, 2594, 408, 2593, 409, 2592, 410, 2591, 411, 2590, 412, 2589, 413, 2588, 414, 2587, 415, 2586, 416, 2585, 417, 2584, 418, 2583, 419, 2582, 420, 2581, 421, 2580, 422, 2579, 423, 2578, 424, 2577, 425, 2576, 426, 2575, 427, 2574, 428, 2573, 429, 2572, 430, 2571, 431, 2570, 432, 2569, 433, 2568, 434, 2567, 435, 2566, 436, 2565, 437, 2564, 438, 2563, 439, 2562, 440, 2561, 441, 2560, 442, 2559, 443, 2558, 444, 2557, 445, 2556, 446, 2555, 447, 2554, 448, 2553, 449, 2552, 450, 2551, 451, 2550, 452, 2549, 453, 2548, 454, 2547, 455, 2546, 456, 2545, 457, 2544, 458, 2543, 459, 2542, 460, 2541, 461, 2540, 462, 2539, 463, 2538, 464, 2537, 465, 2536, 466, 2535, 467, 2534, 468, 2533, 469, 2532, 470, 2531, 471, 2530, 472, 2529, 473, 2528, 474, 2527, 475, 2526, 476, 2525, 477, 2524, 478, 2523, 479, 2522, 480, 2521, 481, 2520, 482, 2519, 483, 2518, 484, 2517, 485, 2516, 486, 2515, 487, 2514, 488, 2513, 489, 2512, 490, 2511, 491, 2510, 492, 2509, 493, 2508, 494, 2507, 495, 2506, 496, 2505, 497, 2504, 498, 2503, 499, 2502, 500, 2501, 501, 2500, 502, 2499, 503, 2498, 504, 2497, 505, 2496, 506, 2495, 507, 2494, 508, 2493, 509, 2492, 510, 2491, 511, 2490, 512, 2489, 513, 2488, 514, 2487, 515, 2486, 516, 2485, 517, 2484, 518, 2483, 519, 2482, 520, 2481, 521, 2480, 522, 2479, 523, 2478, 524, 2477, 525, 2476, 526, 2475, 527, 2474, 528, 2473, 529, 2472, 530, 2471, 531, 2470, 532, 2469, 533, 2468, 534, 2467, 535, 2466, 536, 2465, 537, 2464, 538, 2463, 539, 2462, 540, 2461, 541, 2460, 542, 2459, 543, 2458, 544, 2457, 545, 2456, 546, 2455, 547, 2454, 548, 2453, 549, 2452, 550, 2451, 551, 2450, 552, 2449, 553, 2448, 554, 2447, 555, 2446, 556, 2445, 557, 2444, 558, 2443, 559, 2442, 560, 2441, 561, 2440, 562, 2439, 563, 2438, 564, 2437, 565, 2436, 566, 2435, 567, 2434, 568, 2433, 569, 2432, 570, 2431, 571, 2430, 572, 2429, 573, 2428, 574, 2427, 575, 2426, 576, 2425, 577, 2424, 578, 2423, 579, 2422, 580, 2421, 581, 2420, 582, 2419, 583, 2418, 584, 2417, 585, 2416, 586, 2415, 587, 2414, 588, 2413, 589, 2412, 590, 2411, 591, 2410, 592, 2409, 593, 2408, 594, 2407, 595, 2406, 596, 2405, 597, 2404, 598, 2403, 599, 2402, 600, 2401, 601, 2400, 602, 2399, 603, 2398, 604, 2397, 605, 2396, 606, 2395, 607, 2394, 608, 2393, 609, 2392, 610, 2391, 611, 2390, 612, 2389, 613, 2388, 614, 2387, 615, 2386, 616, 2385, 617, 2384, 618, 2383, 619, 2382, 620, 2381, 621, 2380, 622, 2379, 623, 2378, 624, 2377, 625, 2376, 626, 2375, 627, 2374, 628, 2373, 629, 2372, 630, 2371, 631, 2370, 632, 2369, 633, 2368, 634, 2367, 635, 2366, 636, 2365, 637, 2364, 638, 2363, 639, 2362, 640, 2361, 641, 2360, 642, 2359, 643, 2358, 644, 2357, 645, 2356, 646, 2355, 647, 2354, 648, 2353, 649, 2352, 650, 2351, 651, 2350, 652, 2349, 653, 2348, 654, 2347, 655, 2346, 656, 2345, 657, 2344, 658, 2343, 659, 2342, 660, 2341, 661, 2340, 662, 2339, 663, 2338, 664, 2337, 665, 2336, 666, 2335, 667, 2334, 668, 2333, 669, 2332, 670, 2331, 671, 2330, 672, 2329, 673, 2328, 674, 2327, 675, 2326, 676, 2325, 677, 2324, 678, 2323, 679, 2322, 680, 2321, 681, 2320, 682, 2319, 683, 2318, 684, 2317, 685, 2316, 686, 2315, 687, 2314, 688, 2313, 689, 2312, 690, 2311, 691, 2310, 692, 2309, 693, 2308, 694, 2307, 695, 2306, 696, 2305, 697, 2304, 698, 2303, 699, 2302, 700, 2301, 701, 2300, 702, 2299, 703, 2298, 704, 2297, 705, 2296, 706, 2295, 707, 2294, 708, 2293, 709, 2292, 710, 2291, 711, 2290, 712, 2289, 713, 2288, 714, 2287, 715, 2286, 716, 2285, 717, 2284, 718, 2283, 719, 2282, 720, 2281, 721, 2280, 722, 2279, 723, 2278, 724, 2277, 725, 2276, 726, 2275, 727, 2274, 728, 2273, 729, 2272, 730, 2271, 731, 2270, 732, 2269, 733, 2268, 734, 2267, 735, 2266, 736, 2265, 737, 2264, 738, 2263, 739, 2262, 740, 2261, 741, 2260, 742, 2259, 743, 2258, 744, 2257, 745, 2256, 746, 2255, 747, 2254, 748, 2253, 749, 2252, 750, 2251, 2250, 2249, 2248, 2247, 2246, 2245, 2244, 2243, 2242, 2241, 2240, 2239, 2238, 2237, 2236, 2235, 2234, 2233, 2232, 2231, 2230, 2229, 2228, 2227, 2226, 2225, 2224, 2223, 2222, 2221, 2220, 2219, 2218, 2217, 2216, 2215, 2214, 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 2205, 2204, 2203, 2202, 2201, 2200, 2199, 2198, 2197, 2196, 2195, 2194, 2193, 2192, 2191, 2190, 2189, 2188, 2187, 2186, 2185, 2184, 2183, 2182, 2181, 2180, 2179, 2178, 2177, 2176, 2175, 2174, 2173, 2172, 2171, 2170, 2169, 2168, 2167, 2166, 2165, 2164, 2163, 2162, 2161, 2160, 2159, 2158, 2157, 2156, 2155, 2154, 2153, 2152, 2151, 2150, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 2142, 2141, 2140, 2139, 2138, 2137, 2136, 2135, 2134, 2133, 2132, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2123, 2122, 2121, 2120, 2119, 2118, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2097, 2096, 2095, 2094, 2093, 2092, 2091, 2090, 2089, 2088, 2087, 2086, 2085, 2084, 2083, 2082, 2081, 2080, 2079, 2078, 2077, 2076, 2075, 2074, 2073, 2072, 2071, 2070, 2069, 2068, 2067, 2066, 2065, 2064, 2063, 2062, 2061, 2060, 2059, 2058, 2057, 2056, 2055, 2054, 2053, 2052, 2051, 2050, 2049, 2048, 2047, 2046, 2045, 2044, 2043, 2042, 2041, 2040, 2039, 2038, 2037, 2036, 2035, 2034, 2033, 2032, 2031, 2030, 2029, 2028, 2027, 2026, 2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, 1899, 1898, 1897, 1896, 1895, 1894, 1893, 1892, 1891, 1890, 1889, 1888, 1887, 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 1878, 1877, 1876, 1875, 1874, 1873, 1872, 1871, 1870, 1869, 1868, 1867, 1866, 1865, 1864, 1863, 1862, 1861, 1860, 1859, 1858, 1857, 1856, 1855, 1854, 1853, 1852, 1851, 1850, 1849, 1848, 1847, 1846, 1845, 1844, 1843, 1842, 1841, 1840, 1839, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1830, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 1822, 1821, 1820, 1819, 1818, 1817, 1816, 1815, 1814, 1813, 1812, 1811, 1810, 1809, 1808, 1807, 1806, 1805, 1804, 1803, 1802, 1801, 1800, 1799, 1798, 1797, 1796, 1795, 1794, 1793, 1792, 1791, 1790, 1789, 1788, 1787, 1786, 1785, 1784, 1783, 1782, 1781, 1780, 1779, 1778, 1777, 1776, 1775, 1774, 1773, 1772, 1771, 1770, 1769, 1768, 1767, 1766, 1765, 1764, 1763, 1762, 1761, 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 1752, 1751, 1750, 1749, 1748, 1747, 1746, 1745, 1744, 1743, 1742, 1741, 1740, 1739, 1738, 1737, 1736, 1735, 1734, 1733, 1732, 1731, 1730, 1729, 1728, 1727, 1726, 1725, 1724, 1723, 1722, 1721, 1720, 1719, 1718, 1717, 1716, 1715, 1714, 1713, 1712, 1711, 1710, 1709, 1708, 1707, 1706, 1705, 1704, 1703, 1702, 1701, 1700, 1699, 1698, 1697, 1696, 1695, 1694, 1693, 1692, 1691, 1690, 1689, 1688, 1687, 1686, 1685, 1684, 1683, 1682, 1681, 1680, 1679, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 1671, 1670, 1669, 1668, 1667, 1666, 1665, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1639, 1638, 1637, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1616, 1615, 1614, 1613, 1612, 1611, 1610, 1609, 1608, 1607, 1606, 1605, 1604, 1603, 1602, 1601, 1600, 1599, 1598, 1597, 1596, 1595, 1594, 1593, 1592, 1591, 1590, 1589, 1588, 1587, 1586, 1585, 1584, 1583, 1582, 1581, 1580, 1579, 1578, 1577, 1576, 1575, 1574, 1573, 1572, 1571, 1570, 1569, 1568, 1567, 1566, 1565, 1564, 1563, 1562, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1553, 1552, 1551, 1550, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, 1540, 1539, 1538, 1537, 1536, 1535, 1534, 1533, 1532, 1531, 1530, 1529, 1528, 1527, 1526, 1525, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1516, 1515, 1514, 1513, 1512, 1511, 1510, 1509, 1508, 1507, 1506, 1505, 1504, 1503, 1502, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251, 1250, 1249, 1248, 1247, 1246, 1245, 1244, 1243, 1242, 1241, 1240, 1239, 1238, 1237, 1236, 1235, 1234, 1233, 1232, 1231, 1230, 1229, 1228, 1227, 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1218, 1217, 1216, 1215, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1207, 1206, 1205, 1204, 1203, 1202, 1201, 1200, 1199, 1198, 1197, 1196, 1195, 1194, 1193, 1192, 1191, 1190, 1189, 1188, 1187, 1186, 1185, 1184, 1183, 1182, 1181, 1180, 1179, 1178, 1177, 1176, 1175, 1174, 1173, 1172, 1171, 1170, 1169, 1168, 1167, 1166, 1165, 1164, 1163, 1162, 1161, 1160, 1159, 1158, 1157, 1156, 1155, 1154, 1153, 1152, 1151, 1150, 1149, 1148, 1147, 1146, 1145, 1144, 1143, 1142, 1141, 1140, 1139, 1138, 1137, 1136, 1135, 1134, 1133, 1132, 1131, 1130, 1129, 1128, 1127, 1126, 1125, 1124, 1123, 1122, 1121, 1120, 1119, 1118, 1117, 1116, 1115, 1114, 1113, 1112, 1111, 1110, 1109, 1108, 1107, 1106, 1105, 1104, 1103, 1102, 1101, 1100, 1099, 1098, 1097, 1096, 1095, 1094, 1093, 1092, 1091, 1090, 1089, 1088, 1087, 1086, 1085, 1084, 1083, 1082, 1081, 1080, 1079, 1078, 1077, 1076, 1075, 1074, 1073, 1072, 1071, 1070, 1069, 1068, 1067, 1066, 1065, 1064, 1063, 1062, 1061, 1060, 1059, 1058, 1057, 1056, 1055, 1054, 1053, 1052, 1051, 1050, 1049, 1048, 1047, 1046, 1045, 1044, 1043, 1042, 1041, 1040, 1039, 1038, 1037, 1036, 1035, 1034, 1033, 1032, 1031, 1030, 1029, 1028, 1027, 1026, 1025, 1024, 1023, 1022, 1021, 1020, 1019, 1018, 1017, 1016, 1015, 1014, 1013, 1012, 1011, 1010, 1009, 1008, 1007, 1006, 1005, 1004, 1003, 1002, 1001, 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, 975, 974, 973, 972, 971, 970, 969, 968, 967, 966, 965, 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, 954, 953, 952, 951, 950, 949, 948, 947, 946, 945, 944, 943, 942, 941, 940, 939, 938, 937, 936, 935, 934, 933, 932, 931, 930, 929, 928, 927, 926, 925, 924, 923, 922, 921, 920, 919, 918, 917, 916, 915, 914, 913, 912, 911, 910, 909, 908, 907, 906, 905, 904, 903, 902, 901, 900, 899, 898, 897, 896, 895, 894, 893, 892, 891, 890, 889, 888, 887, 886, 885, 884, 883, 882, 881, 880, 879, 878, 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, 867, 866, 865, 864, 863, 862, 861, 860, 859, 858, 857, 856, 855, 854, 853, 852, 851, 850, 849, 848, 847, 846, 845, 844, 843, 842, 841, 840, 839, 838, 837, 836, 835, 834, 833, 832, 831, 830, 829, 828, 827, 826, 825, 824, 823, 822, 821, 820, 819, 818, 817, 816, 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, 754, 753, 752, 751]\n assert candidate(n = 12,k = 4) == [1, 12, 2, 11, 10, 9, 8, 7, 6, 5, 4, 3]\n assert candidate(n = 998,k = 498) == [1, 998, 2, 997, 3, 996, 4, 995, 5, 994, 6, 993, 7, 992, 8, 991, 9, 990, 10, 989, 11, 988, 12, 987, 13, 986, 14, 985, 15, 984, 16, 983, 17, 982, 18, 981, 19, 980, 20, 979, 21, 978, 22, 977, 23, 976, 24, 975, 25, 974, 26, 973, 27, 972, 28, 971, 29, 970, 30, 969, 31, 968, 32, 967, 33, 966, 34, 965, 35, 964, 36, 963, 37, 962, 38, 961, 39, 960, 40, 959, 41, 958, 42, 957, 43, 956, 44, 955, 45, 954, 46, 953, 47, 952, 48, 951, 49, 950, 50, 949, 51, 948, 52, 947, 53, 946, 54, 945, 55, 944, 56, 943, 57, 942, 58, 941, 59, 940, 60, 939, 61, 938, 62, 937, 63, 936, 64, 935, 65, 934, 66, 933, 67, 932, 68, 931, 69, 930, 70, 929, 71, 928, 72, 927, 73, 926, 74, 925, 75, 924, 76, 923, 77, 922, 78, 921, 79, 920, 80, 919, 81, 918, 82, 917, 83, 916, 84, 915, 85, 914, 86, 913, 87, 912, 88, 911, 89, 910, 90, 909, 91, 908, 92, 907, 93, 906, 94, 905, 95, 904, 96, 903, 97, 902, 98, 901, 99, 900, 100, 899, 101, 898, 102, 897, 103, 896, 104, 895, 105, 894, 106, 893, 107, 892, 108, 891, 109, 890, 110, 889, 111, 888, 112, 887, 113, 886, 114, 885, 115, 884, 116, 883, 117, 882, 118, 881, 119, 880, 120, 879, 121, 878, 122, 877, 123, 876, 124, 875, 125, 874, 126, 873, 127, 872, 128, 871, 129, 870, 130, 869, 131, 868, 132, 867, 133, 866, 134, 865, 135, 864, 136, 863, 137, 862, 138, 861, 139, 860, 140, 859, 141, 858, 142, 857, 143, 856, 144, 855, 145, 854, 146, 853, 147, 852, 148, 851, 149, 850, 150, 849, 151, 848, 152, 847, 153, 846, 154, 845, 155, 844, 156, 843, 157, 842, 158, 841, 159, 840, 160, 839, 161, 838, 162, 837, 163, 836, 164, 835, 165, 834, 166, 833, 167, 832, 168, 831, 169, 830, 170, 829, 171, 828, 172, 827, 173, 826, 174, 825, 175, 824, 176, 823, 177, 822, 178, 821, 179, 820, 180, 819, 181, 818, 182, 817, 183, 816, 184, 815, 185, 814, 186, 813, 187, 812, 188, 811, 189, 810, 190, 809, 191, 808, 192, 807, 193, 806, 194, 805, 195, 804, 196, 803, 197, 802, 198, 801, 199, 800, 200, 799, 201, 798, 202, 797, 203, 796, 204, 795, 205, 794, 206, 793, 207, 792, 208, 791, 209, 790, 210, 789, 211, 788, 212, 787, 213, 786, 214, 785, 215, 784, 216, 783, 217, 782, 218, 781, 219, 780, 220, 779, 221, 778, 222, 777, 223, 776, 224, 775, 225, 774, 226, 773, 227, 772, 228, 771, 229, 770, 230, 769, 231, 768, 232, 767, 233, 766, 234, 765, 235, 764, 236, 763, 237, 762, 238, 761, 239, 760, 240, 759, 241, 758, 242, 757, 243, 756, 244, 755, 245, 754, 246, 753, 247, 752, 248, 751, 249, 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250]\n assert candidate(n = 15,k = 7) == [1, 15, 2, 14, 3, 13, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(n = 750,k = 375) == [1, 750, 2, 749, 3, 748, 4, 747, 5, 746, 6, 745, 7, 744, 8, 743, 9, 742, 10, 741, 11, 740, 12, 739, 13, 738, 14, 737, 15, 736, 16, 735, 17, 734, 18, 733, 19, 732, 20, 731, 21, 730, 22, 729, 23, 728, 24, 727, 25, 726, 26, 725, 27, 724, 28, 723, 29, 722, 30, 721, 31, 720, 32, 719, 33, 718, 34, 717, 35, 716, 36, 715, 37, 714, 38, 713, 39, 712, 40, 711, 41, 710, 42, 709, 43, 708, 44, 707, 45, 706, 46, 705, 47, 704, 48, 703, 49, 702, 50, 701, 51, 700, 52, 699, 53, 698, 54, 697, 55, 696, 56, 695, 57, 694, 58, 693, 59, 692, 60, 691, 61, 690, 62, 689, 63, 688, 64, 687, 65, 686, 66, 685, 67, 684, 68, 683, 69, 682, 70, 681, 71, 680, 72, 679, 73, 678, 74, 677, 75, 676, 76, 675, 77, 674, 78, 673, 79, 672, 80, 671, 81, 670, 82, 669, 83, 668, 84, 667, 85, 666, 86, 665, 87, 664, 88, 663, 89, 662, 90, 661, 91, 660, 92, 659, 93, 658, 94, 657, 95, 656, 96, 655, 97, 654, 98, 653, 99, 652, 100, 651, 101, 650, 102, 649, 103, 648, 104, 647, 105, 646, 106, 645, 107, 644, 108, 643, 109, 642, 110, 641, 111, 640, 112, 639, 113, 638, 114, 637, 115, 636, 116, 635, 117, 634, 118, 633, 119, 632, 120, 631, 121, 630, 122, 629, 123, 628, 124, 627, 125, 626, 126, 625, 127, 624, 128, 623, 129, 622, 130, 621, 131, 620, 132, 619, 133, 618, 134, 617, 135, 616, 136, 615, 137, 614, 138, 613, 139, 612, 140, 611, 141, 610, 142, 609, 143, 608, 144, 607, 145, 606, 146, 605, 147, 604, 148, 603, 149, 602, 150, 601, 151, 600, 152, 599, 153, 598, 154, 597, 155, 596, 156, 595, 157, 594, 158, 593, 159, 592, 160, 591, 161, 590, 162, 589, 163, 588, 164, 587, 165, 586, 166, 585, 167, 584, 168, 583, 169, 582, 170, 581, 171, 580, 172, 579, 173, 578, 174, 577, 175, 576, 176, 575, 177, 574, 178, 573, 179, 572, 180, 571, 181, 570, 182, 569, 183, 568, 184, 567, 185, 566, 186, 565, 187, 564, 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, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563]\n assert candidate(n = 600,k = 300) == [1, 600, 2, 599, 3, 598, 4, 597, 5, 596, 6, 595, 7, 594, 8, 593, 9, 592, 10, 591, 11, 590, 12, 589, 13, 588, 14, 587, 15, 586, 16, 585, 17, 584, 18, 583, 19, 582, 20, 581, 21, 580, 22, 579, 23, 578, 24, 577, 25, 576, 26, 575, 27, 574, 28, 573, 29, 572, 30, 571, 31, 570, 32, 569, 33, 568, 34, 567, 35, 566, 36, 565, 37, 564, 38, 563, 39, 562, 40, 561, 41, 560, 42, 559, 43, 558, 44, 557, 45, 556, 46, 555, 47, 554, 48, 553, 49, 552, 50, 551, 51, 550, 52, 549, 53, 548, 54, 547, 55, 546, 56, 545, 57, 544, 58, 543, 59, 542, 60, 541, 61, 540, 62, 539, 63, 538, 64, 537, 65, 536, 66, 535, 67, 534, 68, 533, 69, 532, 70, 531, 71, 530, 72, 529, 73, 528, 74, 527, 75, 526, 76, 525, 77, 524, 78, 523, 79, 522, 80, 521, 81, 520, 82, 519, 83, 518, 84, 517, 85, 516, 86, 515, 87, 514, 88, 513, 89, 512, 90, 511, 91, 510, 92, 509, 93, 508, 94, 507, 95, 506, 96, 505, 97, 504, 98, 503, 99, 502, 100, 501, 101, 500, 102, 499, 103, 498, 104, 497, 105, 496, 106, 495, 107, 494, 108, 493, 109, 492, 110, 491, 111, 490, 112, 489, 113, 488, 114, 487, 115, 486, 116, 485, 117, 484, 118, 483, 119, 482, 120, 481, 121, 480, 122, 479, 123, 478, 124, 477, 125, 476, 126, 475, 127, 474, 128, 473, 129, 472, 130, 471, 131, 470, 132, 469, 133, 468, 134, 467, 135, 466, 136, 465, 137, 464, 138, 463, 139, 462, 140, 461, 141, 460, 142, 459, 143, 458, 144, 457, 145, 456, 146, 455, 147, 454, 148, 453, 149, 452, 150, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 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]\n assert candidate(n = 40,k = 35) == [1, 40, 2, 39, 3, 38, 4, 37, 5, 36, 6, 35, 7, 34, 8, 33, 9, 32, 10, 31, 11, 30, 12, 29, 13, 28, 14, 27, 15, 26, 16, 25, 17, 24, 18, 19, 20, 21, 22, 23]\n assert candidate(n = 12,k = 10) == [1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 7, 6]\n assert candidate(n = 40,k = 30) == [1, 40, 2, 39, 3, 38, 4, 37, 5, 36, 6, 35, 7, 34, 8, 33, 9, 32, 10, 31, 11, 30, 12, 29, 13, 28, 14, 27, 15, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16]\n assert candidate(n = 70,k = 40) == [1, 70, 2, 69, 3, 68, 4, 67, 5, 66, 6, 65, 7, 64, 8, 63, 9, 62, 10, 61, 11, 60, 12, 59, 13, 58, 14, 57, 15, 56, 16, 55, 17, 54, 18, 53, 19, 52, 20, 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]\n assert candidate(n = 5000,k = 2500) == [1, 5000, 2, 4999, 3, 4998, 4, 4997, 5, 4996, 6, 4995, 7, 4994, 8, 4993, 9, 4992, 10, 4991, 11, 4990, 12, 4989, 13, 4988, 14, 4987, 15, 4986, 16, 4985, 17, 4984, 18, 4983, 19, 4982, 20, 4981, 21, 4980, 22, 4979, 23, 4978, 24, 4977, 25, 4976, 26, 4975, 27, 4974, 28, 4973, 29, 4972, 30, 4971, 31, 4970, 32, 4969, 33, 4968, 34, 4967, 35, 4966, 36, 4965, 37, 4964, 38, 4963, 39, 4962, 40, 4961, 41, 4960, 42, 4959, 43, 4958, 44, 4957, 45, 4956, 46, 4955, 47, 4954, 48, 4953, 49, 4952, 50, 4951, 51, 4950, 52, 4949, 53, 4948, 54, 4947, 55, 4946, 56, 4945, 57, 4944, 58, 4943, 59, 4942, 60, 4941, 61, 4940, 62, 4939, 63, 4938, 64, 4937, 65, 4936, 66, 4935, 67, 4934, 68, 4933, 69, 4932, 70, 4931, 71, 4930, 72, 4929, 73, 4928, 74, 4927, 75, 4926, 76, 4925, 77, 4924, 78, 4923, 79, 4922, 80, 4921, 81, 4920, 82, 4919, 83, 4918, 84, 4917, 85, 4916, 86, 4915, 87, 4914, 88, 4913, 89, 4912, 90, 4911, 91, 4910, 92, 4909, 93, 4908, 94, 4907, 95, 4906, 96, 4905, 97, 4904, 98, 4903, 99, 4902, 100, 4901, 101, 4900, 102, 4899, 103, 4898, 104, 4897, 105, 4896, 106, 4895, 107, 4894, 108, 4893, 109, 4892, 110, 4891, 111, 4890, 112, 4889, 113, 4888, 114, 4887, 115, 4886, 116, 4885, 117, 4884, 118, 4883, 119, 4882, 120, 4881, 121, 4880, 122, 4879, 123, 4878, 124, 4877, 125, 4876, 126, 4875, 127, 4874, 128, 4873, 129, 4872, 130, 4871, 131, 4870, 132, 4869, 133, 4868, 134, 4867, 135, 4866, 136, 4865, 137, 4864, 138, 4863, 139, 4862, 140, 4861, 141, 4860, 142, 4859, 143, 4858, 144, 4857, 145, 4856, 146, 4855, 147, 4854, 148, 4853, 149, 4852, 150, 4851, 151, 4850, 152, 4849, 153, 4848, 154, 4847, 155, 4846, 156, 4845, 157, 4844, 158, 4843, 159, 4842, 160, 4841, 161, 4840, 162, 4839, 163, 4838, 164, 4837, 165, 4836, 166, 4835, 167, 4834, 168, 4833, 169, 4832, 170, 4831, 171, 4830, 172, 4829, 173, 4828, 174, 4827, 175, 4826, 176, 4825, 177, 4824, 178, 4823, 179, 4822, 180, 4821, 181, 4820, 182, 4819, 183, 4818, 184, 4817, 185, 4816, 186, 4815, 187, 4814, 188, 4813, 189, 4812, 190, 4811, 191, 4810, 192, 4809, 193, 4808, 194, 4807, 195, 4806, 196, 4805, 197, 4804, 198, 4803, 199, 4802, 200, 4801, 201, 4800, 202, 4799, 203, 4798, 204, 4797, 205, 4796, 206, 4795, 207, 4794, 208, 4793, 209, 4792, 210, 4791, 211, 4790, 212, 4789, 213, 4788, 214, 4787, 215, 4786, 216, 4785, 217, 4784, 218, 4783, 219, 4782, 220, 4781, 221, 4780, 222, 4779, 223, 4778, 224, 4777, 225, 4776, 226, 4775, 227, 4774, 228, 4773, 229, 4772, 230, 4771, 231, 4770, 232, 4769, 233, 4768, 234, 4767, 235, 4766, 236, 4765, 237, 4764, 238, 4763, 239, 4762, 240, 4761, 241, 4760, 242, 4759, 243, 4758, 244, 4757, 245, 4756, 246, 4755, 247, 4754, 248, 4753, 249, 4752, 250, 4751, 251, 4750, 252, 4749, 253, 4748, 254, 4747, 255, 4746, 256, 4745, 257, 4744, 258, 4743, 259, 4742, 260, 4741, 261, 4740, 262, 4739, 263, 4738, 264, 4737, 265, 4736, 266, 4735, 267, 4734, 268, 4733, 269, 4732, 270, 4731, 271, 4730, 272, 4729, 273, 4728, 274, 4727, 275, 4726, 276, 4725, 277, 4724, 278, 4723, 279, 4722, 280, 4721, 281, 4720, 282, 4719, 283, 4718, 284, 4717, 285, 4716, 286, 4715, 287, 4714, 288, 4713, 289, 4712, 290, 4711, 291, 4710, 292, 4709, 293, 4708, 294, 4707, 295, 4706, 296, 4705, 297, 4704, 298, 4703, 299, 4702, 300, 4701, 301, 4700, 302, 4699, 303, 4698, 304, 4697, 305, 4696, 306, 4695, 307, 4694, 308, 4693, 309, 4692, 310, 4691, 311, 4690, 312, 4689, 313, 4688, 314, 4687, 315, 4686, 316, 4685, 317, 4684, 318, 4683, 319, 4682, 320, 4681, 321, 4680, 322, 4679, 323, 4678, 324, 4677, 325, 4676, 326, 4675, 327, 4674, 328, 4673, 329, 4672, 330, 4671, 331, 4670, 332, 4669, 333, 4668, 334, 4667, 335, 4666, 336, 4665, 337, 4664, 338, 4663, 339, 4662, 340, 4661, 341, 4660, 342, 4659, 343, 4658, 344, 4657, 345, 4656, 346, 4655, 347, 4654, 348, 4653, 349, 4652, 350, 4651, 351, 4650, 352, 4649, 353, 4648, 354, 4647, 355, 4646, 356, 4645, 357, 4644, 358, 4643, 359, 4642, 360, 4641, 361, 4640, 362, 4639, 363, 4638, 364, 4637, 365, 4636, 366, 4635, 367, 4634, 368, 4633, 369, 4632, 370, 4631, 371, 4630, 372, 4629, 373, 4628, 374, 4627, 375, 4626, 376, 4625, 377, 4624, 378, 4623, 379, 4622, 380, 4621, 381, 4620, 382, 4619, 383, 4618, 384, 4617, 385, 4616, 386, 4615, 387, 4614, 388, 4613, 389, 4612, 390, 4611, 391, 4610, 392, 4609, 393, 4608, 394, 4607, 395, 4606, 396, 4605, 397, 4604, 398, 4603, 399, 4602, 400, 4601, 401, 4600, 402, 4599, 403, 4598, 404, 4597, 405, 4596, 406, 4595, 407, 4594, 408, 4593, 409, 4592, 410, 4591, 411, 4590, 412, 4589, 413, 4588, 414, 4587, 415, 4586, 416, 4585, 417, 4584, 418, 4583, 419, 4582, 420, 4581, 421, 4580, 422, 4579, 423, 4578, 424, 4577, 425, 4576, 426, 4575, 427, 4574, 428, 4573, 429, 4572, 430, 4571, 431, 4570, 432, 4569, 433, 4568, 434, 4567, 435, 4566, 436, 4565, 437, 4564, 438, 4563, 439, 4562, 440, 4561, 441, 4560, 442, 4559, 443, 4558, 444, 4557, 445, 4556, 446, 4555, 447, 4554, 448, 4553, 449, 4552, 450, 4551, 451, 4550, 452, 4549, 453, 4548, 454, 4547, 455, 4546, 456, 4545, 457, 4544, 458, 4543, 459, 4542, 460, 4541, 461, 4540, 462, 4539, 463, 4538, 464, 4537, 465, 4536, 466, 4535, 467, 4534, 468, 4533, 469, 4532, 470, 4531, 471, 4530, 472, 4529, 473, 4528, 474, 4527, 475, 4526, 476, 4525, 477, 4524, 478, 4523, 479, 4522, 480, 4521, 481, 4520, 482, 4519, 483, 4518, 484, 4517, 485, 4516, 486, 4515, 487, 4514, 488, 4513, 489, 4512, 490, 4511, 491, 4510, 492, 4509, 493, 4508, 494, 4507, 495, 4506, 496, 4505, 497, 4504, 498, 4503, 499, 4502, 500, 4501, 501, 4500, 502, 4499, 503, 4498, 504, 4497, 505, 4496, 506, 4495, 507, 4494, 508, 4493, 509, 4492, 510, 4491, 511, 4490, 512, 4489, 513, 4488, 514, 4487, 515, 4486, 516, 4485, 517, 4484, 518, 4483, 519, 4482, 520, 4481, 521, 4480, 522, 4479, 523, 4478, 524, 4477, 525, 4476, 526, 4475, 527, 4474, 528, 4473, 529, 4472, 530, 4471, 531, 4470, 532, 4469, 533, 4468, 534, 4467, 535, 4466, 536, 4465, 537, 4464, 538, 4463, 539, 4462, 540, 4461, 541, 4460, 542, 4459, 543, 4458, 544, 4457, 545, 4456, 546, 4455, 547, 4454, 548, 4453, 549, 4452, 550, 4451, 551, 4450, 552, 4449, 553, 4448, 554, 4447, 555, 4446, 556, 4445, 557, 4444, 558, 4443, 559, 4442, 560, 4441, 561, 4440, 562, 4439, 563, 4438, 564, 4437, 565, 4436, 566, 4435, 567, 4434, 568, 4433, 569, 4432, 570, 4431, 571, 4430, 572, 4429, 573, 4428, 574, 4427, 575, 4426, 576, 4425, 577, 4424, 578, 4423, 579, 4422, 580, 4421, 581, 4420, 582, 4419, 583, 4418, 584, 4417, 585, 4416, 586, 4415, 587, 4414, 588, 4413, 589, 4412, 590, 4411, 591, 4410, 592, 4409, 593, 4408, 594, 4407, 595, 4406, 596, 4405, 597, 4404, 598, 4403, 599, 4402, 600, 4401, 601, 4400, 602, 4399, 603, 4398, 604, 4397, 605, 4396, 606, 4395, 607, 4394, 608, 4393, 609, 4392, 610, 4391, 611, 4390, 612, 4389, 613, 4388, 614, 4387, 615, 4386, 616, 4385, 617, 4384, 618, 4383, 619, 4382, 620, 4381, 621, 4380, 622, 4379, 623, 4378, 624, 4377, 625, 4376, 626, 4375, 627, 4374, 628, 4373, 629, 4372, 630, 4371, 631, 4370, 632, 4369, 633, 4368, 634, 4367, 635, 4366, 636, 4365, 637, 4364, 638, 4363, 639, 4362, 640, 4361, 641, 4360, 642, 4359, 643, 4358, 644, 4357, 645, 4356, 646, 4355, 647, 4354, 648, 4353, 649, 4352, 650, 4351, 651, 4350, 652, 4349, 653, 4348, 654, 4347, 655, 4346, 656, 4345, 657, 4344, 658, 4343, 659, 4342, 660, 4341, 661, 4340, 662, 4339, 663, 4338, 664, 4337, 665, 4336, 666, 4335, 667, 4334, 668, 4333, 669, 4332, 670, 4331, 671, 4330, 672, 4329, 673, 4328, 674, 4327, 675, 4326, 676, 4325, 677, 4324, 678, 4323, 679, 4322, 680, 4321, 681, 4320, 682, 4319, 683, 4318, 684, 4317, 685, 4316, 686, 4315, 687, 4314, 688, 4313, 689, 4312, 690, 4311, 691, 4310, 692, 4309, 693, 4308, 694, 4307, 695, 4306, 696, 4305, 697, 4304, 698, 4303, 699, 4302, 700, 4301, 701, 4300, 702, 4299, 703, 4298, 704, 4297, 705, 4296, 706, 4295, 707, 4294, 708, 4293, 709, 4292, 710, 4291, 711, 4290, 712, 4289, 713, 4288, 714, 4287, 715, 4286, 716, 4285, 717, 4284, 718, 4283, 719, 4282, 720, 4281, 721, 4280, 722, 4279, 723, 4278, 724, 4277, 725, 4276, 726, 4275, 727, 4274, 728, 4273, 729, 4272, 730, 4271, 731, 4270, 732, 4269, 733, 4268, 734, 4267, 735, 4266, 736, 4265, 737, 4264, 738, 4263, 739, 4262, 740, 4261, 741, 4260, 742, 4259, 743, 4258, 744, 4257, 745, 4256, 746, 4255, 747, 4254, 748, 4253, 749, 4252, 750, 4251, 751, 4250, 752, 4249, 753, 4248, 754, 4247, 755, 4246, 756, 4245, 757, 4244, 758, 4243, 759, 4242, 760, 4241, 761, 4240, 762, 4239, 763, 4238, 764, 4237, 765, 4236, 766, 4235, 767, 4234, 768, 4233, 769, 4232, 770, 4231, 771, 4230, 772, 4229, 773, 4228, 774, 4227, 775, 4226, 776, 4225, 777, 4224, 778, 4223, 779, 4222, 780, 4221, 781, 4220, 782, 4219, 783, 4218, 784, 4217, 785, 4216, 786, 4215, 787, 4214, 788, 4213, 789, 4212, 790, 4211, 791, 4210, 792, 4209, 793, 4208, 794, 4207, 795, 4206, 796, 4205, 797, 4204, 798, 4203, 799, 4202, 800, 4201, 801, 4200, 802, 4199, 803, 4198, 804, 4197, 805, 4196, 806, 4195, 807, 4194, 808, 4193, 809, 4192, 810, 4191, 811, 4190, 812, 4189, 813, 4188, 814, 4187, 815, 4186, 816, 4185, 817, 4184, 818, 4183, 819, 4182, 820, 4181, 821, 4180, 822, 4179, 823, 4178, 824, 4177, 825, 4176, 826, 4175, 827, 4174, 828, 4173, 829, 4172, 830, 4171, 831, 4170, 832, 4169, 833, 4168, 834, 4167, 835, 4166, 836, 4165, 837, 4164, 838, 4163, 839, 4162, 840, 4161, 841, 4160, 842, 4159, 843, 4158, 844, 4157, 845, 4156, 846, 4155, 847, 4154, 848, 4153, 849, 4152, 850, 4151, 851, 4150, 852, 4149, 853, 4148, 854, 4147, 855, 4146, 856, 4145, 857, 4144, 858, 4143, 859, 4142, 860, 4141, 861, 4140, 862, 4139, 863, 4138, 864, 4137, 865, 4136, 866, 4135, 867, 4134, 868, 4133, 869, 4132, 870, 4131, 871, 4130, 872, 4129, 873, 4128, 874, 4127, 875, 4126, 876, 4125, 877, 4124, 878, 4123, 879, 4122, 880, 4121, 881, 4120, 882, 4119, 883, 4118, 884, 4117, 885, 4116, 886, 4115, 887, 4114, 888, 4113, 889, 4112, 890, 4111, 891, 4110, 892, 4109, 893, 4108, 894, 4107, 895, 4106, 896, 4105, 897, 4104, 898, 4103, 899, 4102, 900, 4101, 901, 4100, 902, 4099, 903, 4098, 904, 4097, 905, 4096, 906, 4095, 907, 4094, 908, 4093, 909, 4092, 910, 4091, 911, 4090, 912, 4089, 913, 4088, 914, 4087, 915, 4086, 916, 4085, 917, 4084, 918, 4083, 919, 4082, 920, 4081, 921, 4080, 922, 4079, 923, 4078, 924, 4077, 925, 4076, 926, 4075, 927, 4074, 928, 4073, 929, 4072, 930, 4071, 931, 4070, 932, 4069, 933, 4068, 934, 4067, 935, 4066, 936, 4065, 937, 4064, 938, 4063, 939, 4062, 940, 4061, 941, 4060, 942, 4059, 943, 4058, 944, 4057, 945, 4056, 946, 4055, 947, 4054, 948, 4053, 949, 4052, 950, 4051, 951, 4050, 952, 4049, 953, 4048, 954, 4047, 955, 4046, 956, 4045, 957, 4044, 958, 4043, 959, 4042, 960, 4041, 961, 4040, 962, 4039, 963, 4038, 964, 4037, 965, 4036, 966, 4035, 967, 4034, 968, 4033, 969, 4032, 970, 4031, 971, 4030, 972, 4029, 973, 4028, 974, 4027, 975, 4026, 976, 4025, 977, 4024, 978, 4023, 979, 4022, 980, 4021, 981, 4020, 982, 4019, 983, 4018, 984, 4017, 985, 4016, 986, 4015, 987, 4014, 988, 4013, 989, 4012, 990, 4011, 991, 4010, 992, 4009, 993, 4008, 994, 4007, 995, 4006, 996, 4005, 997, 4004, 998, 4003, 999, 4002, 1000, 4001, 1001, 4000, 1002, 3999, 1003, 3998, 1004, 3997, 1005, 3996, 1006, 3995, 1007, 3994, 1008, 3993, 1009, 3992, 1010, 3991, 1011, 3990, 1012, 3989, 1013, 3988, 1014, 3987, 1015, 3986, 1016, 3985, 1017, 3984, 1018, 3983, 1019, 3982, 1020, 3981, 1021, 3980, 1022, 3979, 1023, 3978, 1024, 3977, 1025, 3976, 1026, 3975, 1027, 3974, 1028, 3973, 1029, 3972, 1030, 3971, 1031, 3970, 1032, 3969, 1033, 3968, 1034, 3967, 1035, 3966, 1036, 3965, 1037, 3964, 1038, 3963, 1039, 3962, 1040, 3961, 1041, 3960, 1042, 3959, 1043, 3958, 1044, 3957, 1045, 3956, 1046, 3955, 1047, 3954, 1048, 3953, 1049, 3952, 1050, 3951, 1051, 3950, 1052, 3949, 1053, 3948, 1054, 3947, 1055, 3946, 1056, 3945, 1057, 3944, 1058, 3943, 1059, 3942, 1060, 3941, 1061, 3940, 1062, 3939, 1063, 3938, 1064, 3937, 1065, 3936, 1066, 3935, 1067, 3934, 1068, 3933, 1069, 3932, 1070, 3931, 1071, 3930, 1072, 3929, 1073, 3928, 1074, 3927, 1075, 3926, 1076, 3925, 1077, 3924, 1078, 3923, 1079, 3922, 1080, 3921, 1081, 3920, 1082, 3919, 1083, 3918, 1084, 3917, 1085, 3916, 1086, 3915, 1087, 3914, 1088, 3913, 1089, 3912, 1090, 3911, 1091, 3910, 1092, 3909, 1093, 3908, 1094, 3907, 1095, 3906, 1096, 3905, 1097, 3904, 1098, 3903, 1099, 3902, 1100, 3901, 1101, 3900, 1102, 3899, 1103, 3898, 1104, 3897, 1105, 3896, 1106, 3895, 1107, 3894, 1108, 3893, 1109, 3892, 1110, 3891, 1111, 3890, 1112, 3889, 1113, 3888, 1114, 3887, 1115, 3886, 1116, 3885, 1117, 3884, 1118, 3883, 1119, 3882, 1120, 3881, 1121, 3880, 1122, 3879, 1123, 3878, 1124, 3877, 1125, 3876, 1126, 3875, 1127, 3874, 1128, 3873, 1129, 3872, 1130, 3871, 1131, 3870, 1132, 3869, 1133, 3868, 1134, 3867, 1135, 3866, 1136, 3865, 1137, 3864, 1138, 3863, 1139, 3862, 1140, 3861, 1141, 3860, 1142, 3859, 1143, 3858, 1144, 3857, 1145, 3856, 1146, 3855, 1147, 3854, 1148, 3853, 1149, 3852, 1150, 3851, 1151, 3850, 1152, 3849, 1153, 3848, 1154, 3847, 1155, 3846, 1156, 3845, 1157, 3844, 1158, 3843, 1159, 3842, 1160, 3841, 1161, 3840, 1162, 3839, 1163, 3838, 1164, 3837, 1165, 3836, 1166, 3835, 1167, 3834, 1168, 3833, 1169, 3832, 1170, 3831, 1171, 3830, 1172, 3829, 1173, 3828, 1174, 3827, 1175, 3826, 1176, 3825, 1177, 3824, 1178, 3823, 1179, 3822, 1180, 3821, 1181, 3820, 1182, 3819, 1183, 3818, 1184, 3817, 1185, 3816, 1186, 3815, 1187, 3814, 1188, 3813, 1189, 3812, 1190, 3811, 1191, 3810, 1192, 3809, 1193, 3808, 1194, 3807, 1195, 3806, 1196, 3805, 1197, 3804, 1198, 3803, 1199, 3802, 1200, 3801, 1201, 3800, 1202, 3799, 1203, 3798, 1204, 3797, 1205, 3796, 1206, 3795, 1207, 3794, 1208, 3793, 1209, 3792, 1210, 3791, 1211, 3790, 1212, 3789, 1213, 3788, 1214, 3787, 1215, 3786, 1216, 3785, 1217, 3784, 1218, 3783, 1219, 3782, 1220, 3781, 1221, 3780, 1222, 3779, 1223, 3778, 1224, 3777, 1225, 3776, 1226, 3775, 1227, 3774, 1228, 3773, 1229, 3772, 1230, 3771, 1231, 3770, 1232, 3769, 1233, 3768, 1234, 3767, 1235, 3766, 1236, 3765, 1237, 3764, 1238, 3763, 1239, 3762, 1240, 3761, 1241, 3760, 1242, 3759, 1243, 3758, 1244, 3757, 1245, 3756, 1246, 3755, 1247, 3754, 1248, 3753, 1249, 3752, 1250, 3751, 3750, 3749, 3748, 3747, 3746, 3745, 3744, 3743, 3742, 3741, 3740, 3739, 3738, 3737, 3736, 3735, 3734, 3733, 3732, 3731, 3730, 3729, 3728, 3727, 3726, 3725, 3724, 3723, 3722, 3721, 3720, 3719, 3718, 3717, 3716, 3715, 3714, 3713, 3712, 3711, 3710, 3709, 3708, 3707, 3706, 3705, 3704, 3703, 3702, 3701, 3700, 3699, 3698, 3697, 3696, 3695, 3694, 3693, 3692, 3691, 3690, 3689, 3688, 3687, 3686, 3685, 3684, 3683, 3682, 3681, 3680, 3679, 3678, 3677, 3676, 3675, 3674, 3673, 3672, 3671, 3670, 3669, 3668, 3667, 3666, 3665, 3664, 3663, 3662, 3661, 3660, 3659, 3658, 3657, 3656, 3655, 3654, 3653, 3652, 3651, 3650, 3649, 3648, 3647, 3646, 3645, 3644, 3643, 3642, 3641, 3640, 3639, 3638, 3637, 3636, 3635, 3634, 3633, 3632, 3631, 3630, 3629, 3628, 3627, 3626, 3625, 3624, 3623, 3622, 3621, 3620, 3619, 3618, 3617, 3616, 3615, 3614, 3613, 3612, 3611, 3610, 3609, 3608, 3607, 3606, 3605, 3604, 3603, 3602, 3601, 3600, 3599, 3598, 3597, 3596, 3595, 3594, 3593, 3592, 3591, 3590, 3589, 3588, 3587, 3586, 3585, 3584, 3583, 3582, 3581, 3580, 3579, 3578, 3577, 3576, 3575, 3574, 3573, 3572, 3571, 3570, 3569, 3568, 3567, 3566, 3565, 3564, 3563, 3562, 3561, 3560, 3559, 3558, 3557, 3556, 3555, 3554, 3553, 3552, 3551, 3550, 3549, 3548, 3547, 3546, 3545, 3544, 3543, 3542, 3541, 3540, 3539, 3538, 3537, 3536, 3535, 3534, 3533, 3532, 3531, 3530, 3529, 3528, 3527, 3526, 3525, 3524, 3523, 3522, 3521, 3520, 3519, 3518, 3517, 3516, 3515, 3514, 3513, 3512, 3511, 3510, 3509, 3508, 3507, 3506, 3505, 3504, 3503, 3502, 3501, 3500, 3499, 3498, 3497, 3496, 3495, 3494, 3493, 3492, 3491, 3490, 3489, 3488, 3487, 3486, 3485, 3484, 3483, 3482, 3481, 3480, 3479, 3478, 3477, 3476, 3475, 3474, 3473, 3472, 3471, 3470, 3469, 3468, 3467, 3466, 3465, 3464, 3463, 3462, 3461, 3460, 3459, 3458, 3457, 3456, 3455, 3454, 3453, 3452, 3451, 3450, 3449, 3448, 3447, 3446, 3445, 3444, 3443, 3442, 3441, 3440, 3439, 3438, 3437, 3436, 3435, 3434, 3433, 3432, 3431, 3430, 3429, 3428, 3427, 3426, 3425, 3424, 3423, 3422, 3421, 3420, 3419, 3418, 3417, 3416, 3415, 3414, 3413, 3412, 3411, 3410, 3409, 3408, 3407, 3406, 3405, 3404, 3403, 3402, 3401, 3400, 3399, 3398, 3397, 3396, 3395, 3394, 3393, 3392, 3391, 3390, 3389, 3388, 3387, 3386, 3385, 3384, 3383, 3382, 3381, 3380, 3379, 3378, 3377, 3376, 3375, 3374, 3373, 3372, 3371, 3370, 3369, 3368, 3367, 3366, 3365, 3364, 3363, 3362, 3361, 3360, 3359, 3358, 3357, 3356, 3355, 3354, 3353, 3352, 3351, 3350, 3349, 3348, 3347, 3346, 3345, 3344, 3343, 3342, 3341, 3340, 3339, 3338, 3337, 3336, 3335, 3334, 3333, 3332, 3331, 3330, 3329, 3328, 3327, 3326, 3325, 3324, 3323, 3322, 3321, 3320, 3319, 3318, 3317, 3316, 3315, 3314, 3313, 3312, 3311, 3310, 3309, 3308, 3307, 3306, 3305, 3304, 3303, 3302, 3301, 3300, 3299, 3298, 3297, 3296, 3295, 3294, 3293, 3292, 3291, 3290, 3289, 3288, 3287, 3286, 3285, 3284, 3283, 3282, 3281, 3280, 3279, 3278, 3277, 3276, 3275, 3274, 3273, 3272, 3271, 3270, 3269, 3268, 3267, 3266, 3265, 3264, 3263, 3262, 3261, 3260, 3259, 3258, 3257, 3256, 3255, 3254, 3253, 3252, 3251, 3250, 3249, 3248, 3247, 3246, 3245, 3244, 3243, 3242, 3241, 3240, 3239, 3238, 3237, 3236, 3235, 3234, 3233, 3232, 3231, 3230, 3229, 3228, 3227, 3226, 3225, 3224, 3223, 3222, 3221, 3220, 3219, 3218, 3217, 3216, 3215, 3214, 3213, 3212, 3211, 3210, 3209, 3208, 3207, 3206, 3205, 3204, 3203, 3202, 3201, 3200, 3199, 3198, 3197, 3196, 3195, 3194, 3193, 3192, 3191, 3190, 3189, 3188, 3187, 3186, 3185, 3184, 3183, 3182, 3181, 3180, 3179, 3178, 3177, 3176, 3175, 3174, 3173, 3172, 3171, 3170, 3169, 3168, 3167, 3166, 3165, 3164, 3163, 3162, 3161, 3160, 3159, 3158, 3157, 3156, 3155, 3154, 3153, 3152, 3151, 3150, 3149, 3148, 3147, 3146, 3145, 3144, 3143, 3142, 3141, 3140, 3139, 3138, 3137, 3136, 3135, 3134, 3133, 3132, 3131, 3130, 3129, 3128, 3127, 3126, 3125, 3124, 3123, 3122, 3121, 3120, 3119, 3118, 3117, 3116, 3115, 3114, 3113, 3112, 3111, 3110, 3109, 3108, 3107, 3106, 3105, 3104, 3103, 3102, 3101, 3100, 3099, 3098, 3097, 3096, 3095, 3094, 3093, 3092, 3091, 3090, 3089, 3088, 3087, 3086, 3085, 3084, 3083, 3082, 3081, 3080, 3079, 3078, 3077, 3076, 3075, 3074, 3073, 3072, 3071, 3070, 3069, 3068, 3067, 3066, 3065, 3064, 3063, 3062, 3061, 3060, 3059, 3058, 3057, 3056, 3055, 3054, 3053, 3052, 3051, 3050, 3049, 3048, 3047, 3046, 3045, 3044, 3043, 3042, 3041, 3040, 3039, 3038, 3037, 3036, 3035, 3034, 3033, 3032, 3031, 3030, 3029, 3028, 3027, 3026, 3025, 3024, 3023, 3022, 3021, 3020, 3019, 3018, 3017, 3016, 3015, 3014, 3013, 3012, 3011, 3010, 3009, 3008, 3007, 3006, 3005, 3004, 3003, 3002, 3001, 3000, 2999, 2998, 2997, 2996, 2995, 2994, 2993, 2992, 2991, 2990, 2989, 2988, 2987, 2986, 2985, 2984, 2983, 2982, 2981, 2980, 2979, 2978, 2977, 2976, 2975, 2974, 2973, 2972, 2971, 2970, 2969, 2968, 2967, 2966, 2965, 2964, 2963, 2962, 2961, 2960, 2959, 2958, 2957, 2956, 2955, 2954, 2953, 2952, 2951, 2950, 2949, 2948, 2947, 2946, 2945, 2944, 2943, 2942, 2941, 2940, 2939, 2938, 2937, 2936, 2935, 2934, 2933, 2932, 2931, 2930, 2929, 2928, 2927, 2926, 2925, 2924, 2923, 2922, 2921, 2920, 2919, 2918, 2917, 2916, 2915, 2914, 2913, 2912, 2911, 2910, 2909, 2908, 2907, 2906, 2905, 2904, 2903, 2902, 2901, 2900, 2899, 2898, 2897, 2896, 2895, 2894, 2893, 2892, 2891, 2890, 2889, 2888, 2887, 2886, 2885, 2884, 2883, 2882, 2881, 2880, 2879, 2878, 2877, 2876, 2875, 2874, 2873, 2872, 2871, 2870, 2869, 2868, 2867, 2866, 2865, 2864, 2863, 2862, 2861, 2860, 2859, 2858, 2857, 2856, 2855, 2854, 2853, 2852, 2851, 2850, 2849, 2848, 2847, 2846, 2845, 2844, 2843, 2842, 2841, 2840, 2839, 2838, 2837, 2836, 2835, 2834, 2833, 2832, 2831, 2830, 2829, 2828, 2827, 2826, 2825, 2824, 2823, 2822, 2821, 2820, 2819, 2818, 2817, 2816, 2815, 2814, 2813, 2812, 2811, 2810, 2809, 2808, 2807, 2806, 2805, 2804, 2803, 2802, 2801, 2800, 2799, 2798, 2797, 2796, 2795, 2794, 2793, 2792, 2791, 2790, 2789, 2788, 2787, 2786, 2785, 2784, 2783, 2782, 2781, 2780, 2779, 2778, 2777, 2776, 2775, 2774, 2773, 2772, 2771, 2770, 2769, 2768, 2767, 2766, 2765, 2764, 2763, 2762, 2761, 2760, 2759, 2758, 2757, 2756, 2755, 2754, 2753, 2752, 2751, 2750, 2749, 2748, 2747, 2746, 2745, 2744, 2743, 2742, 2741, 2740, 2739, 2738, 2737, 2736, 2735, 2734, 2733, 2732, 2731, 2730, 2729, 2728, 2727, 2726, 2725, 2724, 2723, 2722, 2721, 2720, 2719, 2718, 2717, 2716, 2715, 2714, 2713, 2712, 2711, 2710, 2709, 2708, 2707, 2706, 2705, 2704, 2703, 2702, 2701, 2700, 2699, 2698, 2697, 2696, 2695, 2694, 2693, 2692, 2691, 2690, 2689, 2688, 2687, 2686, 2685, 2684, 2683, 2682, 2681, 2680, 2679, 2678, 2677, 2676, 2675, 2674, 2673, 2672, 2671, 2670, 2669, 2668, 2667, 2666, 2665, 2664, 2663, 2662, 2661, 2660, 2659, 2658, 2657, 2656, 2655, 2654, 2653, 2652, 2651, 2650, 2649, 2648, 2647, 2646, 2645, 2644, 2643, 2642, 2641, 2640, 2639, 2638, 2637, 2636, 2635, 2634, 2633, 2632, 2631, 2630, 2629, 2628, 2627, 2626, 2625, 2624, 2623, 2622, 2621, 2620, 2619, 2618, 2617, 2616, 2615, 2614, 2613, 2612, 2611, 2610, 2609, 2608, 2607, 2606, 2605, 2604, 2603, 2602, 2601, 2600, 2599, 2598, 2597, 2596, 2595, 2594, 2593, 2592, 2591, 2590, 2589, 2588, 2587, 2586, 2585, 2584, 2583, 2582, 2581, 2580, 2579, 2578, 2577, 2576, 2575, 2574, 2573, 2572, 2571, 2570, 2569, 2568, 2567, 2566, 2565, 2564, 2563, 2562, 2561, 2560, 2559, 2558, 2557, 2556, 2555, 2554, 2553, 2552, 2551, 2550, 2549, 2548, 2547, 2546, 2545, 2544, 2543, 2542, 2541, 2540, 2539, 2538, 2537, 2536, 2535, 2534, 2533, 2532, 2531, 2530, 2529, 2528, 2527, 2526, 2525, 2524, 2523, 2522, 2521, 2520, 2519, 2518, 2517, 2516, 2515, 2514, 2513, 2512, 2511, 2510, 2509, 2508, 2507, 2506, 2505, 2504, 2503, 2502, 2501, 2500, 2499, 2498, 2497, 2496, 2495, 2494, 2493, 2492, 2491, 2490, 2489, 2488, 2487, 2486, 2485, 2484, 2483, 2482, 2481, 2480, 2479, 2478, 2477, 2476, 2475, 2474, 2473, 2472, 2471, 2470, 2469, 2468, 2467, 2466, 2465, 2464, 2463, 2462, 2461, 2460, 2459, 2458, 2457, 2456, 2455, 2454, 2453, 2452, 2451, 2450, 2449, 2448, 2447, 2446, 2445, 2444, 2443, 2442, 2441, 2440, 2439, 2438, 2437, 2436, 2435, 2434, 2433, 2432, 2431, 2430, 2429, 2428, 2427, 2426, 2425, 2424, 2423, 2422, 2421, 2420, 2419, 2418, 2417, 2416, 2415, 2414, 2413, 2412, 2411, 2410, 2409, 2408, 2407, 2406, 2405, 2404, 2403, 2402, 2401, 2400, 2399, 2398, 2397, 2396, 2395, 2394, 2393, 2392, 2391, 2390, 2389, 2388, 2387, 2386, 2385, 2384, 2383, 2382, 2381, 2380, 2379, 2378, 2377, 2376, 2375, 2374, 2373, 2372, 2371, 2370, 2369, 2368, 2367, 2366, 2365, 2364, 2363, 2362, 2361, 2360, 2359, 2358, 2357, 2356, 2355, 2354, 2353, 2352, 2351, 2350, 2349, 2348, 2347, 2346, 2345, 2344, 2343, 2342, 2341, 2340, 2339, 2338, 2337, 2336, 2335, 2334, 2333, 2332, 2331, 2330, 2329, 2328, 2327, 2326, 2325, 2324, 2323, 2322, 2321, 2320, 2319, 2318, 2317, 2316, 2315, 2314, 2313, 2312, 2311, 2310, 2309, 2308, 2307, 2306, 2305, 2304, 2303, 2302, 2301, 2300, 2299, 2298, 2297, 2296, 2295, 2294, 2293, 2292, 2291, 2290, 2289, 2288, 2287, 2286, 2285, 2284, 2283, 2282, 2281, 2280, 2279, 2278, 2277, 2276, 2275, 2274, 2273, 2272, 2271, 2270, 2269, 2268, 2267, 2266, 2265, 2264, 2263, 2262, 2261, 2260, 2259, 2258, 2257, 2256, 2255, 2254, 2253, 2252, 2251, 2250, 2249, 2248, 2247, 2246, 2245, 2244, 2243, 2242, 2241, 2240, 2239, 2238, 2237, 2236, 2235, 2234, 2233, 2232, 2231, 2230, 2229, 2228, 2227, 2226, 2225, 2224, 2223, 2222, 2221, 2220, 2219, 2218, 2217, 2216, 2215, 2214, 2213, 2212, 2211, 2210, 2209, 2208, 2207, 2206, 2205, 2204, 2203, 2202, 2201, 2200, 2199, 2198, 2197, 2196, 2195, 2194, 2193, 2192, 2191, 2190, 2189, 2188, 2187, 2186, 2185, 2184, 2183, 2182, 2181, 2180, 2179, 2178, 2177, 2176, 2175, 2174, 2173, 2172, 2171, 2170, 2169, 2168, 2167, 2166, 2165, 2164, 2163, 2162, 2161, 2160, 2159, 2158, 2157, 2156, 2155, 2154, 2153, 2152, 2151, 2150, 2149, 2148, 2147, 2146, 2145, 2144, 2143, 2142, 2141, 2140, 2139, 2138, 2137, 2136, 2135, 2134, 2133, 2132, 2131, 2130, 2129, 2128, 2127, 2126, 2125, 2124, 2123, 2122, 2121, 2120, 2119, 2118, 2117, 2116, 2115, 2114, 2113, 2112, 2111, 2110, 2109, 2108, 2107, 2106, 2105, 2104, 2103, 2102, 2101, 2100, 2099, 2098, 2097, 2096, 2095, 2094, 2093, 2092, 2091, 2090, 2089, 2088, 2087, 2086, 2085, 2084, 2083, 2082, 2081, 2080, 2079, 2078, 2077, 2076, 2075, 2074, 2073, 2072, 2071, 2070, 2069, 2068, 2067, 2066, 2065, 2064, 2063, 2062, 2061, 2060, 2059, 2058, 2057, 2056, 2055, 2054, 2053, 2052, 2051, 2050, 2049, 2048, 2047, 2046, 2045, 2044, 2043, 2042, 2041, 2040, 2039, 2038, 2037, 2036, 2035, 2034, 2033, 2032, 2031, 2030, 2029, 2028, 2027, 2026, 2025, 2024, 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, 1998, 1997, 1996, 1995, 1994, 1993, 1992, 1991, 1990, 1989, 1988, 1987, 1986, 1985, 1984, 1983, 1982, 1981, 1980, 1979, 1978, 1977, 1976, 1975, 1974, 1973, 1972, 1971, 1970, 1969, 1968, 1967, 1966, 1965, 1964, 1963, 1962, 1961, 1960, 1959, 1958, 1957, 1956, 1955, 1954, 1953, 1952, 1951, 1950, 1949, 1948, 1947, 1946, 1945, 1944, 1943, 1942, 1941, 1940, 1939, 1938, 1937, 1936, 1935, 1934, 1933, 1932, 1931, 1930, 1929, 1928, 1927, 1926, 1925, 1924, 1923, 1922, 1921, 1920, 1919, 1918, 1917, 1916, 1915, 1914, 1913, 1912, 1911, 1910, 1909, 1908, 1907, 1906, 1905, 1904, 1903, 1902, 1901, 1900, 1899, 1898, 1897, 1896, 1895, 1894, 1893, 1892, 1891, 1890, 1889, 1888, 1887, 1886, 1885, 1884, 1883, 1882, 1881, 1880, 1879, 1878, 1877, 1876, 1875, 1874, 1873, 1872, 1871, 1870, 1869, 1868, 1867, 1866, 1865, 1864, 1863, 1862, 1861, 1860, 1859, 1858, 1857, 1856, 1855, 1854, 1853, 1852, 1851, 1850, 1849, 1848, 1847, 1846, 1845, 1844, 1843, 1842, 1841, 1840, 1839, 1838, 1837, 1836, 1835, 1834, 1833, 1832, 1831, 1830, 1829, 1828, 1827, 1826, 1825, 1824, 1823, 1822, 1821, 1820, 1819, 1818, 1817, 1816, 1815, 1814, 1813, 1812, 1811, 1810, 1809, 1808, 1807, 1806, 1805, 1804, 1803, 1802, 1801, 1800, 1799, 1798, 1797, 1796, 1795, 1794, 1793, 1792, 1791, 1790, 1789, 1788, 1787, 1786, 1785, 1784, 1783, 1782, 1781, 1780, 1779, 1778, 1777, 1776, 1775, 1774, 1773, 1772, 1771, 1770, 1769, 1768, 1767, 1766, 1765, 1764, 1763, 1762, 1761, 1760, 1759, 1758, 1757, 1756, 1755, 1754, 1753, 1752, 1751, 1750, 1749, 1748, 1747, 1746, 1745, 1744, 1743, 1742, 1741, 1740, 1739, 1738, 1737, 1736, 1735, 1734, 1733, 1732, 1731, 1730, 1729, 1728, 1727, 1726, 1725, 1724, 1723, 1722, 1721, 1720, 1719, 1718, 1717, 1716, 1715, 1714, 1713, 1712, 1711, 1710, 1709, 1708, 1707, 1706, 1705, 1704, 1703, 1702, 1701, 1700, 1699, 1698, 1697, 1696, 1695, 1694, 1693, 1692, 1691, 1690, 1689, 1688, 1687, 1686, 1685, 1684, 1683, 1682, 1681, 1680, 1679, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 1671, 1670, 1669, 1668, 1667, 1666, 1665, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1639, 1638, 1637, 1636, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1619, 1618, 1617, 1616, 1615, 1614, 1613, 1612, 1611, 1610, 1609, 1608, 1607, 1606, 1605, 1604, 1603, 1602, 1601, 1600, 1599, 1598, 1597, 1596, 1595, 1594, 1593, 1592, 1591, 1590, 1589, 1588, 1587, 1586, 1585, 1584, 1583, 1582, 1581, 1580, 1579, 1578, 1577, 1576, 1575, 1574, 1573, 1572, 1571, 1570, 1569, 1568, 1567, 1566, 1565, 1564, 1563, 1562, 1561, 1560, 1559, 1558, 1557, 1556, 1555, 1554, 1553, 1552, 1551, 1550, 1549, 1548, 1547, 1546, 1545, 1544, 1543, 1542, 1541, 1540, 1539, 1538, 1537, 1536, 1535, 1534, 1533, 1532, 1531, 1530, 1529, 1528, 1527, 1526, 1525, 1524, 1523, 1522, 1521, 1520, 1519, 1518, 1517, 1516, 1515, 1514, 1513, 1512, 1511, 1510, 1509, 1508, 1507, 1506, 1505, 1504, 1503, 1502, 1501, 1500, 1499, 1498, 1497, 1496, 1495, 1494, 1493, 1492, 1491, 1490, 1489, 1488, 1487, 1486, 1485, 1484, 1483, 1482, 1481, 1480, 1479, 1478, 1477, 1476, 1475, 1474, 1473, 1472, 1471, 1470, 1469, 1468, 1467, 1466, 1465, 1464, 1463, 1462, 1461, 1460, 1459, 1458, 1457, 1456, 1455, 1454, 1453, 1452, 1451, 1450, 1449, 1448, 1447, 1446, 1445, 1444, 1443, 1442, 1441, 1440, 1439, 1438, 1437, 1436, 1435, 1434, 1433, 1432, 1431, 1430, 1429, 1428, 1427, 1426, 1425, 1424, 1423, 1422, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405, 1404, 1403, 1402, 1401, 1400, 1399, 1398, 1397, 1396, 1395, 1394, 1393, 1392, 1391, 1390, 1389, 1388, 1387, 1386, 1385, 1384, 1383, 1382, 1381, 1380, 1379, 1378, 1377, 1376, 1375, 1374, 1373, 1372, 1371, 1370, 1369, 1368, 1367, 1366, 1365, 1364, 1363, 1362, 1361, 1360, 1359, 1358, 1357, 1356, 1355, 1354, 1353, 1352, 1351, 1350, 1349, 1348, 1347, 1346, 1345, 1344, 1343, 1342, 1341, 1340, 1339, 1338, 1337, 1336, 1335, 1334, 1333, 1332, 1331, 1330, 1329, 1328, 1327, 1326, 1325, 1324, 1323, 1322, 1321, 1320, 1319, 1318, 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1309, 1308, 1307, 1306, 1305, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297, 1296, 1295, 1294, 1293, 1292, 1291, 1290, 1289, 1288, 1287, 1286, 1285, 1284, 1283, 1282, 1281, 1280, 1279, 1278, 1277, 1276, 1275, 1274, 1273, 1272, 1271, 1270, 1269, 1268, 1267, 1266, 1265, 1264, 1263, 1262, 1261, 1260, 1259, 1258, 1257, 1256, 1255, 1254, 1253, 1252, 1251]\n assert candidate(n = 800,k = 400) == [1, 800, 2, 799, 3, 798, 4, 797, 5, 796, 6, 795, 7, 794, 8, 793, 9, 792, 10, 791, 11, 790, 12, 789, 13, 788, 14, 787, 15, 786, 16, 785, 17, 784, 18, 783, 19, 782, 20, 781, 21, 780, 22, 779, 23, 778, 24, 777, 25, 776, 26, 775, 27, 774, 28, 773, 29, 772, 30, 771, 31, 770, 32, 769, 33, 768, 34, 767, 35, 766, 36, 765, 37, 764, 38, 763, 39, 762, 40, 761, 41, 760, 42, 759, 43, 758, 44, 757, 45, 756, 46, 755, 47, 754, 48, 753, 49, 752, 50, 751, 51, 750, 52, 749, 53, 748, 54, 747, 55, 746, 56, 745, 57, 744, 58, 743, 59, 742, 60, 741, 61, 740, 62, 739, 63, 738, 64, 737, 65, 736, 66, 735, 67, 734, 68, 733, 69, 732, 70, 731, 71, 730, 72, 729, 73, 728, 74, 727, 75, 726, 76, 725, 77, 724, 78, 723, 79, 722, 80, 721, 81, 720, 82, 719, 83, 718, 84, 717, 85, 716, 86, 715, 87, 714, 88, 713, 89, 712, 90, 711, 91, 710, 92, 709, 93, 708, 94, 707, 95, 706, 96, 705, 97, 704, 98, 703, 99, 702, 100, 701, 101, 700, 102, 699, 103, 698, 104, 697, 105, 696, 106, 695, 107, 694, 108, 693, 109, 692, 110, 691, 111, 690, 112, 689, 113, 688, 114, 687, 115, 686, 116, 685, 117, 684, 118, 683, 119, 682, 120, 681, 121, 680, 122, 679, 123, 678, 124, 677, 125, 676, 126, 675, 127, 674, 128, 673, 129, 672, 130, 671, 131, 670, 132, 669, 133, 668, 134, 667, 135, 666, 136, 665, 137, 664, 138, 663, 139, 662, 140, 661, 141, 660, 142, 659, 143, 658, 144, 657, 145, 656, 146, 655, 147, 654, 148, 653, 149, 652, 150, 651, 151, 650, 152, 649, 153, 648, 154, 647, 155, 646, 156, 645, 157, 644, 158, 643, 159, 642, 160, 641, 161, 640, 162, 639, 163, 638, 164, 637, 165, 636, 166, 635, 167, 634, 168, 633, 169, 632, 170, 631, 171, 630, 172, 629, 173, 628, 174, 627, 175, 626, 176, 625, 177, 624, 178, 623, 179, 622, 180, 621, 181, 620, 182, 619, 183, 618, 184, 617, 185, 616, 186, 615, 187, 614, 188, 613, 189, 612, 190, 611, 191, 610, 192, 609, 193, 608, 194, 607, 195, 606, 196, 605, 197, 604, 198, 603, 199, 602, 200, 601, 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, 458, 457, 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201]\n assert candidate(n = 50,k = 40) == [1, 50, 2, 49, 3, 48, 4, 47, 5, 46, 6, 45, 7, 44, 8, 43, 9, 42, 10, 41, 11, 40, 12, 39, 13, 38, 14, 37, 15, 36, 16, 35, 17, 34, 18, 33, 19, 32, 20, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21]\n assert candidate(n = 12,k = 6) == [1, 12, 2, 11, 3, 10, 9, 8, 7, 6, 5, 4]\n assert candidate(n = 99,k = 49) == [1, 99, 2, 98, 3, 97, 4, 96, 5, 95, 6, 94, 7, 93, 8, 92, 9, 91, 10, 90, 11, 89, 12, 88, 13, 87, 14, 86, 15, 85, 16, 84, 17, 83, 18, 82, 19, 81, 20, 80, 21, 79, 22, 78, 23, 77, 24, 76, 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]\n assert candidate(n = 20,k = 10) == [1, 20, 2, 19, 3, 18, 4, 17, 5, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6]\n assert candidate(n = 500,k = 250) == [1, 500, 2, 499, 3, 498, 4, 497, 5, 496, 6, 495, 7, 494, 8, 493, 9, 492, 10, 491, 11, 490, 12, 489, 13, 488, 14, 487, 15, 486, 16, 485, 17, 484, 18, 483, 19, 482, 20, 481, 21, 480, 22, 479, 23, 478, 24, 477, 25, 476, 26, 475, 27, 474, 28, 473, 29, 472, 30, 471, 31, 470, 32, 469, 33, 468, 34, 467, 35, 466, 36, 465, 37, 464, 38, 463, 39, 462, 40, 461, 41, 460, 42, 459, 43, 458, 44, 457, 45, 456, 46, 455, 47, 454, 48, 453, 49, 452, 50, 451, 51, 450, 52, 449, 53, 448, 54, 447, 55, 446, 56, 445, 57, 444, 58, 443, 59, 442, 60, 441, 61, 440, 62, 439, 63, 438, 64, 437, 65, 436, 66, 435, 67, 434, 68, 433, 69, 432, 70, 431, 71, 430, 72, 429, 73, 428, 74, 427, 75, 426, 76, 425, 77, 424, 78, 423, 79, 422, 80, 421, 81, 420, 82, 419, 83, 418, 84, 417, 85, 416, 86, 415, 87, 414, 88, 413, 89, 412, 90, 411, 91, 410, 92, 409, 93, 408, 94, 407, 95, 406, 96, 405, 97, 404, 98, 403, 99, 402, 100, 401, 101, 400, 102, 399, 103, 398, 104, 397, 105, 396, 106, 395, 107, 394, 108, 393, 109, 392, 110, 391, 111, 390, 112, 389, 113, 388, 114, 387, 115, 386, 116, 385, 117, 384, 118, 383, 119, 382, 120, 381, 121, 380, 122, 379, 123, 378, 124, 377, 125, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 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]\n assert candidate(n = 50,k = 25) == [1, 50, 2, 49, 3, 48, 4, 47, 5, 46, 6, 45, 7, 44, 8, 43, 9, 42, 10, 41, 11, 40, 12, 39, 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]\n", "comparison": "exact"}, "public_tests": ["3\n1", "3\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().constructArray", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:55:53+00:00", "tests_total": 71, "tests_dropped": 0, "flags": ["multiple_answers"], "topic_tags": ["array", "math"]}, "language": "cpp", "interface": {"raw_signature": "vector constructArray(int n, int k) {", "container": "Solution", "callable": "constructArray", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 668, "task_id": "kth-smallest-number-in-multiplication-table", "difficulty": "Hard", "problem_description": "Nearly everyone has used the Multiplication Table. The multiplication table of size m x n is an integer matrix mat where mat[i][j] == i * j (1-indexed).\n\nGiven three integers m, n, and k, return the k^th smallest element in the m x n multiplication table.\n\nExample 1:\n\nInput: m = 3, n = 3, k = 5\nOutput: 3\nExplanation: The 5^th smallest number is 3.\n\nExample 2:\n\nInput: m = 2, n = 3, k = 6\nOutput: 6\nExplanation: The 6^th smallest number is 6.\n\nConstraints:\n\n- 1 <= m, n <= 3 * 10^4\n- 1 <= k <= m * n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(m = 3,n = 3,k = 5) == 3\n assert candidate(m = 10,n = 10,k = 25) == 10\n assert candidate(m = 5,n = 5,k = 1) == 1\n assert candidate(m = 4,n = 4,k = 10) == 6\n assert candidate(m = 4,n = 4,k = 8) == 4\n assert candidate(m = 30000,n = 30000,k = 10000) == 1358\n assert candidate(m = 2,n = 3,k = 6) == 6\n assert candidate(m = 5,n = 6,k = 15) == 8\n assert candidate(m = 30000,n = 30000,k = 100) == 28\n assert candidate(m = 1,n = 1,k = 1) == 1\n assert candidate(m = 4,n = 4,k = 7) == 4\n assert candidate(m = 1,n = 30000,k = 15000) == 15000\n assert candidate(m = 1000,n = 1,k = 500) == 500\n assert candidate(m = 12345,n = 6789,k = 5000000) == 906384\n assert candidate(m = 12000,n = 12000,k = 71999999) == 26888084\n assert candidate(m = 9999,n = 9999,k = 99980001) == 99980001\n assert candidate(m = 10000,n = 10,k = 5000) == 1709\n assert candidate(m = 10,n = 1,k = 5) == 5\n assert candidate(m = 9999,n = 10000,k = 49995000) == 18671202\n assert candidate(m = 5000,n = 5000,k = 12500000) == 4669497\n assert candidate(m = 10,n = 10000,k = 5000) == 1709\n assert candidate(m = 15000,n = 15000,k = 11250000) == 1961750\n assert candidate(m = 10000,n = 10000,k = 50000000) == 18673076\n assert candidate(m = 8000,n = 8000,k = 39999999) == 17356893\n assert candidate(m = 7,n = 9,k = 45) == 27\n assert candidate(m = 10,n = 15,k = 45) == 18\n assert candidate(m = 25000,n = 25000,k = 6250000) == 821997\n assert candidate(m = 5000,n = 20000,k = 1000000) == 132820\n assert candidate(m = 10000,n = 15000,k = 2000000) == 275724\n assert candidate(m = 10000,n = 10000,k = 99999999) == 99990000\n assert candidate(m = 7,n = 7,k = 49) == 49\n assert candidate(m = 300,n = 100,k = 28000) == 19899\n assert candidate(m = 7500,n = 2500,k = 18749999) == 18747500\n assert candidate(m = 1000,n = 30000,k = 2999900) == 617430\n assert candidate(m = 30000,n = 1,k = 29999) == 29999\n assert candidate(m = 200,n = 100,k = 19900) == 18145\n assert candidate(m = 250,n = 250,k = 12500) == 3210\n assert candidate(m = 1,n = 30000,k = 30000) == 30000\n assert candidate(m = 100,n = 50,k = 2500) == 969\n assert candidate(m = 30000,n = 1000,k = 2999900) == 617430\n assert candidate(m = 20000,n = 25000,k = 4000000) == 509960\n assert candidate(m = 30000,n = 25000,k = 7500000) == 986034\n assert candidate(m = 1,n = 10,k = 5) == 5\n assert candidate(m = 15000,n = 20000,k = 500000) == 53798\n assert candidate(m = 15000,n = 20000,k = 900000) == 102087\n assert candidate(m = 30000,n = 30000,k = 8999999) == 1182788\n assert candidate(m = 3000,n = 1000,k = 2999000) == 2925000\n assert candidate(m = 15000,n = 20000,k = 1500000) == 180253\n assert candidate(m = 8,n = 7,k = 28) == 14\n assert candidate(m = 2500,n = 2500,k = 3125000) == 1167987\n assert candidate(m = 10000,n = 10000,k = 100000000) == 100000000\n assert candidate(m = 30000,n = 1,k = 15000) == 15000\n assert candidate(m = 12345,n = 6789,k = 500000) == 62055\n assert candidate(m = 10000,n = 10000,k = 9999999) == 2047629\n assert candidate(m = 8000,n = 4000,k = 3199999) == 655946\n assert candidate(m = 30000,n = 15000,k = 449999999) == 449985000\n assert candidate(m = 7,n = 11,k = 45) == 24\n assert candidate(m = 15000,n = 15000,k = 5625000) == 858635\n assert candidate(m = 5000,n = 5000,k = 12345678) == 4578057\n assert candidate(m = 15000,n = 25000,k = 500000) == 52647\n assert candidate(m = 10,n = 10,k = 99) == 90\n assert candidate(m = 20000,n = 20000,k = 39999999) == 8185453\n assert candidate(m = 10000,n = 10000,k = 1) == 1\n assert candidate(m = 30,n = 30,k = 400) == 153\n assert candidate(m = 20000,n = 15000,k = 2999999) == 395392\n assert candidate(m = 20,n = 25,k = 400) == 234\n assert candidate(m = 2500,n = 7500,k = 9375000) == 3502712\n assert candidate(m = 5000,n = 5000,k = 1250000) == 218673\n assert candidate(m = 150,n = 200,k = 14999) == 5684\n assert candidate(m = 100,n = 50,k = 2499) == 968\n assert candidate(m = 12345,n = 6789,k = 83245678) == 74281625\n assert candidate(m = 100,n = 200,k = 10000) == 3807\n assert candidate(m = 25000,n = 25000,k = 12500000) == 1833387\n assert candidate(m = 7,n = 8,k = 28) == 14\n assert candidate(m = 7,n = 10,k = 50) == 30\n assert candidate(m = 10,n = 5,k = 20) == 10\n assert candidate(m = 50,n = 75,k = 2000) == 810\n assert candidate(m = 15000,n = 15000,k = 10000000) == 1701960\n assert candidate(m = 1,n = 30000,k = 25000) == 25000\n assert candidate(m = 1,n = 30000,k = 20000) == 20000\n assert candidate(m = 20000,n = 15000,k = 200000000) == 91383084\n assert candidate(m = 3000,n = 2500,k = 7499999) == 7497500\n assert candidate(m = 100,n = 100,k = 4950) == 1887\n assert candidate(m = 15,n = 20,k = 100) == 36\n assert candidate(m = 20000,n = 15000,k = 1000000) == 114741\n assert candidate(m = 15000,n = 15000,k = 1000000) == 118734\n assert candidate(m = 25000,n = 5000,k = 2000000) == 284382\n assert candidate(m = 30000,n = 30000,k = 9000000) == 1182788\n assert candidate(m = 30000,n = 1,k = 30000) == 30000\n assert candidate(m = 15000,n = 20000,k = 2999999) == 395392\n assert candidate(m = 500,n = 500,k = 125000) == 46917\n assert candidate(m = 100,n = 100,k = 5000) == 1917\n assert candidate(m = 100,n = 100,k = 4900) == 1856\n assert candidate(m = 1500,n = 2000,k = 1500000) == 560898\n", "comparison": "exact"}, "public_tests": ["3\n3\n5", "2\n3\n6"], "hints": [], "metadata": {"canonical_parameter_names": ["m", "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:55:55+00:00", "tests_total": 95, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["math", "binary-search"]}, "language": "cpp", "interface": {"raw_signature": "int findKthNumber(int m, int n, int k) {", "container": "Solution", "callable": "findKthNumber", "parameters": [{"name": "m", "type": "int"}, {"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 670, "task_id": "maximum-swap", "difficulty": "Medium", "problem_description": "You are given an integer num. You can swap two digits at most once to get the maximum valued number.\n\nReturn the maximum valued number you can get.\n\nExample 1:\n\nInput: num = 2736\nOutput: 7236\nExplanation: Swap the number 2 and the number 7.\n\nExample 2:\n\nInput: num = 9973\nOutput: 9973\nExplanation: No swap.\n\nConstraints:\n\n- 0 <= num <= 10^8\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 9) == 9\n assert candidate(num = 12) == 21\n assert candidate(num = 21) == 21\n assert candidate(num = 0) == 0\n assert candidate(num = 98368) == 98863\n assert candidate(num = 11111) == 11111\n assert candidate(num = 1111) == 1111\n assert candidate(num = 9973) == 9973\n assert candidate(num = 1993) == 9913\n assert candidate(num = 100) == 100\n assert candidate(num = 2736) == 7236\n assert candidate(num = 33221100) == 33221100\n assert candidate(num = 199983) == 999183\n assert candidate(num = 5639953) == 9639553\n assert candidate(num = 12321) == 32121\n assert candidate(num = 9834321) == 9843321\n assert candidate(num = 199999) == 999991\n assert candidate(num = 4201) == 4210\n assert candidate(num = 32123) == 33122\n assert candidate(num = 333333) == 333333\n assert candidate(num = 22773388) == 82773382\n assert candidate(num = 98765) == 98765\n assert candidate(num = 1119111) == 9111111\n assert candidate(num = 2736589) == 9736582\n assert candidate(num = 109890) == 909810\n assert candidate(num = 34521) == 54321\n assert candidate(num = 33333333) == 33333333\n assert candidate(num = 227368) == 827362\n assert candidate(num = 564999) == 964995\n assert candidate(num = 1000000) == 1000000\n assert candidate(num = 98769876) == 99768876\n assert candidate(num = 100000000) == 100000000\n assert candidate(num = 1999991) == 9999911\n assert candidate(num = 53142) == 54132\n assert candidate(num = 100100) == 110000\n assert candidate(num = 1000) == 1000\n assert candidate(num = 3333333) == 3333333\n assert candidate(num = 3456432) == 6453432\n assert candidate(num = 543210) == 543210\n assert candidate(num = 99999999) == 99999999\n assert candidate(num = 54321) == 54321\n assert candidate(num = 11234321) == 41231321\n assert candidate(num = 333321) == 333321\n assert candidate(num = 9834765) == 9874365\n assert candidate(num = 6789876) == 9786876\n assert candidate(num = 1234321) == 4231321\n assert candidate(num = 63879456) == 93876456\n assert candidate(num = 123321) == 323121\n assert candidate(num = 227362) == 722362\n assert candidate(num = 983210) == 983210\n assert candidate(num = 67899876) == 97896876\n assert candidate(num = 2376) == 7326\n assert candidate(num = 2345321) == 5342321\n assert candidate(num = 892736) == 982736\n assert candidate(num = 983215) == 985213\n assert candidate(num = 3339333) == 9333333\n assert candidate(num = 88988) == 98888\n assert candidate(num = 19932) == 99132\n assert candidate(num = 1000001) == 1100000\n assert candidate(num = 227349) == 927342\n", "comparison": "exact"}, "public_tests": ["2736", "9973"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().maximumSwap", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:00+00:00", "tests_total": 119, "tests_dropped": 59, "flags": [], "topic_tags": ["math", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "int maximumSwap(int num) {", "container": "Solution", "callable": "maximumSwap", "parameters": [{"name": "num", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 672, "task_id": "bulb-switcher-ii", "difficulty": "Medium", "problem_description": "There is a room with n bulbs labeled from 1 to n that all are turned on initially, and four buttons on the wall. Each of the four buttons has a different functionality where:\n\n- Button 1: Flips the status of all the bulbs.\n- Button 2: Flips the status of all the bulbs with even labels (i.e., 2, 4, ...).\n- Button 3: Flips the status of all the bulbs with odd labels (i.e., 1, 3, ...).\n- Button 4: Flips the status of all the bulbs with a label j = 3k + 1 where k = 0, 1, 2, ... (i.e., 1, 4, 7, 10, ...).\n\nYou must make exactly presses button presses in total. For each press, you may pick any of the four buttons to press.\n\nGiven the two integers n and presses, return the number of different possible statuses after performing all presses button presses.\n\nExample 1:\n\nInput: n = 1, presses = 1\nOutput: 2\nExplanation: Status can be:\n- [off] by pressing button 1\n- [on] by pressing button 2\n\nExample 2:\n\nInput: n = 2, presses = 1\nOutput: 3\nExplanation: Status can be:\n- [off, off] by pressing button 1\n- [on, off] by pressing button 2\n- [off, on] by pressing button 3\n\nExample 3:\n\nInput: n = 3, presses = 1\nOutput: 4\nExplanation: Status can be:\n- [off, off, off] by pressing button 1\n- [on, off, on] by pressing button 2\n- [off, on, off] by pressing button 3\n- [off, on, on] by pressing button 4\n\nConstraints:\n\n- 1 <= n <= 1000\n- 0 <= presses <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 1,presses = 1) == 2\n assert candidate(n = 5,presses = 3) == 8\n assert candidate(n = 1000,presses = 1000) == 8\n assert candidate(n = 4,presses = 2) == 7\n assert candidate(n = 2,presses = 1) == 3\n assert candidate(n = 10,presses = 4) == 8\n assert candidate(n = 4,presses = 3) == 8\n assert candidate(n = 100,presses = 0) == 1\n assert candidate(n = 3,presses = 3) == 8\n assert candidate(n = 3,presses = 1) == 4\n assert candidate(n = 4,presses = 1) == 4\n assert candidate(n = 5,presses = 0) == 1\n assert candidate(n = 3,presses = 2) == 7\n assert candidate(n = 10,presses = 5) == 8\n assert candidate(n = 1000,presses = 0) == 1\n assert candidate(n = 2,presses = 2) == 4\n assert candidate(n = 10,presses = 6) == 8\n assert candidate(n = 15,presses = 5) == 8\n assert candidate(n = 100,presses = 10) == 8\n assert candidate(n = 2,presses = 0) == 1\n assert candidate(n = 5,presses = 1) == 4\n assert candidate(n = 15,presses = 6) == 8\n assert candidate(n = 6,presses = 6) == 8\n assert candidate(n = 65,presses = 5) == 8\n assert candidate(n = 10,presses = 2) == 7\n assert candidate(n = 1000,presses = 100) == 8\n assert candidate(n = 8,presses = 3) == 8\n assert candidate(n = 8,presses = 8) == 8\n assert candidate(n = 7,presses = 3) == 8\n assert candidate(n = 100,presses = 5) == 8\n assert candidate(n = 9,presses = 3) == 8\n assert candidate(n = 9,presses = 1) == 4\n assert candidate(n = 60,presses = 8) == 8\n assert candidate(n = 90,presses = 6) == 8\n assert candidate(n = 12,presses = 5) == 8\n assert candidate(n = 10,presses = 3) == 8\n assert candidate(n = 3,presses = 10) == 8\n assert candidate(n = 45,presses = 6) == 8\n assert candidate(n = 1,presses = 10) == 2\n assert candidate(n = 9,presses = 8) == 8\n assert candidate(n = 8,presses = 2) == 7\n assert candidate(n = 3,presses = 5) == 8\n assert candidate(n = 20,presses = 3) == 8\n assert candidate(n = 20,presses = 7) == 8\n assert candidate(n = 6,presses = 2) == 7\n assert candidate(n = 10,presses = 1) == 4\n assert candidate(n = 5,presses = 4) == 8\n assert candidate(n = 4,presses = 4) == 8\n assert candidate(n = 15,presses = 3) == 8\n assert candidate(n = 14,presses = 3) == 8\n assert candidate(n = 60,presses = 6) == 8\n assert candidate(n = 2,presses = 5) == 4\n assert candidate(n = 500,presses = 15) == 8\n assert candidate(n = 1,presses = 0) == 1\n assert candidate(n = 100,presses = 7) == 8\n assert candidate(n = 20,presses = 6) == 8\n assert candidate(n = 6,presses = 1) == 4\n assert candidate(n = 50,presses = 4) == 8\n assert candidate(n = 15,presses = 7) == 8\n assert candidate(n = 25,presses = 10) == 8\n assert candidate(n = 15,presses = 4) == 8\n assert candidate(n = 8,presses = 5) == 8\n assert candidate(n = 5,presses = 5) == 8\n assert candidate(n = 8,presses = 7) == 8\n assert candidate(n = 7,presses = 0) == 1\n assert candidate(n = 20,presses = 0) == 1\n assert candidate(n = 1,presses = 2) == 2\n assert candidate(n = 12,presses = 1) == 4\n assert candidate(n = 7,presses = 6) == 8\n assert candidate(n = 70,presses = 9) == 8\n assert candidate(n = 80,presses = 10) == 8\n assert candidate(n = 7,presses = 5) == 8\n assert candidate(n = 35,presses = 7) == 8\n assert candidate(n = 30,presses = 3) == 8\n assert candidate(n = 50,presses = 5) == 8\n assert candidate(n = 4,presses = 0) == 1\n assert candidate(n = 500,presses = 10) == 8\n assert candidate(n = 7,presses = 2) == 7\n assert candidate(n = 30,presses = 5) == 8\n assert candidate(n = 2,presses = 10) == 4\n assert candidate(n = 40,presses = 3) == 8\n assert candidate(n = 40,presses = 4) == 8\n assert candidate(n = 15,presses = 2) == 7\n assert candidate(n = 12,presses = 9) == 8\n assert candidate(n = 6,presses = 3) == 8\n assert candidate(n = 1000,presses = 1) == 4\n assert candidate(n = 7,presses = 4) == 8\n assert candidate(n = 20,presses = 2) == 7\n assert candidate(n = 20,presses = 4) == 8\n assert candidate(n = 3,presses = 0) == 1\n", "comparison": "exact"}, "public_tests": ["1\n1", "2\n1", "3\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "presses"], "leetcode_dataset_entry_point": "Solution().flipLights", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:04+00:00", "tests_total": 90, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "bit-manipulation", "depth-first-search", "breadth-first-search"]}, "language": "cpp", "interface": {"raw_signature": "int flipLights(int n, int presses) {", "container": "Solution", "callable": "flipLights", "parameters": [{"name": "n", "type": "int"}, {"name": "presses", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 673, "task_id": "number-of-longest-increasing-subsequence", "difficulty": "Medium", "problem_description": "Given an integer array nums, return the number of longest increasing subsequences.\n\nNotice that the sequence has to be strictly increasing.\n\nExample 1:\n\nInput: nums = [1,3,5,4,7]\nOutput: 2\nExplanation: The two longest increasing subsequences are [1, 3, 4, 7] and [1, 3, 5, 7].\n\nExample 2:\n\nInput: nums = [2,2,2,2,2]\nOutput: 5\nExplanation: The length of the longest increasing subsequence is 1, and there are 5 increasing subsequences of length 1, so output 5.\n\nConstraints:\n\n- 1 <= nums.length <= 2000\n- -10^6 <= nums[i] <= 10^6\n- The answer is guaranteed to fit inside a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == 5\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7]) == 7\n assert candidate(nums = [1, 2, 4, 3, 5, 4, 7, 2]) == 3\n assert candidate(nums = [1, 2]) == 1\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 10, 12]) == 1\n assert candidate(nums = [0, 1, 0, 3, 2, 3]) == 1\n assert candidate(nums = [1, 3, 5, 4, 7]) == 2\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == 4\n assert candidate(nums = [2, 1]) == 2\n assert candidate(nums = [2, 2, 2, 2, 2]) == 5\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 = [2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]) == 256\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]) == 1\n assert candidate(nums = [20, 20, 20, 20, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 25\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14]) == 729\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9]) == 1093\n assert candidate(nums = [4, 10, 4, 3, 8, 9, 3, 4, 2, 6, 5, 3, 7, 2, 9, 8, 10, 3, 5, 7, 1, 9, 8, 4, 6, 10]) == 4\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 = [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, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2]) == 26\n assert candidate(nums = [3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]) == 1\n assert candidate(nums = [1, 3, 5, 4, 7, 11, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 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]) == 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]) == 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]) == 66\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]) == 50\n assert candidate(nums = [1, 3, 5, 4, 7, 10, 9, 8, 7, 6, 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, 26, 27, 28, 29, 30]) == 1\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 5\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10]) == 8\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 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]) == 1\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 81\n assert candidate(nums = [3, 2, 1, 5, 6, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 3\n assert candidate(nums = [3, 5, 10, 25, 50, 2, 45, 51, 26, 76, 90, 100, 101]) == 2\n assert candidate(nums = [19, 11, 13, 15, 14, 12, 10, 18, 16, 17, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [5, 7, 8, 10, 12, 2, 4, 6, 9, 11, 3, 5, 7]) == 4\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 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]) == 220\n assert candidate(nums = [3, 5, 7, 2, 5, 3, 5, 7, 9, 10]) == 1\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6]) == 1024\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]) == 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, 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]) == 231\n assert candidate(nums = [7, 7, 7, 7, 1, 1, 1, 2, 2, 2, 3, 3, 3]) == 27\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, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 380\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\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 100, 200, 300]) == 2\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 10, 12, 14, 16, 18, 20, 15, 17, 19, 21]) == 4\n assert candidate(nums = [4, 3, 5, 4, 7, 9, 8, 10, 12, 11, 13, 14]) == 12\n assert candidate(nums = [18, 55, 66, 2, 3, 54, 6, 5, 7, 99, 23, 45, 67, 89, 12, 34, 56, 78, 90]) == 10\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, 19, 18, 17, 16]) == 85\n assert candidate(nums = [3, 1, 2, 4, 10, 1, 12, 2, 5, 4, 5, 5, 5, 5, 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]) == 1\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 5, 6, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13]) == 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\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]) == 30\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 10\n assert candidate(nums = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99989, 99988, 99987, 99986, 99985, 99984, 99983, 99982, 99981]) == 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 82\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 6\n assert candidate(nums = [15, 27, 14, 33, 27, 18, 26, 30, 19, 10, 10, 28, 33, 17, 23, 21, 18, 22, 30, 29]) == 4\n assert candidate(nums = [5, 1, 4, 2, 3, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 45\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 36\n assert candidate(nums = [100, 90, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 11\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 300\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7]) == 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]) == 11\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12]) == 10\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]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9, 7, 8, 9, 10, 11, 9, 10, 11, 12, 13]) == 209\n assert candidate(nums = [3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12]) == 2\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 9\n assert candidate(nums = [2, 1, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2]) == 39\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 45\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 12, 11, 12]) == 81\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 = [3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12]) == 2\n assert candidate(nums = [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]) == 1953125\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 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]) == 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]) == 1\n assert candidate(nums = [1, 4, 3, 5, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 2\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, 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\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]) == 120\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [1, 2, 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, 26, 27, 28, 29, 30]) == 3\n assert candidate(nums = [4, 10, 4, 3, 8, 9]) == 3\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 15\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 = [4, 10, 4, 3, 8, 9]) == 3\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1]) == 2\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 20\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 3000\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]) == 21\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 9\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(nums = [5, 14, 3, 5, 8, 7, 9, 4, 11, 13, 2, 15, 1, 17]) == 2\n assert candidate(nums = [10, 20, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180]) == 3\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]) == 55\n assert candidate(nums = [3, 1, 2, 4, 3, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 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, 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, 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", "comparison": "exact"}, "public_tests": ["[1,3,5,4,7]", "[2,2,2,2,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findNumberOfLIS", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:07+00:00", "tests_total": 109, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "binary-indexed-tree", "segment-tree", "longest-increasing-subsequence"]}, "language": "cpp", "interface": {"raw_signature": "int findNumberOfLIS(vector& nums) {", "container": "Solution", "callable": "findNumberOfLIS", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 674, "task_id": "longest-continuous-increasing-subsequence", "difficulty": "Easy", "problem_description": "Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be strictly increasing.\n\nA continuous increasing subsequence is defined by two indices l and r (l < r) such that it is [nums[l], nums[l + 1], ..., nums[r - 1], nums[r]] and for each l <= i < r, nums[i] < nums[i + 1].\n\nExample 1:\n\nInput: nums = [1,3,5,4,7]\nOutput: 3\nExplanation: The longest continuous increasing subsequence is [1,3,5] with length 3.\nEven though [1,3,5,7] is an increasing subsequence, it is not continuous as elements 5 and 7 are separated by element\n4.\n\nExample 2:\n\nInput: nums = [2,2,2,2,2]\nOutput: 1\nExplanation: The longest continuous increasing subsequence is [2] with length 1. Note that it must be strictly\nincreasing.\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 = [1, 3, 5, 7, 9, 11, 13, 15]) == 8\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 4, 5, 6, 7, 8, 12]) == 6\n assert candidate(nums = [0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6]) == 7\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == 3\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6]) == 2\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7]) == 1\n assert candidate(nums = [1, 2, 2]) == 2\n assert candidate(nums = [1, 3, 5, 4, 7]) == 3\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6, 7]) == 4\n assert candidate(nums = [1, 2, 0, 3, 4, 5, 6, 7]) == 6\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 10\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6]) == 4\n assert candidate(nums = [1, 3, 2, 2, 3, 4, 5, 4, 3, 2, 1]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 4, 5, 6, 7, 8]) == 6\n assert candidate(nums = [1, 2, 0, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [-1, 3, 2, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [0, 1, 2, 3, -1, -2, -1, 0, 1, 2]) == 5\n assert candidate(nums = [0, 1, 0, 3, 2, 3]) == 2\n assert candidate(nums = [1, 2, 2, 3, 4, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3]) == 6\n assert candidate(nums = [1, 2, 0, 4, 5, 3, 6, 7]) == 3\n assert candidate(nums = [2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 8]) == 8\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3]) == 5\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\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 = [-10, 0, 10, 20, 30, 40, 50, 60, 70, 80]) == 10\n assert candidate(nums = [2, 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, 11, 12]) == 12\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 = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == 1\n assert candidate(nums = [1, 3, 5, 4, 7, 9, 11, 13, 12, 15, 17, 19, 21, 20, 22]) == 5\n assert candidate(nums = [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, 1]) == 1\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == 3\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8]) == 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]) == 20\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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 20\n assert candidate(nums = [1, 2, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10]) == 2\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 = [1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 6\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]) == 10\n assert candidate(nums = [73, 74, 75, 71, 69, 72, 76, 73]) == 3\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]) == 1\n assert candidate(nums = [23, 11, 56, 57, 58, 23, 24, 25, 26, 27, 28]) == 6\n assert candidate(nums = [1, 3, 5, 4, 7, 8, 9, 10, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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, 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, 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(nums = [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 = [1, 2]) == 2\n assert candidate(nums = [5, 7, 7, 8, 8, 9, 10, 9, 10, 11, 12, 13, 14]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17]) == 6\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 9\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 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, 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, 2, 2, 2, 2, 2, 2, 2, 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]) == 2\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(nums = [1, 2, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8, 9, 10, 9, 10, 11, 12]) == 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]) == 25\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 40\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15]) == 4\n assert candidate(nums = [100, 4, 200, 1, 3, 2, 150, 151, 152, 153]) == 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]) == 20\n assert candidate(nums = [-1, -2, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 9\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 12\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 2\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 1\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12]) == 3\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4]) == 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]) == 30\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2]) == 7\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 10\n assert candidate(nums = [1, 3, 2, 3, 4, 5, 4, 6, 7, 8, 7, 9, 10]) == 4\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 12\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9]) == 6\n assert candidate(nums = [100, 98, 96, 94, 92, 90, 88, 86, 84, 82, 80, 78, 76, 74, 72]) == 1\n assert candidate(nums = [3, 3, 3, 1, 2, 3, 4, 5, 6, 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 = [10, 9, 2, 5, 3, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8]) == 4\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6]) == 6\n assert candidate(nums = [1, 2, 3, 2, 3, 4, 5, 6, 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]) == 34\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, 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(nums = [3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 9\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 2\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]) == 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]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 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, 1, 2, 3, 4, 5]) == 20\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 13\n assert candidate(nums = [1, 3, 5, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 15\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 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 2\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 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 20\n assert candidate(nums = [100, 98, 96, 97, 95, 93, 94, 92, 90, 91, 89, 87, 88, 86, 84, 85, 83, 82, 81]) == 2\n assert candidate(nums = [3, 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]) == 1\n assert candidate(nums = [1, 11, 2, 10, 4, 5, 2, 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, 19, 18, 17, 16, 15]) == 20\n assert candidate(nums = [5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 4, 3, 4, 5, 6, 7, 8, 7, 8, 9, 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, 1, 2, 3, 4, 5, 6, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 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]) == 25\n assert candidate(nums = [4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000]) == 2\n assert candidate(nums = [5, 4, 3, 2, 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 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == 3\n", "comparison": "exact"}, "public_tests": ["[1,3,5,4,7]", "[2,2,2,2,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findLengthOfLCIS", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:09+00:00", "tests_total": 134, "tests_dropped": 2, "flags": [], "topic_tags": ["array"]}, "language": "cpp", "interface": {"raw_signature": "int findLengthOfLCIS(vector& nums) {", "container": "Solution", "callable": "findLengthOfLCIS", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 675, "task_id": "cut-off-trees-for-golf-event", "difficulty": "Hard", "problem_description": "You are asked to cut off all the trees in a forest for a golf event. The forest is represented as an m x n matrix. In this matrix:\n\n- 0 means the cell cannot be walked through.\n- 1 represents an empty cell that can be walked through.\n- A number greater than 1 represents a tree in a cell that can be walked through, and this number is the tree's height.\n\nIn one step, you can walk in any of the four directions: north, east, south, and west. If you are standing in a cell with a tree, you can choose whether to cut it off.\n\nYou must cut off the trees in order from shortest to tallest. When you cut off a tree, the value at its cell becomes 1 (an empty cell).\n\nStarting from the point (0, 0), return the minimum steps you need to walk to cut off all the trees. If you cannot cut off all the trees, return -1.\n\nNote: The input is generated such that no two trees have the same height, and there is at least one tree needs to be cut off.\n\nExample 1:\n\nInput: forest = [[1,2,3],[0,0,4],[7,6,5]]\nOutput: 6\nExplanation: Following the path above allows you to cut off the trees from shortest to tallest in 6 steps.\n\nExample 2:\n\nInput: forest = [[1,2,3],[0,0,0],[7,6,5]]\nOutput: -1\nExplanation: The trees in the bottom row cannot be accessed as the middle row is blocked.\n\nExample 3:\n\nInput: forest = [[2,3,4],[0,0,5],[8,7,6]]\nOutput: 6\nExplanation: You can follow the same path as Example 1 to cut off all the trees.\nNote that you can cut off the first tree at (0, 0) before making any steps.\n\nConstraints:\n\n- m == forest.length\n- n == forest[i].length\n- 1 <= m, n <= 50\n- 0 <= forest[i][j] <= 10^9\n- Heights of all trees are distinct.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(forest = [[1, 2, 3, 4], [0, 0, 0, 0], [5, 6, 7, 8], [9, 10, 11, 12]]) == -1\n assert candidate(forest = [[1, 1, 1, 1], [1, 0, 1, 1], [1, 1, 1, 1]]) == 0\n assert candidate(forest = [[1, 2, 3], [0, 0, 4], [7, 6, 5]]) == 6\n assert candidate(forest = [[3, 0, 0], [1, 0, 0], [2, 0, 0]]) == 4\n assert candidate(forest = [[1, 1, 0], [0, 0, 0], [2, 0, 0]]) == -1\n assert candidate(forest = [[1, 0, 0], [0, 0, 0], [0, 0, 2]]) == -1\n assert candidate(forest = [[2, 3, 4], [0, 0, 5], [8, 7, 6]]) == 6\n assert candidate(forest = [[1, 2, 3], [0, 0, 0], [7, 6, 5]]) == -1\n assert candidate(forest = [[1, 1, 1], [1, 0, 1], [1, 1, 2]]) == 4\n assert candidate(forest = [[4, 2, 3], [0, 0, 5], [8, 7, 6]]) == 10\n assert candidate(forest = [[1, 2], [3, 4]]) == 4\n assert candidate(forest = [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[1, 0, 0, 0, 0], [1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1], [1, 0, 0, 0, 0]]) == 0\n assert candidate(forest = [[1, 0, 0, 0, 0], [1, 1, 1, 1, 0], [0, 0, 0, 1, 0], [0, 0, 0, 1, 2]]) == 7\n assert candidate(forest = [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 2, 1]]) == 5\n assert candidate(forest = [[1, 1], [2, 0]]) == 1\n assert candidate(forest = [[1, 0, 0, 0, 0], [1, 1, 1, 1, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 9]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5], [0, 6, 0, 0, 7], [8, 0, 0, 0, 9], [0, 0, 0, 0, 0], [10, 11, 12, 13, 14]]) == -1\n assert candidate(forest = [[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], [2, 3, 4, 5, 6, 7, 8, 9, 10]]) == -1\n assert candidate(forest = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 3]]) == -1\n assert candidate(forest = [[1, 2, 0, 0, 3], [0, 0, 0, 0, 0], [0, 0, 4, 0, 0], [0, 0, 0, 0, 0], [5, 6, 0, 7, 8]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [1, 0, 2, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1]]) == 4\n assert candidate(forest = [[5, 4, 3, 2, 1], [0, 0, 0, 0, 0], [6, 7, 8, 9, 10], [0, 0, 0, 0, 0], [11, 12, 13, 14, 15]]) == -1\n assert candidate(forest = [[10, 1, 3, 0, 5], [9, 0, 0, 0, 4], [8, 6, 7, 0, 2], [0, 0, 0, 0, 0], [1, 0, 0, 0, 3]]) == -1\n assert candidate(forest = [[1, 3, 0, 0, 5], [0, 6, 7, 8, 0], [0, 0, 0, 0, 0], [9, 10, 11, 12, 4]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [0, 0, 0, 0, 0, 0], [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(forest = [[5, 4, 3, 2, 1], [0, 0, 0, 0, 0], [1, 2, 3, 4, 5], [0, 0, 0, 0, 0], [6, 7, 8, 9, 10]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 2, 3, 0, 1], [1, 0, 4, 5, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 6, 7, 8, 1]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [17, 18, 19, 20, 21, 22, 23, 24]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 40\n assert candidate(forest = [[1, 0, 0, 0, 0, 0, 0, 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, 3], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 4]]) == -1\n assert candidate(forest = [[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, 2, 0, 3, 0, 4], [0, 0, 5, 0, 6, 7], [8, 9, 0, 0, 0, 0]]) == -1\n assert candidate(forest = [[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, 2, 3, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 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]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 0, 1, 1], [1, 1, 0, 1, 0, 1, 1], [0, 1, 0, 1, 0, 1, 0], [1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[1, 2, 0, 4, 5], [0, 0, 0, 0, 0], [6, 7, 8, 9, 10], [0, 0, 0, 0, 0], [11, 12, 13, 14, 15]]) == -1\n assert candidate(forest = [[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], [2, 3, 4, 5, 6, 7, 8]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[1, 3, 0, 5], [2, 0, 0, 0], [6, 7, 8, 0], [0, 9, 10, 4]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1], [0, 2, 0, 3, 0], [1, 0, 4, 0, 5], [0, 6, 0, 7, 0], [1, 0, 0, 0, 8]]) == -1\n assert candidate(forest = [[1, 0, 0, 0, 2, 0], [0, 0, 0, 0, 0, 0], [3, 4, 0, 0, 5, 0], [0, 0, 0, 0, 0, 0], [6, 7, 0, 0, 8, 0], [0, 0, 9, 10, 0, 11]]) == -1\n assert candidate(forest = [[3, 0, 1], [0, 0, 0], [2, 0, 5]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 0, 0], [0, 0, 0, 0, 0], [14, 15, 16, 17, 18]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [0, 0, 0, 0, 0, 0], [7, 8, 9, 10, 11, 12], [13, 0, 0, 0, 0, 0], [14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25]]) == -1\n assert candidate(forest = [[1, 2, 3, 0, 0, 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], [0, 0, 0, 0, 0, 5]]) == -1\n assert candidate(forest = [[5, 0, 3, 0, 1], [4, 0, 0, 0, 0], [6, 0, 7, 0, 0], [0, 0, 0, 0, 0], [8, 0, 9, 0, 2]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 0, 0, 1, 0, 0, 1], [1, 0, 0, 0, 1, 0, 0, 1, 0, 1], [1, 0, 0, 0, 0, 1, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 1, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[5, 0, 0, 3], [1, 0, 0, 0], [0, 2, 0, 0], [4, 0, 0, 6]]) == -1\n assert candidate(forest = [[10, 11, 12, 13], [0, 0, 0, 0], [9, 8, 7, 6], [5, 4, 3, 2]]) == -1\n assert candidate(forest = [[3, 0, 1, 4, 5], [0, 0, 0, 0, 0], [1, 0, 2, 0, 0], [0, 0, 0, 0, 0], [7, 6, 0, 8, 9]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]) == 5\n assert candidate(forest = [[1, 2, 0, 3, 4], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) == -1\n assert candidate(forest = [[1, 2, 0, 0, 3], [0, 0, 0, 0, 0], [4, 5, 6, 7, 8], [9, 10, 11, 12, 13], [14, 15, 16, 17, 18]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7], [0, 0, 0, 0, 0, 0, 0], [0, 0, 8, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [9, 10, 11, 12, 13, 14, 15]]) == -1\n assert candidate(forest = [[1, 2, 3, 0, 0, 6], [0, 0, 0, 0, 0, 0], [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(forest = [[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, 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, 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]]) == 0\n assert candidate(forest = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[10, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 2]]) == -1\n assert candidate(forest = [[2, 1, 3, 4, 5], [0, 0, 0, 0, 0], [10, 9, 8, 7, 6], [0, 11, 12, 13, 14], [15, 16, 17, 18, 19]]) == -1\n assert candidate(forest = [[1, 2, 0, 0], [0, 3, 0, 4], [5, 6, 7, 8], [9, 0, 0, 10]]) == 22\n assert candidate(forest = [[9, 8, 7], [6, 5, 4], [3, 2, 1]]) == 14\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 0, 0, 0], [0, 0, 0, 0, 0, 0], [16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27]]) == -1\n assert candidate(forest = [[1, 2, 0, 4, 5], [0, 0, 0, 0, 0], [6, 7, 0, 8, 9], [0, 0, 0, 0, 0], [10, 11, 12, 13, 14]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 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], [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, 2]]) == -1\n assert candidate(forest = [[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, 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, 3]]) == -1\n assert candidate(forest = [[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], [2, 3, 4, 5, 6, 7, 8, 9]]) == -1\n assert candidate(forest = [[1, 1, 0, 0, 0], [0, 2, 0, 3, 0], [0, 0, 4, 0, 0], [0, 5, 0, 6, 0], [0, 0, 0, 7, 8]]) == -1\n assert candidate(forest = [[1, 2, 1, 1, 1, 1], [1, 0, 1, 0, 1, 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, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 3]]) == 14\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 24, 25, 26, 27, 28, 29, 30, 31]]) == -1\n assert candidate(forest = [[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], [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\n assert candidate(forest = [[2, 3, 0, 4, 5], [0, 0, 0, 0, 0], [1, 6, 7, 8, 9], [0, 0, 0, 0, 0], [10, 11, 12, 13, 14]]) == -1\n assert candidate(forest = [[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, 9]]) == -1\n assert candidate(forest = [[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, 0], [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\n assert candidate(forest = [[1, 2, 0, 4], [1, 0, 0, 0], [3, 6, 7, 8], [0, 0, 0, 9]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1], [0, 0, 0, 0, 1], [1, 0, 0, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 9]]) == 8\n assert candidate(forest = [[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, 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]]) == 0\n assert candidate(forest = [[1, 2, 3, 4, 5, 6], [7, 0, 0, 0, 0, 0], [0, 8, 9, 10, 0, 0], [0, 0, 0, 0, 0, 0], [11, 12, 13, 0, 0, 0], [0, 0, 14, 15, 16, 17]]) == -1\n assert candidate(forest = [[1, 2, 0, 0, 3, 4], [5, 0, 0, 0, 0, 6], [7, 8, 0, 0, 0, 9], [0, 0, 10, 11, 0, 0], [12, 13, 0, 0, 14, 15], [16, 17, 18, 19, 0, 20]]) == -1\n assert candidate(forest = [[5, 4, 3, 2, 1], [0, 0, 0, 0, 0], [10, 9, 8, 7, 6], [15, 0, 0, 0, 11], [14, 13, 12, 0, 0]]) == -1\n assert candidate(forest = [[5, 1, 3, 2, 4], [0, 0, 0, 0, 0], [8, 6, 7, 9, 10]]) == -1\n assert candidate(forest = [[5, 1, 2, 3, 4], [0, 9, 10, 11, 0], [8, 7, 6, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 18\n assert candidate(forest = [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 2]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [6, 7, 8, 9, 10]]) == -1\n assert candidate(forest = [[5, 4, 3, 2, 1], [10, 9, 8, 7, 6], [1, 0, 0, 0, 0], [2, 0, 0, 0, 3], [4, 0, 0, 0, 5]]) == -1\n assert candidate(forest = [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(forest = [[3, 2, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 4, 5, 6], [0, 0, 7, 8, 9], [10, 11, 12, 13, 14]]) == -1\n assert candidate(forest = [[10, 1, 3, 12, 11], [0, 0, 0, 0, 0], [5, 4, 0, 0, 6], [0, 0, 0, 0, 0], [8, 9, 7, 13, 2]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7, 8], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24]]) == -1\n assert candidate(forest = [[2, 1, 0, 0, 5], [0, 0, 3, 0, 0], [0, 6, 0, 4, 0], [7, 0, 0, 0, 8]]) == -1\n assert candidate(forest = [[5, 1, 0, 0, 8], [0, 0, 0, 0, 0], [0, 2, 0, 3, 0], [0, 0, 4, 0, 0], [0, 0, 0, 0, 6], [0, 0, 0, 7, 0]]) == -1\n assert candidate(forest = [[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, 2, 0, 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]]) == -1\n assert candidate(forest = [[1, 3, 1, 0, 5], [1, 0, 1, 0, 1], [1, 0, 1, 0, 1], [1, 0, 1, 0, 1], [1, 0, 1, 0, 1]]) == -1\n assert candidate(forest = [[1, 2, 3, 0, 4, 5, 6, 0, 7, 8], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [9, 10, 11, 12, 13, 14, 15, 16, 17, 18], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [19, 20, 21, 22, 23, 24, 25, 26, 27, 28], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [29, 30, 31, 32, 33, 34, 35, 36, 37, 38]]) == -1\n assert candidate(forest = [[2, 3, 0, 4], [1, 0, 0, 5], [8, 7, 6, 0], [0, 9, 10, 11]]) == -1\n assert candidate(forest = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [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]]) == -1\n assert candidate(forest = [[1, 2, 3, 0, 0], [0, 0, 0, 0, 0], [4, 5, 6, 0, 0], [0, 0, 0, 0, 0], [7, 8, 9, 10, 11]]) == -1\n assert candidate(forest = [[1, 10, 3, 4, 5], [0, 9, 0, 0, 0], [6, 8, 7, 0, 1], [2, 0, 0, 0, 0], [11, 12, 13, 14, 15]]) == 32\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[0,0,4],[7,6,5]]", "[[1,2,3],[0,0,0],[7,6,5]]", "[[2,3,4],[0,0,5],[8,7,6]]"], "hints": [], "metadata": {"canonical_parameter_names": ["forest"], "leetcode_dataset_entry_point": "Solution().cutOffTree", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:11+00:00", "tests_total": 99, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "breadth-first-search", "heap-priority-queue", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "int cutOffTree(vector>& forest) {", "container": "Solution", "callable": "cutOffTree", "parameters": [{"name": "forest", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 678, "task_id": "valid-parenthesis-string", "difficulty": "Medium", "problem_description": "Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid.\n\nThe following rules define a valid string:\n\n- Any left parenthesis '(' must have a corresponding right parenthesis ')'.\n- Any right parenthesis ')' must have a corresponding left parenthesis '('.\n- Left parenthesis '(' must go before the corresponding right parenthesis ')'.\n- '*' could be treated as a single right parenthesis ')' or a single left parenthesis '(' or an empty string \"\".\n\nExample 1:\n\nInput: s = \"()\"\nOutput: true\n\nExample 2:\n\nInput: s = \"(*)\"\nOutput: true\n\nExample 3:\n\nInput: s = \"(*))\"\nOutput: true\n\nExample 4:\n\nInput: s = \"(\"\nOutput: false\n\nConstraints:\n\n- 1 <= s.length <= 100\n- s[i] is '(', ')' or '*'.\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 = \"****\") == 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 = \"(***)\") == 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 = \"(*(*(*(*(*(*(*)))))****)\") == 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 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 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 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 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 = \"(()))(**(\") == 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 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 backtracking to explore all possible combinations of treating '*' as either '(', ')', or an empty string. If any combination leads to a valid string, return true.", "DP[i][j] represents whether the substring s[i:j] is valid.", "Keep track of the count of open parentheses encountered so far. If you encounter a close parenthesis, it should balance with an open parenthesis. Utilize a stack to handle this effectively.", "How about using 2 stacks instead of 1? Think about it."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().checkValidString", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:13+00:00", "tests_total": 181, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming", "stack", "greedy", "bracket-sequences"]}, "language": "cpp", "interface": {"raw_signature": "bool checkValidString(string s) {", "container": "Solution", "callable": "checkValidString", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 679, "task_id": "24-game", "difficulty": "Hard", "problem_description": "You are given an integer array cards of length 4. You have four cards, each containing a number in the range [1, 9]. You should arrange the numbers on these cards in a mathematical expression using the operators ['+', '-', '*', '/'] and the parentheses '(' and ')' to get the value 24.\n\nYou are restricted with the following rules:\n\n- The division operator '/' represents real division, not integer division.\n - For example, 4 / (1 - 2 / 3) = 4 / (1 / 3) = 12.\n- Every operation done is between two numbers. In particular, we cannot use '-' as a unary operator.\n - For example, if cards = [1, 1, 1, 1], the expression \"-1 - 1 - 1 - 1\" is not allowed.\n- You cannot concatenate numbers together\n - For example, if cards = [1, 2, 1, 2], the expression \"12 + 12\" is not valid.\n\nReturn true if you can get such expression that evaluates to 24, and false otherwise.\n\nExample 1:\n\nInput: cards = [4,1,8,7]\nOutput: true\nExplanation: (8-4) * (7-1) = 24\n\nExample 2:\n\nInput: cards = [1,2,1,2]\nOutput: false\n\nConstraints:\n\n- cards.length == 4\n- 1 <= cards[i] <= 9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(cards = [9, 9, 9, 9]) == False\n assert candidate(cards = [2, 8, 1, 4]) == True\n assert candidate(cards = [4, 4, 7, 7]) == True\n assert candidate(cards = [1, 3, 4, 6]) == True\n assert candidate(cards = [9, 5, 5, 1]) == True\n assert candidate(cards = [2, 3, 6, 9]) == True\n assert candidate(cards = [1, 1, 7, 7]) == False\n assert candidate(cards = [7, 3, 7, 2]) == True\n assert candidate(cards = [8, 1, 6, 3]) == True\n assert candidate(cards = [4, 1, 8, 7]) == True\n assert candidate(cards = [2, 2, 2, 2]) == False\n assert candidate(cards = [7, 7, 8, 9]) == False\n assert candidate(cards = [1, 2, 1, 2]) == False\n assert candidate(cards = [9, 5, 5, 6]) == False\n assert candidate(cards = [7, 3, 4, 7]) == True\n assert candidate(cards = [6, 6, 6, 6]) == True\n assert candidate(cards = [2, 3, 6, 6]) == True\n assert candidate(cards = [1, 5, 9, 1]) == False\n assert candidate(cards = [1, 1, 1, 1]) == False\n assert candidate(cards = [5, 5, 5, 5]) == True\n assert candidate(cards = [3, 3, 8, 8]) == True\n assert candidate(cards = [9, 5, 3, 2]) == True\n assert candidate(cards = [7, 8, 9, 1]) == True\n assert candidate(cards = [6, 1, 9, 4]) == True\n assert candidate(cards = [7, 2, 4, 6]) == True\n assert candidate(cards = [1, 2, 7, 7]) == True\n assert candidate(cards = [8, 3, 8, 3]) == True\n assert candidate(cards = [4, 6, 6, 6]) == True\n assert candidate(cards = [7, 8, 9, 6]) == True\n assert candidate(cards = [5, 5, 1, 9]) == True\n assert candidate(cards = [9, 7, 2, 5]) == True\n assert candidate(cards = [4, 6, 7, 1]) == True\n assert candidate(cards = [8, 1, 3, 4]) == True\n assert candidate(cards = [5, 3, 8, 1]) == True\n assert candidate(cards = [1, 2, 6, 7]) == True\n assert candidate(cards = [5, 3, 2, 7]) == True\n assert candidate(cards = [8, 5, 3, 1]) == True\n assert candidate(cards = [7, 9, 3, 1]) == True\n assert candidate(cards = [9, 2, 4, 5]) == True\n assert candidate(cards = [9, 5, 6, 3]) == True\n assert candidate(cards = [6, 4, 3, 2]) == True\n assert candidate(cards = [9, 1, 7, 3]) == True\n assert candidate(cards = [9, 1, 9, 1]) == False\n assert candidate(cards = [9, 7, 9, 7]) == False\n assert candidate(cards = [2, 7, 8, 1]) == True\n assert candidate(cards = [8, 8, 4, 4]) == True\n assert candidate(cards = [1, 9, 8, 7]) == True\n assert candidate(cards = [1, 6, 7, 8]) == False\n assert candidate(cards = [6, 6, 2, 4]) == True\n assert candidate(cards = [7, 2, 3, 4]) == True\n assert candidate(cards = [2, 8, 4, 1]) == True\n assert candidate(cards = [6, 6, 1, 9]) == True\n assert candidate(cards = [4, 4, 2, 2]) == True\n assert candidate(cards = [5, 5, 1, 1]) == True\n assert candidate(cards = [3, 9, 7, 2]) == True\n assert candidate(cards = [2, 8, 3, 7]) == True\n assert candidate(cards = [6, 5, 4, 3]) == True\n assert candidate(cards = [4, 7, 1, 6]) == True\n assert candidate(cards = [9, 7, 5, 3]) == True\n assert candidate(cards = [5, 5, 1, 5]) == True\n assert candidate(cards = [7, 3, 9, 2]) == True\n assert candidate(cards = [8, 1, 6, 3]) == True\n assert candidate(cards = [7, 8, 6, 2]) == True\n assert candidate(cards = [3, 3, 8, 8]) == True\n assert candidate(cards = [6, 7, 1, 3]) == True\n assert candidate(cards = [6, 7, 8, 9]) == True\n assert candidate(cards = [1, 6, 6, 6]) == True\n assert candidate(cards = [7, 7, 7, 7]) == False\n assert candidate(cards = [4, 4, 2, 8]) == True\n assert candidate(cards = [5, 5, 3, 5]) == False\n assert candidate(cards = [9, 7, 3, 2]) == True\n assert candidate(cards = [9, 5, 2, 7]) == True\n assert candidate(cards = [2, 8, 7, 9]) == True\n assert candidate(cards = [2, 3, 6, 1]) == True\n assert candidate(cards = [4, 9, 1, 8]) == True\n assert candidate(cards = [1, 9, 9, 1]) == False\n assert candidate(cards = [9, 3, 5, 7]) == True\n assert candidate(cards = [5, 3, 3, 9]) == True\n assert candidate(cards = [4, 6, 6, 2]) == True\n assert candidate(cards = [7, 7, 2, 2]) == True\n assert candidate(cards = [9, 9, 1, 1]) == False\n assert candidate(cards = [5, 7, 8, 2]) == True\n assert candidate(cards = [6, 1, 1, 1]) == False\n assert candidate(cards = [7, 5, 5, 2]) == True\n assert candidate(cards = [4, 4, 2, 9]) == True\n assert candidate(cards = [1, 2, 3, 4]) == True\n assert candidate(cards = [9, 5, 6, 1]) == True\n assert candidate(cards = [1, 2, 3, 6]) == True\n assert candidate(cards = [3, 9, 2, 6]) == True\n assert candidate(cards = [3, 6, 9, 2]) == True\n assert candidate(cards = [6, 1, 2, 6]) == True\n assert candidate(cards = [9, 5, 9, 5]) == True\n assert candidate(cards = [9, 7, 6, 9]) == True\n assert candidate(cards = [2, 3, 5, 7]) == True\n assert candidate(cards = [2, 9, 1, 6]) == True\n assert candidate(cards = [8, 8, 8, 1]) == True\n assert candidate(cards = [5, 5, 6, 6]) == True\n assert candidate(cards = [4, 5, 6, 7]) == True\n assert candidate(cards = [1, 3, 4, 6]) == True\n assert candidate(cards = [5, 5, 5, 1]) == True\n assert candidate(cards = [6, 3, 2, 9]) == True\n assert candidate(cards = [2, 3, 5, 7]) == True\n assert candidate(cards = [8, 1, 3, 7]) == True\n assert candidate(cards = [6, 1, 5, 1]) == True\n", "comparison": "exact"}, "public_tests": ["[4,1,8,7]", "[1,2,1,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["cards"], "leetcode_dataset_entry_point": "Solution().judgePoint24", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:15+00:00", "tests_total": 109, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "math", "backtracking"]}, "language": "cpp", "interface": {"raw_signature": "bool judgePoint24(vector& cards) {", "container": "Solution", "callable": "judgePoint24", "parameters": [{"name": "cards", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 680, "task_id": "valid-palindrome-ii", "difficulty": "Easy", "problem_description": "Given a string s, return true if the s can be palindrome after deleting at most one character from it.\n\nExample 1:\n\nInput: s = \"aba\"\nOutput: true\n\nExample 2:\n\nInput: s = \"abca\"\nOutput: true\nExplanation: You could delete the character 'c'.\n\nExample 3:\n\nInput: s = \"abc\"\nOutput: false\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 = \"raceecar\") == True\n assert candidate(s = \"abcba\") == True\n assert candidate(s = \"deeee\") == True\n assert candidate(s = \"ab\") == True\n assert candidate(s = \"abc\") == False\n assert candidate(s = \"racecarx\") == True\n assert candidate(s = \"abca\") == True\n assert candidate(s = \"abcdedcba\") == True\n assert candidate(s = \"abcdefgihgfedcba\") == True\n assert candidate(s = \"abcdefdba\") == False\n assert candidate(s = \"aabaa\") == True\n assert candidate(s = \"racecar\") == True\n assert candidate(s = \"a\") == True\n assert candidate(s = \"abcdefg\") == False\n assert candidate(s = \"aba\") == True\n assert candidate(s = \"aabbbbaaabbb\") == False\n assert candidate(s = \"abcdefghijklnkjihgfedcba\") == True\n assert candidate(s = \"abcdefghikjlmnopqrstuvutsrqponmlkjihgfedcba\") == False\n assert candidate(s = \"aabbaa\") == True\n assert candidate(s = \"noonappa\") == False\n assert candidate(s = \"zxcvbnmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == False\n assert candidate(s = \"abcdexyzzyxedcba\") == True\n assert candidate(s = \"aaaabbbbccccddddcccccccddddbbbbbbaaaaa\") == False\n assert candidate(s = \"aabbcccbbbaa\") == True\n assert candidate(s = \"flgfgldad\") == False\n assert candidate(s = \"tattarrattat\") == True\n assert candidate(s = \"aabbccddeeeedcba\") == False\n assert candidate(s = \"aabbacdfgfddcabbaa\") == True\n assert candidate(s = \"zzzzzzzzzz\") == True\n assert candidate(s = \"aabbccddeeeffgggghhhiiiijjjjkkoollmmnnnnooppqqrrsstttuuuvvvvwwxxyyyzzzzyyyyxwvvvvuuutttsrrrqpnoonmlkkkiiihhhhggggfffeeedddccbbaa\") == False\n assert candidate(s = \"aabbccddeeeffgggihhii\") == False\n assert candidate(s = \"qwertyuiopoiuytrewq\") == True\n assert candidate(s = \"zxcvbnmasdfghjklqwertyuiopasdfghjklzxcvbnm\") == False\n assert candidate(s = \"aabbccddeeffgghhiaahhgffeeddccbbaa\") == False\n assert candidate(s = \"abcdefghihgfeddcba\") == True\n assert candidate(s = \"abcdabc\") == False\n assert candidate(s = \"aabbcddcbbbaa\") == True\n assert candidate(s = \"aabbbbbaaabbbb\") == False\n assert candidate(s = \"aabbaabbaa\") == True\n assert candidate(s = \"aabcaaba\") == False\n assert candidate(s = \"aabbccddeeffgghhijjihhgffeeddccbbaa\") == True\n assert candidate(s = \"aguokepatgbnvfqmgmlcupuufxoohdfpgjdmysgvhmvffcnqxjjxqncffvmhvgsymdjgpfdhooxfuupucmlmgqfvnbgtapekouga\") == False\n assert candidate(s = \"abcdcba\") == True\n assert candidate(s = \"abcdexyzxedcba\") == True\n assert candidate(s = \"aabbccddee\") == False\n assert candidate(s = \"abbaabbaabbaabba\") == True\n assert candidate(s = \"racecarwitharacecarinitt\") == False\n assert candidate(s = \"racecarxracecar\") == True\n assert candidate(s = \"aabbacdfgdcabbaa\") == True\n assert candidate(s = \"abbaaaabba\") == True\n assert candidate(s = \"aabbccddeedccbbaa\") == True\n assert candidate(s = \"aabbccddeeeffgggghhhhiiiijjjjkkkkllmmnnnnooppqqrrsstttuuuvvvvvwwxxyyyzzzzzzzyyyyxwvvvvuuutttsrrrqpnoonmlkkkiiihhhhggggfffeeedddccbbaa\") == False\n assert candidate(s = \"abcaabcba\") == True\n assert candidate(s = \"raceacar\") == True\n assert candidate(s = \"noon\") == True\n assert candidate(s = \"abcdeffedcba\") == True\n assert candidate(s = \"level\") == True\n assert candidate(s = \"aabbbbbbbaaabbbbbb\") == False\n assert candidate(s = \"aaaaabbaaaaa\") == True\n assert candidate(s = \"abcdefghhgfedcba\") == True\n assert candidate(s = \"aabbccddeeeffggghhiiii\") == False\n assert candidate(s = \"ababababababa\") == True\n assert candidate(s = \"zxcvbnmasdfghjklqwertyuiopplkjhgfdsazxcvbnm\") == False\n assert candidate(s = \"abcdefghijkjihgfedcba\") == True\n assert candidate(s = \"aabbccddeedcba\") == False\n assert candidate(s = \"aabbccddeeefffggg\") == False\n assert candidate(s = \"levelwithoneleveldropped\") == False\n assert candidate(s = \"noonwithanothernoon\") == False\n assert candidate(s = \"abzcdedcba\") == True\n assert candidate(s = \"acbbbca\") == True\n assert candidate(s = \"lcupuufxoohdfpgjdmysgvhmvffcnqxjjxqncffvmhvgsymdjgpfdhooxfuupuc\") == True\n assert candidate(s = \"abcbad\") == True\n assert candidate(s = \"abcdefghijkmlkjihgfedcba\") == True\n assert candidate(s = \"abcdexyzzyxdecba\") == False\n assert candidate(s = \"abccba\") == True\n assert candidate(s = \"abcdxzyxcba\") == False\n assert candidate(s = \"madamimadam\") == True\n assert candidate(s = \"aabbabba\") == True\n assert candidate(s = \"abcdefghihgfedcbai\") == True\n assert candidate(s = \"amanaplanacanalpanama\") == True\n assert candidate(s = \"aabbccddeedccbaa\") == False\n assert candidate(s = \"aebcbda\") == False\n assert candidate(s = \"deified\") == True\n assert candidate(s = \"repaper\") == True\n assert candidate(s = \"eedede\") == True\n assert candidate(s = \"abcdeffgedcba\") == True\n assert candidate(s = \"acbbcdcba\") == False\n assert candidate(s = \"aabbaaabbaa\") == True\n assert candidate(s = \"abcdefghijkllkjihgfedcba\") == True\n assert candidate(s = \"abacdfgdcaba\") == True\n assert candidate(s = \"abcdefghijklmnopqrrponmlkjihgfedcba\") == True\n assert candidate(s = \"abacdfgdfcba\") == False\n assert candidate(s = \"aabbccdddccbaa\") == True\n assert candidate(s = \"abcddcba\") == True\n assert candidate(s = \"aaaaabaaa\") == True\n assert candidate(s = \"rotor\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz\") == False\n assert candidate(s = \"abcdefghihgfedcba\") == True\n assert candidate(s = \"aguokepatgbnvfqmgmlcupuufxoohdfpgjdmysgvhmvffcnqxjjxqncffvmhvgsymdjgpfdhooxfuupucmlgqfvnbgtapekouga\") == False\n assert candidate(s = \"detartratedwithanotherdetartrated\") == False\n assert candidate(s = \"aabbccddeeffggahhigghhffeeddccbbaa\") == False\n assert candidate(s = \"zzazz\") == True\n assert candidate(s = \"rotorwithatinyrotor\") == False\n assert candidate(s = \"mississippi\") == False\n assert candidate(s = \"abcdefghihgfedcbaj\") == True\n assert candidate(s = \"ebcbbececabbacecbbcbe\") == True\n assert candidate(s = \"acbbba\") == True\n", "comparison": "exact"}, "public_tests": ["\"aba\"", "\"abca\"", "\"abc\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().validPalindrome", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:17+00:00", "tests_total": 108, "tests_dropped": 1, "flags": [], "topic_tags": ["two-pointers", "string", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "bool validPalindrome(string s) {", "container": "Solution", "callable": "validPalindrome", "parameters": [{"name": "s", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 682, "task_id": "baseball-game", "difficulty": "Easy", "problem_description": "You are keeping the scores for a baseball game with strange rules. At the beginning of the game, you start with an empty record.\n\nYou are given a list of strings operations, where operations[i] is the i^th operation you must apply to the record and is one of the following:\n\n- An integer x.\n - Record a new score of x.\n- '+'.\n - Record a new score that is the sum of the previous two scores.\n- 'D'.\n - Record a new score that is the double of the previous score.\n- 'C'.\n - Invalidate the previous score, removing it from the record.\n\nReturn the sum of all the scores on the record after applying all the operations.\n\nThe test cases are generated such that the answer and all intermediate calculations fit in a 32-bit integer and that all operations are valid.\n\nExample 1:\n\nInput: ops = [\"5\",\"2\",\"C\",\"D\",\"+\"]\nOutput: 30\nExplanation:\n\"5\" - Add 5 to the record, record is now [5].\n\"2\" - Add 2 to the record, record is now [5, 2].\n\"C\" - Invalidate and remove the previous score, record is now [5].\n\"D\" - Add 2 * 5 = 10 to the record, record is now [5, 10].\n\"+\" - Add 5 + 10 = 15 to the record, record is now [5, 10, 15].\nThe total sum is 5 + 10 + 15 = 30.\n\nExample 2:\n\nInput: ops = [\"5\",\"-2\",\"4\",\"C\",\"D\",\"9\",\"+\",\"+\"]\nOutput: 27\nExplanation:\n\"5\" - Add 5 to the record, record is now [5].\n\"-2\" - Add -2 to the record, record is now [5, -2].\n\"4\" - Add 4 to the record, record is now [5, -2, 4].\n\"C\" - Invalidate and remove the previous score, record is now [5, -2].\n\"D\" - Add 2 * -2 = -4 to the record, record is now [5, -2, -4].\n\"9\" - Add 9 to the record, record is now [5, -2, -4, 9].\n\"+\" - Add -4 + 9 = 5 to the record, record is now [5, -2, -4, 9, 5].\n\"+\" - Add 9 + 5 = 14 to the record, record is now [5, -2, -4, 9, 5, 14].\nThe total sum is 5 + -2 + -4 + 9 + 5 + 14 = 27.\n\nExample 3:\n\nInput: ops = [\"1\",\"C\"]\nOutput: 0\nExplanation:\n\"1\" - Add 1 to the record, record is now [1].\n\"C\" - Invalidate and remove the previous score, record is now [].\nSince the record is empty, the total sum is 0.\n\nConstraints:\n\n- 1 <= operations.length <= 1000\n- operations[i] is \"C\", \"D\", \"+\", or a string representing an integer in the range [-3 * 10^4, 3 * 10^4].\n- For operation \"+\", there will always be at least two previous scores on the record.\n- For operations \"C\" and \"D\", there will always be at least one previous score on the record.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(operations = ['3', 'D', '+', '2', 'C', '+', '+', 'C', 'C', 'C']) == 9\n assert candidate(operations = ['10', '20', '30', 'D', '+']) == 210\n assert candidate(operations = ['3', '6', '+', 'D', 'C', '3', 'D', '+', '-2', 'D', '9', '+']) == 44\n assert candidate(operations = ['10', '20', '+', 'D', 'C', '5', 'D', '+']) == 90\n assert candidate(operations = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']) == 55\n assert candidate(operations = ['-1', '-2', '-3', 'C', 'D', '+', '-4', '-5', '+', '-6']) == -37\n assert candidate(operations = ['3', '8', '+', 'D', 'C', '2']) == 24\n assert candidate(operations = ['5', '-2', '4', 'C', 'D', '9', '+', '+']) == 27\n assert candidate(operations = ['10', 'D', 'D', '+', 'C', 'D', 'C', 'D', 'C', '+']) == 130\n assert candidate(operations = ['3', 'D', 'C', 'D', 'C', '10']) == 13\n assert candidate(operations = ['5', '2', 'C', 'D', '+']) == 30\n assert candidate(operations = ['1', 'D', 'C', '1', 'D', 'C', '1', 'D', 'C', '1']) == 4\n assert candidate(operations = ['10', '20', 'D', '+', 'C', '+', 'D', '+', '-10', 'C', '100']) == 530\n assert candidate(operations = ['10', 'D', '+', '5', 'C', 'D']) == 120\n assert candidate(operations = ['100', '200', '300', 'C', 'D', '+', 'C', '+', 'D', '+']) == 4300\n assert candidate(operations = ['100', '-50', 'D', 'C', '+']) == 100\n assert candidate(operations = ['1', 'C']) == 0\n assert candidate(operations = ['10000', '-10000', 'D', 'D', '+', 'C', 'D', '+', 'C', 'D']) == -300000\n assert candidate(operations = ['1000', '500', '250', 'D', 'C', 'D', 'C', '+', 'D', 'C', 'D', 'C', '+', 'D', 'C', 'D', 'C', '+', 'D', 'C', 'D', 'C', '+', 'D', 'C', 'D', 'C', '+', 'D', 'C', 'D', 'C']) == 12500\n assert candidate(operations = ['-1', '-2', '3', 'D', '+', 'C', 'D', '+']) == 36\n assert candidate(operations = ['1', 'C', '2', 'C', '3', 'C', '4', 'C', '5', 'C', '6', 'C', '7', 'C', '8', 'C', '9', 'C', '10', 'C', '11', 'C', '12', 'C', '13', 'C', '14', 'C', '15', 'C', '16', 'C', '17', 'C', '18', 'C', '19', 'C', '20', 'C']) == 0\n assert candidate(operations = ['50000', '-50000', '+', 'D', 'C', '25000', 'D', '+', '+', '-25000', 'D', '+']) == 125000\n assert candidate(operations = ['5', '-2', '4', 'C', 'D', '9', '+', '+', 'C', 'D', '+', 'C', 'D', '+']) == 73\n assert candidate(operations = ['30', '-10', 'C', 'D', 'D', '+', '+', '5', 'C', '+']) == 1170\n assert candidate(operations = ['-10', '-20', '+', 'C', '-30', 'D', '+', '-40', '+', 'D', 'C', 'C', '50', 'D', '+', '+']) == 300\n assert candidate(operations = ['1', 'D', 'D', 'D', 'C', 'C', 'C', 'D', 'D', 'D', '100', '200', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '1', '2', '3', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+']) == 74401\n assert candidate(operations = ['5', '10', 'C', '20', 'D', '+', '30', 'C', '40', 'D', '+', '50']) == 415\n assert candidate(operations = ['100', '-100', 'D', 'D', '+', 'C', '+', 'D', 'C', '+']) == -2200\n assert candidate(operations = ['1', '2', '3', '4', '5', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D']) == 130\n assert candidate(operations = ['100', '50', '25', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', '-1', 'C', '-2', 'C', '-3', 'C', '-4', 'C', '-5', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 82575490\n assert candidate(operations = ['5', 'C', '10', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 550\n assert candidate(operations = ['5', 'C', '5', 'D', '+', 'C', 'D', '5', 'D', '+', 'C', 'D', '5', 'D', '+', 'C', 'D', '+']) == 135\n assert candidate(operations = ['10', 'C', '20', 'C', '30', 'C', '40', 'D', '+', 'C', '+', 'D', '+']) == 840\n assert candidate(operations = ['-32768', '32767', 'D', 'D', '+', 'C', 'D', '+', '-32768', '32767', 'D', 'D', '+', 'C', 'D', '+', '-32768', '32767', 'D', 'D', '+', 'C', 'D', '+']) == 2555823\n assert candidate(operations = ['3', '6', '+', 'D', 'C', '2', 'D', '+', '+', '-3', 'D', '+']) == 22\n assert candidate(operations = ['10', '-10', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == -73400300\n assert candidate(operations = ['1', '2', '3', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D', '+', '+', 'C', 'D']) == 16401\n assert candidate(operations = ['10', '20', '30', '40', '50', 'C', 'D', '+', '60', '70', '80', '90', '100', 'C', 'D', '+', '110', '120', '130', '140', 'C', 'D', '+', '150']) == 2210\n assert candidate(operations = ['1', '2', 'C', '2', 'D', '+', 'D', '+', 'C', '+', 'D', 'C', 'D', '+', 'C', '+', 'D', 'C', 'D', '+', 'C', '+', 'D', 'C', 'D', '+', 'C', '+', 'D']) == 2185\n assert candidate(operations = ['1', '2', '3', '+', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 2241\n assert candidate(operations = ['1', '2', 'C', 'D', '+', '100', '-100', 'C', 'D', '+']) == 606\n assert candidate(operations = ['100', '-50', 'D', '+', 'C', '25', 'D', '+', '150', 'C', '-200', 'D', '+']) == -1100\n assert candidate(operations = ['3', '-3', '5', '-5', 'D', 'C', '+', 'D', 'C', 'C', 'C']) == 5\n assert candidate(operations = ['1', '2', '3', 'C', 'D', '+', '4', '5', '6', 'C', 'D', '+', '7', '8', '9', 'C', 'D', '+', '10']) == 112\n assert candidate(operations = ['3', '6', '+', 'C', 'D', '12', '+', '-10', 'D', '+', '5', 'C', '+', '20']) == -33\n assert candidate(operations = ['-1', '-2', '-3', '-4', '-5', 'C', 'D', '+', '-6', '-7', '-8', '-9', '-10', 'C', 'D', '+', '-11', '-12', '-13', '-14', 'C', 'D', '+', '-15']) == -221\n assert candidate(operations = ['1', '2', '3', '+', 'D', 'C', '4', '5', '+', '6', 'D', 'C', '7', '8', '+', '9', 'D', 'C', '10', '11', '+', '12', 'D', 'C', '13', '14', '+', '15', 'D', 'C', '16', '17', '+', '18', 'D', 'C', '19', '20', '+', '21', 'D', 'C', '22', '23', '+', '24', 'D', 'C', '25', '26', '+', '27', 'D', 'C', '28', '29', '+', '30', 'D', 'C', '+', '-50']) == 804\n assert candidate(operations = ['3', '6', 'D', '+', '-2', 'D', 'C', '+', '5', 'D', '+']) == 83\n assert candidate(operations = ['1', '2', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 55\n assert candidate(operations = ['100', 'C', '-100', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == -183500700\n assert candidate(operations = ['100', '200', '+', 'D', 'C', '100', 'D', '+', '+', 'C', '100', 'D', '+', '+', 'C', '100', 'D', '+']) == 2400\n assert candidate(operations = ['-100', 'C', '-50', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == -2750\n assert candidate(operations = ['100', '-50', 'D', 'C', 'D', '+', '20', '-20', 'C', '+', 'D', 'C', '1000', 'D', 'C', '+', '-500', '+', 'D', '+']) == 3280\n assert candidate(operations = ['5', '2', 'C', 'D', '+', '3', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 1371\n assert candidate(operations = ['3', '-1', '-1', 'C', '2', 'D', '5', '+', '10', 'C', 'D', '+', '-5']) == 62\n assert candidate(operations = ['-1', '-2', '+', 'D', 'C', '-3', 'D', '+', '+', 'C', '-4', 'D', '+', '+', 'C', '-5', 'D', '+']) == -78\n assert candidate(operations = ['100', '200', 'C', 'D', '+', 'C', 'D', '+', '1000', '-1000', 'C', 'D', '+']) == 7300\n assert candidate(operations = ['1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C', '1', 'C']) == 0\n assert candidate(operations = ['-1', '-2', 'C', '-3', 'D', '+', '-4', 'C', '-5', 'D', '+', '-6']) == -55\n assert candidate(operations = ['3', '-1', '-4', 'D', '+', 'C', 'D', '+', '-5', 'D', 'C', '+']) == -84\n assert candidate(operations = ['1', 'C', '1', 'D', '+', -1, 'D', 'C', '+', 'D', '+', 'C', 'D', '+', '-10', 'C', '100', 'D', '+', 'C']) == 331\n assert candidate(operations = ['-5', 'D', '-10', '+', 'C', 'D', '+', '5', 'D', 'C', '+']) == -95\n assert candidate(operations = ['5', '2', '3', 'D', '+', 'C', '5', 'D', '+', '-5', 'C', '10', 'D', 'C', '+', '-10', 'D', '+', '-20', '+', '-30', 'D', 'C', '+', '-40', '+', '-50', 'D', 'C', '+']) == -539\n assert candidate(operations = ['10', '20', '+', '30', '+', 'C', '40', 'D', '+', '50', '+', '60', '+', 'C', '70', 'D', '+', '80', '+', '90']) == 1490\n assert candidate(operations = ['100', '50', 'D', '+', '-25', 'C', '75', 'D', '+', '25', 'C', '+', 'D']) == 1975\n assert candidate(operations = ['1', '2', '3', '4', '5', 'C', 'D', '+', '6', '7', '8', '9', '10', 'C', 'D', '+', '11', '12', '13', '14', 'C', 'D', '+', '15']) == 221\n assert candidate(operations = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '+', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 2164\n assert candidate(operations = ['100', '50', '+', 'C', 'D', '20', 'D', '+', '10', 'C', '+']) == 470\n assert candidate(operations = ['1', '2', '3', '4', '5', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+', 'C', 'D', '+']) == 1794\n assert candidate(operations = ['10', '-10', 'D', '+', 'D', 'C', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C', 'D', '+', 'D', 'C', 'C', 'C']) == -20\n assert candidate(operations = ['1', 'C', '2', 'D', 'C', '3', 'D', 'C', '4', 'D', 'C', '5', 'D', 'C', '6', 'D', 'C', '7', 'D', '+']) == 62\n assert candidate(operations = ['5', '10', 'D', '+', 'C', '5', 'D', 'C', '+', '-5', 'D', '+']) == 35\n assert candidate(operations = ['1', 'D', '2', 'D', '3', 'D', '+', '+', '+', 'C', 'C', 'C']) == 18\n", "comparison": "exact"}, "public_tests": ["[\"5\",\"2\",\"C\",\"D\",\"+\"]", "[\"5\",\"-2\",\"4\",\"C\",\"D\",\"9\",\"+\",\"+\"]", "[\"1\",\"C\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["operations"], "leetcode_dataset_entry_point": "Solution().calPoints", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:22+00:00", "tests_total": 76, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "stack", "simulation"]}, "language": "cpp", "interface": {"raw_signature": "int calPoints(vector& operations) {", "container": "Solution", "callable": "calPoints", "parameters": [{"name": "operations", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 684, "task_id": "redundant-connection", "difficulty": "Medium", "problem_description": "In this problem, a tree is an undirected graph that is connected and has no cycles.\n\nYou are given a graph that started as a tree with n nodes labeled from 1 to n, with one additional edge added. The added edge has two different vertices chosen from 1 to n, and was not an edge that already existed. The graph is represented as an array edges of length n where edges[i] = [a_i, b_i] indicates that there is an edge between nodes a_i and b_i in the graph.\n\nReturn an edge that can be removed so that the resulting graph is a tree of n nodes. If there are multiple answers, return the answer that occurs last in the input.\n\nExample 1:\n\nInput: edges = [[1,2],[1,3],[2,3]]\nOutput: [2,3]\n\nExample 2:\n\nInput: edges = [[1,2],[2,3],[3,4],[1,4],[1,5]]\nOutput: [1,4]\n\nConstraints:\n\n- n == edges.length\n- 3 <= n <= 1000\n- edges[i].length == 2\n- 1 <= a_i < b_i <= edges.length\n- a_i != b_i\n- There are no repeated edges.\n- The given graph is connected.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(edges = [[3, 4], [1, 2], [2, 4], [3, 5], [2, 5]]) == [2, 5]\n assert candidate(edges = [[1, 2], [2, 3], [1, 3]]) == [1, 3]\n assert candidate(edges = [[1, 4], [3, 4], [1, 3], [1, 2], [4, 5]]) == [1, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 3]]) == [2, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 5], [4, 5]]) == [4, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [1, 4], [1, 5]]) == [1, 4]\n assert candidate(edges = [[1, 2], [2, 3], [1, 3], [4, 5], [5, 6], [4, 6]]) == [1, 3]\n assert candidate(edges = [[1, 3], [3, 4], [1, 5], [3, 5], [2, 4]]) == [3, 5]\n assert candidate(edges = [[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], [8, 9], [10, 11], [12, 13], [14, 15], [1, 8]]) == [8, 9]\n assert candidate(edges = [[1, 2], [1, 3], [1, 4], [2, 4], [2, 5], [3, 5], [4, 6], [5, 6]]) == [2, 4]\n assert candidate(edges = [[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, 20]]) == [1, 20]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [5, 7]]) == [1, 10]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [5, 10]]) == [1, 10]\n assert candidate(edges = [[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], [8, 9], [10, 11], [12, 13], [14, 15], [9, 15], [1, 15], [2, 6], [3, 8], [4, 10], [5, 12], [6, 14], [7, 15]]) == [8, 9]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [4, 5], [5, 6]]) == [4, 5]\n assert candidate(edges = [[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], [8, 16], [8, 17], [9, 18], [9, 19], [10, 20], [10, 21], [11, 22], [11, 23], [12, 24], [12, 25], [13, 26], [13, 27], [14, 28], [14, 29], [15, 30], [15, 31], [16, 17], [18, 19], [20, 21], [22, 23], [24, 25], [26, 27], [28, 29], [30, 31]]) == [16, 17]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 4], [3, 5], [4, 5]]) == [3, 4]\n assert candidate(edges = [[1, 2], [1, 3], [1, 4], [1, 5], [2, 3], [2, 4], [2, 5], [3, 4], [3, 5], [4, 5], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]]) == [2, 3]\n assert candidate(edges = [[1, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 10]]) == [5, 10]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [5, 7]]) == [5, 7]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 5]]) == [1, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [1, 4], [2, 4], [1, 3]]) == [1, 4]\n assert candidate(edges = [[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], [8, 9], [10, 11], [12, 13], [14, 15], [9, 15], [1, 15]]) == [8, 9]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 10]]) == [9, 10]\n assert candidate(edges = [[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(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [1, 11], [1, 3], [4, 7]]) == [1, 11]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [4, 6], [7, 9]]) == [1, 10]\n assert candidate(edges = [[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], [1, 51], [1, 52], [1, 53], [1, 54], [1, 55], [1, 56], [1, 57], [1, 58], [1, 59], [1, 60], [1, 61], [1, 62], [1, 63], [1, 64], [1, 65], [1, 66], [1, 67], [1, 68], [1, 69], [1, 70], [1, 71], [1, 72], [1, 73], [1, 74], [1, 75], [1, 76], [1, 77], [1, 78], [1, 79], [1, 80], [1, 81], [1, 82], [1, 83], [1, 84], [1, 85], [1, 86], [1, 87], [1, 88], [1, 89], [1, 90], [1, 91], [1, 92], [1, 93], [1, 94], [1, 95], [1, 96], [1, 97], [1, 98], [1, 99], [1, 100], [2, 100]]) == [2, 100]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [2, 4], [3, 5], [6, 8], [7, 9]]) == [1, 10]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [2, 5]]) == [1, 10]\n assert candidate(edges = [[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], [8, 9], [10, 11], [12, 13], [14, 15], [1, 15]]) == [8, 9]\n assert candidate(edges = [[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], [8, 9], [10, 11], [12, 13], [14, 15], [9, 15]]) == [8, 9]\n", "comparison": "exact"}, "public_tests": ["[[1,2],[1,3],[2,3]]", "[[1,2],[2,3],[3,4],[1,4],[1,5]]"], "hints": [], "metadata": {"canonical_parameter_names": ["edges"], "leetcode_dataset_entry_point": "Solution().findRedundantConnection", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:26+00:00", "tests_total": 76, "tests_dropped": 44, "flags": ["multiple_answers", "has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "union-find", "graph"]}, "language": "cpp", "interface": {"raw_signature": "vector findRedundantConnection(vector>& edges) {", "container": "Solution", "callable": "findRedundantConnection", "parameters": [{"name": "edges", "type": "vector>&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 685, "task_id": "redundant-connection-ii", "difficulty": "Hard", "problem_description": "In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, except for the root node which has no parents.\n\nThe given input is a directed graph that started as a rooted tree with n nodes (with distinct values from 1 to n), with one additional directed edge added. The added edge has two different vertices chosen from 1 to n, and was not an edge that already existed.\n\nThe resulting graph is given as a 2D-array of edges. Each element of edges is a pair [u_i, v_i] that represents a directed edge connecting nodes u_i and v_i, where u_i is a parent of child v_i.\n\nReturn an edge that can be removed so that the resulting graph is a rooted tree of n nodes. If there are multiple answers, return the answer that occurs last in the given 2D-array.\n\nExample 1:\n\nInput: edges = [[1,2],[1,3],[2,3]]\nOutput: [2,3]\n\nExample 2:\n\nInput: edges = [[1,2],[2,3],[3,4],[4,1],[1,5]]\nOutput: [4,1]\n\nConstraints:\n\n- n == edges.length\n- 3 <= n <= 1000\n- edges[i].length == 2\n- 1 <= u_i, v_i <= n\n- u_i != v_i\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(edges = [[3, 1], [4, 1], [5, 2], [3, 2], [3, 5]]) == [3, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 1]]) == [3, 1]\n assert candidate(edges = [[3, 1], [4, 1], [5, 2], [3, 5], [4, 2]]) == [4, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 1], [4, 3]]) == [2, 3]\n assert candidate(edges = [[2, 1], [3, 1], [1, 4], [4, 3]]) == [3, 1]\n assert candidate(edges = [[1, 2], [1, 3], [2, 3]]) == [2, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 2], [1, 5], [5, 2]]) == [4, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 1], [1, 4]]) == [3, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 2]]) == [3, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 1], [1, 5]]) == [4, 1]\n assert candidate(edges = [[2, 1], [3, 1], [4, 2], [1, 4]]) == [2, 1]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 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], [16, 21], [17, 22], [18, 23], [19, 24], [20, 25], [21, 26], [22, 27], [23, 28], [24, 29], [25, 30], [30, 1]]) == [30, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 3]]) == [12, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 4]]) == [12, 4]\n assert candidate(edges = [[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, 8]]) == [14, 8]\n assert candidate(edges = [[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, 1]]) == [15, 1]\n assert candidate(edges = [[3, 1], [4, 1], [5, 1], [3, 2], [3, 4], [3, 5]]) == [3, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [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]]) == [5, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 1], [1, 3], [2, 5], [3, 6]]) == [2, 3]\n assert candidate(edges = [[10, 1], [1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [2, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [3, 6]]) == [5, 1]\n assert candidate(edges = [[5, 1], [1, 2], [2, 3], [3, 4], [4, 1], [1, 5]]) == [5, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 4]]) == [10, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 4], [7, 1]]) == [6, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3], [3, 6], [6, 7]]) == [5, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1]]) == [10, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 1], [2, 4]]) == [3, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 6]]) == [11, 6]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 1]]) == [2, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [1, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 11]]) == [1, 11]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3], [1, 6]]) == [5, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3]]) == [5, 3]\n assert candidate(edges = [[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, 10]]) == [25, 10]\n assert candidate(edges = [[5, 2], [1, 5], [4, 1], [3, 5], [4, 3]]) == [3, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 1], [1, 3]]) == [2, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 1]]) == [9, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 3]]) == [9, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 5], [1, 5]]) == [10, 5]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 1], [12, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 5], [1, 9]]) == [8, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [1, 5]]) == [4, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 5], [5, 4], [4, 2], [1, 4]]) == [1, 2]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 1], [1, 8], [8, 9], [9, 10], [10, 7]]) == [6, 7]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 1]]) == [11, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [1, 3]]) == [2, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 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], [16, 21], [17, 22], [18, 23], [19, 24], [20, 25], [21, 26], [22, 27], [23, 28], [24, 29], [25, 30], [30, 15]]) == [30, 15]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 3]]) == [11, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 7], [7, 1]]) == [2, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 3], [2, 4]]) == [2, 3]\n assert candidate(edges = [[5, 3], [1, 5], [2, 3], [4, 1], [5, 2], [4, 5]]) == [5, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [1, 3], [2, 5]]) == [2, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 2]]) == [6, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 2]]) == [10, 2]\n assert candidate(edges = [[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, 7]]) == [13, 7]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3], [1, 6], [6, 7]]) == [5, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 4]]) == [3, 4]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [6, 8], [7, 8], [8, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 7], [7, 3]]) == [1, 3]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 5]]) == [2, 4]\n assert candidate(edges = [[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, 15]]) == [30, 15]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 6]]) == [9, 6]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 5]]) == [12, 5]\n assert candidate(edges = [[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]]) == [30, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 2]]) == [5, 2]\n assert candidate(edges = [[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], [20, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 4]]) == [6, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [2, 10], [3, 10], [5, 10]]) == [10, 1]\n assert candidate(edges = [[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, 5]]) == [20, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 2]]) == [9, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [1, 13]]) == [4, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 5]]) == [10, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 3]]) == [10, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3], [1, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [5, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 4], [1, 9], [9, 10], [10, 1]]) == [3, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [1, 3], [3, 5]]) == [2, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 1], [4, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 5]]) == [9, 5]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [2, 4]]) == [3, 4]\n assert candidate(edges = [[2, 3], [4, 3], [5, 3], [1, 4], [2, 5], [4, 5]]) == [2, 5]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 9]]) == [8, 9]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 1], [2, 10], [5, 10]]) == [10, 1]\n assert candidate(edges = [[1, 3], [2, 3], [3, 4], [4, 5], [5, 1], [6, 1]]) == [1, 3]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 5], [1, 10]]) == [4, 5]\n assert candidate(edges = [[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, 7]]) == [14, 7]\n assert candidate(edges = [[1, 2], [1, 3], [1, 4], [1, 5], [2, 6], [3, 6], [4, 6], [5, 6], [2, 3]]) == [1, 3]\n assert candidate(edges = [[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, 13]]) == [20, 13]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 4]]) == [8, 4]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 7]]) == [9, 7]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 4], [4, 5], [5, 2]]) == [1, 2]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 4]]) == [9, 4]\n assert candidate(edges = [[1, 5], [2, 5], [3, 5], [4, 5], [5, 1]]) == [5, 1]\n assert candidate(edges = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 3], [6, 4]]) == [3, 4]\n assert candidate(edges = [[1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [9, 5]]) == [9, 5]\n", "comparison": "exact"}, "public_tests": ["[[1,2],[1,3],[2,3]]", "[[1,2],[2,3],[3,4],[4,1],[1,5]]"], "hints": [], "metadata": {"canonical_parameter_names": ["edges"], "leetcode_dataset_entry_point": "Solution().findRedundantDirectedConnection", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:29+00:00", "tests_total": 94, "tests_dropped": 0, "flags": ["multiple_answers", "has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "union-find", "graph"]}, "language": "cpp", "interface": {"raw_signature": "vector findRedundantDirectedConnection(vector>& edges) {", "container": "Solution", "callable": "findRedundantDirectedConnection", "parameters": [{"name": "edges", "type": "vector>&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 686, "task_id": "repeated-string-match", "difficulty": "Medium", "problem_description": "Given two strings a and b, return the minimum number of times you should repeat string a so that string b is a substring of it. If it is impossible for b to be a substring of a after repeating it, return -1.\n\nNotice: string \"abc\" repeated 0 times is \"\", repeated 1 time is \"abc\" and repeated 2 times is \"abcabc\".\n\nExample 1:\n\nInput: a = \"abcd\", b = \"cdabcdab\"\nOutput: 3\nExplanation: We return 3 because by repeating a three times \"abcdabcdabcd\", b is a substring of it.\n\nExample 2:\n\nInput: a = \"a\", b = \"aa\"\nOutput: 2\n\nConstraints:\n\n- 1 <= a.length, b.length <= 10^4\n- a and b consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(a = \"abab\",b = \"abababab\") == 2\n assert candidate(a = \"ab\",b = \"aba\") == 2\n assert candidate(a = \"abc\",b = \"def\") == -1\n assert candidate(a = \"abc\",b = \"abcabc\") == 2\n assert candidate(a = \"aaaaaaaaaaaaaaaaaaaaaab\",b = \"ba\") == 2\n assert candidate(a = \"abcd\",b = \"cdabcdab\") == 3\n assert candidate(a = \"abc\",b = \"ac\") == -1\n assert candidate(a = \"abcd\",b = \"abcdabcd\") == 2\n assert candidate(a = \"xyz\",b = \"xyzxyzxyz\") == 3\n assert candidate(a = \"abc\",b = \"abcabcabc\") == 3\n assert candidate(a = \"abc\",b = \"bca\") == 2\n assert candidate(a = \"abc\",b = \"cab\") == 2\n assert candidate(a = \"a\",b = \"a\") == 1\n assert candidate(a = \"a\",b = \"aa\") == 2\n assert candidate(a = \"abc\",b = \"acbac\") == -1\n assert candidate(a = \"aaaa\",b = \"aa\") == 1\n assert candidate(a = \"abcd\",b = \"dddd\") == -1\n assert candidate(a = \"hello\",b = \"ohell\") == 2\n assert candidate(a = \"abcd\",b = \"cabd\") == -1\n assert candidate(a = \"abcd\",b = \"dabcabcdabc\") == -1\n assert candidate(a = \"a\",b = \"b\") == -1\n assert candidate(a = \"xyz\",b = \"xyzyzyzx\") == -1\n assert candidate(a = \"abc\",b = \"cabcabca\") == 4\n assert candidate(a = \"abcd\",b = \"dabcdabcdabcdabc\") == 5\n assert candidate(a = \"qrstuv\",b = \"uvqrstuvqrstuv\") == 3\n assert candidate(a = \"abc\",b = \"abcabcabcabcabcabcabcabcabcabc\") == 10\n assert candidate(a = \"abcd\",b = \"dcba\") == -1\n assert candidate(a = \"sequence\",b = \"encesequ\") == 2\n assert candidate(a = \"hello\",b = \"lohellohel\") == 3\n assert candidate(a = \"abcabcabc\",b = \"cababcabcab\") == -1\n assert candidate(a = \"hello\",b = \"lohelohello\") == -1\n assert candidate(a = \"abcd\",b = \"cdabc\") == 2\n assert candidate(a = \"repeat\",b = \"peatreprea\") == -1\n assert candidate(a = \"ab\",b = \"babababababab\") == 7\n assert candidate(a = \"abcdefg\",b = \"efgabcdefgabc\") == 3\n assert candidate(a = \"abcde\",b = \"cdeabcd\") == 2\n assert candidate(a = \"aabb\",b = \"bbaabbaa\") == 3\n assert candidate(a = \"zzzz\",b = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 11\n assert candidate(a = \"abcdefg\",b = \"efgabcdefgabcd\") == 3\n assert candidate(a = \"ab\",b = \"babababab\") == 5\n assert candidate(a = \"abcde\",b = \"cdeabcdeabcde\") == 3\n assert candidate(a = \"abcd\",b = \"abcdabcdabcdabcdabcdab\") == 6\n assert candidate(a = \"abcabc\",b = \"bcabcabc\") == 2\n assert candidate(a = \"algorithm\",b = \"rithmalgorith\") == 2\n assert candidate(a = \"unique\",b = \"queuniqueuni\") == 3\n assert candidate(a = \"xyz\",b = \"xyzxyzxyzxyzxyz\") == 5\n assert candidate(a = \"abcd\",b = \"dabcdabcdabc\") == 4\n assert candidate(a = \"zzz\",b = \"zzzzzzzz\") == 3\n assert candidate(a = \"xyz\",b = \"yzxyzxyzyx\") == -1\n assert candidate(a = \"aaa\",b = \"aaaaaaaaaaaa\") == 4\n assert candidate(a = \"abcdefg\",b = \"defgabcdefgab\") == 3\n assert candidate(a = \"aaaab\",b = \"babaaabaaaab\") == -1\n assert candidate(a = \"abcdefg\",b = \"fgabcdefgabc\") == 3\n assert candidate(a = \"repeat\",b = \"atrepeatrepeatrep\") == 4\n assert candidate(a = \"abcde\",b = \"cdeabcdea\") == 3\n assert candidate(a = \"uvwxy\",b = \"xyuvwxyuvwx\") == 3\n assert candidate(a = \"aaaa\",b = \"aaaaaaaaa\") == 3\n assert candidate(a = \"ab\",b = \"babababababababab\") == 9\n assert candidate(a = \"repeat\",b = \"atrepeatrep\") == 3\n assert candidate(a = \"aabbcc\",b = \"ccccaabbaabbcccc\") == -1\n assert candidate(a = \"test\",b = \"sttestte\") == 3\n assert candidate(a = \"ab\",b = \"bababababa\") == 6\n assert candidate(a = \"abcdef\",b = \"defabcdeabcf\") == -1\n assert candidate(a = \"zyxwv\",b = \"wvzyxwvzyxwv\") == 3\n assert candidate(a = \"abac\",b = \"acabacaba\") == 3\n assert candidate(a = \"abcdef\",b = \"defabcdefabc\") == 3\n assert candidate(a = \"ababab\",b = \"babababababab\") == 3\n assert candidate(a = \"aabb\",b = \"bbaabbbaab\") == -1\n assert candidate(a = \"zzz\",b = \"zzzzzzzzzzzzzzzzzzzz\") == 7\n assert candidate(a = \"complex\",b = \"lexcomplexc\") == 3\n assert candidate(a = \"abcde\",b = \"eabcdeabcdeabcd\") == 4\n assert candidate(a = \"abcd\",b = \"abcdabcdabcdabcdabcd\") == 5\n assert candidate(a = \"abcdefg\",b = \"fgabcdefgabcde\") == 3\n assert candidate(a = \"abcde\",b = \"cdecdecdec\") == -1\n assert candidate(a = \"pattern\",b = \"ternpatternpat\") == 3\n assert candidate(a = \"abcabc\",b = \"cabcabcabc\") == 2\n assert candidate(a = \"ab\",b = \"babababa\") == 5\n assert candidate(a = \"xyz\",b = \"zzzzxyzzz\") == -1\n assert candidate(a = \"abcd\",b = \"ddddddddddddddddddd\") == -1\n assert candidate(a = \"aabb\",b = \"bbaabbbaabb\") == -1\n assert candidate(a = \"abac\",b = \"cabacaba\") == 3\n assert candidate(a = \"xyz\",b = \"zyxzyxzyxzyx\") == -1\n assert candidate(a = \"pattern\",b = \"ternpatte\") == 2\n assert candidate(a = \"test\",b = \"sttesttest\") == 3\n assert candidate(a = \"abcd\",b = \"cdabcdabcdabcdab\") == 5\n assert candidate(a = \"abcabc\",b = \"cabcabcabcabcab\") == 3\n assert candidate(a = \"xyz\",b = \"xyzxyzxyzxyz\") == 4\n assert candidate(a = \"abcd\",b = \"dddddddd\") == -1\n assert candidate(a = \"abcd\",b = \"cdabcda\") == 3\n assert candidate(a = \"abc\",b = \"bcabcabc\") == 3\n assert candidate(a = \"ace\",b = \"aceaceaceace\") == 4\n assert candidate(a = \"xyzxyz\",b = \"zyxzyxzyxzyxzyxzyxzyx\") == -1\n assert candidate(a = \"abc\",b = \"cababc\") == -1\n assert candidate(a = \"abcdefgh\",b = \"habcdefghabc\") == 3\n assert candidate(a = \"a\",b = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 40\n assert candidate(a = \"abcabcabc\",b = \"cccc\") == -1\n assert candidate(a = \"abcd\",b = \"dabcdabc\") == 3\n assert candidate(a = \"mnopqr\",b = \"qrmonpqrmon\") == -1\n assert candidate(a = \"xyzabc\",b = \"bcxyzabcxy\") == 3\n assert candidate(a = \"pattern\",b = \"ternpattern\") == 2\n assert candidate(a = \"abcabc\",b = \"cabcabcab\") == 2\n assert candidate(a = \"unique\",b = \"niqueuniq\") == 2\n assert candidate(a = \"substring\",b = \"stringsubstr\") == 2\n assert candidate(a = \"mnop\",b = \"onmnoponmnop\") == -1\n assert candidate(a = \"abcdefg\",b = \"efgabcdefgabcdefgabcdefg\") == 4\n assert candidate(a = \"abcdabcd\",b = \"cdabcdabcdabcd\") == 2\n assert candidate(a = \"ab\",b = \"bababababab\") == 6\n assert candidate(a = \"abcabc\",b = \"cabcabcabca\") == 3\n assert candidate(a = \"abcd\",b = \"dcbaabcdabcda\") == -1\n assert candidate(a = \"ab\",b = \"ababababab\") == 5\n assert candidate(a = \"abcdabcdabcd\",b = \"dabcdabcdabc\") == 2\n assert candidate(a = \"xyzyzyz\",b = \"zyzyzyzyzyzy\") == -1\n assert candidate(a = \"abcde\",b = \"eabcdeabcd\") == 3\n assert candidate(a = \"a\",b = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 32\n assert candidate(a = \"a\",b = \"abababababababab\") == -1\n assert candidate(a = \"abcde\",b = \"deabcdeabcdeabcdeabcd\") == 5\n assert candidate(a = \"aaaa\",b = \"aaaaaaaaaa\") == 3\n assert candidate(a = \"pattern\",b = \"ernpatternpatt\") == 3\n assert candidate(a = \"abcdef\",b = \"defabcdeabc\") == -1\n assert candidate(a = \"abcdefabcdef\",b = \"defabcdefabc\") == 2\n assert candidate(a = \"abcdefgh\",b = \"fghabcdefgha\") == 3\n assert candidate(a = \"a\",b = \"aaaaaaaaaaaaa\") == 13\n assert candidate(a = \"abcdef\",b = \"defabcde\") == 2\n assert candidate(a = \"xy\",b = \"yxyxyxyxyxyxyx\") == 8\n assert candidate(a = \"abcdeabcde\",b = \"cdecdecdecdec\") == -1\n assert candidate(a = \"abcdefgabcdefg\",b = \"fgabcdefgabcdefgabc\") == 2\n assert candidate(a = \"ababab\",b = \"bababa\") == 2\n assert candidate(a = \"abcabcabc\",b = \"bcabcabcabcabc\") == 2\n assert candidate(a = \"abcde\",b = \"eabcdeabcdeabc\") == 4\n assert candidate(a = \"abcdef\",b = \"fedcbafedcba\") == -1\n assert candidate(a = \"aaa\",b = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 19\n assert candidate(a = \"abababa\",b = \"babababababab\") == -1\n assert candidate(a = \"abc\",b = \"cba\") == -1\n assert candidate(a = \"abcde\",b = \"deabcdeabc\") == 3\n assert candidate(a = \"abab\",b = \"babbababbababbababbababbababbaba\") == -1\n assert candidate(a = \"xyzxyz\",b = \"zyxzyxzyxzyxzyxzyx\") == -1\n assert candidate(a = \"abcabcabc\",b = \"abcabcabcabcabcabcabcabc\") == 3\n assert candidate(a = \"xy\",b = \"yxyxyxyx\") == 5\n assert candidate(a = \"repeat\",b = \"peatrepeatre\") == 3\n assert candidate(a = \"hello\",b = \"hellohellohello\") == 3\n assert candidate(a = \"abc\",b = \"cabcabcabcabcab\") == 6\n assert candidate(a = \"abc\",b = \"cbaabcab\") == -1\n assert candidate(a = \"xyz\",b = \"zyxzyxzyx\") == -1\n", "comparison": "exact"}, "public_tests": ["\"abcd\"\n\"cdabcdab\"", "\"a\"\n\"aa\""], "hints": [], "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().repeatedStringMatch", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:31+00:00", "tests_total": 144, "tests_dropped": 1, "flags": [], "topic_tags": ["string", "string-matching", "z-algorithm", "knuth-morris-pratt-algorithm", "boyer-moore-string-search-algorithm"]}, "language": "cpp", "interface": {"raw_signature": "int repeatedStringMatch(string a, string b) {", "container": "Solution", "callable": "repeatedStringMatch", "parameters": [{"name": "a", "type": "string"}, {"name": "b", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 688, "task_id": "knight-probability-in-chessboard", "difficulty": "Medium", "problem_description": "On an n x n chessboard, a knight starts at the cell (row, column) and attempts to make exactly k moves. The rows and columns are 0-indexed, so the top-left cell is (0, 0), and the bottom-right cell is (n - 1, n - 1).\n\nA chess knight has eight possible moves it can make, as illustrated below. Each move is two cells in a cardinal direction, then one cell in an orthogonal direction.\n\nEach time the knight is to move, it chooses one of eight possible moves uniformly at random (even if the piece would go off the chessboard) and moves there.\n\nThe knight continues moving until it has made exactly k moves or has moved off the chessboard.\n\nReturn the probability that the knight remains on the board after it has stopped moving.\n\nExample 1:\n\nInput: n = 3, k = 2, row = 0, column = 0\nOutput: 0.06250\nExplanation: There are two moves (to (1,2), (2,1)) that will keep the knight on the board.\nFrom each of those positions, there are also two moves that will keep the knight on the board.\nThe total probability the knight stays on the board is 0.0625.\n\nExample 2:\n\nInput: n = 1, k = 0, row = 0, column = 0\nOutput: 1.00000\n\nConstraints:\n\n- 1 <= n <= 25\n- 0 <= k <= 100\n- 0 <= row, column <= n - 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(n=3, k=2, row=0, column=0), 0.0625)\n assert answers_match(candidate(n=5, k=3, row=2, column=2), 0.25)\n assert answers_match(candidate(n=1, k=0, row=0, column=0), 1)\n assert answers_match(candidate(n=25, k=10, row=5, column=5), 0.6104710195213556)\n assert answers_match(candidate(n=8, k=5, row=3, column=3), 0.35565185546875)\n assert answers_match(candidate(n=16, k=4, row=8, column=8), 0.9921875)\n assert answers_match(candidate(n=20, k=50, row=0, column=0), 0.004271113933844097)\n assert answers_match(candidate(n=10, k=10, row=3, column=7), 0.16516215726733208)\n assert answers_match(candidate(n=18, k=18, row=9, column=9), 0.4891442786281308)\n assert answers_match(candidate(n=7, k=3, row=3, column=0), 0.2578125)\n assert answers_match(candidate(n=20, k=30, row=5, column=5), 0.20150920194594582)\n assert answers_match(candidate(n=20, k=30, row=10, column=10), 0.3188507083330616)\n assert answers_match(candidate(n=16, k=10, row=15, column=0), 0.04366329871118069)\n assert answers_match(candidate(n=24, k=8, row=0, column=23), 0.054056644439697266)\n assert answers_match(candidate(n=18, k=40, row=9, column=9), 0.11635625115510018)\n assert answers_match(candidate(n=7, k=7, row=3, column=3), 0.1180572509765625)\n assert answers_match(candidate(n=25, k=100, row=12, column=12), 0.04742876069380138)\n assert answers_match(candidate(n=12, k=25, row=6, column=6), 0.04940514803013356)\n assert answers_match(candidate(n=12, k=10, row=2, column=2), 0.1920044720172882)\n assert answers_match(candidate(n=20, k=5, row=19, column=19), 0.0821533203125)\n assert answers_match(candidate(n=15, k=5, row=7, column=7), 0.9296875)\n assert answers_match(candidate(n=15, k=20, row=7, column=7), 0.25474967076243493)\n assert answers_match(candidate(n=18, k=40, row=8, column=8), 0.11635625115510018)\n assert answers_match(candidate(n=20, k=5, row=10, column=10), 0.998046875)\n assert answers_match(candidate(n=15, k=20, row=14, column=0), 0.016829922789494044)\n assert answers_match(candidate(n=10, k=15, row=5, column=5), 0.08643433569193348)\n assert answers_match(candidate(n=20, k=20, row=10, column=10), 0.5426220046393063)\n assert answers_match(candidate(n=10, k=5, row=7, column=3), 0.432373046875)\n assert answers_match(candidate(n=12, k=3, row=0, column=0), 0.125)\n assert answers_match(candidate(n=25, k=10, row=0, column=0), 0.04390144161880016)\n assert answers_match(candidate(n=12, k=4, row=6, column=6), 0.86083984375)\n assert answers_match(candidate(n=20, k=30, row=15, column=15), 0.1555184742490744)\n assert answers_match(candidate(n=12, k=40, row=3, column=3), 0.004399547953837918)\n assert answers_match(candidate(n=22, k=80, row=11, column=11), 0.044116795483744795)\n assert answers_match(candidate(n=25, k=75, row=20, column=20), 0.03918538196240853)\n assert answers_match(candidate(n=18, k=60, row=8, column=8), 0.03143644403748678)\n assert answers_match(candidate(n=11, k=10, row=3, column=3), 0.2401371169835329)\n assert answers_match(candidate(n=25, k=50, row=12, column=12), 0.2764224343078947)\n assert answers_match(candidate(n=20, k=5, row=19, column=0), 0.0821533203125)\n assert answers_match(candidate(n=25, k=10, row=10, column=10), 0.9512526337057352)\n assert answers_match(candidate(n=10, k=5, row=0, column=0), 0.08154296875)\n assert answers_match(candidate(n=25, k=0, row=24, column=24), 1)\n assert answers_match(candidate(n=9, k=15, row=4, column=4), 0.04816485046694652)\n assert answers_match(candidate(n=10, k=10, row=4, column=5), 0.22588835656642914)\n assert answers_match(candidate(n=25, k=1, row=0, column=0), 0.25)\n assert answers_match(candidate(n=15, k=25, row=7, column=7), 0.16093826349037266)\n assert answers_match(candidate(n=25, k=1, row=24, column=24), 0.25)\n assert answers_match(candidate(n=15, k=5, row=14, column=14), 0.0821533203125)\n assert answers_match(candidate(n=20, k=2, row=19, column=0), 0.1875)\n assert answers_match(candidate(n=12, k=1, row=11, column=11), 0.25)\n assert answers_match(candidate(n=18, k=15, row=9, column=9), 0.5923417936583064)\n assert answers_match(candidate(n=10, k=5, row=9, column=9), 0.08154296875)\n assert answers_match(candidate(n=20, k=2, row=19, column=19), 0.1875)\n assert answers_match(candidate(n=15, k=10, row=7, column=7), 0.6320731192827225)\n assert answers_match(candidate(n=20, k=25, row=5, column=5), 0.2637784288176317)\n assert answers_match(candidate(n=25, k=50, row=10, column=10), 0.26126116581179654)\n assert answers_match(candidate(n=10, k=5, row=9, column=0), 0.08154296875)\n assert answers_match(candidate(n=10, k=10, row=5, column=5), 0.22588835656642914)\n assert answers_match(candidate(n=22, k=25, row=11, column=11), 0.5187071674337155)\n assert answers_match(candidate(n=15, k=20, row=0, column=14), 0.016829922789494044)\n assert answers_match(candidate(n=10, k=50, row=0, column=0), 1.4257173418698251e-05)\n assert answers_match(candidate(n=15, k=15, row=14, column=0), 0.026700135945247894)\n assert answers_match(candidate(n=20, k=7, row=19, column=19), 0.060955047607421875)\n assert answers_match(candidate(n=10, k=8, row=9, column=9), 0.04556155204772949)\n assert answers_match(candidate(n=20, k=10, row=0, column=0), 0.04390097223222256)\n assert answers_match(candidate(n=12, k=3, row=11, column=11), 0.125)\n assert answers_match(candidate(n=16, k=8, row=8, column=8), 0.8006306886672974)\n assert answers_match(candidate(n=14, k=25, row=6, column=6), 0.11653890928316238)\n assert answers_match(candidate(n=10, k=5, row=0, column=9), 0.08154296875)\n assert answers_match(candidate(n=9, k=4, row=1, column=1), 0.232421875)\n assert answers_match(candidate(n=23, k=2, row=22, column=22), 0.1875)\n assert answers_match(candidate(n=12, k=15, row=3, column=4), 0.1568282853916969)\n assert answers_match(candidate(n=12, k=30, row=6, column=6), 0.02475891397334001)\n assert answers_match(candidate(n=8, k=6, row=1, column=1), 0.121978759765625)\n assert answers_match(candidate(n=7, k=25, row=3, column=3), 0.0001764740896717054)\n assert answers_match(candidate(n=20, k=2, row=0, column=19), 0.1875)\n assert answers_match(candidate(n=15, k=7, row=7, column=7), 0.811187744140625)\n assert answers_match(candidate(n=10, k=0, row=5, column=5), 1)\n assert answers_match(candidate(n=12, k=3, row=0, column=11), 0.125)\n", "comparison": "float"}, "public_tests": ["3\n2\n0\n0", "1\n0\n0\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k", "row", "column"], "leetcode_dataset_entry_point": "Solution().knightProbability", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:35+00:00", "tests_total": 79, "tests_dropped": 0, "flags": ["figure_reference", "decimal_answer", "has_images"], "topic_tags": ["dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "double knightProbability(int n, int k, int row, int column) {", "container": "Solution", "callable": "knightProbability", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}, {"name": "row", "type": "int"}, {"name": "column", "type": "int"}], "return_type": "double", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 689, "task_id": "maximum-sum-of-3-non-overlapping-subarrays", "difficulty": "Hard", "problem_description": "Given an integer array nums and an integer k, find three non-overlapping subarrays of length k with maximum sum and return them.\n\nReturn the result as a list of indices representing the starting position of each interval (0-indexed). If there are multiple answers, return the lexicographically smallest one.\n\nExample 1:\n\nInput: nums = [1,2,1,2,6,7,5,1], k = 2\nOutput: [0,3,5]\nExplanation: Subarrays [1, 2], [2, 6], [7, 5] correspond to the starting indices [0, 3, 5].\nWe could have also taken [2, 1], but an answer of [1, 3, 5] would be lexicographically larger.\n\nExample 2:\n\nInput: nums = [1,2,1,2,1,2,1,2,1], k = 2\nOutput: [0,2,4]\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^4\n- 1 <= nums[i] < 2^16\n- 1 <= k <= floor(nums.length / 3)\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 2) == [0, 2, 4]\n assert candidate(nums = [1, 2, 1, 2, 6, 7, 5, 1, 9, 7, 4, 6],k = 3) == [3, 6, 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],k = 5) == [0, 5, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == [1, 4, 7]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 3) == [0, 3, 6]\n assert candidate(nums = [1, 2, 1, 2, 6, 7, 5, 1],k = 2) == [0, 3, 5]\n assert candidate(nums = [3, 5, 10, 7, 6, 2],k = 1) == [2, 3, 4]\n assert candidate(nums = [9, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1],k = 3) == [0, 4, 8]\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1],k = 2) == [0, 2, 4]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == [0, 1, 2]\n assert candidate(nums = [7, 13, 20, 19, 19, 2, 10, 1, 1, 1, 1, 100],k = 2) == [1, 3, 10]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 2) == [0, 2, 4]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 1) == [0, 1, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 1) == [6, 7, 8]\n assert candidate(nums = [1, 2, 1, 2, 6, 7, 5, 1, 9, 8],k = 3) == [1, 4, 7]\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],k = 2) == [0, 2, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5],k = 2) == [3, 8, 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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40],k = 4) == [28, 32, 36]\n assert candidate(nums = [1, 3, 2, 1, 4, 5, 6, 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 = 3) == [22, 25, 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, 3, 3, 3, 3, 3],k = 5) == [0, 5, 10]\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],k = 3) == [0, 3, 6]\n assert candidate(nums = [9, 1, 2, 3, 9, 1, 2, 3, 9, 1, 2, 3, 9, 1, 2, 3],k = 3) == [2, 6, 10]\n assert candidate(nums = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1],k = 2) == [0, 2, 4]\n assert candidate(nums = [100, 200, 300, 100, 200, 300, 100, 200, 300, 100, 200, 300, 100, 200, 300],k = 5) == [0, 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, 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],k = 10) == [30, 40, 50]\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) == [0, 5, 10]\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 5) == [0, 5, 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, 1, 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 = 3) == [0, 3, 6]\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],k = 3) == [35, 39, 42]\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) == [8, 12, 16]\n assert candidate(nums = [5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5],k = 5) == [0, 15, 33]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],k = 5) == [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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40],k = 10) == [10, 20, 30]\n assert candidate(nums = [5, 1, 3, 2, 6, 4, 5, 3, 7, 8, 1, 9, 2, 4, 6],k = 3) == [4, 7, 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],k = 5) == [25, 30, 35]\n assert candidate(nums = [1, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 4) == [0, 4, 8]\n assert candidate(nums = [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],k = 5) == [8, 13, 27]\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) == [12, 18, 24]\n assert candidate(nums = [9, 4, 3, 7, 9, 1, 4, 7, 9, 7, 1, 8, 3, 1, 8, 1, 6, 8, 1, 8, 5, 9, 5, 7, 5, 8, 5, 8, 9, 3, 4, 8, 2, 7, 8, 3, 8, 4, 3, 7, 6, 9, 2, 4, 5, 8, 3, 7, 5, 9],k = 7) == [3, 17, 25]\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, 260, 270, 280, 290, 300],k = 5) == [15, 20, 25]\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],k = 3) == [0, 3, 6]\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 5) == [0, 5, 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, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 6) == [0, 14, 20]\n assert candidate(nums = [10, 4, 5, 1, 8, 9, 2, 6, 7, 3, 1, 5, 4, 8, 9, 1, 2, 3, 4, 5],k = 4) == [0, 4, 11]\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],k = 5) == [0, 5, 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, 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],k = 5) == [0, 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 = 4) == [8, 12, 16]\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) == [0, 2, 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, 26, 27, 28, 29, 30],k = 7) == [9, 16, 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, 1, 2, 1, 2, 1, 2, 1, 2],k = 2) == [0, 2, 4]\n assert candidate(nums = [9, 4, 3, 7, 6, 9, 8, 5, 2, 1, 10, 6, 7, 8, 9],k = 3) == [4, 9, 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 = 5) == [0, 5, 10]\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 = 4) == [0, 4, 8]\n assert candidate(nums = [8, 1, 9, 2, 4, 6, 3, 5, 7, 10, 1, 3, 5, 7, 9],k = 4) == [2, 6, 11]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],k = 5) == [0, 5, 10]\n assert candidate(nums = [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],k = 5) == [1, 7, 13]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],k = 3) == [6, 9, 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],k = 7) == [29, 36, 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],k = 6) == [2, 8, 14]\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],k = 10) == [0, 10, 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],k = 5) == [0, 5, 10]\n assert candidate(nums = [3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1],k = 2) == [0, 3, 6]\n assert candidate(nums = [9, 4, 3, 7, 2, 5, 8, 1, 6, 3, 5, 7, 4, 8, 2],k = 3) == [0, 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, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 4) == [18, 22, 26]\n assert candidate(nums = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100],k = 3) == [0, 3, 6]\n assert candidate(nums = [2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1],k = 2) == [1, 5, 9]\n assert candidate(nums = [5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1],k = 2) == [0, 5, 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],k = 3) == [0, 9, 18]\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],k = 5) == [10, 15, 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 = 5) == [5, 10, 15]\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 4) == [3, 7, 11]\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],k = 5) == [0, 5, 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],k = 5) == [0, 5, 10]\n", "comparison": "exact"}, "public_tests": ["[1,2,1,2,6,7,5,1]\n2", "[1,2,1,2,1,2,1,2,1]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().maxSumOfThreeSubarrays", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:37+00:00", "tests_total": 80, "tests_dropped": 7, "flags": ["multiple_answers"], "topic_tags": ["array", "dynamic-programming", "sliding-window", "prefix-sum"]}, "language": "cpp", "interface": {"raw_signature": "vector maxSumOfThreeSubarrays(vector& nums, int k) {", "container": "Solution", "callable": "maxSumOfThreeSubarrays", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 691, "task_id": "stickers-to-spell-word", "difficulty": "Hard", "problem_description": "We are given n different types of stickers. Each sticker has a lowercase English word on it.\n\nYou would like to spell out the given string target by cutting individual letters from your collection of stickers and rearranging them. You can use each sticker more than once if you want, and you have infinite quantities of each sticker.\n\nReturn the minimum number of stickers that you need to spell out target. If the task is impossible, return -1.\n\nNote: In all test cases, all words were chosen randomly from the 1000 most common US English words, and target was chosen as a concatenation of two random words.\n\nExample 1:\n\nInput: stickers = [\"with\",\"example\",\"science\"], target = \"thehat\"\nOutput: 3\nExplanation:\nWe can use 2 \"with\" stickers, and 1 \"example\" sticker.\nAfter cutting and rearrange the letters of those stickers, we can form the target \"thehat\".\nAlso, this is the minimum number of stickers necessary to form the target string.\n\nExample 2:\n\nInput: stickers = [\"notice\",\"possible\"], target = \"basicbasic\"\nOutput: -1\nExplanation:\nWe cannot form the target \"basicbasic\" from cutting letters from the given stickers.\n\nConstraints:\n\n- n == stickers.length\n- 1 <= n <= 50\n- 1 <= stickers[i].length <= 10\n- 1 <= target.length <= 15\n- stickers[i] and target consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(stickers = ['aaa', 'bbb'],target = \"aabbbccc\") == -1\n assert candidate(stickers = ['a', 'b', 'c'],target = \"abc\") == 3\n assert candidate(stickers = ['abc', 'abc'],target = \"abcabc\") == 2\n assert candidate(stickers = ['abcd'],target = \"abcdabcd\") == 2\n assert candidate(stickers = ['abc'],target = \"d\") == -1\n assert candidate(stickers = ['notice', 'possible'],target = \"basicbasic\") == -1\n assert candidate(stickers = ['abc'],target = \"abcd\") == -1\n assert candidate(stickers = ['abc', 'ab', 'bc'],target = \"abc\") == 1\n assert candidate(stickers = ['abc', 'def'],target = \"abcdef\") == 2\n assert candidate(stickers = ['a'],target = \"a\") == 1\n assert candidate(stickers = ['aabbcc', 'abc'],target = \"aabbbccc\") == 2\n assert candidate(stickers = ['hello', 'world'],target = \"hold\") == 2\n assert candidate(stickers = ['abc', 'def', 'ghi'],target = \"adgbehcfi\") == 3\n assert candidate(stickers = ['aabb', 'ccdd'],target = \"abcd\") == 2\n assert candidate(stickers = ['with', 'example', 'science'],target = \"thehat\") == 3\n assert candidate(stickers = ['hello', 'world'],target = \"helloworld\") == 2\n assert candidate(stickers = ['aaa', 'aa', 'a'],target = \"aaaaaaaaa\") == 3\n assert candidate(stickers = ['xyz', 'zyx', 'yxz'],target = \"zyxyzyxyzyx\") == 5\n assert candidate(stickers = ['hello', 'world', 'again'],target = \"aginwodlloleh\") == 3\n assert candidate(stickers = ['aabb', 'bbcc', 'cdda'],target = \"aabbccddaabb\") == 4\n assert candidate(stickers = ['sun', 'moon', 'star'],target = \"starstarsun\") == 3\n assert candidate(stickers = ['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee'],target = \"abcdeabcde\") == 5\n assert candidate(stickers = ['aabbcc', 'abcabc', 'aabbc'],target = \"abcabcabc\") == 2\n assert candidate(stickers = ['ab', 'bc', 'cd'],target = \"abcdabcd\") == 4\n assert candidate(stickers = ['quick', 'brown', 'fox'],target = \"quickbrownfox\") == 3\n assert candidate(stickers = ['abcd', 'efgh', 'ijkl'],target = \"dgheijlkfabci\") == 4\n assert candidate(stickers = ['apple', 'banana', 'cherry'],target = \"bananaapple\") == 2\n assert candidate(stickers = ['red', 'blue', 'green'],target = \"bluegreenred\") == 3\n assert candidate(stickers = ['abcd', 'dcba', 'abdc', 'bacd'],target = \"abcdabcd\") == 2\n assert candidate(stickers = ['zzz', 'zzzz', 'zzzzz'],target = \"zzzzzzzzzzzzzzz\") == 3\n assert candidate(stickers = ['hello', 'world', 'python'],target = \"pythonhello\") == 2\n assert candidate(stickers = ['aabbcc', 'abc', 'abac'],target = \"aabbccabc\") == 2\n assert candidate(stickers = ['abacd', 'bdfgh', 'cdhij', 'efgik', 'ghklm'],target = \"abcdefghijklim\") == 4\n assert candidate(stickers = ['puzzle', 'piece', 'fit'],target = \"fittingpuzzle\") == -1\n assert candidate(stickers = ['aaa', 'bbb', 'ccc'],target = \"aabbbccc\") == 3\n assert candidate(stickers = ['sunshine', 'rainbow', 'cloud'],target = \"sunshinecloud\") == 2\n assert candidate(stickers = ['zoo', 'book', 'look'],target = \"bookzoolook\") == 3\n assert candidate(stickers = ['magic', 'wand', 'spell'],target = \"spellmagic\") == 2\n assert candidate(stickers = ['aabbcc', 'bbccdd', 'aaccdd'],target = \"aabbccddee\") == -1\n assert candidate(stickers = ['cat', 'dog', 'bird'],target = \"cattog\") == 3\n assert candidate(stickers = ['aabb', 'bbcc', 'ccdd'],target = \"bbaaccd\") == 2\n assert candidate(stickers = ['algorithm', 'data', 'structure'],target = \"datadstructure\") == 3\n assert candidate(stickers = ['cat', 'bat', 'rat', 'car'],target = \"catabtar\") == 3\n assert candidate(stickers = ['zebra', 'lion', 'tiger'],target = \"tigerlionzebra\") == 3\n assert candidate(stickers = ['repeat', 'again', 'once'],target = \"repeatagainonce\") == 3\n assert candidate(stickers = ['sticker', 'stamps', 'books'],target = \"tsickerbomskps\") == 3\n assert candidate(stickers = ['abcd', 'dcba', 'efgh', 'hgf', 'ijkl', 'lkji'],target = \"abcdefghijklij\") == 4\n assert candidate(stickers = ['aaaa', 'bbbb', 'cccc'],target = \"aabbcc\") == 3\n assert candidate(stickers = ['sticker', 'book', 'a'],target = \"stickers\") == 2\n assert candidate(stickers = ['x', 'y', 'z'],target = \"zyxzyxzyx\") == 9\n assert candidate(stickers = ['abcd', 'efgh', 'ijkl'],target = \"ijklabcdeffgh\") == 4\n assert candidate(stickers = ['sticker', 'book', 'target'],target = \"booktarget\") == 2\n assert candidate(stickers = ['jump', 'over', 'lazy'],target = \"jumplazyover\") == 3\n assert candidate(stickers = ['cat', 'dog', 'bird'],target = \"birdcatdog\") == 3\n assert candidate(stickers = ['example', 'science', 'with'],target = \"thehatexample\") == 4\n assert candidate(stickers = ['laptop', 'phone', 'tablet'],target = \"telephonetablet\") == 4\n assert candidate(stickers = ['abcd', 'efgh', 'ijkl'],target = \"abcdefghijlkl\") == 4\n assert candidate(stickers = ['abcdef', 'ghijkl', 'mnopqr'],target = \"mnopqrfedcba\") == 2\n assert candidate(stickers = ['aabb', 'bbcc', 'ccdd', 'ddeeff', 'ffgg'],target = \"aabbccddeeffgg\") == 4\n assert candidate(stickers = ['zzz', 'yyy', 'xxx', 'www'],target = \"zzzyyyxxxwww\") == 4\n assert candidate(stickers = ['coding', 'is', 'fun'],target = \"sindgnif\") == 3\n assert candidate(stickers = ['pizza', 'pie', 'cake'],target = \"pizzacakepie\") == 3\n assert candidate(stickers = ['fox', 'quick', 'brown'],target = \"brownquickfox\") == 3\n assert candidate(stickers = ['sticky', 'loop', 'again'],target = \"programming\") == -1\n assert candidate(stickers = ['steak', 'egg', 'bacon'],target = \"eggnestake\") == 4\n assert candidate(stickers = ['xy', 'yz', 'zx'],target = \"xyzyzxzyxzyzx\") == 7\n assert candidate(stickers = ['dog', 'cat', 'bird'],target = \"catdogbird\") == 3\n assert candidate(stickers = ['one', 'two', 'three'],target = \"onetwothree\") == 3\n assert candidate(stickers = ['up', 'down', 'left', 'right'],target = \"rightleftdownup\") == 4\n assert candidate(stickers = ['one', 'two', 'three'],target = \"threetwoone\") == 3\n assert candidate(stickers = ['quick', 'brown', 'fox'],target = \"uqcfkibrowno\") == 3\n assert candidate(stickers = ['a', 'ab', 'abc', 'abcd', 'abcde'],target = \"abcdeabcde\") == 2\n assert candidate(stickers = ['cat', 'dog', 'bird'],target = \"cogbat\") == 3\n assert candidate(stickers = ['aabbcc', 'bbccdd', 'ccddeeff', 'ddeeffgg'],target = \"aabbccddeeffgg\") == 2\n assert candidate(stickers = ['abc', 'bcd', 'cde', 'def', 'efg'],target = \"abcdefg\") == 3\n assert candidate(stickers = ['red', 'blue', 'green'],target = \"greengreenblue\") == 3\n assert candidate(stickers = ['zzz', 'yyy', 'xxx'],target = \"zzzyyyxxx\") == 3\n assert candidate(stickers = ['fast', 'food', 'truck'],target = \"truckfastfood\") == 3\n assert candidate(stickers = ['abcd', 'dcba', 'abcd'],target = \"abcdabcdabcd\") == 3\n assert candidate(stickers = ['aabbcc', 'ddeeff', 'gghhii'],target = \"abcdefghi\") == 3\n assert candidate(stickers = ['happy', 'new', 'year'],target = \"happynewyear\") == 3\n assert candidate(stickers = ['jump', 'high', 'long'],target = \"highjumplong\") == 3\n assert candidate(stickers = ['sticker', 'sticker', 'sticker'],target = \"stickers\") == 2\n assert candidate(stickers = ['ab', 'bc', 'ca'],target = \"abcabcabc\") == 5\n assert candidate(stickers = ['abcd', 'efgh', 'ijkl'],target = \"fedcbahjiglke\") == 4\n assert candidate(stickers = ['hello', 'world', 'wide'],target = \"worldwide\") == 2\n assert candidate(stickers = ['jump', 'over', 'lazy'],target = \"lazyjumpover\") == 3\n assert candidate(stickers = ['sun', 'moon', 'star'],target = \"moonstarsun\") == 3\n assert candidate(stickers = ['apple', 'orange', 'banana'],target = \"poeplange\") == 2\n assert candidate(stickers = ['abcdef', 'abcde', 'abcd'],target = \"abcdef\") == 1\n assert candidate(stickers = ['abc', 'def', 'ghi', 'jkl'],target = \"abcdefghijkln\") == -1\n assert candidate(stickers = ['race', 'car', 'seat'],target = \"crecarstae\") == 3\n assert candidate(stickers = ['xy', 'yx', 'zz'],target = \"zyxzyxzyx\") == 5\n assert candidate(stickers = ['xy', 'yz', 'za', 'ax'],target = \"xyzaxyzaxyza\") == 6\n assert candidate(stickers = ['cat', 'dog', 'bird'],target = \"birdcattwo\") == -1\n", "comparison": "exact"}, "public_tests": ["[\"with\",\"example\",\"science\"]\n\"thehat\"", "[\"notice\",\"possible\"]\n\"basicbasic\""], "hints": ["We want to perform an exhaustive search, but we need to speed it up based on the input data being random. For all stickers, we can ignore any letters that are not in the target word. When our candidate answer won't be smaller than an answer we have already found, we can stop searching this path. When a sticker dominates another, we shouldn't include the dominated sticker in our sticker collection. [Here, we say a sticker `A` dominates `B` if `A.count(letter) >= B.count(letter)` for all letters.]"], "metadata": {"canonical_parameter_names": ["stickers", "target"], "leetcode_dataset_entry_point": "Solution().minStickers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:39+00:00", "tests_total": 146, "tests_dropped": 51, "flags": [], "topic_tags": ["array", "hash-table", "string", "dynamic-programming", "backtracking", "bit-manipulation", "memoization", "bitmask"]}, "language": "cpp", "interface": {"raw_signature": "int minStickers(vector& stickers, string target) {", "container": "Solution", "callable": "minStickers", "parameters": [{"name": "stickers", "type": "vector&"}, {"name": "target", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 692, "task_id": "top-k-frequent-words", "difficulty": "Medium", "problem_description": "Given an array of strings words and an integer k, return the k most frequent strings.\n\nReturn the answer sorted by the frequency from highest to lowest. Sort the words with the same frequency by their lexicographical order.\n\nExample 1:\n\nInput: words = [\"i\",\"love\",\"leetcode\",\"i\",\"love\",\"coding\"], k = 2\nOutput: [\"i\",\"love\"]\nExplanation: \"i\" and \"love\" are the two most frequent words.\nNote that \"i\" comes before \"love\" due to a lower alphabetical order.\n\nExample 2:\n\nInput: words = [\"the\",\"day\",\"is\",\"sunny\",\"the\",\"the\",\"the\",\"sunny\",\"is\",\"is\"], k = 4\nOutput: [\"the\",\"is\",\"sunny\",\"day\"]\nExplanation: \"the\", \"is\", \"sunny\" and \"day\" are the four most frequent words, with the number of occurrence being 4, 3, 2 and 1 respectively.\n\nConstraints:\n\n- 1 <= words.length <= 500\n- 1 <= words[i].length <= 10\n- words[i] consists of lowercase English letters.\n- k is in the range [1, The number of unique words[i]]\n\nFollow-up: Could you solve it in O(n log(k)) time and O(n) extra space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['a', 'aa', 'aaa'],k = 1) == ['a']\n assert candidate(words = ['a', 'aa', 'aaa'],k = 2) == ['a', 'aa']\n assert candidate(words = ['i', 'love', 'leetcode', 'i', 'love', 'coding'],k = 2) == ['i', 'love']\n assert candidate(words = ['the', 'day', 'is', 'sunny', 'the', 'the', 'the', 'sunny', 'is', 'is'],k = 4) == ['the', 'is', 'sunny', 'day']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple'],k = 3) == ['apple', 'banana', 'orange']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra'],k = 1) == ['zebra']\n assert candidate(words = ['hello', 'world', 'hello', 'world', 'hello'],k = 2) == ['hello', 'world']\n assert candidate(words = ['sun', 'moon', 'star', 'sun', 'moon', 'star', 'sun', 'moon', 'star', 'star', 'star', 'star'],k = 2) == ['star', 'moon']\n assert candidate(words = ['apple', 'orange', 'banana', 'grape', 'apple', 'orange', 'banana', 'grape', 'apple', 'orange', 'banana', 'grape', 'apple', 'orange', 'banana', 'grape'],k = 4) == ['apple', 'banana', 'grape', 'orange']\n assert candidate(words = ['quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'fox', 'quick'],k = 2) == ['quick', 'fox']\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'],k = 10) == ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']\n assert candidate(words = ['a', 'abc', 'abcd', 'abc', 'a', 'abcde', 'a', 'abcdef', 'a', 'abcde', 'a', 'abcdef', 'a'],k = 4) == ['a', 'abc', 'abcde', 'abcdef']\n assert candidate(words = ['quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog'],k = 5) == ['brown', 'dog', 'fox', 'jumps', 'lazy']\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'],k = 5) == ['eight', 'eleven', 'five', 'four', 'nine']\n assert candidate(words = ['quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog'],k = 4) == ['brown', 'dog', 'fox', 'jumps']\n assert candidate(words = ['apple', 'banana', 'cherry', 'apple', 'banana', 'apple', 'cherry', 'cherry', 'banana'],k = 2) == ['apple', 'banana']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'a', 'aa', 'aaa', 'aaaa', 'aaaaa'],k = 3) == ['a', 'aa', 'aaa']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'kiwi', 'banana', 'kiwi', 'kiwi', 'kiwi'],k = 3) == ['kiwi', 'apple', 'banana']\n assert candidate(words = ['sun', 'moon', 'star', 'planet', 'sun', 'moon', 'star', 'moon', 'moon', 'sun', 'star', 'star', 'star', 'star'],k = 3) == ['star', 'moon', 'sun']\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'],k = 12) == ['eight', 'eleven', 'five', 'four', 'nine', 'one', 'seven', 'six', 'ten', 'three', 'twelve', 'two']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'cat', 'cat', 'cat', 'dog', 'cat'],k = 3) == ['cat', 'dog', 'zebra']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'dog', 'zebra', 'dog', 'duck', 'duck', 'zebra', 'dog', 'zebra', 'zebra', 'dog'],k = 3) == ['zebra', 'dog', 'duck']\n assert candidate(words = ['x', 'y', 'z', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y'],k = 2) == ['x', 'y']\n assert candidate(words = ['alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'alpha', 'beta', 'gamma'],k = 5) == ['alpha', 'beta', 'gamma', 'delta', 'epsilon']\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef'],k = 2) == ['a', 'ab']\n assert candidate(words = ['red', 'blue', 'green', 'red', 'blue', 'red', 'green', 'red', 'blue', 'green', 'red', 'red'],k = 3) == ['red', 'blue', 'green']\n assert candidate(words = ['a', 'abc', 'abcd', 'abc', 'a', 'abcde', 'abcd', 'abcde', 'a', 'abcd'],k = 3) == ['a', 'abcd', 'abc']\n assert candidate(words = ['red', 'blue', 'green', 'red', 'blue', 'green', 'red', 'blue', 'green', 'red', 'blue', 'green', 'red'],k = 2) == ['red', 'blue']\n assert candidate(words = ['cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'rat', 'cat', 'bat', 'cat', 'bat', 'bat'],k = 3) == ['bat', 'cat', 'rat']\n assert candidate(words = ['leetcode', 'coding', 'interview', 'questions', 'leetcode', 'interview', 'coding', 'coding', 'leetcode', 'questions', 'questions'],k = 3) == ['coding', 'leetcode', 'questions']\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen'],k = 5) == ['eight', 'eleven', 'five', 'four', 'nine']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'kiwi', 'kiwi', 'kiwi', 'banana'],k = 2) == ['apple', 'banana']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'banana', 'kiwi', 'kiwi', 'kiwi', 'kiwi'],k = 2) == ['kiwi', 'banana']\n assert candidate(words = ['apple', 'banana', 'cherry', 'date', 'elderberry', 'fig', 'grape', 'honeydew', 'kiwi', 'lemon', 'mango', 'nectarine', 'orange', 'papaya', 'quince', 'raspberry', 'strawberry', 'tangerine', 'ugli', 'vanilla', 'watermelon', 'xigua', 'yam', 'zucchini'],k = 10) == ['apple', 'banana', 'cherry', 'date', 'elderberry', 'fig', 'grape', 'honeydew', 'kiwi', 'lemon']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'lion', 'tiger', 'lion', 'tiger', 'tiger', 'lion', 'zebra'],k = 3) == ['zebra', 'lion', 'tiger']\n assert candidate(words = ['x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z', 'x', 'y', 'z'],k = 3) == ['x', 'y', 'z']\n assert candidate(words = ['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', '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', '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 = 1) == ['a']\n assert candidate(words = ['sun', 'moon', 'star', 'planet', 'moon', 'moon', 'sun', 'star', 'planet', 'planet', 'star'],k = 4) == ['moon', 'planet', 'star', 'sun']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa'],k = 4) == ['a', 'aa', 'aaa', 'aaaa']\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', 'a', 'b', 'c', 'd'],k = 10) == ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']\n assert candidate(words = ['a', 'a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd', 'd', 'e', 'e', 'e', 'e', 'e', 'e', 'e'],k = 2) == ['e', 'd']\n assert candidate(words = ['leetcode', 'python', 'java', 'c', 'cpp', 'python', 'java', 'java', 'c', 'cpp', 'cpp', 'cpp', 'c', 'c', 'java', 'java', 'java', 'python'],k = 4) == ['java', 'c', 'cpp', 'python']\n assert candidate(words = ['sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky', 'sun', 'moon', 'star', 'sky'],k = 4) == ['moon', 'sky', 'star', 'sun']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'cat', 'cat', 'dog', 'cat'],k = 3) == ['cat', 'dog', 'zebra']\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'one', 'two', 'three', 'four', 'five'],k = 5) == ['five', 'four', 'one', 'three', 'two']\n assert candidate(words = ['frequency', 'of', 'words', 'frequency', 'in', 'a', 'sentence', 'frequency', 'sentence', 'frequency'],k = 3) == ['frequency', 'sentence', 'a']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'kiwi', 'kiwi', 'kiwi'],k = 3) == ['apple', 'kiwi', 'banana']\n assert candidate(words = ['aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'ccc'],k = 2) == ['aaa', 'bbb']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'cat', 'cat', 'cat', 'bird', 'bird', 'bird', 'bird'],k = 4) == ['bird', 'cat', 'zebra', 'dog']\n assert candidate(words = ['alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'eta', 'theta', 'iota', 'kappa', 'lambda', 'mu', 'nu', 'xi', 'omicron', 'pi'],k = 5) == ['alpha', 'beta', 'delta', 'epsilon', 'eta']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'dog', 'dog', 'dog', 'zebra', 'zebra', 'zebra', 'zebra'],k = 2) == ['zebra', 'dog']\n assert candidate(words = ['cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog', 'cat', 'dog'],k = 2) == ['cat', 'dog']\n assert candidate(words = ['hello', 'world', 'hello', 'world', 'hello', 'world', 'hello', 'world', 'hello', 'world', 'hello', 'world'],k = 1) == ['hello']\n assert candidate(words = ['python', 'java', 'c', 'cpp', 'python', 'java', 'python', 'java', 'java', 'c', 'c', 'cpp', 'cpp', 'cpp', 'cpp'],k = 4) == ['cpp', 'java', 'c', 'python']\n assert candidate(words = ['algorithm', 'data', 'structure', 'algorithm', 'data', 'data', 'algorithm', 'algorithm', 'data', 'structure', 'structure', 'structure', 'structure'],k = 2) == ['structure', 'algorithm']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'a', 'b', 'a', 'a', 'b', 'b', 'c', 'd', 'd', 'e', 'e', 'e', 'e'],k = 4) == ['a', 'b', 'e', 'c']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'banana', 'kiwi', 'kiwi', 'kiwi', 'kiwi'],k = 3) == ['kiwi', 'apple', 'banana']\n assert candidate(words = ['panda', 'polar', 'bear', 'panda', 'polar', 'polar', 'polar', 'bear', 'bear', 'bear', 'bear', 'bear'],k = 3) == ['bear', 'polar', 'panda']\n assert candidate(words = ['flower', 'flow', 'flight', 'flow', 'flight', 'flow', 'flower', 'flight', 'flower', 'flower'],k = 4) == ['flower', 'flight', 'flow']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'zebra', 'dog', 'dog', 'dog', 'duck', 'duck', 'duck', 'duck'],k = 2) == ['dog', 'duck']\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'],k = 5) == ['eight', 'five', 'four', 'nine', 'one']\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', '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', 'b', 'c', 'd', 'e']\n assert candidate(words = ['cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat'],k = 2) == ['cat', 'bat']\n assert candidate(words = ['cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat', 'cat', 'bat', 'rat'],k = 2) == ['bat', 'cat']\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'],k = 5) == ['a', 'b', 'c', 'd', 'e']\n assert candidate(words = ['red', 'blue', 'green', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue', 'red', 'blue'],k = 3) == ['blue', 'red', 'green']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'banana', 'kiwi', 'kiwi', 'kiwi', 'kiwi'],k = 3) == ['kiwi', 'banana', 'apple']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'banana', 'grape', 'grape', 'grape'],k = 3) == ['banana', 'grape', 'apple']\n assert candidate(words = ['x', 'y', 'z', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k', 'j', 'i', 'h', 'g', 'f', 'e', 'd', 'c', 'b', 'a'],k = 5) == ['a', 'b', 'c', 'd', 'e']\n assert candidate(words = ['aaaaa', 'aaa', 'aa', 'a', 'aaaaa', 'aaa', 'aa', 'a', 'aaaaa', 'aaa', 'aa', 'a', 'aaaaa', 'aaa', 'aa', 'a', 'aaaaa', 'aaa', 'aa', 'a'],k = 4) == ['a', 'aa', 'aaa', 'aaaaa']\n assert candidate(words = ['jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk', 'jump', 'run', 'walk'],k = 2) == ['jump', 'run']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'zebra', 'dog', 'dog', 'dog', 'duck', 'duck', 'duck', 'duck', 'duck', 'zebra'],k = 3) == ['duck', 'dog', 'zebra']\n assert candidate(words = ['repeated', 'word', 'repeated', 'word', 'repeated', 'word', 'unique', 'unique', 'unique', 'unique', 'another', 'another', 'another', 'another', 'another'],k = 3) == ['another', 'unique', 'repeated']\n assert candidate(words = ['sun', 'moon', 'star', 'moon', 'sun', 'moon', 'star', 'sun', 'star', 'star', 'star', 'sun', 'moon', 'moon', 'moon'],k = 3) == ['moon', 'star', 'sun']\n assert candidate(words = ['car', 'bike', 'train', 'car', 'bike', 'car', 'bike', 'train', 'car', 'bike', 'car', 'bike', 'train', 'car', 'train', 'car', 'bike', 'train'],k = 3) == ['car', 'bike', 'train']\n assert candidate(words = ['alpha', 'beta', 'gamma', 'delta', 'epsilon', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'alpha', 'beta', 'gamma', 'delta', 'epsilon'],k = 3) == ['alpha', 'beta', 'delta']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa'],k = 3) == ['a', 'aa', 'aaa']\n assert candidate(words = ['cat', 'bat', 'rat', 'hat', 'mat', 'pat', 'sat', 'fat', 'tat', 'cat', 'bat', 'rat', 'hat', 'mat', 'pat', 'sat', 'fat', 'tat', 'cat', 'bat', 'rat', 'hat', 'mat', 'pat', 'sat', 'fat', 'tat'],k = 5) == ['bat', 'cat', 'fat', 'hat', 'mat']\n assert candidate(words = ['zebra', 'dog', 'duck', 'dog', 'zebra', 'zebra', 'lion', 'tiger', 'bear', 'zebra', 'dog', 'duck'],k = 4) == ['zebra', 'dog', 'duck', 'bear']\n assert candidate(words = ['elephant', 'giraffe', 'lion', 'tiger', 'elephant', 'lion', 'giraffe', 'tiger', 'elephant', 'lion', 'giraffe', 'tiger', 'lion', 'giraffe', 'tiger', 'elephant', 'tiger', 'giraffe', 'lion', 'tiger'],k = 4) == ['tiger', 'giraffe', 'lion', 'elephant']\n assert candidate(words = ['sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon', 'sunrise', 'sunset', 'midnight', 'noon'],k = 4) == ['midnight', 'noon', 'sunrise', 'sunset']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'banana', 'banana'],k = 2) == ['banana', 'apple']\n assert candidate(words = ['flower', 'tree', 'bush', 'flower', 'tree', 'flower', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush', 'flower', 'tree', 'bush'],k = 2) == ['flower', 'bush']\n assert candidate(words = ['apple', 'banana', 'apple', 'orange', 'banana', 'banana', 'kiwi', 'kiwi', 'kiwi'],k = 3) == ['banana', 'kiwi', 'apple']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa', 'aaaa', 'a', 'aa', 'aaa'],k = 2) == ['a', 'aa']\n assert candidate(words = ['sun', 'moon', 'star', 'planet', 'galaxy', 'universe', 'sun', 'moon', 'star', 'planet', 'galaxy', 'universe', 'sun', 'moon', 'star', 'planet', 'galaxy', 'universe', 'sun', 'moon', 'star', 'planet', 'galaxy', 'universe'],k = 3) == ['galaxy', 'moon', 'planet']\n assert candidate(words = ['aaa', 'aa', 'a', 'aaaa', 'aa', 'a', 'aaa', 'aa', 'a', 'aaaa', 'aa', 'a', 'aaa', 'aa', 'a', 'aaaa', 'aa', 'a', 'aaa', 'aa', 'a'],k = 4) == ['a', 'aa', 'aaa', 'aaaa']\n assert candidate(words = ['cat', 'dog', 'cat', 'bird', 'dog', 'cat', 'dog', 'dog', 'dog', 'cat', 'cat', 'bird'],k = 3) == ['cat', 'dog', 'bird']\n assert candidate(words = ['sun', 'moon', 'star', 'sun', 'moon', 'star', 'sun', 'moon', 'star', 'moon', 'star', 'star', 'star'],k = 1) == ['star']\n assert candidate(words = ['red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue', 'green', 'yellow', 'red', 'blue'],k = 2) == ['blue', 'red']\n", "comparison": "exact"}, "public_tests": ["[\"i\",\"love\",\"leetcode\",\"i\",\"love\",\"coding\"]\n2", "[\"the\",\"day\",\"is\",\"sunny\",\"the\",\"the\",\"the\",\"sunny\",\"is\",\"is\"]\n4"], "hints": [], "metadata": {"canonical_parameter_names": ["words", "k"], "leetcode_dataset_entry_point": "Solution().topKFrequent", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:42+00:00", "tests_total": 92, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "hash-table", "string", "trie", "sorting", "heap-priority-queue", "bucket-sort", "counting"]}, "language": "cpp", "interface": {"raw_signature": "vector topKFrequent(vector& words, int k) {", "container": "Solution", "callable": "topKFrequent", "parameters": [{"name": "words", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 693, "task_id": "binary-number-with-alternating-bits", "difficulty": "Easy", "problem_description": "Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values.\n\nExample 1:\n\nInput: n = 5\nOutput: true\nExplanation: The binary representation of 5 is: 101\n\nExample 2:\n\nInput: n = 7\nOutput: false\nExplanation: The binary representation of 7 is: 111.\n\nExample 3:\n\nInput: n = 11\nOutput: false\nExplanation: The binary representation of 11 is: 1011.\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == False\n assert candidate(n = 11) == False\n assert candidate(n = 15) == False\n assert candidate(n = 2) == True\n assert candidate(n = 1) == True\n assert candidate(n = 7) == False\n assert candidate(n = 10) == True\n assert candidate(n = 5) == True\n assert candidate(n = 63) == False\n assert candidate(n = 33554431) == False\n assert candidate(n = 131071) == False\n assert candidate(n = 2147483646) == False\n assert candidate(n = 357913941) == True\n assert candidate(n = 21) == True\n assert candidate(n = 170) == True\n assert candidate(n = 178956970) == True\n assert candidate(n = 11184810) == True\n assert candidate(n = 341) == True\n assert candidate(n = 2147483647) == False\n assert candidate(n = 32767) == False\n assert candidate(n = 67108863) == False\n assert candidate(n = 100000001) == False\n assert candidate(n = 21845) == True\n assert candidate(n = 2047) == False\n assert candidate(n = 262143) == False\n assert candidate(n = 16383) == False\n assert candidate(n = 524287) == False\n assert candidate(n = 268435455) == False\n assert candidate(n = 4194303) == False\n assert candidate(n = 1431655765) == True\n assert candidate(n = 4) == False\n assert candidate(n = 134217727) == False\n assert candidate(n = 715827882) == True\n assert candidate(n = 8388607) == False\n assert candidate(n = 134217728) == False\n assert candidate(n = 2097151) == False\n assert candidate(n = 1365) == True\n assert candidate(n = 33) == False\n assert candidate(n = 1073741823) == False\n assert candidate(n = 682) == True\n assert candidate(n = 101010101) == False\n assert candidate(n = 42) == True\n assert candidate(n = 16777215) == False\n assert candidate(n = 858993459) == False\n assert candidate(n = 4095) == False\n assert candidate(n = 8) == False\n assert candidate(n = 255) == False\n assert candidate(n = 22369621) == True\n assert candidate(n = 8191) == False\n assert candidate(n = 18) == False\n assert candidate(n = 44739242) == True\n assert candidate(n = 1023) == False\n assert candidate(n = 555555555) == False\n assert candidate(n = 20) == False\n assert candidate(n = 218) == False\n assert candidate(n = 65535) == False\n assert candidate(n = 1000000001) == False\n assert candidate(n = 1010101010) == False\n assert candidate(n = 286331153) == False\n assert candidate(n = 85) == True\n assert candidate(n = 517) == False\n assert candidate(n = 1048575) == False\n assert candidate(n = 89478485) == True\n assert candidate(n = 536870911) == False\n assert candidate(n = 31) == False\n assert candidate(n = 6) == False\n", "comparison": "exact"}, "public_tests": ["5", "7", "11"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().hasAlternatingBits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:44+00:00", "tests_total": 72, "tests_dropped": 6, "flags": [], "topic_tags": ["bit-manipulation"]}, "language": "cpp", "interface": {"raw_signature": "bool hasAlternatingBits(int n) {", "container": "Solution", "callable": "hasAlternatingBits", "parameters": [{"name": "n", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 695, "task_id": "max-area-of-island", "difficulty": "Medium", "problem_description": "You are given an m x n binary matrix grid. An island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.\n\nThe area of an island is the number of cells with a value 1 in the island.\n\nReturn the maximum area of an island in grid. If there is no island, return 0.\n\nExample 1:\n\nInput: grid = [[0,0,1,0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,1,1,0,1,0,0,0,0,0,0,0,0],[0,1,0,0,1,1,0,0,1,0,1,0,0],[0,1,0,0,1,1,0,0,1,1,1,0,0],[0,0,0,0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,0,0,0,0,0,0,1,1,0,0,0,0]]\nOutput: 6\nExplanation: The answer is not 11, because the island must be connected 4-directionally.\n\nExample 2:\n\nInput: grid = [[0,0,0,0,0,0,0,0]]\nOutput: 0\n\nConstraints:\n\n- m == grid.length\n- n == grid[i].length\n- 1 <= m, n <= 50\n- grid[i][j] is either 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [[0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0]]) == 6\n assert candidate(grid = [[1]]) == 1\n assert candidate(grid = [[0]]) == 0\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0]]) == 0\n assert candidate(grid = [[1, 0, 1, 1, 1], [1, 0, 1, 0, 1], [1, 0, 1, 1, 1], [1, 0, 0, 0, 0]]) == 8\n assert candidate(grid = [[1, 1, 0, 0, 0], [1, 1, 0, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 1]]) == 4\n assert candidate(grid = [[0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0], [0, 0, 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, 1, 1, 0], [1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0]]) == 8\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]]) == 24\n assert candidate(grid = [[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, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0]]) == 28\n assert candidate(grid = [[1, 1, 1, 1, 0], [1, 0, 0, 1, 0], [1, 0, 0, 1, 0], [1, 1, 1, 1, 0]]) == 12\n assert candidate(grid = [[0, 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, 0], [0, 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, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 1\n assert candidate(grid = [[1, 1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 0, 1, 0], [1, 0, 1, 1, 1, 0, 1], [0, 0, 0, 1, 0, 1, 0]]) == 4\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, 1, 1, 1, 1, 0, 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], [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, 1, 1, 1, 1, 0, 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, 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]]) == 10\n assert candidate(grid = [[1, 0, 1, 1, 0, 0, 0], [1, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1], [0, 1, 0, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0, 1]]) == 5\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, 0, 1, 0], [0, 0, 0, 0, 0, 0]]) == 9\n assert candidate(grid = [[0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0], [0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0], [1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1]]) == 6\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]]) == 16\n assert candidate(grid = [[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, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 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, 0, 0, 0, 0, 0, 0, 0]]) == 48\n assert candidate(grid = [[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(grid = [[1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0], [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1], [0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 19\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\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 26\n assert candidate(grid = [[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\n assert candidate(grid = [[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, 1, 0, 0, 1, 1, 1, 1, 0, 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, 1, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0]]) == 12\n assert candidate(grid = [[1, 1, 0, 1, 1], [1, 0, 1, 0, 1], [1, 0, 1, 1, 0], [0, 1, 0, 1, 1], [1, 1, 1, 0, 1]]) == 6\n assert candidate(grid = [[1, 1, 1, 1, 1, 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, 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, 0, 0]]) == 12\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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 105\n assert candidate(grid = [[1, 1, 0, 0, 0], [1, 1, 0, 0, 0], [0, 0, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 0, 1]]) == 7\n assert candidate(grid = [[1, 1, 1, 1, 0], [1, 0, 0, 1, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1], [1, 1, 1, 0, 1]]) == 7\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, 0, 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, 1, 0, 1], [1, 0, 1, 0, 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, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1], [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, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0], [1, 0, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0], [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, 0, 1, 0, 1, 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]]) == 189\n assert candidate(grid = [[1, 1, 1, 1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 1, 0, 0, 0, 1]]) == 11\n assert candidate(grid = [[0, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]]) == 9\n assert candidate(grid = [[1, 1, 0, 0, 1], [1, 1, 0, 0, 1], [0, 0, 1, 0, 0], [0, 0, 1, 1, 0], [1, 0, 0, 1, 1]]) == 5\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, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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]]) == 12\n assert candidate(grid = [[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, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 1\n assert candidate(grid = [[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], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 1\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, 0, 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, 1, 0, 1], [1, 0, 1, 0, 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, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 90\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, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 4\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, 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, 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, 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, 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]]) == 8\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, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 0, 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]]) == 36\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, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 14\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 28\n assert candidate(grid = [[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, 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, 1, 1, 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, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 6\n assert candidate(grid = [[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 30\n assert candidate(grid = [[1, 0, 0, 1, 0, 1, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 1, 0, 1], [0, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 6\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]]) == 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\n assert candidate(grid = [[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, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 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]]) == 44\n assert candidate(grid = [[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], [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]]) == 1\n assert candidate(grid = [[1, 1, 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, 0, 0, 0, 0, 0, 0, 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, 0, 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, 0, 0, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 8\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, 0, 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, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1], [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 65\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, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 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(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, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0, 1, 0]]) == 1\n assert candidate(grid = [[1, 1, 0, 0, 0], [1, 0, 0, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 0], [0, 1, 1, 1, 0]]) == 6\n assert candidate(grid = [[1, 1, 0, 1, 1], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1], [1, 1, 0, 1, 1]]) == 3\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]]) == 1\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, 0, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 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]]) == 36\n assert candidate(grid = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 0, 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, 0, 1, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 2\n", "comparison": "exact"}, "public_tests": ["[[0,0,1,0,0,0,0,1,0,0,0,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,1,1,0,1,0,0,0,0,0,0,0,0],[0,1,0,0,1,1,0,0,1,0,1,0,0],[0,1,0,0,1,1,0,0,1,1,1,0,0],[0,0,0,0,0,0,0,0,0,0,1,0,0],[0,0,0,0,0,0,0,1,1,1,0,0,0],[0,0,0,0,0,0,0,1,1,0,0,0,0]]", "[[0,0,0,0,0,0,0,0]]"], "hints": [], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().maxAreaOfIsland", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:48+00:00", "tests_total": 59, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "union-find", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "int maxAreaOfIsland(vector>& grid) {", "container": "Solution", "callable": "maxAreaOfIsland", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 696, "task_id": "count-binary-substrings", "difficulty": "Easy", "problem_description": "Given a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively.\n\nSubstrings that occur multiple times are counted the number of times they occur.\n\nExample 1:\n\nInput: s = \"00110011\"\nOutput: 6\nExplanation: There are 6 substrings that have equal number of consecutive 1's and 0's: \"0011\", \"01\", \"1100\", \"10\", \"0011\", and \"01\".\nNotice that some of these substrings repeat and are counted the number of times they occur.\nAlso, \"00110011\" is not a valid substring because all the 0's (and 1's) are not grouped together.\n\nExample 2:\n\nInput: s = \"10101\"\nOutput: 4\nExplanation: There are 4 substrings: \"10\", \"01\", \"10\", \"01\" that have equal number of consecutive 1's and 0's.\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s[i] is either '0' or '1'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"000111000111\") == 9\n assert candidate(s = \"01\") == 1\n assert candidate(s = \"110011\") == 4\n assert candidate(s = \"00110011\") == 6\n assert candidate(s = \"11110000\") == 4\n assert candidate(s = \"10101\") == 4\n assert candidate(s = \"1100\") == 2\n assert candidate(s = \"100011000110\") == 8\n assert candidate(s = \"10001111\") == 4\n assert candidate(s = \"00001111\") == 4\n assert candidate(s = \"000111\") == 3\n assert candidate(s = \"001100\") == 4\n assert candidate(s = \"10\") == 1\n assert candidate(s = \"01010101\") == 7\n assert candidate(s = \"10101010\") == 7\n assert candidate(s = \"1010101010\") == 9\n assert candidate(s = \"0000000000\") == 0\n assert candidate(s = \"1100110011\") == 8\n assert candidate(s = \"11001100\") == 6\n assert candidate(s = \"0011\") == 2\n assert candidate(s = \"0101010101\") == 9\n assert candidate(s = \"100000111111\") == 6\n assert candidate(s = \"000110011001100110011001\") == 21\n assert candidate(s = \"000000111111000000\") == 12\n assert candidate(s = \"00011000110001100011000110001100011000110001100011\") == 38\n assert candidate(s = \"0001111100001111000011110000\") == 23\n assert candidate(s = \"111000111000111000\") == 15\n assert candidate(s = \"010011001100110011001100\") == 22\n assert candidate(s = \"001100110011001100110011001100110011001100110011001100110011001100110011\") == 70\n assert candidate(s = \"000000111111000000111111\") == 18\n assert candidate(s = \"111001110011100111\") == 12\n assert candidate(s = \"110011001100110011001100\") == 22\n assert candidate(s = \"1100110011001100\") == 14\n assert candidate(s = \"00000000111111110000000011111111\") == 24\n assert candidate(s = \"10101010101010101010101010\") == 25\n assert candidate(s = \"111111111111000000000000111111111111000000000000111111111111\") == 48\n assert candidate(s = \"111111111100000000000000111111111100000000000000\") == 30\n assert candidate(s = \"001100110011001100110011\") == 22\n assert candidate(s = \"000110001100011000\") == 12\n assert candidate(s = \"000111000111000111\") == 15\n assert candidate(s = \"101010101010101010101010\") == 23\n assert candidate(s = \"1100110011001100110011001100110011001100110011001100\") == 50\n assert candidate(s = \"010101010101010101\") == 17\n assert candidate(s = \"1110000011100000111\") == 12\n assert candidate(s = \"111000111000111000111000111000\") == 27\n assert candidate(s = \"111111000000111111110000000011111111110000000000\") == 38\n assert candidate(s = \"0000111100001111000011110000111100001111000011110000\") == 48\n assert candidate(s = \"11001100110011001100110011001100\") == 30\n assert candidate(s = \"000111000111000111000111\") == 21\n assert candidate(s = \"100100100100100100100100100100\") == 19\n assert candidate(s = \"1100110011001100110011001100110011001100\") == 38\n assert candidate(s = \"1010101010101010\") == 15\n assert candidate(s = \"11001111000011110000\") == 16\n assert candidate(s = \"111111000000111111000000\") == 18\n assert candidate(s = \"111100001111000011110000\") == 20\n assert candidate(s = \"110011001100110011\") == 16\n assert candidate(s = \"0101010101010101010101\") == 21\n assert candidate(s = \"100100100100100100\") == 11\n assert candidate(s = \"0011001100110011\") == 14\n assert candidate(s = \"11110000111000111000111\") == 19\n assert candidate(s = \"11111000001111100000\") == 15\n assert candidate(s = \"000011110000111100001111000011110000\") == 32\n assert candidate(s = \"100100100100100100100100\") == 15\n assert candidate(s = \"0011001100110011001100110011001100110011001100110011001100110011\") == 62\n assert candidate(s = \"0011001100110011001100110011001100110011\") == 38\n assert candidate(s = \"110011001100110011001100110011001100110011001100110011001100110011001100\") == 70\n assert candidate(s = \"010101010101010101010101010\") == 26\n assert candidate(s = \"000000001111111100000000111111110000000011111111\") == 40\n assert candidate(s = \"1111000011001100\") == 12\n assert candidate(s = \"000000001111111100000000\") == 16\n assert candidate(s = \"101010101010\") == 11\n assert candidate(s = \"010101010101010101010101010101010101010101010101\") == 47\n assert candidate(s = \"111111111100000000001111111111\") == 20\n assert candidate(s = \"001100001111000011110000111100001111000011110000\") == 44\n assert candidate(s = \"111000111000111000111000111000111\") == 30\n assert candidate(s = \"0110110110110110110110\") == 14\n assert candidate(s = \"0001100110011001\") == 13\n assert candidate(s = \"0000000000000000000000000000000011111111111111111111111111111111\") == 32\n assert candidate(s = \"000011110000\") == 8\n assert candidate(s = \"11110000001111000000\") == 12\n assert candidate(s = \"11111111000000001111111100000000\") == 24\n assert candidate(s = \"1010101010101010101010101010101010\") == 33\n assert candidate(s = \"1010101010101010101010101010101010101010101010101010101010101010101010101010101010\") == 81\n assert candidate(s = \"001100110011\") == 10\n assert candidate(s = \"0000000011111111000000001111111100000000111111110000000011111111\") == 56\n assert candidate(s = \"011011011011011011011011\") == 15\n assert candidate(s = \"00000000001111111111\") == 10\n assert candidate(s = \"000000001111111111111111\") == 8\n assert candidate(s = \"010101010101010101010101010101\") == 29\n assert candidate(s = \"00000111110000011111\") == 15\n assert candidate(s = \"111100001111000011110000111100001111000011110000\") == 44\n assert candidate(s = \"11001100110011001100\") == 18\n assert candidate(s = \"01010101010101010101010101010101\") == 31\n assert candidate(s = \"000000000011111111111111000000000011111111111111\") == 30\n assert candidate(s = \"111111111111000000000000111111111111\") == 24\n assert candidate(s = \"1010101010101010101010101010\") == 27\n assert candidate(s = \"111110000011110000\") == 13\n assert candidate(s = \"1001001001001001001001\") == 14\n assert candidate(s = \"111000111000111000111000111\") == 24\n assert candidate(s = \"1110000011100000\") == 9\n assert candidate(s = \"111000111000\") == 9\n assert candidate(s = \"1111111100000000\") == 8\n assert candidate(s = \"11111100000011110000\") == 14\n assert candidate(s = \"11111111110000000000000000000000001111111111111111111111111111111\") == 34\n assert candidate(s = \"111111110000000011111111000000001111111100000000\") == 40\n assert candidate(s = \"11001100110011001100110011001100110011001100110011001100\") == 54\n assert candidate(s = \"1100111100001111000011110000111100001111000011110000\") == 48\n assert candidate(s = \"11110000111100001111000011110000\") == 28\n assert candidate(s = \"10100101100101\") == 11\n assert candidate(s = \"00000000001111111111111\") == 10\n assert candidate(s = \"111000111000111000111000111000111000111000111000111000\") == 51\n assert candidate(s = \"0101010101010101\") == 15\n assert candidate(s = \"100000111111000000111111\") == 18\n assert candidate(s = \"100000111111100000\") == 11\n assert candidate(s = \"100000000111111111\") == 9\n assert candidate(s = \"00110011001100110011001100110011001100110011001100110011\") == 54\n assert candidate(s = \"000111000111000111000111000111\") == 27\n assert candidate(s = \"000011110000111100001111\") == 20\n assert candidate(s = \"11111000001111110000011111000001111100000111110000011111\") == 50\n assert candidate(s = \"000000000011111111110000000000\") == 20\n assert candidate(s = \"1001001001001001001001001001001001\") == 22\n assert candidate(s = \"111111000000111111000000111111000000\") == 30\n assert candidate(s = \"00110011001100110011\") == 18\n assert candidate(s = \"001100110011001100110011001100110011001100110011001100110011\") == 58\n assert candidate(s = \"1111000011110000\") == 12\n assert candidate(s = \"00001111000011110000111100001111000011110000\") == 40\n assert candidate(s = \"101010101010101010101010101010101010101010101010\") == 47\n assert candidate(s = \"100000000011111111\") == 9\n assert candidate(s = \"1010101010101010101010\") == 21\n assert candidate(s = \"1010101010101010101010101010101010101010\") == 39\n assert candidate(s = \"1111100001111000011110000\") == 20\n assert candidate(s = \"000000000000111111111111000000000000111111111111000000000000\") == 48\n assert candidate(s = \"1100110011001100110011001100110011001100110011001100110011001100\") == 62\n assert candidate(s = \"1111100000000000000111111\") == 11\n assert candidate(s = \"1001100110011001\") == 14\n assert candidate(s = \"1100110011001100110011\") == 20\n assert candidate(s = \"0011001100110011001100110011\") == 26\n assert candidate(s = \"110011001100110011001100110011\") == 28\n assert candidate(s = \"01010101010101010101\") == 19\n assert candidate(s = \"11001100110011\") == 12\n assert candidate(s = \"11100000111000001110000011100000\") == 21\n assert candidate(s = \"110011001100110011001100110011001100110011\") == 40\n assert candidate(s = \"0000111100011100\") == 12\n assert candidate(s = \"101010101010101010101010101010101010\") == 35\n assert candidate(s = \"10000011111000001111110000011111111000000111111110\") == 39\n assert candidate(s = \"10101010101010101010\") == 19\n assert candidate(s = \"10101010101010\") == 13\n assert candidate(s = \"0011001100110011001100110011001100\") == 32\n assert candidate(s = \"111000111000111000111000\") == 21\n assert candidate(s = \"000000111111000000111111000000\") == 24\n assert candidate(s = \"010101010101010101010101010101010101010101\") == 41\n assert candidate(s = \"0000000000011111111111\") == 11\n assert candidate(s = \"11111110000000000000000\") == 7\n assert candidate(s = \"000000000000111111111111000000000000\") == 24\n assert candidate(s = \"111111000000000000000000111111\") == 12\n assert candidate(s = \"111111000000111111110000000011111111110000000000001111111111100000000000\") == 60\n assert candidate(s = \"1111100000000011111000000000\") == 15\n assert candidate(s = \"0000111100001111\") == 12\n", "comparison": "exact"}, "public_tests": ["\"00110011\"", "\"10101\""], "hints": ["How many valid binary substrings exist in \"000111\", and how many in \"11100\"? What about \"00011100\"?"], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().countBinarySubstrings", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:50+00:00", "tests_total": 158, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "cpp", "interface": {"raw_signature": "int countBinarySubstrings(string s) {", "container": "Solution", "callable": "countBinarySubstrings", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 697, "task_id": "degree-of-an-array", "difficulty": "Easy", "problem_description": "Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.\n\nYour task is to find the smallest possible length of a (contiguous) subarray of nums, that has the same degree as nums.\n\nExample 1:\n\nInput: nums = [1,2,2,3,1]\nOutput: 2\nExplanation:\nThe input array has a degree of 2 because both elements 1 and 2 appear twice.\nOf the subarrays that have the same degree:\n[1, 2, 2, 3, 1], [1, 2, 2, 3], [2, 2, 3, 1], [1, 2, 2], [2, 2, 3], [2, 2]\nThe shortest length is 2. So return 2.\n\nExample 2:\n\nInput: nums = [1,2,2,3,1,4,2]\nOutput: 6\nExplanation:\nThe degree is 3 because the element 2 is repeated 3 times.\nSo [2,2,3,1,4,2] is the shortest subarray, therefore returning 6.\n\nConstraints:\n\n- nums.length will be between 1 and 50,000.\n- nums[i] will be an integer between 0 and 49,999.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 2, 2, 2, 3]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 10\n assert candidate(nums = [1, 2, 2, 3, 1]) == 2\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 0, 0]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]) == 2\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\n assert candidate(nums = [0, 1, 0, 1, 0, 1]) == 5\n assert candidate(nums = [0, 0, 1, 1, 1, 2, 2, 3, 3, 3]) == 3\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [4, 4, 4, 4, 4]) == 5\n assert candidate(nums = [9, 9, 9, 10, 10, 11, 11, 11, 11, 11]) == 5\n assert candidate(nums = [4, 4, 3, 3, 2, 2, 1, 1, 0, 0]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 0, 0, 0, 0]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 11\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 1, 1, 2, 2, 3]) == 3\n assert candidate(nums = [5, 5, 5, 5, 6, 6, 7, 8, 8, 8, 8]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1]) == 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]) == 20\n assert candidate(nums = [5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [1, 2, 2, 3, 1, 4, 2]) == 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]) == 2\n assert candidate(nums = [5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [16, 17, 18, 18, 19, 19, 19, 20, 20, 20, 20]) == 4\n assert candidate(nums = [12, 12, 13, 13, 14, 14, 15, 15, 15, 15]) == 4\n assert candidate(nums = [1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [5, 5, 1, 1, 1, 2, 2, 3, 3]) == 3\n assert candidate(nums = [49999, 49999, 49998, 49998, 49997]) == 2\n assert candidate(nums = [4, 1, 1, 2, 2, 1, 3]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 4\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 1, 1]) == 13\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3]) == 3\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]) == 6\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 20\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]) == 45\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, 1]) == 42\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, 10, 10, 10, 10]) == 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, 1, 2, 3, 4, 5]) == 21\n assert candidate(nums = [47, 47, 47, 23, 23, 38, 38, 38, 38, 59, 59, 59, 59, 59, 10, 10, 10, 10, 10, 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, 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\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]) == 21\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, 2, 2]) == 22\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 1, 1, 1, 1, 1]) == 26\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]) == 10\n assert candidate(nums = [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, 10, 10, 10, 10, 10, 10, 10, 10]) == 24\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 11\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, 1, 1, 1, 1, 1]) == 26\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, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 13\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, 1, 1, 1]) == 44\n assert candidate(nums = [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]) == 22\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]) == 21\n assert candidate(nums = [1, 2, 2, 3, 1, 4, 2, 5, 5, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [10000, 20000, 30000, 40000, 50000, 10000, 20000, 30000, 40000, 50000, 10000, 10000]) == 12\n assert candidate(nums = [4, 3, 3, 4, 2, 1, 2, 3, 1, 4, 4, 4, 4, 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]) == 37\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]) == 10\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5]) == 17\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, 1, 1, 1, 1, 1]) == 56\n assert candidate(nums = [1, 2, 2, 3, 1, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6]) == 6\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, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 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, 1, 1, 2, 2, 3, 3]) == 32\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]) == 41\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 19\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]) == 26\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, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 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, 20, 20, 20, 20, 20, 20, 20, 20, 20]) == 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 22\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, 1, 1, 1, 1, 2, 2, 2, 2, 2]) == 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 1]) == 43\n assert candidate(nums = [2, 2, 2, 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]) == 21\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 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]) == 20\n assert candidate(nums = [9, 9, 9, 9, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 9, 9, 9, 9]) == 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, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 52\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]) == 21\n assert candidate(nums = [3, 1, 4, 4, 5, 5, 5, 2, 2, 2, 2, 3, 3, 1, 1, 1, 1, 1, 1, 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 42\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, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 10, 10, 10, 10]) == 16\n assert candidate(nums = [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]) == 22\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 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, 1]) == 22\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]) == 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, 1, 1, 1]) == 33\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]) == 20\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\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]) == 31\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\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 9, 9, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7]) == 17\n", "comparison": "exact"}, "public_tests": ["[1,2,2,3,1]", "[1,2,2,3,1,4,2]"], "hints": ["Say 5 is the only element that occurs the most number of times - for example, nums = [1, 5, 2, 3, 5, 4, 5, 6]. What is the answer?"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findShortestSubArray", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:53+00:00", "tests_total": 93, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table"]}, "language": "cpp", "interface": {"raw_signature": "int findShortestSubArray(vector& nums) {", "container": "Solution", "callable": "findShortestSubArray", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 698, "task_id": "partition-to-k-equal-sum-subsets", "difficulty": "Medium", "problem_description": "Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.\n\nExample 1:\n\nInput: nums = [4,3,2,3,5,2,1], k = 4\nOutput: true\nExplanation: It is possible to divide it into 4 subsets (5), (1, 4), (2,3), (2,3) with equal sums.\n\nExample 2:\n\nInput: nums = [1,2,3,4], k = 3\nOutput: false\n\nConstraints:\n\n- 1 <= k <= nums.length <= 16\n- 1 <= nums[i] <= 10^4\n- The frequency of each element is in the range [1, 4].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2, 2, 2, 2, 3, 4, 5],k = 4) == False\n assert candidate(nums = [4, 4, 6, 2, 3, 8, 10, 2, 10, 7],k = 4) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4],k = 3) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1],k = 8) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8],k = 4) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10],k = 4) == True\n assert candidate(nums = [4, 3, 2, 3, 5, 2, 1],k = 4) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10],k = 8) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 16) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600],k = 8) == True\n assert candidate(nums = [9, 4, 4, 9, 2, 4, 5, 4, 5, 3, 2, 9, 10, 7, 4, 7],k = 8) == False\n assert candidate(nums = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 16],k = 4) == False\n assert candidate(nums = [2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7],k = 7) == False\n assert candidate(nums = [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27],k = 6) == False\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 16) == True\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 6) == False\n assert candidate(nums = [3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == False\n assert candidate(nums = [33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33],k = 12) == False\n assert candidate(nums = [16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16],k = 8) == True\n assert candidate(nums = [1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9],k = 8) == False\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],k = 12) == False\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],k = 16) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],k = 16) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],k = 2) == True\n assert candidate(nums = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15],k = 12) == False\n assert candidate(nums = [8, 16, 32, 64, 128, 256, 512, 1024, 1, 2, 3, 4, 5, 6, 7, 8],k = 8) == False\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],k = 16) == True\n assert candidate(nums = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],k = 12) == False\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1],k = 8) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],k = 1) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160],k = 8) == True\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80],k = 8) == True\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6],k = 6) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8],k = 8) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3],k = 8) == False\n assert candidate(nums = [9, 18, 27, 36, 45, 54, 63, 72, 81, 90, 99, 108, 117, 126, 135, 144],k = 9) == False\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000],k = 8) == True\n assert candidate(nums = [3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5],k = 8) == True\n assert candidate(nums = [16, 16, 16, 16, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],k = 8) == False\n assert candidate(nums = [7, 2, 1, 6, 3, 4, 3, 3, 1, 2, 1, 2, 2, 2, 3, 3],k = 6) == False\n assert candidate(nums = [9, 4, 5, 9, 8, 4, 5, 10, 3, 4, 6, 7, 1, 2, 8],k = 3) == False\n assert candidate(nums = [9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3],k = 8) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 15) == False\n assert candidate(nums = [16, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],k = 16) == False\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],k = 8) == True\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 18, 27, 54, 81, 162, 324, 648, 1296, 2592, 5184],k = 6) == False\n assert candidate(nums = [15, 15, 15, 15, 10, 10, 10, 10, 5, 5, 5, 5, 1, 1, 1, 1],k = 6) == False\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 16) == False\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600],k = 4) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],k = 8) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 16) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 15) == False\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],k = 7) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],k = 4) == True\n assert candidate(nums = [4, 1, 5, 3, 2, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 16],k = 8) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 4) == True\n assert candidate(nums = [2, 2, 2, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 5) == False\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48],k = 16) == False\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 6) == False\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42],k = 8) == False\n assert candidate(nums = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15],k = 15) == False\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7],k = 8) == True\n assert candidate(nums = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15],k = 16) == True\n assert candidate(nums = [7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36],k = 16) == False\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000],k = 8) == True\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 9) == False\n assert candidate(nums = [16, 8, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == False\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5],k = 8) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 8) == True\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4],k = 4) == True\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],k = 8) == True\n assert candidate(nums = [8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128],k = 16) == False\n assert candidate(nums = [5, 5, 10, 10, 15, 15, 20, 20, 25, 25, 30, 30, 35, 35, 40, 40],k = 8) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160],k = 16) == False\n assert candidate(nums = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5],k = 16) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160],k = 4) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600],k = 16) == False\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5, 6],k = 3) == False\n assert candidate(nums = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],k = 6) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9],k = 6) == False\n assert candidate(nums = [3, 1, 2, 2, 3, 3, 2, 2, 1, 3, 3, 3, 2, 1, 2, 2],k = 6) == False\n assert candidate(nums = [3, 5, 1, 1, 3, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == False\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 10) == False\n", "comparison": "exact"}, "public_tests": ["[4,3,2,3,5,2,1]\n4", "[1,2,3,4]\n3"], "hints": ["We can figure out what target each subset must sum to. Then, let's recursively search, where at each call to our function, we choose which of k subsets the next value will join."], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().canPartitionKSubsets", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:56+00:00", "tests_total": 87, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "dynamic-programming", "backtracking", "bit-manipulation", "memoization", "bitmask"]}, "language": "cpp", "interface": {"raw_signature": "bool canPartitionKSubsets(vector& nums, int k) {", "container": "Solution", "callable": "canPartitionKSubsets", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 699, "task_id": "falling-squares", "difficulty": "Hard", "problem_description": "There are several squares being dropped onto the X-axis of a 2D plane.\n\nYou are given a 2D integer array positions where positions[i] = [left_i, sideLength_i] represents the i^th square with a side length of sideLength_i that is dropped with its left edge aligned with X-coordinate left_i.\n\nEach square is dropped one at a time from a height above any landed squares. It then falls downward (negative Y direction) until it either lands on the top side of another square or on the X-axis. A square brushing the left/right side of another square does not count as landing on it. Once it lands, it freezes in place and cannot be moved.\n\nAfter each square is dropped, you must record the height of the current tallest stack of squares.\n\nReturn an integer array ans where ans[i] represents the height described above after dropping the i^th square.\n\nExample 1:\n\nInput: positions = [[1,2],[2,3],[6,1]]\nOutput: [2,5,5]\nExplanation:\nAfter the first drop, the tallest stack is square 1 with a height of 2.\nAfter the second drop, the tallest stack is squares 1 and 2 with a height of 5.\nAfter the third drop, the tallest stack is still squares 1 and 2 with a height of 5.\nThus, we return an answer of [2, 5, 5].\n\nExample 2:\n\nInput: positions = [[100,100],[200,100]]\nOutput: [100,100]\nExplanation:\nAfter the first drop, the tallest stack is square 1 with a height of 100.\nAfter the second drop, the tallest stack is either square 1 or square 2, both with heights of 100.\nThus, we return an answer of [100, 100].\nNote that square 2 only brushes the right side of square 1, which does not count as landing on it.\n\nConstraints:\n\n- 1 <= positions.length <= 1000\n- 1 <= left_i <= 10^8\n- 1 <= sideLength_i <= 10^6\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(positions = [[4, 1], [2, 2], [1, 3], [3, 4]]) == [1, 2, 5, 9]\n assert candidate(positions = [[1, 5], [2, 2], [7, 3]]) == [5, 7, 7]\n assert candidate(positions = [[1, 3], [3, 2], [5, 1]]) == [3, 5, 5]\n assert candidate(positions = [[1, 3], [3, 3], [5, 3], [7, 3]]) == [3, 6, 9, 12]\n assert candidate(positions = [[100, 100], [200, 100]]) == [100, 100]\n assert candidate(positions = [[1, 2], [2, 3], [6, 1]]) == [2, 5, 5]\n assert candidate(positions = [[6, 1], [9, 2], [2, 3], [4, 4], [1, 5], [11, 5], [12, 3]]) == [1, 2, 3, 7, 12, 12, 12]\n assert candidate(positions = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == [1, 2, 5, 9, 14]\n assert candidate(positions = [[1, 10], [10, 10], [10, 1], [15, 10]]) == [10, 20, 21, 30]\n assert candidate(positions = [[1, 1], [2, 2], [3, 3], [4, 4]]) == [1, 2, 5, 9]\n assert candidate(positions = [[1, 10], [10, 10], [20, 10]]) == [10, 20, 20]\n assert candidate(positions = [[1, 1000000], [1000001, 1000000]]) == [1000000, 1000000]\n assert candidate(positions = [[5, 3], [1, 5], [4, 2], [6, 1]]) == [3, 8, 10, 10]\n assert candidate(positions = [[1, 3], [3, 3], [5, 3]]) == [3, 6, 9]\n assert candidate(positions = [[1, 5], [5, 5], [9, 5], [13, 5], [17, 5], [21, 5], [25, 5], [29, 5], [33, 5], [37, 5], [41, 5], [45, 5], [49, 5], [53, 5], [57, 5]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75]\n assert candidate(positions = [[100000, 100000], [200000, 200000], [300000, 300000], [400000, 400000], [500000, 500000], [600000, 600000]]) == [100000, 200000, 500000, 900000, 1400000, 2000000]\n assert candidate(positions = [[1, 1000000], [500001, 1000000], [1000002, 1000000], [1500003, 1000000], [2000004, 1000000]]) == [1000000, 2000000, 3000000, 4000000, 5000000]\n assert candidate(positions = [[1, 50000], [50001, 50000], [100001, 50000], [150001, 50000], [200001, 50000], [250001, 50000], [300001, 50000], [350001, 50000], [400001, 50000]]) == [50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000]\n assert candidate(positions = [[1, 200], [200, 100], [150, 50], [50, 25], [250, 200]]) == [200, 300, 300, 300, 500]\n assert candidate(positions = [[1, 100000], [100001, 100000], [200001, 100000], [300001, 100000], [400001, 100000]]) == [100000, 100000, 100000, 100000, 100000]\n assert candidate(positions = [[1, 100], [50, 100], [100, 100], [150, 100], [200, 100], [250, 100], [300, 100], [350, 100], [400, 100], [450, 100]]) == [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]\n assert candidate(positions = [[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, 1]]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(positions = [[50000000, 1000000], [50000001, 1000000], [50000002, 1000000], [50000003, 1000000], [50000004, 1000000]]) == [1000000, 2000000, 3000000, 4000000, 5000000]\n assert candidate(positions = [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]\n assert candidate(positions = [[1, 5], [3, 5], [5, 5], [7, 5], [9, 5], [11, 5], [13, 5], [15, 5], [17, 5], [19, 5], [21, 5], [23, 5], [25, 5], [27, 5], [29, 5], [31, 5]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80]\n assert candidate(positions = [[1, 100], [2, 100], [3, 100], [101, 100], [102, 100], [103, 100], [201, 100], [202, 100], [203, 100]]) == [100, 200, 300, 400, 500, 600, 700, 800, 900]\n assert candidate(positions = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110]]) == [20, 50, 90, 140, 200, 270, 350, 440, 540, 650]\n assert candidate(positions = [[10, 5], [15, 5], [20, 5], [25, 5], [30, 5], [35, 5], [40, 5], [45, 5], [50, 5], [55, 5], [60, 5], [65, 5], [70, 5], [75, 5], [80, 5]]) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(positions = [[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2]]) == [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]\n assert candidate(positions = [[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, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120]\n assert candidate(positions = [[1, 9], [10, 9], [19, 9], [28, 9], [37, 9], [46, 9], [55, 9], [64, 9], [73, 9], [82, 9], [91, 9], [100, 9]]) == [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(positions = [[10, 20], [15, 30], [20, 25], [25, 10], [30, 20], [35, 30], [40, 25], [45, 10]]) == [20, 50, 75, 85, 105, 135, 160, 170]\n assert candidate(positions = [[1, 1000000], [2, 999999], [3, 999998], [4, 999997], [5, 999996]]) == [1000000, 1999999, 2999997, 3999994, 4999990]\n assert candidate(positions = [[1, 500000], [500001, 500000], [1000001, 500000], [1500001, 500000], [2000001, 500000], [2500001, 500000], [3000001, 500000]]) == [500000, 500000, 500000, 500000, 500000, 500000, 500000]\n assert candidate(positions = [[5, 50], [15, 50], [25, 50], [35, 50], [45, 50], [55, 50], [65, 50], [75, 50], [85, 50], [95, 50], [105, 50]]) == [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550]\n assert candidate(positions = [[10, 20], [15, 30], [25, 15], [30, 25], [40, 10], [45, 20], [50, 30], [55, 15], [60, 25], [65, 10]]) == [20, 50, 65, 90, 100, 120, 150, 165, 190, 200]\n assert candidate(positions = [[1, 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, 1, 1]\n assert candidate(positions = [[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]]) == [1, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119]\n assert candidate(positions = [[5, 10], [10, 20], [15, 15], [25, 10], [30, 25], [35, 5], [40, 30]]) == [10, 30, 45, 55, 80, 85, 110]\n assert candidate(positions = [[1, 1000], [2, 1000], [3, 1000], [4, 1000], [5, 1000], [6, 1000], [7, 1000], [8, 1000], [9, 1000], [10, 1000]]) == [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]\n assert candidate(positions = [[1, 200], [100, 200], [200, 200], [300, 200], [400, 200], [500, 200], [600, 200], [700, 200], [800, 200], [900, 200]]) == [200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000]\n assert candidate(positions = [[5, 10], [15, 20], [10, 5], [25, 15], [30, 10], [20, 10]]) == [10, 20, 20, 35, 45, 45]\n assert candidate(positions = [[1, 1000], [2, 2000], [3, 3000], [4, 4000], [5, 5000], [6, 6000], [7, 7000], [8, 8000], [9, 9000], [10, 10000]]) == [1000, 3000, 6000, 10000, 15000, 21000, 28000, 36000, 45000, 55000]\n assert candidate(positions = [[1, 50], [51, 50], [101, 50], [151, 50], [201, 50], [251, 50], [301, 50], [351, 50], [401, 50], [451, 50]]) == [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]\n assert candidate(positions = [[100, 200], [150, 300], [200, 100], [250, 400], [300, 500], [350, 600], [400, 700], [450, 800], [500, 900]]) == [200, 500, 600, 1000, 1500, 2100, 2800, 3600, 4500]\n assert candidate(positions = [[1, 5], [3, 5], [5, 5], [7, 5], [9, 5], [11, 5], [13, 5], [15, 5], [17, 5], [19, 5], [21, 5], [23, 5], [25, 5], [27, 5], [29, 5]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75]\n assert candidate(positions = [[1, 1000000], [500000, 500000], [250000, 250000], [750000, 750000]]) == [1000000, 1500000, 1500000, 2250000]\n assert candidate(positions = [[10, 5], [15, 3], [20, 7], [25, 2], [30, 4], [35, 6], [40, 8], [45, 1], [50, 9], [55, 10]]) == [5, 5, 7, 9, 9, 9, 14, 15, 15, 19]\n assert candidate(positions = [[1, 1000000], [1000001, 1000000], [2000001, 1000000], [3000001, 1000000], [4000001, 1000000]]) == [1000000, 1000000, 1000000, 1000000, 1000000]\n assert candidate(positions = [[1, 100], [101, 100], [201, 100], [301, 100], [401, 100], [501, 100]]) == [100, 100, 100, 100, 100, 100]\n assert candidate(positions = [[100, 100], [200, 200], [300, 300], [400, 400], [500, 500], [600, 600], [700, 700], [800, 800], [900, 900], [1000, 1000]]) == [100, 200, 500, 900, 1400, 2000, 2700, 3500, 4400, 5400]\n assert candidate(positions = [[1, 10], [11, 10], [21, 10], [31, 10], [41, 10], [51, 10], [61, 10]]) == [10, 10, 10, 10, 10, 10, 10]\n assert candidate(positions = [[1, 2], [3, 2], [5, 2], [7, 2], [9, 2], [11, 2], [13, 2], [15, 2], [17, 2], [19, 2], [21, 2], [23, 2], [25, 2]]) == [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]\n assert candidate(positions = [[1, 5], [3, 5], [5, 5], [7, 5], [9, 5], [11, 5], [13, 5], [15, 5], [17, 5], [19, 5]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]\n assert candidate(positions = [[5, 20], [25, 15], [10, 25], [40, 5], [30, 10]]) == [20, 20, 45, 45, 55]\n assert candidate(positions = [[100000000, 1], [99999999, 1], [99999998, 1], [99999997, 1], [99999996, 1]]) == [1, 1, 1, 1, 1]\n assert candidate(positions = [[10, 50], [20, 50], [15, 60], [35, 50], [50, 50], [40, 40]]) == [50, 100, 160, 210, 260, 300]\n assert candidate(positions = [[1, 1], [1000000, 1000000], [2, 2], [1000001, 1000000], [3, 3], [1000002, 1000000], [4, 4], [1000003, 1000000]]) == [1, 1000000, 1000000, 2000000, 2000000, 3000000, 3000000, 4000000]\n assert candidate(positions = [[10000000, 1000000], [9000000, 500000], [8000000, 250000], [7000000, 125000], [6000000, 62500], [5000000, 31250], [4000000, 15625]]) == [1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000]\n assert candidate(positions = [[1, 1], [1000000, 1], [2, 1], [999999, 1], [3, 1], [999998, 1], [4, 1], [999997, 1], [5, 1], [999996, 1]]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(positions = [[10, 20], [20, 10], [30, 30], [40, 20], [50, 10], [60, 40], [70, 50], [80, 30], [90, 20]]) == [20, 30, 30, 50, 60, 60, 90, 120, 140]\n assert candidate(positions = [[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]]) == [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]\n assert candidate(positions = [[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], [2, 2], [1, 1], [2, 2]]) == [1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16]\n assert candidate(positions = [[1, 100], [2, 200], [3, 300], [4, 400], [5, 500], [6, 600], [7, 700], [8, 800], [9, 900], [10, 1000]]) == [100, 300, 600, 1000, 1500, 2100, 2800, 3600, 4500, 5500]\n assert candidate(positions = [[1, 200000], [199999, 1], [2, 199999], [199998, 2], [3, 199998], [199997, 3], [4, 199997]]) == [200000, 200001, 400000, 400002, 600000, 600003, 800000]\n assert candidate(positions = [[1, 1000000], [1000000, 1000000], [2000000, 1000000], [3000000, 1000000], [4000000, 1000000]]) == [1000000, 2000000, 2000000, 2000000, 2000000]\n assert candidate(positions = [[1, 10], [10, 10], [19, 10], [28, 10], [37, 10], [46, 10], [55, 10], [64, 10], [73, 10], [82, 10], [91, 10], [100, 10], [109, 10], [118, 10], [127, 10], [136, 10], [145, 10], [154, 10], [163, 10], [172, 10], [181, 10], [190, 10], [199, 10], [208, 10], [217, 10], [226, 10], [235, 10], [244, 10], [253, 10], [262, 10], [271, 10], [280, 10], [289, 10], [298, 10]]) == [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]\n assert candidate(positions = [[5, 15], [15, 20], [10, 25], [25, 10], [40, 5]]) == [15, 35, 60, 70, 70]\n assert candidate(positions = [[1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [10, 5]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]\n assert candidate(positions = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == [1, 2, 5, 9, 14, 20, 27, 35, 44, 54]\n assert candidate(positions = [[1, 1000000], [1000000, 1000000], [2000000, 1000000], [3000000, 1000000]]) == [1000000, 2000000, 2000000, 2000000]\n assert candidate(positions = [[50, 100], [150, 200], [250, 150], [350, 250], [450, 300], [550, 200], [650, 100], [750, 150], [850, 200], [950, 250]]) == [100, 200, 350, 600, 900, 1100, 1200, 1200, 1200, 1200]\n assert candidate(positions = [[1, 2], [2, 3], [4, 4], [7, 5], [11, 6], [17, 7], [24, 8], [32, 9], [41, 10]]) == [2, 5, 9, 14, 20, 20, 20, 20, 20]\n assert candidate(positions = [[1, 100000], [100000, 100000], [200000, 100000], [300000, 100000], [400000, 100000]]) == [100000, 200000, 200000, 200000, 200000]\n assert candidate(positions = [[1, 100], [200, 200], [300, 300], [400, 400], [500, 500], [600, 600], [700, 700], [800, 800], [900, 900], [1000, 1000]]) == [100, 200, 500, 900, 1400, 2000, 2700, 3500, 4400, 5400]\n assert candidate(positions = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == [1, 2, 5, 9, 14, 20, 27, 35, 44, 54]\n assert candidate(positions = [[1, 1000000], [2, 1000000], [3, 1000000], [4, 1000000], [5, 1000000]]) == [1000000, 2000000, 3000000, 4000000, 5000000]\n assert candidate(positions = [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(positions = [[50, 50], [50, 40], [50, 30], [50, 20], [50, 10], [60, 10], [70, 20], [80, 30], [90, 40], [100, 50]]) == [50, 90, 120, 140, 150, 150, 150, 170, 210, 260]\n assert candidate(positions = [[1, 2], [1, 2], [1, 2], [2, 2], [2, 2], [2, 2], [3, 2], [3, 2], [3, 2]]) == [2, 4, 6, 8, 10, 12, 14, 16, 18]\n assert candidate(positions = [[1, 20], [10, 30], [15, 10], [5, 25], [30, 5], [40, 15]]) == [20, 50, 60, 85, 85, 85]\n assert candidate(positions = [[10, 1], [20, 1], [15, 2], [25, 2], [30, 3], [35, 3], [40, 4], [45, 4], [50, 5], [55, 5]]) == [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]\n assert candidate(positions = [[1, 100000], [2, 99999], [3, 99998], [4, 99997], [5, 99996], [6, 99995], [7, 99994], [8, 99993], [9, 99992], [10, 99991]]) == [100000, 199999, 299997, 399994, 499990, 599985, 699979, 799972, 899964, 999955]\n assert candidate(positions = [[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]]) == [20, 40, 100, 180, 280, 400, 540, 700, 880, 1080, 1300, 1540, 1800, 2080, 2380]\n assert candidate(positions = [[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]]) == [1, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119]\n assert candidate(positions = [[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, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65, 77, 90, 104, 119, 135, 152, 170, 189, 209]\n assert candidate(positions = [[1000000, 1000000], [900000, 1000000], [800000, 1000000], [700000, 1000000], [600000, 1000000]]) == [1000000, 2000000, 3000000, 4000000, 5000000]\n assert candidate(positions = [[10000, 5000], [15000, 10000], [20000, 15000], [25000, 20000], [30000, 25000], [35000, 30000], [40000, 35000], [45000, 40000], [50000, 45000], [55000, 50000]]) == [5000, 10000, 25000, 45000, 70000, 100000, 135000, 175000, 220000, 270000]\n assert candidate(positions = [[1, 100], [101, 100], [201, 100], [301, 100], [401, 100], [501, 100], [601, 100], [701, 100], [801, 100], [901, 100]]) == [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]\n assert candidate(positions = [[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]]) == [10, 20, 50, 90, 140, 200, 270, 350, 440, 540, 650, 770, 900]\n assert candidate(positions = [[1000000, 1], [999999, 2], [999998, 3], [999997, 4], [999996, 5]]) == [1, 3, 6, 10, 15]\n assert candidate(positions = [[1000, 1000], [1500, 1000], [2000, 1000], [2500, 1000], [3000, 1000], [3500, 1000], [4000, 1000], [4500, 1000], [5000, 1000]]) == [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000]\n assert candidate(positions = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], [27, 28], [29, 30]]) == [2, 4, 10, 18, 28, 40, 54, 70, 88, 108, 130, 154, 180, 208, 238]\n assert candidate(positions = [[100000, 100000], [200000, 100000], [300000, 100000], [400000, 100000], [500000, 100000], [600000, 100000], [700000, 100000], [800000, 100000], [900000, 100000], [1000000, 100000]]) == [100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000]\n assert candidate(positions = [[1, 1], [2, 2], [1, 2], [2, 1], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8]]) == [1, 2, 4, 5, 5, 9, 14, 20, 27, 35]\n assert candidate(positions = [[1, 1000000], [500000, 1000000], [1000000, 1000000], [1500000, 1000000], [2000000, 1000000]]) == [1000000, 2000000, 3000000, 4000000, 5000000]\n assert candidate(positions = [[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]]) == [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]\n assert candidate(positions = [[1, 10], [11, 10], [21, 10], [31, 10], [41, 10], [51, 10], [61, 10], [71, 10], [81, 10], [91, 10]]) == [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]\n assert candidate(positions = [[1, 100], [101, 100], [201, 100], [301, 100], [401, 100], [501, 100], [601, 100], [701, 100], [801, 100], [901, 100]]) == [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]\n assert candidate(positions = [[1, 100000], [100000, 1], [200000, 100000], [300000, 100000], [400000, 100000]]) == [100000, 100001, 100001, 100001, 100001]\n assert candidate(positions = [[1, 500], [1, 500], [1, 500], [1, 500], [1, 500], [1, 500], [1, 500], [1, 500], [1, 500], [1, 500]]) == [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000]\n assert candidate(positions = [[10000000, 1], [20000000, 2], [30000000, 3], [40000000, 4], [50000000, 5], [60000000, 6], [70000000, 7], [80000000, 8], [90000000, 9], [100000000, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(positions = [[1, 1000000], [1000001, 999999], [2000002, 999998], [3000003, 999997], [4000004, 999996]]) == [1000000, 1000000, 1000000, 1000000, 1000000]\n assert candidate(positions = [[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]\n", "comparison": "exact"}, "public_tests": ["[[1,2],[2,3],[6,1]]", "[[100,100],[200,100]]"], "hints": ["If positions = [[10, 20], [20, 30]], this is the same as [[1, 2], [2, 3]]. Currently, the values of positions are very large. Can you generalize this approach so as to make the values in positions manageable?"], "metadata": {"canonical_parameter_names": ["positions"], "leetcode_dataset_entry_point": "Solution().fallingSquares", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:56:58+00:00", "tests_total": 105, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["array", "segment-tree", "ordered-set"]}, "language": "cpp", "interface": {"raw_signature": "vector fallingSquares(vector>& positions) {", "container": "Solution", "callable": "fallingSquares", "parameters": [{"name": "positions", "type": "vector>&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 704, "task_id": "binary-search", "difficulty": "Easy", "problem_description": "Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1.\n\nYou must write an algorithm with O(log n) runtime complexity.\n\nExample 1:\n\nInput: nums = [-1,0,3,5,9,12], target = 9\nOutput: 4\nExplanation: 9 exists in nums and its index is 4\n\nExample 2:\n\nInput: nums = [-1,0,3,5,9,12], target = 2\nOutput: -1\nExplanation: 2 does not exist in nums so return -1\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -10^4 < nums[i], target < 10^4\n- All the integers in nums are unique.\n- nums is sorted in ascending order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-10, 0, 10, 20, 30],target = -5) == -1\n assert candidate(nums = [1, 2, 3, 4, 5],target = 6) == -1\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],target = 0) == -1\n assert candidate(nums = [1, 2, 3, 4, 5],target = 3) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == 4\n assert candidate(nums = [-10, 0, 10, 20, 30],target = 0) == 1\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],target = -5) == 5\n assert candidate(nums = [0],target = 0) == 0\n assert candidate(nums = [-1, 0, 3, 5, 9, 12],target = 9) == 4\n assert candidate(nums = [5],target = 5) == 0\n assert candidate(nums = [-10, -5, -3, -1, 0, 1, 3, 5, 8, 10],target = 10) == 9\n assert candidate(nums = [5],target = 4) == -1\n assert candidate(nums = [-1, 0, 3, 5, 9, 12],target = 2) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 11) == -1\n assert candidate(nums = [0],target = 1) == -1\n assert candidate(nums = [-10, -5, -3, -1, 0, 1, 3, 5, 8, 10],target = -5) == 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],target = 210) == -1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],target = 256) == 8\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 = 15) == -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],target = 155) == -1\n assert candidate(nums = [-100, -50, -20, -10, -5, 0, 5, 10, 20, 50, 100],target = 0) == 5\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = -6) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 15) == 14\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 = 18) == -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 = 19) == 9\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, 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 = 99) == 104\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 16) == -1\n assert candidate(nums = [-1000, -500, -250, -125, -63, -31, -15, -7, -3, -1, 1, 3, 7, 15, 31, 63, 125, 250, 500, 1000],target = -15) == 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],target = 1) == 0\n assert candidate(nums = [-1, 1, 3, 5, 7, 9, 11, 13, 15, 17],target = 0) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 0) == -1\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = -3) == 2\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],target = 64) == 6\n assert candidate(nums = [-5, -3, -1, 0, 1, 3, 5],target = -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],target = 18) == 17\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 = 37) == 18\n assert candidate(nums = [-9999, -9997, -9995, -9993, -9991, -9989, -9987, -9985, -9983, -9981],target = -9985) == 7\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49],target = 50) == -1\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = 6) == -1\n assert candidate(nums = [-50, -20, -10, 0, 10, 20, 30, 50, 60],target = 30) == 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, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99],target = 98) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 15) == 7\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],target = 155) == -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],target = -10) == -1\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],target = -5) == 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],target = 10) == 9\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],target = 99) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 1) == 0\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49],target = 49) == 16\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],target = 50) == 50\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 1) == 0\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100],target = 50) == -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 = 26) == -1\n assert candidate(nums = [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050],target = 5005) == 5\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],target = 500) == 15\n assert candidate(nums = [1],target = 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],target = 0) == 10\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 27) == 13\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145],target = 146) == -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\n assert candidate(nums = [50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 175) == -1\n assert candidate(nums = [-1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 0) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 30) == -1\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],target = 2001) == -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],target = -550) == -1\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400],target = 225) == 14\n assert candidate(nums = [-9999, -9997, -9995, -9993, -9991, -9989, -9987, -9985, -9983, -9981, -9979, -9977, -9975, -9973, -9971, -9969, -9967, -9965, -9963, -9961],target = -9975) == 12\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],target = 88) == -1\n assert candidate(nums = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91],target = -95) == 5\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],target = 5) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 29) == 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],target = 1500) == 14\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49],target = 1) == 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],target = 1005) == 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],target = 25) == 4\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 = [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],target = 23) == -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, -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],target = -9952) == 47\n assert candidate(nums = [1],target = 2) == -1\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 = 21) == -1\n assert candidate(nums = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361],target = 144) == 12\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],target = 950) == -1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],target = 150) == 14\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 550) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 20) == -1\n assert candidate(nums = [-9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990],target = -9995) == 4\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],target = 289) == 16\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400],target = 196) == 13\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 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],target = 21) == -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 = 39) == 19\n assert candidate(nums = [5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019],target = 5000) == 0\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49],target = 25) == 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],target = 15) == 14\n assert candidate(nums = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019],target = 1000) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 15) == 14\n", "comparison": "exact"}, "public_tests": ["[-1,0,3,5,9,12]\n9", "[-1,0,3,5,9,12]\n2"], "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:57:04+00:00", "tests_total": 115, "tests_dropped": 18, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "cpp", "interface": {"raw_signature": "int search(vector& nums, int target) {", "container": "Solution", "callable": "search", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "target", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 712, "task_id": "minimum-ascii-delete-sum-for-two-strings", "difficulty": "Medium", "problem_description": "Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal.\n\nExample 1:\n\nInput: s1 = \"sea\", s2 = \"eat\"\nOutput: 231\nExplanation: Deleting \"s\" from \"sea\" adds the ASCII value of \"s\" (115) to the sum.\nDeleting \"t\" from \"eat\" adds 116 to the sum.\nAt the end, both strings are equal, and 115 + 116 = 231 is the minimum sum possible to achieve this.\n\nExample 2:\n\nInput: s1 = \"delete\", s2 = \"leet\"\nOutput: 403\nExplanation: Deleting \"dee\" from \"delete\" to turn the string into \"let\",\nadds 100[d] + 101[e] + 101[e] to the sum.\nDeleting \"e\" from \"leet\" adds 101[e] to the sum.\nAt the end, both strings are equal to \"let\", and the answer is 100+101+101+101 = 403.\nIf instead we turned both strings into \"lee\" or \"eet\", we would get answers of 433 or 417, which are higher.\n\nConstraints:\n\n- 1 <= s1.length, s2.length <= 1000\n- s1 and s2 consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s1 = \"delete\",s2 = \"leet\") == 403\n assert candidate(s1 = \"aaa\",s2 = \"aa\") == 97\n assert candidate(s1 = \"abc\",s2 = \"abcde\") == 201\n assert candidate(s1 = \"abc\",s2 = \"def\") == 597\n assert candidate(s1 = \"pqr\",s2 = \"pqr\") == 0\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",s2 = \"zyxwvutsrqponmlkjihgfedcba\") == 5450\n assert candidate(s1 = \"aaa\",s2 = \"aaa\") == 0\n assert candidate(s1 = \"sea\",s2 = \"eat\") == 231\n assert candidate(s1 = \"a\",s2 = \"b\") == 195\n assert candidate(s1 = \"abcabcabc\",s2 = \"abc\") == 588\n assert candidate(s1 = \"abcdef\",s2 = \"fedcba\") == 990\n assert candidate(s1 = \"xyz\",s2 = \"zyxwv\") == 719\n assert candidate(s1 = \"a\",s2 = \"a\") == 0\n assert candidate(s1 = \"algorithm\",s2 = \"rhythm\") == 749\n assert candidate(s1 = \"abcdefgh\",s2 = \"ijklmnop\") == 1672\n assert candidate(s1 = \"algorithm\",s2 = \"logarithm\") == 400\n assert candidate(s1 = \"abcdxyz\",s2 = \"xyzabcd\") == 726\n assert candidate(s1 = \"interview\",s2 = \"interference\") == 969\n assert candidate(s1 = \"sequencealignment\",s2 = \"simple\") == 1606\n assert candidate(s1 = \"abcdeabcdeabcde\",s2 = \"decadecadecade\") == 1077\n assert candidate(s1 = \"aaaaabbbb\",s2 = \"bbbbbbaaa\") == 972\n assert candidate(s1 = \"aaaabbbbccccdddd\",s2 = \"bbbbaaaaccccdddd\") == 776\n assert candidate(s1 = \"short\",s2 = \"longerstring\") == 1188\n assert candidate(s1 = \"abracadabra\",s2 = \"avocado\") == 1055\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"ffeeddccba\") == 1785\n assert candidate(s1 = \"abcdabcdabcdabcdabcdabcdabcdabcd\",s2 = \"abcd\") == 2758\n assert candidate(s1 = \"supercalifragilisticexpialidocious\",s2 = \"supercalifragilistic\") == 1506\n assert candidate(s1 = \"abcdefg\",s2 = \"xyzabc\") == 769\n assert candidate(s1 = \"abcdefg\",s2 = \"gfedcba\") == 1194\n assert candidate(s1 = \"ababababab\",s2 = \"babababa\") == 195\n assert candidate(s1 = \"racecar\",s2 = \"carrace\") == 620\n assert candidate(s1 = \"programming\",s2 = \"algorithm\") == 1486\n assert candidate(s1 = \"longstringfortesting\",s2 = \"anotherlongstringfortesting\") == 753\n assert candidate(s1 = \"programming\",s2 = \"programmer\") == 533\n assert candidate(s1 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",s2 = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkiijjhhhgggffeeeeddccbbaa\") == 10953\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"dcba\") == 982\n assert candidate(s1 = \"ababcabcabc\",s2 = \"abcabcabc\") == 195\n assert candidate(s1 = \"elephant\",s2 = \"hippopotamus\") == 1714\n assert candidate(s1 = \"recursion\",s2 = \"iteration\") == 879\n assert candidate(s1 = \"aabbcc\",s2 = \"ababab\") == 393\n assert candidate(s1 = \"abacaxbab\",s2 = \"abcabc\") == 511\n assert candidate(s1 = \"abcde\",s2 = \"fghij\") == 1015\n assert candidate(s1 = \"dynamicprogramming\",s2 = \"dynamictimeprogramming\") == 431\n assert candidate(s1 = \"programming\",s2 = \"prognosis\") == 1083\n assert candidate(s1 = \"sunshine\",s2 = \"shinesun\") == 684\n assert candidate(s1 = \"interviewquestion\",s2 = \"interviewquery\") == 792\n assert candidate(s1 = \"aabbccddeeffgg\",s2 = \"abcdfg\") == 801\n assert candidate(s1 = \"mississippi\",s2 = \"missisipi\") == 227\n assert candidate(s1 = \"hello\",s2 = \"yellow\") == 344\n assert candidate(s1 = \"xylophone\",s2 = \"xylophone\") == 0\n assert candidate(s1 = \"aaaaabbbbbbbbaaa\",s2 = \"aaaaaaaaaabbbbbba\") == 875\n assert candidate(s1 = \"abcdexyz\",s2 = \"xyzabcd\") == 827\n assert candidate(s1 = \"abcd\",s2 = \"dcba\") == 588\n assert candidate(s1 = \"mississippi\",s2 = \"mississippi\") == 0\n assert candidate(s1 = \"xyzzxyzzxyzz\",s2 = \"zzxyzzxyzzxy\") == 482\n assert candidate(s1 = \"sequence\",s2 = \"subsequence\") == 330\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"abcabcabcabc\") == 594\n assert candidate(s1 = \"abcdefghikjlmnopqrstuvwxyz\",s2 = \"zyxwvutsrqponmlkjihgfedcba\") == 5268\n assert candidate(s1 = \"kitten\",s2 = \"sitting\") == 531\n assert candidate(s1 = \"abcdef\",s2 = \"ghijkl\") == 1230\n assert candidate(s1 = \"abcdexyz\",s2 = \"defghijk\") == 1284\n assert candidate(s1 = \"aaaaaaaaaaaaaaa\",s2 = \"bbbbbbbbbbbbbbb\") == 2925\n assert candidate(s1 = \"kshdfjkhewriukhweriukhweriukhwer\",s2 = \"wriukhweriukhwer\") == 1713\n assert candidate(s1 = \"aaaaabbbbb\",s2 = \"bbbbbcccc\") == 881\n assert candidate(s1 = \"abcdefg\",s2 = \"xyz\") == 1063\n assert candidate(s1 = \"aaaaaa\",s2 = \"bbbbbb\") == 1170\n assert candidate(s1 = \"programming\",s2 = \"remmargorp\") == 1401\n assert candidate(s1 = \"abcdefghij\",s2 = \"jihgfedcba\") == 1818\n assert candidate(s1 = \"programming\",s2 = \"program\") == 427\n assert candidate(s1 = \"leetcode\",s2 = \"codeleet\") == 822\n assert candidate(s1 = \"zzzzz\",s2 = \"zzzzzzzz\") == 366\n assert candidate(s1 = \"mississippi\",s2 = \"pississippi\") == 221\n assert candidate(s1 = \"samestring\",s2 = \"samestring\") == 0\n assert candidate(s1 = \"aabbccddeeffgghhii\",s2 = \"iihhggffeeddccbbaa\") == 3216\n assert candidate(s1 = \"mississippi\",s2 = \"missisippi\") == 115\n assert candidate(s1 = \"dynamicprogramming\",s2 = \"longestcommonsubsequence\") == 3232\n assert candidate(s1 = \"abcxyz\",s2 = \"xyzabc\") == 588\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"xyzxyzxyz\") == 2271\n assert candidate(s1 = \"qwertyuiopasdfghjklzxcvbnm\",s2 = \"mnbvcxzlkjhgfdsapoiuytrewq\") == 5450\n assert candidate(s1 = \"dynamicprogramming\",s2 = \"recursion\") == 2028\n assert candidate(s1 = \"ababababab\",s2 = \"bababababa\") == 194\n assert candidate(s1 = \"xyzzyxzyxzyxz\",s2 = \"zyxzyxzyxzyx\") == 604\n assert candidate(s1 = \"abcd\",s2 = \"efgh\") == 804\n assert candidate(s1 = \"xylophone\",s2 = \"polyphonexy\") == 911\n assert candidate(s1 = \"longstringwithvariouscharacters\",s2 = \"anotherstringwithdifferentcharacters\") == 2463\n assert candidate(s1 = \"repeatedcharacters\",s2 = \"repeatedcharactersrepeatedcharacters\") == 1898\n assert candidate(s1 = \"minimum\",s2 = \"maximum\") == 432\n assert candidate(s1 = \"abcde\",s2 = \"edcba\") == 788\n assert candidate(s1 = \"abcdefghij\",s2 = \"abcdefghijk\") == 107\n assert candidate(s1 = \"mississippi\",s2 = \"basketball\") == 2028\n assert candidate(s1 = \"mississippi\",s2 = \"pisissip\") == 553\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"abcd\") == 788\n assert candidate(s1 = \"aaaaabbbbb\",s2 = \"bbbbbbaaaa\") == 971\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"abc\") == 888\n assert candidate(s1 = \"ascii\",s2 = \"unicode\") == 1054\n assert candidate(s1 = \"supercalifragilisticexpialidocious\",s2 = \"supercalifragilisticexpialidocious\") == 0\n assert candidate(s1 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",s2 = \"zzyyxxwwvvuuttsrrqqppoonnmlkkjjiihhggffeeeeddccbbaa\") == 10770\n assert candidate(s1 = \"interspecies\",s2 = \"interstellar\") == 1075\n assert candidate(s1 = \"waterbottle\",s2 = \"erbottlewat\") == 664\n assert candidate(s1 = \"lalalalala\",s2 = \"alalalalal\") == 194\n assert candidate(s1 = \"abracadabra\",s2 = \"avadakedavra\") == 953\n assert candidate(s1 = \"xyz\",s2 = \"zyxzyxzyx\") == 726\n assert candidate(s1 = \"longerstring\",s2 = \"short\") == 1188\n assert candidate(s1 = \"mississippi\",s2 = \"mississippimiss\") == 444\n assert candidate(s1 = \"elephant\",s2 = \"elephant\") == 0\n assert candidate(s1 = \"programming\",s2 = \"ogramming\") == 226\n assert candidate(s1 = \"abcdabcdabcd\",s2 = \"abcabcabc\") == 300\n assert candidate(s1 = \"longest\",s2 = \"commonsubsequence\") == 1928\n assert candidate(s1 = \"abcdefghijk\",s2 = \"fedcbaolmijkpqrstuvwxyz\") == 2812\n assert candidate(s1 = \"programming\",s2 = \"development\") == 1712\n assert candidate(s1 = \"transformation\",s2 = \"transformation\") == 0\n assert candidate(s1 = \"longestcommonsubsequence\",s2 = \"shortestcommonsubsequence\") == 770\n", "comparison": "exact"}, "public_tests": ["\"sea\"\n\"eat\"", "\"delete\"\n\"leet\""], "hints": ["Let dp(i, j) be the answer for inputs s1[i:] and s2[j:]."], "metadata": {"canonical_parameter_names": ["s1", "s2"], "leetcode_dataset_entry_point": "Solution().minimumDeleteSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:11+00:00", "tests_total": 115, "tests_dropped": 3, "flags": [], "topic_tags": ["string", "dynamic-programming", "longest-common-subsequence"]}, "language": "cpp", "interface": {"raw_signature": "int minimumDeleteSum(string s1, string s2) {", "container": "Solution", "callable": "minimumDeleteSum", "parameters": [{"name": "s1", "type": "string"}, {"name": "s2", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 713, "task_id": "subarray-product-less-than-k", "difficulty": "Medium", "problem_description": "You are given an array of integers nums and an integer k.\n\nReturn the number of contiguous subarrays where the product of all the elements in the subarray is strictly less than k.\n\nExample 1:\n\nInput: nums = [10,5,2,6], k = 100\nOutput: 8\nExplanation: The 8 subarrays that have product less than 100 are:\n[10], [5], [2], [6], [10, 5], [5, 2], [2, 6], [5, 2, 6]\nNote that [10, 5, 2] is not included as the product of 100 is not strictly less than k.\n\nExample 2:\n\nInput: nums = [1,2,3], k = 0\nOutput: 0\n\nConstraints:\n\n- 1 <= nums.length <= 3 * 10^4\n- 1 <= nums[i] <= 1000\n- 0 <= k <= 10^6\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 2, 5, 6, 1],k = 100) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 50) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 100) == 21\n assert candidate(nums = [6, 5, 1, 2, 3],k = 100) == 14\n assert candidate(nums = [5, 5, 5, 5, 5],k = 20) == 5\n assert candidate(nums = [5, 5, 5, 5],k = 30) == 7\n assert candidate(nums = [7, 3, 4, 9, 1, 3, 6],k = 100) == 17\n assert candidate(nums = [2, 3, 4, 5],k = 1) == 0\n assert candidate(nums = [7, 3, 2, 2, 1],k = 12) == 9\n assert candidate(nums = [1, 2, 3],k = 0) == 0\n assert candidate(nums = [1, 3, 7, 5, 8, 9],k = 100) == 12\n assert candidate(nums = [1, 1, 1, 1],k = 1) == 0\n assert candidate(nums = [10, 2, 5, 1],k = 16) == 7\n assert candidate(nums = [2, 3, 4, 5],k = 10) == 5\n assert candidate(nums = [10, 2, 5, 3],k = 100) == 8\n assert candidate(nums = [1, 1, 1, 1],k = 2) == 10\n assert candidate(nums = [1, 2, 3, 4],k = 10) == 7\n assert candidate(nums = [9, 7, 3, 5],k = 25) == 6\n assert candidate(nums = [1, 1, 1],k = 1) == 0\n assert candidate(nums = [10, 20, 30, 40, 50],k = 10000) == 10\n assert candidate(nums = [6, 6, 6, 6],k = 100) == 7\n assert candidate(nums = [1000, 1000, 1000],k = 1000000) == 3\n assert candidate(nums = [10, 5, 2, 6],k = 100) == 8\n assert candidate(nums = [1, 1, 1, 1, 1],k = 1) == 0\n assert candidate(nums = [5, 5, 5, 5, 5],k = 30) == 9\n assert candidate(nums = [1, 2, 3, 4, 5],k = 10) == 8\n assert candidate(nums = [10, 2, 5, 6],k = 100) == 8\n assert candidate(nums = [10, 2, 5, 3, 8],k = 160) == 12\n assert candidate(nums = [2, 5, 6, 10],k = 100) == 8\n assert candidate(nums = [5, 5, 5, 5],k = 25) == 4\n assert candidate(nums = [10, 9, 10, 4, 3, 8, 3, 3, 6, 2, 10, 10, 9, 3],k = 19) == 18\n assert candidate(nums = [1, 2, 3, 4, 5],k = 1) == 0\n assert candidate(nums = [1, 10, 100, 1000, 1, 10, 100, 1000],k = 500000) == 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 = 10000) == 72\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 15625) == 40\n assert candidate(nums = [1000, 999, 998, 997, 996, 995],k = 1000000) == 11\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 1000) == 99\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) == 0\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 3000) == 36\n assert candidate(nums = [2, 3, 6, 7, 9],k = 50) == 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],k = 2) == 210\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128],k = 256) == 11\n assert candidate(nums = [1000, 999, 998, 997, 996],k = 1000000) == 9\n assert candidate(nums = [10, 5, 3, 2, 1],k = 20) == 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],k = 1) == 0\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 1000) == 26\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 = 1000000) == 174\n assert candidate(nums = [10, 2, 3, 5, 7, 11, 13, 17, 19, 23],k = 1000) == 25\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == 0\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10],k = 500) == 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 = 10000) == 72\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 500) == 29\n assert candidate(nums = [999, 999, 999, 999, 999, 999, 999, 999, 999, 999],k = 998001) == 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],k = 100) == 105\n assert candidate(nums = [9, 73, 5, 26, 32, 8, 34, 61, 100],k = 10000) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 1) == 0\n assert candidate(nums = [10, 5, 2, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 100) == 192\n assert candidate(nums = [31, 37, 41, 43, 47, 53, 59, 61, 67, 71],k = 1000000) == 27\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == 0\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000],k = 1000000) == 10\n assert candidate(nums = [10, 5, 2, 6, 1, 1, 1, 1, 1],k = 100) == 38\n assert candidate(nums = [999, 999, 999, 999, 999, 999, 999, 999, 999, 999],k = 1000000) == 19\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10000) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 1000) == 45\n assert candidate(nums = [100, 50, 20, 60, 10, 30],k = 1000) == 8\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19],k = 200) == 15\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 27) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 15) == 14\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000],k = 1000000) == 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 = 100000) == 88\n assert candidate(nums = [10, 5, 2, 6, 1, 3, 7, 5, 8, 9],k = 200) == 30\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 1000) == 75\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 10000) == 30\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 100000) == 22\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128],k = 500) == 15\n assert candidate(nums = [10, 20, 30, 40, 50],k = 1000) == 7\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 = 10000) == 182\n assert candidate(nums = [10, 5, 2, 6, 1, 3, 7, 5, 8, 9],k = 100) == 25\n assert candidate(nums = [50, 40, 30, 20, 10, 5, 2, 1, 1, 2, 5, 10, 20, 30, 40, 50],k = 1000) == 45\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],k = 1000000) == 32\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10000) == 41\n assert candidate(nums = [10, 5, 2, 6, 1, 3, 7, 5, 8, 9],k = 10) == 11\n assert candidate(nums = [10, 5, 2, 6, 3, 4, 1, 7],k = 150) == 25\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 1000) == 34\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 100) == 19\n assert candidate(nums = [8, 2, 6, 5, 1, 2, 3, 4, 5, 6, 7],k = 100) == 32\n assert candidate(nums = [10, 20, 30, 40, 50],k = 1000) == 7\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 1000) == 19\n assert candidate(nums = [10, 9, 10, 4, 3, 8, 3, 10, 26, 100, 8],k = 200) == 21\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 = 100000) == 155\n assert candidate(nums = [1000, 500, 250, 125, 62, 31, 15],k = 1000000) == 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],k = 2000) == 58\n assert candidate(nums = [999, 998, 997, 996, 995],k = 900000) == 5\n assert candidate(nums = [999, 999, 999, 999, 999],k = 1000000) == 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],k = 500) == 61\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],k = 1024) == 234\n assert candidate(nums = [10, 5, 2, 6, 1, 3],k = 100) == 16\n assert candidate(nums = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990],k = 1000000) == 19\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000],k = 1000000) == 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],k = 2) == 210\n assert candidate(nums = [10, 5, 2, 6, 1, 1],k = 100) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 50) == 19\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 = 1000000) == 174\n assert candidate(nums = [10, 5, 2, 6, 1, 3, 7, 5, 8, 9],k = 1) == 0\n assert candidate(nums = [10, 5, 2, 6, 3, 8, 1, 9, 4, 7],k = 100) == 24\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 = 243) == 74\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 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],k = 100) == 52\n assert candidate(nums = [999, 999, 999, 999],k = 1000000) == 7\n assert candidate(nums = [10, 5, 2, 6, 1, 8, 9, 3, 7],k = 100) == 23\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5],k = 20) == 19\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 16) == 27\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],k = 10000) == 212\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 500) == 22\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 27) == 29\n assert candidate(nums = [10, 20, 30, 40, 50],k = 500) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 1000) == 45\n assert candidate(nums = [1000, 500, 250, 125, 62, 31, 15, 7, 3, 1],k = 1000000) == 30\n assert candidate(nums = [9, 8, 7, 6, 5],k = 1000) == 12\n assert candidate(nums = [10, 10, 10, 10],k = 10000) == 9\n", "comparison": "exact"}, "public_tests": ["[686, 28, 455, 675, 605, 29, 942, 48, 502, 889, 854, 206, 231, 796, 272, 565, 887, 969, 558, 13, 22, 455, 145, 804, 15]\n515854", "[542, 433, 935, 193, 280, 849, 122, 107, 688, 913, 31, 311, 814, 507, 596, 109, 340, 981, 662, 145, 955, 692, 659, 46, 276, 734, 177, 727, 329, 320, 93, 78, 451, 129, 226, 491, 595, 175, 894, 662, 699, 871, 340, 375, 98, 38, 414, 306, 20, 548, 459, 577, 626, 942, 92, 322, 665, 497, 593, 877, 247, 487, 67, 320, 78, 775, 431, 193, 175, 957, 926, 816, 776, 967, 600, 114, 474, 810, 513, 43, 586, 559, 880, 540, 122, 95, 408, 621, 850, 598]\n425740"], "hints": ["For each j, let opt(j) be the smallest i so that nums[i] * nums[i+1] * ... * nums[j] is less than k. opt is an increasing function."], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().numSubarrayProductLessThanK", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:13+00:00", "tests_total": 128, "tests_dropped": 8, "flags": [], "topic_tags": ["array", "binary-search", "sliding-window", "prefix-sum"]}, "language": "cpp", "interface": {"raw_signature": "int numSubarrayProductLessThanK(vector& nums, int k) {", "container": "Solution", "callable": "numSubarrayProductLessThanK", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 714, "task_id": "best-time-to-buy-and-sell-stock-with-transaction-fee", "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, and an integer fee representing a transaction fee.\n\nFind the maximum profit you can achieve. You may complete as many transactions as you like, but you need to pay the transaction fee for each transaction.\n\nNote:\n\n- You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).\n- The transaction fee is only charged once for each stock purchase and sale.\n\nExample 1:\n\nInput: prices = [1,3,2,8,4,9], fee = 2\nOutput: 8\nExplanation: The maximum profit can be achieved by:\n- Buying at prices[0] = 1\n- Selling at prices[3] = 8\n- Buying at prices[4] = 4\n- Selling at prices[5] = 9\nThe total profit is ((8 - 1) - 2) + ((9 - 4) - 2) = 8.\n\nExample 2:\n\nInput: prices = [1,3,7,5,10,3], fee = 3\nOutput: 6\n\nConstraints:\n\n- 1 <= prices.length <= 5 * 10^4\n- 1 <= prices[i] < 5 * 10^4\n- 0 <= fee < 5 * 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(prices = [10, 20, 30, 40, 50],fee = 5) == 35\n assert candidate(prices = [1, 3, 2, 8, 4, 9],fee = 2) == 8\n assert candidate(prices = [1, 2, 3, 4, 5],fee = 1) == 3\n assert candidate(prices = [50, 40, 30, 20, 10],fee = 5) == 0\n assert candidate(prices = [5, 4, 3, 2, 1],fee = 1) == 0\n assert candidate(prices = [1, 2, 3, 4, 5],fee = 0) == 4\n assert candidate(prices = [10, 22, 5, 75, 65, 80],fee = 3) == 88\n assert candidate(prices = [1, 5, 1, 5, 1, 5, 1, 5],fee = 2) == 8\n assert candidate(prices = [1, 3, 7, 5, 10, 3],fee = 3) == 6\n assert candidate(prices = [1, 3, 2, 1, 4, 5, 2, 11],fee = 1) == 12\n assert candidate(prices = [10, 5, 5, 5, 15, 5, 5, 20],fee = 3) == 19\n assert candidate(prices = [10, 10, 10, 10, 10],fee = 1) == 0\n assert candidate(prices = [1, 5, 1, 5, 1, 5, 1, 5, 1],fee = 2) == 8\n assert candidate(prices = [1, 3, 2, 4, 3, 5],fee = 1) == 3\n assert candidate(prices = [10, 1, 2, 7, 1, 3, 4, 10],fee = 2) == 11\n assert candidate(prices = [1, 5, 1, 5, 1, 5],fee = 2) == 6\n assert candidate(prices = [5, 4, 3, 2, 1],fee = 0) == 0\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 2, 8, 4, 9, 2, 8, 4, 9],fee = 2) == 22\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695],fee = 100) == 665\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],fee = 150) == 1325\n assert candidate(prices = [3, 15, 18, 14, 19, 20, 22, 17, 21, 23],fee = 5) == 15\n assert candidate(prices = [90, 80, 70, 60, 50, 40, 30, 20, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],fee = 5) == 10\n assert candidate(prices = [100, 98, 95, 97, 96, 99, 101, 102, 100, 104, 105, 107, 108, 105, 109],fee = 4) == 10\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1],fee = 1) == 6\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],fee = 20) == 130\n assert candidate(prices = [10, 1, 10, 1, 10, 1, 10, 1],fee = 5) == 12\n assert candidate(prices = [10, 22, 5, 75, 65, 80],fee = 3) == 88\n assert candidate(prices = [10, 20, 15, 25, 10, 30, 5, 35, 40, 45],fee = 3) == 68\n assert candidate(prices = [1, 2, 5, 3, 8, 9, 2, 10, 3, 7, 15, 10, 20, 15, 25, 20, 30, 25, 35, 30],fee = 3) == 47\n assert candidate(prices = [1, 3, 7, 5, 10, 3, 15, 12, 18, 20, 5, 10, 15, 25, 30],fee = 4) == 39\n assert candidate(prices = [1, 2, 5, 3, 8, 9, 2, 10, 3, 7],fee = 2) == 14\n assert candidate(prices = [100, 180, 260, 40, 310, 535, 695],fee = 10) == 795\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],fee = 2) == 22\n assert candidate(prices = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50],fee = 5) == 70\n assert candidate(prices = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10],fee = 0) == 16\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 10, 20, 30, 40, 50],fee = 10) == 30\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],fee = 1) == 0\n assert candidate(prices = [7, 9, 10, 11, 5, 3, 6, 8, 15, 20],fee = 2) == 17\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5],fee = 1) == 3\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],fee = 1) == 8\n assert candidate(prices = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4],fee = 1) == 4\n assert candidate(prices = [5, 3, 8, 12, 10, 14, 18, 15, 20, 25, 23, 28, 30],fee = 6) == 21\n assert candidate(prices = [8, 6, 4, 2, 10, 8, 6, 14, 12, 10, 18, 16, 14, 20, 18, 22],fee = 4) == 16\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],fee = 0) == 0\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 8, 2, 1, 5, 3, 6, 4, 8, 2, 1, 5, 3, 6, 4, 8, 2, 1, 5, 3, 6, 4, 8, 2, 1],fee = 2) == 20\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],fee = 0) == 9\n assert candidate(prices = [1, 7, 4, 11, 8, 16, 13, 20, 17, 25, 22, 30],fee = 5) == 24\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],fee = 10) == 0\n assert candidate(prices = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],fee = 2) == 0\n assert candidate(prices = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1],fee = 5) == 24\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, 26, 27, 28, 29, 30],fee = 5) == 24\n assert candidate(prices = [30, 50, 10, 5, 100, 50, 20, 10, 5, 30, 200, 150, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],fee = 30) == 1100\n assert candidate(prices = [1, 4, 3, 2, 5, 6, 3, 7, 8, 2, 4, 9],fee = 3) == 8\n assert candidate(prices = [30, 25, 28, 32, 27, 35, 40, 38, 42, 45, 48, 47, 49, 50, 51, 52, 50, 53],fee = 7) == 21\n assert candidate(prices = [1, 100, 2, 99, 3, 98, 4, 97, 5, 96],fee = 50) == 225\n assert candidate(prices = [7, 6, 4, 3, 1],fee = 1) == 0\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2],fee = 1) == 9\n assert candidate(prices = [10, 15, 12, 18, 14, 20, 16, 22, 18, 25],fee = 3) == 15\n assert candidate(prices = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 50, 40, 30, 20, 10, 50, 60, 70, 80, 90, 100, 50, 40, 30, 20, 10, 50],fee = 10) == 190\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],fee = 1) == 0\n assert candidate(prices = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9],fee = 0) == 8\n assert candidate(prices = [1, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9],fee = 2) == 6\n assert candidate(prices = [1, 7, 4, 11, 10, 5, 11, 5, 1, 5, 11, 5, 1, 5, 11, 5, 1, 5, 11, 5, 1, 5, 11, 5, 1, 5, 11, 5],fee = 5) == 31\n assert candidate(prices = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20],fee = 5) == 25\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],fee = 1) == 0\n assert candidate(prices = [100, 98, 102, 97, 99, 103, 101, 98, 104, 106],fee = 4) == 6\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],fee = 2) == 0\n assert candidate(prices = [10, 22, 5, 75, 65, 80, 100, 90, 110],fee = 3) == 125\n assert candidate(prices = [8, 12, 10, 15, 20, 17, 22, 25, 30, 35, 28, 33, 40],fee = 5) == 29\n assert candidate(prices = [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1],fee = 2) == 0\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1],fee = 1) == 0\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],fee = 1) == 13\n assert candidate(prices = [5, 2, 6, 1, 9, 4, 7, 3, 8, 5],fee = 3) == 8\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],fee = 1) == 0\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],fee = 10) == 0\n assert candidate(prices = [1, 2, 3, 10, 5, 6, 7, 100, 1, 2, 3, 10, 5, 6, 7, 100],fee = 10) == 178\n assert candidate(prices = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],fee = 6) == 10\n assert candidate(prices = [1, 10, 3, 100, 4, 101, 5, 102, 6, 103, 7, 104, 8, 105],fee = 5) == 556\n assert candidate(prices = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],fee = 5) == 85\n assert candidate(prices = [10, 11, 7, 10, 15, 10, 18, 20, 21, 10],fee = 4) == 11\n assert candidate(prices = [10, 15, 14, 20, 17, 22, 18, 25],fee = 5) == 10\n assert candidate(prices = [7, 6, 4, 3, 1, 8, 9, 10, 5, 4, 3, 2, 1, 10],fee = 2) == 14\n assert candidate(prices = [1, 4, 2, 6, 3, 7, 4, 8, 5, 9],fee = 2) == 9\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, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5],fee = 1) == 24\n assert candidate(prices = [1, 4, 5, 6, 7, 8, 10, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],fee = 4) == 11\n assert candidate(prices = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],fee = 3) == 0\n assert candidate(prices = [10, 14, 13, 11, 5, 7, 9, 8, 10, 12, 15, 14, 20, 18],fee = 3) == 13\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],fee = 1) == 13\n assert candidate(prices = [1, 10, 3, 15, 20, 18, 25, 27, 23, 30],fee = 7) == 22\n assert candidate(prices = [5, 2, 3, 7, 3, 9, 10, 4, 8, 10, 12, 15, 20, 18, 16, 14, 13, 11, 9, 7, 5, 3, 1],fee = 2) == 22\n assert candidate(prices = [1, 2, 5, 4, 8, 11, 10, 13, 12, 15, 18, 20],fee = 5) == 14\n assert candidate(prices = [10, 22, 5, 75, 65, 80, 90, 60, 70, 100, 110, 120, 130, 140, 150, 2, 3, 4, 5],fee = 10) == 157\n assert candidate(prices = [5, 10, 5, 10, 5, 10, 5, 10, 5, 10],fee = 4) == 5\n assert candidate(prices = [10, 1, 1, 1, 1, 1, 10],fee = 1) == 8\n assert candidate(prices = [2, 5, 1, 6, 3, 7, 4, 8, 5, 9],fee = 2) == 10\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],fee = 1) == 8\n assert candidate(prices = [80, 70, 60, 50, 40, 30, 20, 10],fee = 5) == 0\n", "comparison": "exact"}, "public_tests": ["[1,3,2,8,4,9]\n2", "[1,3,7,5,10,3]\n3"], "hints": ["Consider the first K stock prices. At the end, the only legal states are that you don't own a share of stock, or that you do. Calculate the most profit you could have under each of these two cases."], "metadata": {"canonical_parameter_names": ["prices", "fee"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:15+00:00", "tests_total": 107, "tests_dropped": 10, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "int maxProfit(vector& prices, int fee) {", "container": "Solution", "callable": "maxProfit", "parameters": [{"name": "prices", "type": "vector&"}, {"name": "fee", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 717, "task_id": "1-bit-and-2-bit-characters", "difficulty": "Easy", "problem_description": "We have two special characters:\n\n- The first character can be represented by one bit 0.\n- The second character can be represented by two bits (10 or 11).\n\nGiven a binary array bits that ends with 0, return true if the last character must be a one-bit character.\n\nExample 1:\n\nInput: bits = [1,0,0]\nOutput: true\nExplanation: The only way to decode it is two-bit character and one-bit character.\nSo the last character is one-bit character.\n\nExample 2:\n\nInput: bits = [1,1,1,0]\nOutput: false\nExplanation: The only way to decode it is two-bit character and two-bit character.\nSo the last character is not one-bit character.\n\nConstraints:\n\n- 1 <= bits.length <= 1000\n- bits[i] is either 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(bits = [1, 1, 1, 0]) == False\n assert candidate(bits = [0, 0, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0]) == True\n assert candidate(bits = [0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 0, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 1, 1, 0]) == False\n assert candidate(bits = [0, 0, 0, 0, 0]) == True\n assert candidate(bits = [1, 0, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 1, 0]) == True\n assert candidate(bits = [0, 1, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 1, 1, 1, 1, 1, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 1, 0, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 1, 1, 0, 0]) == True\n assert candidate(bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(bits = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 0, 1, 1, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 0, 1, 0, 1]) == True\n assert candidate(bits = [0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 0, 1, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 1, 1, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 0, 0, 0, 0]) == True\n assert candidate(bits = [0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 0, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 0, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 0, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(bits = [0, 1, 1, 0, 1, 1, 0]) == True\n assert candidate(bits = [1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 0, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == True\n assert candidate(bits = [1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0]) == True\n assert candidate(bits = [0, 1, 0, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0]) == False\n assert candidate(bits = [1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [0, 1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0]) == True\n assert candidate(bits = [1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0]) == True\n", "comparison": "exact"}, "public_tests": ["[1,0,0]", "[1,1,1,0]"], "hints": ["Keep track of where the next character starts. At the end, you want to know if you started on the last bit."], "metadata": {"canonical_parameter_names": ["bits"], "leetcode_dataset_entry_point": "Solution().isOneBitCharacter", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:18+00:00", "tests_total": 95, "tests_dropped": 0, "flags": [], "topic_tags": ["array"]}, "language": "cpp", "interface": {"raw_signature": "bool isOneBitCharacter(vector& bits) {", "container": "Solution", "callable": "isOneBitCharacter", "parameters": [{"name": "bits", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 718, "task_id": "maximum-length-of-repeated-subarray", "difficulty": "Medium", "problem_description": "Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays.\n\nExample 1:\n\nInput: nums1 = [1,2,3,2,1], nums2 = [3,2,1,4,7]\nOutput: 3\nExplanation: The repeated subarray with maximum length is [3,2,1].\n\nExample 2:\n\nInput: nums1 = [0,0,0,0,0], nums2 = [0,0,0,0,0]\nOutput: 5\nExplanation: The repeated subarray with maximum length is [0,0,0,0,0].\n\nConstraints:\n\n- 1 <= nums1.length, nums2.length <= 1000\n- 0 <= nums1[i], nums2[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [1, 2, 3, 2, 1],nums2 = [3, 2, 1, 4, 7]) == 3\n assert candidate(nums1 = [1, 2, 3],nums2 = [3, 4, 5]) == 1\n assert candidate(nums1 = [1, 0, 0, 0, 1],nums2 = [1, 0, 0, 0, 1]) == 5\n assert candidate(nums1 = [1],nums2 = [2]) == 0\n assert candidate(nums1 = [1],nums2 = [1]) == 1\n assert candidate(nums1 = [1, 2, 3],nums2 = [3, 2, 1]) == 1\n assert candidate(nums1 = [100, 0, 100, 0, 100],nums2 = [100, 0, 100, 0, 100]) == 5\n assert candidate(nums1 = [1, 2, 3, 2, 1],nums2 = [1, 2, 3, 2, 1]) == 5\n assert candidate(nums1 = [1, 0, 1, 0, 1],nums2 = [1, 0, 1, 0, 1]) == 5\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2, 2]) == 0\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == 1\n assert candidate(nums1 = [1, 2, 2, 1],nums2 = [2, 2]) == 2\n assert candidate(nums1 = [1, 2, 3, 2, 1],nums2 = [2, 1, 1, 2, 3]) == 3\n assert candidate(nums1 = [1, 0, 0, 0, 1],nums2 = [1, 0, 0, 1, 1]) == 3\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10]) == 0\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6]) == 0\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0]) == 5\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6, 5, 4],nums2 = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == 6\n assert candidate(nums1 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],nums2 = [50, 60, 70, 80, 90, 100, 10, 20, 30, 40]) == 6\n assert candidate(nums1 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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]) == 20\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],nums2 = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 11\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],nums2 = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums1 = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2],nums2 = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == 9\n assert 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]) == 6\n assert 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]) == 10\n assert candidate(nums1 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5],nums2 = [3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2]) == 18\n assert candidate(nums1 = [1, 2, 3, 2, 1, 1, 2, 3, 2, 1],nums2 = [3, 2, 1, 4, 7, 3, 2, 1, 4, 7]) == 3\n assert candidate(nums1 = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60],nums2 = [55, 56, 57, 58, 59, 60, 49, 48, 47, 46, 45]) == 6\n assert candidate(nums1 = [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]) == 15\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]) == 1\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]) == 10\n assert candidate(nums1 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5],nums2 = [2, 3, 4, 5, 1, 2, 3, 4, 5, 6]) == 9\n assert candidate(nums1 = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1],nums2 = [3, 2, 1, 4, 7, 3, 2, 1, 4, 7, 3, 2, 1, 4, 7, 3, 2, 1, 4, 7]) == 3\n assert candidate(nums1 = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50],nums2 = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 10\n assert candidate(nums1 = [1, 3, 2, 4, 5, 6],nums2 = [4, 5, 6, 1, 3, 2]) == 3\n assert candidate(nums1 = [98, 99, 100, 98, 99, 100, 98, 99, 100],nums2 = [99, 100, 98, 99, 100, 98, 99, 100, 98]) == 8\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6, 7, 8, 9, 0],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2]) == 3\n assert candidate(nums1 = [5, 0, 0, 0, 0, 0, 5],nums2 = [5, 0, 0, 0, 0, 0, 5]) == 7\n assert candidate(nums1 = [10, 20, 30, 40, 50, 60, 70],nums2 = [30, 40, 50, 60, 70, 10, 20]) == 5\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],nums2 = [8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7]) == 8\n assert candidate(nums1 = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50],nums2 = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 10\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, 5, 5, 5, 5, 5]) == 10\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [5, 4, 3, 2, 1, 9, 8, 7, 6]) == 5\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],nums2 = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4]) == 11\n assert candidate(nums1 = [1, 0, 1, 0, 1, 0, 1, 0, 1],nums2 = [0, 1, 0, 1, 0, 1, 0, 1, 0]) == 8\n assert candidate(nums1 = [2, 1, 4, 3, 5, 2, 3, 1],nums2 = [5, 2, 3, 1, 2, 1, 4, 3]) == 4\n assert candidate(nums1 = [1, 2, 2, 3, 3, 4, 4, 5, 5],nums2 = [5, 5, 4, 4, 3, 3, 2, 2, 1]) == 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]) == 0\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 9\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6],nums2 = [5, 6, 7, 3, 2, 1, 8, 9]) == 3\n assert candidate(nums1 = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91],nums2 = [92, 91, 100, 99, 98, 97, 96, 95, 94, 93]) == 8\n assert candidate(nums1 = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],nums2 = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 19\n assert candidate(nums1 = [5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 15\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6],nums2 = [6, 7, 8, 3, 2, 1, 4, 9]) == 4\n assert candidate(nums1 = [5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5]) == 1\n assert candidate(nums1 = [7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6],nums2 = [6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5]) == 19\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]) == 1\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 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 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 0\n assert candidate(nums1 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5],nums2 = [3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7]) == 13\n assert 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]) == 20\n assert candidate(nums1 = [3, 5, 2, 4, 9, 1],nums2 = [9, 1, 3, 5, 2, 4]) == 4\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\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]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == 20\n assert candidate(nums1 = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0],nums2 = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 9\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 8\n assert candidate(nums1 = [3, 3, 3, 3, 3, 1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 3, 3, 3, 3, 3]) == 5\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],nums2 = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2]) == 13\n assert candidate(nums1 = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],nums2 = [5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 2\n assert candidate(nums1 = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91],nums2 = [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 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, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums1 = [1, 2, 3, 2, 1, 2, 3, 2, 1],nums2 = [2, 3, 2, 1, 2, 3, 2, 1, 2]) == 8\n assert candidate(nums1 = [5, 4, 3, 2, 1, 0],nums2 = [3, 2, 1, 0, 5, 4]) == 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]) == 10\n assert candidate(nums1 = [1, 0, 1, 0, 1, 0, 1, 0],nums2 = [0, 1, 0, 1, 0, 1, 0, 1]) == 7\n assert candidate(nums1 = [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0],nums2 = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0]) == 19\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6],nums2 = [4, 5, 6, 1, 2, 3, 2, 1]) == 5\n assert candidate(nums1 = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2],nums2 = [2, 2, 2, 2, 2, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums1 = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91],nums2 = [92, 93, 94, 95, 96, 97, 98, 99, 100, 90]) == 1\n assert candidate(nums1 = [98, 97, 96, 95, 94, 93, 92, 91, 90],nums2 = [88, 87, 86, 98, 97, 96, 95, 94, 93]) == 6\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],nums2 = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]) == 6\n assert candidate(nums1 = [1, 2, 3, 2, 1, 4, 5, 6, 7, 8],nums2 = [8, 7, 6, 5, 4, 3, 2, 1, 2, 3]) == 3\n assert candidate(nums1 = [4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7]) == 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, 2]) == 9\n assert candidate(nums1 = [10, 50, 20, 10, 30, 50, 10],nums2 = [50, 10, 30, 50, 10, 20, 10]) == 4\n assert candidate(nums1 = [0, 0, 1, 1, 0, 0, 1, 1],nums2 = [1, 1, 0, 0, 1, 1, 0, 0]) == 6\n assert candidate(nums1 = [5, 1, 3, 7, 9, 11, 13],nums2 = [3, 7, 9, 11, 13, 5, 1]) == 5\n assert candidate(nums1 = [1, 0, 1, 0, 1, 0],nums2 = [0, 1, 0, 1, 0, 1]) == 5\n assert candidate(nums1 = [7, 8, 9, 10, 11, 12, 13],nums2 = [10, 11, 12, 13, 7, 8, 9]) == 4\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 7\n assert candidate(nums1 = [5, 1, 2, 3, 4, 1, 2, 3, 4, 5],nums2 = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 6\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0],nums2 = [5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4]) == 16\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [1, 3, 5, 7, 9, 11, 13, 15, 17]) == 1\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4]) == 6\n assert candidate(nums1 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],nums2 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 20\n assert candidate(nums1 = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],nums2 = [2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1]) == 11\n assert candidate(nums1 = [5, 1, 3, 5, 1, 3, 5, 1, 3],nums2 = [3, 5, 1, 3, 5, 1, 3, 5, 1]) == 8\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5],nums2 = [5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 11\n assert candidate(nums1 = [100, 99, 98, 97, 96, 95],nums2 = [95, 96, 97, 98, 99, 100]) == 1\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4]) == 6\n", "comparison": "exact"}, "public_tests": ["[1,2,3,2,1]\n[3,2,1,4,7]", "[0,0,0,0,0]\n[0,0,0,0,0]"], "hints": ["Use dynamic programming. dp[i][j] will be the longest common prefix of A[i:] and B[j:].", "The answer is max(dp[i][j]) over all i, j."], "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().findLength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:20+00:00", "tests_total": 110, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "binary-search", "dynamic-programming", "sliding-window", "rolling-hash", "hash-function"]}, "language": "cpp", "interface": {"raw_signature": "int findLength(vector& nums1, vector& nums2) {", "container": "Solution", "callable": "findLength", "parameters": [{"name": "nums1", "type": "vector&"}, {"name": "nums2", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 719, "task_id": "find-k-th-smallest-pair-distance", "difficulty": "Hard", "problem_description": "The distance of a pair of integers a and b is defined as the absolute difference between a and b.\n\nGiven an integer array nums and an integer k, return the k^th smallest distance among all the pairs nums[i] and nums[j] where 0 <= i < j < nums.length.\n\nExample 1:\n\nInput: nums = [1,3,1], k = 1\nOutput: 0\nExplanation: Here are all the pairs:\n(1,3) -> 2\n(1,1) -> 0\n(3,1) -> 2\nThen the 1^st smallest distance pair is (1,1), and its distance is 0.\n\nExample 2:\n\nInput: nums = [1,1,1], k = 2\nOutput: 0\n\nExample 3:\n\nInput: nums = [1,6,1], k = 3\nOutput: 5\n\nConstraints:\n\n- n == nums.length\n- 2 <= n <= 10^4\n- 0 <= nums[i] <= 10^6\n- 1 <= k <= n * (n - 1) / 2\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 4, 5],k = 10) == 4\n assert candidate(nums = [9, 10, 7, 10, 6, 1, 5, 4, 9, 8],k = 18) == 2\n assert candidate(nums = [62, 24, 6, 4, 40],k = 2) == 16\n assert candidate(nums = [5, 4, 3, 2, 1],k = 1) == 1\n assert candidate(nums = [1, 3, 1],k = 1) == 0\n assert candidate(nums = [5, 3, 8, 4, 2],k = 7) == 3\n assert candidate(nums = [10, 20, 30, 40, 50],k = 5) == 20\n assert candidate(nums = [4, 2, 1, 3],k = 5) == 2\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == 0\n assert candidate(nums = [1, 6, 1],k = 3) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 45) == 9\n assert candidate(nums = [1, 1, 1],k = 2) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 65) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],k = 100) == 24\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 = 190) == 0\n assert candidate(nums = [1, 3, 3, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 171) == 7\n assert candidate(nums = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400],k = 100) == 1199\n assert candidate(nums = [0, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19],k = 190) == 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],k = 90) == 3\n assert candidate(nums = [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],k = 190) == 74\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 = 180) == 15\n assert candidate(nums = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 50) == 799\n assert candidate(nums = [3, 8, 15, 17, 9, 4, 2],k = 10) == 6\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 105) == 140\n assert candidate(nums = [0, 0, 0, 0, 0, 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 = 250) == 2\n assert candidate(nums = [100000, 100000, 0, 100000, 50000, 50000, 50000, 50000],k = 28) == 100000\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 5, 5, 5, 5, 6, 7, 8, 8, 9],k = 50) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 0\n assert candidate(nums = [5, 1, 4, 1, 2, 6, 7, 8, 3, 9],k = 20) == 3\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 45) == 900\n assert candidate(nums = [1, 3, 1, 5, 7, 9],k = 10) == 4\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 45) == 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 = 190) == 190\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 = 190) == 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, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 435) == 29\n assert candidate(nums = [100, 150, 200, 250, 300, 350, 400, 450, 500],k = 30) == 250\n assert candidate(nums = [8, 1, 2, 2, 3],k = 3) == 1\n assert candidate(nums = [1000000, 999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991],k = 45) == 9\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 100000, 10000, 1000, 100, 10, 1],k = 66) == 99999\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5],k = 70) == 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],k = 1225) == 49\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5],k = 100) == 3\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],k = 25) == 40\n assert candidate(nums = [500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000, 500000],k = 100) == 0\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120],k = 105) == 119\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 = 292) == 21\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],k = 210) == 19\n assert candidate(nums = [1, 1000000, 2, 999999, 3, 999998, 4, 999997, 5, 999996],k = 15) == 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, 10, 10, 10],k = 270) == 4\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1, 2, 3, 4, 5],k = 100) == 999\n assert candidate(nums = [500000, 500001, 500002, 500003, 500004, 500005, 500006, 500007, 500008, 500009],k = 45) == 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],k = 189) == 180\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],k = 210) == 118\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 100) == 12\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],k = 300) == 48\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 = 150) == 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 = 190) == 0\n assert candidate(nums = [3, 8, 15, 17, 9, 12, 20, 7, 5, 10],k = 15) == 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],k = 190) == 19\n assert candidate(nums = [1, 1000000, 2, 999999, 3, 999998, 4, 999997, 5, 999996],k = 25) == 999993\n assert candidate(nums = [999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991, 999990, 999989],k = 55) == 10\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500],k = 45) == 400\n assert candidate(nums = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991],k = 30) == 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],k = 190) == 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],k = 190) == 9\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 = 190) == 9\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],k = 105) == 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],k = 171) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 100) == 12\n assert candidate(nums = [100000, 50000, 25000, 12500, 6250, 3125, 1562, 781, 390, 195],k = 44) == 99610\n", "comparison": "exact"}, "public_tests": ["[1,3,1]\n1", "[1,1,1]\n2", "[1,6,1]\n3"], "hints": ["Binary search for the answer. How can you check how many pairs have distance <= X?"], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().smallestDistancePair", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:22+00:00", "tests_total": 76, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "int smallestDistancePair(vector& nums, int k) {", "container": "Solution", "callable": "smallestDistancePair", "parameters": [{"name": "nums", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 720, "task_id": "longest-word-in-dictionary", "difficulty": "Medium", "problem_description": "Given an array of strings words representing an English Dictionary, return the longest word in words that can be built one character at a time by other words in words.\n\nIf there is more than one possible answer, return the longest word with the smallest lexicographical order. If there is no answer, return the empty string.\n\nNote that the word should be built from left to right with each additional character being added to the end of a previous word.\n\nExample 1:\n\nInput: words = [\"w\",\"wo\",\"wor\",\"worl\",\"world\"]\nOutput: \"world\"\nExplanation: The word \"world\" can be built one character at a time by \"w\", \"wo\", \"wor\", and \"worl\".\n\nExample 2:\n\nInput: words = [\"a\",\"banana\",\"app\",\"appl\",\"ap\",\"apply\",\"apple\"]\nOutput: \"apple\"\nExplanation: Both \"apply\" and \"apple\" can be built from other words in the dictionary. However, \"apple\" is lexicographically smaller than \"apply\".\n\nConstraints:\n\n- 1 <= words.length <= 1000\n- 1 <= words[i].length <= 30\n- words[i] consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh']) == \"abcdefgh\"\n assert candidate(words = ['a', 'b', 'c']) == \"a\"\n assert candidate(words = ['w', 'wo', 'wor', 'worl', 'world']) == \"world\"\n assert candidate(words = ['zebra', 'zeb', 'zebu', 'zebrae', 'zebraes', 'zebraest']) == \"\"\n assert candidate(words = ['car', 'cars', 'carp', 'card', 'care', 'career', 'caree', 'careerl', 'careerle', 'careerled']) == \"\"\n assert candidate(words = ['a', 'banana', 'app', 'appl', 'ap', 'apply', 'apple']) == \"apple\"\n assert candidate(words = ['hello', 'hell', 'he', 'h', 'hero', 'her', 'here', 'heroic']) == \"here\"\n assert candidate(words = ['ab', 'abc', 'bc', 'abcd']) == \"\"\n assert candidate(words = ['layer', 'layers', 'layered', 'layering', 'layerss']) == \"\"\n assert candidate(words = ['abcd', 'abc', 'ab', 'a']) == \"abcd\"\n assert candidate(words = ['cat', 'banana', 'dog', 'do', 'doge']) == \"\"\n assert candidate(words = ['apple', 'ape', 'app', 'appl', 'ap', 'application']) == \"\"\n assert candidate(words = ['yo', 'yolo', 'yell', 'yes', 'yellow', 'ye', 'yellower']) == \"\"\n assert candidate(words = ['sgz', 'sgzn', 'sgznwv', 'i', 'ksiaz', 'ksiazx', 'ksiazxp', 'iwc', 'iwcx', 'iwcxz', 'iwcxzo']) == \"i\"\n assert candidate(words = ['apple', 'app', 'ap', 'appl', 'apply']) == \"\"\n assert candidate(words = ['ab', 'abc', 'bcd', 'abcd', 'abcde']) == \"\"\n assert candidate(words = ['yo', 'yoyomo', 'yoymomo', 'yoyomomo']) == \"\"\n assert candidate(words = ['apple', 'ale', 'monkey', 'plea', 'pleas', 'please']) == \"\"\n assert candidate(words = ['m', 'mo', 'moc', 'moch', 'mocha', 'mochas', 'mochahu', 'mochahuu', 'mochahuuu']) == \"mochas\"\n assert candidate(words = ['m', 'mo', 'moc', 'moch', 'mocha', 'l', 'la', 'lat', 'latt', 'latte', 'c', 'ca', 'cat']) == \"latte\"\n assert candidate(words = ['b', 'br', 'bre', 'brea', 'break', 'breaks', 'breakin', 'breaks']) == \"breaks\"\n assert candidate(words = ['hello', 'hell', 'he', 'h']) == \"he\"\n assert candidate(words = ['b', 'br', 'bre', 'brea', 'break', 'breaks']) == \"breaks\"\n assert candidate(words = ['cat', 'cats', 'catsdogcats', 'dog', 'dogcatsdog', 'hippopotamuses', 'rat', 'ratcatdogcat']) == \"\"\n assert candidate(words = ['ab', 'abc', 'bcd', 'bc', 'cd']) == \"\"\n assert candidate(words = ['a', 'b', 'c', 'ab', 'bc', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh']) == \"abcdefgh\"\n assert candidate(words = ['cat', 'cats', 'dog', 'dogcatsdog', 'rat', 'catdog', 'dogdog', 'ratcatdog', 'catdogdog', 'dogratcat']) == \"\"\n assert candidate(words = ['ocean', 'oce', 'oc', 'oceanic', 'oceani', 'oceanicw', 'oceanicwa', 'oceanicwam', 'oceanicwama', 'oceanicwamal', 'oceanicwamali', 'oceanicwamalin', 'oceanicwamalinl']) == \"\"\n assert candidate(words = ['apple', 'apples', 'applesauce', 'applesauc', 'applesauced', 'applesauceme', 'applesaucemel', 'applesaucemell', 'applesaucemellu', 'applesaucemellus']) == \"\"\n assert candidate(words = ['j', 'ja', 'jav', 'java', 'javas', 'javasc', 'javascri', 'javascrip', 'javascrip', 'javascript', 'javascripte', 'javascripten', 'javascripteng', 'javascriptengi', 'javascriptengin', 'javascriptenging']) == \"javasc\"\n assert candidate(words = ['dog', 'doge', 'doged', 'dogedj', 'dogedju', 'dogedjud', 'dogedjudge', 'dogedjudges', 'dogedjudgese', 'dogedjudgeses']) == \"\"\n assert candidate(words = ['dog', 'dogs', 'dogss', 'dogsss', 'dogssss', 'dogsssss']) == \"\"\n assert candidate(words = ['z', 'zz', 'zzz', 'zzzz', 'zzzzz', 'zzzzzz', 'zzzzzzz']) == \"zzzzzzz\"\n assert candidate(words = ['p', 'pa', 'pan', 'pang', 'pange', 'pangea', 'pangean']) == \"pangean\"\n assert candidate(words = ['kangaroo', 'kangaro', 'kangaroos', 'kangar', 'kanga', 'kang', 'kan', 'ka', 'k']) == \"kangaroos\"\n assert candidate(words = ['hello', 'hell', 'he', 'h', 'world', 'wor', 'wo', 'w', 'python', 'pyth', 'pyt', 'py', 'p']) == \"pyth\"\n assert candidate(words = ['cat', 'bat', 'rat', 'car', 'catr', 'carr', 'cart', 'carth', 'carthe', 'carthes', 'carthesi', 'carthesis']) == \"\"\n assert candidate(words = ['elephant', 'eleph', 'elephas', 'elephan', 'elephanc', 'elephantc', 'elephantco', 'elephantcor', 'elephantcorn', 'elephantcorns']) == \"\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyza', 'xyzab', 'xyzabc', 'xyzabcd']) == \"xyzabcd\"\n assert candidate(words = ['happy', 'happ', 'hap', 'ha', 'happier', 'happie', 'happyland', 'happylan', 'happyla', 'happyl', 'happyl']) == \"\"\n assert candidate(words = ['xyz', 'xy', 'x', 'yz', 'y', 'z', 'xyzd', 'xyzde', 'xyzdef', 'xyzdefg']) == \"xyzdefg\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyzz', 'xyzzz', 'xyzzzz', 'xyzzzzz', 'xyzzzzzz', 'xyzzzzzzz', 'xyzzzzzzzz']) == \"xyzzzzzzzz\"\n assert candidate(words = ['elephant', 'eleph', 'elep', 'ele', 'el', 'e', 'elephantman', 'elephantwoman', 'elephantmanwoman', 'elephantwomanman']) == \"eleph\"\n assert candidate(words = ['a', 'abc', 'ab', 'abcd', 'abcde', 'abcdefg', 'abcdefgh']) == \"abcde\"\n assert candidate(words = ['hello', 'hell', 'hellp', 'hellpa', 'hellpad', 'hellpadd', 'hellpaddr', 'hellpaddre', 'hellpadder', 'hellpadding']) == \"\"\n assert candidate(words = ['m', 'ma', 'mat', 'math', 'maths', 'mathem', 'mathema', 'mathemat', 'mathemati', 'mathematis', 'mathematic', 'mathematica', 'mathematical', 'mathematicals']) == \"maths\"\n assert candidate(words = ['banana', 'bandana', 'band', 'bandanaa', 'bandanaaa', 'bandanaaaa', 'bandanaaaaa']) == \"\"\n assert candidate(words = ['m', 'mo', 'moc', 'moch', 'mocha', 'mochau', 'mochaus', 'mochause', 'mochauset', 'mochausett']) == \"mochausett\"\n assert candidate(words = ['programming', 'program', 'progra', 'programm', 'programmi', 'programmin', 'programmin', 'programmin', 'programmin', 'programmingl']) == \"\"\n assert candidate(words = ['w', 'wo', 'wor', 'worl', 'world', 'worls', 'worlsa', 'worlsas', 'worlsask', 'worlsaskp', 'worlsaskph', 'worlsaskphb', 'worlsaskphbr', 'worlsaskphbrn']) == \"worlsaskphbrn\"\n assert candidate(words = ['zebra', 'zebr', 'zeb', 'ze', 'z', 'zebrazebr', 'zebrzebr', 'zebzeb', 'zeze', 'zz', 'zzz', 'zzzz', 'zzzzz']) == \"zebra\"\n assert candidate(words = ['sun', 'sunny', 'sunnyd', 'sunnyda', 'sunnydar', 'sunnydark', 'sunnydarc', 'sunnydarck', 'sunnydarcks', 'sunnydarckso', 'sunnydarckson', 'sunnydarcksong']) == \"\"\n assert candidate(words = ['r', 'ra', 'ran', 'ranc', 'ranch', 'rancha', 'ranchai', 'ranchain', 'ranchaind', 'ranchainde', 'ranchainden', 'ranchaindent', 'ranchaindente', 'ranchaindentel', 'ranchaindentels']) == \"ranchaindentels\"\n assert candidate(words = ['abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk']) == \"\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyza', 'xyzab', 'xyzabc', 'xyzabcd', 'xyzabcde', 'xyzabcdef']) == \"xyzabcdef\"\n assert candidate(words = ['a', 'b', 'c', 'ab', 'bc', 'abc', 'abcd', 'abcde', 'abcdef']) == \"abcdef\"\n assert candidate(words = ['car', 'cards', 'carpet', 'cart', 'cat', 'cats', 'cattle', 'dog', 'dogs', 'doghouse', 'doghousee']) == \"\"\n assert candidate(words = ['cat', 'cats', 'catsd', 'catsdo', 'catsdog', 'catsdogw', 'catsdogwa', 'catsdogwar', 'catsdogwarm', 'catsdogwarms']) == \"\"\n assert candidate(words = ['banana', 'ban', 'band', 'bandi', 'bandit', 'bandits', 'bands', 'bandwidth', 'bandwidths', 'bandwidthing']) == \"\"\n assert candidate(words = ['sheep', 'she', 'sh', 's', 'shelter', 'shel', 'shele', 'sheleh', 'shelehi', 'shelehii']) == \"shelehii\"\n assert candidate(words = ['at', 'att', 'atti', 'attis', 'attire', 'attach', 'attachs', 'attaches', 'attaching']) == \"\"\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'abcdefghijklmnopqrstuvwxy', 'abcdefghijklmnopqrstuvwx', 'abcdefghijklmnopqrstuvw', 'abcdefghijklmnopqrstu', 'abcdefghijklmnopqrst', 'abcdefghijklmnopqrs', 'abcdefghijklmnopqr', 'abcdefghijklmnopq', 'abcdefghijklmnop', 'abcdefghijklmno', 'abcdefghijklmn', 'abcdefghijklm', 'abcdefghijkl', 'abcdefghijk', 'abcdefghij', 'abcdefghi', 'abcdefgh', 'abcdefg', 'abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == \"abcdefghijklmnopqrstu\"\n assert candidate(words = ['m', 'mo', 'moc', 'moch', 'mocha', 'mochas', 'mochatel']) == \"mochas\"\n assert candidate(words = ['a', 'b', 'c', 'ab', 'bc', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg']) == \"abcdefg\"\n assert candidate(words = ['g', 'go', 'god', 'godd', 'godde', 'goddess', 'goddesss', 'goddessss', 'goddesssss', 'goddessssss', 'goddesssssss', 'goddessssssss']) == \"godde\"\n assert candidate(words = ['education', 'educati', 'educatio', 'educat', 'educati', 'educati', 'educati', 'educati', 'educati', 'educati']) == \"\"\n assert candidate(words = ['elephant', 'eleph', 'elep', 'ele', 'el', 'e', 'giraffe', 'gira', 'gir', 'gi', 'g', 'zebra', 'zeb', 'ze', 'z']) == \"eleph\"\n assert candidate(words = ['m', 'mo', 'mon', 'mond', 'mondo', 'mondoo', 'mondooo', 'mondooooo', 'mondoooooo', 'mondooooooo']) == \"mondooo\"\n assert candidate(words = ['ab', 'abc', 'abca', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm', 'abcdefghijklmn']) == \"\"\n assert candidate(words = ['word', 'wor', 'worl', 'world', 'worldd', 'worldde', 'worlddee', 'worlddeep', 'worlddeeper', 'worlddeepest', 'worlddeepestt', 'worlddeepesttt', 'worlddeepestttt', 'worlddeepesttttt', 'worlddeepesttttts', 'worlddeepesttttsss', 'worlddeepesttttssss', 'worlddeepesttttsssss', 'worlddeepesttttssssss']) == \"\"\n assert candidate(words = ['zebra', 'zebras', 'zebrass', 'zebrasss', 'zebrassss', 'zebrasssss', 'zebrassssss']) == \"\"\n assert candidate(words = ['a', 'b', 'c', 'ab', 'bc', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij']) == \"abcdefghij\"\n assert candidate(words = ['m', 'mo', 'moc', 'moch', 'mocha', 'mochaa', 'mochaaa', 'mochaaaa', 'mochaaaaa', 'mochaaaaaa', 'mochaaaaaab', 'mochaaaaaabc']) == \"mochaaaaaabc\"\n assert candidate(words = ['abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm', 'abcdefghijklmn', 'abcdefghijklmnop', 'abcdefghijklmnopq', 'abcdefghijklmnopqr', 'abcdefghijklmnopqrs', 'abcdefghijklmnopqrst', 'abcdefghijklmnopqrstu', 'abcdefghijklmnopqrstuv', 'abcdefghijklmnopqrstuvw', 'abcdefghijklmnopqrstuvwx', 'abcdefghijklmnopqrstuvwxy', 'abcdefghijklmnopqrstuvwxyz']) == \"\"\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aab', 'aabb', 'aaabb', 'aabbb', 'aabbbb', 'aabbbba', 'aabbbbac', 'aabbbbacc', 'aabbbbaccd', 'aabbbbaccde', 'aabbbbaccdef', 'aabbbbaccd', 'aabbbbacce', 'aabbbbaccf', 'aabbbbaccg']) == \"aabbbbaccdef\"\n assert candidate(words = ['cat', 'cats', 'catdog', 'dog', 'dogcat', 'dogdog', 'catcat', 'catdogcat']) == \"\"\n assert candidate(words = ['aardvark', 'aardva', 'aardv', 'aard', 'aarr', 'aar', 'aa', 'a', 'bark', 'bar', 'ba', 'b']) == \"aardva\"\n assert candidate(words = ['aaaaaa', 'aaaaab', 'aaaaac', 'aaaaad', 'aaaaae', 'aaaaaf', 'aaaaag', 'aaaaah', 'aaaaai', 'aaaaaj']) == \"\"\n assert candidate(words = ['t', 'to', 'too', 'tool', 'tools', 'tooool', 'toooln', 'tooolna', 'tooolnan', 'tooolnanc', 'tooolnance', 'tooolnances']) == \"tools\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyzz', 'xyzzz', 'xyzzzz']) == \"xyzzzz\"\n assert candidate(words = ['aabbcc', 'aabbc', 'aabb', 'aab', 'aa', 'a', 'aabbbccc', 'aabbbcc', 'aabbbc', 'aabbb', 'aabbccdd', 'aabbccd', 'aabbccdd', 'aabbccdde', 'aabbccddeff', 'aabbccddefff']) == \"aabbccdde\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyzz', 'xyzzz', 'xyzzzz', 'xyzzzzz', 'xyzzzzzz', 'xyzzzzzzz', 'xyzzzzzzzz']) == \"xyzzzzzzzz\"\n assert candidate(words = ['cat', 'cats', 'catsd', 'catsdo', 'catsdog', 'catsdogs']) == \"\"\n assert candidate(words = ['lion', 'lions', 'liones', 'lionesi', 'lionesis', 'lionesiss', 'lionesissi']) == \"\"\n assert candidate(words = ['m', 'mi', 'mic', 'mice', 'micem', 'micems', 'micemse', 'micemsen', 'micemsens', 'micemsense', 'micemsenses']) == \"micemsenses\"\n assert candidate(words = ['zebra', 'zeb', 'zebrai', 'zebraic', 'zebrain', 'zebrainc', 'zebrainco', 'zebraincor', 'zebraincorn', 'zebraincorns']) == \"\"\n assert candidate(words = ['dog', 'dogg', 'doggo', 'doggos', 'doggoes', 'doggoest', 'doggoesta', 'doggoestas', 'doggoestast', 'doggoestaste', 'doggoestastes', 'doggoestastesf', 'doggoestastesfi', 'doggoestastesfir']) == \"\"\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']) == \"a\"\n assert candidate(words = ['elephant', 'elephan', 'eleph', 'elep', 'ele', 'el', 'e']) == \"eleph\"\n assert candidate(words = ['x', 'y', 'z', 'xy', 'xz', 'yx', 'yz', 'zx', 'zy', 'xyz', 'xzy', 'yxz', 'yzx', 'zxy', 'zyx', 'xyzs', 'xzyt', 'yxzu', 'yzxv', 'zxwy', 'zyxw', 'xyzw']) == \"xyzs\"\n assert candidate(words = ['s', 'su', 'sun', 'sund', 'sunde', 'sunden', 'sundenw', 'sundenwe', 'sundenwet', 'sundenwete', 'sundenwetep', 'sundenweteps', 'sundenwetepsi', 'sundenwetepsir', 'sundenwetepsirc']) == \"sundenwetepsirc\"\n assert candidate(words = ['x', 'xy', 'xyz', 'xyzz', 'xyzzz', 'xyzzzz', 'xyzzzzz', 'xyzzzzzz', 'xyzzzzzzz', 'xyzzzzzzzz', 'xyzzzzzzzzz']) == \"xyzzzzzzzzz\"\n assert candidate(words = ['p', 'pa', 'par', 'para', 'paral', 'parale', 'paralle', 'paralle', 'parallel', 'parallell', 'parallellu', 'parallelly', 'parallellye', 'parallellyes', 'parallellyest', 'parallellyests']) == \"parale\"\n assert candidate(words = ['xyz', 'xy', 'x', 'xz', 'xzv', 'xzvc', 'xzvcd']) == \"xzvcd\"\n assert candidate(words = ['tiger', 'tig', 'ti', 't', 'lion', 'lio', 'li', 'l', 'bear', 'bea', 'be', 'b', 'wolf', 'wo', 'w', 'fox', 'fo', 'f']) == \"bear\"\n assert candidate(words = ['z', 'y', 'x', 'yz', 'xz', 'yx', 'xyz', 'yxz', 'zyx', 'zyxz', 'zyxw']) == \"yxz\"\n assert candidate(words = ['z', 'zz', 'zzz', 'zzzz', 'zzzzz', 'zzzzzz', 'zzzzzzz', 'zzzzzzzz', 'zzzzzzzzz', 'zzzzzzzzzz', 'zzzzzzzzzzz']) == \"zzzzzzzzzzz\"\n assert candidate(words = ['z', 'ze', 'zel', 'zela', 'zelat', 'zelato', 'zelaton', 'zelatona', 'zelatonam', 'zelatonami', 'zelatonamil', 'zelatonamilis', 'zelatonamilisa']) == \"zelatonamil\"\n assert candidate(words = ['b', 'ba', 'ban', 'band', 'bands', 'bandw', 'bandwi', 'bandwin', 'bandwind', 'bandwindy', 'bandwindyt', 'bandwindytr', 'bandwindytri', 'bandwindytrin', 'bandwindytrink', 'bandwindytrinkt', 'bandwindytrinkte', 'bandwindytrinktel', 'bandwindytrinkle', 'bandwindytrinklet', 'bandwindytrinklety', 'bandwindytrinkletys', 'bandwindytrinkletysi', 'bandwindytrinkletysin', 'bandwindytrinkletysinc']) == \"bandwindytrinktel\"\n assert candidate(words = ['zebra', 'zebr', 'zeb', 'z', 'appl', 'apply', 'apple', 'app', 'apples', 'applf', 'applfs', 'applfst', 'applfsth', 'applfstha', 'applfsthaw']) == \"z\"\n assert candidate(words = ['giraffe', 'giraff', 'gira', 'gir', 'gi', 'g']) == \"gira\"\n assert candidate(words = ['zebra', 'zeb', 'zebraa', 'zebraaa', 'zebraaaa', 'zebraaaaa', 'zebraaaaaa']) == \"\"\n assert candidate(words = ['aaa', 'aa', 'a', 'aaaa', 'aab', 'aabbb', 'aabbbb', 'aabbbbb', 'aabbbbbb', 'aabbbbbbb', 'aabbbbbbbb']) == \"aaaa\"\n assert candidate(words = ['a', 'apple', 'apply', 'apples', 'applesauce', 'applesauces']) == \"a\"\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == \"aaaaaaaaaa\"\n assert candidate(words = ['table', 'tab', 'tabl', 'tabli', 'tablir', 'tablirt', 'tablirte', 'tablirtet', 'tablirtete', 'tablirtetep', 'tablirtetepy', 'tablirtetepyv', 'tablirtetepyvu', 'tablirtetepyvul']) == \"\"\n assert candidate(words = ['cat', 'cats', 'catsd', 'catsdo', 'catsdog', 'catsdogs', 'catsdogsa', 'catsdogsau', 'catsdogsaus', 'catsdogsausa', 'catsdogsausag', 'catsdogsausag', 'catsdogsausage']) == \"\"\n assert candidate(words = ['hello', 'hell', 'hel', 'he', 'h', 'world', 'wor', 'wo', 'w', 'python', 'pytho', 'pyth', 'pyt', 'py', 'p', 'programming', 'programmin', 'programmi', 'programm', 'program', 'progra', 'progr', 'prog', 'pro', 'pr', 'p']) == \"programming\"\n assert candidate(words = ['a', 'b', 'ba', 'bca', 'bda', 'bdca']) == \"ba\"\n assert candidate(words = ['k', 'ka', 'kay', 'kaye', 'kayes', 'kayest', 'kayesta', 'kayestan', 'kayestana', 'kayestanap', 'kayestanapa', 'kayestanapal', 'kayestanapali', 'kayestanapaliu', 'kayestanapaliud', 'kayestanapaliude', 'kayestanapaliuder', 'kayestanapaliuderk', 'kayestanapaliuderks']) == \"kayestanapaliuderks\"\n assert candidate(words = ['umbrella', 'umbrell', 'umbrel', 'umbre', 'umbr', 'umb', 'um', 'u']) == \"umbrella\"\n assert candidate(words = ['apple', 'apples', 'banana', 'bananas', 'banan', 'bat', 'batman', 'batmans', 'batman', 'batman', 'batmans', 'batman']) == \"\"\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'abcdefghijklmnopqrstuvwxy', 'abcdefghijklmnopqrstuvwx', 'abcdefghijklmnopqrstuvw', 'abcdefghijklmnopqrstu', 'abcdefghijklmnopqrst', 'abcdefghijklmnopqr', 'abcdefghijklmnopq', 'abcdefghijklmnop', 'abcdefghijklnmopqrstu', 'abcdefghijklnmopqrst', 'abcdefghijklnmopqr', 'abcdefghijklnmopq', 'abcdefghijklnmop', 'abcdefghijklnmo', 'abcdefghijklnm', 'abcdefghijkln', 'abcdefghijk', 'abcdefghij', 'abcdefghi', 'abcdefgh', 'abcdefg', 'abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == \"abcdefghijk\"\n assert candidate(words = ['p', 'pa', 'pac', 'pack', 'packe', 'packet', 'packeta', 'packetas', 'packetasi', 'packetasic', 'packetasics', 'packetasicsl', 'packetasicsli', 'packetasicslib', 'packetasicslibs']) == \"packetasicslibs\"\n", "comparison": "exact"}, "public_tests": ["[\"w\",\"wo\",\"wor\",\"worl\",\"world\"]", "[\"a\",\"banana\",\"app\",\"appl\",\"ap\",\"apply\",\"apple\"]"], "hints": ["For every word in the input list, we can check whether all prefixes of that word are in the input list by using a Set."], "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().longestWord", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:24+00:00", "tests_total": 116, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "hash-table", "string", "trie", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "string longestWord(vector& words) {", "container": "Solution", "callable": "longestWord", "parameters": [{"name": "words", "type": "vector&"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 721, "task_id": "accounts-merge", "difficulty": "Medium", "problem_description": "Given a list of accounts where each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements are emails representing emails of the account.\n\nNow, we would like to merge these accounts. Two accounts definitely belong to the same person if there is some common email to both accounts. Note that even if two accounts have the same name, they may belong to different people as people could have the same name. A person can have any number of accounts initially, but all of their accounts definitely have the same name.\n\nAfter merging the accounts, return the accounts in the following format: the first element of each account is the name, and the rest of the elements are emails in sorted order. The accounts themselves can be returned in any order.\n\nExample 1:\n\nInput: accounts = [[\"John\",\"johnsmith@mail.com\",\"john_newyork@mail.com\"],[\"John\",\"johnsmith@mail.com\",\"john00@mail.com\"],[\"Mary\",\"mary@mail.com\"],[\"John\",\"johnnybravo@mail.com\"]]\nOutput: [[\"John\",\"john00@mail.com\",\"john_newyork@mail.com\",\"johnsmith@mail.com\"],[\"Mary\",\"mary@mail.com\"],[\"John\",\"johnnybravo@mail.com\"]]\nExplanation:\nThe first and second John's are the same person as they have the common email \"johnsmith@mail.com\".\nThe third John and Mary are different people as none of their email addresses are used by other accounts.\nWe could return these lists in any order, for example the answer [['Mary', 'mary@mail.com'], ['John', 'johnnybravo@mail.com'],\n['John', 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com']] would still be accepted.\n\nExample 2:\n\nInput: accounts = [[\"Gabe\",\"Gabe0@m.co\",\"Gabe3@m.co\",\"Gabe1@m.co\"],[\"Kevin\",\"Kevin3@m.co\",\"Kevin5@m.co\",\"Kevin0@m.co\"],[\"Ethan\",\"Ethan5@m.co\",\"Ethan4@m.co\",\"Ethan0@m.co\"],[\"Hanzo\",\"Hanzo3@m.co\",\"Hanzo1@m.co\",\"Hanzo0@m.co\"],[\"Fern\",\"Fern5@m.co\",\"Fern1@m.co\",\"Fern0@m.co\"]]\nOutput: [[\"Ethan\",\"Ethan0@m.co\",\"Ethan4@m.co\",\"Ethan5@m.co\"],[\"Gabe\",\"Gabe0@m.co\",\"Gabe1@m.co\",\"Gabe3@m.co\"],[\"Hanzo\",\"Hanzo0@m.co\",\"Hanzo1@m.co\",\"Hanzo3@m.co\"],[\"Kevin\",\"Kevin0@m.co\",\"Kevin3@m.co\",\"Kevin5@m.co\"],[\"Fern\",\"Fern0@m.co\",\"Fern1@m.co\",\"Fern5@m.co\"]]\n\nConstraints:\n\n- 1 <= accounts.length <= 1000\n- 2 <= accounts[i].length <= 10\n- 1 <= accounts[i][j].length <= 30\n- accounts[i][0] consists of English letters.\n- accounts[i][j] (for j > 0) is a valid email.\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(accounts=[['Alex', 'alex@example.com'], ['Bob', 'bob@example.com'], ['Alex', 'alex2@example.com']]), [['Alex', 'alex@example.com'], ['Bob', 'bob@example.com'], ['Alex', 'alex2@example.com']])\n assert answers_match(candidate(accounts=[['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com']]), [['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com']])\n assert answers_match(candidate(accounts=[['Gabe', 'Gabe0@m.co', 'Gabe3@m.co', 'Gabe1@m.co'], ['Kevin', 'Kevin3@m.co', 'Kevin5@m.co', 'Kevin0@m.co'], ['Ethan', 'Ethan5@m.co', 'Ethan4@m.co', 'Ethan0@m.co'], ['Hanzo', 'Hanzo3@m.co', 'Hanzo1@m.co', 'Hanzo0@m.co'], ['Fern', 'Fern5@m.co', 'Fern1@m.co', 'Fern0@m.co']]), [['Gabe', 'Gabe0@m.co', 'Gabe1@m.co', 'Gabe3@m.co'], ['Kevin', 'Kevin0@m.co', 'Kevin3@m.co', 'Kevin5@m.co'], ['Ethan', 'Ethan0@m.co', 'Ethan4@m.co', 'Ethan5@m.co'], ['Hanzo', 'Hanzo0@m.co', 'Hanzo1@m.co', 'Hanzo3@m.co'], ['Fern', 'Fern0@m.co', 'Fern1@m.co', 'Fern5@m.co']])\n assert answers_match(candidate(accounts=[['John', 'johnsmith@mail.com', 'john_newyork@mail.com'], ['John', 'johnsmith@mail.com', 'john00@mail.com'], ['Mary', 'mary@mail.com'], ['John', 'johnnybravo@mail.com']]), [['John', 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com'], ['Mary', 'mary@mail.com'], ['John', 'johnnybravo@mail.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com']]), [['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com']])\n assert answers_match(candidate(accounts=[['Tom', 'tom1@example.com', 'tom2@example.com', 'tom3@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom4@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom5@example.com'], ['Jerry', 'jerry3@example.com', 'jerry4@example.com'], ['Tom', 'tom6@example.com'], ['Jerry', 'jerry5@example.com', 'jerry1@example.com'], ['Tom', 'tom2@example.com'], ['Jerry', 'jerry6@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry7@example.com'], ['Tom', 'tom4@example.com'], ['Jerry', 'jerry8@example.com'], ['Tom', 'tom5@example.com'], ['Jerry', 'jerry9@example.com'], ['Tom', 'tom6@example.com'], ['Jerry', 'jerry10@example.com'], ['Tom', 'tom1@example.com'], ['Jerry', 'jerry11@example.com'], ['Tom', 'tom7@example.com'], ['Jerry', 'jerry12@example.com'], ['Tom', 'tom8@example.com'], ['Jerry', 'jerry13@example.com'], ['Tom', 'tom9@example.com'], ['Jerry', 'jerry14@example.com'], ['Tom', 'tom10@example.com'], ['Jerry', 'jerry15@example.com'], ['Tom', 'tom11@example.com'], ['Jerry', 'jerry16@example.com'], ['Tom', 'tom12@example.com'], ['Jerry', 'jerry17@example.com'], ['Tom', 'tom13@example.com'], ['Jerry', 'jerry18@example.com'], ['Tom', 'tom14@example.com'], ['Jerry', 'jerry19@example.com'], ['Tom', 'tom15@example.com'], ['Jerry', 'jerry20@example.com']]), [['Tom', 'tom1@example.com', 'tom2@example.com', 'tom3@example.com'], ['Jerry', 'jerry1@example.com', 'jerry5@example.com'], ['Tom', 'tom4@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom5@example.com'], ['Jerry', 'jerry3@example.com', 'jerry4@example.com'], ['Tom', 'tom6@example.com'], ['Jerry', 'jerry6@example.com'], ['Jerry', 'jerry7@example.com'], ['Jerry', 'jerry8@example.com'], ['Jerry', 'jerry9@example.com'], ['Jerry', 'jerry10@example.com'], ['Jerry', 'jerry11@example.com'], ['Tom', 'tom7@example.com'], ['Jerry', 'jerry12@example.com'], ['Tom', 'tom8@example.com'], ['Jerry', 'jerry13@example.com'], ['Tom', 'tom9@example.com'], ['Jerry', 'jerry14@example.com'], ['Tom', 'tom10@example.com'], ['Jerry', 'jerry15@example.com'], ['Tom', 'tom11@example.com'], ['Jerry', 'jerry16@example.com'], ['Tom', 'tom12@example.com'], ['Jerry', 'jerry17@example.com'], ['Tom', 'tom13@example.com'], ['Jerry', 'jerry18@example.com'], ['Tom', 'tom14@example.com'], ['Jerry', 'jerry19@example.com'], ['Tom', 'tom15@example.com'], ['Jerry', 'jerry20@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com', 'alice2@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com'], ['Charlie', 'charlie1@example.com', 'alice2@example.com'], ['David', 'david1@example.com', 'bob2@example.com', 'david2@example.com']]), [['Alice', 'alice1@example.com', 'alice2@example.com', 'charlie1@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com', 'david1@example.com', 'david2@example.com']])\n assert answers_match(candidate(accounts=[['Charlie', 'charlie1@example.com', 'charlie2@example.com'], ['Dave', 'dave1@example.com'], ['Charlie', 'charlie3@example.com'], ['Eve', 'eve1@example.com'], ['Charlie', 'charlie2@example.com'], ['Dave', 'dave2@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com']]), [['Charlie', 'charlie1@example.com', 'charlie2@example.com'], ['Dave', 'dave1@example.com'], ['Charlie', 'charlie3@example.com'], ['Eve', 'eve1@example.com'], ['Dave', 'dave2@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna4@example.com'], ['Anna', 'anna5@example.com'], ['Anna', 'anna6@example.com'], ['Anna', 'anna7@example.com'], ['Anna', 'anna8@example.com'], ['Anna', 'anna9@example.com']]), [['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna4@example.com'], ['Anna', 'anna5@example.com'], ['Anna', 'anna6@example.com'], ['Anna', 'anna7@example.com'], ['Anna', 'anna8@example.com'], ['Anna', 'anna9@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex@example.com'], ['Alex', 'alex1@example.com'], ['Alex', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Alex', 'alex4@example.com'], ['Alex', 'alex5@example.com']]), [['Alex', 'alex@example.com'], ['Alex', 'alex1@example.com'], ['Alex', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Alex', 'alex4@example.com'], ['Alex', 'alex5@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve@example.com'], ['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Eve', 'eve4@example.com'], ['Eve', 'eve5@example.com'], ['Eve', 'eve6@example.com']]), [['Eve', 'eve@example.com'], ['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Eve', 'eve4@example.com'], ['Eve', 'eve5@example.com'], ['Eve', 'eve6@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com'], ['Eve', 'eve4@example.com', 'eve5@example.com'], ['Eve', 'eve6@example.com', 'eve7@example.com'], ['Eve', 'eve1@example.com', 'eve4@example.com']]), [['Eve', 'eve1@example.com', 'eve4@example.com', 'eve5@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com'], ['Eve', 'eve6@example.com', 'eve7@example.com']])\n assert answers_match(candidate(accounts=[['Will', 'will1@example.com'], ['Will', 'will2@example.com'], ['Will', 'will3@example.com'], ['Will', 'will4@example.com'], ['Will', 'will5@example.com'], ['Will', 'will6@example.com'], ['Will', 'will7@example.com'], ['Will', 'will8@example.com'], ['Will', 'will9@example.com'], ['Will', 'will10@example.com']]), [['Will', 'will1@example.com'], ['Will', 'will2@example.com'], ['Will', 'will3@example.com'], ['Will', 'will4@example.com'], ['Will', 'will5@example.com'], ['Will', 'will6@example.com'], ['Will', 'will7@example.com'], ['Will', 'will8@example.com'], ['Will', 'will9@example.com'], ['Will', 'will10@example.com']])\n assert answers_match(candidate(accounts=[['Frank', 'frank1@example.com'], ['Frank', 'frank2@example.com'], ['Grace', 'grace1@example.com'], ['Frank', 'frank3@example.com'], ['Grace', 'grace2@example.com'], ['Frank', 'frank4@example.com'], ['Grace', 'grace1@example.com'], ['Frank', 'frank5@example.com'], ['Grace', 'grace3@example.com'], ['Frank', 'frank6@example.com'], ['Grace', 'grace4@example.com'], ['Frank', 'frank1@example.com'], ['Grace', 'grace5@example.com'], ['Frank', 'frank7@example.com'], ['Grace', 'grace6@example.com']]), [['Frank', 'frank1@example.com'], ['Frank', 'frank2@example.com'], ['Grace', 'grace1@example.com'], ['Frank', 'frank3@example.com'], ['Grace', 'grace2@example.com'], ['Frank', 'frank4@example.com'], ['Frank', 'frank5@example.com'], ['Grace', 'grace3@example.com'], ['Frank', 'frank6@example.com'], ['Grace', 'grace4@example.com'], ['Grace', 'grace5@example.com'], ['Frank', 'frank7@example.com'], ['Grace', 'grace6@example.com']])\n assert answers_match(candidate(accounts=[['Mike', 'mike@example.com'], ['Nancy', 'nancy@example.com'], ['Mike', 'mike1@example.com'], ['Nancy', 'nancy1@example.com'], ['Mike', 'mike2@example.com'], ['Nancy', 'nancy2@example.com'], ['Mike', 'mike3@example.com'], ['Nancy', 'nancy3@example.com'], ['Nancy', 'mike3@example.com']]), [['Mike', 'mike@example.com'], ['Nancy', 'nancy@example.com'], ['Mike', 'mike1@example.com'], ['Nancy', 'nancy1@example.com'], ['Mike', 'mike2@example.com'], ['Nancy', 'nancy2@example.com'], ['Mike', 'mike3@example.com'], ['Nancy', 'nancy3@example.com']])\n assert answers_match(candidate(accounts=[['Frank', 'frank@example.com'], ['George', 'george@example.com'], ['Frank', 'frank1@example.com'], ['George', 'george1@example.com'], ['Frank', 'frank2@example.com'], ['George', 'george2@example.com'], ['Frank', 'george2@example.com'], ['George', 'frank2@example.com'], ['Frank', 'frank3@example.com'], ['George', 'george3@example.com']]), [['Frank', 'frank@example.com'], ['George', 'george@example.com'], ['Frank', 'frank1@example.com'], ['George', 'george1@example.com'], ['Frank', 'frank2@example.com'], ['George', 'george2@example.com'], ['Frank', 'frank3@example.com'], ['George', 'george3@example.com']])\n assert answers_match(candidate(accounts=[['Tom', 'tom1@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom2@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry3@example.com'], ['Tom', 'jerry1@example.com']]), [['Tom', 'tom1@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom2@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry3@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex@example.com', 'alex1@example.com', 'alex2@example.com'], ['Brian', 'brian@example.com', 'brian1@example.com'], ['Alex', 'alex1@example.com', 'alex3@example.com'], ['Chris', 'chris@example.com'], ['Alex', 'alex2@example.com', 'alex4@example.com'], ['Brian', 'brian2@example.com', 'alex1@example.com']]), [['Alex', 'alex1@example.com', 'alex2@example.com', 'alex3@example.com', 'alex4@example.com', 'alex@example.com', 'brian2@example.com'], ['Brian', 'brian1@example.com', 'brian@example.com'], ['Chris', 'chris@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Charlie', 'charlie1@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com'], ['Charlie', 'charlie2@example.com']]), [['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Charlie', 'charlie1@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com'], ['Charlie', 'charlie2@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Eve', 'eve4@example.com'], ['Eve', 'eve5@example.com'], ['Eve', 'eve6@example.com'], ['Eve', 'eve7@example.com'], ['Eve', 'eve8@example.com'], ['Eve', 'eve9@example.com'], ['Eve', 'eve10@example.com']]), [['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Eve', 'eve4@example.com'], ['Eve', 'eve5@example.com'], ['Eve', 'eve6@example.com'], ['Eve', 'eve7@example.com'], ['Eve', 'eve8@example.com'], ['Eve', 'eve9@example.com'], ['Eve', 'eve10@example.com']])\n assert answers_match(candidate(accounts=[['Sarah', 'sarah1@example.com'], ['Sarah', 'sarah2@example.com'], ['Michael', 'michael1@example.com', 'michael2@example.com'], ['Sarah', 'sarah3@example.com'], ['Michael', 'michael3@example.com'], ['Sarah', 'sarah1@example.com']]), [['Sarah', 'sarah1@example.com'], ['Sarah', 'sarah2@example.com'], ['Michael', 'michael1@example.com', 'michael2@example.com'], ['Sarah', 'sarah3@example.com'], ['Michael', 'michael3@example.com']])\n assert answers_match(candidate(accounts=[['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Nina', 'nina1@example.com'], ['Nina', 'nina2@example.com'], ['Nina', 'mike2@example.com'], ['Nina', 'nina3@example.com'], ['Nina', 'mike1@example.com']]), [['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Nina', 'nina1@example.com'], ['Nina', 'nina2@example.com'], ['Nina', 'nina3@example.com']])\n assert answers_match(candidate(accounts=[['Tom', 'tom1@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom2@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom1@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry3@example.com']]), [['Tom', 'tom1@example.com'], ['Jerry', 'jerry1@example.com'], ['Tom', 'tom2@example.com'], ['Jerry', 'jerry2@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry3@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@example.com', 'alex2@example.com'], ['Bob', 'bob1@example.com'], ['Alex', 'alex3@example.com', 'alex4@example.com'], ['Charlie', 'charlie1@example.com'], ['Alex', 'alex1@example.com', 'alex5@example.com'], ['Bob', 'bob2@example.com', 'bob3@example.com']]), [['Alex', 'alex1@example.com', 'alex2@example.com', 'alex5@example.com'], ['Bob', 'bob1@example.com'], ['Alex', 'alex3@example.com', 'alex4@example.com'], ['Charlie', 'charlie1@example.com'], ['Bob', 'bob2@example.com', 'bob3@example.com']])\n assert answers_match(candidate(accounts=[['Sam', 'sam1@example.com'], ['Sam', 'sam2@example.com'], ['Max', 'max1@example.com'], ['Max', 'max2@example.com'], ['Max', 'sam1@example.com'], ['Sam', 'max3@example.com']]), [['Sam', 'sam1@example.com'], ['Sam', 'sam2@example.com'], ['Max', 'max1@example.com'], ['Max', 'max2@example.com'], ['Sam', 'max3@example.com']])\n assert answers_match(candidate(accounts=[['Leo', 'leo1@example.com'], ['Mike', 'mike1@example.com'], ['Leo', 'leo2@example.com'], ['Mike', 'mike2@example.com'], ['Leo', 'leo3@example.com'], ['Mike', 'mike3@example.com'], ['Leo', 'mike1@example.com'], ['Mike', 'leo2@example.com'], ['Leo', 'leo4@example.com'], ['Mike', 'mike4@example.com']]), [['Leo', 'leo1@example.com'], ['Mike', 'mike1@example.com'], ['Leo', 'leo2@example.com'], ['Mike', 'mike2@example.com'], ['Leo', 'leo3@example.com'], ['Mike', 'mike3@example.com'], ['Leo', 'leo4@example.com'], ['Mike', 'mike4@example.com']])\n assert answers_match(candidate(accounts=[['Frank', 'frank1@example.com'], ['George', 'george1@example.com'], ['Frank', 'frank2@example.com'], ['George', 'george2@example.com'], ['Frank', 'george1@example.com'], ['Hannah', 'hannah1@example.com'], ['Hannah', 'hannah2@example.com'], ['George', 'frank2@example.com']]), [['Frank', 'frank1@example.com'], ['George', 'george1@example.com'], ['Frank', 'frank2@example.com'], ['George', 'george2@example.com'], ['Hannah', 'hannah1@example.com'], ['Hannah', 'hannah2@example.com']])\n assert answers_match(candidate(accounts=[['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com'], ['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['David', 'david4@example.com'], ['Eve', 'eve3@example.com'], ['David', 'david5@example.com'], ['Eve', 'eve4@example.com']]), [['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com'], ['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['David', 'david4@example.com'], ['Eve', 'eve3@example.com'], ['David', 'david5@example.com'], ['Eve', 'eve4@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@leetcode.com', 'alex2@leetcode.com'], ['Ethan', 'ethan@leetcode.com'], ['Alex', 'alex1@leetcode.com', 'alex3@leetcode.com'], ['John', 'john@leetcode.com'], ['John', 'john1@leetcode.com', 'john2@leetcode.com'], ['Ethan', 'ethan1@leetcode.com', 'ethan@leetcode.com']]), [['Alex', 'alex1@leetcode.com', 'alex2@leetcode.com', 'alex3@leetcode.com'], ['Ethan', 'ethan1@leetcode.com', 'ethan@leetcode.com'], ['John', 'john@leetcode.com'], ['John', 'john1@leetcode.com', 'john2@leetcode.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@example.com', 'alex2@example.com'], ['Alex', 'alex3@example.com', 'alex4@example.com'], ['Alex', 'alex1@example.com', 'alex5@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com'], ['Bob', 'bob3@example.com', 'bob1@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie1@example.com', 'charlie2@example.com'], ['David', 'david1@example.com', 'david2@example.com'], ['David', 'david3@example.com', 'david1@example.com']]), [['Alex', 'alex1@example.com', 'alex2@example.com', 'alex5@example.com'], ['Alex', 'alex3@example.com', 'alex4@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com', 'bob3@example.com'], ['Charlie', 'charlie1@example.com', 'charlie2@example.com'], ['David', 'david1@example.com', 'david2@example.com', 'david3@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie2@example.com'], ['Bob', 'bob3@example.com'], ['Charlie', 'charlie3@example.com']]), [['Alice', 'alice1@example.com'], ['Bob', 'bob1@example.com'], ['Alice', 'alice2@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie2@example.com'], ['Bob', 'bob3@example.com'], ['Charlie', 'charlie3@example.com']])\n assert answers_match(candidate(accounts=[['Nina', 'nina1@example.com'], ['Oscar', 'oscar1@example.com'], ['Nina', 'nina2@example.com'], ['Oscar', 'oscar2@example.com'], ['Nina', 'nina3@example.com'], ['Oscar', 'oscar3@example.com'], ['Nina', 'oscar1@example.com'], ['Oscar', 'nina2@example.com'], ['Nina', 'nina4@example.com'], ['Oscar', 'oscar4@example.com'], ['Nina', 'nina5@example.com'], ['Oscar', 'oscar5@example.com']]), [['Nina', 'nina1@example.com'], ['Oscar', 'oscar1@example.com'], ['Nina', 'nina2@example.com'], ['Oscar', 'oscar2@example.com'], ['Nina', 'nina3@example.com'], ['Oscar', 'oscar3@example.com'], ['Nina', 'nina4@example.com'], ['Oscar', 'oscar4@example.com'], ['Nina', 'nina5@example.com'], ['Oscar', 'oscar5@example.com']])\n assert answers_match(candidate(accounts=[['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Mike', 'mike3@example.com'], ['Nancy', 'nancy1@example.com'], ['Nancy', 'nancy2@example.com'], ['Nancy', 'nancy3@example.com'], ['Mike', 'mike4@example.com', 'nancy1@example.com'], ['Mike', 'mike5@example.com'], ['Nancy', 'nancy4@example.com']]), [['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Mike', 'mike3@example.com'], ['Nancy', 'mike4@example.com', 'nancy1@example.com'], ['Nancy', 'nancy2@example.com'], ['Nancy', 'nancy3@example.com'], ['Mike', 'mike5@example.com'], ['Nancy', 'nancy4@example.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Tom', 'tom1@example.com'], ['Tom', 'tom2@example.com'], ['Anna', 'tom1@example.com'], ['Anna', 'tom2@example.com'], ['Tom', 'anna1@example.com'], ['Tom', 'anna2@example.com']]), [['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Tom', 'tom1@example.com'], ['Tom', 'tom2@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Frank', 'frank1@example.com'], ['Eve', 'frank1@example.com'], ['Eve', 'eve4@example.com']]), [['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Frank', 'frank1@example.com'], ['Eve', 'eve4@example.com']])\n assert answers_match(candidate(accounts=[['Amy', 'amy@uni.edu'], ['Dan', 'dan_jones@uni.edu', 'dan_thomas@uni.edu'], ['Mark', 'mark@uni.edu'], ['Amy', 'amy@uni.edu'], ['John', 'john@uni.edu', 'john_newyork@uni.edu'], ['Dan', 'dan_jones@uni.edu', 'dan@uni.edu']]), [['Amy', 'amy@uni.edu'], ['Dan', 'dan@uni.edu', 'dan_jones@uni.edu', 'dan_thomas@uni.edu'], ['Mark', 'mark@uni.edu'], ['John', 'john@uni.edu', 'john_newyork@uni.edu']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com']])\n assert answers_match(candidate(accounts=[['Lisa', 'lisa1@example.com'], ['Lisa', 'lisa2@example.com', 'lisa3@example.com'], ['Lisa', 'lisa4@example.com', 'lisa5@example.com'], ['Lisa', 'lisa6@example.com', 'lisa7@example.com', 'lisa8@example.com'], ['Lisa', 'lisa9@example.com', 'lisa10@example.com', 'lisa11@example.com', 'lisa12@example.com'], ['Lisa', 'lisa13@example.com', 'lisa14@example.com', 'lisa15@example.com', 'lisa16@example.com', 'lisa17@example.com'], ['Lisa', 'lisa18@example.com', 'lisa19@example.com', 'lisa20@example.com', 'lisa21@example.com', 'lisa22@example.com', 'lisa23@example.com']]), [['Lisa', 'lisa1@example.com'], ['Lisa', 'lisa2@example.com', 'lisa3@example.com'], ['Lisa', 'lisa4@example.com', 'lisa5@example.com'], ['Lisa', 'lisa6@example.com', 'lisa7@example.com', 'lisa8@example.com'], ['Lisa', 'lisa10@example.com', 'lisa11@example.com', 'lisa12@example.com', 'lisa9@example.com'], ['Lisa', 'lisa13@example.com', 'lisa14@example.com', 'lisa15@example.com', 'lisa16@example.com', 'lisa17@example.com'], ['Lisa', 'lisa18@example.com', 'lisa19@example.com', 'lisa20@example.com', 'lisa21@example.com', 'lisa22@example.com', 'lisa23@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com', 'chris2@example.com'], ['Chris', 'chris2@example.com', 'chris3@example.com'], ['Chris', 'chris4@example.com', 'chris5@example.com'], ['Chris', 'chris3@example.com', 'chris6@example.com']]), [['Chris', 'chris1@example.com', 'chris2@example.com', 'chris3@example.com', 'chris6@example.com'], ['Chris', 'chris4@example.com', 'chris5@example.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna1@example.com', 'anna2@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com'], ['Charlie', 'charlie1@example.com', 'bob2@example.com'], ['Anna', 'anna3@example.com'], ['David', 'david1@example.com', 'david2@example.com', 'anna2@example.com']]), [['Anna', 'anna1@example.com', 'anna2@example.com', 'david1@example.com', 'david2@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com', 'charlie1@example.com'], ['Anna', 'anna3@example.com']])\n assert answers_match(candidate(accounts=[['Tom', 'tom1@example.com', 'tom2@example.com'], ['Jerry', 'jerry1@example.com'], ['Spike', 'spike1@example.com'], ['Tyke', 'tyke1@example.com'], ['Tyke', 'tyke2@example.com', 'tyke3@example.com'], ['Tyke', 'tyke4@example.com'], ['Tyke', 'tyke5@example.com', 'tyke3@example.com'], ['Tyke', 'tyke6@example.com', 'tyke4@example.com'], ['Tom', 'tom3@example.com', 'tyke1@example.com'], ['Tom', 'tom4@example.com'], ['Jerry', 'jerry2@example.com', 'jerry3@example.com']]), [['Tom', 'tom1@example.com', 'tom2@example.com'], ['Jerry', 'jerry1@example.com'], ['Spike', 'spike1@example.com'], ['Tyke', 'tom3@example.com', 'tyke1@example.com'], ['Tyke', 'tyke2@example.com', 'tyke3@example.com', 'tyke5@example.com'], ['Tyke', 'tyke4@example.com', 'tyke6@example.com'], ['Tom', 'tom4@example.com'], ['Jerry', 'jerry2@example.com', 'jerry3@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris1@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com']])\n assert answers_match(candidate(accounts=[['Ivan', 'ivan1@example.com'], ['Jack', 'jack1@example.com'], ['Ivan', 'ivan2@example.com'], ['Jack', 'jack2@example.com'], ['Ivan', 'ivan3@example.com', 'jack1@example.com'], ['Jack', 'jack3@example.com'], ['Jack', 'ivan1@example.com'], ['Kate', 'kate1@example.com', 'kate2@example.com']]), [['Ivan', 'ivan1@example.com'], ['Jack', 'ivan3@example.com', 'jack1@example.com'], ['Ivan', 'ivan2@example.com'], ['Jack', 'jack2@example.com'], ['Jack', 'jack3@example.com'], ['Kate', 'kate1@example.com', 'kate2@example.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna1@example.com'], ['Anna', 'anna4@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna5@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna6@example.com']]), [['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna4@example.com'], ['Anna', 'anna5@example.com'], ['Anna', 'anna6@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@example.com', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Brian', 'brian1@example.com'], ['Alex', 'alex2@example.com'], ['Brian', 'brian2@example.com'], ['Alex', 'alex4@example.com'], ['Brian', 'brian1@example.com', 'brian3@example.com']]), [['Alex', 'alex1@example.com', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Brian', 'brian1@example.com', 'brian3@example.com'], ['Brian', 'brian2@example.com'], ['Alex', 'alex4@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com']])\n assert answers_match(candidate(accounts=[['Charlie', 'charlie@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie2@example.com'], ['David', 'david@example.com'], ['David', 'charlie1@example.com'], ['David', 'david1@example.com']]), [['Charlie', 'charlie@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie2@example.com'], ['David', 'david@example.com'], ['David', 'david1@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@company.com'], ['Bob', 'bob1@company.com'], ['Alice', 'alice2@company.com'], ['Alice', 'alice3@company.com'], ['Bob', 'bob2@company.com'], ['Alice', 'alice1@company.com'], ['Bob', 'bob1@company.com']]), [['Alice', 'alice1@company.com'], ['Bob', 'bob1@company.com'], ['Alice', 'alice2@company.com'], ['Alice', 'alice3@company.com'], ['Bob', 'bob2@company.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna1@example.com'], ['Anna', 'anna4@example.com'], ['Anna', 'anna2@example.com']]), [['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna4@example.com']])\n assert answers_match(candidate(accounts=[['Sam', 'sam@example.com'], ['Tom', 'tom@example.com'], ['Sam', 'sam1@example.com'], ['Tom', 'tom1@example.com'], ['Sam', 'sam2@example.com'], ['Tom', 'tom2@example.com'], ['Sam', 'sam3@example.com'], ['Tom', 'tom3@example.com'], ['Sam', 'sam4@example.com'], ['Tom', 'tom4@example.com'], ['Sam', 'tom4@example.com'], ['Tom', 'sam4@example.com']]), [['Sam', 'sam@example.com'], ['Tom', 'tom@example.com'], ['Sam', 'sam1@example.com'], ['Tom', 'tom1@example.com'], ['Sam', 'sam2@example.com'], ['Tom', 'tom2@example.com'], ['Sam', 'sam3@example.com'], ['Tom', 'tom3@example.com'], ['Sam', 'sam4@example.com'], ['Tom', 'tom4@example.com']])\n assert answers_match(candidate(accounts=[['John', 'john1@example.com'], ['John', 'john2@example.com'], ['John', 'john3@example.com'], ['John', 'john4@example.com'], ['John', 'john5@example.com'], ['John', 'john6@example.com'], ['John', 'john7@example.com'], ['John', 'john8@example.com'], ['John', 'john9@example.com'], ['John', 'john10@example.com'], ['John', 'john11@example.com'], ['John', 'john12@example.com'], ['John', 'john13@example.com'], ['John', 'john14@example.com'], ['John', 'john15@example.com'], ['John', 'john16@example.com'], ['John', 'john17@example.com'], ['John', 'john18@example.com'], ['John', 'john19@example.com'], ['John', 'john20@example.com'], ['John', 'john21@example.com'], ['John', 'john22@example.com'], ['John', 'john23@example.com'], ['John', 'john24@example.com'], ['John', 'john25@example.com']]), [['John', 'john1@example.com'], ['John', 'john2@example.com'], ['John', 'john3@example.com'], ['John', 'john4@example.com'], ['John', 'john5@example.com'], ['John', 'john6@example.com'], ['John', 'john7@example.com'], ['John', 'john8@example.com'], ['John', 'john9@example.com'], ['John', 'john10@example.com'], ['John', 'john11@example.com'], ['John', 'john12@example.com'], ['John', 'john13@example.com'], ['John', 'john14@example.com'], ['John', 'john15@example.com'], ['John', 'john16@example.com'], ['John', 'john17@example.com'], ['John', 'john18@example.com'], ['John', 'john19@example.com'], ['John', 'john20@example.com'], ['John', 'john21@example.com'], ['John', 'john22@example.com'], ['John', 'john23@example.com'], ['John', 'john24@example.com'], ['John', 'john25@example.com']])\n assert answers_match(candidate(accounts=[['Greg', 'greg1@example.com'], ['Greg', 'greg2@example.com'], ['Greg', 'greg3@example.com'], ['Greg', 'greg4@example.com'], ['Greg', 'greg5@example.com'], ['Greg', 'greg6@example.com'], ['Greg', 'greg7@example.com'], ['Greg', 'greg8@example.com'], ['Greg', 'greg9@example.com'], ['Greg', 'greg10@example.com']]), [['Greg', 'greg1@example.com'], ['Greg', 'greg2@example.com'], ['Greg', 'greg3@example.com'], ['Greg', 'greg4@example.com'], ['Greg', 'greg5@example.com'], ['Greg', 'greg6@example.com'], ['Greg', 'greg7@example.com'], ['Greg', 'greg8@example.com'], ['Greg', 'greg9@example.com'], ['Greg', 'greg10@example.com']])\n assert answers_match(candidate(accounts=[['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Mike', 'mike3@example.com'], ['Anna', 'anna3@example.com'], ['Mike', 'mike1@example.com'], ['Anna', 'anna4@example.com']]), [['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Anna', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Mike', 'mike3@example.com'], ['Anna', 'anna3@example.com'], ['Anna', 'anna4@example.com']])\n assert answers_match(candidate(accounts=[['Sam', 'sam1@example.com'], ['Sam', 'sam2@example.com', 'sam3@example.com'], ['Sam', 'sam4@example.com'], ['Sam', 'sam5@example.com', 'sam6@example.com'], ['Sam', 'sam7@example.com'], ['Sam', 'sam1@example.com', 'sam8@example.com'], ['Sam', 'sam9@example.com', 'sam5@example.com']]), [['Sam', 'sam1@example.com', 'sam8@example.com'], ['Sam', 'sam2@example.com', 'sam3@example.com'], ['Sam', 'sam4@example.com'], ['Sam', 'sam5@example.com', 'sam6@example.com', 'sam9@example.com'], ['Sam', 'sam7@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com', 'alice2@example.com'], ['Bob', 'bob1@example.com', 'alice2@example.com'], ['Charlie', 'charlie1@example.com'], ['Alice', 'alice3@example.com'], ['Bob', 'bob2@example.com', 'bob3@example.com'], ['Bob', 'bob3@example.com', 'charlie1@example.com']]), [['Alice', 'alice1@example.com', 'alice2@example.com', 'bob1@example.com'], ['Bob', 'bob2@example.com', 'bob3@example.com', 'charlie1@example.com'], ['Alice', 'alice3@example.com']])\n assert answers_match(candidate(accounts=[['Liam', 'liam1@example.com'], ['Noah', 'noah1@example.com'], ['Olivia', 'olivia1@example.com'], ['Emma', 'emma1@example.com'], ['Ava', 'ava1@example.com'], ['Sophia', 'sophia1@example.com'], ['Isabella', 'isabella1@example.com'], ['Mia', 'mia1@example.com'], ['Liam', 'liam2@example.com'], ['Noah', 'noah2@example.com'], ['Olivia', 'olivia2@example.com'], ['Emma', 'emma2@example.com'], ['Ava', 'ava2@example.com'], ['Sophia', 'sophia2@example.com'], ['Isabella', 'isabella2@example.com'], ['Mia', 'mia2@example.com'], ['Liam', 'liam3@example.com'], ['Noah', 'noah3@example.com'], ['Olivia', 'olivia3@example.com'], ['Emma', 'emma3@example.com'], ['Ava', 'ava3@example.com'], ['Sophia', 'sophia3@example.com'], ['Isabella', 'isabella3@example.com'], ['Mia', 'mia3@example.com']]), [['Liam', 'liam1@example.com'], ['Noah', 'noah1@example.com'], ['Olivia', 'olivia1@example.com'], ['Emma', 'emma1@example.com'], ['Ava', 'ava1@example.com'], ['Sophia', 'sophia1@example.com'], ['Isabella', 'isabella1@example.com'], ['Mia', 'mia1@example.com'], ['Liam', 'liam2@example.com'], ['Noah', 'noah2@example.com'], ['Olivia', 'olivia2@example.com'], ['Emma', 'emma2@example.com'], ['Ava', 'ava2@example.com'], ['Sophia', 'sophia2@example.com'], ['Isabella', 'isabella2@example.com'], ['Mia', 'mia2@example.com'], ['Liam', 'liam3@example.com'], ['Noah', 'noah3@example.com'], ['Olivia', 'olivia3@example.com'], ['Emma', 'emma3@example.com'], ['Ava', 'ava3@example.com'], ['Sophia', 'sophia3@example.com'], ['Isabella', 'isabella3@example.com'], ['Mia', 'mia3@example.com']])\n assert answers_match(candidate(accounts=[['Sam', 'sam1@example.com'], ['Tom', 'tom1@example.com', 'tom2@example.com'], ['Sam', 'sam2@example.com'], ['Tom', 'tom3@example.com'], ['Sam', 'sam3@example.com'], ['Sam', 'sam4@example.com'], ['Tom', 'tom2@example.com'], ['Sam', 'sam2@example.com']]), [['Sam', 'sam1@example.com'], ['Tom', 'tom1@example.com', 'tom2@example.com'], ['Sam', 'sam2@example.com'], ['Tom', 'tom3@example.com'], ['Sam', 'sam3@example.com'], ['Sam', 'sam4@example.com']])\n assert answers_match(candidate(accounts=[['Emily', 'emily1@example.com'], ['Emily', 'emily2@example.com'], ['Laura', 'laura1@example.com'], ['Laura', 'laura2@example.com'], ['Emily', 'emily3@example.com'], ['Laura', 'laura3@example.com'], ['Emily', 'emily1@example.com'], ['Laura', 'laura1@example.com']]), [['Emily', 'emily1@example.com'], ['Emily', 'emily2@example.com'], ['Laura', 'laura1@example.com'], ['Laura', 'laura2@example.com'], ['Emily', 'emily3@example.com'], ['Laura', 'laura3@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com', 'alice2@example.com'], ['Alice', 'alice3@example.com', 'alice4@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com'], ['Bob', 'bob3@example.com', 'bob1@example.com'], ['Charlie', 'charlie1@example.com'], ['Charlie', 'charlie1@example.com', 'charlie2@example.com']]), [['Alice', 'alice1@example.com', 'alice2@example.com'], ['Alice', 'alice3@example.com', 'alice4@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com', 'bob3@example.com'], ['Charlie', 'charlie1@example.com', 'charlie2@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris10@example.com']])\n assert answers_match(candidate(accounts=[['Ivan', 'ivan1@example.com'], ['Ivan', 'ivan2@example.com'], ['Jack', 'jack1@example.com'], ['Ivan', 'jack1@example.com'], ['Jack', 'jack2@example.com'], ['Jack', 'ivan2@example.com']]), [['Ivan', 'ivan1@example.com'], ['Ivan', 'ivan2@example.com'], ['Jack', 'jack1@example.com'], ['Jack', 'jack2@example.com']])\n assert answers_match(candidate(accounts=[['Emma', 'emma1@example.com'], ['Emma', 'emma2@example.com'], ['Olivia', 'olivia1@example.com'], ['Olivia', 'olivia2@example.com'], ['Emma', 'olivia1@example.com'], ['Olivia', 'emma1@example.com'], ['Olivia', 'emma2@example.com'], ['Emma', 'olivia2@example.com'], ['Ava', 'ava1@example.com'], ['Ava', 'ava2@example.com'], ['Ava', 'ava3@example.com']]), [['Emma', 'emma1@example.com'], ['Emma', 'emma2@example.com'], ['Olivia', 'olivia1@example.com'], ['Olivia', 'olivia2@example.com'], ['Ava', 'ava1@example.com'], ['Ava', 'ava2@example.com'], ['Ava', 'ava3@example.com']])\n assert answers_match(candidate(accounts=[['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Mike', 'mike3@example.com'], ['Mike', 'mike4@example.com'], ['Mike', 'mike5@example.com'], ['Mike', 'mike6@example.com'], ['Mike', 'mike7@example.com'], ['Mike', 'mike8@example.com'], ['Mike', 'mike9@example.com']]), [['Mike', 'mike1@example.com'], ['Mike', 'mike2@example.com'], ['Mike', 'mike3@example.com'], ['Mike', 'mike4@example.com'], ['Mike', 'mike5@example.com'], ['Mike', 'mike6@example.com'], ['Mike', 'mike7@example.com'], ['Mike', 'mike8@example.com'], ['Mike', 'mike9@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve1@example.com', 'eve2@example.com'], ['Eve', 'eve3@example.com'], ['Eve', 'eve1@example.com', 'eve4@example.com'], ['Eve', 'eve2@example.com', 'eve5@example.com'], ['Eve', 'eve3@example.com', 'eve6@example.com']]), [['Eve', 'eve1@example.com', 'eve2@example.com', 'eve4@example.com', 'eve5@example.com'], ['Eve', 'eve3@example.com', 'eve6@example.com']])\n assert answers_match(candidate(accounts=[['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com'], ['Eve', 'eve4@example.com'], ['Eve', 'eve5@example.com', 'eve3@example.com'], ['Eve', 'eve6@example.com', 'eve4@example.com'], ['Eve', 'eve7@example.com']]), [['Eve', 'eve1@example.com'], ['Eve', 'eve2@example.com', 'eve3@example.com', 'eve5@example.com'], ['Eve', 'eve4@example.com', 'eve6@example.com'], ['Eve', 'eve7@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@example.com'], ['Alex', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Alex', 'alex4@example.com'], ['Alex', 'alex5@example.com'], ['Alex', 'alex6@example.com'], ['Alex', 'alex7@example.com']]), [['Alex', 'alex1@example.com'], ['Alex', 'alex2@example.com'], ['Alex', 'alex3@example.com'], ['Alex', 'alex4@example.com'], ['Alex', 'alex5@example.com'], ['Alex', 'alex6@example.com'], ['Alex', 'alex7@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris1@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com']])\n assert answers_match(candidate(accounts=[['Alice', 'alice1@example.com', 'alice2@example.com'], ['Bob', 'bob1@example.com', 'bob2@example.com'], ['Alice', 'alice3@example.com', 'bob1@example.com'], ['Charlie', 'charlie1@example.com'], ['Bob', 'bob3@example.com', 'alice1@example.com']]), [['Alice', 'alice1@example.com', 'alice2@example.com', 'bob3@example.com'], ['Bob', 'alice3@example.com', 'bob1@example.com', 'bob2@example.com'], ['Charlie', 'charlie1@example.com']])\n assert answers_match(candidate(accounts=[['Oscar', 'oscar1@example.com'], ['Oscar', 'oscar2@example.com'], ['Paul', 'paul1@example.com'], ['Paul', 'paul2@example.com'], ['Paul', 'oscar2@example.com'], ['Paul', 'paul3@example.com'], ['Paul', 'oscar1@example.com'], ['Paul', 'oscar3@example.com']]), [['Oscar', 'oscar1@example.com'], ['Oscar', 'oscar2@example.com'], ['Paul', 'paul1@example.com'], ['Paul', 'paul2@example.com'], ['Paul', 'paul3@example.com'], ['Paul', 'oscar3@example.com']])\n assert answers_match(candidate(accounts=[['Alex', 'alex1@example.com', 'alex2@example.com'], ['Steve', 'steve1@example.com'], ['Alex', 'alex3@example.com'], ['Steve', 'steve2@example.com', 'steve3@example.com'], ['Alex', 'alex1@example.com']]), [['Alex', 'alex1@example.com', 'alex2@example.com'], ['Steve', 'steve1@example.com'], ['Alex', 'alex3@example.com'], ['Steve', 'steve2@example.com', 'steve3@example.com']])\n assert answers_match(candidate(accounts=[['James', 'james1@example.com'], ['James', 'james2@example.com'], ['James', 'james3@example.com'], ['James', 'james4@example.com'], ['James', 'james5@example.com'], ['James', 'james6@example.com'], ['James', 'james7@example.com'], ['James', 'james8@example.com'], ['James', 'james9@example.com'], ['James', 'james10@example.com'], ['James', 'james11@example.com'], ['James', 'james12@example.com'], ['James', 'james13@example.com'], ['James', 'james14@example.com'], ['James', 'james15@example.com'], ['James', 'james16@example.com'], ['James', 'james17@example.com'], ['James', 'james18@example.com'], ['James', 'james19@example.com'], ['James', 'james20@example.com'], ['James', 'james21@example.com'], ['James', 'james22@example.com'], ['James', 'james23@example.com'], ['James', 'james24@example.com'], ['James', 'james25@example.com'], ['James', 'james26@example.com'], ['James', 'james27@example.com'], ['James', 'james28@example.com'], ['James', 'james29@example.com'], ['James', 'james30@example.com']]), [['James', 'james1@example.com'], ['James', 'james2@example.com'], ['James', 'james3@example.com'], ['James', 'james4@example.com'], ['James', 'james5@example.com'], ['James', 'james6@example.com'], ['James', 'james7@example.com'], ['James', 'james8@example.com'], ['James', 'james9@example.com'], ['James', 'james10@example.com'], ['James', 'james11@example.com'], ['James', 'james12@example.com'], ['James', 'james13@example.com'], ['James', 'james14@example.com'], ['James', 'james15@example.com'], ['James', 'james16@example.com'], ['James', 'james17@example.com'], ['James', 'james18@example.com'], ['James', 'james19@example.com'], ['James', 'james20@example.com'], ['James', 'james21@example.com'], ['James', 'james22@example.com'], ['James', 'james23@example.com'], ['James', 'james24@example.com'], ['James', 'james25@example.com'], ['James', 'james26@example.com'], ['James', 'james27@example.com'], ['James', 'james28@example.com'], ['James', 'james29@example.com'], ['James', 'james30@example.com']])\n assert answers_match(candidate(accounts=[['Sam', 'sam1@example.com', 'sam2@example.com'], ['Sam', 'sam3@example.com'], ['Max', 'max1@example.com'], ['Sam', 'sam2@example.com', 'sam4@example.com'], ['Max', 'max2@example.com', 'max3@example.com'], ['Sam', 'sam5@example.com'], ['Max', 'sam3@example.com']]), [['Sam', 'sam1@example.com', 'sam2@example.com', 'sam4@example.com'], ['Sam', 'sam3@example.com'], ['Max', 'max1@example.com'], ['Max', 'max2@example.com', 'max3@example.com'], ['Sam', 'sam5@example.com']])\n assert answers_match(candidate(accounts=[['Liam', 'liam1@example.com'], ['Liam', 'liam2@example.com'], ['Noah', 'noah1@example.com'], ['Noah', 'noah2@example.com'], ['Noah', 'liam1@example.com'], ['Noah', 'liam2@example.com'], ['Mia', 'mia1@example.com'], ['Mia', 'mia2@example.com'], ['Liam', 'mia1@example.com']]), [['Liam', 'liam1@example.com'], ['Liam', 'liam2@example.com'], ['Noah', 'noah1@example.com'], ['Noah', 'noah2@example.com'], ['Mia', 'mia1@example.com'], ['Mia', 'mia2@example.com']])\n assert answers_match(candidate(accounts=[['Ava', 'ava1@example.com'], ['Ava', 'ava2@example.com'], ['Isabella', 'isabella1@example.com'], ['Isabella', 'isabella2@example.com'], ['Ava', 'isabella1@example.com'], ['Isabella', 'ava1@example.com'], ['Ava', 'ava3@example.com'], ['Isabella', 'isabella3@example.com'], ['Ava', 'ava4@example.com'], ['Isabella', 'isabella4@example.com'], ['Ava', 'ava5@example.com'], ['Isabella', 'isabella5@example.com']]), [['Ava', 'ava1@example.com'], ['Ava', 'ava2@example.com'], ['Isabella', 'isabella1@example.com'], ['Isabella', 'isabella2@example.com'], ['Ava', 'ava3@example.com'], ['Isabella', 'isabella3@example.com'], ['Ava', 'ava4@example.com'], ['Isabella', 'isabella4@example.com'], ['Ava', 'ava5@example.com'], ['Isabella', 'isabella5@example.com']])\n assert answers_match(candidate(accounts=[['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris1@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com'], ['Chris', 'chris21@example.com'], ['Chris', 'chris22@example.com'], ['Chris', 'chris23@example.com'], ['Chris', 'chris24@example.com'], ['Chris', 'chris25@example.com'], ['Chris', 'chris26@example.com'], ['Chris', 'chris27@example.com'], ['Chris', 'chris28@example.com'], ['Chris', 'chris29@example.com'], ['Chris', 'chris30@example.com']]), [['Chris', 'chris1@example.com'], ['Chris', 'chris2@example.com'], ['Chris', 'chris3@example.com'], ['Chris', 'chris4@example.com'], ['Chris', 'chris5@example.com'], ['Chris', 'chris6@example.com'], ['Chris', 'chris7@example.com'], ['Chris', 'chris8@example.com'], ['Chris', 'chris9@example.com'], ['Chris', 'chris11@example.com'], ['Chris', 'chris12@example.com'], ['Chris', 'chris13@example.com'], ['Chris', 'chris14@example.com'], ['Chris', 'chris15@example.com'], ['Chris', 'chris16@example.com'], ['Chris', 'chris17@example.com'], ['Chris', 'chris18@example.com'], ['Chris', 'chris19@example.com'], ['Chris', 'chris20@example.com'], ['Chris', 'chris21@example.com'], ['Chris', 'chris22@example.com'], ['Chris', 'chris23@example.com'], ['Chris', 'chris24@example.com'], ['Chris', 'chris25@example.com'], ['Chris', 'chris26@example.com'], ['Chris', 'chris27@example.com'], ['Chris', 'chris28@example.com'], ['Chris', 'chris29@example.com'], ['Chris', 'chris30@example.com']])\n assert answers_match(candidate(accounts=[['Tom', 'tom1@example.com', 'tom2@example.com'], ['Jerry', 'jerry1@example.com'], ['Spike', 'spike1@example.com', 'spike2@example.com'], ['Tyke', 'tyke1@example.com'], ['Tom', 'tom3@example.com'], ['Jerry', 'jerry2@example.com', 'jerry1@example.com']]), [['Tom', 'tom1@example.com', 'tom2@example.com'], ['Jerry', 'jerry1@example.com', 'jerry2@example.com'], ['Spike', 'spike1@example.com', 'spike2@example.com'], ['Tyke', 'tyke1@example.com'], ['Tom', 'tom3@example.com']])\n assert answers_match(candidate(accounts=[['George', 'george1@example.com'], ['George', 'george2@example.com'], ['George', 'george3@example.com'], ['Hannah', 'hannah1@example.com'], ['George', 'hannah1@example.com'], ['George', 'george4@example.com'], ['George', 'george5@example.com']]), [['George', 'george1@example.com'], ['George', 'george2@example.com'], ['George', 'george3@example.com'], ['Hannah', 'hannah1@example.com'], ['George', 'george4@example.com'], ['George', 'george5@example.com']])\n assert answers_match(candidate(accounts=[['Quinn', 'quinn1@example.com'], ['Quinn', 'quinn2@example.com'], ['Quinn', 'quinn3@example.com'], ['Rachel', 'rachel1@example.com'], ['Rachel', 'rachel2@example.com'], ['Rachel', 'quinn2@example.com'], ['Rachel', 'quinn3@example.com'], ['Rachel', 'rachel3@example.com'], ['Rachel', 'quinn1@example.com']]), [['Quinn', 'quinn1@example.com'], ['Quinn', 'quinn2@example.com'], ['Quinn', 'quinn3@example.com'], ['Rachel', 'rachel1@example.com'], ['Rachel', 'rachel2@example.com'], ['Rachel', 'rachel3@example.com']])\n assert answers_match(candidate(accounts=[['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com'], ['David', 'david4@example.com'], ['David', 'david5@example.com']]), [['David', 'david@example.com'], ['David', 'david1@example.com'], ['David', 'david2@example.com'], ['David', 'david3@example.com'], ['David', 'david4@example.com'], ['David', 'david5@example.com']])\n assert answers_match(candidate(accounts=[['Karl', 'karl1@example.com'], ['Karl', 'karl2@example.com'], ['Karl', 'karl3@example.com'], ['Laura', 'laura1@example.com'], ['Laura', 'laura2@example.com'], ['Laura', 'karl2@example.com'], ['Laura', 'laura3@example.com']]), [['Karl', 'karl1@example.com'], ['Karl', 'karl2@example.com'], ['Karl', 'karl3@example.com'], ['Laura', 'laura1@example.com'], ['Laura', 'laura2@example.com'], ['Laura', 'laura3@example.com']])\n assert answers_match(candidate(accounts=[['Anna', 'anna@example.com', 'anna1@example.com'], ['Anna', 'anna2@example.com'], ['Anna', 'anna3@example.com', 'anna1@example.com'], ['Tom', 'tom@example.com'], ['Anna', 'anna4@example.com'], ['Tom', 'tom1@example.com', 'tom2@example.com']]), [['Anna', 'anna1@example.com', 'anna3@example.com', 'anna@example.com'], ['Anna', 'anna2@example.com'], ['Tom', 'tom@example.com'], ['Anna', 'anna4@example.com'], ['Tom', 'tom1@example.com', 'tom2@example.com']])\n assert answers_match(candidate(accounts=[['Lily', 'lily1@example.com'], ['Lily', 'lily2@example.com'], ['Lily', 'lily3@example.com'], ['Lily', 'lily1@example.com'], ['Lily', 'lily4@example.com'], ['Lily', 'lily2@example.com'], ['Lily', 'lily5@example.com'], ['Lily', 'lily3@example.com'], ['Lily', 'lily6@example.com'], ['Lily', 'lily7@example.com']]), [['Lily', 'lily1@example.com'], ['Lily', 'lily2@example.com'], ['Lily', 'lily3@example.com'], ['Lily', 'lily4@example.com'], ['Lily', 'lily5@example.com'], ['Lily', 'lily6@example.com'], ['Lily', 'lily7@example.com']])\n assert answers_match(candidate(accounts=[['Isabella', 'isabella1@example.com'], ['Isabella', 'isabella2@example.com'], ['Isabella', 'isabella3@example.com'], ['Sophia', 'isabella1@example.com'], ['Sophia', 'sophia2@example.com'], ['Sophia', 'sophia3@example.com'], ['Sophia', 'sophia4@example.com'], ['Sophia', 'sophia5@example.com'], ['Sophia', 'sophia6@example.com'], ['Sophia', 'sophia7@example.com']]), [['Isabella', 'isabella1@example.com'], ['Isabella', 'isabella2@example.com'], ['Isabella', 'isabella3@example.com'], ['Sophia', 'sophia2@example.com'], ['Sophia', 'sophia3@example.com'], ['Sophia', 'sophia4@example.com'], ['Sophia', 'sophia5@example.com'], ['Sophia', 'sophia6@example.com'], ['Sophia', 'sophia7@example.com']])\n assert answers_match(candidate(accounts=[['Sophia', 'sophia1@example.com'], ['Sophia', 'sophia2@example.com'], ['Sophia', 'sophia3@example.com'], ['Sophia', 'sophia4@example.com'], ['Sophia', 'sophia5@example.com'], ['Sophia', 'sophia6@example.com'], ['Sophia', 'sophia7@example.com'], ['Sophia', 'sophia8@example.com'], ['Sophia', 'sophia9@example.com'], ['Sophia', 'sophia10@example.com']]), [['Sophia', 'sophia1@example.com'], ['Sophia', 'sophia2@example.com'], ['Sophia', 'sophia3@example.com'], ['Sophia', 'sophia4@example.com'], ['Sophia', 'sophia5@example.com'], ['Sophia', 'sophia6@example.com'], ['Sophia', 'sophia7@example.com'], ['Sophia', 'sophia8@example.com'], ['Sophia', 'sophia9@example.com'], ['Sophia', 'sophia10@example.com']])\n", "comparison": "unordered"}, "public_tests": ["[[\"John\",\"johnsmith@mail.com\",\"john_newyork@mail.com\"],[\"John\",\"johnsmith@mail.com\",\"john00@mail.com\"],[\"Mary\",\"mary@mail.com\"],[\"John\",\"johnnybravo@mail.com\"]]", "[[\"Gabe\",\"Gabe0@m.co\",\"Gabe3@m.co\",\"Gabe1@m.co\"],[\"Kevin\",\"Kevin3@m.co\",\"Kevin5@m.co\",\"Kevin0@m.co\"],[\"Ethan\",\"Ethan5@m.co\",\"Ethan4@m.co\",\"Ethan0@m.co\"],[\"Hanzo\",\"Hanzo3@m.co\",\"Hanzo1@m.co\",\"Hanzo0@m.co\"],[\"Fern\",\"Fern5@m.co\",\"Fern1@m.co\",\"Fern0@m.co\"]]"], "hints": ["For every pair of emails in the same account, draw an edge between those emails. The problem is about enumerating the connected components of this graph."], "metadata": {"canonical_parameter_names": ["accounts"], "leetcode_dataset_entry_point": "Solution().accountsMerge", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:26+00:00", "tests_total": 85, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "string", "depth-first-search", "breadth-first-search", "union-find", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "vector> accountsMerge(vector>& accounts) {", "container": "Solution", "callable": "accountsMerge", "parameters": [{"name": "accounts", "type": "vector>&"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 722, "task_id": "remove-comments", "difficulty": "Medium", "problem_description": "Given a C++ program, remove comments from it. The program source is an array of strings source where source[i] is the i^th line of the source code. This represents the result of splitting the original source code string by the newline character '\\n'.\n\nIn C++, there are two types of comments, line comments, and block comments.\n\n- The string \"//\" denotes a line comment, which represents that it and the rest of the characters to the right of it in the same line should be ignored.\n- The string \"/*\" denotes a block comment, which represents that all characters until the next (non-overlapping) occurrence of \"*/\" should be ignored. (Here, occurrences happen in reading order: line by line from left to right.) To be clear, the string \"/*/\" does not yet end the block comment, as the ending would be overlapping the beginning.\n\nThe first effective comment takes precedence over others.\n\n- For example, if the string \"//\" occurs in a block comment, it is ignored.\n- Similarly, if the string \"/*\" occurs in a line or block comment, it is also ignored.\n\nIf a certain line of code is empty after removing comments, you must not output that line: each string in the answer list will be non-empty.\n\nThere will be no control characters, single quote, or double quote characters.\n\n- For example, source = \"string s = \"/* Not a comment. */\";\" will not be a test case.\n\nAlso, nothing else such as defines or macros will interfere with the comments.\n\nIt is guaranteed that every open block comment will eventually be closed, so \"/*\" outside of a line or block comment always starts a new comment.\n\nFinally, implicit newline characters can be deleted by block comments. Please see the examples below for details.\n\nAfter removing the comments from the source code, return the source code in the same format.\n\nExample 1:\n\nInput: source = [\"/*Test program */\", \"int main()\", \"{ \", \" // variable declaration \", \"int a, b, c;\", \"/* This is a test\", \" multiline \", \" comment for \", \" testing */\", \"a = b + c;\", \"}\"]\nOutput: [\"int main()\",\"{ \",\" \",\"int a, b, c;\",\"a = b + c;\",\"}\"]\nExplanation: The line by line code is visualized as below:\n/*Test program */\nint main()\n{\n // variable declaration\nint a, b, c;\n/* This is a test\n multiline\n comment for\n testing */\na = b + c;\n}\nThe string /* denotes a block comment, including line 1 and lines 6-9. The string // denotes line 4 as comments.\nThe line by line output code is visualized as below:\nint main()\n{\n\nint a, b, c;\na = b + c;\n}\n\nExample 2:\n\nInput: source = [\"a/*comment\", \"line\", \"more_comment*/b\"]\nOutput: [\"ab\"]\nExplanation: The original source string is \"a/*comment\\nline\\nmore_comment*/b\", where we have bolded the newline characters. After deletion, the implicit newline characters are deleted, leaving the string \"ab\", which when delimited by newline characters becomes [\"ab\"].\n\nConstraints:\n\n- 1 <= source.length <= 100\n- 0 <= source[i].length <= 80\n- source[i] consists of printable ASCII characters.\n- Every open block comment is eventually closed.\n- There are no single-quote or double-quote in the input.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(source = ['/* This is a comment // with a line comment inside the block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']) == ['int x = 10;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['int main() {', ' printf(\"Hello World\"); // This is a comment', '}']) == ['int main() {', ' printf(\"Hello World\"); ', '}']\n assert candidate(source = ['int main() {', '/* Start of block comment \" /* still in block comment */ end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']) == ['int main() {', ' end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['int x = 10;', '// This is a line comment', 'int y = 20;']) == ['int x = 10;', 'int y = 20;']\n assert candidate(source = ['/* This is a block comment', 'and this is the second line', 'and the third line */', 'int z = 30;']) == ['int z = 30;']\n assert candidate(source = ['/*', 'block comment', '*/']) == []\n assert candidate(source = ['// This is a single line comment', 'int x = 10; // this is also a comment', '/* This is a block comment', ' that continues', ' on multiple lines */', 'int y = 20;']) == ['int x = 10; ', 'int y = 20;']\n assert candidate(source = ['void func() {', '/* This is a ', 'multiline comment */', 'int x = 10;', '// This is a single line comment', '}']) == ['void func() {', 'int x = 10;', '}']\n assert candidate(source = ['void fun() {', ' /* Multi', 'line', 'comment */', ' int k = 1;', '}']) == ['void fun() {', ' ', ' int k = 1;', '}']\n assert candidate(source = ['/* comment /* nested comment */ end of comment */', 'int x = 1;']) == [' end of comment */', 'int x = 1;']\n assert candidate(source = ['#include ', '/* Start of block comment', 'still in block comment', 'end of block comment */', 'int main() {', 'cout << \"Hello World\";', '// This line should be printed', '}']) == ['#include ', 'int main() {', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['/*Test program */', 'int main()', '{ ', ' // variable declaration ', 'int a, b, c;', '/* This is a test', ' multiline ', ' comment for ', ' testing */', 'a = b + c;', '}']) == ['int main()', '{ ', ' ', 'int a, b, c;', 'a = b + c;', '}']\n assert candidate(source = ['int main() {', 'int x = 10; // This is a line comment', 'cout << \"Hello World\";', '}']) == ['int main() {', 'int x = 10; ', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['int x = 10;', '// This is a line comment', 'x++;', '/* This is a block comment', 'x--;', '*/', 'return x;']) == ['int x = 10;', 'x++;', 'return x;']\n assert candidate(source = ['a/*comment', 'line', 'more_comment*/b']) == ['ab']\n assert candidate(source = ['/*Hello', 'World*/', 'int main()']) == ['int main()']\n assert candidate(source = ['int main()', '{', '/* This is a test comment', 'with multiple', 'lines */', 'return 0;', '}']) == ['int main()', '{', 'return 0;', '}']\n assert candidate(source = ['void f() {', '/* single line block comment */', '}']) == ['void f() {', '}']\n assert candidate(source = ['class Solution {', 'public:', ' vector twoSum(vector& nums, int target) {', ' /*', ' for (int i = 0; i < nums.size(); i++) {', ' for (int j = i + 1; j < nums.size(); j++) {', ' if (nums[i] + nums[j] == target) {', ' return {i, j};', ' }', ' }', ' }', ' */', ' return {};', ' }', '};']) == ['class Solution {', 'public:', ' vector twoSum(vector& nums, int target) {', ' ', ' return {};', ' }', '};']\n assert candidate(source = ['int x = 1; // single line comment', '/* int y = 2; */', 'int z = 3;']) == ['int x = 1; ', 'int z = 3;']\n assert candidate(source = ['// comment', '// another comment', 'int x = 1;']) == ['int x = 1;']\n assert candidate(source = ['/* Comment \" continues on next line', 'and ends here */', 'int a = 1;', '// Single line comment', 'int b = 2;', 'int c = 3;']) == ['int a = 1;', 'int b = 2;', 'int c = 3;']\n assert candidate(source = ['/* This is a block comment that includes', 'a line with // single line comment inside it', '*/', 'int a = 10;', 'int b = 20;', '/* Another block comment that includes', 'a line with // single line comment inside it', '*/', 'int c = 30;']) == ['int a = 10;', 'int b = 20;', 'int c = 30;']\n assert candidate(source = ['int main() {', ' // Start of line comment \" /* this is not a comment \" end of line comment', ' int x = 1;', ' /* Start of block comment \" // still in block comment \" */', ' int y = 2;', ' printf(\"Result: %d\", x + y);', '}']) == ['int main() {', ' ', ' int x = 1;', ' ', ' int y = 2;', ' printf(\"Result: %d\", x + y);', '}']\n assert candidate(source = ['int main() {', '/* Block comment starts here', 'int x = 10;', '/* Nested comment \" /* still in nested comment */ \" end of nested comment */', 'int y = 20;', '*/ int z = 30;', '// End of file comment', '}']) == ['int main() {', ' \" end of nested comment */', 'int y = 20;', '*/ int z = 30;', '}']\n assert candidate(source = ['/* Start of block comment \\n /* nested block comment */ still in block comment */', 'int x = 10;']) == [' still in block comment */', 'int x = 10;']\n assert candidate(source = ['/* Start of block comment ', '/* Nested block comment ', '*/', 'End of nested block comment */', 'int x = 40;', '// Line comment /* not a block comment */']) == ['End of nested block comment */', 'int x = 40;']\n assert candidate(source = ['void func() {', 'int x = 1;', '/* Comment with newline character \\n */', 'int y = 2;', '}']) == ['void func() {', 'int x = 1;', 'int y = 2;', '}']\n assert candidate(source = ['/* comment with \"escaped quotes\" inside block comment */', 'int x = 1;', '// Single line comment after block comment', '/* Another block comment \"with quotes\" inside */', 'int y = 2;', '}']) == ['int x = 1;', 'int y = 2;', '}']\n assert candidate(source = ['/* This is a comment /* nested block comment */ end of comment */', 'int x = 1;', '// Single-line comment after block comment', '/* Another block comment */ int y = 2;']) == [' end of comment */', 'int x = 1;', ' int y = 2;']\n assert candidate(source = ['/* Comment spanning multiple lines', 'including quotes \" and other symbols /* nested */', 'still in block comment \" end block comment */', 'int x = 1;', 'cout << \"Hello World\";']) == ['still in block comment \" end block comment */', 'int x = 1;', 'cout << \"Hello World\";']\n assert candidate(source = ['int main() {', '/* Comment with \"quoted\" text inside */', 'int x = 20;', '/* Another /* nested */ comment */', 'return x;', '}']) == ['int main() {', 'int x = 20;', ' comment */', 'return x;', '}']\n assert candidate(source = ['class MyClass {', ' // This is a single line comment', ' int a;', ' /* This is a block comment ', ' int b;', ' // Another single line comment', ' */', ' int c;', '}']) == ['class MyClass {', ' ', ' int a;', ' ', ' int c;', '}']\n assert candidate(source = ['/* This is a block comment that spans', 'multiple lines and includes', 'a single line comment // inside it */', 'int z = 30;', '// This is a single line comment', '}']) == ['int z = 30;', '}']\n assert candidate(source = ['/* Comment before code', 'int x = 1;', '/* Comment after code', 'int y = 2;', '// Single line comment', 'int z = 3;', '/* Comment after last line */']) == []\n assert candidate(source = ['void func() {', 'int x = 10;', '/* Start of block comment ', 'int y = 20;', 'int z = 30;', '}*/']) == ['void func() {', 'int x = 10;']\n assert candidate(source = ['int func() {', 'if (x < 0) /* This is a block comment */ {', 'return x;', '} else {', 'return -x;', '}', '/* Another comment \" with quotes \" inside */', '}']) == ['int func() {', 'if (x < 0) {', 'return x;', '} else {', 'return -x;', '}', '}']\n assert candidate(source = ['int main() {', '/* Start of block comment \" /* nested block comment \" still in block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']) == ['int main() {', 'int x = 10;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['// Single-line comment', '/* Multi-line comment starts here', 'int x = 10;', '/* Nested comment */', 'int y = 20;', '*/ int z = 30;', '// End of file comment', '/* Last comment */']) == ['int y = 20;', '*/ int z = 30;']\n assert candidate(source = ['int main() {', ' /* Start of a block comment ', ' /* Nested block comment */', ' */', ' int x = 10;', ' // This is a single line comment', '}']) == ['int main() {', ' ', ' */', ' int x = 10;', ' ', '}']\n assert candidate(source = ['/* Start of block comment ', 'void func() {', 'int x = 10;', '} /* End of block comment */']) == []\n assert candidate(source = ['/* start of block comment', 'with multiple lines', 'and /* nested block comment */', 'inside it', 'end of block comment */', 'int t = 11;', 'int u = 12;']) == ['inside it', 'end of block comment */', 'int t = 11;', 'int u = 12;']\n assert candidate(source = ['/* comment with // nested line comment */', 'int o = 6;', '/* comment with /* nested block comment */ inside it */', 'int p = 7;']) == ['int o = 6;', ' inside it */', 'int p = 7;']\n assert candidate(source = ['int main() {', 'int x = 10;', '/* Comment with special characters !@#$%^&*()_+*/', 'int y = 20;', '}']) == ['int main() {', 'int x = 10;', 'int y = 20;', '}']\n assert candidate(source = ['// This is a single line comment', 'int a = 1;', '// Another single line comment', 'int b = 2;', '// Last single line comment']) == ['int a = 1;', 'int b = 2;']\n assert candidate(source = ['int main() {', 'if (true) {', '// This is a comment inside a block', 'int x = 1;', '}', '/* Another block comment \" end of block comment */', 'int y = 2;', '}']) == ['int main() {', 'if (true) {', 'int x = 1;', '}', 'int y = 2;', '}']\n assert candidate(source = ['int main() {', '/* Start of block comment', 'which continues', 'and includes \"quotes\" inside', '*/', 'int x = 10;', '// This is a single line comment after block comment', 'cout << \"Value: \" << x;', '}']) == ['int main() {', 'int x = 10;', 'cout << \"Value: \" << x;', '}']\n assert candidate(source = ['/* This is a block comment \" // this is not a comment \" */', 'int x = 1;', '/* another block comment \" // still in block comment \" */', 'int y = 2;', 'printf(\"Result: %d\", x + y);']) == ['int x = 1;', 'int y = 2;', 'printf(\"Result: %d\", x + y);']\n assert candidate(source = ['/* This is a comment /* nested block comment */ end of comment */', 'int x = 1;', '// Single-line comment after block comment', '/* Another block comment \" \" */ int y = 2;', 'int z = 3;']) == [' end of comment */', 'int x = 1;', ' int y = 2;', 'int z = 3;']\n assert candidate(source = ['void foo() {', '/* Multi-line comment starts here', 'and continues', 'on multiple lines */', 'int y = 30;', '// Another single-line comment', '}']) == ['void foo() {', 'int y = 30;', '}']\n assert candidate(source = ['/* Opening block comment', 'int x = 50;', 'int y = 60;', '// Line comment inside block comment', '*/', 'int z = 70;', '/* Another block comment \" with quotes \" inside */', '}']) == ['int z = 70;', '}']\n assert candidate(source = ['// single line comment /* block comment on same line */', '/* block comment // single line comment inside block comment */', 'int v = 13;']) == ['int v = 13;']\n assert candidate(source = ['int main() {', 'int x = 1;', '/* Comment with newline character \\n and /* nested */ comment */', 'int y = 2;', '}']) == ['int main() {', 'int x = 1;', ' comment */', 'int y = 2;', '}']\n assert candidate(source = ['int main() {', ' /* Start of block comment', ' // Single line comment inside block comment', ' end of block comment */', ' int x = 10;', ' // This is a single line comment', '}']) == ['int main() {', ' ', ' int x = 10;', ' ', '}']\n assert candidate(source = ['void foo() {', ' /* This is a block comment that ends on the same line */ int y = 20;', ' // This is a single line comment', '}']) == ['void foo() {', ' int y = 20;', ' ', '}']\n assert candidate(source = ['/* Comment line 1', 'Comment line 2', 'Comment line 3 */', 'int a = 1;', 'int b = 2;', 'int c = 3;']) == ['int a = 1;', 'int b = 2;', 'int c = 3;']\n assert candidate(source = ['/* Start of block comment', 'int x = 110;', '// Line comment inside block comment', 'int y = 120;', '*/', 'int z = 130;', '/* Another block comment', '/* Nested block comment */', 'End of nested block comment */', 'return x + y + z;', '}']) == ['int z = 130;', 'End of nested block comment */', 'return x + y + z;', '}']\n assert candidate(source = ['/* Start of block comment \\n /* nested block comment \\n still in block comment */', 'int x = 10;']) == ['int x = 10;']\n assert candidate(source = ['int main() {', '// Line comment \" // still in line comment \" end of line comment ', 'int x = 10;', '}']) == ['int main() {', 'int x = 10;', '}']\n assert candidate(source = ['int main() {', '/* Start of block comment /* still in block comment */ end of block comment */', 'int x = 10;', '// Single line comment after block comment', 'cout << \"Hello World\";', '}']) == ['int main() {', ' end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['/* Multiline comment \"with quotes\" inside /* nested comment */ still inside */', 'int main() {', '/* Another comment \" with quotes \" and /* nested */ */', 'int z = 100;', 'return z;', '}']) == [' still inside */', 'int main() {', ' */', 'int z = 100;', 'return z;', '}']\n assert candidate(source = ['void func() {', '/* Start of block comment ', 'int x = 10;', '} // End of function ', '*/']) == ['void func() {']\n assert candidate(source = ['/* comment /* nested /* deeply nested */ comment */ end */', 'int x = 1;', '// single line comment after block comment']) == [' comment */ end */', 'int x = 1;']\n assert candidate(source = ['int main() {', '/* Block comment \" /* nested comment */ \" end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '// Single-line comment', '}']) == ['int main() {', ' \" end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['/* Comment with \"escaped quote\" inside */', 'int x = 10;']) == ['int x = 10;']\n assert candidate(source = ['int main() {', 'int x = 1;', '// This is a comment \" /* this should be ignored */ end comment', 'int y = 2;', '/* This is a block comment \" /* nested */ end block comment */', 'int z = 3;', '}']) == ['int main() {', 'int x = 1;', 'int y = 2;', ' end block comment */', 'int z = 3;', '}']\n assert candidate(source = ['void func() {', '/* This is a ', 'multiline comment /* nested comment */', 'end of block comment */', 'int x = 10;', '// This is a single line comment /* this should be ignored */', '}']) == ['void func() {', 'end of block comment */', 'int x = 10;', '}']\n assert candidate(source = ['void function() {', 'int i = 0;', '/* start of block comment', 'int j = 1;', '// single line comment inside block comment', 'int k = 2;', 'end of block comment */', 'int l = 3;', '}']) == ['void function() {', 'int i = 0;', 'int l = 3;', '}']\n assert candidate(source = ['// Line comment \" // still a line comment \"', 'int main() {', 'int x = 30;', '/* Multiline \" comment \" block ', 'with line continuation ', '*/', 'return x;', '}']) == ['int main() {', 'int x = 30;', 'return x;', '}']\n assert candidate(source = ['/* Multi', 'line', 'block', 'comment */', 'int main() {', 'return 0;', '}']) == ['int main() {', 'return 0;', '}']\n assert candidate(source = ['/* This comment ', 'spans ', 'multiple lines */', 'int main() {', ' int x = 10;', ' /* Another block comment ', ' spanning ', ' multiple lines */', ' int y = 20;', '}']) == ['int main() {', ' int x = 10;', ' ', ' int y = 20;', '}']\n assert candidate(source = ['/* Start of block comment ', '/* nested block comment ', 'end of nested block comment */', 'end of block comment */', 'int x = 1;', 'cout << \"Hello World\";']) == ['end of block comment */', 'int x = 1;', 'cout << \"Hello World\";']\n assert candidate(source = ['/* Line 1', 'Line 2 still in comment', 'Line 3 // inline comment after block comment', 'Line 4 */ int x = 20;', '// End of file comment']) == [' int x = 20;']\n assert candidate(source = ['/* Comment before line */ int x = 10;', 'int y = 20; /* Comment after line */', 'int z = 30;']) == [' int x = 10;', 'int y = 20; ', 'int z = 30;']\n assert candidate(source = ['/* Line 1 comment', '/* Nested comment starts here', 'and continues here */', 'Back to outer comment */', 'int z = 40;', '// End of file comment']) == ['Back to outer comment */', 'int z = 40;']\n assert candidate(source = ['int main() {', '// Single line comment before block comment', '/* Start of block comment', 'which continues', 'and includes \"quotes\" inside', '*/', 'int x = 10;', 'cout << \"Value: \" << x;', '/* Another block comment \"with quotes\" inside */', 'int y = 2;', '}']) == ['int main() {', 'int x = 10;', 'cout << \"Value: \" << x;', 'int y = 2;', '}']\n assert candidate(source = ['/* comment starts', 'and continues here', 'and continues here too */', 'int y = 20;', '/* comment ends here', 'and here too */', 'int z = 30;']) == ['int y = 20;', 'int z = 30;']\n assert candidate(source = ['/* Start of block comment \" /* still in block comment */ end of block comment */', 'int x = 10;', '/* Another block comment \" end of block comment */', 'int y = 20;', 'cout << \"Hello World\";', '}']) == [' end of block comment */', 'int x = 10;', 'int y = 20;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['/* comment /* nested comment 1 */ more text', 'and continues here /* nested comment 2 */ still more text */', 'int a = 5;']) == [' more text', 'and continues here still more text */', 'int a = 5;']\n assert candidate(source = ['void bar() {', '/* Multi-line comment starts here', 'and continues', 'on multiple lines with \" escaped quotes \" */', 'int a = 100;', '// Single-line comment', '}']) == ['void bar() {', 'int a = 100;', '}']\n assert candidate(source = ['/* Comment before code', 'int main() {', '/* Start of block comment \" with quotes \" inside', '*/', 'int x = 10;', 'cout << \"Value: \" << x;', '// Single line comment after block comment', '}', '/* Comment after code */']) == ['int x = 10;', 'cout << \"Value: \" << x;', '}']\n assert candidate(source = ['/* comment with newline \\n inside it */', 'int m = 4;', '// comment with newline \\n inside it', 'int n = 5;']) == ['int m = 4;', 'int n = 5;']\n assert candidate(source = ['int main() {', '/* Multi-line', 'block', 'comment', 'ends', 'here */', 'int x = 1;', 'cout << \"Hello World\";', '}']) == ['int main() {', 'int x = 1;', 'cout << \"Hello World\";', '}']\n assert candidate(source = ['// Start of file comment', '/* Multi-line comment starts here', 'int x = 10;', '/* Nested comment */', 'int y = 20;', '*/ int z = 30;', '// End of file comment']) == ['int y = 20;', '*/ int z = 30;']\n assert candidate(source = ['/* Start of block comment /* Nested block comment */ still in block comment */', 'int x = 10;']) == [' still in block comment */', 'int x = 10;']\n assert candidate(source = ['int main() {', '/* Start of block comment \" /* still in block comment */ end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', '/* Another block comment /* nested */ end */', '}']) == ['int main() {', ' end of block comment */', 'int x = 10;', 'cout << \"Hello World\";', ' end */', '}']\n assert candidate(source = ['int main() {', '/* This is a block comment', 'which spans multiple lines \" /* still in block comment */ \" and continues here', '*/', 'int a = 10;', '// This is a single line comment', 'cout << \"Output: \" << a;', '}']) == ['int main() {', ' \" and continues here', '*/', 'int a = 10;', 'cout << \"Output: \" << a;', '}']\n assert candidate(source = ['int main() {', 'if (/* inline block comment */ true) {', 'printf(\"Hello\\n\");', '}', '}']) == ['int main() {', 'if ( true) {', 'printf(\"Hello\\n\");', '}', '}']\n", "comparison": "exact"}, "public_tests": ["[\"/*Test program */\", \"int main()\", \"{ \", \" // variable declaration \", \"int a, b, c;\", \"/* This is a test\", \" multiline \", \" comment for \", \" testing */\", \"a = b + c;\", \"}\"]", "[\"a/*comment\", \"line\", \"more_comment*/b\"]"], "hints": ["Carefully parse each line according to the following rules: * If we start a block comment and we aren't in a block, then we will skip over the next two characters and change our state to be in a block. * If we end a block comment and we are in a block, then we will skip over the next two characters and change our state to be *not* in a block. * If we start a line comment and we aren't in a block, then we will ignore the rest of the line. * If we aren't in a block comment (and it wasn't the start of a comment), we will record the character we are at. * At the end of each line, if we aren't in a block, we will record the line."], "metadata": {"canonical_parameter_names": ["source"], "leetcode_dataset_entry_point": "Solution().removeComments", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:28+00:00", "tests_total": 102, "tests_dropped": 14, "flags": [], "topic_tags": ["array", "string"]}, "language": "cpp", "interface": {"raw_signature": "vector removeComments(vector& source) {", "container": "Solution", "callable": "removeComments", "parameters": [{"name": "source", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 724, "task_id": "find-pivot-index", "difficulty": "Easy", "problem_description": "Given an array of integers nums, calculate the pivot index of this array.\n\nThe pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of all the numbers strictly to the index's right.\n\nIf the index is on the left edge of the array, then the left sum is 0 because there are no elements to the left. This also applies to the right edge of the array.\n\nReturn the leftmost pivot index. If no such index exists, return -1.\n\nExample 1:\n\nInput: nums = [1,7,3,6,5,6]\nOutput: 3\nExplanation:\nThe pivot index is 3.\nLeft sum = nums[0] + nums[1] + nums[2] = 1 + 7 + 3 = 11\nRight sum = nums[4] + nums[5] = 5 + 6 = 11\n\nExample 2:\n\nInput: nums = [1,2,3]\nOutput: -1\nExplanation:\nThere is no index that satisfies the conditions in the problem statement.\n\nExample 3:\n\nInput: nums = [2,1,-1]\nOutput: 0\nExplanation:\nThe pivot index is 0.\nLeft sum = 0 (no elements to the left of index 0)\nRight sum = nums[1] + nums[2] = 1 + -1 = 0\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -1000 <= nums[i] <= 1000\n\nNote: This question is the same as 1991: https://leetcode.com/problems/find-the-middle-index-in-array/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\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 = [1]) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5]) == -1\n assert candidate(nums = [1, 2, 1]) == 1\n assert candidate(nums = [-1, -1, -1, 0, -1, -1, -1]) == 3\n assert candidate(nums = [1000, -1000]) == -1\n assert candidate(nums = [1, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1]) == 3\n assert candidate(nums = [-1, -2, -3, 3, 2, 1]) == -1\n assert candidate(nums = [-1, -1, 0, 1, 1]) == -1\n assert candidate(nums = [2, 1, -1]) == 0\n assert candidate(nums = [-1, -1, -1, -1]) == -1\n assert candidate(nums = [1, 7, 3, 6, 5, 6]) == 3\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 1, 0]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5]) == -1\n assert candidate(nums = [1, 2, 3]) == -1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 10, 5]) == 6\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, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20, 21]) == -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 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 37\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\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125, 62, -62]) == -1\n assert candidate(nums = [200, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == -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, 9, 8, 7, 6, 5, 4, 3, 2, 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, 21, 22, 23, 24, 25, -325]) == -1\n assert candidate(nums = [1, 3, 2, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 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]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100]) == -1\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == -1\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000]) == -1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 6, 5, 4, 3, 2, 1]) == -1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == -1\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]) == 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]) == -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 = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == -1\n assert candidate(nums = [10, 10, 10, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == -1\n assert candidate(nums = [1000, -500, 500, -250, 250, -125, 125, -62, 62]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 10\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, 0, 0, 0, 0, 0, 0, 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\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, -140, 140]) == 28\n assert candidate(nums = [1000, -500, 500, -250, 250, -125, 125, -62, 62, -31, 31]) == 0\n assert candidate(nums = [-100, 100, -200, 200, -300, 300, -400, 400, -500, 500]) == -1\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000, -1000, 1000]) == 0\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]) == -1\n assert candidate(nums = [1000, -500, 500, 0, 0, 0, 0, 0, 0, 0, 500, -500, 1000]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]) == -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]) == -1\n assert candidate(nums = [10, -1, 10, -1, 10, -1, 10, -1, 10, -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\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 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]) == -1\n assert candidate(nums = [10, 20, 30, 40, 50, 40, 30, 20, 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, -210]) == -1\n assert candidate(nums = [1000, -500, -250, -125, -62, -31, -15, -7, -3, -1]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == -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\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == -1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 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, 21]) == -1\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40]) == -1\n assert candidate(nums = [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, 55]) == -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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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(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, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10]) == -1\n assert candidate(nums = [100, -100, 100, -100, 100, -100, 100, -100, 100, -100]) == -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 = [100, -50, 50, -25, 25, -12, 12, -6, 6, -3, 3, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0]) == 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]) == -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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == 14\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, 1]) == 26\n assert candidate(nums = [10, 10, 10, 10, 10, 5, 5, 5, 5, 5, 5]) == -1\n assert candidate(nums = [-1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]) == -1\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15]) == -1\n assert candidate(nums = [1, 2, 3, 6, 3, 2, 1]) == 3\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250]) == -1\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -55]) == -1\n", "comparison": "exact"}, "public_tests": ["[1,7,3,6,5,6]", "[1,2,3]", "[2,1,-1]"], "hints": ["Create an array sumLeft where sumLeft[i] is the sum of all the numbers to the left of index i.", "Create an array sumRight where sumRight[i] is the sum of all the numbers to the right of index i.", "For each index i, check if sumLeft[i] equals sumRight[i]. If so, return i. If no such i is found, return -1."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().pivotIndex", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:33+00:00", "tests_total": 95, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "prefix-sum"]}, "language": "cpp", "interface": {"raw_signature": "int pivotIndex(vector& nums) {", "container": "Solution", "callable": "pivotIndex", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 726, "task_id": "number-of-atoms", "difficulty": "Hard", "problem_description": "Given a string formula representing a chemical formula, return the count of each atom.\n\nThe atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name.\n\nOne or more digits representing that element's count may follow if the count is greater than 1. If the count is 1, no digits will follow.\n\n- For example, \"H2O\" and \"H2O2\" are possible, but \"H1O2\" is impossible.\n\nTwo formulas are concatenated together to produce another formula.\n\n- For example, \"H2O2He3Mg4\" is also a formula.\n\nA formula placed in parentheses, and a count (optionally added) is also a formula.\n\n- For example, \"(H2O2)\" and \"(H2O2)3\" are formulas.\n\nReturn the count of all elements as a string in the following form: the first name (in sorted order), followed by its count (if that count is more than 1), followed by the second name (in sorted order), followed by its count (if that count is more than 1), and so on.\n\nThe test cases are generated so that all the values in the output fit in a 32-bit integer.\n\nExample 1:\n\nInput: formula = \"H2O\"\nOutput: \"H2O\"\nExplanation: The count of elements are {'H': 2, 'O': 1}.\n\nExample 2:\n\nInput: formula = \"Mg(OH)2\"\nOutput: \"H2MgO2\"\nExplanation: The count of elements are {'H': 2, 'Mg': 1, 'O': 2}.\n\nExample 3:\n\nInput: formula = \"K4(ON(SO3)2)2\"\nOutput: \"K4N2O14S4\"\nExplanation: The count of elements are {'K': 4, 'N': 2, 'O': 14, 'S': 4}.\n\nConstraints:\n\n- 1 <= formula.length <= 1000\n- formula consists of English letters, digits, '(', and ')'.\n- formula is always valid.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(formula = \"(NH4)3PO4\") == \"H12N3O4P\"\n assert candidate(formula = \"(NH4)2SO4\") == \"H8N2O4S\"\n assert candidate(formula = \"Be32(Al2(SiO3)4)3\") == \"Al6Be32O36Si12\"\n assert candidate(formula = \"Mg(OH)2\") == \"H2MgO2\"\n assert candidate(formula = \"Be3Al2(SiO3)6\") == \"Al2Be3O18Si6\"\n assert candidate(formula = \"((H2O)2)3\") == \"H12O6\"\n assert candidate(formula = \"(CH3)2CO\") == \"C3H6O\"\n assert candidate(formula = \"(C2H5)3N\") == \"C6H15N\"\n assert candidate(formula = \"Fe3(PO4)2\") == \"Fe3O8P2\"\n assert candidate(formula = \"(CO2)3(PO3)2\") == \"C3O12P2\"\n assert candidate(formula = \"SiO2\") == \"O2Si\"\n assert candidate(formula = \"Si(C3H5(NO3)3)4\") == \"C12H20N12O36Si\"\n assert candidate(formula = \"(C2H3O2)2\") == \"C4H6O4\"\n assert candidate(formula = \"CuSO4\") == \"CuO4S\"\n assert candidate(formula = \"C6H12O6\") == \"C6H12O6\"\n assert candidate(formula = \"Al2(SO4)3\") == \"Al2O12S3\"\n assert candidate(formula = \"K4(ON(SO3)2)2\") == \"K4N2O14S4\"\n assert candidate(formula = \"(CO(NH2)2)2\") == \"C2H8N4O2\"\n assert candidate(formula = \"(HCO3)3\") == \"C3H3O9\"\n assert candidate(formula = \"(H2O2)3\") == \"H6O6\"\n assert candidate(formula = \"H2O\") == \"H2O\"\n assert candidate(formula = \"Ca(CO3)2\") == \"C2CaO6\"\n assert candidate(formula = \"Si(C3H5O3)2\") == \"C6H10O6Si\"\n assert candidate(formula = \"Fe(NO3)3\") == \"FeN3O9\"\n assert candidate(formula = \"NaCl\") == \"ClNa\"\n assert candidate(formula = \"He\") == \"He\"\n assert candidate(formula = \"P2O7\") == \"O7P2\"\n assert candidate(formula = \"(NH4)2C2O4\") == \"C2H8N2O4\"\n assert candidate(formula = \"Fe(CN)6\") == \"C6FeN6\"\n assert candidate(formula = \"Si(C3H5O3H)3\") == \"C9H18O9Si\"\n assert candidate(formula = \"Fe6(PO4)3\") == \"Fe6O12P3\"\n assert candidate(formula = \"C12H22O11\") == \"C12H22O11\"\n assert candidate(formula = \"(CH3)2O\") == \"C2H6O\"\n assert candidate(formula = \"Fe3(Fe(H2O)2)2\") == \"Fe5H8O4\"\n assert candidate(formula = \"HCl\") == \"ClH\"\n assert candidate(formula = \"(CH3)3COOH\") == \"C4H10O2\"\n assert candidate(formula = \"(NH3)2SO4\") == \"H6N2O4S\"\n assert candidate(formula = \"Fe2(CO)9\") == \"C9Fe2O9\"\n assert candidate(formula = \"Pb(SO4)2\") == \"O8PbS2\"\n assert candidate(formula = \"Fe2(CO)4\") == \"C4Fe2O4\"\n assert candidate(formula = \"Mg3(PO4)2\") == \"Mg3O8P2\"\n assert candidate(formula = \"(C6H5OH)2\") == \"C12H12O2\"\n assert candidate(formula = \"(C4H10O4)2\") == \"C8H20O8\"\n assert candidate(formula = \"(NH4)2Cr2O7(K2Cr2O7)2\") == \"Cr6H8K4N2O21\"\n assert candidate(formula = \"(SiO2)3(CuSiO3)2\") == \"Cu2O12Si5\"\n assert candidate(formula = \"K3PO4\") == \"K3O4P\"\n assert candidate(formula = \"(NH4)2(C2H3O2)2Fe(H2O)4\") == \"C4FeH22N2O8\"\n assert candidate(formula = \"Cu(CuSO4)5(H2O)10\") == \"Cu6H20O30S5\"\n assert candidate(formula = \"Mg2(PO4)3\") == \"Mg2O12P3\"\n assert candidate(formula = \"((CH3COOH)2)3\") == \"C12H24O12\"\n assert candidate(formula = \"(FeSO4)2\") == \"Fe2O8S2\"\n assert candidate(formula = \"C3H6O\") == \"C3H6O\"\n assert candidate(formula = \"((H2O)3)4\") == \"H24O12\"\n assert candidate(formula = \"Fe(CO)4\") == \"C4FeO4\"\n assert candidate(formula = \"FeSO4((NH4)2S)2\") == \"FeH16N4O4S3\"\n assert candidate(formula = \"FeCl3\") == \"Cl3Fe\"\n assert candidate(formula = \"((C2H5OH)3SiO3)2\") == \"C12H36O12Si2\"\n assert candidate(formula = \"Fe(CO)4(Fe(OH)2)2\") == \"C4Fe3H4O8\"\n assert candidate(formula = \"C6H5(CH3COOH)3\") == \"C12H17O6\"\n assert candidate(formula = \"K2Cr2O7\") == \"Cr2K2O7\"\n assert candidate(formula = \"(CH3COO)2Cu\") == \"C4CuH6O4\"\n assert candidate(formula = \"(NaCl)3(MgSO4)2\") == \"Cl3Mg2Na3O8S2\"\n assert candidate(formula = \"(H2O)10\") == \"H20O10\"\n assert candidate(formula = \"Si(C3H5O3)3Na3\") == \"C9H15Na3O9Si\"\n assert candidate(formula = \"((N2)3H)2\") == \"H2N12\"\n assert candidate(formula = \"(NH4)2Cr2O7\") == \"Cr2H8N2O7\"\n assert candidate(formula = \"(NH4)2CO3\") == \"CH8N2O3\"\n assert candidate(formula = \"Al2(SO4)3(CaCO3)4\") == \"Al2C4Ca4O24S3\"\n assert candidate(formula = \"SiC\") == \"CSi\"\n assert candidate(formula = \"(Fe(CN)6)2Fe(CN)6\") == \"C18Fe3N18\"\n assert candidate(formula = \"(C2H5OH)3(CH3COOH)2\") == \"C10H26O7\"\n assert candidate(formula = \"Fe((OH)2)3\") == \"FeH6O6\"\n assert candidate(formula = \"(NH4)3PO4(CrO4)2\") == \"Cr2H12N3O12P\"\n assert candidate(formula = \"Fe3O4(Fe(OH)2)2(SO4)3\") == \"Fe5H4O20S3\"\n assert candidate(formula = \"(KAl(SO4)2)2\") == \"Al2K2O16S4\"\n assert candidate(formula = \"Fe(CO)5\") == \"C5FeO5\"\n assert candidate(formula = \"C6H10O5\") == \"C6H10O5\"\n assert candidate(formula = \"Na3PO4\") == \"Na3O4P\"\n assert candidate(formula = \"Zn(C4H9NH)3SO4\") == \"C12H30N3O4SZn\"\n assert candidate(formula = \"MgSO4\") == \"MgO4S\"\n assert candidate(formula = \"C2H5OH\") == \"C2H6O\"\n assert candidate(formula = \"(NH4)2HPO4\") == \"H9N2O4P\"\n assert candidate(formula = \"CaSO4\") == \"CaO4S\"\n assert candidate(formula = \"C2H5OH(CH3CH2OH)2\") == \"C6H18O3\"\n assert candidate(formula = \"(C2H5OH)2(CO2H)2\") == \"C6H14O6\"\n assert candidate(formula = \"((C2H5OH)2)3\") == \"C12H36O6\"\n assert candidate(formula = \"((CH3COOH)2Cu(CN)2)3\") == \"C18Cu3H24N6O12\"\n assert candidate(formula = \"BaCO3\") == \"BaCO3\"\n assert candidate(formula = \"K2CO3\") == \"CK2O3\"\n assert candidate(formula = \"Na2SiO3(Fe2(SO4)3)2\") == \"Fe4Na2O27S6Si\"\n assert candidate(formula = \"Al2(SO4)3(PO4)2\") == \"Al2O20P2S3\"\n assert candidate(formula = \"((C6H12O6)2H2O)4\") == \"C48H104O52\"\n assert candidate(formula = \"Na2SiO3(Al(OH)4)2\") == \"Al2H8Na2O11Si\"\n assert candidate(formula = \"Fe(Fe(OH)2)2(SO4)3\") == \"Fe3H4O16S3\"\n assert candidate(formula = \"((H2O)2SiO2)3\") == \"H12O12Si3\"\n assert candidate(formula = \"Ag(NH3)2Cl\") == \"AgClH6N2\"\n assert candidate(formula = \"(K4(ON(SO3)2)2)2\") == \"K8N4O28S8\"\n assert candidate(formula = \"(H2SO4)3\") == \"H6O12S3\"\n assert candidate(formula = \"(CH3COOH)2\") == \"C4H8O4\"\n assert candidate(formula = \"Cu3(PO4)2(F2)3\") == \"Cu3F6O8P2\"\n assert candidate(formula = \"(Fe(NO3)3)3\") == \"Fe3N9O27\"\n assert candidate(formula = \"FePO4\") == \"FeO4P\"\n assert candidate(formula = \"(C6H12O6)2\") == \"C12H24O12\"\n assert candidate(formula = \"Fe(CO)4(Fe(OH)2)2(SO4)3\") == \"C4Fe3H4O20S3\"\n assert candidate(formula = \"(C2H5OH)3\") == \"C6H18O3\"\n assert candidate(formula = \"C5H8O2\") == \"C5H8O2\"\n assert candidate(formula = \"(MgSO4)2\") == \"Mg2O8S2\"\n assert candidate(formula = \"C9H8O4\") == \"C9H8O4\"\n assert candidate(formula = \"(C5H12O)2\") == \"C10H24O2\"\n assert candidate(formula = \"Si2(H2O)3(PO4)2\") == \"H6O11P2Si2\"\n assert candidate(formula = \"Fe3(PO4)2(CaCO3)3\") == \"C3Ca3Fe3O17P2\"\n assert candidate(formula = \"Na2SO4\") == \"Na2O4S\"\n assert candidate(formula = \"Hg2(NO3)2\") == \"Hg2N2O6\"\n assert candidate(formula = \"K2Cr2O7((NH4)2SO4)3(CuSO4)5\") == \"Cr2Cu5H24K2N6O39S8\"\n assert candidate(formula = \"Na2S2O3\") == \"Na2O3S2\"\n assert candidate(formula = \"(K2Cr2O7)2\") == \"Cr4K4O14\"\n assert candidate(formula = \"K2(CrO4)2(H2O)2\") == \"Cr2H4K2O10\"\n assert candidate(formula = \"Fe3O4(Fe(OH)2)2\") == \"Fe5H4O8\"\n assert candidate(formula = \"Na2CO3\") == \"CNa2O3\"\n assert candidate(formula = \"Fe2(SO4)3\") == \"Fe2O12S3\"\n assert candidate(formula = \"Ni(CO)4\") == \"C4NiO4\"\n assert candidate(formula = \"Pb3O4\") == \"O4Pb3\"\n assert candidate(formula = \"((CO3)2Ca)3\") == \"C6Ca3O18\"\n assert candidate(formula = \"(SiO2)3(Al(OH)4)2\") == \"Al2H8O14Si3\"\n assert candidate(formula = \"CuSO4((NH4)2S)2\") == \"CuH16N4O4S3\"\n assert candidate(formula = \"((C2H5)2O)4\") == \"C16H40O4\"\n assert candidate(formula = \"(CH3(CH2)4CH3)3\") == \"C18H42\"\n assert candidate(formula = \"((H2O)2SiO2)2\") == \"H8O8Si2\"\n assert candidate(formula = \"CuSO4(Fe(CN)6)2\") == \"C12CuFe2N12O4S\"\n assert candidate(formula = \"Ca3(PO4)2(H2O)12\") == \"Ca3H24O20P2\"\n assert candidate(formula = \"(NH3)3PO4\") == \"H9N3O4P\"\n assert candidate(formula = \"FeS\") == \"FeS\"\n assert candidate(formula = \"Fe3O4(SO4)3\") == \"Fe3O16S3\"\n assert candidate(formula = \"(CaCO3)3\") == \"C3Ca3O9\"\n assert candidate(formula = \"Fe3O4\") == \"Fe3O4\"\n assert candidate(formula = \"(C2H3O2)2Mg\") == \"C4H6MgO4\"\n assert candidate(formula = \"(C6H10O4)3Na3\") == \"C18H30Na3O12\"\n assert candidate(formula = \"Ca(ClO)2\") == \"CaCl2O2\"\n assert candidate(formula = \"(C2H5OH)2\") == \"C4H12O2\"\n assert candidate(formula = \"Fe(CO3)3(Cu(NO3)2)4\") == \"C3Cu4FeN8O33\"\n assert candidate(formula = \"Fe(H2O)6(SO4)3\") == \"FeH12O18S3\"\n assert candidate(formula = \"Ag(NH3)2(NO3)3\") == \"AgH6N5O9\"\n assert candidate(formula = \"(CH3CH2OH)2\") == \"C4H12O2\"\n assert candidate(formula = \"SrTiO3\") == \"O3SrTi\"\n assert candidate(formula = \"Fe(CO)5(CN)2\") == \"C7FeN2O5\"\n assert candidate(formula = \"Fe2O3\") == \"Fe2O3\"\n assert candidate(formula = \"((CO2)2)3\") == \"C6O12\"\n assert candidate(formula = \"(SiO2)3\") == \"O6Si3\"\n assert candidate(formula = \"(Fe(CN)6)3\") == \"C18Fe3N18\"\n assert candidate(formula = \"C6H8O7\") == \"C6H8O7\"\n assert candidate(formula = \"(NH4)2S\") == \"H8N2S\"\n assert candidate(formula = \"(C6H10O5)6\") == \"C36H60O30\"\n assert candidate(formula = \"Pb(NO3)4\") == \"N4O12Pb\"\n assert candidate(formula = \"((NH3)2)3\") == \"H18N6\"\n assert candidate(formula = \"CaCO3(MgCO3)2(SiO2)4\") == \"C3CaMg2O17Si4\"\n assert candidate(formula = \"(Fe(CN)6)2Fe(CO)5\") == \"C17Fe3N12O5\"\n assert candidate(formula = \"C3H6(CO2)2\") == \"C5H6O4\"\n assert candidate(formula = \"(NH4)2SO4(Fe(CN)6)2\") == \"C12Fe2H8N14O4S\"\n assert candidate(formula = \"((H2CO3)2)2\") == \"C4H8O12\"\n assert candidate(formula = \"(K2(Ca(CO3)2)3)4\") == \"C24Ca12K8O72\"\n assert candidate(formula = \"Fe(CO)3(PO4)2\") == \"C3FeO11P2\"\n assert candidate(formula = \"Fe(NO3)3(PO4)2\") == \"FeN3O17P2\"\n assert candidate(formula = \"((CH3)3CO)2Si(CH3)2\") == \"C10H24O2Si\"\n assert candidate(formula = \"CaO\") == \"CaO\"\n assert candidate(formula = \"CaCO3\") == \"CCaO3\"\n assert candidate(formula = \"(NH4)2SO4Fe3(PO4)2\") == \"Fe3H8N2O12P2S\"\n assert candidate(formula = \"Fe(NO3)2(MgSO4)2\") == \"FeMg2N2O14S2\"\n assert candidate(formula = \"FeCl2\") == \"Cl2Fe\"\n assert candidate(formula = \"Fe3O4(NiO2)2Fe2O3\") == \"Fe5Ni2O11\"\n assert candidate(formula = \"((NH4)2SO4)2\") == \"H16N4O8S2\"\n assert candidate(formula = \"CaSiO3\") == \"CaO3Si\"\n assert candidate(formula = \"Ag(Ag(BrO3)2)2\") == \"Ag3Br4O12\"\n assert candidate(formula = \"(C6H5COOH)2Fe\") == \"C14FeH12O4\"\n", "comparison": "exact"}, "public_tests": ["\"H2O\"", "\"Mg(OH)2\"", "\"K4(ON(SO3)2)2\""], "hints": ["To parse formula[i:], when we see a `'('`, we will parse recursively whatever is inside the brackets (up to the correct closing ending bracket) and add it to our count, multiplying by the following multiplicity if there is one. Otherwise, we should see an uppercase character: we will parse the rest of the letters to get the name, and add that (plus the multiplicity if there is one.)"], "metadata": {"canonical_parameter_names": ["formula"], "leetcode_dataset_entry_point": "Solution().countOfAtoms", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:35+00:00", "tests_total": 173, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string", "stack", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "string countOfAtoms(string formula) {", "container": "Solution", "callable": "countOfAtoms", "parameters": [{"name": "formula", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 728, "task_id": "self-dividing-numbers", "difficulty": "Easy", "problem_description": "A self-dividing number is a number that is divisible by every digit it contains.\n\n- For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0.\n\nA self-dividing number is not allowed to contain the digit zero.\n\nGiven two integers left and right, return a list of all the self-dividing numbers in the range [left, right] (both inclusive).\n\nExample 1:\n\nInput: left = 1, right = 22\nOutput: [1,2,3,4,5,6,7,8,9,11,12,15,22]\n\nExample 2:\n\nInput: left = 47, right = 85\nOutput: [48,55,66,77]\n\nConstraints:\n\n- 1 <= left <= right <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(left = 120,right = 130) == [122, 124, 126, 128]\n assert candidate(left = 47,right = 85) == [48, 55, 66, 77]\n assert candidate(left = 1,right = 100) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99]\n assert candidate(left = 9990,right = 10000) == [9999]\n assert candidate(left = 500,right = 700) == [515, 555, 612, 624, 636, 648, 666, 672]\n assert candidate(left = 10,right = 30) == [11, 12, 15, 22, 24]\n assert candidate(left = 10,right = 50) == [11, 12, 15, 22, 24, 33, 36, 44, 48]\n assert candidate(left = 90,right = 100) == [99]\n assert candidate(left = 90,right = 99) == [99]\n assert candidate(left = 1,right = 22) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22]\n assert candidate(left = 100,right = 200) == [111, 112, 115, 122, 124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184]\n assert candidate(left = 5000,right = 5500) == [5115, 5155, 5355]\n assert candidate(left = 900,right = 1000) == [936, 999]\n assert candidate(left = 1200,right = 1250) == [1212, 1222, 1224, 1236, 1244, 1248]\n assert candidate(left = 1000,right = 1100) == []\n assert candidate(left = 1,right = 10000) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22, 24, 33, 36, 44, 48, 55, 66, 77, 88, 99, 111, 112, 115, 122, 124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488, 515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999, 1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962, 2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916, 3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968, 5115, 5155, 5355, 5515, 5535, 5555, 5775, 6126, 6132, 6144, 6162, 6168, 6192, 6216, 6222, 6264, 6288, 6312, 6324, 6336, 6366, 6384, 6432, 6444, 6612, 6624, 6636, 6648, 6666, 6696, 6762, 6816, 6864, 6888, 6912, 6966, 6984, 7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777, 7784, 8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 800,right = 999) == [816, 824, 848, 864, 888, 936, 999]\n assert candidate(left = 1234,right = 4321) == [1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962, 2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916, 3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288]\n assert candidate(left = 990,right = 1010) == [999]\n assert candidate(left = 8888,right = 8888) == [8888]\n assert candidate(left = 250,right = 350) == [264, 288, 312, 315, 324, 333, 336]\n assert candidate(left = 800,right = 1200) == [816, 824, 848, 864, 888, 936, 999, 1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197]\n assert candidate(left = 150,right = 500) == [155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488]\n assert candidate(left = 1234,right = 1244) == [1236, 1244]\n assert candidate(left = 333,right = 666) == [333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488, 515, 555, 612, 624, 636, 648, 666]\n assert candidate(left = 678,right = 789) == [728, 735, 777, 784]\n assert candidate(left = 4000,right = 4500) == [4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488]\n assert candidate(left = 1234,right = 1250) == [1236, 1244, 1248]\n assert candidate(left = 888,right = 999) == [888, 936, 999]\n assert candidate(left = 2020,right = 2120) == [2112]\n assert candidate(left = 5678,right = 9876) == [5775, 6126, 6132, 6144, 6162, 6168, 6192, 6216, 6222, 6264, 6288, 6312, 6324, 6336, 6366, 6384, 6432, 6444, 6612, 6624, 6636, 6648, 6666, 6696, 6762, 6816, 6864, 6888, 6912, 6966, 6984, 7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777, 7784, 8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864]\n assert candidate(left = 90,right = 150) == [99, 111, 112, 115, 122, 124, 126, 128, 132, 135, 144]\n assert candidate(left = 2000,right = 3000) == [2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916]\n assert candidate(left = 6000,right = 6100) == []\n assert candidate(left = 200,right = 800) == [212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488, 515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784]\n assert candidate(left = 8888,right = 9999) == [8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 5600,right = 5700) == []\n assert candidate(left = 8900,right = 8950) == [8928]\n assert candidate(left = 1234,right = 1240) == [1236]\n assert candidate(left = 3030,right = 3130) == [3111, 3126]\n assert candidate(left = 2500,right = 3000) == [2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916]\n assert candidate(left = 7000,right = 7777) == [7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777]\n assert candidate(left = 700,right = 1000) == [728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999]\n assert candidate(left = 990,right = 1000) == [999]\n assert candidate(left = 5000,right = 6000) == [5115, 5155, 5355, 5515, 5535, 5555, 5775]\n assert candidate(left = 6789,right = 9876) == [6816, 6864, 6888, 6912, 6966, 6984, 7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777, 7784, 8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864]\n assert candidate(left = 7000,right = 7500) == [7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476]\n assert candidate(left = 8888,right = 9000) == [8888, 8928]\n assert candidate(left = 8000,right = 8999) == [8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928]\n assert candidate(left = 1000,right = 1500) == [1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488]\n assert candidate(left = 1111,right = 1111) == [1111]\n assert candidate(left = 555,right = 5555) == [555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999, 1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962, 2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916, 3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968, 5115, 5155, 5355, 5515, 5535, 5555]\n assert candidate(left = 9000,right = 10000) == [9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 3000,right = 5000) == [3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968]\n assert candidate(left = 7500,right = 7800) == [7644, 7728, 7777, 7784]\n assert candidate(left = 1000,right = 2000) == [1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962]\n assert candidate(left = 1234,right = 5678) == [1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962, 2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916, 3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968, 5115, 5155, 5355, 5515, 5535, 5555]\n assert candidate(left = 500,right = 1500) == [515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999, 1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488]\n assert candidate(left = 7700,right = 7800) == [7728, 7777, 7784]\n assert candidate(left = 1234,right = 2000) == [1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962]\n assert candidate(left = 9000,right = 9999) == [9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 9800,right = 9900) == [9864]\n assert candidate(left = 123,right = 456) == [124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448]\n assert candidate(left = 4000,right = 6000) == [4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968, 5115, 5155, 5355, 5515, 5535, 5555, 5775]\n assert candidate(left = 99,right = 999) == [99, 111, 112, 115, 122, 124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488, 515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999]\n assert candidate(left = 500,right = 800) == [515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784]\n assert candidate(left = 500,right = 1000) == [515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999]\n assert candidate(left = 111,right = 999) == [111, 112, 115, 122, 124, 126, 128, 132, 135, 144, 155, 162, 168, 175, 184, 212, 216, 222, 224, 244, 248, 264, 288, 312, 315, 324, 333, 336, 366, 384, 396, 412, 424, 432, 444, 448, 488, 515, 555, 612, 624, 636, 648, 666, 672, 728, 735, 777, 784, 816, 824, 848, 864, 888, 936, 999]\n assert candidate(left = 1024,right = 1024) == []\n assert candidate(left = 5000,right = 9999) == [5115, 5155, 5355, 5515, 5535, 5555, 5775, 6126, 6132, 6144, 6162, 6168, 6192, 6216, 6222, 6264, 6288, 6312, 6324, 6336, 6366, 6384, 6432, 6444, 6612, 6624, 6636, 6648, 6666, 6696, 6762, 6816, 6864, 6888, 6912, 6966, 6984, 7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777, 7784, 8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 800,right = 899) == [816, 824, 848, 864, 888]\n assert candidate(left = 10000,right = 10000) == []\n assert candidate(left = 900,right = 990) == [936]\n assert candidate(left = 200,right = 300) == [212, 216, 222, 224, 244, 248, 264, 288]\n assert candidate(left = 1111,right = 1115) == [1111, 1112, 1113, 1115]\n assert candidate(left = 1000,right = 10000) == [1111, 1112, 1113, 1115, 1116, 1122, 1124, 1128, 1131, 1144, 1155, 1164, 1176, 1184, 1197, 1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296, 1311, 1326, 1332, 1335, 1344, 1362, 1368, 1395, 1412, 1416, 1424, 1444, 1448, 1464, 1488, 1515, 1555, 1575, 1626, 1632, 1644, 1662, 1692, 1715, 1722, 1764, 1771, 1824, 1848, 1888, 1926, 1935, 1944, 1962, 2112, 2122, 2124, 2128, 2136, 2144, 2166, 2184, 2196, 2212, 2222, 2224, 2226, 2232, 2244, 2248, 2262, 2288, 2316, 2322, 2328, 2364, 2412, 2424, 2436, 2444, 2448, 2488, 2616, 2622, 2664, 2688, 2744, 2772, 2824, 2832, 2848, 2888, 2916, 3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492, 3555, 3612, 3624, 3636, 3648, 3666, 3717, 3816, 3864, 3888, 3915, 3924, 3933, 3996, 4112, 4116, 4124, 4128, 4144, 4164, 4172, 4184, 4212, 4224, 4236, 4244, 4248, 4288, 4332, 4344, 4368, 4392, 4412, 4416, 4424, 4444, 4448, 4464, 4488, 4632, 4644, 4824, 4848, 4872, 4888, 4896, 4932, 4968, 5115, 5155, 5355, 5515, 5535, 5555, 5775, 6126, 6132, 6144, 6162, 6168, 6192, 6216, 6222, 6264, 6288, 6312, 6324, 6336, 6366, 6384, 6432, 6444, 6612, 6624, 6636, 6648, 6666, 6696, 6762, 6816, 6864, 6888, 6912, 6966, 6984, 7112, 7119, 7175, 7224, 7266, 7371, 7448, 7476, 7644, 7728, 7777, 7784, 8112, 8128, 8136, 8144, 8184, 8224, 8232, 8248, 8288, 8328, 8424, 8448, 8488, 8496, 8616, 8664, 8688, 8736, 8824, 8832, 8848, 8888, 8928, 9126, 9135, 9144, 9162, 9216, 9288, 9315, 9324, 9333, 9396, 9432, 9612, 9648, 9666, 9864, 9936, 9999]\n assert candidate(left = 1200,right = 1300) == [1212, 1222, 1224, 1236, 1244, 1248, 1266, 1288, 1296]\n assert candidate(left = 3000,right = 3500) == [3111, 3126, 3132, 3135, 3144, 3162, 3168, 3171, 3195, 3216, 3222, 3264, 3276, 3288, 3312, 3315, 3324, 3333, 3336, 3339, 3366, 3384, 3393, 3432, 3444, 3492]\n", "comparison": "exact"}, "public_tests": ["1\n22", "47\n85"], "hints": ["For each number in the range, check whether it is self dividing by converting that number to a character array (or string in Python), then checking that each digit is nonzero and divides the original number."], "metadata": {"canonical_parameter_names": ["left", "right"], "leetcode_dataset_entry_point": "Solution().selfDividingNumbers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:39+00:00", "tests_total": 82, "tests_dropped": 4, "flags": [], "topic_tags": ["math"]}, "language": "cpp", "interface": {"raw_signature": "vector selfDividingNumbers(int left, int right) {", "container": "Solution", "callable": "selfDividingNumbers", "parameters": [{"name": "left", "type": "int"}, {"name": "right", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 730, "task_id": "count-different-palindromic-subsequences", "difficulty": "Hard", "problem_description": "Given a string s, return the number of different non-empty palindromic subsequences in s. Since the answer may be very large, return it modulo 10^9 + 7.\n\nA subsequence of a string is obtained by deleting zero or more characters from the string.\n\nA sequence is palindromic if it is equal to the sequence reversed.\n\nTwo sequences a_1, a_2, ... and b_1, b_2, ... are different if there is some i for which a_i != b_i.\n\nExample 1:\n\nInput: s = \"bccb\"\nOutput: 6\nExplanation: The 6 different non-empty palindromic subsequences are 'b', 'c', 'bb', 'cc', 'bcb', 'bccb'.\nNote that 'bcb' is counted only once, even though it occurs twice.\n\nExample 2:\n\nInput: s = \"abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcba\"\nOutput: 104860361\nExplanation: There are 3104860382 different non-empty palindromic subsequences, which is 104860361 modulo 10^9 + 7.\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s[i] is either 'a', 'b', 'c', or 'd'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abba\") == 6\n assert candidate(s = \"abccba\") == 14\n assert candidate(s = \"abcba\") == 10\n assert candidate(s = \"abac\") == 5\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcba\") == 104860361\n assert candidate(s = \"aabbaa\") == 10\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcd\") == 29348\n assert candidate(s = \"abcddcba\") == 30\n assert candidate(s = \"bccb\") == 6\n assert candidate(s = \"aaa\") == 3\n assert candidate(s = \"abcd\") == 4\n assert candidate(s = \"aabb\") == 4\n assert candidate(s = \"aaaa\") == 4\n assert candidate(s = \"abab\") == 6\n assert candidate(s = \"abacabadabacabadabacaba\") == 2571\n assert candidate(s = \"ababbabaabbababbab\") == 212\n assert candidate(s = \"aabbaabbaabb\") == 44\n assert candidate(s = \"aaaabbbbccccaaaabbbbccccaaaabbbbcccc\") == 996\n assert candidate(s = \"ddccbbbaaacccbdd\") == 94\n assert candidate(s = \"abcabcabcabc\") == 84\n assert candidate(s = \"aaaaabbbbbccccddddaaaaabbbbbccccddddaaaaabbbbbccccddddaaaaabbbbbccccddddaaaaabbbbbccccddddaaaaabbbbbccccddddaaaaabbbbbccccdddd\") == 127372410\n assert candidate(s = \"abcddcbaabcddcba\") == 340\n assert candidate(s = \"abcdabcdabcd\") == 72\n assert candidate(s = \"abababababababababababababababab\") == 8358\n assert candidate(s = \"aaaabbbbccccddddaaaabbbbccccdddd\") == 224\n assert candidate(s = \"abacaba\") == 19\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 450061485\n assert candidate(s = \"aaaabbbaaaaabbbbaaaaabbbbaaaaabbbbaaaaabbbbaaaaabbbbaaaa\") == 61293\n assert candidate(s = \"abcdcba\") == 22\n assert candidate(s = \"acbdca\") == 14\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 320164\n assert candidate(s = \"ababababababababababababababababababababababababababababababababababababababababababab\") == 672623781\n assert candidate(s = \"abcdbca\") == 20\n assert candidate(s = \"abccbaabccbaabccba\") == 446\n assert candidate(s = \"abcdabcdaabbccbddc\") == 184\n assert candidate(s = \"ababababababab\") == 106\n assert candidate(s = \"abababababab\") == 64\n assert candidate(s = \"abcababcababcababcababcababcababcababcab\") == 237716\n assert candidate(s = \"abcdabcdaabbccbddcddcbaabccbddcddcba\") == 17166\n assert candidate(s = \"abcabcabcabcabcabc\") == 504\n assert candidate(s = \"aababaababaababaababaababaababaababaababaababaababa\") == 442187\n assert candidate(s = \"abbbccaddccbbbaabbbccaddccbbba\") == 4260\n assert candidate(s = \"abcdabcdabcdabcd\") == 244\n assert candidate(s = \"abcdabcdabcdabcdabcd\") == 812\n assert candidate(s = \"ddccbbbaaacccbbbaaacccbdd\") == 607\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 38097140\n assert candidate(s = \"dddddddddddddddddddddddd\") == 24\n assert candidate(s = \"abababababababababab\") == 462\n assert candidate(s = \"aaaaa\") == 5\n assert candidate(s = \"abacabadabacaba\") == 232\n assert candidate(s = \"dcbadcbadcbadcbadcbadcb\") == 2219\n assert candidate(s = \"aabababababababa\") == 161\n assert candidate(s = \"abcdabcd\") == 20\n assert candidate(s = \"aaaaabbbbbcccc\") == 14\n assert candidate(s = \"abccccddddddbbbaaaadddbbbbccccaaaabbbccbbccbbccbbccbbccbbccbbbbaaaaddbbbbccccaaaaadddbbbbccccaaaabbbccbbccbbccbbccbbccbbccbbbbaaaadd\") == 584072730\n assert candidate(s = \"dcbaabcd\") == 30\n assert candidate(s = \"abcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcd\") == 852725823\n assert candidate(s = \"abcdabcdbabcdbabcdb\") == 607\n assert candidate(s = \"aaaabbbbccccdddd\") == 16\n assert candidate(s = \"abacabadabacabadabacabad\") == 2784\n assert candidate(s = \"abbaabbaabba\") == 54\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 96936\n assert candidate(s = \"aabbccddccbbaa\") == 106\n assert candidate(s = \"abccbaabcba\") == 56\n assert candidate(s = \"abababababababababababab\") == 1216\n assert candidate(s = \"ababababab\") == 38\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcda\") == 198263755\n assert candidate(s = \"abcabc\") == 12\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 125826312\n assert candidate(s = \"abcdcbadcbadcbabcd\") == 432\n assert candidate(s = \"abcabcabcabcabcabcabcabc\") == 2952\n assert candidate(s = \"dcbbabdccacbaaadbcbbabcbbb\") == 934\n assert candidate(s = \"ababa\") == 9\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\") == 320443980\n assert candidate(s = \"ddddcbbaabcdccbdddbddbcccbdbabdbbaccabdbdddcbbaabaddabbdcbbaabcddbacccbadcbbaabcdccbdddbddbcccbdbabdbbaccabdbddd\") == 923039370\n assert candidate(s = \"abcadcbadcbadcb\") == 210\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcbaabcd\") == 649659461\n assert candidate(s = \"abcdcbaabcdcbaabcdcba\") == 1694\n", "comparison": "exact"}, "public_tests": ["\"bccb\"", "\"abcdabcdabcdabcdabcdabcdabcdabcddcbadcbadcbadcbadcbadcbadcbadcba\""], "hints": ["Let dp(i, j) be the answer for the string T = S[i:j+1] including the empty sequence. The answer is the number of unique characters in T, plus palindromes of the form \"a_a\", \"b_b\", \"c_c\", and \"d_d\", where \"_\" represents zero or more characters."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().countPalindromicSubsequences", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:42+00:00", "tests_total": 79, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int countPalindromicSubsequences(string s) {", "container": "Solution", "callable": "countPalindromicSubsequences", "parameters": [{"name": "s", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 733, "task_id": "flood-fill", "difficulty": "Easy", "problem_description": "You are given an image represented by an m x n grid of integers image, where image[i][j] represents the pixel value of the image. You are also given three integers sr, sc, and color. Your task is to perform a flood fill on the image starting from the pixel image[sr][sc].\n\nTo perform a flood fill:\n\n1. Begin with the starting pixel and change its color to color.\n2. Perform the same process for each pixel that is directly adjacent (pixels that share a side with the original pixel, either horizontally or vertically) and shares the same color as the starting pixel.\n3. Keep repeating this process by checking neighboring pixels of the updated pixels and modifying their color if it matches the original color of the starting pixel.\n4. The process stops when there are no more adjacent pixels of the original color to update.\n\nReturn the modified image after performing the flood fill.\n\nExample 1:\n\nInput: image = [[1,1,1],[1,1,0],[1,0,1]], sr = 1, sc = 1, color = 2\nOutput: [[2,2,2],[2,2,0],[2,0,1]]\nExplanation:\nFrom the center of the image with position (sr, sc) = (1, 1) (i.e., the red pixel), all pixels connected by a path of the same color as the starting pixel (i.e., the blue pixels) are colored with the new color.\nNote the bottom corner is not colored 2, because it is not horizontally or vertically connected to the starting pixel.\n\nExample 2:\n\nInput: image = [[0,0,0],[0,0,0]], sr = 0, sc = 0, color = 0\nOutput: [[0,0,0],[0,0,0]]\nExplanation:\nThe starting pixel is already colored with 0, which is the same as the target color. Therefore, no changes are made to the image.\n\nConstraints:\n\n- m == image.length\n- n == image[i].length\n- 1 <= m, n <= 50\n- 0 <= image[i][j], color < 2^16\n- 0 <= sr < m\n- 0 <= sc < n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(image = [[0, 0, 0], [0, 0, 0]],sr = 0,sc = 0,color = 0) == [[0, 0, 0], [0, 0, 0]]\n assert candidate(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 0,sc = 0,color = 3) == [[3, 3, 3], [3, 3, 3], [3, 3, 3]]\n assert candidate(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 2,sc = 2,color = 4) == [[4, 4, 4], [4, 4, 4], [4, 4, 4]]\n assert candidate(image = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],sr = 1,sc = 1,color = 10) == [[1, 2, 3], [4, 10, 6], [7, 8, 9]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 4) == [[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 4, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 1,sc = 1,color = 2) == [[2, 2, 2], [2, 2, 2], [2, 2, 2]]\n assert candidate(image = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],sr = 2,sc = 2,color = 2) == [[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]]\n assert candidate(image = [[1, 2, 3], [2, 2, 2], [3, 2, 1]],sr = 1,sc = 1,color = 1) == [[1, 1, 3], [1, 1, 1], [3, 1, 1]]\n assert candidate(image = [[1, 1, 1], [1, 1, 0], [1, 0, 1]],sr = 1,sc = 1,color = 2) == [[2, 2, 2], [2, 2, 0], [2, 0, 1]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 5) == [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 5, 5, 2, 1], [1, 2, 5, 5, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]],sr = 3,sc = 3,color = 4) == [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 4, 4, 4, 4, 2, 1], [1, 2, 4, 4, 4, 4, 2, 1], [1, 2, 4, 4, 4, 4, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 1,sc = 1,color = 2) == [[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 1, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1], [2, 2, 2, 1], [1, 2, 2, 1], [1, 1, 1, 1]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1], [3, 3, 3, 1], [1, 3, 3, 1], [1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1], [2, 2, 2, 2], [3, 3, 3, 3], [4, 4, 4, 4]],sr = 2,sc = 2,color = 1) == [[1, 1, 1, 1], [2, 2, 2, 2], [1, 1, 1, 1], [4, 4, 4, 4]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]],sr = 3,sc = 3,color = 5) == [[5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [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(image = [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 2, 2, 0, 1], [1, 0, 2, 2, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]],sr = 2,sc = 2,color = 5) == [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 5, 5, 0, 1], [1, 0, 5, 5, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 0,sc = 0,color = 2) == [[2, 2, 2], [2, 2, 2], [2, 2, 2]]\n assert candidate(image = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],sr = 2,sc = 0,color = 5) == [[1, 2, 3], [4, 5, 6], [5, 8, 9]]\n assert candidate(image = [[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]],sr = 3,sc = 3,color = 12) == [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 12, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 0, 0, 3, 2, 1], [1, 2, 3, 0, 0, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]],sr = 3,sc = 3,color = 4) == [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 4, 4, 3, 2, 1], [1, 2, 3, 4, 4, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 0,sc = 2,color = 5) == [[5, 5, 5, 5, 5], [5, 2, 2, 2, 5], [5, 2, 3, 2, 5], [5, 2, 2, 2, 5], [5, 5, 5, 5, 5]]\n assert candidate(image = [[2, 2, 2, 2, 2, 2], [2, 1, 1, 1, 1, 2], [2, 1, 3, 3, 1, 2], [2, 1, 3, 3, 1, 2], [2, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2]],sr = 2,sc = 2,color = 4) == [[2, 2, 2, 2, 2, 2], [2, 1, 1, 1, 1, 2], [2, 1, 4, 4, 1, 2], [2, 1, 4, 4, 1, 2], [2, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 10) == [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 10, 10, 2, 1], [1, 2, 10, 10, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 2, 3, 4, 5], [1, 1, 1, 1, 1], [5, 4, 3, 2, 1], [1, 1, 1, 1, 1], [1, 2, 3, 4, 5]],sr = 2,sc = 2,color = 6) == [[1, 2, 3, 4, 5], [1, 1, 1, 1, 1], [5, 4, 6, 2, 1], [1, 1, 1, 1, 1], [1, 2, 3, 4, 5]]\n assert candidate(image = [[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]],sr = 3,sc = 3,color = 2) == [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 2, 2], [1, 1, 1, 2, 2], [1, 3, 3, 3, 3], [1, 3, 3, 3, 3], [1, 4, 4, 4, 4]],sr = 0,sc = 0,color = 5) == [[5, 5, 5, 2, 2], [5, 5, 5, 2, 2], [5, 3, 3, 3, 3], [5, 3, 3, 3, 3], [5, 4, 4, 4, 4]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 6) == [[5, 5, 5, 5, 5, 5], [5, 4, 4, 4, 4, 5], [5, 4, 6, 6, 4, 5], [5, 4, 6, 6, 4, 5], [5, 4, 4, 4, 4, 5], [5, 5, 5, 5, 5, 5]]\n assert candidate(image = [[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]],sr = 0,sc = 0,color = 8) == [[8, 8, 8, 8, 8], [8, 2, 2, 2, 8], [8, 2, 3, 2, 8], [8, 2, 2, 2, 8], [8, 8, 8, 8, 8]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 3, 2, 1], [1, 2, 3, 0, 0, 0, 3, 2, 1], [1, 2, 3, 0, 1, 0, 3, 2, 1], [1, 2, 3, 0, 0, 0, 3, 2, 1], [1, 2, 3, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]],sr = 4,sc = 4,color = 7) == [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 3, 2, 1], [1, 2, 3, 0, 0, 0, 3, 2, 1], [1, 2, 3, 0, 7, 0, 3, 2, 1], [1, 2, 3, 0, 0, 0, 3, 2, 1], [1, 2, 3, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 2, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1, 1], [1, 3, 3, 3, 1], [1, 3, 2, 3, 1], [1, 3, 3, 3, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1, 1], [3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [4, 4, 4, 4, 4], [5, 5, 5, 5, 5]]\n assert candidate(image = [[1, 1, 1, 1], [1, 0, 1, 1], [1, 0, 0, 1], [1, 1, 1, 1]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1], [1, 3, 1, 1], [1, 3, 3, 1], [1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 1, 1]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1], [1, 3, 3, 1], [1, 3, 3, 1], [1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 3) == [[1, 2, 1, 2, 1], [2, 1, 2, 1, 2], [1, 2, 3, 2, 1], [2, 1, 2, 1, 2], [1, 2, 1, 2, 1]]\n assert candidate(image = [[1, 2, 1, 2, 1], [2, 1, 2, 1, 2], [1, 2, 1, 2, 1], [2, 1, 2, 1, 2]],sr = 1,sc = 1,color = 3) == [[1, 2, 1, 2, 1], [2, 3, 2, 1, 2], [1, 2, 1, 2, 1], [2, 1, 2, 1, 2]]\n assert candidate(image = [[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]],sr = 0,sc = 0,color = 10) == [[10, 2, 3, 4, 5], [10, 2, 3, 4, 5], [10, 2, 3, 4, 5], [10, 2, 3, 4, 5], [10, 2, 3, 4, 5]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]],sr = 2,sc = 2,color = 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]]\n assert candidate(image = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],sr = 0,sc = 0,color = 2) == [[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 2, 2, 2, 0, 1], [1, 0, 2, 3, 2, 0, 1], [1, 0, 2, 2, 2, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]],sr = 2,sc = 2,color = 9) == [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 9, 9, 9, 0, 1], [1, 0, 9, 3, 9, 0, 1], [1, 0, 9, 9, 9, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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, 9, 8, 7, 6, 5, 4, 3, 2, 1]],sr = 5,sc = 5,color = 11) == [[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, 9, 8, 7, 6, 11, 4, 3, 2, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 0, 0, 3, 2, 1], [1, 2, 3, 0, 0, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]],sr = 4,sc = 4,color = 6) == [[1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 3, 6, 6, 3, 2, 1], [1, 2, 3, 6, 6, 3, 2, 1], [1, 2, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 4,sc = 4,color = 10) == [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 10]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 9) == [[1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 9, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],sr = 0,sc = 0,color = 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(image = [[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]],sr = 1,sc = 3,color = 4) == [[1, 1, 1, 1, 1], [1, 4, 4, 4, 1], [1, 4, 3, 4, 1], [1, 4, 4, 4, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],sr = 2,sc = 2,color = 2) == [[2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2]]\n assert candidate(image = [[2, 1, 1], [1, 1, 0], [1, 0, 1]],sr = 0,sc = 1,color = 3) == [[2, 3, 3], [3, 3, 0], [3, 0, 1]]\n assert candidate(image = [[1, 1, 1, 2, 2], [1, 1, 1, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3]],sr = 0,sc = 0,color = 5) == [[5, 5, 5, 2, 2], [5, 5, 5, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 4) == [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 4, 4, 2, 1], [1, 2, 4, 4, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1]],sr = 2,sc = 2,color = 6) == [[1, 2, 6, 4, 5], [5, 4, 6, 2, 1], [1, 2, 6, 4, 5], [5, 4, 6, 2, 1]]\n assert candidate(image = [[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]],sr = 0,sc = 0,color = 9) == [[9, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]]\n assert candidate(image = [[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]],sr = 1,sc = 1,color = 2) == [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 1, 1, 1, 2, 1], [1, 2, 1, 0, 1, 2, 1], [1, 2, 1, 1, 1, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1]],sr = 3,sc = 3,color = 11) == [[1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6], [6, 5, 4, 11, 2, 1], [1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 2, 3, 2, 1], [1, 2, 3, 2, 1], [1, 2, 3, 2, 1], [1, 1, 1, 1, 1]],sr = 0,sc = 2,color = 5) == [[5, 5, 5, 5, 5], [5, 2, 3, 2, 5], [5, 2, 3, 2, 5], [5, 2, 3, 2, 5], [5, 5, 5, 5, 5]]\n assert candidate(image = [[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, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0, 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]],sr = 4,sc = 4,color = 2) == [[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, 2, 2, 0, 1, 0, 1], [1, 0, 1, 0, 2, 0, 0, 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]]\n assert candidate(image = [[10, 10, 10, 10, 10], [10, 20, 20, 20, 10], [10, 20, 30, 20, 10], [10, 20, 20, 20, 10], [10, 10, 10, 10, 10]],sr = 2,sc = 2,color = 50) == [[10, 10, 10, 10, 10], [10, 20, 20, 20, 10], [10, 20, 50, 20, 10], [10, 20, 20, 20, 10], [10, 10, 10, 10, 10]]\n assert candidate(image = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],sr = 0,sc = 2,color = 10) == [[1, 2, 10], [4, 5, 6], [7, 8, 9]]\n assert candidate(image = [[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]],sr = 0,sc = 0,color = 10) == [[10, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]]\n assert candidate(image = [[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]],sr = 0,sc = 0,color = 5) == [[5, 2, 3, 4, 5], [5, 2, 3, 4, 5], [5, 2, 3, 4, 5], [5, 2, 3, 4, 5], [5, 2, 3, 4, 5]]\n assert candidate(image = [[2, 2, 2], [2, 2, 2], [2, 2, 2]],sr = 1,sc = 1,color = 3) == [[3, 3, 3], [3, 3, 3], [3, 3, 3]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]],sr = 3,sc = 3,color = 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(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 0,sc = 0,color = 0) == [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]\n assert candidate(image = [[1, 0, 0, 1], [0, 1, 1, 0], [0, 1, 1, 0], [1, 0, 0, 1]],sr = 1,sc = 1,color = 2) == [[1, 0, 0, 1], [0, 2, 2, 0], [0, 2, 2, 0], [1, 0, 0, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 2, 3, 4, 1], [1, 5, 6, 7, 1], [1, 8, 9, 10, 1], [1, 1, 1, 1, 1]],sr = 1,sc = 2,color = 11) == [[1, 1, 1, 1, 1], [1, 2, 11, 4, 1], [1, 5, 6, 7, 1], [1, 8, 9, 10, 1], [1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]],sr = 2,sc = 2,color = 2) == [[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 2, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 6) == [[1, 2, 3, 4, 5], [2, 3, 4, 5, 1], [3, 4, 6, 1, 2], [4, 5, 1, 2, 3], [5, 1, 2, 3, 4]]\n assert candidate(image = [[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, 3, 3, 2, 1], [1, 2, 3, 4, 5, 4, 3, 3, 2, 1], [1, 2, 3, 4, 4, 4, 3, 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]],sr = 4,sc = 4,color = 6) == [[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, 3, 3, 2, 1], [1, 2, 3, 4, 6, 4, 3, 3, 2, 1], [1, 2, 3, 4, 4, 4, 3, 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]]\n assert candidate(image = [[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]],sr = 0,sc = 0,color = 3) == [[3, 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(image = [[1, 2, 3], [2, 3, 4], [3, 4, 5]],sr = 1,sc = 1,color = 1) == [[1, 2, 3], [2, 1, 4], [3, 4, 5]]\n assert candidate(image = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],sr = 2,sc = 2,color = 26) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 26, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 1) == [[5, 5, 5, 5, 5], [5, 4, 4, 4, 5], [5, 4, 1, 4, 5], [5, 4, 4, 4, 5], [5, 5, 5, 5, 5]]\n assert candidate(image = [[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]],sr = 1,sc = 3,color = 100) == [[1, 2, 3, 4, 5], [2, 3, 4, 100, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]]\n assert candidate(image = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],sr = 0,sc = 2,color = 7) == [[1, 2, 7], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(image = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],sr = 2,sc = 2,color = 100) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 100, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]\n assert candidate(image = [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]],sr = 3,sc = 3,color = 7) == [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 7, 7, 7, 2, 1], [1, 2, 7, 7, 7, 2, 1], [1, 2, 7, 7, 7, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 3,sc = 3,color = 5) == [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 5, 5, 2, 1], [1, 2, 5, 5, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 6) == [[1, 2, 6, 4, 5], [1, 2, 6, 4, 5], [1, 2, 6, 4, 5], [1, 2, 6, 4, 5], [1, 2, 6, 4, 5]]\n assert candidate(image = [[2, 2, 2, 2, 2, 2, 2], [2, 1, 1, 1, 1, 1, 2], [2, 1, 2, 2, 2, 1, 2], [2, 1, 2, 1, 2, 1, 2], [2, 1, 2, 2, 2, 1, 2], [2, 1, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2, 2]],sr = 3,sc = 3,color = 3) == [[2, 2, 2, 2, 2, 2, 2], [2, 1, 1, 1, 1, 1, 2], [2, 1, 2, 2, 2, 1, 2], [2, 1, 2, 3, 2, 1, 2], [2, 1, 2, 2, 2, 1, 2], [2, 1, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2, 2]]\n assert candidate(image = [[1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7]],sr = 3,sc = 3,color = 8) == [[1, 2, 3, 8, 5, 6, 7], [1, 2, 3, 8, 5, 6, 7], [1, 2, 3, 8, 5, 6, 7], [1, 2, 3, 8, 5, 6, 7], [1, 2, 3, 8, 5, 6, 7]]\n assert candidate(image = [[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]],sr = 2,sc = 2,color = 9) == [[1, 2, 9, 4, 5], [5, 4, 9, 2, 1], [1, 2, 9, 4, 5], [5, 4, 9, 2, 1], [1, 2, 9, 4, 5]]\n assert candidate(image = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]],sr = 3,sc = 4,color = 21) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 21]]\n assert candidate(image = [[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]],sr = 3,sc = 3,color = 7) == [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 7, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1], [1, 2, 1], [1, 1, 1]],sr = 1,sc = 1,color = 1) == [[1, 1, 1], [1, 1, 1], [1, 1, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],sr = 2,sc = 2,color = 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(image = [[1, 1, 1, 1], [1, 2, 2, 1], [1, 2, 2, 1], [1, 1, 1, 1]],sr = 1,sc = 1,color = 3) == [[1, 1, 1, 1], [1, 3, 3, 1], [1, 3, 3, 1], [1, 1, 1, 1]]\n assert candidate(image = [[1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1]],sr = 1,sc = 1,color = 1) == [[1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1]]\n assert candidate(image = [[1, 2, 2, 2, 1], [2, 2, 2, 2, 2], [2, 2, 1, 2, 2], [2, 2, 2, 2, 2], [1, 2, 2, 2, 1]],sr = 2,sc = 2,color = 3) == [[1, 2, 2, 2, 1], [2, 2, 2, 2, 2], [2, 2, 3, 2, 2], [2, 2, 2, 2, 2], [1, 2, 2, 2, 1]]\n assert candidate(image = [[1, 1, 1, 1, 1], [1, 2, 3, 2, 1], [1, 3, 4, 3, 1], [1, 2, 3, 2, 1], [1, 1, 1, 1, 1]],sr = 1,sc = 1,color = 7) == [[1, 1, 1, 1, 1], [1, 7, 3, 2, 1], [1, 3, 4, 3, 1], [1, 2, 3, 2, 1], [1, 1, 1, 1, 1]]\n", "comparison": "exact"}, "public_tests": ["[[1,1,1],[1,1,0],[1,0,1]]\n1\n1\n2", "[[0,0,0],[0,0,0]]\n0\n0\n0"], "hints": ["Write a recursive function that paints the pixel if it's the correct color, then recurses on neighboring pixels."], "metadata": {"canonical_parameter_names": ["image", "sr", "sc", "color"], "leetcode_dataset_entry_point": "Solution().floodFill", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:44+00:00", "tests_total": 88, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "vector> floodFill(vector>& image, int sr, int sc, int color) {", "container": "Solution", "callable": "floodFill", "parameters": [{"name": "image", "type": "vector>&"}, {"name": "sr", "type": "int"}, {"name": "sc", "type": "int"}, {"name": "color", "type": "int"}], "return_type": "vector>", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 735, "task_id": "asteroid-collision", "difficulty": "Medium", "problem_description": "We are given an array asteroids of integers representing asteroids in a row. The indices of the asteroid in the array represent their relative position in space.\n\nFor each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning right, negative meaning left). Each asteroid moves at the same speed.\n\nFind out the state of the asteroids after all collisions. If two asteroids meet, the smaller one will explode. If both are the same size, both will explode. Two asteroids moving in the same direction will never meet.\n\nExample 1:\n\nInput: asteroids = [5,10,-5]\nOutput: [5,10]\nExplanation: The 10 and -5 collide resulting in 10. The 5 and 10 never collide.\n\nExample 2:\n\nInput: asteroids = [8,-8]\nOutput: []\nExplanation: The 8 and -8 collide exploding each other.\n\nExample 3:\n\nInput: asteroids = [10,2,-5]\nOutput: [10]\nExplanation: The 2 and -5 collide resulting in -5. The 10 and -5 collide resulting in 10.\n\nExample 4:\n\nInput: asteroids = [3,5,-6,2,-1,4]\nOutput: [-6,2,4]\nExplanation: The asteroid -6 makes the asteroid 3 and 5 explode, and then continues going left. On the other side, the asteroid 2 destroys -1. Since 2 and 4 are both moving right, they never collide.\n\nConstraints:\n\n- 2 <= asteroids.length <= 10^4\n- -1000 <= asteroids[i] <= 1000\n- asteroids[i] != 0\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(asteroids = [1, -1, 2, -2, 3, -3]) == []\n assert candidate(asteroids = [8, -8]) == []\n assert candidate(asteroids = [-2, -2, 1, 1]) == [-2, -2, 1, 1]\n assert candidate(asteroids = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == [1, 2, 3, 4]\n assert candidate(asteroids = [-1000, 1000]) == [-1000, 1000]\n assert candidate(asteroids = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]\n assert candidate(asteroids = [1, 2, 3, -4, -3, -2, -1]) == [-4, -3, -2, -1]\n assert candidate(asteroids = [5, -1, 5, -1]) == [5, 5]\n assert candidate(asteroids = [-2, -1, 1, 2]) == [-2, -1, 1, 2]\n assert candidate(asteroids = [1, 2, 3, -3, -2, -1]) == []\n assert candidate(asteroids = [-2, -2, 1, -2]) == [-2, -2, -2]\n assert candidate(asteroids = [1, 2, 3, -1, -2, -3]) == [1, 2]\n assert candidate(asteroids = [1, -2, -2, -2]) == [-2, -2, -2]\n assert candidate(asteroids = [1, 2, 3, -4, -5]) == [-4, -5]\n assert candidate(asteroids = [1000, -1000]) == []\n assert candidate(asteroids = [-3, 3, 1, -1, -2, 2]) == [-3, 3, 2]\n assert candidate(asteroids = [10, 1, 2, -3, -4, -5, 6, 7, 8, 9]) == [10, 6, 7, 8, 9]\n assert candidate(asteroids = [-2, -1, 1, 2, 3, 4]) == [-2, -1, 1, 2, 3, 4]\n assert candidate(asteroids = [5, -10, 10, -5]) == [-10, 10]\n assert candidate(asteroids = [10, 2, -5]) == [10]\n assert candidate(asteroids = [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]) == [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]\n assert candidate(asteroids = [6, 2, -3, -4, -5]) == [6]\n assert candidate(asteroids = [5, 10, -5]) == [5, 10]\n assert candidate(asteroids = [5, 10, -10, -5]) == []\n assert candidate(asteroids = [1, 2, -3, -4]) == [-3, -4]\n assert candidate(asteroids = [10, 2, -3, 5, -1, -4, 6, -6]) == [10, 5]\n assert candidate(asteroids = [-7, 7, -8, 8, -9, 9, 10, -10, 11, -11]) == [-7, -8, -9, 9]\n assert candidate(asteroids = [100, -100, 50, -50, 25, -25, 10, -10, 5, -5, 3, -3, 2, -2, 1, -1]) == []\n assert candidate(asteroids = [50, 40, 30, 20, 10, -10, -20, -30, -40, -50]) == []\n assert candidate(asteroids = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15]) == [-2, -4, -6, -8, -10, -12, -14, 15]\n assert candidate(asteroids = [1, 2, 3, 4, 5, -6, -7, -8, -9, -10]) == [-6, -7, -8, -9, -10]\n assert candidate(asteroids = [10, 20, 30, 40, 50, -15, -25, -35, -45, -55, 60, 70]) == [-55, 60, 70]\n assert candidate(asteroids = [5, 5, 5, 5, 5, -5, -5, -5, -5, -5]) == []\n assert candidate(asteroids = [3, 3, 3, 3, -3, -3, -3, -3, 3, 3, 3, 3, -3, -3, -3, -3]) == []\n assert candidate(asteroids = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == []\n assert candidate(asteroids = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, -29, -27, -25, -23, -21, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1]) == []\n assert candidate(asteroids = [-50, 50, -40, 40, -30, 30, -20, 20, -10, 10]) == [-50, 50, 40, 30, 20, 10]\n assert candidate(asteroids = [100, -90, -80, 70, -60, 50, -40, 30, -20, 10]) == [100, 70, 50, 30, 10]\n assert candidate(asteroids = [-5, 5, -10, 10, -15, 15, -20, 20, 25]) == [-5, -10, -15, -20, 20, 25]\n assert candidate(asteroids = [10, 20, 30, 40, 50, -50, -40, -30, -20, -10]) == []\n assert candidate(asteroids = [1, -1, -1, 1, 2, -2, -2, 2, 3, -3, -3, 3, 4, -4, -4, 4]) == [-1, -2, -3, -4, 4]\n assert candidate(asteroids = [-10, -20, -30, -40, -50, 50, 40, 30, 20, 10]) == [-10, -20, -30, -40, -50, 50, 40, 30, 20, 10]\n assert candidate(asteroids = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == []\n assert candidate(asteroids = [-1, -2, -3, 1, 2, 3, -4, -5, 4, 5]) == [-1, -2, -3, -4, -5, 4, 5]\n assert candidate(asteroids = [5, 15, 25, 35, 45, 55, -5, -15, -25, -35, -45, -55]) == [5, 15, 25, 35, 45]\n assert candidate(asteroids = [7, 6, 5, 4, 3, 2, 1, -1, -2, -3, -4, -5, -6, -7]) == []\n assert candidate(asteroids = [100, -200, 50, -50, 300, -150, 250, -100]) == [-200, 300, 250]\n assert candidate(asteroids = [-10, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == [-10]\n assert candidate(asteroids = [5, 10, 15, 20, -20, -15, -10, -5]) == []\n assert candidate(asteroids = [8, -2, 9, -3, 4, -1, 7, -5, 6, -4]) == [8, 9, 4, 7, 6]\n assert candidate(asteroids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == []\n assert candidate(asteroids = [5, 5, 5, 5, -5, -5, -5, -5, 5, 5]) == [5, 5]\n assert candidate(asteroids = [5, 7, 3, -7, 4, -4, 2, -2, 1, -1]) == [5]\n assert candidate(asteroids = [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]\n assert candidate(asteroids = [9, 8, 7, 6, 5, 4, 3, 2, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == []\n assert candidate(asteroids = [-5, 5, -10, 10, -15, 15, -20, 20, -25, 25]) == [-5, -10, -15, -20, -25, 25]\n assert candidate(asteroids = [2, -2, 4, -4, 6, -6, 8, -8, 10, -10, 12, -12, 14, -14, 16, -16]) == []\n assert candidate(asteroids = [1, 3, 5, 7, 9, -9, -7, -5, -3, -1, 2, 4, 6, 8, 10, -10, -8, -6, -4, -2]) == []\n assert candidate(asteroids = [-1, -2, -3, 4, 5, 6, -7, -8, 9, 10, -10, 11, -11, 12, -12]) == [-1, -2, -3, -7, -8, 9]\n assert candidate(asteroids = [-10, 10, -9, 9, -8, 8, -7, 7, -6, 6, -5, 5, -4, 4, -3, 3, -2, 2, -1, 1]) == [-10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(asteroids = [50, 40, 30, 20, 10, -10, -20, -30, -40, -50, 60, 70, 80, 90]) == [60, 70, 80, 90]\n assert candidate(asteroids = [5, -3, 7, -2, 1, -10, 15, -15, 20]) == [-10, 20]\n assert candidate(asteroids = [2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == []\n assert candidate(asteroids = [5, -10, 15, -20, 25, -30, 35, -40]) == [-10, -20, -30, -40]\n assert candidate(asteroids = [5, -5, 5, -5, 5, -5, 5, -5, 5, -5]) == []\n assert candidate(asteroids = [5, -5, 5, -5, 5, -5]) == []\n assert candidate(asteroids = [100, -99, 98, -97, 96, -95, 94, -93, 92, -91, 90]) == [100, 98, 96, 94, 92, 90]\n assert candidate(asteroids = [-10, -20, -30, 30, 20, 10, -10, -20, -30]) == [-10, -20, -30]\n assert candidate(asteroids = [10, 20, -15, -20, 5, 15, -10, 25, -30]) == [-30]\n assert candidate(asteroids = [10, 20, 30, -5, -15, -25, -35, 40, -45, 50]) == [-35, -45, 50]\n assert candidate(asteroids = [-10, -20, -30, 10, 20, 30, -15, -25, 5, 15, -5, -10, -20, 25, 35, -40, 40, -45, 45]) == [-10, -20, -30, -40, -45, 45]\n assert candidate(asteroids = [-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]\n assert candidate(asteroids = [5, 10, -10, -5, 20, -20, 15, -15, 25, -25]) == []\n assert candidate(asteroids = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == []\n assert candidate(asteroids = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12]) == [-1, -3, -5, -7, -9, -11, 12]\n assert candidate(asteroids = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1]) == []\n assert candidate(asteroids = [10, -1, 9, -2, 8, -3, 7, -4, 6, -5]) == [10, 9, 8, 7, 6]\n assert candidate(asteroids = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == []\n assert candidate(asteroids = [100, -99, 98, -97, 96, -95, 94, -93, 92, -91, 90, -89]) == [100, 98, 96, 94, 92, 90]\n assert candidate(asteroids = [1, 2, 3, 4, 5, 6, 7, 8, 9, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == []\n assert candidate(asteroids = [1, 1, 1, 1, 1, -1, -1, -1, -1, -1]) == []\n assert candidate(asteroids = [5, 10, -5, 10, -10, 5, -5, 10]) == [5, 10, 10]\n assert candidate(asteroids = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == []\n assert candidate(asteroids = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1]) == []\n assert candidate(asteroids = [100, 200, 300, -100, -200, -300, 400, -400, 500, -500]) == [100, 200]\n assert candidate(asteroids = [10, -20, 30, -40, 50, -60, 70, -80, 90, -100, 100, -90, 80, -70, 60, -50, 40, -30, 20, -10]) == [-20, -40, -60, -80, -100, 100, 80, 60, 40, 20]\n assert candidate(asteroids = [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(asteroids = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == []\n assert candidate(asteroids = [100, -1, 99, -2, 98, -3, 97, -4, 96, -5, 95, -6, 94, -7, 93, -8, 92, -9, 91, -10]) == [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]\n assert candidate(asteroids = [10, -5, 5, -10, 10, -10, 5, -5, 2, -2]) == []\n assert candidate(asteroids = [-10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60]) == [-10]\n assert candidate(asteroids = [100, -50, 50, -100, 200, -200, 300, -300, 400, -400]) == []\n assert candidate(asteroids = [1000, -1000, 500, -500, 250, -250, 125, -125, 63, -63, 31, -31, 15, -15, 7, -7, 3, -3, 1, -1]) == []\n assert candidate(asteroids = [1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10]) == [-2, -3, -4, -5, -6, -7, -8, -9, -10, 10]\n assert candidate(asteroids = [-10, -20, -30, -40, -50, 50, 40, 30, 20, 10]) == [-10, -20, -30, -40, -50, 50, 40, 30, 20, 10]\n assert candidate(asteroids = [100, 200, 300, 400, 500, -100, -200, -300, -400, -500, 600, 700, 800, 900, 1000]) == [100, 200, 300, 400, 600, 700, 800, 900, 1000]\n assert candidate(asteroids = [10, 20, 30, 40, 50, -50, -40, -30, -20, -10]) == []\n assert candidate(asteroids = [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]) == [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]\n assert candidate(asteroids = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16]) == [-1, -3, -5, -7, -9, -11, -13, -15, 16]\n assert candidate(asteroids = [5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5, 5, -5]) == []\n assert candidate(asteroids = [10, -10, 5, 3, -3, -5, 8, 8, -8, 2, -2]) == [8]\n assert candidate(asteroids = [10, -20, 30, -40, 50, -60, 70, -80, 90, -100, 110, -120, 130, -140, 150]) == [-20, -40, -60, -80, -100, -120, -140, 150]\n assert candidate(asteroids = [1, 2, 3, -3, -2, -1, 4, 5, -5, -4]) == []\n assert candidate(asteroids = [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]) == [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]\n assert candidate(asteroids = [5, 10, 15, -10, 20, -15, -20, 25, -25, 30, -30, 35, -35]) == [5, 10, 15]\n assert candidate(asteroids = [100, -50, 50, -25, 25, -10, 10, -5, 5, -2, 2, -1, 1]) == [100, 50, 25, 10, 5, 2, 1]\n assert candidate(asteroids = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]) == [-1, -3, -5, -7, -9, 10]\n assert candidate(asteroids = [100, -50, 20, -10, 5, -5, 10, -20, 30, -40]) == [100]\n assert candidate(asteroids = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == [1, 2, 3, 4]\n assert candidate(asteroids = [10, 20, 30, 40, 50, 60, 70, 80, 90, -90, -80, -70, -60, -50, -40, -30, -20, -10]) == []\n assert candidate(asteroids = [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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(asteroids = [10, 20, 30, -15, -25, 5, 15, -5, -10, -20, 25, 35, -40, 40, -45, 45]) == [-40, -45, 45]\n assert candidate(asteroids = [1, 2, 3, 4, 5, 6, 7, 8, 9, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == []\n assert candidate(asteroids = [10, 20, 30, 40, 50, -10, -20, -30, -40, -50]) == [10, 20, 30, 40]\n assert candidate(asteroids = [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]\n assert candidate(asteroids = [50, -50, 49, -49, 48, -48, 47, -47, 46, -46, 45, -45, 44, -44, 43, -43]) == []\n assert candidate(asteroids = [-100, 50, -50, 50, -50, 50, -50, 50, -50, 50, -50, 50, -50, 50, -50, 50, -50, 50, -50, 50]) == [-100, 50]\n assert candidate(asteroids = [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1, -6, 6, -7, 7, -8, 8, -9, 9]) == [-1, -2, -3, -4, -5, -6, -7, -8, -9, 9]\n assert candidate(asteroids = [5, 10, 15, -15, -10, -5, 20, -20, 25, -25, 30, -30]) == []\n assert candidate(asteroids = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == []\n assert candidate(asteroids = [1, 1, 1, 1, 1, -1, -1, -1, -1, -1]) == []\n assert candidate(asteroids = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -15]) == [-2, -4, -6, -8, -10, -12, -14]\n", "comparison": "exact"}, "public_tests": ["[5,10,-5]", "[8,-8]", "[10,2,-5]", "[3,5,-6,2,-1,4]"], "hints": ["Say a row of asteroids is stable. What happens when a new asteroid is added on the right?"], "metadata": {"canonical_parameter_names": ["asteroids"], "leetcode_dataset_entry_point": "Solution().asteroidCollision", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:48+00:00", "tests_total": 123, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "stack", "simulation"]}, "language": "cpp", "interface": {"raw_signature": "vector asteroidCollision(vector& asteroids) {", "container": "Solution", "callable": "asteroidCollision", "parameters": [{"name": "asteroids", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 736, "task_id": "parse-lisp-expression", "difficulty": "Hard", "problem_description": "You are given a string expression representing a Lisp-like expression to return the integer value of.\n\nThe syntax for these expressions is given as follows.\n\n- An expression is either an integer, let expression, add expression, mult expression, or an assigned variable. Expressions always evaluate to a single integer.\n- (An integer could be positive or negative.)\n- A let expression takes the form \"(let v_1 e_1 v_2 e_2 ... v_n e_n expr)\", where let is always the string \"let\", then there are one or more pairs of alternating variables and expressions, meaning that the first variable v_1 is assigned the value of the expression e_1, the second variable v_2 is assigned the value of the expression e_2, and so on sequentially; and then the value of this let expression is the value of the expression expr.\n- An add expression takes the form \"(add e_1 e_2)\" where add is always the string \"add\", there are always two expressions e_1, e_2 and the result is the addition of the evaluation of e_1 and the evaluation of e_2.\n- A mult expression takes the form \"(mult e_1 e_2)\" where mult is always the string \"mult\", there are always two expressions e_1, e_2 and the result is the multiplication of the evaluation of e1 and the evaluation of e2.\n- For this question, we will use a smaller subset of variable names. A variable starts with a lowercase letter, then zero or more lowercase letters or digits. Additionally, for your convenience, the names \"add\", \"let\", and \"mult\" are protected and will never be used as variable names.\n- Finally, there is the concept of scope. When an expression of a variable name is evaluated, within the context of that evaluation, the innermost scope (in terms of parentheses) is checked first for the value of that variable, and then outer scopes are checked sequentially. It is guaranteed that every expression is legal. Please see the examples for more details on the scope.\n\nExample 1:\n\nInput: expression = \"(let x 2 (mult x (let x 3 y 4 (add x y))))\"\nOutput: 14\nExplanation: In the expression (add x y), when checking for the value of the variable x,\nwe check from the innermost scope to the outermost in the context of the variable we are trying to evaluate.\nSince x = 3 is found first, the value of x is 3.\n\nExample 2:\n\nInput: expression = \"(let x 3 x 2 x)\"\nOutput: 2\nExplanation: Assignment in let statements is processed sequentially.\n\nExample 3:\n\nInput: expression = \"(let x 1 y 2 x (add x y) (add x y))\"\nOutput: 5\nExplanation: The first (add x y) evaluates as 3, and is assigned to x.\nThe second (add x y) evaluates as 3+2 = 5.\n\nConstraints:\n\n- 1 <= expression.length <= 2000\n- There are no leading or trailing spaces in expression.\n- All tokens are separated by a single space in expression.\n- The answer and all intermediate calculations of that answer are guaranteed to fit in a 32-bit integer.\n- The expression is guaranteed to be legal and evaluate to an integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(expression = \"(let x 2 (mult x (let x 3 y 4 (add x y))))\") == 14\n assert candidate(expression = \"(let x 7 (let y 2 (let z 3 (mult x (add y z)))))\") == 35\n assert candidate(expression = \"(mult (let x 2 (mult 3 x)) (let x 2 (add 4 x)))\") == 36\n assert candidate(expression = \"(let x 0 (let x 1 x) x)\") == 1\n assert candidate(expression = \"(add 1 2)\") == 3\n assert candidate(expression = \"(mult 3 4)\") == 12\n assert candidate(expression = \"(let a 5 (let b 6 (let c 7 (mult (add a b) (add b c)))))\") == 143\n assert candidate(expression = \"(let x 0 (let x 1 x))\") == 1\n assert candidate(expression = \"(mult (add 1 2) (add 3 4))\") == 21\n assert candidate(expression = \"(let x 0 (let x (add 1 x) (let x (mult x 2) x)))\") == 2\n assert candidate(expression = \"(mult (let x 2 (add x 2)) (let y 3 (mult y y)))\") == 36\n assert candidate(expression = \"(let x 1 y (add x 2) (mult x y))\") == 3\n assert candidate(expression = \"(let a 3 b (add a 1) c (mult a b) c)\") == 12\n assert candidate(expression = \"(let x 1 y 1 x (add x y) (add x y))\") == 3\n assert candidate(expression = \"(let x 1 y 2 x (add x y) (add x y))\") == 5\n assert candidate(expression = \"(let x 3 x 2 x)\") == 2\n assert candidate(expression = \"(let x 2 (mult 3 (let x 3 y 4 (add x y))))\") == 21\n assert candidate(expression = \"(let x 1 (add x (let x 2 (add x (let x 3 (add x 4)))))\") == 10\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (add x (add y z)))))\") == 6\n assert candidate(expression = \"(let x 1 (mult (let x 2 (add x 2)) x))\") == 4\n assert candidate(expression = \"(let x 7 (let y 2 (let x 3 (add x y))))\") == 5\n assert candidate(expression = \"(mult (let a 2 b 3 (add a b)) (let c 4 d 5 (mult c d)))\") == 100\n assert candidate(expression = \"(let x 7 (add x 3) (mult x 2))\") == 10\n assert candidate(expression = \"(let x (add 1 2) (mult x 3))\") == 9\n assert candidate(expression = \"(let x 2 (let y 3 (let z (add x y) (mult x z))))\") == 10\n assert candidate(expression = \"(let a1 3 b2 4 (add a1 b2))\") == 7\n assert candidate(expression = \"(let a1 3 b2 (add a1 1) b2)\") == 4\n assert candidate(expression = \"(let x 1 (let y (let z 3 (add z 2)) (mult x y)) (add x y))\") == 5\n assert candidate(expression = \"(let x (let y 2 (mult y 3)) (add x 5))\") == 11\n assert candidate(expression = \"(let x 5 y (add x 3) z (mult x y) (let w 7 (add w (mult x z))))\") == 207\n assert candidate(expression = \"(let m 8 n (add m 2) o (mult m n) p (add o n) (mult p m))\") == 720\n assert candidate(expression = \"(let a 1 b (let a (add a 1) (mult a a)) (add a b))\") == 5\n assert candidate(expression = \"(let a 1 b 2 c (mult a b) d (add a b) (mult c d))\") == 6\n assert candidate(expression = \"(let a 1 b (add a 1) c (mult a b) (add c (let a 2 (mult a b))))\") == 6\n assert candidate(expression = \"(mult (let x 2 (let y 3 (add x y))) (let x 4 (let y 5 (mult x y))))\") == 100\n assert candidate(expression = \"(let a 1 b 2 c (add a b) d (mult a c) (add d c))\") == 6\n assert candidate(expression = \"(let x 2 y 3 z (mult x y) (add (let x 5 (mult x y)) (let y 4 (add y z))))\") == 25\n assert candidate(expression = \"(mult (let x 5 y (mult x 2) (add y 3)) (let z 4 w (add z 1) (mult w 3)))\") == 195\n assert candidate(expression = \"(let a 5 b (add a 3) (mult a b))\") == 40\n assert candidate(expression = \"(let a 1 (let b (add a 1) (let c (mult b 2) (let d (add c 3) (let e (mult d 4) (add e 5)))))\") == 33\n assert candidate(expression = \"(let m 5 n 10 (let p (add m n) (mult p (let q (mult m n) (add q (let r (add p q) r)))))\") == 1725\n assert candidate(expression = \"(let x (mult 3 3) y (add 5 5) z (let w (mult x y) (add w 10)) (mult z x))\") == 900\n assert candidate(expression = \"(let a 1 b (let c (mult a a) d (add a a) (mult c d)) e (let f (mult b b) g (add b b) (mult f g)) (add e e))\") == 32\n assert candidate(expression = \"(let a 1 b (add a 1) c (mult b 2) d (add c 3) e (mult d 2) (add e (mult e (add d (mult c (add b a))))))\") == 280\n assert candidate(expression = \"(add (let x 5 (mult x 2)) (let y 3 (mult y 4)))\") == 22\n assert candidate(expression = \"(let a 10 (let b (mult a 2) (let c (add a b) (let d (mult b c) d))))\") == 600\n assert candidate(expression = \"(let m 2 (let n (mult m 3) (let o (add m n) (let p (mult m o) (add p (mult n o)))))\") == 64\n assert candidate(expression = \"(let x 5 (let y 3 (mult (add x y) (let z 2 (add z (mult x y)))))\") == 136\n assert candidate(expression = \"(let a (mult 2 3) b (add a 4) c (mult b a) d (add c b) (mult d c))\") == 4200\n assert candidate(expression = \"(let x 5 y 3 (let z (mult x y) (let w (add x z) (mult w (let v (add y z) v)))))\") == 360\n assert candidate(expression = \"(let x 1 (let y (add x 1) (let z (mult y 2) (let a (add z 3) (let b (mult a 4) (add (mult b 5) (let c (add b 6) (mult c 7)))))))\") == 378\n assert candidate(expression = \"(let a 1 b (add a 1) c (mult b 2) d (let e (add c b) (mult e a)) (add d (mult c a)))\") == 10\n assert candidate(expression = \"(mult (let x 2 (let y 3 (let z (add x y) (mult z 4)))) (let a 5 (let b 6 (let c (add a b) (mult c 7))))\") == 1540\n assert candidate(expression = \"(let x 7 y (mult x 2) z (add x y) (let w 3 (add w (mult x z))))\") == 150\n assert candidate(expression = \"(let x 1 y 2 (let x (add x y) y (mult x y) (let z (add x y) (mult x z))))\") == 27\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let a 4 (let b 5 (let c 6 (let d 7 (let e 8 (let f 9 (add x (mult y (add z (mult a (add b (mult c (add d (mult e f))))))))))))))))\") == 3839\n assert candidate(expression = \"(let x 10 (let y (add x 5) z (mult y 2) (let a (add z 3) b (mult a 4) (let c (add b 2) (mult c 5))))\") == 670\n assert candidate(expression = \"(let x 7 y (add x 2) z (mult x y) (let w (add y z) (mult w x)))\") == 504\n assert candidate(expression = \"(let x 5 y (add x 3) z (mult y 2) (let w (add x y) (mult w z)))\") == 208\n assert candidate(expression = \"(let x (let y (let z 3 (add z 1)) (mult y 2)) (mult x 5))\") == 40\n assert candidate(expression = \"(let x 10 (let y (mult x 3) (let z (add x y) (let w (mult y z) (let v (add w z) v)))))\") == 1240\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let w 4 (add (add x y) (add z w))))))\") == 10\n assert candidate(expression = \"(let a 2 b (mult a 3) c (add a b) d (mult b c) (add d c))\") == 56\n assert candidate(expression = \"(mult (add 1 2) (mult 3 4))\") == 36\n assert candidate(expression = \"(let x 5 y (add x 3) z (mult x y) (add z (let x 10 (mult x y))))\") == 120\n assert candidate(expression = \"(let x 10 y (add x 5) z (mult y 2) (let w (add x y) (mult w z)))\") == 750\n assert candidate(expression = \"(let x 5 (let y (add x 3) (mult x y)))\") == 40\n assert candidate(expression = \"(mult (let x 3 (let y 5 (add x y))) (let a 2 (mult a (let b 4 (add b 1))))\") == 80\n assert candidate(expression = \"(let x 5 y (let x 10 (add x 5)) z (mult y 2) (add z y))\") == 45\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let a (add x y) (let b (mult y z) (add (mult a b) (let c (add a b) (mult c 2)))))))\") == 36\n assert candidate(expression = \"(let x 1 (let y (let x 2 (let z 3 (add x z))) (mult x y)) (add x y))\") == 5\n assert candidate(expression = \"(let x 1 y 2 z 3 a (add x y) b (mult a z) c (add b a) d (mult c b) (add d c) e (mult d a) (add e b))\") == 120\n assert candidate(expression = \"(let x 5 (let y (let z 3 (add x z)) (mult x y)) (let w (add x y) (mult w x)))\") == 40\n assert candidate(expression = \"(let x 1 (let y (add x 1) (let z (mult y 2) (add x (add y z)))))\") == 7\n assert candidate(expression = \"(let a 1 b 2 c 3 (add (mult a b) (mult b c)))\") == 8\n assert candidate(expression = \"(let x 1 (let y (mult x 2) (let z (add y 3) (mult x (add y z)))))\") == 7\n assert candidate(expression = \"(let a 2 b (mult a 2) c (let d (add b 1) (mult d 3)) (add c (mult a b)))\") == 23\n assert candidate(expression = \"(let a 1 b 2 (add a b) (mult a b))\") == 3\n assert candidate(expression = \"(let x 7 (let y (add x 3) z (mult y 2) (let w (add z 5) (mult w y))))\") == 250\n assert candidate(expression = \"(let x 10 y (add x 5) z (mult y 2) (let w (add y z) (mult w x)))\") == 450\n assert candidate(expression = \"(let a 1 b 2 c 3 (add (mult a b) c))\") == 5\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let w 4 (mult (add x y) (mult z w))))))\") == 36\n assert candidate(expression = \"(mult (let x 3 (let y 4 (add x y))) (let x 6 (let y 7 (mult x y))))\") == 294\n assert candidate(expression = \"(let a 1 b 2 c 3 (let d (add a b) e (mult b c) (add d e)))\") == 9\n assert candidate(expression = \"(let a 1 (let b 2 (let a 3 (let b 4 (add (mult a b) (let a 5 (mult a b)))))))\") == 32\n assert candidate(expression = \"(let x 5 (let y (mult x 2) (let z (add y 3) (mult x z))))\") == 65\n assert candidate(expression = \"(add (mult 2 3) (let x 4 (mult x 5)))\") == 26\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let a (add x y) b (mult y z) c (add a b) d (mult b c) (let e (add c d) (mult d e)))))\") == 3402\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (let a (add x y) b (mult y z) c (add a b) (mult b c)))))\") == 54\n assert candidate(expression = \"(let x (let y (let z 3 (mult z z)) (add y 5)) (mult x x))\") == 196\n assert candidate(expression = \"(mult (let a 3 b (add a 2) c (mult b 2) (add c a)) (let d 4 e (mult d 3) (add e d)))\") == 208\n assert candidate(expression = \"(mult (let x 7 (let y 3 (add x y))) (let x 4 (let y 6 (mult x y))))\") == 240\n assert candidate(expression = \"(let x 2 (let y (let z 2 (add z z)) (mult x y)) (let a 3 (let b (mult a x) (add b (let c 4 (mult c x)))))\") == 8\n assert candidate(expression = \"(let x 1 y 2 (let z (add x y) (let w (mult x y) (let u (add z w) u))))\") == 5\n assert candidate(expression = \"(let a 1 (let b 2 (let c (add a b) (let d (mult b c) (mult c d))))\") == 18\n assert candidate(expression = \"(let a 1 b 2 c 3 d (add a b) e (add c d) (mult d (let a 5 (add a b))))\") == 21\n assert candidate(expression = \"(let x 10 (let y (mult x 2) (let z (add x y) (let w (mult y z) (add w z))))\") == 630\n assert candidate(expression = \"(let x 1 (let y (add x 1) (let z (mult y 2) (let w (add x z) (mult w (let v (mult z 2) v)))))\") == 40\n assert candidate(expression = \"(let x 5 y (add x 3) (mult x y))\") == 40\n assert candidate(expression = \"(let x 5 (let y 10 (let z (add x y) (mult z x))))\") == 75\n assert candidate(expression = \"(let x 10 y (let x 5 (add x 3)) z (mult x y) (add z y))\") == 88\n assert candidate(expression = \"(let x 1 y 2 z 3 a (add x y) b (mult a z) c (add b a) (mult c b))\") == 108\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (add (mult x y) z))))\") == 5\n assert candidate(expression = \"(let a 1 b 2 c (add a b) (mult c (let b 4 (add a b))))\") == 15\n assert candidate(expression = \"(let x 1 (let y 2 (let z 3 (add (mult x y) (add y z)))))\") == 7\n assert candidate(expression = \"(let a 1 b 2 c 3 d 4 e 5 (add (mult a b) (add (mult b c) (add (mult c d) (mult d e)))))\") == 40\n assert candidate(expression = \"(add (let a 1 b (add a 1) c (mult b 2) (add c a)) (let d 4 e (mult d 3) (add e d)))\") == 21\n assert candidate(expression = \"(let z (mult 3 4) w (add z 5) x (let y (mult z w) (add y z)) x)\") == 216\n assert candidate(expression = \"(let x 5 (add (mult x 2) (let x 3 (add (mult x 4) (let x 6 (mult x 7))))))\") == 64\n assert candidate(expression = \"(let x 5 (let y (add x 2) z (mult y 3) (let w (add z 4) (mult w x))))\") == 125\n assert candidate(expression = \"(let x (mult 2 3) y (add x 5) (let z (mult x y) (add z (mult x y))))\") == 132\n", "comparison": "exact"}, "public_tests": ["\"(let x 2 (mult x (let x 3 y 4 (add x y))))\"", "\"(let x 3 x 2 x)\"", "\"(let x 1 y 2 x (add x y) (add x y))\""], "hints": ["* If the expression starts with a digit or '-', it's an integer: return it. * If the expression starts with a letter, it's a variable. Recall it by checking the current scope in reverse order. * Otherwise, group the tokens (variables or expressions) within this expression by counting the \"balance\" `bal` of the occurrences of `'('` minus the number of occurrences of `')'`. When the balance is zero, we have ended a token. For example, `(add 1 (add 2 3))` should have tokens `'1'` and `'(add 2 3)'`. * For add and mult expressions, evaluate each token and return the addition or multiplication of them. * For let expressions, evaluate each expression sequentially and assign it to the variable in the current scope, then return the evaluation of the final expression."], "metadata": {"canonical_parameter_names": ["expression"], "leetcode_dataset_entry_point": "Solution().evaluate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:50+00:00", "tests_total": 111, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string", "stack", "recursion"]}, "language": "cpp", "interface": {"raw_signature": "int evaluate(string expression) {", "container": "Solution", "callable": "evaluate", "parameters": [{"name": "expression", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 738, "task_id": "monotone-increasing-digits", "difficulty": "Medium", "problem_description": "An integer has monotone increasing digits if and only if each pair of adjacent digits x and y satisfy x <= y.\n\nGiven an integer n, return the largest number that is less than or equal to n with monotone increasing digits.\n\nExample 1:\n\nInput: n = 10\nOutput: 9\n\nExample 2:\n\nInput: n = 1234\nOutput: 1234\n\nExample 3:\n\nInput: n = 332\nOutput: 299\n\nConstraints:\n\n- 0 <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 999999999) == 999999999\n assert candidate(n = 111) == 111\n assert candidate(n = 100) == 99\n assert candidate(n = 1000) == 999\n assert candidate(n = 222) == 222\n assert candidate(n = 333) == 333\n assert candidate(n = 33332) == 29999\n assert candidate(n = 1001) == 999\n assert candidate(n = 101010101) == 99999999\n assert candidate(n = 21212) == 19999\n assert candidate(n = 0) == 0\n assert candidate(n = 999) == 999\n assert candidate(n = 4321) == 3999\n assert candidate(n = 111111111) == 111111111\n assert candidate(n = 332) == 299\n assert candidate(n = 987654321) == 899999999\n assert candidate(n = 11111) == 11111\n assert candidate(n = 101010) == 99999\n assert candidate(n = 1234) == 1234\n assert candidate(n = 120) == 119\n assert candidate(n = 10) == 9\n assert candidate(n = 1203) == 1199\n assert candidate(n = 567898765) == 567889999\n assert candidate(n = 987898789) == 899999999\n assert candidate(n = 22221111) == 19999999\n assert candidate(n = 1232123) == 1229999\n assert candidate(n = 111000999) == 99999999\n assert candidate(n = 233221) == 229999\n assert candidate(n = 333333333) == 333333333\n assert candidate(n = 123456780) == 123456779\n assert candidate(n = 5000) == 4999\n assert candidate(n = 1000000000) == 999999999\n assert candidate(n = 66778899) == 66778899\n assert candidate(n = 199999999) == 199999999\n assert candidate(n = 11119999) == 11119999\n assert candidate(n = 43210) == 39999\n assert candidate(n = 657890) == 599999\n assert candidate(n = 100000000) == 99999999\n assert candidate(n = 199999) == 199999\n assert candidate(n = 565656565) == 559999999\n assert candidate(n = 33333222) == 29999999\n assert candidate(n = 444444444) == 444444444\n assert candidate(n = 999999998) == 899999999\n assert candidate(n = 1001001) == 999999\n assert candidate(n = 777777777) == 777777777\n assert candidate(n = 567891234) == 567889999\n assert candidate(n = 221332) == 199999\n assert candidate(n = 555555555) == 555555555\n assert candidate(n = 1234321) == 1233999\n assert candidate(n = 599) == 599\n assert candidate(n = 123321) == 122999\n assert candidate(n = 888888888) == 888888888\n assert candidate(n = 123454321) == 123449999\n assert candidate(n = 123456789) == 123456789\n assert candidate(n = 9631) == 8999\n assert candidate(n = 87654321) == 79999999\n assert candidate(n = 543212345) == 499999999\n assert candidate(n = 100100100) == 99999999\n assert candidate(n = 876543210) == 799999999\n assert candidate(n = 32123) == 29999\n assert candidate(n = 654321234) == 599999999\n assert candidate(n = 333222111) == 299999999\n assert candidate(n = 44444333) == 39999999\n assert candidate(n = 898989898) == 889999999\n assert candidate(n = 111000) == 99999\n assert candidate(n = 3214321) == 2999999\n assert candidate(n = 221122) == 199999\n assert candidate(n = 1000000) == 999999\n assert candidate(n = 543210987) == 499999999\n assert candidate(n = 1099) == 999\n assert candidate(n = 222222222) == 222222222\n assert candidate(n = 11112222) == 11112222\n assert candidate(n = 111111110) == 99999999\n assert candidate(n = 345678901) == 345678899\n assert candidate(n = 666666666) == 666666666\n assert candidate(n = 123000456) == 122999999\n assert candidate(n = 3456543) == 3455999\n assert candidate(n = 221122112) == 199999999\n assert candidate(n = 12344321) == 12339999\n assert candidate(n = 555444555) == 499999999\n assert candidate(n = 543210) == 499999\n assert candidate(n = 100100) == 99999\n", "comparison": "exact"}, "public_tests": ["10", "1234", "332"], "hints": ["Build the answer digit by digit, adding the largest possible one that would make the number still less than or equal to N."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().monotoneIncreasingDigits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:55+00:00", "tests_total": 111, "tests_dropped": 29, "flags": [], "topic_tags": ["math", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "int monotoneIncreasingDigits(int n) {", "container": "Solution", "callable": "monotoneIncreasingDigits", "parameters": [{"name": "n", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 739, "task_id": "daily-temperatures", "difficulty": "Medium", "problem_description": "Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the i^th day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.\n\nExample 1:\n\nInput: temperatures = [73,74,75,71,69,72,76,73]\nOutput: [1,1,4,2,1,1,0,0]\n\nExample 2:\n\nInput: temperatures = [30,40,50,60]\nOutput: [1,1,1,0]\n\nExample 3:\n\nInput: temperatures = [30,60,90]\nOutput: [1,1,0]\n\nConstraints:\n\n- 1 <= temperatures.length <= 10^5\n- 30 <= temperatures[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(temperatures = [80, 79, 78, 77, 76, 75, 74, 73]) == [0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [73, 74, 75, 71, 69, 72, 76, 73]) == [1, 1, 4, 2, 1, 1, 0, 0]\n assert candidate(temperatures = [40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 30, 30, 30]) == [0, 0, 0, 0]\n assert candidate(temperatures = [30, 35, 40, 45, 50, 55, 60, 65, 70, 75]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [70, 69, 68, 67, 71, 72, 73]) == [4, 3, 2, 1, 1, 1, 0]\n assert candidate(temperatures = [55, 38, 53, 81, 61, 93, 97, 32, 43, 78]) == [3, 1, 1, 2, 1, 1, 0, 1, 1, 0]\n assert candidate(temperatures = [70, 70, 70, 70, 70, 70, 70, 71]) == [7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [30, 35, 30, 40, 30, 50, 60]) == [1, 2, 1, 2, 1, 1, 0]\n assert candidate(temperatures = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [30, 40, 50, 60]) == [1, 1, 1, 0]\n assert candidate(temperatures = [30, 50, 40, 60, 55, 65, 70]) == [1, 2, 1, 2, 1, 1, 0]\n assert candidate(temperatures = [70, 70, 70, 71]) == [3, 2, 1, 0]\n assert candidate(temperatures = [30, 60, 90]) == [1, 1, 0]\n assert candidate(temperatures = [89, 62, 70, 58, 47, 47, 46, 76, 100, 70]) == [8, 1, 5, 4, 3, 2, 1, 1, 0, 0]\n assert candidate(temperatures = [70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 71]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [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, 74, 73]) == [1, 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]\n assert candidate(temperatures = [72, 68, 74, 73, 75, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89]) == [2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 50]) == [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0]\n assert candidate(temperatures = [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, 71]) == [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]\n assert candidate(temperatures = [80, 79, 81, 78, 82, 77, 83, 76, 84, 75, 85, 74, 86, 73, 87, 72, 88, 71, 89, 70]) == [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0]\n assert candidate(temperatures = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [31, 30, 33, 32, 35, 34, 37, 36, 39, 38, 41, 40, 43, 42, 45, 44, 47, 46, 49, 48]) == [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0]\n assert candidate(temperatures = [73, 74, 75, 71, 69, 72, 76, 73, 80, 85, 90, 100, 99, 98, 97, 96, 95, 94, 93, 92]) == [1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [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, 1, 1, 1, 1, 1, 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(temperatures = [30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90, 30, 60, 90]) == [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, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0]\n assert candidate(temperatures = [35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36]) == [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(temperatures = [90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 91]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [73, 69, 71, 68, 74, 72, 69, 75, 70, 76, 71, 77, 72, 78, 73, 79, 74, 80, 75, 81, 76, 82, 77, 83, 78, 84, 79, 85, 80, 86, 81]) == [4, 1, 2, 1, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0]\n assert candidate(temperatures = [80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 79, 81, 80, 82]) == [2, 1, 41, 2, 1, 38, 2, 1, 35, 2, 1, 32, 2, 1, 29, 2, 1, 26, 2, 1, 23, 2, 1, 20, 2, 1, 17, 2, 1, 14, 2, 1, 11, 2, 1, 8, 2, 1, 5, 2, 1, 2, 1, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 31]) == [7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [99, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 100]) == [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(temperatures = [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]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(temperatures = [70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 71]) == [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [73, 74, 75, 71, 69, 72, 76, 73, 69, 70, 74, 73, 72, 75, 71, 69, 72, 76, 73, 69, 70, 74, 73, 72, 75, 71, 69, 72, 76, 73, 69, 70, 74, 73, 72, 75, 71, 69, 72, 76, 73, 69, 70, 74, 73, 72]) == [1, 1, 4, 2, 1, 1, 0, 3, 1, 1, 3, 2, 1, 4, 2, 1, 1, 0, 3, 1, 1, 3, 2, 1, 4, 2, 1, 1, 0, 3, 1, 1, 3, 2, 1, 4, 2, 1, 1, 0, 3, 1, 1, 0, 0, 0]\n assert candidate(temperatures = [70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [60, 59, 61, 58, 62, 57, 63, 56, 64, 55, 65, 54, 66, 53, 67, 52, 68, 51, 69, 50]) == [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0]\n assert candidate(temperatures = [30, 31, 30, 32, 31, 33, 32, 34, 33, 35, 34, 36, 35, 37, 36, 38, 37, 39, 38, 40, 39, 41, 40, 42, 41, 43, 42, 44, 43, 45, 44, 46, 45, 47, 46, 48, 47, 49, 48, 50, 49, 51, 50, 52, 51, 53, 52, 54, 53, 55, 54, 56, 55, 57, 56, 58, 57, 59, 58, 60]) == [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, 0]\n assert candidate(temperatures = [71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [73, 74, 75, 71, 69, 72, 76, 73, 69, 72, 76, 73, 69, 72, 76, 73, 69, 72, 76, 73, 69, 72, 76, 73, 69, 72, 76, 73]) == [1, 1, 4, 2, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 0]\n assert candidate(temperatures = [80, 80, 80, 80, 80, 81, 79, 80, 80, 80, 82]) == [5, 4, 3, 2, 1, 5, 1, 3, 2, 1, 0]\n assert candidate(temperatures = [30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40, 30, 50, 60, 30, 35, 30, 40]) == [1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 2, 1, 1, 0, 1, 2, 1, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 30]) == [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0]\n assert candidate(temperatures = [80, 80, 80, 80, 80, 80, 80, 80, 80, 81]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [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]) == [0, 0, 0, 0, 0, 0, 0, 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(temperatures = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31]) == [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]\n assert candidate(temperatures = [73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 72]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 100, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 100, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 100, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [73, 72, 71, 70, 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]) == [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, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70]) == [0, 0, 0, 0, 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(temperatures = [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]) == [0, 0, 0, 0, 0, 0, 0, 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(temperatures = [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]) == [0, 0, 0, 0, 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(temperatures = [73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 80]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [50, 50, 50, 50, 50, 50, 50, 50, 50, 51]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(temperatures = [30, 31, 30, 33, 30, 35, 30, 37, 30, 39, 30, 41, 30, 43, 30, 45, 30, 47, 30, 49]) == [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0]\n assert candidate(temperatures = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [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]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(temperatures = [45, 44, 46, 43, 47, 42, 48, 41, 49, 40, 50, 39, 51, 38, 52, 37, 53, 36, 54, 35]) == [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 0, 0]\n assert candidate(temperatures = [30, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60, 90, 60]) == [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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]\n assert candidate(temperatures = [90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 100, 30, 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]\n assert candidate(temperatures = [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, 91]) == [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]\n assert candidate(temperatures = [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, 1, 1, 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(temperatures = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [70, 69, 68, 67, 66, 65, 64, 63, 62, 61]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30, 40, 50, 40, 30]) == [1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 3, 1, 1, 0, 0, 0]\n assert candidate(temperatures = [73, 74, 75, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73, 71, 69, 72, 76, 73]) == [1, 1, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 4, 2, 1, 1, 0, 0]\n assert candidate(temperatures = [70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(temperatures = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]\n assert candidate(temperatures = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n", "comparison": "exact"}, "public_tests": ["[73,74,75,71,69,72,76,73]", "[30,40,50,60]", "[30,60,90]"], "hints": ["If the temperature is say, 70 today, then in the future a warmer temperature must be either 71, 72, 73, ..., 99, or 100. We could remember when all of them occur next."], "metadata": {"canonical_parameter_names": ["temperatures"], "leetcode_dataset_entry_point": "Solution().dailyTemperatures", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:57+00:00", "tests_total": 107, "tests_dropped": 32, "flags": [], "topic_tags": ["array", "stack", "monotonic-stack"]}, "language": "cpp", "interface": {"raw_signature": "vector dailyTemperatures(vector& temperatures) {", "container": "Solution", "callable": "dailyTemperatures", "parameters": [{"name": "temperatures", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 740, "task_id": "delete-and-earn", "difficulty": "Medium", "problem_description": "You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times:\n\n- Pick any nums[i] and delete it to earn nums[i] points. Afterwards, you must delete every element equal to nums[i] - 1 and every element equal to nums[i] + 1.\n\nReturn the maximum number of points you can earn by applying the above operation some number of times.\n\nExample 1:\n\nInput: nums = [3,4,2]\nOutput: 6\nExplanation: You can perform the following operations:\n- Delete 4 to earn 4 points. Consequently, 3 is also deleted. nums = [2].\n- Delete 2 to earn 2 points. nums = [].\nYou earn a total of 6 points.\n\nExample 2:\n\nInput: nums = [2,2,3,3,3,4]\nOutput: 9\nExplanation: You can perform the following operations:\n- Delete a 3 to earn 3 points. All 2's and 4's are also deleted. nums = [3,3].\n- Delete a 3 again to earn 3 points. nums = [3].\n- Delete a 3 once more to earn 3 points. nums = [].\nYou earn a total of 9 points.\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^4\n- 1 <= nums[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2, 3, 5, 8, 13, 21]) == 50\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 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 20\n assert candidate(nums = [2, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 22\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 30\n assert candidate(nums = [2, 2, 3, 3, 3, 4]) == 9\n assert candidate(nums = [10000, 10000, 10000, 10000]) == 40000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [10000, 10000, 10000]) == 30000\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1]) == 16\n assert candidate(nums = [1, 10000]) == 10001\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 100\n assert candidate(nums = [1, 6, 3, 3, 8, 4, 8, 10]) == 39\n assert candidate(nums = [1, 2, 3, 4, 5]) == 9\n assert candidate(nums = [3, 4, 2]) == 6\n assert candidate(nums = [5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7]) == 48\n assert candidate(nums = [1, 6, 3, 3, 3, 3, 10, 5, 7]) == 35\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3]) == 12\n assert candidate(nums = [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]) == 16\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 110\n assert candidate(nums = [3, 1, 5, 6, 7, 4, 5, 5, 2, 3, 4, 5, 7, 8, 9, 10]) == 51\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 20\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 6, 7, 8, 9, 10]) == 35\n assert candidate(nums = [1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [10000]) == 10000\n assert candidate(nums = [1, 10, 100, 1000, 10000, 1, 10, 100, 1000, 10000, 1, 10, 100, 1000, 10000]) == 33333\n assert candidate(nums = [5, 3, 5, 5, 2, 4, 4, 4, 4, 4, 3, 2, 3, 5, 4]) == 29\n assert candidate(nums = [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 160\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10]) == 72\n assert candidate(nums = [8, 8, 7, 7, 7, 6, 5, 5, 5, 5, 4, 3, 3, 2, 1]) == 48\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 11000\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 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 100\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, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 10, 10, 10]) == 78\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 400\n assert candidate(nums = [10, 10, 10, 10, 10, 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]) == 310\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 1100\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, 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]) == 120\n assert candidate(nums = [2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10]) == 90\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]) == 90\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 15]) == 114\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]) == 625\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]) == 1058\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 64\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 165\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]) == 128\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 = [1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25]) == 190\n assert candidate(nums = [5, 5, 6, 6, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9]) == 78\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10]) == 76\n assert candidate(nums = [1, 10000, 10000, 10000, 10000, 10000]) == 50001\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8]) == 98\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]) == 650\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]) == 1260\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7]) == 62\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 60\n assert candidate(nums = [2, 2, 2, 3, 3, 3, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 81\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 236\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]) == 200\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 9, 10, 10]) == 86\n assert candidate(nums = [1, 10000, 2, 9999, 3, 9998, 4, 9997, 5, 9996, 6, 9995, 7, 9994, 8, 9993, 9, 9992, 10, 9991]) == 50010\n assert candidate(nums = [4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 19, 20, 20, 20]) == 184\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5]) == 20\n assert candidate(nums = [1, 100, 1000, 10000, 9999, 999, 99, 9, 8, 80, 800, 8000, 7, 70, 700, 7000, 6, 60, 600, 6000]) == 34427\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, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 34\n assert candidate(nums = [9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981, 9980]) == 99900\n assert candidate(nums = [5000, 5000, 5000, 5001, 5001, 5001, 5002, 5002, 5002, 5003, 5003, 5003, 5004, 5004, 5004, 5005, 5005, 5005, 5006, 5006, 5006, 5007, 5007, 5007]) == 60048\n assert candidate(nums = [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]) == 1650\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 35\n assert candidate(nums = [5, 7, 7, 7, 7, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 13, 13, 13, 13]) == 165\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, 6, 6]) == 68\n assert candidate(nums = [1, 2, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10]) == 126\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6]) == 58\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]) == 1350\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 120\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]) == 12000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 5530\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 420\n assert candidate(nums = [5, 6, 6, 6, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, 12, 12, 12]) == 194\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]) == 90\n assert candidate(nums = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500]) == 10000\n assert candidate(nums = [10, 10, 10, 11, 11, 12, 12, 12, 13, 14, 14, 15, 16, 17, 18, 18, 19, 20, 20, 20, 20, 20]) == 246\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]) == 165\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]) == 1210\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 169\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]) == 220\n assert candidate(nums = [2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10]) == 104\n assert candidate(nums = [2, 3, 6, 7, 10, 11, 12, 15, 16, 19, 20, 21, 24, 25, 26, 29, 30, 31, 34, 35, 36, 39, 40, 41, 44, 45, 46]) == 438\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55]) == 325\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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8]) == 107\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]) == 161\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]) == 3250\n assert candidate(nums = [3, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 233\n assert candidate(nums = [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]) == 144\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 60\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]) == 168\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]) == 110000\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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 220\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]) == 220\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 90\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4]) == 36\n assert candidate(nums = [3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9]) == 99\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]) == 155\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]) == 676\n assert candidate(nums = [3, 1, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10]) == 96\n assert candidate(nums = [2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10]) == 128\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 5500\n assert candidate(nums = [4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12]) == 142\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, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10]) == 182\n", "comparison": "exact"}, "public_tests": ["[3,4,2]", "[2,2,3,3,3,4]"], "hints": ["If you take a number, you might as well take them all. Keep track of what the value is of the subset of the input with maximum M when you either take or don't take M."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().deleteAndEarn", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:57:59+00:00", "tests_total": 115, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "hash-table", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int deleteAndEarn(vector& nums) {", "container": "Solution", "callable": "deleteAndEarn", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 741, "task_id": "cherry-pickup", "difficulty": "Hard", "problem_description": "You are given an n x n grid representing a field of cherries, each cell is one of three possible integers.\n\n- 0 means the cell is empty, so you can pass through,\n- 1 means the cell contains a cherry that you can pick up and pass through, or\n- -1 means the cell contains a thorn that blocks your way.\n\nReturn the maximum number of cherries you can collect by following the rules below:\n\n- Starting at the position (0, 0) and reaching (n - 1, n - 1) by moving right or down through valid path cells (cells with value 0 or 1).\n- After reaching (n - 1, n - 1), returning to (0, 0) by moving left or up through valid path cells.\n- When passing through a path cell containing a cherry, you pick it up, and the cell becomes an empty cell 0.\n- If there is no valid path between (0, 0) and (n - 1, n - 1), then no cherries can be collected.\n\nExample 1:\n\nInput: grid = [[0,1,-1],[1,0,-1],[1,1,1]]\nOutput: 5\nExplanation: The player started at (0, 0) and went down, down, right right to reach (2, 2).\n4 cherries were picked up during this single trip, and the matrix becomes [[0,1,-1],[0,0,-1],[0,0,0]].\nThen, the player went left, up, up, left to return home, picking up one more cherry.\nThe total number of cherries picked up is 5, and this is the maximum possible.\n\nExample 2:\n\nInput: grid = [[1,1,-1],[1,-1,1],[-1,1,1]]\nOutput: 0\n\nConstraints:\n\n- n == grid.length\n- n == grid[i].length\n- 1 <= n <= 50\n- grid[i][j] is -1, 0, or 1.\n- grid[0][0] != -1\n- grid[n - 1][n - 1] != -1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [[0, 1, -1], [1, 0, -1], [1, 1, 1]]) == 5\n assert candidate(grid = [[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, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 1]]) == 12\n assert candidate(grid = [[1, -1, -1, -1], [-1, 1, -1, -1], [-1, -1, 1, -1], [-1, -1, -1, 1]]) == 0\n assert candidate(grid = [[1, 1, -1], [1, -1, 1], [-1, 1, 1]]) == 0\n assert candidate(grid = [[1, 0, 0, 0, 1], [0, 0, -1, 0, 0], [0, 1, 1, -1, 0], [0, 0, -1, 0, 1], [0, 0, 0, 0, 0]]) == 4\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]]) == 16\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1], [1, 0, -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, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]]) == 24\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], [1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0]]) == 12\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]]) == 8\n assert candidate(grid = [[0, 1, 0, 1, 0], [0, 0, 1, 0, 0], [1, 0, 0, 1, 1], [0, 0, 1, 0, 0], [0, 1, 0, 1, 0]]) == 7\n assert candidate(grid = [[1, 0, 0, 1, 0], [0, -1, -1, 0, 0], [1, 0, 1, 0, 1], [-1, 0, 0, 1, 0], [0, 0, 1, 0, 1]]) == 7\n assert candidate(grid = [[1, 0, 1, -1, 0, 1, 0, 1], [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, -1, 1, -1, 1, -1, 1, -1], [0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1]]) == 14\n assert candidate(grid = [[0, 1, 1, 0, 0], [0, 0, 0, 1, 0], [0, 1, -1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0]]) == 5\n assert candidate(grid = [[1, 1, 0, 0, 1], [0, 1, -1, 1, 0], [0, 1, 0, 1, 0], [0, -1, 1, 0, 0], [1, 0, 0, 0, 1]]) == 8\n assert candidate(grid = [[1, 0, 0, 0, 1, 1], [0, 0, -1, 0, 0, 0], [0, 0, 0, 0, -1, 0], [1, 1, 0, -1, 0, 0], [0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0]]) == 9\n assert candidate(grid = [[0, 1, 1, 0, 0], [0, 0, 1, 0, 1], [0, 0, 0, 1, 0], [1, 1, 0, 1, 0], [0, 1, 0, 1, 0]]) == 9\n assert candidate(grid = [[1, 1, 1, 0, 0], [0, 0, 1, 1, 1], [0, 1, -1, 1, 0], [0, 0, 0, 0, 0], [0, 0, 1, 1, 1]]) == 10\n assert candidate(grid = [[1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1]]) == 18\n assert candidate(grid = [[1, 1, 0, 0, 0], [1, -1, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 0, 0, 1, 1]]) == 10\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 = [[1, 1, 1, 0, 0, 0], [0, -1, 0, 1, 0, 0], [0, 0, 0, 0, -1, 0], [0, 0, -1, 0, 0, 1], [0, 0, 0, -1, 0, 0], [0, 0, 0, 0, 0, 1]]) == 6\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]]) == 8\n assert candidate(grid = [[1, 1, 0, 1, 1], [0, 0, 0, 0, 0], [1, 0, 1, 0, 1], [0, 0, 0, 0, 0], [1, 1, 0, 1, 1]]) == 10\n assert candidate(grid = [[1, 1, 0, 0, 0], [0, 0, 0, 1, 1], [0, 1, -1, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 1]]) == 8\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [0, -1, 0, -1, 0, -1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, -1, 0, -1, 0, -1], [1, 1, 1, 1, 1, 1]]) == 15\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]]) == 12\n assert candidate(grid = [[1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1]]) == 9\n assert candidate(grid = [[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], [0, 1, 0, 1, 0, 1, 0, 1]]) == 14\n assert candidate(grid = [[1, 1, 0, 0, 0, 1], [1, 1, 1, -1, 0, 0], [0, -1, 1, 0, 0, 0], [0, 0, 0, 0, -1, 0], [0, 0, -1, 0, 1, 1], [0, 0, 0, 0, 0, 1]]) == 10\n assert candidate(grid = [[1, 1, 0, 0, -1], [0, 1, 0, 1, 0], [1, 0, 1, -1, 1], [0, -1, 0, 1, 0], [0, 0, 1, 1, 0]]) == 9\n assert candidate(grid = [[1, 1, 1, -1, -1], [0, 1, 0, 0, 1], [0, 0, 0, 1, 0], [1, -1, 0, 0, 1], [1, 0, 1, 0, 1]]) == 9\n assert candidate(grid = [[1, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 1, -1, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 1]]) == 6\n assert candidate(grid = [[1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1]]) == 6\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, 0, -1, 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]]) == 20\n assert candidate(grid = [[0, 1, 1, 1, 0], [1, 0, -1, 0, 1], [1, -1, 1, -1, 1], [0, 1, -1, 1, 0], [1, 1, 1, 0, 1]]) == 11\n assert candidate(grid = [[0, 1, 1, 0, 1, -1], [1, 0, -1, 0, 1, 0], [1, 0, 1, 0, 1, 1], [0, 1, 1, 1, 0, 1], [0, 0, 1, -1, 1, 1], [1, 0, 1, 1, 1, 0]]) == 16\n assert candidate(grid = [[1, 1, 0, 0, 0], [1, 0, -1, 0, 1], [0, 0, 1, 0, 0], [0, 1, 0, -1, 0], [0, 0, 0, 1, 1]]) == 7\n assert candidate(grid = [[1, 1, 0, 1, 1], [1, -1, -1, 1, 1], [0, 1, 0, -1, 1], [1, 0, 0, 1, 0], [1, 1, 1, 1, 0]]) == 12\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]]) == 22\n assert candidate(grid = [[1, -1, 1, -1, 1, -1], [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]]) == 10\n assert candidate(grid = [[1, 1, 0, 0, 0, 0], [1, -1, 1, 1, -1, 1], [0, 1, -1, 0, 1, 0], [0, 0, 1, 0, 0, 0], [0, -1, 0, 0, 1, 0], [1, 1, 0, 0, 0, 1]]) == 10\n assert candidate(grid = [[0, 1, 0, 0, 0, 1, 0], [0, 0, 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, 0, 0], [0, 1, 0, 0, 0, 1, 0]]) == 10\n assert candidate(grid = [[0, 1, 0, 0, 0, 0, 1], [0, 0, 0, 1, -1, 0, 0], [0, 1, 1, -1, 1, 1, 0], [0, 0, -1, 1, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0, 0]]) == 8\n assert candidate(grid = [[1, 1, 1, 0, 1], [1, 0, 1, 1, 1], [1, 1, -1, 1, 1], [0, 0, 1, 0, 1], [1, 1, 1, 0, 1]]) == 14\n assert candidate(grid = [[1, 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, -1, 0, 0], [0, 0, 0, 0, 0, 1]]) == 2\n assert candidate(grid = [[0, 1, -1, -1, 0], [1, 0, 1, 0, 1], [-1, 1, 0, 1, -1], [0, 1, -1, 1, 0], [0, 0, 0, 0, 0]]) == 7\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, -1, 0, -1, 0, 1], [1, 0, -1, 0, -1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == 24\n assert candidate(grid = [[1, 1, 0, 0, 0, 1, 1], [1, 0, -1, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 0], [0, 1, 0, -1, 0, 1, 0], [0, 0, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1]]) == 13\n assert candidate(grid = [[1, -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], [1, -1, 1, -1, 1, -1, 1], [0, 0, 0, 0, 0, 0, 0], [1, -1, 1, -1, 1, -1, 1]]) == 6\n assert candidate(grid = [[1, 1, 1, 0, -1], [0, 0, 1, 1, 0], [-1, 1, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]]) == 10\n assert candidate(grid = [[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]]) == 6\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 1], [0, -1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, -1, 0, 0], [0, 0, 0, -1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 0, 0, 0]]) == 3\n assert candidate(grid = [[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]]) == 6\n assert candidate(grid = [[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]]) == 16\n assert candidate(grid = [[1, 0, 0, 0, -1], [0, -1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, -1, 0, 1], [0, 0, 0, 1, 1]]) == 5\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, -1, 0, 0, 0, 1], [1, 0, 0, -1, 0, 1], [1, 0, -1, 0, 0, 1], [1, 0, 0, 0, -1, 1], [1, 1, 1, 1, 1, 1]]) == 20\n assert candidate(grid = [[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1]]) == 6\n assert candidate(grid = [[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]]) == 8\n assert candidate(grid = [[0, 1, 0, 0, 1, -1], [0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1], [-1, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1]]) == 9\n assert candidate(grid = [[0, 0, 0, 0, 0], [1, -1, 1, 1, 0], [0, 1, 1, -1, 1], [1, -1, 1, 0, 0], [0, 1, 0, 1, 1]]) == 9\n assert candidate(grid = [[1, 0, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [1, 0, 0, 0, 1]]) == 4\n assert candidate(grid = [[0, 1, 1, 0, 0, 0], [0, 1, -1, 0, 1, 0], [0, 0, 1, 0, 0, 1], [0, 1, 0, -1, 0, 1], [0, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 0]]) == 9\n assert candidate(grid = [[1, -1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0], [1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0]]) == 9\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 1, 1, 0], [1, 1, 0, 0, 0, 1, 0, 0, 1], [0, 0, -1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 1, -1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 0, 0, 0]]) == 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]]) == 17\n assert candidate(grid = [[0, 0, 0, 1, 0], [0, -1, 0, 0, 0], [0, 1, -1, 0, 0], [0, -1, 0, 0, 0], [0, 0, 0, 0, 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, 1]]) == 2\n assert candidate(grid = [[1, 0, 1, 0, 0], [0, 0, 0, 1, 0], [1, 0, 0, 0, 1], [0, 1, 0, 0, 0], [0, 0, 1, 0, 1]]) == 8\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]]) == 16\n assert candidate(grid = [[1, 0, 0, 0, 1], [0, 0, -1, 0, 0], [0, -1, 0, -1, 0], [0, 0, -1, 0, 0], [1, 0, 0, 0, 1]]) == 4\n assert candidate(grid = [[1, 1, 0, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 1], [0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 1, 1]]) == 16\n assert candidate(grid = [[0, 1, 1, 0, 1], [1, 0, 1, 0, 1], [1, 1, 1, 0, 1], [0, 1, 0, 1, 1], [1, 1, 0, 0, 1]]) == 12\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, 0, 1, 0, 1]]) == 16\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]]) == 16\n assert candidate(grid = [[1, 0, 1, 0, 0, 0, 1], [0, 1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0, 1], [1, 0, 0, 0, 1, 0, 1]]) == 10\n", "comparison": "exact"}, "public_tests": ["[[0,1,-1],[1,0,-1],[1,1,1]]", "[[1,1,-1],[1,-1,1],[-1,1,1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().cherryPickup", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:02+00:00", "tests_total": 77, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "int cherryPickup(vector>& grid) {", "container": "Solution", "callable": "cherryPickup", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 743, "task_id": "network-delay-time", "difficulty": "Medium", "problem_description": "You are given a network of n nodes, labeled from 1 to n. You are also given times, a list of travel times as directed edges times[i] = (u_i, v_i, w_i), where u_i is the source node, v_i is the target node, and w_i is the time it takes for a signal to travel from source to target.\n\nWe will send a signal from a given node k. Return the minimum time it takes for all the n nodes to receive the signal. If it is impossible for all the n nodes to receive the signal, return -1.\n\nExample 1:\n\nInput: times = [[2,1,1],[2,3,1],[3,4,1]], n = 4, k = 2\nOutput: 2\n\nExample 2:\n\nInput: times = [[1,2,1]], n = 2, k = 1\nOutput: 1\n\nExample 3:\n\nInput: times = [[1,2,1]], n = 2, k = 2\nOutput: -1\n\nConstraints:\n\n- 1 <= k <= n <= 100\n- 1 <= times.length <= 6000\n- times[i].length == 3\n- 1 <= u_i, v_i <= n\n- u_i != v_i\n- 0 <= w_i <= 100\n- All the pairs (u_i, v_i) are unique. (i.e., no multiple edges.)\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(times = [[1, 2, 10], [2, 3, 10], [1, 3, 1]],n = 3,k = 1) == 10\n assert candidate(times = [[1, 2, 1]],n = 2,k = 1) == 1\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [1, 3, 4]],n = 3,k = 1) == 3\n assert candidate(times = [[3, 1, 5], [3, 2, 2], [2, 1, 2], [3, 4, 1], [4, 5, 1], [5, 3, 1], [1, 5, 4]],n = 5,k = 3) == 4\n assert candidate(times = [[1, 3, 1], [2, 1, 3], [2, 3, 1]],n = 3,k = 2) == 3\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 3, 1], [2, 4, 1], [3, 4, 1], [4, 5, 1]],n = 5,k = 1) == 3\n assert candidate(times = [[1, 2, 1]],n = 2,k = 2) == -1\n assert candidate(times = [[1, 2, 1], [2, 3, 7], [1, 3, 4], [2, 1, 2]],n = 3,k = 2) == 6\n assert candidate(times = [[3, 1, 5], [3, 2, 5], [3, 5, 2], [2, 1, 2], [2, 4, 1], [4, 3, 1], [5, 4, 1], [4, 5, 3], [4, 1, 6]],n = 5,k = 3) == 5\n assert candidate(times = [[1, 2, 1], [2, 1, 3]],n = 2,k = 1) == 1\n assert candidate(times = [[2, 1, 1], [2, 3, 1], [3, 4, 1]],n = 4,k = 2) == 2\n assert candidate(times = [[3, 1, 5], [3, 2, 5], [1, 2, 2], [2, 1, 3], [4, 3, 1]],n = 4,k = 3) == -1\n assert candidate(times = [[3, 1, 5], [3, 2, 2], [2, 1, 2], [3, 4, 1], [4, 5, 1], [5, 2, 5]],n = 5,k = 3) == 4\n assert candidate(times = [[1, 2, 10], [1, 3, 5], [1, 4, 8], [2, 3, 2], [2, 4, 6], [3, 4, 1]],n = 4,k = 1) == 10\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 1, 5]],n = 5,k = 1) == 10\n assert candidate(times = [[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], [2, 10, 1], [3, 10, 2], [4, 10, 3], [5, 10, 4], [6, 10, 5], [7, 10, 6], [8, 10, 7], [9, 10, 8]],n = 10,k = 1) == 8\n assert candidate(times = [[1, 2, 1], [1, 3, 4], [2, 4, 2], [3, 4, 3], [4, 5, 3]],n = 5,k = 1) == 6\n assert candidate(times = [[1, 2, 10], [1, 3, 10], [1, 4, 10], [1, 5, 10], [1, 6, 10], [1, 7, 10], [1, 8, 10], [1, 9, 10], [1, 10, 10]],n = 10,k = 1) == 10\n assert candidate(times = [[1, 2, 10], [1, 3, 20], [2, 4, 5], [3, 5, 10], [4, 6, 20], [5, 7, 30], [6, 8, 40], [7, 9, 50], [8, 10, 60]],n = 10,k = 1) == 135\n assert candidate(times = [[1, 2, 1], [1, 3, 4], [1, 4, 5], [2, 3, 2], [2, 4, 4], [3, 4, 1], [4, 5, 3], [5, 6, 2], [6, 7, 1]],n = 7,k = 1) == 10\n assert candidate(times = [[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]],n = 13,k = 1) == 780\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 1], [3, 4, 2], [4, 5, 1], [2, 5, 2], [3, 5, 3]],n = 5,k = 1) == 3\n assert candidate(times = [[1, 2, 3], [1, 3, 5], [2, 3, 1], [3, 4, 4], [4, 5, 3], [5, 6, 2], [6, 7, 1], [7, 8, 5], [8, 9, 3], [9, 10, 2]],n = 10,k = 1) == 24\n assert candidate(times = [[1, 2, 2], [1, 3, 3], [2, 4, 5], [2, 5, 4], [3, 4, 1], [3, 5, 2], [4, 6, 3], [5, 6, 3], [6, 7, 4], [6, 8, 5], [7, 9, 6], [8, 9, 5], [9, 10, 7]],n = 10,k = 1) == 24\n assert candidate(times = [[1, 2, 5], [2, 3, 3], [3, 4, 2], [4, 5, 1], [5, 6, 1], [6, 7, 2], [7, 8, 3], [8, 9, 4], [9, 10, 5]],n = 10,k = 1) == 26\n assert candidate(times = [[1, 2, 10], [1, 3, 20], [1, 4, 30], [1, 5, 40], [1, 6, 50], [1, 7, 60], [1, 8, 70], [1, 9, 80], [1, 10, 90]],n = 10,k = 1) == 90\n assert candidate(times = [[1, 2, 1], [2, 3, 1], [3, 4, 1], [4, 5, 1], [5, 1, 1], [2, 4, 1], [3, 5, 1], [4, 1, 1], [5, 2, 1]],n = 5,k = 1) == 3\n assert candidate(times = [[1, 2, 10], [2, 3, 10], [3, 4, 10], [4, 5, 10], [5, 6, 10], [6, 7, 10], [7, 8, 10], [8, 9, 10], [9, 10, 10], [1, 10, 1]],n = 10,k = 1) == 80\n assert candidate(times = [[1, 2, 30], [2, 3, 40], [3, 4, 50], [4, 5, 60], [5, 1, 20]],n = 5,k = 5) == 140\n assert candidate(times = [[1, 2, 4], [1, 3, 2], [2, 4, 7], [2, 5, 3], [3, 4, 5], [3, 5, 4], [4, 6, 2], [5, 6, 3]],n = 6,k = 1) == 9\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 11, 10], [11, 12, 11], [12, 13, 12], [13, 14, 13], [14, 1, 14]],n = 14,k = 1) == 91\n assert candidate(times = [[1, 2, 1], [2, 3, 1], [3, 4, 1], [4, 5, 1], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 11, 1], [11, 12, 1], [12, 13, 1], [13, 14, 1], [14, 15, 1]],n = 15,k = 1) == 14\n assert candidate(times = [[1, 2, 3], [1, 3, 4], [2, 4, 5], [3, 5, 10], [4, 6, 2], [5, 7, 3], [6, 8, 1], [7, 9, 4], [8, 10, 5]],n = 10,k = 1) == 21\n assert candidate(times = [[1, 2, 10], [2, 3, 20], [3, 4, 30], [4, 5, 40], [5, 1, 50]],n = 5,k = 1) == 100\n assert candidate(times = [[1, 2, 10], [1, 3, 4], [2, 3, 3], [2, 5, 2], [3, 5, 1], [3, 4, 5], [4, 5, 6], [5, 6, 1]],n = 6,k = 1) == 10\n assert candidate(times = [[1, 2, 4], [1, 3, 2], [2, 3, 3], [2, 4, 1], [3, 4, 2], [4, 5, 5], [4, 6, 3], [5, 6, 2]],n = 6,k = 1) == 9\n assert candidate(times = [[1, 2, 1], [2, 3, 1], [3, 1, 1], [1, 4, 1], [4, 5, 1], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1]],n = 10,k = 1) == 7\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 1, 5], [6, 7, 1], [7, 8, 2], [8, 9, 3], [9, 10, 4], [10, 6, 5]],n = 10,k = 1) == -1\n assert candidate(times = [[1, 2, 4], [2, 3, 6], [1, 3, 5], [3, 4, 2], [4, 5, 1], [5, 6, 3], [6, 7, 4], [7, 1, 8]],n = 7,k = 1) == 15\n assert candidate(times = [[1, 2, 2], [1, 3, 1], [3, 2, 1], [2, 4, 3], [3, 4, 4], [4, 5, 5], [5, 3, 6]],n = 5,k = 1) == 10\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 1], [2, 5, 1], [3, 4, 1], [3, 5, 1], [4, 6, 1], [4, 7, 1], [5, 6, 1], [5, 7, 1], [6, 8, 1], [6, 9, 1], [7, 8, 1], [7, 9, 1], [8, 10, 1], [9, 10, 1], [10, 1, 10]],n = 10,k = 1) == 5\n assert candidate(times = [[1, 2, 10], [2, 3, 20], [3, 4, 10], [4, 5, 20], [1, 3, 5], [3, 1, 5]],n = 5,k = 1) == 35\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 1, 9]],n = 9,k = 1) == 36\n assert candidate(times = [[1, 2, 10], [2, 3, 20], [3, 4, 30], [4, 5, 40], [5, 6, 50], [6, 7, 60], [7, 8, 70], [8, 1, 80]],n = 8,k = 1) == 280\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 1], [3, 4, 1], [4, 5, 1], [1, 5, 1], [2, 5, 1], [3, 5, 1], [4, 1, 1], [5, 1, 1]],n = 5,k = 1) == 2\n assert candidate(times = [[1, 2, 100], [2, 3, 99], [3, 4, 98], [4, 5, 97], [5, 6, 96], [6, 7, 95], [7, 8, 94], [8, 9, 93], [9, 10, 92]],n = 10,k = 1) == 864\n assert candidate(times = [[1, 2, 10], [2, 3, 5], [1, 3, 15], [3, 4, 10], [2, 4, 8], [4, 5, 2], [5, 6, 5], [6, 1, 7]],n = 6,k = 1) == 25\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 3], [2, 5, 4], [3, 6, 5], [3, 7, 6], [4, 8, 7], [4, 9, 8], [5, 10, 9], [5, 11, 10], [6, 12, 11], [7, 12, 12]],n = 12,k = 1) == 18\n assert candidate(times = [[1, 2, 2], [2, 3, 3], [3, 4, 4], [4, 5, 5], [1, 5, 10], [5, 1, 10]],n = 5,k = 1) == 10\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 1, 5], [2, 5, 1], [3, 1, 2], [4, 2, 3], [5, 3, 4]],n = 5,k = 1) == 6\n assert candidate(times = [[1, 2, 2], [2, 3, 4], [3, 4, 6], [4, 5, 8], [5, 6, 10], [6, 7, 12], [7, 8, 14], [8, 9, 16], [9, 10, 18], [10, 1, 20]],n = 10,k = 1) == 90\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [1, 4, 1], [1, 5, 1], [2, 3, 1], [2, 4, 1], [2, 5, 1], [3, 4, 1], [3, 5, 1], [4, 5, 1]],n = 5,k = 1) == 1\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 1, 10]],n = 10,k = 10) == 45\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 1, 10]],n = 10,k = 1) == 45\n assert candidate(times = [[1, 2, 2], [1, 3, 4], [1, 4, 1], [2, 3, 1], [2, 4, 5], [3, 4, 2], [4, 5, 3], [5, 6, 2], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 11, 1], [11, 12, 1], [12, 1, 1], [1, 5, 2]],n = 12,k = 1) == 10\n assert candidate(times = [[1, 2, 100], [1, 3, 200], [2, 4, 50], [2, 5, 150], [3, 5, 100], [4, 6, 200], [5, 7, 250], [6, 8, 300], [7, 9, 350], [8, 10, 400]],n = 10,k = 1) == 1050\n assert candidate(times = [[1, 2, 10], [2, 1, 10], [1, 3, 20], [3, 1, 20], [2, 4, 30], [4, 2, 30], [3, 4, 40], [4, 3, 40], [1, 4, 60], [4, 1, 60]],n = 4,k = 1) == 40\n assert candidate(times = [[1, 2, 10], [1, 3, 3], [2, 3, 1], [2, 4, 5], [3, 4, 2], [3, 5, 8], [4, 5, 7], [5, 6, 1]],n = 6,k = 1) == 12\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 1], [3, 4, 1], [4, 5, 1], [2, 5, 1], [3, 5, 1], [4, 1, 1], [5, 1, 1], [1, 4, 1]],n = 5,k = 2) == 3\n assert candidate(times = [[1, 2, 10], [2, 3, 10], [3, 4, 10], [4, 5, 10], [5, 6, 10], [6, 7, 10], [7, 8, 10], [8, 9, 10], [9, 10, 10], [10, 1, 10]],n = 10,k = 1) == 90\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [1, 4, 3], [2, 3, 1], [2, 4, 2], [3, 4, 1], [4, 5, 1]],n = 5,k = 1) == 4\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 1, 2], [2, 4, 3], [4, 5, 4], [5, 2, 3]],n = 5,k = 1) == 8\n assert candidate(times = [[1, 2, 1], [2, 3, 1], [3, 4, 1], [4, 5, 1], [5, 1, 1], [1, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1]],n = 10,k = 1) == 5\n assert candidate(times = [[1, 2, 10], [1, 3, 10], [2, 4, 10], [2, 5, 10], [3, 6, 10], [3, 7, 10], [4, 8, 10], [4, 9, 10], [5, 10, 10], [5, 11, 10], [6, 12, 10], [6, 13, 10]],n = 13,k = 1) == 30\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 1], [2, 5, 1], [3, 4, 1], [3, 5, 1], [4, 6, 1], [4, 7, 1], [5, 6, 1], [5, 7, 1], [6, 8, 1], [6, 9, 1], [7, 8, 1], [7, 9, 1], [8, 10, 1], [9, 10, 1]],n = 10,k = 1) == 5\n assert candidate(times = [[1, 2, 1], [1, 3, 4], [2, 3, 2], [3, 4, 1], [4, 5, 2], [2, 4, 3], [5, 4, 5], [4, 2, 2]],n = 5,k = 1) == 6\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [1, 4, 1], [1, 5, 1], [2, 3, 2], [2, 4, 2], [2, 5, 2], [3, 4, 3], [3, 5, 3], [4, 5, 4]],n = 5,k = 1) == 1\n assert candidate(times = [[1, 2, 10], [2, 3, 10], [3, 4, 10], [4, 5, 10], [5, 6, 10], [6, 7, 10], [7, 8, 10], [8, 9, 10], [9, 10, 10]],n = 10,k = 1) == 90\n assert candidate(times = [[1, 2, 5], [1, 4, 10], [2, 3, 10], [2, 4, 30], [3, 4, 5], [3, 5, 15], [4, 5, 10], [5, 6, 5], [6, 7, 10], [7, 8, 15], [8, 9, 20], [9, 10, 25]],n = 10,k = 3) == -1\n assert candidate(times = [[1, 2, 3], [1, 3, 5], [2, 3, 1], [2, 4, 4], [3, 4, 2], [4, 5, 3], [5, 6, 2], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 11, 1], [11, 12, 1], [12, 1, 1]],n = 12,k = 1) == 17\n assert candidate(times = [[1, 2, 4], [2, 3, 3], [3, 4, 2], [4, 5, 1], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 1, 8]],n = 8,k = 1) == 28\n assert candidate(times = [[1, 4, 2], [1, 2, 4], [2, 3, 3], [3, 4, 1], [4, 5, 2], [5, 6, 1], [6, 7, 5], [7, 8, 3], [8, 9, 2], [9, 10, 1]],n = 10,k = 1) == 16\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [1, 4, 3], [2, 3, 4], [2, 4, 5], [3, 4, 6], [4, 5, 7], [5, 6, 8], [6, 7, 9], [7, 8, 10]],n = 8,k = 1) == 37\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 1, 10]],n = 10,k = 5) == 51\n assert candidate(times = [[1, 2, 10], [2, 3, 9], [3, 4, 8], [4, 5, 7], [5, 6, 6], [6, 7, 5], [7, 8, 4], [8, 9, 3], [9, 10, 2], [10, 1, 1]],n = 10,k = 1) == 54\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 1, 10], [1, 3, 15], [3, 5, 20], [5, 7, 25], [7, 9, 30], [9, 11, 35]],n = 11,k = 1) == 71\n assert candidate(times = [[1, 2, 3], [1, 3, 2], [2, 3, 4], [2, 4, 5], [3, 4, 2], [3, 5, 3], [4, 5, 1], [5, 1, 1]],n = 5,k = 1) == 5\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 1, 5], [1, 3, 3], [3, 5, 1]],n = 5,k = 1) == 6\n assert candidate(times = [[1, 2, 5], [2, 3, 3], [3, 4, 1], [4, 5, 2], [5, 6, 4], [6, 7, 3], [7, 8, 2], [8, 9, 1], [9, 10, 5]],n = 10,k = 1) == 26\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 3], [2, 5, 4], [3, 4, 5], [3, 5, 6], [4, 5, 7], [5, 6, 8], [5, 7, 9], [6, 7, 10]],n = 7,k = 1) == 14\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 11, 10], [11, 12, 11], [12, 13, 12], [13, 14, 13], [14, 15, 14], [15, 1, 15]],n = 15,k = 1) == 105\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 11, 10], [11, 12, 11], [12, 13, 12], [13, 14, 13], [14, 15, 14], [15, 16, 15], [16, 17, 16], [17, 18, 17], [18, 19, 18], [19, 20, 19]],n = 20,k = 1) == 190\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9]],n = 10,k = 1) == 45\n assert candidate(times = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8], [9, 10, 9], [10, 11, 10], [11, 12, 11], [12, 13, 12], [13, 14, 13]],n = 14,k = 1) == 91\n assert candidate(times = [[1, 2, 3], [1, 3, 2], [1, 4, 5], [2, 3, 1], [2, 5, 4], [3, 4, 6], [3, 5, 2], [4, 5, 3], [5, 6, 1]],n = 6,k = 1) == 5\n assert candidate(times = [[1, 2, 1], [1, 3, 4], [2, 3, 2], [3, 4, 1], [4, 5, 1], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 1, 1]],n = 10,k = 1) == 10\n assert candidate(times = [[1, 4, 2], [1, 5, 4], [2, 1, 4], [2, 4, 1], [3, 1, 3], [3, 2, 2], [4, 3, 3], [4, 5, 1], [5, 1, 1], [5, 2, 5]],n = 5,k = 4) == 5\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 1], [3, 4, 1], [4, 5, 1], [2, 5, 2], [3, 5, 2], [4, 1, 2], [5, 1, 2], [1, 4, 2], [2, 3, 2]],n = 5,k = 1) == 3\n assert candidate(times = [[1, 2, 10], [1, 3, 3], [1, 4, 20], [2, 5, 15], [3, 2, 20], [3, 4, 5], [4, 3, 5], [4, 5, 7], [5, 6, 20], [6, 7, 15], [7, 8, 10], [8, 9, 15], [9, 10, 20]],n = 10,k = 1) == 95\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 2], [2, 5, 2], [3, 4, 3], [3, 5, 3], [4, 6, 4], [4, 7, 4], [5, 6, 5], [5, 7, 5], [6, 8, 6], [6, 9, 6], [7, 8, 7], [7, 9, 7], [8, 10, 8], [9, 10, 8]],n = 10,k = 1) == 21\n assert candidate(times = [[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, 1, 100]],n = 10,k = 1) == 450\n assert candidate(times = [[1, 2, 1], [1, 3, 4], [2, 3, 2], [2, 4, 5], [3, 4, 1], [4, 5, 3], [5, 6, 2], [6, 7, 4], [7, 8, 3], [8, 9, 1], [9, 10, 5]],n = 10,k = 1) == 22\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 3], [2, 5, 4], [3, 4, 2], [3, 5, 3], [4, 6, 5], [4, 7, 6], [5, 6, 4], [5, 7, 5], [6, 8, 7], [7, 8, 8]],n = 8,k = 1) == 16\n assert candidate(times = [[1, 2, 1], [1, 3, 1], [2, 4, 1], [3, 4, 1], [4, 5, 1], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 11, 1], [11, 12, 1], [12, 13, 1], [13, 14, 1], [14, 15, 1]],n = 15,k = 1) == 13\n assert candidate(times = [[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]],n = 10,k = 1) == 540\n assert candidate(times = [[1, 2, 10], [2, 3, 20], [1, 3, 40], [2, 4, 30], [3, 5, 50], [4, 6, 60], [5, 7, 70], [6, 8, 80], [7, 9, 90], [8, 10, 100]],n = 10,k = 1) == 280\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 1], [3, 4, 2], [4, 5, 1], [2, 5, 2], [3, 5, 3], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1]],n = 9,k = 1) == 7\n assert candidate(times = [[1, 2, 2], [1, 3, 4], [1, 4, 1], [2, 3, 1], [2, 4, 5], [3, 4, 2], [4, 5, 3], [5, 6, 2], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1]],n = 10,k = 1) == 10\n assert candidate(times = [[1, 2, 1], [2, 3, 1], [3, 4, 1], [4, 5, 1], [5, 6, 1], [6, 7, 1], [7, 8, 1], [8, 9, 1], [9, 10, 1], [10, 1, 1]],n = 10,k = 1) == 9\n assert candidate(times = [[1, 2, 1], [1, 3, 2], [2, 4, 3], [2, 5, 4], [3, 6, 5], [3, 7, 6], [4, 8, 7], [4, 9, 8], [5, 10, 9], [5, 11, 10]],n = 11,k = 1) == 15\n", "comparison": "exact"}, "public_tests": ["[[2,1,1],[2,3,1],[3,4,1]]\n4\n2", "[[1,2,1]]\n2\n1", "[[1,2,1]]\n2\n2"], "hints": ["We visit each node at some time, and if that time is better than the fastest time we've reached this node, we travel along outgoing edges in sorted order. Alternatively, we could use Dijkstra's algorithm."], "metadata": {"canonical_parameter_names": ["times", "n", "k"], "leetcode_dataset_entry_point": "Solution().networkDelayTime", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:06+00:00", "tests_total": 100, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "graph", "heap-priority-queue", "shortest-path", "dijkstra"]}, "language": "cpp", "interface": {"raw_signature": "int networkDelayTime(vector>& times, int n, int k) {", "container": "Solution", "callable": "networkDelayTime", "parameters": [{"name": "times", "type": "vector>&"}, {"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 744, "task_id": "find-smallest-letter-greater-than-target", "difficulty": "Easy", "problem_description": "You are given an array of characters letters that is sorted in non-decreasing order, and a character target. There are at least two different characters in letters.\n\nReturn the smallest character in letters that is lexicographically greater than target. If such a character does not exist, return the first character in letters.\n\nExample 1:\n\nInput: letters = [\"c\",\"f\",\"j\"], target = \"a\"\nOutput: \"c\"\nExplanation: The smallest character that is lexicographically greater than 'a' in letters is 'c'.\n\nExample 2:\n\nInput: letters = [\"c\",\"f\",\"j\"], target = \"c\"\nOutput: \"f\"\nExplanation: The smallest character that is lexicographically greater than 'c' in letters is 'f'.\n\nExample 3:\n\nInput: letters = [\"x\",\"x\",\"y\",\"y\"], target = \"z\"\nOutput: \"x\"\nExplanation: There are no characters in letters that is lexicographically greater than 'z' so we return letters[0].\n\nConstraints:\n\n- 2 <= letters.length <= 10^4\n- letters[i] is a lowercase English letter.\n- letters is sorted in non-decreasing order.\n- letters contains at least two different characters.\n- target is a lowercase English letter.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'],target = \"d\") == \"e\"\n assert candidate(letters = ['c', 'f', 'j'],target = \"c\") == \"f\"\n assert candidate(letters = ['x', 'x', 'y', 'y'],target = \"z\") == \"x\"\n assert candidate(letters = ['a', 'b', 'c', 'd'],target = \"d\") == \"a\"\n assert candidate(letters = ['a', 'c', 'f', 'h'],target = \"g\") == \"h\"\n assert candidate(letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'],target = \"k\") == \"a\"\n assert candidate(letters = ['m', 'n', 'n', 'p', 'q'],target = \"l\") == \"m\"\n assert candidate(letters = ['s', 't', 'u', 'v'],target = \"r\") == \"s\"\n assert candidate(letters = ['a', 'c', 'f', 'h'],target = \"f\") == \"h\"\n assert candidate(letters = ['k', 'k', 'l', 'm', 'm'],target = \"m\") == \"k\"\n assert candidate(letters = ['b', 'b', 'c', 'd'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'b', 'b', 'b'],target = \"b\") == \"a\"\n assert candidate(letters = ['a', 'b', 'c', 'd'],target = \"z\") == \"a\"\n assert candidate(letters = ['d', 'e', 'f', 'g'],target = \"z\") == \"d\"\n assert candidate(letters = ['c', 'f', 'j'],target = \"a\") == \"c\"\n assert candidate(letters = ['m', 'n', 'p', 'q'],target = \"o\") == \"p\"\n assert candidate(letters = ['a', 'a', 'a', 'b'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'c', 'f', 'h'],target = \"b\") == \"c\"\n assert candidate(letters = ['c', 'g', 'k', 'o', 's', 'w'],target = \"o\") == \"s\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"a\") == \"c\"\n assert candidate(letters = ['b', 'b', 'd', 'd', 'f', 'f', 'h', 'h', 'j', 'j', 'l', 'l', 'n', 'n'],target = \"f\") == \"h\"\n assert candidate(letters = ['b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f', 'g', 'g'],target = \"f\") == \"g\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"t\") == \"u\"\n assert candidate(letters = ['d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"z\") == \"d\"\n assert candidate(letters = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'],target = \"c\") == \"a\"\n assert candidate(letters = ['a', 'c', 'f', 'j', 'o', 't', 'z'],target = \"z\") == \"a\"\n assert candidate(letters = ['b', 'f', 'j', 'n', 'r', 'v', 'z'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'c', 'f', 'i', 'l', 'o', 'r', 'u', 'x'],target = \"x\") == \"a\"\n assert candidate(letters = ['f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"s\") == \"t\"\n assert candidate(letters = ['d', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"k\") == \"l\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'],target = \"b\") == \"c\"\n assert candidate(letters = ['d', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"m\") == \"n\"\n assert candidate(letters = ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f', 'g', 'g', 'h', 'h', 'i', 'i', 'j', 'j'],target = \"j\") == \"a\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"x\") == \"y\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"l\") == \"m\"\n assert candidate(letters = ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e'],target = \"d\") == \"e\"\n assert candidate(letters = ['a', 'b', 'd', 'e', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'r', 's', 't', 'v', 'w', 'y', 'z'],target = \"w\") == \"y\"\n assert candidate(letters = ['b', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f', 'g', 'g', 'h', 'h', 'i', 'i', 'j', 'j', 'k', 'k'],target = \"b\") == \"c\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"v\") == \"w\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"y\") == \"a\"\n assert candidate(letters = ['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'],target = \"m\") == \"n\"\n assert candidate(letters = ['m', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"m\") == \"n\"\n assert candidate(letters = ['c', 'e', 'i', 'm', 'q', 'u', 'y'],target = \"u\") == \"y\"\n assert candidate(letters = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z'],target = \"u\") == \"v\"\n assert candidate(letters = ['d', 'd', 'd', 'e', 'e', 'f', 'g', 'h', 'i', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"d\") == \"e\"\n assert candidate(letters = ['m', 'm', 'm', 'm', 'n', 'n', 'n', 'n', 'p', 'p', 'p', 'p', 'q', 'q', 'q', 'q'],target = \"q\") == \"m\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'c', 'c', 'c', 'c'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"w\") == \"y\"\n assert candidate(letters = ['d', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'd', 'e', 'e', 'e', 'f'],target = \"d\") == \"e\"\n assert candidate(letters = ['l', 'm', 'n', 'n', 'n', 'o', 'p', 'q', 'q', 'r', 's'],target = \"p\") == \"q\"\n assert candidate(letters = ['b', 'c', 'f', 'h', 'j', 'm', 'p', 'r', 'u', 'x', 'z'],target = \"g\") == \"h\"\n assert candidate(letters = ['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'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"n\") == \"o\"\n assert candidate(letters = ['l', 'l', 'm', 'm', 'n', 'n', 'o', 'o', 'p', 'p', 'q', 'q', 'r', 'r', 's', 's', 't', 't', 'u', 'u', 'v', 'v', 'w', 'w', 'x', 'x', 'y', 'y', 'z', 'z'],target = \"u\") == \"v\"\n assert candidate(letters = ['s', 's', 't', 't', 'u', 'u', 'v', 'v', 'w', 'w', 'x', 'x', 'y', 'y', 'z', 'z'],target = \"y\") == \"z\"\n assert candidate(letters = ['b', 'c', 'd', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"t\") == \"v\"\n assert candidate(letters = ['a', 'z'],target = \"m\") == \"z\"\n assert candidate(letters = ['p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"z\") == \"p\"\n assert candidate(letters = ['a', 'c', 'e', 'g', 'i', 'k', 'm', 'o', 'q', 's', 'u', 'w', 'y'],target = \"m\") == \"o\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'],target = \"b\") == \"a\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'],target = \"a\") == \"b\"\n assert candidate(letters = ['b', 'd', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"a\") == \"b\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', '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'],target = \"a\") == \"b\"\n assert candidate(letters = ['d', 'd', 'd', 'e', 'f', 'g', 'g', 'g', 'h'],target = \"g\") == \"h\"\n assert candidate(letters = ['a', 'b', 'd', 'e', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"f\") == \"g\"\n assert candidate(letters = ['a', 'e', 'i', 'm', 'q', 'u', 'y'],target = \"z\") == \"a\"\n assert candidate(letters = ['a', 'c', 'f', 'j', 'o', 'v', 'y'],target = \"z\") == \"a\"\n assert candidate(letters = ['b', 'd', 'f', 'h', 'j', 'l', 'n', 'p', 'r', 't', 'v', 'x', 'z'],target = \"z\") == \"b\"\n assert candidate(letters = ['x', 'x', 'x', 'x', 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z'],target = \"x\") == \"y\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'],target = \"a\") == \"b\"\n assert candidate(letters = ['f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],target = \"u\") == \"v\"\n assert candidate(letters = ['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'],target = \"z\") == \"a\"\n assert candidate(letters = ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'b'],target = \"a\") == \"b\"\n assert candidate(letters = ['m', 'o', 'q', 's', 'u', 'w', 'y'],target = \"a\") == \"m\"\n assert candidate(letters = ['b', 'b', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'e', 'e', 'e', 'f', 'f', 'f', 'g', 'g', 'g', 'h', 'h', 'h'],target = \"d\") == \"e\"\n assert candidate(letters = ['d', 'h', 'l', 'p', 't', 'x'],target = \"m\") == \"p\"\n assert candidate(letters = ['m', 'm', 'm', 'm', 'n', 'n', 'n', 'n', 'p', 'p', 'p', 'p', 'q', 'q', 'q', 'q'],target = \"m\") == \"n\"\n", "comparison": "exact"}, "public_tests": ["[\"c\",\"f\",\"j\"]\n\"a\"", "[\"c\",\"f\",\"j\"]\n\"c\"", "[\"x\",\"x\",\"y\",\"y\"]\n\"z\""], "hints": ["Try to find whether each of 26 next letters are in the given string array."], "metadata": {"canonical_parameter_names": ["letters", "target"], "leetcode_dataset_entry_point": "Solution().nextGreatestLetter", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:08+00:00", "tests_total": 93, "tests_dropped": 16, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "cpp", "interface": {"raw_signature": "char nextGreatestLetter(vector& letters, char target) {", "container": "Solution", "callable": "nextGreatestLetter", "parameters": [{"name": "letters", "type": "vector&"}, {"name": "target", "type": "char"}], "return_type": "char", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 746, "task_id": "min-cost-climbing-stairs", "difficulty": "Easy", "problem_description": "You are given an integer array cost where cost[i] is the cost of i^th step on a staircase.\n\nOnce you pay the cost, you can either climb one or two steps.\n\nYou can either start from the step with index 0, or the step with index 1.\n\nReturn the minimum cost to reach the top of the staircase, which is the position just past the last step (index cost.length).\n\nExample 1:\n\nInput: cost = [10,15,20]\nOutput: 15\nExplanation: You will start at index 1.\n- Pay 15 and climb two steps to reach the top.\nThe total cost is 15.\n\nExample 2:\n\nInput: cost = [1,100,1,1,1,100,1,1,100,1]\nOutput: 6\nExplanation: You will start at index 0.\n- Pay 1 and climb two steps to reach index 2.\n- Pay 1 and climb two steps to reach index 4.\n- Pay 1 and climb two steps to reach index 6.\n- Pay 1 and climb one step to reach index 7.\n- Pay 1 and climb two steps to reach index 9.\n- Pay 1 and climb one step to reach the top.\nThe total cost is 6.\n\nConstraints:\n\n- 2 <= cost.length <= 1000\n- 0 <= cost[i] <= 999\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(cost = [999, 999, 999, 999]) == 1998\n assert candidate(cost = [1, 2, 3, 4, 5]) == 6\n assert candidate(cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]) == 6\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(cost = [0, 0, 0, 0]) == 0\n assert candidate(cost = [1, 2]) == 1\n assert candidate(cost = [999, 999, 999, 999, 999, 999]) == 2997\n assert candidate(cost = [1, 2, 3, 4, 5]) == 6\n assert candidate(cost = [10, 15, 20, 25, 30]) == 40\n assert candidate(cost = [10, 15]) == 10\n assert candidate(cost = [10, 20, 10, 5]) == 20\n assert candidate(cost = [10, 5, 20, 25, 30, 35, 40]) == 65\n assert candidate(cost = [10, 20, 15, 20, 30]) == 40\n assert candidate(cost = [10, 15]) == 10\n assert candidate(cost = [5, 8, 6, 3, 4, 2, 8, 5, 1]) == 18\n assert candidate(cost = [999, 999]) == 999\n assert candidate(cost = [10, 15, 20]) == 15\n assert candidate(cost = [10, 15, 20, 10, 15, 20]) == 40\n assert candidate(cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 5\n assert candidate(cost = [1, 100, 100, 1]) == 101\n assert candidate(cost = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 900\n assert candidate(cost = [10, 15, 20, 30, 40, 50, 60, 70, 80, 90]) == 210\n assert candidate(cost = [3, 5, 2, 1, 8, 9, 3, 5, 6, 2, 1, 4, 7, 3, 2, 8, 6, 4, 1, 7]) == 38\n assert candidate(cost = [50, 10, 20, 100, 30, 40, 10, 20, 30, 40]) == 100\n assert candidate(cost = [3, 2, 4, 3, 2, 5, 1, 2, 4, 3, 2, 5, 1, 2, 4]) == 17\n assert candidate(cost = [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]) == 13\n assert candidate(cost = [5, 8, 3, 12, 2, 7, 6, 10, 1, 4, 9, 11, 13, 14, 15]) == 46\n assert candidate(cost = [1, 100, 2, 100, 3, 100, 4, 100, 5, 100, 6, 100, 7, 100, 8]) == 36\n assert candidate(cost = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 450\n assert candidate(cost = [1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2]) == 13\n assert candidate(cost = [5, 8, 2, 3, 7, 1, 4, 6, 9, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 92\n assert candidate(cost = [50, 10, 5, 100, 20, 15, 10, 5, 20, 10, 5, 100, 20, 15, 10, 5, 20, 10, 5, 100, 20, 15, 10, 5, 20]) == 150\n assert candidate(cost = [10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140]) == 495\n assert candidate(cost = [1, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999]) == 8992\n assert candidate(cost = [3, 2, 10, 2, 3, 5, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 52\n assert candidate(cost = [999, 0, 999, 0, 999, 0, 999, 0, 999, 0]) == 0\n assert candidate(cost = [999, 999, 1, 999, 999, 2, 999, 999, 3, 999]) == 3001\n assert candidate(cost = [999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999]) == 0\n assert candidate(cost = [100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1]) == 12\n assert candidate(cost = [5, 8, 10, 2, 9, 1, 3, 7, 4, 6, 11, 12]) == 29\n assert candidate(cost = [999, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0]) == 999\n assert candidate(cost = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == 475\n assert candidate(cost = [5, 8, 3, 7, 2, 8, 3, 7, 2, 8, 3, 7, 2, 8, 3, 7, 2]) == 25\n assert candidate(cost = [1, 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(cost = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 125\n assert candidate(cost = [30, 5, 20, 10, 25, 15, 40, 35, 50, 45, 60, 55, 70, 65, 80, 75]) == 305\n assert candidate(cost = [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]) == 60\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 50\n assert candidate(cost = [1, 100, 100, 1, 100, 100, 1, 100, 100, 1]) == 302\n assert candidate(cost = [1, 100, 2, 99, 3, 98, 4, 97, 5, 96]) == 15\n assert candidate(cost = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80]) == 315\n assert candidate(cost = [5, 3, 8, 6, 7, 2, 4, 9, 1, 10]) == 16\n assert candidate(cost = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55]) == 150\n assert candidate(cost = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990]) == 4970\n assert candidate(cost = [999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999]) == 75924\n assert candidate(cost = [50, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 570\n assert candidate(cost = [5, 2, 7, 4, 9, 6, 11, 8, 13, 10, 15, 12, 17, 14, 19]) == 56\n assert candidate(cost = [999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0]) == 0\n assert candidate(cost = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(cost = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980]) == 9890\n assert candidate(cost = [999, 999, 0, 0, 999, 999, 0, 0, 999, 999, 0, 0]) == 2997\n assert candidate(cost = [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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(cost = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 56\n assert candidate(cost = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 560\n assert candidate(cost = [400, 5, 3, 10, 1, 1, 1, 1, 1, 1, 1, 1]) == 12\n assert candidate(cost = [20, 1, 3, 2, 4, 2, 5, 3, 6, 4, 7, 5, 8, 6, 9, 7, 10]) == 30\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 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]) == 2500\n assert candidate(cost = [10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20, 10, 15, 20]) == 760\n assert candidate(cost = [999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0, 999, 0]) == 0\n assert candidate(cost = [20, 1, 5, 10, 1, 1, 5, 10, 1, 1, 5, 10, 1, 1, 5, 10, 1, 1, 5, 10]) == 30\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(cost = [10, 15, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 36\n assert candidate(cost = [100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 7\n assert candidate(cost = [999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1]) == 10\n assert candidate(cost = [5, 8, 2, 3, 6, 1, 4, 7, 9, 10]) == 24\n assert candidate(cost = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 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(cost = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == 495\n assert candidate(cost = [999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999]) == 12\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 56\n assert candidate(cost = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 75\n assert candidate(cost = [2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4, 3, 2, 1, 4, 5, 6, 3, 2, 5, 4, 3, 1, 2, 4]) == 165\n assert candidate(cost = [10, 20, 30, 40, 50, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 65\n assert candidate(cost = [100, 150, 100, 150, 100, 150, 100, 150, 100, 150]) == 500\n assert candidate(cost = [1, 2, 3, 4, 5, 6, 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(cost = [3, 2, 1, 5, 4, 1, 3, 2, 1, 5, 4, 1, 3, 2, 1, 5, 4, 1]) == 23\n assert candidate(cost = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 50\n assert candidate(cost = [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]) == 156\n assert candidate(cost = [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]) == 130\n assert candidate(cost = [100, 200, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 106\n assert candidate(cost = [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]) == 14\n assert candidate(cost = [100, 50, 25, 12, 6, 3, 1, 0, 0, 1, 3, 6, 12, 25, 50, 100, 150, 200, 250, 300]) == 530\n assert candidate(cost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(cost = [4, 2, 6, 7, 8, 1, 3, 5, 10, 2, 6, 7, 8, 1, 3, 5]) == 28\n assert candidate(cost = [1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999]) == 10\n assert candidate(cost = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 2150\n assert candidate(cost = [999, 999, 999, 999, 999, 0, 0, 0, 0, 0]) == 1998\n assert candidate(cost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n", "comparison": "exact"}, "public_tests": ["[10,15,20]", "[1,100,1,1,1,100,1,1,100,1]"], "hints": ["Build an array dp where dp[i] is the minimum cost to climb to the top starting from the ith staircase.", "Assuming we have n staircase labeled from 0 to n - 1 and assuming the top is n, then dp[n] = 0, marking that if you are at the top, the cost is 0.", "Now, looping from n - 1 to 0, the dp[i] = cost[i] + min(dp[i + 1], dp[i + 2]). The answer will be the minimum of dp[0] and dp[1]"], "metadata": {"canonical_parameter_names": ["cost"], "leetcode_dataset_entry_point": "Solution().minCostClimbingStairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:11+00:00", "tests_total": 102, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int minCostClimbingStairs(vector& cost) {", "container": "Solution", "callable": "minCostClimbingStairs", "parameters": [{"name": "cost", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 747, "task_id": "largest-number-at-least-twice-of-others", "difficulty": "Easy", "problem_description": "You are given an integer array nums where the largest integer is unique.\n\nDetermine whether the largest element in the array is at least twice as much as every other number in the array. If it is, return the index of the largest element, or return -1 otherwise.\n\nExample 1:\n\nInput: nums = [3,6,1,0]\nOutput: 1\nExplanation: 6 is the largest integer.\nFor every other number in the array x, 6 is at least twice as big as x.\nThe index of value 6 is 1, so we return 1.\n\nExample 2:\n\nInput: nums = [1,2,3,4]\nOutput: -1\nExplanation: 4 is less than twice the value of 3, so we return -1.\n\nConstraints:\n\n- 2 <= nums.length <= 50\n- 0 <= nums[i] <= 100\n- The largest element in nums is unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 6]) == 3\n assert candidate(nums = [3, 6, 1, 0]) == 1\n assert candidate(nums = [7, 1, 3, 2]) == 0\n assert candidate(nums = [10, 1, 2, 3]) == 0\n assert candidate(nums = [100, 1, 2, 3]) == 0\n assert candidate(nums = [7, 1, 3, 5]) == -1\n assert candidate(nums = [1, 100, 2, 3]) == 1\n assert candidate(nums = [8, 8, 8, 8, 8, 16]) == 5\n assert candidate(nums = [5, 0, 3, 2]) == -1\n assert candidate(nums = [1, 2, 3, 4]) == -1\n assert candidate(nums = [5, 8, 3, 4]) == -1\n assert candidate(nums = [1, 1, 1, 7, 1, 1, 1]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 7]) == 6\n assert candidate(nums = [5, 3, 1, 4]) == -1\n assert candidate(nums = [50, 25, 12, 6, 3, 1]) == 0\n assert candidate(nums = [1, 20, 3, 4]) == 1\n assert candidate(nums = [1, 1, 1, 100]) == 3\n assert candidate(nums = [10, 20]) == 1\n assert candidate(nums = [10, 5, 3, 1]) == 0\n assert candidate(nums = [1, 20, 3, 1]) == 1\n assert candidate(nums = [1, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 1]) == 3\n assert candidate(nums = [8, 16, 32, 4]) == 2\n assert candidate(nums = [1, 2, 0, 4]) == 3\n assert candidate(nums = [2, 1, 3, 6]) == 3\n assert candidate(nums = [10, 5, 2]) == 0\n assert candidate(nums = [7, 0, 3, 10]) == -1\n assert candidate(nums = [7, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 10, 2, 3]) == 1\n assert candidate(nums = [8, 1, 3, 4]) == 0\n assert candidate(nums = [1, 2, 0]) == 1\n assert candidate(nums = [81, 27, 9, 3, 1]) == 0\n assert candidate(nums = [100, 25, 50, 75, 0, 100]) == -1\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]) == -1\n assert candidate(nums = [30, 15, 7, 4, 2]) == 0\n assert candidate(nums = [8, 4, 4, 2, 1]) == 0\n assert candidate(nums = [50, 25, 10, 5, 1]) == 0\n assert candidate(nums = [42, 21, 7, 3, 1]) == 0\n assert candidate(nums = [50, 25, 10, 5, 1, 0]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50]) == -1\n assert candidate(nums = [60, 30, 10, 5, 2]) == 0\n assert candidate(nums = [30, 15, 9, 4, 2]) == 0\n assert candidate(nums = [36, 18, 9, 4, 2]) == 0\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 60]) == 10\n assert candidate(nums = [42, 21, 10, 5, 2]) == 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, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60]) == -1\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]) == -1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64]) == 6\n assert candidate(nums = [100, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1]) == 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]) == -1\n assert candidate(nums = [100, 99, 98, 97, 96, 95]) == -1\n assert candidate(nums = [49, 24, 12, 6, 3, 1]) == 0\n assert candidate(nums = [85, 84, 83, 82, 81, 80]) == -1\n assert candidate(nums = [10, 10, 10, 10, 20]) == 4\n assert candidate(nums = [25, 24, 23, 22, 21]) == -1\n assert candidate(nums = [99, 49, 33, 24, 19, 16, 14, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == -1\n assert candidate(nums = [20, 10, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [30, 20, 10, 5, 2, 1]) == -1\n assert candidate(nums = [55, 27, 13, 6, 3]) == 0\n assert candidate(nums = [80, 40, 20, 10, 5]) == 0\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == -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, 2]) == 44\n assert candidate(nums = [5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == -1\n assert candidate(nums = [99, 33, 22, 11, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [20, 10, 5, 1]) == 0\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1]) == -1\n assert candidate(nums = [98, 49, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\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]) == -1\n assert candidate(nums = [48, 24, 12, 6, 3]) == 0\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == -1\n assert candidate(nums = [100, 50, 25, 10, 5]) == 0\n assert candidate(nums = [50, 25, 12, 6, 3, 1]) == 0\n assert candidate(nums = [49, 24, 12, 6, 3, 1]) == 0\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1]) == 0\n assert candidate(nums = [9, 18, 3, 6, 12, 24, 48]) == 6\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1, 0]) == 0\n assert candidate(nums = [25, 15, 5, 30, 10]) == -1\n assert candidate(nums = [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, 47, 48]) == -1\n assert candidate(nums = [50, 49, 25, 10]) == -1\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 40]) == 10\n assert candidate(nums = [100, 99, 98, 97, 96]) == -1\n assert candidate(nums = [90, 45, 30, 15, 7]) == 0\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1, 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, 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 = [9, 7, 5, 3, 1]) == -1\n assert candidate(nums = [50, 49, 48, 47, 46]) == -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, 78]) == 20\n assert candidate(nums = [3, 6, 9, 18, 36]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20]) == -1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == -1\n assert candidate(nums = [8, 80, 20, 40, 10]) == 1\n assert candidate(nums = [100, 99, 98, 97, 96]) == -1\n assert candidate(nums = [34, 17, 8, 4, 2, 1]) == 0\n assert candidate(nums = [42, 21, 10, 5, 3]) == 0\n assert candidate(nums = [60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50]) == -1\n assert candidate(nums = [77, 38, 19, 9, 4, 2, 1]) == 0\n assert candidate(nums = [70, 69, 35, 20, 10, 5, 1]) == -1\n assert candidate(nums = [10, 20, 30, 40, 50]) == -1\n assert candidate(nums = [98, 49, 24, 12, 6, 3, 1, 0]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 6]) == 5\n assert candidate(nums = [90, 45, 30, 20, 10, 5, 1]) == 0\n assert candidate(nums = [42, 21, 10, 9, 8, 7, 6, 5]) == 0\n assert candidate(nums = [30, 15, 14, 13, 12, 11]) == 0\n assert candidate(nums = [99, 33, 11, 3, 1]) == 0\n assert candidate(nums = [20, 10, 5, 1, 0]) == 0\n assert candidate(nums = [100, 99, 98, 97, 96, 95]) == -1\n assert candidate(nums = [64, 32, 16, 8, 4, 2, 1]) == 0\n assert candidate(nums = [9, 3, 1, 0, 0]) == 0\n assert candidate(nums = [18, 9, 4, 2, 1]) == 0\n assert candidate(nums = [20, 10, 5, 2, 1]) == 0\n assert candidate(nums = [9, 18, 27, 36, 45, 54, 63, 72, 81, 90]) == -1\n assert candidate(nums = [10, 9, 8, 7, 6]) == -1\n assert candidate(nums = [100, 50, 25, 12, 6]) == 0\n assert candidate(nums = [1, 100, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(nums = [42, 21, 10, 5, 3, 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, 20]) == 19\n assert candidate(nums = [42, 21, 10, 5, 3, 2, 1]) == 0\n assert candidate(nums = [25, 10, 5, 3, 1]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == -1\n assert candidate(nums = [100, 49, 48, 47, 46, 45]) == 0\n assert candidate(nums = [5, 50, 25, 100, 75]) == -1\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21]) == -1\n assert candidate(nums = [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, 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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 50]) == -1\n assert candidate(nums = [4, 4, 4, 4, 8]) == 4\n assert candidate(nums = [8, 4, 2, 1, 1, 1, 1]) == 0\n assert candidate(nums = [8, 16, 2, 4, 6]) == 1\n", "comparison": "exact"}, "public_tests": ["[3,6,1,0]", "[1,2,3,4]"], "hints": ["Scan through the array to find the unique largest element `m`, keeping track of it's index `maxIndex`. Scan through the array again. If we find some `x != m` with `m < 2*x`, we should return `-1`. Otherwise, we should return `maxIndex`."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().dominantIndex", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:13+00:00", "tests_total": 142, "tests_dropped": 13, "flags": [], "topic_tags": ["array", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "int dominantIndex(vector& nums) {", "container": "Solution", "callable": "dominantIndex", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 748, "task_id": "shortest-completing-word", "difficulty": "Easy", "problem_description": "Given a string licensePlate and an array of strings words, find the shortest completing word in words.\n\nA completing word is a word that contains all the letters in licensePlate. Ignore numbers and spaces in licensePlate, and treat letters as case insensitive. If a letter appears more than once in licensePlate, then it must appear in the word the same number of times or more.\n\nFor example, if licensePlate = \"aBc 12c\", then it contains letters 'a', 'b' (ignoring case), and 'c' twice. Possible completing words are \"abccdef\", \"caaacab\", and \"cbca\".\n\nReturn the shortest completing word in words. It is guaranteed an answer exists. If there are multiple shortest completing words, return the first one that occurs in words.\n\nExample 1:\n\nInput: licensePlate = \"1s3 PSt\", words = [\"step\",\"steps\",\"stripe\",\"stepple\"]\nOutput: \"steps\"\nExplanation: licensePlate contains letters 's', 'p', 's' (ignoring case), and 't'.\n\"step\" contains 't' and 'p', but only contains 1 's'.\n\"steps\" contains 't', 'p', and both 's' characters.\n\"stripe\" is missing an 's'.\n\"stepple\" is missing an 's'.\nSince \"steps\" is the only word containing all the letters, that is the answer.\n\nExample 2:\n\nInput: licensePlate = \"1s3 456\", words = [\"looks\",\"pest\",\"stew\",\"show\"]\nOutput: \"pest\"\nExplanation: licensePlate only contains the letter 's'. All the words contain 's', but among these \"pest\", \"stew\", and \"show\" are shortest. The answer is \"pest\" because it is the word that appears earliest of the 3.\n\nConstraints:\n\n- 1 <= licensePlate.length <= 7\n- licensePlate contains digits, letters (uppercase or lowercase), or space ' '.\n- 1 <= words.length <= 1000\n- 1 <= words[i].length <= 15\n- words[i] consists of lower case English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(licensePlate = \"GrC8950\",words = ['grace', 'please']) == \"grace\"\n assert candidate(licensePlate = \"Ah71752\",words = ['enough', 'these', 'playground', 'point', 'president']) == None\n assert candidate(licensePlate = \"xyz\",words = ['xzy', 'zyx', 'yxz', 'zxy']) == \"xzy\"\n assert candidate(licensePlate = \"44472Ml\",words = ['call', 'tall', 'tell']) == None\n assert candidate(licensePlate = \"1s3 456\",words = ['looks', 'pest', 'stew', 'show']) == \"pest\"\n assert candidate(licensePlate = \"1s3 PSt\",words = ['step', 'steps', 'stripe', 'stepple']) == \"steps\"\n assert candidate(licensePlate = \"aBc 12c\",words = ['abccdef', 'caaacab', 'cbca']) == \"cbca\"\n assert candidate(licensePlate = \"zZyYxX\",words = ['zyx', 'yxz', 'xyzzyx', 'zyxzyx', 'zzzyyx', 'zyzyzy', 'xyzzyxzyx']) == \"xyzzyx\"\n assert candidate(licensePlate = \"zzz\",words = ['zzzzzz', 'zzzz', 'zzz', 'zzzzz', 'zzzzzzz']) == \"zzz\"\n assert candidate(licensePlate = \"mN2mN3\",words = ['mnm', 'nmn', 'mmn', 'mnn', 'nmm', 'nmmm', 'nmmn']) == \"nmmn\"\n assert candidate(licensePlate = \"1234567\",words = ['abcdefg', 'bcadefg', 'cbadefg', 'bcaefdg', 'bcaefdgh']) == \"abcdefg\"\n assert candidate(licensePlate = \"x9Y8Z7\",words = ['xyz', 'xyzz', 'yxz', 'zyx', 'zxzyx', 'zyzzzyx']) == \"xyz\"\n assert candidate(licensePlate = \"xyz XYZ\",words = ['xyzz', 'yzxx', 'zxzy', 'zyxzyx', 'zyxzyxz']) == \"zyxzyx\"\n assert candidate(licensePlate = \"zzzzz\",words = ['zzzz', 'zzz', 'zzzzzz', 'zzzzz', 'zzzzzzz', 'zzzzzzzz']) == \"zzzzz\"\n assert candidate(licensePlate = \"aAaAaA\",words = ['aaaaaa', 'aaaaaab', 'aaaaaabc', 'aaaaaabcd', 'aaaaaabcde']) == \"aaaaaa\"\n assert candidate(licensePlate = \"XyZ 890\",words = ['xyz', 'xyzz', 'xzyz', 'zyxzy', 'zyzzx']) == \"xyz\"\n assert candidate(licensePlate = \"XYZ\",words = ['xylophone', 'xylem', 'yxz', 'zyx', 'zyxwvut']) == \"yxz\"\n assert candidate(licensePlate = \"Z9y2z\",words = ['buzzards', 'zyzzyva', 'yz', 'zyzzy', 'zzyzzy']) == \"zyzzy\"\n assert candidate(licensePlate = \"XyZ9\",words = ['zyx', 'xyzzy', 'yzzx', 'xyzz', 'zyzzxy']) == \"zyx\"\n assert candidate(licensePlate = \"f9o8x7\",words = ['fox', 'foxy', 'foxtrot', 'fix', 'fixes', 'foxtrotted', 'foxtrotter']) == \"fox\"\n assert candidate(licensePlate = \"XYZ 123\",words = ['exactly', 'xyzzyx', 'zyxzyx', 'zyzyzx', 'zyzyxzyx']) == \"xyzzyx\"\n assert candidate(licensePlate = \"b1r2e3\",words = ['berber', 'bereber', 'beriberi', 'reberber', 'beerbar']) == \"berber\"\n assert candidate(licensePlate = \"p1QR2\",words = ['prq', 'pqr', 'pqrr', 'prqq', 'pqrrr', 'pqqrr']) == \"prq\"\n assert candidate(licensePlate = \"mN9mN\",words = ['minnesota', 'miamin', 'manana', 'mimic', 'mimicry', 'mining', 'minimum']) == None\n assert candidate(licensePlate = \"mno890\",words = ['mno', 'mon', 'nom', 'omn', 'nmo', 'omnmo', 'mnomo', 'omonomn']) == \"mno\"\n assert candidate(licensePlate = \"zzz\",words = ['zzzz', 'zzz', 'zzzzz', 'zzzzzz', 'zzzzzzz', 'zzzzzzzz', 'zzzzzzzzz', 'zzzzzzzzzz']) == \"zzz\"\n assert candidate(licensePlate = \"xYz987\",words = ['xyz', 'yzx', 'zxy', 'xzy', 'yxz', 'zyx', 'xxxyyzzz']) == \"xyz\"\n assert candidate(licensePlate = \"XYZ 987\",words = ['xyzz', 'zyxw', 'zyxv', 'zyxuv', 'zyxwvut']) == \"xyzz\"\n", "comparison": "exact"}, "public_tests": ["\"1s3 PSt\"\n[\"step\",\"steps\",\"stripe\",\"stepple\"]", "\"1s3 456\"\n[\"looks\",\"pest\",\"stew\",\"show\"]"], "hints": ["Count only the letters (possibly converted to lowercase) of each word. If a word is shorter and the count of each letter is at least the count of that letter in the licensePlate, it is the best answer we've seen yet."], "metadata": {"canonical_parameter_names": ["licensePlate", "words"], "leetcode_dataset_entry_point": "Solution().shortestCompletingWord", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:15+00:00", "tests_total": 85, "tests_dropped": 57, "flags": [], "topic_tags": ["array", "hash-table", "string"]}, "language": "cpp", "interface": {"raw_signature": "string shortestCompletingWord(string licensePlate, vector& words) {", "container": "Solution", "callable": "shortestCompletingWord", "parameters": [{"name": "licensePlate", "type": "string"}, {"name": "words", "type": "vector&"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 749, "task_id": "contain-virus", "difficulty": "Hard", "problem_description": "A virus is spreading rapidly, and your task is to quarantine the infected area by installing walls.\n\nThe world is modeled as an m x n binary grid isInfected, where isInfected[i][j] == 0 represents uninfected cells, and isInfected[i][j] == 1 represents cells contaminated with the virus. A wall (and only one wall) can be installed between any two 4-directionally adjacent cells, on the shared boundary.\n\nEvery night, the virus spreads to all neighboring cells in all four directions unless blocked by a wall. Resources are limited. Each day, you can install walls around only one region (i.e., the affected area (continuous block of infected cells) that threatens the most uninfected cells the following night). There will never be a tie.\n\nReturn the number of walls used to quarantine all the infected regions. If the world will become fully infected, return the number of walls used.\n\nExample 1:\n\nInput: isInfected = [[0,1,0,0,0,0,0,1],[0,1,0,0,0,0,0,1],[0,0,0,0,0,0,0,1],[0,0,0,0,0,0,0,0]]\nOutput: 10\nExplanation: There are 2 contaminated regions.\nOn the first day, add 5 walls to quarantine the viral region on the left. The board after the virus spreads is:\n\nOn the second day, add 5 walls to quarantine the viral region on the right. The virus is fully contained.\n\nExample 2:\n\nInput: isInfected = [[1,1,1],[1,0,1],[1,1,1]]\nOutput: 4\nExplanation: Even though there is only one cell saved, there are 4 walls built.\nNotice that walls are only built on the shared boundary of two different cells.\n\nExample 3:\n\nInput: isInfected = [[1,1,1,0,0,0,0,0,0],[1,0,1,0,1,1,1,1,1],[1,1,1,0,0,0,0,0,0]]\nOutput: 13\nExplanation: The region on the left only builds two new walls.\n\nConstraints:\n\n- m == isInfected.length\n- n == isInfected[i].length\n- 1 <= m, n <= 50\n- isInfected[i][j] is either 0 or 1.\n- There is always a contiguous viral region throughout the described process that will infect strictly more uncontaminated squares in the next round.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(isInfected = [[0, 1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0]]) == 10\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0]]) == 13\n assert candidate(isInfected = [[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(isInfected = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0, 0]]) == 28\n assert candidate(isInfected = [[1, 1, 1], [1, 0, 1], [1, 1, 1]]) == 4\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 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], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 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, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 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], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 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, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 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]]) == 60\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 41\n assert candidate(isInfected = [[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, 1], [1, 0, 1, 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, 0, 1, 0, 1], [1, 0, 1, 0, 1, 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, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 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, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 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, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 0, 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, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 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, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 93\n assert candidate(isInfected = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 0, 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]]) == 17\n assert candidate(isInfected = [[1, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 1, 0, 0, 1, 0]]) == 28\n assert candidate(isInfected = [[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 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], [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 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], [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1]]) == 18\n assert candidate(isInfected = [[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], [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], [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], [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]]) == 4\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1]]) == 50\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 0]]) == 28\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1]]) == 26\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1]]) == 16\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 1, 0, 0]]) == 30\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [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, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 66\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 0], [1, 0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 1, 1]]) == 29\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 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, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0]]) == 32\n assert candidate(isInfected = [[1, 1, 0, 0, 1, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1, 1, 0, 0]]) == 29\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 27\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 1, 1, 0, 1, 1], [1, 0, 0, 0, 1, 0, 0, 1, 0, 1], [0, 0, 0, 1, 0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 0, 1, 0, 1, 0, 0, 0], [1, 0, 0, 1, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0, 0]]) == 30\n assert candidate(isInfected = [[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], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 4\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 1, 1, 0, 0, 1, 1], [1, 0, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 1, 0, 0]]) == 27\n assert candidate(isInfected = [[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], [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]]) == 4\n assert candidate(isInfected = [[1, 1, 1, 1, 1, 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], [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]]) == 32\n assert candidate(isInfected = [[1, 1, 0, 0, 1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 0, 0, 1, 0, 1, 1], [0, 0, 0, 1, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 0, 1, 0, 0, 0, 1, 0, 1]]) == 25\n assert candidate(isInfected = [[0, 0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 1, 1, 0, 1, 0, 0], [0, 0, 0, 1, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0, 0]]) == 34\n assert candidate(isInfected = [[1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]]) == 4\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [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, 1, 1, 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, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 69\n assert candidate(isInfected = [[1, 0, 0, 1, 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, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0]]) == 36\n assert candidate(isInfected = [[1, 1, 0, 0, 1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0]]) == 33\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 1, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1, 1, 0]]) == 30\n assert candidate(isInfected = [[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], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 4\n assert candidate(isInfected = [[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]]) == 4\n assert candidate(isInfected = [[1, 1, 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, 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, 1, 1, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 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, 0, 0, 0]]) == 36\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 1, 0, 0, 1], [0, 0, 1, 0, 1, 0, 0]]) == 6\n assert candidate(isInfected = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1]]) == 25\n assert candidate(isInfected = [[1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]]) == 45\n assert candidate(isInfected = [[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, 0, 1, 0, 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]]) == 40\n assert candidate(isInfected = [[0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1]]) == 41\n assert candidate(isInfected = [[1, 1, 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], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 13\n assert candidate(isInfected = [[1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 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, 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], [0, 0, 0, 0, 1, 0, 1, 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, 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, 0, 0, 0, 0, 1, 0, 1, 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, 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, 0, 0, 0, 0, 1, 0, 1, 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, 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, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0]]) == 67\n assert candidate(isInfected = [[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0]]) == 45\n assert candidate(isInfected = [[1, 1, 0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]) == 44\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 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, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 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]]) == 34\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 0, 0, 1, 1, 1], [1, 0, 1, 0, 0, 0, 1, 0, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0, 1, 1, 1]]) == 19\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 22\n assert candidate(isInfected = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 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, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 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, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 24\n assert candidate(isInfected = [[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, 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]]) == 29\n assert candidate(isInfected = [[1, 1, 1, 1, 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], [1, 0, 1, 1, 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, 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, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0]]) == 28\n assert candidate(isInfected = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1, 0, 1, 1, 1], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0, 1]]) == 30\n assert candidate(isInfected = [[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], [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], [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]]) == 4\n assert candidate(isInfected = [[1, 1, 0, 0, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 0, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1, 1, 0, 0, 1]]) == 42\n assert candidate(isInfected = [[1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0], [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, 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, 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, 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, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]]) == 21\n assert candidate(isInfected = [[1, 1, 1, 1, 1, 0, 0, 0, 0, 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], [1, 0, 1, 0, 1, 0, 0, 0, 0, 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], [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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]]) == 47\n", "comparison": "exact"}, "public_tests": ["[[0,1,0,0,0,0,0,1],[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,1,1],[1,0,1],[1,1,1]]", "[[1,1,1,0,0,0,0,0,0],[1,0,1,0,1,1,1,1,1],[1,1,1,0,0,0,0,0,0]]"], "hints": ["The implementation is long - we want to perfrom the following steps: * Find all viral regions (connected components), additionally for each region keeping track of the frontier (neighboring uncontaminated cells), and the perimeter of the region. * Disinfect the most viral region, adding it's perimeter to the answer. * Spread the virus in the remaining regions outward by 1 square."], "metadata": {"canonical_parameter_names": ["isInfected"], "leetcode_dataset_entry_point": "Solution().containVirus", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:17+00:00", "tests_total": 58, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "matrix", "simulation"]}, "language": "cpp", "interface": {"raw_signature": "int containVirus(vector>& isInfected) {", "container": "Solution", "callable": "containVirus", "parameters": [{"name": "isInfected", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 752, "task_id": "open-the-lock", "difficulty": "Medium", "problem_description": "You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consists of turning one wheel one slot.\n\nThe lock initially starts at '0000', a string representing the state of the 4 wheels.\n\nYou are given a list of deadends dead ends, meaning if the lock displays any of these codes, the wheels of the lock will stop turning and you will be unable to open it.\n\nGiven a target representing the value of the wheels that will unlock the lock, return the minimum total number of turns required to open the lock, or -1 if it is impossible.\n\nExample 1:\n\nInput: deadends = [\"0201\",\"0101\",\"0102\",\"1212\",\"2002\"], target = \"0202\"\nOutput: 6\nExplanation:\nA sequence of valid moves would be \"0000\" -> \"1000\" -> \"1100\" -> \"1200\" -> \"1201\" -> \"1202\" -> \"0202\".\nNote that a sequence like \"0000\" -> \"0001\" -> \"0002\" -> \"0102\" -> \"0202\" would be invalid,\nbecause the wheels of the lock become stuck after the display becomes the dead end \"0102\".\n\nExample 2:\n\nInput: deadends = [\"8888\"], target = \"0009\"\nOutput: 1\nExplanation: We can turn the last wheel in reverse to move from \"0000\" -> \"0009\".\n\nExample 3:\n\nInput: deadends = [\"8887\",\"8889\",\"8878\",\"8898\",\"8788\",\"8988\",\"7888\",\"9888\"], target = \"8888\"\nOutput: -1\nExplanation: We cannot reach the target without getting stuck.\n\nConstraints:\n\n- 1 <= deadends.length <= 500\n- deadends[i].length == 4\n- target.length == 4\n- target will not be in the list deadends.\n- target and deadends[i] consist of digits only.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(deadends = ['1111', '2222', '3333'],target = \"4444\") == 16\n assert candidate(deadends = ['0001', '0002', '0003', '0004'],target = \"0005\") == 5\n assert candidate(deadends = ['0001', '0011', '0101', '1001', '1101', '0111', '0110', '1010', '1110', '1100'],target = \"1111\") == 6\n assert candidate(deadends = ['1110', '1101', '1011', '0111'],target = \"1111\") == 6\n assert candidate(deadends = ['9998', '9997', '9996', '9995'],target = \"9999\") == 4\n assert candidate(deadends = ['0000'],target = \"1111\") == -1\n assert candidate(deadends = ['1111', '2222', '3333', '4444'],target = \"5555\") == 20\n assert candidate(deadends = ['1234'],target = \"0000\") == 0\n assert candidate(deadends = ['8888'],target = \"0009\") == 1\n assert candidate(deadends = ['0002', '0020', '0200', '2000'],target = \"0000\") == 0\n assert candidate(deadends = ['0001', '0010', '0100', '1000'],target = \"1111\") == 6\n assert candidate(deadends = ['0201', '0101', '0102', '1212', '2002'],target = \"0202\") == 6\n assert candidate(deadends = ['1110', '1101', '1011', '0111'],target = \"0000\") == 0\n assert candidate(deadends = ['1111'],target = \"0000\") == 0\n assert candidate(deadends = ['1111'],target = \"1112\") == 5\n assert candidate(deadends = ['0001', '0010', '0100', '1000'],target = \"0000\") == 0\n assert candidate(deadends = ['8887', '8889', '8878', '8898', '8788', '8988', '7888', '9888'],target = \"8888\") == -1\n assert candidate(deadends = ['0000'],target = \"8888\") == -1\n assert candidate(deadends = ['9999'],target = \"0000\") == 0\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123'],target = \"5555\") == 20\n assert candidate(deadends = ['1234', '4321', '2345', '5432', '3456', '6543', '4567', '7654', '5678'],target = \"8765\") == 14\n assert candidate(deadends = ['1234', '4321', '2143', '3412', '0987', '7890', '8709', '9087'],target = \"0000\") == 0\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999', '0000'],target = \"1234\") == -1\n assert candidate(deadends = ['0011', '0110', '1100', '1001', '1112', '1211', '2111'],target = \"2222\") == 8\n assert candidate(deadends = ['1000', '0100', '0010', '0001', '0011', '0110', '1010', '1100', '1110'],target = \"1111\") == 6\n assert candidate(deadends = ['0009', '0018', '0108', '0117', '0126', '0135', '0144', '0153', '0162', '0171'],target = \"0000\") == 0\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123'],target = \"9999\") == 4\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"0000\") == 0\n assert candidate(deadends = ['0101', '1010', '1100', '1111'],target = \"0011\") == 2\n assert candidate(deadends = ['0000', '1111', '2222', '3333', '4444'],target = \"5555\") == -1\n assert candidate(deadends = ['0001', '0010', '1000', '0100', '0011', '1100', '0110', '1010'],target = \"1111\") == 6\n assert candidate(deadends = ['0001', '1112', '2223', '3334', '4445', '5556', '6667', '7778', '8889'],target = \"9999\") == 4\n assert candidate(deadends = ['0123', '9876', '5432', '1357', '2468', '0909', '1111', '2222', '3333'],target = \"4444\") == 16\n assert candidate(deadends = ['9998', '9989', '9899', '8999', '0000', '1111', '2222', '3333', '4444', '5555'],target = \"6789\") == -1\n assert candidate(deadends = ['0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009'],target = \"1111\") == 4\n assert candidate(deadends = ['0123', '1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012'],target = \"0123\") == 6\n assert candidate(deadends = ['0000', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"9999\") == -1\n assert candidate(deadends = ['0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009', '0100'],target = \"0011\") == 2\n assert candidate(deadends = ['9999', '8888', '7777', '6666', '5555', '4444', '3333', '2222', '1111'],target = \"0000\") == 0\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123'],target = \"1000\") == 1\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999', '1234', '4321', '2345', '5432', '3456', '6543', '4567', '7654', '5678', '8765', '6789', '9876', '7890', '0987', '8790', '9087', '0879'],target = \"0000\") == 0\n assert candidate(deadends = ['0000', '9999', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888'],target = \"1234\") == -1\n assert candidate(deadends = ['0011', '0101', '1001', '1100', '1110', '1101'],target = \"1111\") == 4\n assert candidate(deadends = ['0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009', '0100'],target = \"9999\") == 4\n assert candidate(deadends = ['1000', '0100', '0010', '0001', '2000', '0200', '0020', '0002'],target = \"0000\") == 0\n assert candidate(deadends = ['0000', '0009', '0090', '0900', '9000', '1111', '2222', '3333', '4444'],target = \"5555\") == -1\n assert candidate(deadends = ['0010', '0100', '0001', '0110', '1001', '1100', '1111', '0000'],target = \"0101\") == -1\n assert candidate(deadends = ['0001', '0002', '0010', '0020', '0100', '0200', '1000', '2000', '0003', '0030', '0300', '3000'],target = \"0004\") == 6\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012'],target = \"0123\") == 6\n assert candidate(deadends = ['0001', '0010', '0100', '1000', '0111', '1110', '1101', '1011', '2220', '2202', '2022', '0222'],target = \"0202\") == 6\n assert candidate(deadends = ['1234', '4321', '2143', '3412'],target = \"5678\") == 14\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123', '0234', '1345', '2456', '3567', '4678', '5789', '6890', '7901', '8012', '9123'],target = \"4567\") == 16\n assert candidate(deadends = ['0001', '0010', '0100', '1000', '1234', '4321', '5678', '8765', '9999'],target = \"8888\") == 8\n assert candidate(deadends = ['0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009'],target = \"9999\") == 4\n assert candidate(deadends = ['9999', '8888', '7777', '6666', '5555'],target = \"4444\") == 16\n assert candidate(deadends = ['0002', '0020', '0200', '2000', '0013', '0130', '1300', '3000', '0112', '1120', '1201', '2011', '1011', '0110', '0101', '1010', '0011'],target = \"1111\") == 4\n assert candidate(deadends = ['1111', '1110', '1101', '1011', '0111', '2222', '2221', '2212', '2122', '1222', '3333', '3332', '3323', '3233', '2333', '4444', '4443', '4434', '4344', '3444'],target = \"5555\") == 20\n assert candidate(deadends = ['9998', '9989', '9899', '8999', '0001', '0010', '0100', '1000'],target = \"9999\") == 4\n assert candidate(deadends = ['1110', '1101', '1011', '0111', '2220', '2202', '2022', '0222', '3330', '3303', '3033', '0333'],target = \"4444\") == 16\n assert candidate(deadends = ['0009', '0018', '0108', '0117', '0126', '0135', '0144', '0153', '0162', '0171', '0800', '0900', '1800', '1900', '2800', '2900', '3800', '3900', '4800', '4900', '5800', '5900', '6800', '6900', '7800', '7900', '8800', '8900', '9800', '9900'],target = \"0000\") == 0\n assert candidate(deadends = ['0001', '0010', '0100', '1000', '1110', '1101', '1011', '0111'],target = \"1111\") == 8\n assert candidate(deadends = ['0000', '1234', '5678', '9999'],target = \"4321\") == -1\n assert candidate(deadends = ['0010', '0020', '0030', '0040', '0050'],target = \"0060\") == 4\n assert candidate(deadends = ['1110', '1101', '1011', '0111', '0011', '0101', '0110'],target = \"1111\") == 6\n assert candidate(deadends = ['0001', '0010', '0100', '1000', '1110', '1101', '1011', '0111', '0002', '0020'],target = \"3333\") == 14\n assert candidate(deadends = ['0011', '1100', '2211', '3322', '4433', '5544', '6655', '7766', '8877'],target = \"9988\") == 6\n assert candidate(deadends = ['0000', '0010', '0100', '0110', '1000', '1010', '1100', '1110', '0001', '0011', '0101', '0111', '1001', '1011', '1101'],target = \"1111\") == -1\n assert candidate(deadends = ['0010', '0100', '0111', '1000', '1001', '1010', '1100', '1111', '0001', '0011', '0110', '1101', '0101', '1011'],target = \"0000\") == 0\n assert candidate(deadends = ['0001', '0011', '0111', '1111', '0002', '0020', '0200', '2000', '0003', '0030', '0300', '3000'],target = \"0101\") == 2\n assert candidate(deadends = ['1112', '1121', '1211', '2111', '2221', '2212', '2122', '1222'],target = \"2222\") == 10\n assert candidate(deadends = ['8888', '8887', '8878', '8788', '7888', '9999', '9998', '9989', '9899', '8999'],target = \"0000\") == 0\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012'],target = \"0123\") == 6\n assert candidate(deadends = ['0010', '0100', '1000', '0001', '0002', '0020', '0200', '2000'],target = \"0003\") == 5\n assert candidate(deadends = ['0000', '0011', '0101', '0110', '1001', '1010', '1100', '1111', '2222'],target = \"3333\") == -1\n assert candidate(deadends = ['0001', '0009', '0010', '0090', '0100', '0900', '1000', '9000', '0002', '0020', '0200', '2000', '0008', '0080', '0800', '8000'],target = \"0000\") == 0\n assert candidate(deadends = ['0009', '0018', '0027', '0036', '0045', '0054', '0063', '0072', '0081'],target = \"0090\") == 1\n assert candidate(deadends = ['8888', '9999', '0000', '1111', '2222', '3333', '4444', '5555', '6666', '7777'],target = \"0001\") == -1\n assert candidate(deadends = ['0101', '1010', '1111', '0011', '1100', '1001', '0110', '0001', '0010', '0100'],target = \"9999\") == 4\n assert candidate(deadends = ['0000', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"1234\") == -1\n assert candidate(deadends = ['0000', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888'],target = \"9999\") == -1\n assert candidate(deadends = ['0001', '1112', '2223', '3334', '4445', '5556', '6667', '7778', '8889'],target = \"4321\") == 10\n assert candidate(deadends = ['0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009'],target = \"1000\") == 1\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888'],target = \"0000\") == 0\n assert candidate(deadends = ['0000', '0010', '0020', '0030', '0040', '0050', '0060', '0070', '0080', '0090'],target = \"0009\") == -1\n assert candidate(deadends = ['0123', '4567', '8901', '2345', '6789', '0987', '5432', '1098', '3210'],target = \"1111\") == 4\n assert candidate(deadends = ['1110', '1101', '1011', '0111', '2222', '3333', '4444', '5555', '6666', '7777'],target = \"1234\") == 10\n assert candidate(deadends = ['0123', '1234', '2345', '3456', '4567', '5678', '6789', '7890'],target = \"9876\") == 10\n assert candidate(deadends = ['9998', '9989', '9899', '8999', '0000', '0001', '0010', '0100', '1000'],target = \"1111\") == -1\n assert candidate(deadends = ['9998', '9989', '9899', '8999', '0001', '0010', '0100', '1000'],target = \"0000\") == 0\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123'],target = \"5678\") == 14\n assert candidate(deadends = ['1234', '4321', '2345', '5432', '3456', '6543', '4567', '7654', '5678', '8765'],target = \"9876\") == 10\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0123'],target = \"5432\") == 14\n assert candidate(deadends = ['0101', '1010', '1100', '1110', '1101', '0111', '1001', '0011'],target = \"1111\") == 6\n assert candidate(deadends = ['0123', '1230', '2301', '3012', '1023', '0231', '2310', '3102', '2013', '0132', '1320', '3201', '0213', '2130', '3021', '1203'],target = \"9999\") == 4\n assert candidate(deadends = ['1110', '1101', '1011', '0111', '1112', '1121', '1211', '2111', '1113', '1131', '1311', '3111'],target = \"1114\") == 7\n assert candidate(deadends = ['0123', '1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012', '0013', '0103', '0130', '1030', '1300', '3000'],target = \"0000\") == 0\n assert candidate(deadends = ['0001', '0012', '0102', '0201', '0210', '1002', '1020', '1200', '2001', '2010', '2100'],target = \"2222\") == 8\n assert candidate(deadends = ['1000', '2000', '3000', '4000', '5000', '6000', '7000', '8000', '9000'],target = \"0000\") == 0\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"8888\") == 8\n assert candidate(deadends = ['0101', '1212', '2323', '3434', '4545', '5656', '6767', '7878', '8989', '9090'],target = \"9090\") == 2\n assert candidate(deadends = ['0000', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"0000\") == 0\n assert candidate(deadends = ['0009', '0090', '0900', '9000', '1111'],target = \"2222\") == 8\n assert candidate(deadends = ['0001', '0010', '0100', '1000', '0011', '0110', '1100', '1010', '0101', '1001', '0111', '1110', '1101', '1011', '1111'],target = \"0000\") == 0\n assert candidate(deadends = ['0001', '0011', '0111', '1111', '2222', '3333', '4444', '5555', '6666', '7777', '8888', '9999'],target = \"0000\") == 0\n assert candidate(deadends = ['1110', '2220', '3330', '4440', '5550', '6660', '7770', '8880', '9990'],target = \"0001\") == 1\n assert candidate(deadends = ['1111', '2222', '3333', '4444', '5555'],target = \"6666\") == 16\n assert candidate(deadends = ['1001', '2002', '3003', '4004', '5005', '6006', '7007', '8008', '9009'],target = \"9999\") == 4\n assert candidate(deadends = ['1234', '2345', '3456', '4567', '5678', '6789', '7890', '8901', '9012'],target = \"0000\") == 0\n", "comparison": "exact"}, "public_tests": ["[\"0201\",\"0101\",\"0102\",\"1212\",\"2002\"]\n\"0202\"", "[\"8888\"]\n\"0009\"", "[\"8887\",\"8889\",\"8878\",\"8898\",\"8788\",\"8988\",\"7888\",\"9888\"]\n\"8888\""], "hints": ["We can think of this problem as a shortest path problem on a graph: there are `10000` nodes (strings `'0000'` to `'9999'`), and there is an edge between two nodes if they differ in one digit, that digit differs by 1 (wrapping around, so `'0'` and `'9'` differ by 1), and if *both* nodes are not in `deadends`."], "metadata": {"canonical_parameter_names": ["deadends", "target"], "leetcode_dataset_entry_point": "Solution().openLock", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:24+00:00", "tests_total": 110, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "hash-table", "string", "breadth-first-search", "bidirectional-search"]}, "language": "cpp", "interface": {"raw_signature": "int openLock(vector& deadends, string target) {", "container": "Solution", "callable": "openLock", "parameters": [{"name": "deadends", "type": "vector&"}, {"name": "target", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 753, "task_id": "cracking-the-safe", "difficulty": "Hard", "problem_description": "There is a safe protected by a password. The password is a sequence of n digits where each digit can be in the range [0, k - 1].\n\nThe safe has a peculiar way of checking the password. When you enter in a sequence, it checks the most recent n digits that were entered each time you type a digit.\n\n- For example, the correct password is \"345\" and you enter in \"012345\":\n - After typing 0, the most recent 3 digits is \"0\", which is incorrect.\n - After typing 1, the most recent 3 digits is \"01\", which is incorrect.\n - After typing 2, the most recent 3 digits is \"012\", which is incorrect.\n - After typing 3, the most recent 3 digits is \"123\", which is incorrect.\n - After typing 4, the most recent 3 digits is \"234\", which is incorrect.\n - After typing 5, the most recent 3 digits is \"345\", which is correct and the safe unlocks.\n\nReturn any string of minimum length that will unlock the safe at some point of entering it.\n\nExample 1:\n\nInput: n = 1, k = 2\nOutput: \"10\"\nExplanation: The password is a single digit, so enter each digit. \"01\" would also unlock the safe.\n\nExample 2:\n\nInput: n = 2, k = 2\nOutput: \"01100\"\nExplanation: For each possible password:\n- \"00\" is typed in starting from the 4^th digit.\n- \"01\" is typed in starting from the 1^st digit.\n- \"10\" is typed in starting from the 3^rd digit.\n- \"11\" is typed in starting from the 2^nd digit.\nThus \"01100\" will unlock the safe. \"10011\", and \"11001\" would also unlock the safe.\n\nConstraints:\n\n- 1 <= n <= 4\n- 1 <= k <= 10\n- 1 <= k^n <= 4096\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 1,k = 2) == \"10\"\n assert candidate(n = 1,k = 4) == \"3210\"\n assert candidate(n = 2,k = 4) == \"03322312113020100\"\n assert candidate(n = 2,k = 5) == \"04433423224131211403020100\"\n assert candidate(n = 3,k = 4) == \"003332322233123132122131121113302301303202201203102101103002001000\"\n assert candidate(n = 3,k = 3) == \"00222121112201202101102001000\"\n assert candidate(n = 2,k = 2) == \"01100\"\n assert candidate(n = 3,k = 2) == \"0011101000\"\n assert candidate(n = 2,k = 10) == \"09988978779686766958575655948474645449383736353433928272625242322918171615141312119080706050403020100\"\n assert candidate(n = 1,k = 3) == \"210\"\n assert candidate(n = 4,k = 2) == \"0001111010110010000\"\n assert candidate(n = 1,k = 10) == \"9876543210\"\n assert candidate(n = 2,k = 3) == \"0221120100\"\n assert candidate(n = 4,k = 3) == \"000222212122112111122201220212011202022101210211011102010102200120021001100200010000\"\n assert candidate(n = 1,k = 5) == \"43210\"\n assert candidate(n = 3,k = 5) == \"0044434333442342432332422322244134124143133123142132122141131121114403402401404303302301304203202201204103102101104003002001000\"\n assert candidate(n = 4,k = 4) == \"0003333232332232222333123313231223131332123213221222131212133112311321122113111211113330233013303230223012303130213011303033202320132032202220122031202120112030202033102310131032102210121031102110111030102010103300230013003200220012003100210011003000200010000\"\n assert candidate(n = 4,k = 5) == \"0004444343443343333444234424342334242443234324332333242323244223422432233224222322224441344124414341334123414241324122414144313431243143313331233142313231223141313144213421242143213321232142213221222141213121214411341124114311331123114211321122114111311121111444034402440144043403340234013404240324022401240414031402140114040443034302430143043303330233013304230323022301230413031302130113040303044203420242014204320332023201320422032202220122041203120212011204020302020441034102410141043103310231013104210321022101210411031102110111040103010201010440034002400140043003300230013004200320022001200410031002100110040003000200010000\"\n assert candidate(n = 3,k = 6) == \"00555454445534535434435334333552452352542442342532432332522422322255145135125154144134124153143133123152142132122151141131121115504503502501505404403402401405304303302301305204203202201205104103102101105004003002001000\"\n", "comparison": "exact"}, "public_tests": ["1\n2", "2\n2"], "hints": ["We can think of this problem as the problem of finding an Euler path (a path visiting every edge exactly once) on the following graph: there are k^{n-1} nodes with each node having k edges. It turns out this graph always has an Eulerian circuit (path starting where it ends.) We should visit each node in \"post-order\" so as to not get stuck in the graph prematurely."], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().crackSafe", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:26+00:00", "tests_total": 19, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "depth-first-search", "graph", "eulerian-circuit", "eulerian-path", "eulerian-graph"]}, "language": "cpp", "interface": {"raw_signature": "string crackSafe(int n, int k) {", "container": "Solution", "callable": "crackSafe", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 754, "task_id": "reach-a-number", "difficulty": "Medium", "problem_description": "You are standing at position 0 on an infinite number line. There is a destination at position target.\n\nYou can make some number of moves numMoves so that:\n\n- On each move, you can either go left or right.\n- During the i^th move (starting from i == 1 to i == numMoves), you take i steps in the chosen direction.\n\nGiven the integer target, return the minimum number of moves required (i.e., the minimum numMoves) to reach the destination.\n\nExample 1:\n\nInput: target = 2\nOutput: 3\nExplanation:\nOn the 1^st move, we step from 0 to 1 (1 step).\nOn the 2^nd move, we step from 1 to -1 (2 steps).\nOn the 3^rd move, we step from -1 to 2 (3 steps).\n\nExample 2:\n\nInput: target = 3\nOutput: 2\nExplanation:\nOn the 1^st move, we step from 0 to 1 (1 step).\nOn the 2^nd move, we step from 1 to 3 (2 steps).\n\nConstraints:\n\n- -10^9 <= target <= 10^9\n- target != 0\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(target = 2) == 3\n assert candidate(target = -20) == 7\n assert candidate(target = 15) == 5\n assert candidate(target = 10) == 4\n assert candidate(target = -5) == 5\n assert candidate(target = 1) == 1\n assert candidate(target = -1) == 1\n assert candidate(target = 3) == 2\n assert candidate(target = 20) == 7\n assert candidate(target = -10) == 4\n assert candidate(target = 5000) == 100\n assert candidate(target = 8) == 4\n assert candidate(target = 123456789) == 15713\n assert candidate(target = -21) == 6\n assert candidate(target = -123456) == 499\n assert candidate(target = 25) == 9\n assert candidate(target = -987654) == 1407\n assert candidate(target = 65535) == 362\n assert candidate(target = -17) == 6\n assert candidate(target = 999999999) == 44721\n assert candidate(target = 60) == 11\n assert candidate(target = 45) == 9\n assert candidate(target = 500000001) == 31625\n assert candidate(target = 1000) == 47\n assert candidate(target = 987654321) == 44445\n assert candidate(target = 500000) == 1000\n assert candidate(target = -987654321) == 44445\n assert candidate(target = -101) == 14\n assert candidate(target = 5) == 5\n assert candidate(target = 55) == 10\n assert candidate(target = 12345) == 157\n assert candidate(target = 17) == 6\n assert candidate(target = -500000) == 1000\n assert candidate(target = 1000000) == 1415\n assert candidate(target = -501) == 33\n assert candidate(target = -15) == 5\n assert candidate(target = -100) == 15\n assert candidate(target = 13) == 5\n assert candidate(target = 81) == 13\n assert candidate(target = 500) == 32\n assert candidate(target = -5000) == 100\n assert candidate(target = -1024) == 47\n assert candidate(target = 101) == 14\n assert candidate(target = -75) == 13\n assert candidate(target = 7) == 5\n assert candidate(target = -123456789) == 15713\n assert candidate(target = 1023) == 45\n assert candidate(target = 100) == 15\n assert candidate(target = 2048) == 64\n assert candidate(target = 1024) == 47\n assert candidate(target = -25) == 9\n assert candidate(target = -1000000000) == 44723\n assert candidate(target = 1000000000) == 44723\n assert candidate(target = 50) == 11\n assert candidate(target = 499999999) == 31625\n assert candidate(target = -500) == 32\n assert candidate(target = -1023) == 45\n assert candidate(target = -999999999) == 44721\n assert candidate(target = 14) == 7\n assert candidate(target = 4096) == 91\n assert candidate(target = 501) == 33\n assert candidate(target = -1000) == 47\n assert candidate(target = 123456) == 499\n assert candidate(target = 100000000) == 14143\n assert candidate(target = -100000000) == 14143\n assert candidate(target = -65535) == 362\n assert candidate(target = -12) == 7\n assert candidate(target = -999999) == 1414\n assert candidate(target = 200) == 20\n", "comparison": "exact"}, "public_tests": ["2", "3"], "hints": [], "metadata": {"canonical_parameter_names": ["target"], "leetcode_dataset_entry_point": "Solution().reachNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:28+00:00", "tests_total": 70, "tests_dropped": 1, "flags": [], "topic_tags": ["math", "binary-search"]}, "language": "cpp", "interface": {"raw_signature": "int reachNumber(int target) {", "container": "Solution", "callable": "reachNumber", "parameters": [{"name": "target", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 756, "task_id": "pyramid-transition-matrix", "difficulty": "Medium", "problem_description": "You are stacking blocks to form a pyramid. Each block has a color, which is represented by a single letter. Each row of blocks contains one less block than the row beneath it and is centered on top.\n\nTo make the pyramid aesthetically pleasing, there are only specific triangular patterns that are allowed. A triangular pattern consists of a single block stacked on top of two blocks. The patterns are given as a list of three-letter strings allowed, where the first two characters of a pattern represent the left and right bottom blocks respectively, and the third character is the top block.\n\n- For example, \"ABC\" represents a triangular pattern with a 'C' block stacked on top of an 'A' (left) and 'B' (right) block. Note that this is different from \"BAC\" where 'B' is on the left bottom and 'A' is on the right bottom.\n\nYou start with a bottom row of blocks bottom, given as a single string, that you must use as the base of the pyramid.\n\nGiven bottom and allowed, return true if you can build the pyramid all the way to the top such that every triangular pattern in the pyramid is in allowed, or false otherwise.\n\nExample 1:\n\nInput: bottom = \"BCD\", allowed = [\"BCC\",\"CDE\",\"CEA\",\"FFF\"]\nOutput: true\nExplanation: The allowed triangular patterns are shown on the right.\nStarting from the bottom (level 3), we can build \"CE\" on level 2 and then build \"A\" on level 1.\nThere are three triangular patterns in the pyramid, which are \"BCC\", \"CDE\", and \"CEA\". All are allowed.\n\nExample 2:\n\nInput: bottom = \"AAAA\", allowed = [\"AAB\",\"AAC\",\"BCD\",\"BBE\",\"DEF\"]\nOutput: false\nExplanation: The allowed triangular patterns are shown on the right.\nStarting from the bottom (level 4), there are multiple ways to build level 3, but trying all the possibilites, you will get always stuck before building level 1.\n\nConstraints:\n\n- 2 <= bottom.length <= 6\n- 0 <= allowed.length <= 216\n- allowed[i].length == 3\n- The letters in all input strings are from the set {'A', 'B', 'C', 'D', 'E', 'F'}.\n- All the values of allowed are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(bottom = \"FFFA\",allowed = ['FFF', 'FFA', 'FAF', 'AFF']) == True\n assert candidate(bottom = \"ABC\",allowed = ['ABD', 'BDC', 'CDB', 'BDD', 'DEF', 'DEE']) == False\n assert candidate(bottom = \"ABC\",allowed = ['ABD', 'BCE', 'DEF']) == True\n assert candidate(bottom = \"ABC\",allowed = ['ABD', 'BCE', 'DEF', 'FFF', 'GHI']) == True\n assert candidate(bottom = \"CDC\",allowed = ['ABA', 'ACA', 'BCD', 'BDA', 'CDE', 'CBD', 'DEC', 'DEF', 'FFF']) == False\n assert candidate(bottom = \"XXY\",allowed = ['XXY', 'XYX', 'YXX', 'XYY', 'YYX', 'YYY']) == True\n assert candidate(bottom = \"BCD\",allowed = ['BCC', 'CDE', 'CEA', 'FFF']) == True\n assert candidate(bottom = \"BDD\",allowed = ['ABB', 'ACB', 'BDC', 'BDB', 'BCC', 'BDD', 'CCC', 'BCB', 'CBC', 'DEC', 'CDB', 'DEB', 'CDE']) == False\n assert candidate(bottom = \"AB\",allowed = ['ABA', 'ABB']) == True\n assert candidate(bottom = \"AFA\",allowed = ['AFF', 'FAA', 'FFF']) == True\n assert candidate(bottom = \"XYZ\",allowed = ['XYA', 'YZB', 'AXY', 'BYZ', 'XYZ']) == False\n assert candidate(bottom = \"ABC\",allowed = ['ABD', 'BCE', 'DEF', 'FFF']) == True\n assert candidate(bottom = \"ABC\",allowed = ['ABA', 'BCB', 'ACA']) == True\n assert candidate(bottom = \"AAAA\",allowed = ['AAB', 'AAC', 'BCD', 'BBE', 'DEF']) == False\n assert candidate(bottom = \"CCD\",allowed = ['CCC', 'CDC', 'CDD', 'DDD']) == True\n assert candidate(bottom = \"XYZ\",allowed = ['XYX', 'YZY', 'ZXZ']) == True\n assert candidate(bottom = \"BCDE\",allowed = ['BCF', 'CDE', 'DEF', 'EFG', 'FGH']) == False\n assert candidate(bottom = \"ABCD\",allowed = ['ABA', 'BAC', 'CAD', 'ADC', 'BCD', 'CDB', 'DBD', 'BCF', 'CFF', 'FFA']) == True\n assert candidate(bottom = \"AABBB\",allowed = ['AAA', 'AAB', 'ABA', 'ABB', 'BBB', 'BBA', 'BAB', 'BAA']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABF', 'BCG', 'CDF', 'DEH', 'EFA', 'FGA', 'GHB', 'HHA', 'HIB', 'IBC', 'JCA', 'KBD', 'LCE', 'MDF', 'NEG', 'OFA', 'PGH', 'QHI', 'RIB', 'SJC', 'TKD', 'ULC', 'VMF', 'WNG', 'XOH', 'YPI', 'ZQJ']) == False\n assert candidate(bottom = \"ABCDE\",allowed = ['ABC', 'BCD', 'CDE', 'DEF', 'EFG', 'FGH', 'GHI']) == True\n assert candidate(bottom = \"FEDCBA\",allowed = ['FEG', 'EGD', 'GDC', 'DCA', 'CAB', 'ABF', 'BFB']) == False\n assert candidate(bottom = \"FEDCBA\",allowed = ['FED', 'EDC', 'DCB', 'CBA', 'BAC', 'ACB', 'CAB', 'ABC', 'BCA', 'BCD', 'CDB', 'DBD', 'BCF', 'CFF', 'FFA', 'ACF', 'CFA', 'FAC']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABG', 'BCG', 'CDE', 'DEC', 'EFA', 'FGH', 'GHI', 'HIJ', 'IJK', 'JKL', 'KLM', 'LMN', 'MNO', 'NOP', 'OPQ', 'PQR', 'QRS', 'RST', 'STU', 'TUV', 'UVW', 'VWX', 'WXY', 'XYZ']) == False\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABG', 'BCG', 'CDE', 'DEC', 'EFA', 'FGH']) == False\n assert candidate(bottom = \"ABCDE\",allowed = ['ABC', 'BCD', 'CDE', 'DEE', 'EEF', 'EFA', 'FAB', 'ABE', 'BEC', 'ECA', 'CAD', 'CDA', 'DAB', 'ACF', 'CFB']) == True\n assert candidate(bottom = \"ABCABC\",allowed = ['ABA', 'BCB', 'CAC', 'CBC', 'BDB', 'CDC', 'ADA', 'AEA', 'CEC', 'DEC', 'BEB', 'FEC']) == True\n assert candidate(bottom = \"FEDCBA\",allowed = ['FEE', 'EDD', 'DCC', 'CCB', 'BBA', 'AAB', 'ABD', 'BCE', 'DEF', 'FFF', 'GHI', 'IJH', 'KIG', 'LIF', 'MEG', 'NHF', 'OGI', 'PHJ', 'QIK', 'RLH', 'SGM', 'THN', 'UIO', 'VJP', 'WKQ', 'XLR', 'YMV', 'ZNW', 'AOX', 'BQP', 'CRS', 'DUT', 'EVV', 'FWW', 'GXW', 'HYX', 'IZY', 'JZZ']) == False\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABE', 'BCD', 'CDE', 'DEF', 'EFG', 'FGA', 'GAB', 'BCF', 'CDA', 'DEB', 'EFC', 'FAB', 'GBC', 'HCD', 'IEA', 'JFB', 'KGA', 'LHB', 'MIA', 'NJB', 'OKC', 'PLD', 'QME', 'RNF', 'SGO', 'THP', 'UIQ', 'VRJ', 'WTK', 'XSL', 'YMV', 'ZNU']) == False\n assert candidate(bottom = \"ABCD\",allowed = ['ABE', 'BEC', 'ECA', 'CAD', 'CDA', 'DAB', 'ABC']) == False\n assert candidate(bottom = \"ACF\",allowed = ['ACF', 'CFA', 'FAC', 'BAC', 'BCA', 'CAB', 'ACB', 'BCC', 'CBA', 'ABC']) == True\n assert candidate(bottom = \"FEDCBA\",allowed = ['FEE', 'EDC', 'DBA', 'CBA', 'BAE', 'AEG']) == False\n assert candidate(bottom = \"FEDCBA\",allowed = ['FEG', 'EGD', 'GDC', 'DCA', 'CAB', 'ABF', 'BFB', 'BAE', 'AEC', 'ECF', 'CFD', 'DFG', 'FGH', 'GHG', 'HGH', 'GGH']) == False\n assert candidate(bottom = \"ABCDE\",allowed = ['ABC', 'BCD', 'CDE', 'DEF', 'EFG', 'FGH', 'GHI', 'HIJ', 'IJK', 'JKL', 'KLM', 'LMN', 'MNO', 'NOP', 'OPQ', 'PQR', 'QRS', 'RST', 'STU', 'TUV', 'UVW', 'VWX', 'WXZ', 'XYZ', 'YZA', 'ZAB', 'ABB', 'BBD', 'CCD', 'DDF', 'EFF', 'GFF', 'HFF', 'IFF', 'JFF', 'KFF', 'LFF', 'MFF', 'NFF', 'OFF', 'PFF', 'QFF', 'RFF', 'SFF', 'TFF', 'UFF', 'VFF', 'WFF', 'XFF', 'YFF', 'ZFF']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABG', 'BCD', 'CDE', 'DEF', 'EFG', 'FGH']) == False\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABB', 'BCD', 'CDE', 'DEF', 'EFG', 'FGH', 'GHI', 'HIJ']) == False\n assert candidate(bottom = \"ABACD\",allowed = ['ABA', 'BAC', 'ACD', 'CDE', 'DEA', 'EAB', 'ABC', 'BCD', 'CDA', 'DAB', 'ABD', 'BCE', 'CEF', 'DFE', 'EFD', 'FAC']) == True\n assert candidate(bottom = \"ABCD\",allowed = ['ABE', 'BCE', 'CDE', 'DEF', 'EFG', 'FGH']) == False\n assert candidate(bottom = \"AABB\",allowed = ['AAB', 'ABA', 'BAA', 'AAA', 'BBB', 'ABB', 'BBA', 'BAB']) == True\n assert candidate(bottom = \"EABCD\",allowed = ['EAB', 'ABF', 'BCG', 'CDF', 'DEH', 'FGI', 'GHI']) == False\n assert candidate(bottom = \"ABCDE\",allowed = ['ABB', 'BCC', 'CDD', 'DEE', 'EFF', 'FGG', 'GHH', 'HHI']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABC', 'BCD', 'CDE', 'DEF', 'EFG', 'FGH', 'GHI', 'HIJ', 'IJK']) == True\n assert candidate(bottom = \"ABCABC\",allowed = ['ABA', 'BAC', 'ACB', 'BCA', 'CAB', 'CBA', 'AAB', 'BAA', 'ABB', 'BBA', 'AAC', 'CAA', 'ACC', 'CCA', 'BCC', 'CBB', 'BBB', 'AAA', 'CCC', 'FFF', 'GGG', 'HHH', 'III', 'JJJ', 'KKK', 'LLL', 'MMM', 'NNN', 'OOO', 'PPP', 'QQQ', 'RRR', 'SSS', 'TTT', 'UUU', 'VVV', 'WWW', 'XXX', 'YYY', 'ZZZ']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABA', 'BCB', 'CDC', 'DED', 'EFE', 'FGF', 'GAG', 'GBG', 'GGG', 'GHH', 'GHI', 'GJJ', 'GJG', 'HJH', 'HJI', 'HJG', 'IJJ', 'IJK', 'IJG', 'JKJ', 'JKK', 'JKG', 'KLL', 'KLK', 'KLG', 'LLL', 'LLM', 'LLG', 'MLM', 'MLN', 'MLG', 'NLO', 'NLP', 'NMG', 'OOO', 'OOP', 'ONP', 'PPP', 'PPQ', 'PMQ', 'QQQ', 'QQR', 'QSR', 'RRR', 'RSS', 'RST', 'SSS', 'SST', 'TTT', 'TTU', 'TTV', 'UUU', 'UUV', 'UVU', 'VVV', 'VVW', 'WWW']) == True\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABA', 'BCB', 'CDE', 'DEF', 'EFG', 'FGA', 'GAB', 'BDA', 'DBA', 'ADB', 'CDB', 'DCB', 'BEC', 'ECB', 'CEB', 'DCE', 'EDC', 'DEC', 'FED', 'EFD', 'FDE', 'DFE', 'EDE', 'DED', 'EEF', 'FEF', 'EFF', 'FFF', 'FGF', 'GFF', 'FGG', 'GGF', 'GFG', 'GGG']) == False\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABG', 'BCG', 'CDE', 'DEC', 'EFA', 'FGH', 'GHI']) == False\n assert candidate(bottom = \"ABCDEF\",allowed = ['ABC', 'BCD', 'CDE', 'DEF', 'EFA', 'FAB', 'ABD', 'BCE', 'CEF', 'DFE', 'EFD', 'FAC']) == True\n", "comparison": "exact"}, "public_tests": ["\"BCD\"\n[\"BCC\",\"CDE\",\"CEA\",\"FFF\"]", "\"AAAA\"\n[\"AAB\",\"AAC\",\"BCD\",\"BBE\",\"DEF\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["bottom", "allowed"], "leetcode_dataset_entry_point": "Solution().pyramidTransition", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:33+00:00", "tests_total": 73, "tests_dropped": 26, "flags": ["has_images"], "topic_tags": ["hash-table", "string", "backtracking", "bit-manipulation"]}, "language": "cpp", "interface": {"raw_signature": "bool pyramidTransition(string bottom, vector& allowed) {", "container": "Solution", "callable": "pyramidTransition", "parameters": [{"name": "bottom", "type": "string"}, {"name": "allowed", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 757, "task_id": "set-intersection-size-at-least-two", "difficulty": "Hard", "problem_description": "You are given a 2D integer array intervals where intervals[i] = [start_i, end_i] represents all the integers from start_i to end_i inclusively.\n\nA containing set is an array nums where each interval from intervals has at least two integers in nums.\n\n- For example, if intervals = [[1,3], [3,7], [8,9]], then [1,2,4,7,8,9] and [2,3,4,8,9] are containing sets.\n\nReturn the minimum possible size of a containing set.\n\nExample 1:\n\nInput: intervals = [[1,3],[3,7],[8,9]]\nOutput: 5\nExplanation: let nums = [2, 3, 4, 8, 9].\nIt can be shown that there cannot be any containing array of size 4.\n\nExample 2:\n\nInput: intervals = [[1,3],[1,4],[2,5],[3,5]]\nOutput: 3\nExplanation: let nums = [2, 3, 4].\nIt can be shown that there cannot be any containing array of size 2.\n\nExample 3:\n\nInput: intervals = [[1,2],[2,3],[2,4],[4,5]]\nOutput: 5\nExplanation: let nums = [1, 2, 3, 4, 5].\nIt can be shown that there cannot be any containing array of size 4.\n\nConstraints:\n\n- 1 <= intervals.length <= 3000\n- intervals[i].length == 2\n- 0 <= start_i < end_i <= 10^8\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(intervals = [[1, 10], [5, 10], [7, 15]]) == 2\n assert candidate(intervals = [[1, 2], [2, 3]]) == 3\n assert candidate(intervals = [[1, 3], [1, 4], [2, 5], [3, 5]]) == 3\n assert candidate(intervals = [[1, 3], [3, 7], [8, 9]]) == 5\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6]]) == 6\n assert candidate(intervals = [[1, 5], [2, 4], [3, 6]]) == 2\n assert candidate(intervals = [[1, 100], [50, 75], [25, 50], [75, 100]]) == 4\n assert candidate(intervals = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == 2\n assert candidate(intervals = [[1, 2], [2, 3], [2, 4], [4, 5]]) == 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]]) == 11\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7]]) == 7\n assert candidate(intervals = [[1, 10], [2, 5], [3, 7], [4, 8], [5, 9]]) == 3\n assert candidate(intervals = [[1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5]]) == 2\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == 8\n assert candidate(intervals = [[1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9], [7, 10], [8, 11], [9, 12], [10, 13]]) == 6\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8]]) == 5\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]]) == 20\n assert candidate(intervals = [[1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == 2\n assert candidate(intervals = [[1, 3], [3, 6], [6, 9], [9, 12], [12, 15]]) == 6\n assert candidate(intervals = [[1, 3], [2, 6], [4, 7], [6, 8], [8, 10]]) == 6\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6]]) == 2\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50]]) == 6\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13]]) == 4\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50], [45, 55], [50, 60], [55, 65]]) == 8\n assert candidate(intervals = [[1, 1000], [500, 750], [250, 500], [750, 1000], [100, 300], [300, 500], [500, 700], [700, 900], [900, 1100]]) == 6\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == 5\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91]]) == 2\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 6\n assert candidate(intervals = [[1, 3], [3, 7], [8, 9], [10, 12], [11, 13]]) == 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\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10]]) == 4\n assert candidate(intervals = [[1, 5], [1, 5], [1, 5], [1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13]]) == 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]]) == 2\n assert candidate(intervals = [[1, 20], [5, 15], [10, 25], [15, 30], [20, 40]]) == 4\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\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12]]) == 4\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11]]) == 6\n assert candidate(intervals = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [1, 3], [2, 4]]) == 4\n assert candidate(intervals = [[1, 50], [10, 30], [20, 40], [30, 50], [40, 60], [50, 70], [60, 80], [70, 90], [80, 100]]) == 6\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45]]) == 5\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\n assert candidate(intervals = [[1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10]]) == 2\n assert candidate(intervals = [[1, 3], [1, 3], [1, 3], [1, 3], [1, 3]]) == 2\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 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\n assert candidate(intervals = [[1, 3], [1, 5], [2, 4], [2, 6], [3, 5], [3, 7], [4, 6], [4, 8], [5, 7], [5, 9]]) == 4\n assert candidate(intervals = [[1, 3], [4, 6], [7, 9], [10, 12], [13, 15], [16, 18]]) == 12\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45]]) == 5\n assert candidate(intervals = [[1, 30], [10, 20], [15, 25], [20, 30], [25, 30]]) == 4\n assert candidate(intervals = [[1, 10], [2, 11], [3, 12], [4, 13], [5, 14], [6, 15], [7, 16], [8, 17], [9, 18], [10, 19]]) == 3\n assert candidate(intervals = [[1, 20], [2, 19], [3, 18], [4, 17], [5, 16], [6, 15], [7, 14], [8, 13], [9, 12], [10, 11]]) == 2\n assert candidate(intervals = [[5, 10], [6, 8], [7, 9], [8, 11], [9, 12]]) == 4\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], [13, 15], [14, 16], [15, 17]]) == 11\n assert candidate(intervals = [[1, 10], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 11\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\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7]]) == 2\n assert candidate(intervals = [[1, 3], [3, 7], [7, 11], [11, 15], [15, 19], [19, 23], [23, 27], [27, 31]]) == 9\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [5, 15], [10, 20], [15, 25]]) == 12\n assert candidate(intervals = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994]]) == 2\n assert candidate(intervals = [[1, 10], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4], [1, 3], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 10\n assert candidate(intervals = [[1, 3], [1, 4], [2, 5], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12]]) == 8\n assert candidate(intervals = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [11, 20], [12, 19], [13, 18], [14, 17], [15, 16]]) == 4\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\n assert candidate(intervals = [[1, 10], [11, 20], [21, 30], [31, 40], [41, 50], [51, 60], [61, 70], [71, 80], [81, 90], [91, 100]]) == 20\n assert candidate(intervals = [[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(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]]) == 30\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]]) == 8\n assert candidate(intervals = [[1, 10], [2, 5], [3, 6], [7, 12], [8, 9]]) == 4\n assert candidate(intervals = [[1, 10], [2, 10], [3, 10], [4, 10], [5, 10], [6, 10]]) == 2\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30]]) == 6\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30]]) == 7\n assert candidate(intervals = [[1, 100000000], [50000000, 100000000], [1, 50000000], [50000000, 100000000]]) == 3\n assert candidate(intervals = [[1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 2\n assert candidate(intervals = [[1, 10], [2, 8], [3, 6], [7, 10], [4, 5], [5, 9]]) == 4\n assert candidate(intervals = [[1, 10], [11, 20], [21, 30], [1, 20], [11, 30], [1, 30]]) == 6\n assert candidate(intervals = [[5, 15], [10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50]]) == 6\n assert candidate(intervals = [[1, 50], [5, 55], [10, 60], [15, 65], [20, 70], [25, 75], [30, 80], [35, 85], [40, 90], [45, 95]]) == 2\n assert candidate(intervals = [[1, 100], [1, 50], [50, 100], [25, 75], [75, 125], [100, 150]]) == 4\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40]]) == 4\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]]) == 20\n assert candidate(intervals = [[1, 100000000], [50000000, 75000000], [25000000, 50000000], [75000000, 100000000]]) == 4\n assert candidate(intervals = [[1, 50], [2, 49], [3, 48], [4, 47], [5, 46], [6, 45], [7, 44], [8, 43], [9, 42], [10, 41], [11, 40], [12, 39], [13, 38], [14, 37], [15, 36], [16, 35], [17, 34], [18, 33], [19, 32], [20, 31], [21, 30], [22, 29], [23, 28], [24, 27], [25, 26]]) == 2\n assert candidate(intervals = [[1, 3], [2, 5], [3, 7], [4, 9], [5, 11], [6, 13], [7, 15], [8, 17], [9, 19], [10, 21]]) == 6\n assert candidate(intervals = [[1, 100], [25, 50], [50, 75], [75, 100], [100, 125], [125, 150]]) == 6\n", "comparison": "exact"}, "public_tests": ["[[1,3],[3,7],[8,9]]", "[[1,3],[1,4],[2,5],[3,5]]", "[[1,2],[2,3],[2,4],[4,5]]"], "hints": [], "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().intersectionSizeTwo", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:35+00:00", "tests_total": 90, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "greedy", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "int intersectionSizeTwo(vector>& intervals) {", "container": "Solution", "callable": "intersectionSizeTwo", "parameters": [{"name": "intervals", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 761, "task_id": "special-binary-string", "difficulty": "Hard", "problem_description": "Special binary strings are binary strings with the following two properties:\n\n- The number of 0's is equal to the number of 1's.\n- Every prefix of the binary string has at least as many 1's as 0's.\n\nYou are given a special binary string s.\n\nA move consists of choosing two consecutive, non-empty, special substrings of s, and swapping them. Two strings are consecutive if the last character of the first string is exactly one index before the first character of the second string.\n\nReturn the lexicographically largest resulting string possible after applying the mentioned operations on the string.\n\nExample 1:\n\nInput: s = \"11011000\"\nOutput: \"11100100\"\nExplanation: The strings \"10\" [occuring at s[1]] and \"1100\" [at s[3]] are swapped.\nThis is the lexicographically largest string possible after some number of swaps.\n\nExample 2:\n\nInput: s = \"10\"\nOutput: \"10\"\n\nConstraints:\n\n- 1 <= s.length <= 50\n- s[i] is either '0' or '1'.\n- s is a special binary string.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"11010011\") == \"110100\"\n assert candidate(s = \"11011000\") == \"11100100\"\n assert candidate(s = \"11100100\") == \"11100100\"\n assert candidate(s = \"111000\") == \"111000\"\n assert candidate(s = \"101010\") == \"101010\"\n assert candidate(s = \"11001010\") == \"11001010\"\n assert candidate(s = \"11001100\") == \"11001100\"\n assert candidate(s = \"10\") == \"10\"\n assert candidate(s = \"1100\") == \"1100\"\n assert candidate(s = \"11010010\") == \"11010010\"\n assert candidate(s = \"10110011\") == \"110010\"\n assert candidate(s = \"10110010\") == \"11001010\"\n assert candidate(s = \"1010\") == \"1010\"\n assert candidate(s = \"11110000\") == \"11110000\"\n assert candidate(s = \"11101000\") == \"11101000\"\n assert candidate(s = \"10011010\") == \"10101010\"\n assert candidate(s = \"1101100011011000\") == \"1110010011100100\"\n assert candidate(s = \"111001100010\") == \"111001100010\"\n assert candidate(s = \"10101010110011\") == \"110010101010\"\n assert candidate(s = \"10111010000111\") == \"111010001010\"\n assert candidate(s = \"1100110011001010\") == \"1100110011001010\"\n assert candidate(s = \"11100100101000\") == \"111001001010\"\n assert candidate(s = \"11110011001000\") == \"11110011001000\"\n assert candidate(s = \"1111000100\") == \"1111000100\"\n assert candidate(s = \"1100110011001100\") == \"1100110011001100\"\n assert candidate(s = \"111111000011110000111100\") == \"\"\n assert candidate(s = \"110101001100\") == \"110101001100\"\n assert candidate(s = \"111001001100\") == \"111001001100\"\n assert candidate(s = \"110011110000110011001100\") == \"111100001100110011001100\"\n assert candidate(s = \"1111001111000000\") == \"1111110000110000\"\n assert candidate(s = \"1111101000011100\") == \"\"\n assert candidate(s = \"111010101000000000\") == \"111010101000\"\n assert candidate(s = \"101010101010101010101010\") == \"101010101010101010101010\"\n assert candidate(s = \"1101100011100100\") == \"1110010011100100\"\n assert candidate(s = \"10101010\") == \"10101010\"\n assert candidate(s = \"1001101010011010\") == \"1010101010101010\"\n assert candidate(s = \"11101010100100\") == \"11101010100100\"\n assert candidate(s = \"110110001001\") == \"111001001010\"\n assert candidate(s = \"11111100000011001100\") == \"11111100000011001100\"\n assert candidate(s = \"1100110011\") == \"11001100\"\n assert candidate(s = \"111001101001\") == \"\"\n assert candidate(s = \"1111001000\") == \"1111001000\"\n assert candidate(s = \"1110101010000000\") == \"111010101000\"\n assert candidate(s = \"1111100001110000\") == \"1111100001110000\"\n assert candidate(s = \"101100101100101100\") == \"110011001100101010\"\n assert candidate(s = \"110011001100\") == \"110011001100\"\n assert candidate(s = \"1110110000\") == \"1111001000\"\n assert candidate(s = \"1111100001100110\") == \"\"\n assert candidate(s = \"1101110000111000\") == \"1111000100111000\"\n assert candidate(s = \"11110000101010\") == \"11110000101010\"\n assert candidate(s = \"110011110000\") == \"111100001100\"\n assert candidate(s = \"111010011001\") == \"\"\n assert candidate(s = \"1111000011001100\") == \"1111000011001100\"\n assert candidate(s = \"101010101010\") == \"101010101010\"\n assert candidate(s = \"11101001100100\") == \"11101001100100\"\n assert candidate(s = \"11111100001010101000\") == \"11111100001010101000\"\n assert candidate(s = \"110010110100\") == \"110100110010\"\n assert candidate(s = \"1101100011001100\") == \"1110010011001100\"\n assert candidate(s = \"11001110100011\") == \"111010001100\"\n assert candidate(s = \"110110100001\") == \"111010010010\"\n assert candidate(s = \"1111000010001100\") == \"11110000110010\"\n assert candidate(s = \"101101011000\") == \"111001010010\"\n assert candidate(s = \"1110101001010100\") == \"1110101001010100\"\n assert candidate(s = \"11111000011000\") == \"11111000011000\"\n assert candidate(s = \"1101100100\") == \"1110010100\"\n assert candidate(s = \"11111100000010101010\") == \"11111100000010101010\"\n assert candidate(s = \"1111100011000100\") == \"1111100011000100\"\n assert candidate(s = \"110110010010\") == \"111001010010\"\n assert candidate(s = \"111010011000\") == \"111010011000\"\n assert candidate(s = \"111011001110000110110011\") == \"\"\n assert candidate(s = \"1101100010011100\") == \"1110010011001010\"\n assert candidate(s = \"1110011010001010\") == \"1110100110001010\"\n assert candidate(s = \"110110111000011100001100\") == \"111110001001110001001100\"\n assert candidate(s = \"1100111100001100\") == \"1111000011001100\"\n assert candidate(s = \"11001100110011001100\") == \"11001100110011001100\"\n assert candidate(s = \"1110110100100001\") == \"1111010010100010\"\n assert candidate(s = \"111100110000\") == \"111100110000\"\n assert candidate(s = \"111100001010\") == \"111100001010\"\n assert candidate(s = \"111110001111000011001100\") == \"\"\n assert candidate(s = \"111011001000\") == \"111100101000\"\n assert candidate(s = \"1110001110100000\") == \"11101000111000\"\n assert candidate(s = \"1111110000001010\") == \"1111110000001010\"\n assert candidate(s = \"111010101010010100101010\") == \"111010101010010100101010\"\n assert candidate(s = \"111011100000\") == \"111110001000\"\n assert candidate(s = \"110010101100\") == \"110011001010\"\n assert candidate(s = \"101100111010010011001100\") == \"111010010011001100110010\"\n assert candidate(s = \"110011001010\") == \"110011001010\"\n assert candidate(s = \"11100011100010\") == \"11100011100010\"\n assert candidate(s = \"1101101000\") == \"1110100100\"\n assert candidate(s = \"1011100010111000\") == \"1110001110001010\"\n assert candidate(s = \"11101001011000\") == \"11101001100100\"\n assert candidate(s = \"10110011110000\") == \"11110000110010\"\n assert candidate(s = \"10110110101000\") == \"11101010010010\"\n assert candidate(s = \"111001100111000011001100\") == \"111100011001100011001100\"\n assert candidate(s = \"1110011001\") == \"\"\n assert candidate(s = \"11011001100110\") == \"\"\n assert candidate(s = \"111111000000101010\") == \"111111000000101010\"\n assert candidate(s = \"11010110100011\") == \"111010010100\"\n assert candidate(s = \"110110010100\") == \"111001010100\"\n assert candidate(s = \"1110010100100011\") == \"1110010100110010\"\n assert candidate(s = \"11101100110010\") == \"\"\n assert candidate(s = \"11110100100100\") == \"11110100100100\"\n assert candidate(s = \"11010110001010\") == \"11100101001010\"\n assert candidate(s = \"1111000011110000\") == \"1111000011110000\"\n assert candidate(s = \"1110001100111000\") == \"1110001110001100\"\n assert candidate(s = \"11001111110000111100001100\") == \"1100\"\n assert candidate(s = \"101110100010\") == \"111010001010\"\n assert candidate(s = \"110101010010\") == \"110101010010\"\n assert candidate(s = \"110110011010010010110010\") == \"111010011001010011001010\"\n assert candidate(s = \"11011001110000\") == \"11110001100100\"\n assert candidate(s = \"11111000001010\") == \"11111000001010\"\n assert candidate(s = \"1101110000\") == \"1111000100\"\n assert candidate(s = \"111001110000\") == \"111100011000\"\n assert candidate(s = \"111111100000110011110000\") == \"\"\n assert candidate(s = \"110011100100\") == \"111001001100\"\n assert candidate(s = \"110011100011\") == \"1110001100\"\n assert candidate(s = \"111000110100\") == \"111000110100\"\n assert candidate(s = \"1110110011000000\") == \"11110011001000\"\n assert candidate(s = \"1110100011100010\") == \"1110100011100010\"\n assert candidate(s = \"101110001010\") == \"111000101010\"\n assert candidate(s = \"110110110110000000\") == \"1111100100100100\"\n assert candidate(s = \"111100001100\") == \"111100001100\"\n assert candidate(s = \"10101010101010\") == \"10101010101010\"\n assert candidate(s = \"111100111100110011001100\") == \"\"\n assert candidate(s = \"1101101100100010\") == \"1111001010010010\"\n assert candidate(s = \"1100110011011000\") == \"1110010011001100\"\n assert candidate(s = \"101101101000\") == \"111010010010\"\n", "comparison": "exact"}, "public_tests": ["\"11011000\"", "\"10\""], "hints": ["Draw a line from (x, y) to (x+1, y+1) if we see a \"1\", else to (x+1, y-1). A special substring is just a line that starts and ends at the same y-coordinate, and that is the lowest y-coordinate reached. Call a mountain a special substring with no special prefixes - ie. only at the beginning and end is the lowest y-coordinate reached. If F is the answer function, and S has mountain decomposition M1,M2,M3,...,Mk, then the answer is: reverse_sorted(F(M1), F(M2), ..., F(Mk)). However, you'll also need to deal with the case that S is a mountain, such as 11011000 -> 11100100."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().makeLargestSpecial", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:42+00:00", "tests_total": 127, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "divide-and-conquer", "sorting"]}, "language": "cpp", "interface": {"raw_signature": "string makeLargestSpecial(string s) {", "container": "Solution", "callable": "makeLargestSpecial", "parameters": [{"name": "s", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 762, "task_id": "prime-number-of-set-bits-in-binary-representation", "difficulty": "Easy", "problem_description": "Given two integers left and right, return the count of numbers in the inclusive range [left, right] having a prime number of set bits in their binary representation.\n\nRecall that the number of set bits an integer has is the number of 1's present when written in binary.\n\n- For example, 21 written in binary is 10101, which has 3 set bits.\n\nExample 1:\n\nInput: left = 6, right = 10\nOutput: 4\nExplanation:\n6 -> 110 (2 set bits, 2 is prime)\n7 -> 111 (3 set bits, 3 is prime)\n8 -> 1000 (1 set bit, 1 is not prime)\n9 -> 1001 (2 set bits, 2 is prime)\n10 -> 1010 (2 set bits, 2 is prime)\n4 numbers have a prime number of set bits.\n\nExample 2:\n\nInput: left = 10, right = 15\nOutput: 5\nExplanation:\n10 -> 1010 (2 set bits, 2 is prime)\n11 -> 1011 (3 set bits, 3 is prime)\n12 -> 1100 (2 set bits, 2 is prime)\n13 -> 1101 (3 set bits, 3 is prime)\n14 -> 1110 (3 set bits, 3 is prime)\n15 -> 1111 (4 set bits, 4 is not prime)\n5 numbers have a prime number of set bits.\n\nConstraints:\n\n- 1 <= left <= right <= 10^6\n- 0 <= right - left <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(left = 100,right = 105) == 3\n assert candidate(left = 500,right = 1000) == 253\n assert candidate(left = 1,right = 100) == 65\n assert candidate(left = 6,right = 10) == 4\n assert candidate(left = 999900,right = 1000000) == 30\n assert candidate(left = 1,right = 20) == 14\n assert candidate(left = 5,right = 5) == 1\n assert candidate(left = 10,right = 15) == 5\n assert candidate(left = 1000,right = 10000) == 3722\n assert candidate(left = 500,right = 750) == 132\n assert candidate(left = 100000,right = 100010) == 4\n assert candidate(left = 222222,right = 222322) == 18\n assert candidate(left = 25000,right = 30000) == 1450\n assert candidate(left = 1024,right = 2048) == 476\n assert candidate(left = 100000,right = 100100) == 20\n assert candidate(left = 750000,right = 750100) == 40\n assert candidate(left = 262143,right = 262243) == 56\n assert candidate(left = 1000,right = 1100) == 51\n assert candidate(left = 5000,right = 5500) == 217\n assert candidate(left = 876543,right = 876643) == 25\n assert candidate(left = 6000,right = 7000) == 389\n assert candidate(left = 999990,right = 1000000) == 5\n assert candidate(left = 12345,right = 12445) == 49\n assert candidate(left = 131072,right = 131272) == 107\n assert candidate(left = 99999,right = 100010) == 4\n assert candidate(left = 555555,right = 555655) == 23\n assert candidate(left = 10000,right = 10100) == 34\n assert candidate(left = 50000,right = 50100) == 26\n assert candidate(left = 9999,right = 10010) == 6\n assert candidate(left = 1000,right = 1050) == 24\n assert candidate(left = 999990,right = 999999) == 4\n assert candidate(left = 200000,right = 200100) == 19\n assert candidate(left = 1000,right = 1024) == 7\n assert candidate(left = 524288,right = 524388) == 56\n assert candidate(left = 100000,right = 101000) == 295\n assert candidate(left = 9999,right = 10099) == 34\n assert candidate(left = 200000,right = 201000) == 290\n assert candidate(left = 999,right = 2000) == 473\n assert candidate(left = 250000,right = 250100) == 19\n assert candidate(left = 1,right = 1000) == 530\n assert candidate(left = 3000,right = 4000) == 393\n assert candidate(left = 10000,right = 10050) == 19\n assert candidate(left = 5000,right = 6000) == 402\n assert candidate(left = 990000,right = 990100) == 48\n assert candidate(left = 987654,right = 987680) == 4\n assert candidate(left = 1023,right = 2048) == 476\n assert candidate(left = 262144,right = 262244) == 56\n assert candidate(left = 123456,right = 123556) == 19\n assert candidate(left = 1023,right = 2047) == 476\n assert candidate(left = 800000,right = 801000) == 291\n assert candidate(left = 5000,right = 5100) == 37\n assert candidate(left = 800000,right = 800100) == 18\n assert candidate(left = 131070,right = 131080) == 8\n assert candidate(left = 1234,right = 5678) == 1954\n assert candidate(left = 999,right = 1010) == 5\n assert candidate(left = 543210,right = 543310) == 38\n assert candidate(left = 111111,right = 111211) == 20\n assert candidate(left = 1000,right = 2000) == 473\n assert candidate(left = 999950,right = 1000000) == 9\n assert candidate(left = 500000,right = 500100) == 24\n assert candidate(left = 500,right = 800) == 157\n assert candidate(left = 765432,right = 765532) == 40\n assert candidate(left = 65535,right = 65635) == 56\n assert candidate(left = 1000,right = 1200) == 102\n assert candidate(left = 75000,right = 80000) == 1371\n assert candidate(left = 5,right = 10000) == 4251\n assert candidate(left = 987654,right = 987754) == 16\n assert candidate(left = 5000,right = 5050) == 22\n assert candidate(left = 500000,right = 501000) == 310\n assert candidate(left = 50000,right = 60000) == 2742\n assert candidate(left = 104743,right = 104843) == 19\n assert candidate(left = 8192,right = 16384) == 2821\n assert candidate(left = 200,right = 300) == 55\n", "comparison": "exact"}, "public_tests": ["6\n10", "10\n15"], "hints": ["Write a helper function to count the number of set bits in a number, then check whether the number of set bits is 2, 3, 5, 7, 11, 13, 17 or 19."], "metadata": {"canonical_parameter_names": ["left", "right"], "leetcode_dataset_entry_point": "Solution().countPrimeSetBits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:44+00:00", "tests_total": 79, "tests_dropped": 6, "flags": [], "topic_tags": ["math", "bit-manipulation", "primality-test"]}, "language": "cpp", "interface": {"raw_signature": "int countPrimeSetBits(int left, int right) {", "container": "Solution", "callable": "countPrimeSetBits", "parameters": [{"name": "left", "type": "int"}, {"name": "right", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 763, "task_id": "partition-labels", "difficulty": "Medium", "problem_description": "You are given a string s. We want to partition the string into as many parts as possible so that each letter appears in at most one part. For example, the string \"ababcc\" can be partitioned into [\"abab\", \"cc\"], but partitions such as [\"aba\", \"bcc\"] or [\"ab\", \"ab\", \"cc\"] are invalid.\n\nNote that the partition is done so that after concatenating all the parts in order, the resultant string should be s.\n\nReturn a list of integers representing the size of these parts.\n\nExample 1:\n\nInput: s = \"ababcbacadefegdehijhklij\"\nOutput: [9,7,8]\nExplanation:\nThe partition is \"ababcbaca\", \"defegde\", \"hijhklij\".\nThis is a partition so that each letter appears in at most one part.\nA partition like \"ababcbacadefegde\", \"hijhklij\" is incorrect, because it splits s into less parts.\n\nExample 2:\n\nInput: s = \"eccbbbbdec\"\nOutput: [10]\n\nConstraints:\n\n- 1 <= s.length <= 500\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcdabcde\") == [8, 1]\n assert candidate(s = \"aaaaaabbbbbccccc\") == [6, 5, 5]\n assert candidate(s = \"xyzxyzxyz\") == [9]\n assert candidate(s = \"aaaabbbbbccccc\") == [4, 5, 5]\n assert candidate(s = \"abcdabcdeabcdabcde\") == [18]\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == [1, 1, 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(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == [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(s = \"zab\") == [1, 1, 1]\n assert candidate(s = \"a\") == [1]\n assert candidate(s = \"zabbcdefghijklmnopqrstuvwxyz\") == [28]\n assert candidate(s = \"aabbccddeee\") == [2, 2, 2, 2, 3]\n assert candidate(s = \"abcdcba\") == [7]\n assert candidate(s = \"ababababab\") == [10]\n assert candidate(s = \"zabzabc\") == [6, 1]\n assert candidate(s = \"abababab\") == [8]\n assert candidate(s = \"abcde\") == [1, 1, 1, 1, 1]\n assert candidate(s = \"ababcbacadefegdehijhklij\") == [9, 7, 8]\n assert candidate(s = \"eccbbbbdec\") == [10]\n assert candidate(s = \"abcabcdabcdeabcdefabcdefg\") == [24, 1]\n assert candidate(s = \"xyzzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyx\") == [66]\n assert candidate(s = \"aaaaaaaaaabbbbbbbbccccccccddddddddeeeeeeeefffffffffghhhhhhhhiiiiiiiijjjjjjjjkkkkkkkkllllllllmmmmmmmmnnnnnnnnooooooooppppppppqqqqqqqqrrrrrrrrssssssssttttttttuuuuuuuuvvvvvvvvwwwwwwwwxxxxxxxxxyyyyyyyyzzzzzzzz\") == [10, 8, 8, 8, 8, 9, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 8]\n assert candidate(s = \"abcdabcdeabcde\") == [14]\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggg\") == [4, 4, 4, 4, 4, 4, 4]\n assert candidate(s = \"abcadefeghijklmnopqrstuvwxyzzxywvutsrqponmlkjihgfedcba\") == [54]\n assert candidate(s = \"xyzzyxzyxzzyxzyxzyxzzyxzyxzyxzzyxzyxzzyxzyxzyxzzyxzyxzyxzzyxzyxzyxzyxzzyxzyxzyxzyx\") == [82]\n assert candidate(s = \"zzyzxzyzxzyz\") == [12]\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\") == [30]\n assert candidate(s = \"abacabadabacabadabacabadabacabad\") == [32]\n assert candidate(s = \"abcdexyzabcdexyzabcdexyzabcdexyz\") == [32]\n assert candidate(s = \"abcdefghfedcba\") == [14]\n assert candidate(s = \"abcdefghihgfedcbaijklmnopqrstuvutsrqponmlkjihgfedcba\") == [52]\n assert candidate(s = \"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij\") == [80]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzyxwvutsrqponmlkjihgfedcba\") == [78]\n assert candidate(s = \"mnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == [66]\n assert candidate(s = \"ababcbacadeafgafghijghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == [66]\n assert candidate(s = \"zzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbaaazzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbaaazzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbaaazzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbaaa\") == [212]\n assert candidate(s = \"abcdefgabcdefgabcdefg\") == [21]\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == [70]\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == [62]\n assert candidate(s = \"abcdefghihgfedcba\") == [17]\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg\") == [63]\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\") == [66]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == [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, 36]\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == [52]\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\") == [30]\n assert candidate(s = \"mnopqrsmnopqrstuvwpqrstuv\") == [25]\n assert candidate(s = \"abcabcabcabcabcabc\") == [18]\n assert candidate(s = \"lkjihgfedcbaedcba\") == [1, 1, 1, 1, 1, 1, 1, 10]\n assert candidate(s = \"abcdefghijkabcdefghijk\") == [22]\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == [52]\n assert candidate(s = \"abcdefedcbafedcba\") == [17]\n assert candidate(s = \"aaaaabbbbccccdddddeeeeefffffggggghhhhiiiiijjjjkkkkllllmmmmnnnnoooo\") == [5, 4, 4, 5, 5, 5, 5, 4, 5, 4, 4, 4, 4, 4, 4]\n assert candidate(s = \"mnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == [28, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == [78]\n assert candidate(s = \"zabacabadefegdehijhklijkmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba\") == [63]\n assert candidate(s = \"mnopqrstuabcrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == [47]\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzzzzzzzzzzzz\") == [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, 18]\n assert candidate(s = \"xyzxyzxyzxyz\") == [12]\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba\") == [51]\n assert candidate(s = \"abacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbac\") == [64]\n assert candidate(s = \"aabababababcabcabcabcdabcdabcdabcdeabcdeabcdefabcdef\") == [52]\n assert candidate(s = \"zababzabz\") == [9]\n assert candidate(s = \"aabbccddeeffaabbccddeeff\") == [24]\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhh\") == [4, 4, 4, 4, 4, 4, 4, 4]\n", "comparison": "exact"}, "public_tests": ["\"ababcbacadefegdehijhklij\"", "\"eccbbbbdec\""], "hints": ["Try to greedily choose the smallest partition that includes the first letter. If you have something like \"abaccbdeffed\", then you might need to add b. You can use an map like \"last['b'] = 5\" to help you expand the width of your partition."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().partitionLabels", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:46+00:00", "tests_total": 64, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "two-pointers", "string", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "vector partitionLabels(string s) {", "container": "Solution", "callable": "partitionLabels", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 764, "task_id": "largest-plus-sign", "difficulty": "Medium", "problem_description": "You are given an integer n. You have an n x n binary grid grid with all values initially 1's except for some indices given in the array mines. The i^th element of the array mines is defined as mines[i] = [x_i, y_i] where grid[x_i][y_i] == 0.\n\nReturn the order of the largest axis-aligned plus sign of 1's contained in grid. If there is none, return 0.\n\nAn axis-aligned plus sign of 1's of order k has some center grid[r][c] == 1 along with four arms of length k - 1 going up, down, left, and right, and made of 1's. Note that there could be 0's or 1's beyond the arms of the plus sign, only the relevant area of the plus sign is checked for 1's.\n\nExample 1:\n\nInput: n = 5, mines = [[4,2]]\nOutput: 2\nExplanation: In the above grid, the largest plus sign can only be of order 2. One of them is shown.\n\nExample 2:\n\nInput: n = 1, mines = [[0,0]]\nOutput: 0\nExplanation: There is no plus sign, so return 0.\n\nConstraints:\n\n- 1 <= n <= 500\n- 1 <= mines.length <= 5000\n- 0 <= x_i, y_i < n\n- All the pairs (x_i, y_i) are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 7,mines = [[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]]) == 3\n assert candidate(n = 4,mines = [[0, 0], [0, 3], [3, 0], [3, 3]]) == 2\n assert candidate(n = 5,mines = [[1, 1], [1, 3], [3, 1], [3, 3]]) == 3\n assert candidate(n = 5,mines = [[0, 0], [0, 4], [4, 0], [4, 4]]) == 3\n assert candidate(n = 6,mines = [[1, 1], [2, 2], [3, 3], [4, 4]]) == 2\n assert candidate(n = 6,mines = [[1, 1], [1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2], [3, 3]]) == 2\n assert candidate(n = 1,mines = [[0, 0]]) == 0\n assert candidate(n = 500,mines = [[250, 250]]) == 250\n assert candidate(n = 4,mines = [[0, 0], [3, 3]]) == 2\n assert candidate(n = 3,mines = [[0, 0], [0, 1], [0, 2], [1, 0], [1, 2], [2, 0], [2, 1], [2, 2]]) == 1\n assert candidate(n = 3,mines = [[1, 1]]) == 1\n assert candidate(n = 5,mines = [[0, 1], [1, 0], [1, 2], [2, 1], [2, 3], [3, 2], [3, 4], [4, 3]]) == 1\n assert candidate(n = 5,mines = [[4, 2]]) == 2\n assert candidate(n = 3,mines = [[0, 0], [1, 1], [2, 2]]) == 1\n assert candidate(n = 6,mines = [[1, 2], [2, 1], [2, 3], [3, 2]]) == 2\n assert candidate(n = 100,mines = [[50, 50], [49, 49], [49, 51], [51, 49], [51, 51], [49, 50], [50, 49], [50, 51], [60, 60], [30, 30]]) == 49\n assert candidate(n = 15,mines = [[5, 5], [5, 6], [5, 7], [6, 5], [6, 7], [7, 5], [7, 6], [7, 7], [0, 0], [14, 14]]) == 7\n assert candidate(n = 500,mines = [[250, 250], [249, 249], [251, 251], [248, 248], [252, 252], [247, 247], [253, 253]]) == 247\n assert candidate(n = 25,mines = [[10, 10], [11, 11], [12, 12], [13, 13], [10, 12], [12, 10], [11, 9], [11, 13], [9, 11], [13, 11]]) == 11\n assert candidate(n = 10,mines = [[0, 0], [9, 9], [0, 9], [9, 0], [4, 4], [5, 5]]) == 4\n assert candidate(n = 10,mines = [[5, 5], [5, 6], [6, 5], [4, 5], [5, 4]]) == 4\n assert candidate(n = 15,mines = [[5, 5], [5, 6], [5, 7], [6, 5], [6, 7], [7, 5], [7, 6], [7, 7]]) == 7\n assert candidate(n = 75,mines = [[37, 37], [36, 36], [36, 38], [38, 36], [38, 38], [36, 37], [37, 36], [37, 38]]) == 36\n assert candidate(n = 30,mines = [[10, 10], [11, 10], [9, 10], [10, 9], [10, 11], [15, 15], [14, 15], [16, 15], [15, 14], [15, 16], [20, 20], [21, 20], [19, 20], [20, 19], [20, 21]]) == 14\n assert candidate(n = 20,mines = [[5, 5], [5, 14], [14, 5], [14, 14], [10, 10], [10, 9], [9, 10], [9, 9], [10, 8], [8, 10], [0, 0], [19, 19]]) == 9\n assert candidate(n = 500,mines = [[250, 250], [249, 249], [249, 251], [251, 249], [251, 251], [249, 250], [250, 249], [250, 251], [200, 200], [300, 300]]) == 249\n assert candidate(n = 7,mines = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [0, 6], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1], [6, 0]]) == 2\n assert candidate(n = 100,mines = [[50, 50], [49, 49], [51, 51], [48, 48], [52, 52], [47, 47], [53, 53], [46, 46], [54, 54], [45, 45], [55, 55]]) == 45\n assert candidate(n = 500,mines = [[250, 250], [250, 251], [250, 249], [249, 250], [251, 250]]) == 249\n assert candidate(n = 10,mines = [[3, 3], [3, 4], [4, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8]]) == 3\n assert candidate(n = 12,mines = [[0, 0], [11, 11], [5, 5], [6, 5], [5, 6], [6, 6], [7, 7], [8, 8], [4, 4], [4, 3], [4, 2], [3, 4], [2, 4]]) == 4\n assert candidate(n = 20,mines = [[5, 5], [5, 6], [6, 5], [6, 6], [10, 10], [10, 11], [11, 10], [11, 11]]) == 10\n assert candidate(n = 7,mines = [[1, 2], [2, 2], [3, 2], [2, 1], [2, 3], [2, 4], [2, 5], [2, 6]]) == 2\n assert candidate(n = 6,mines = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [0, 5], [1, 4], [2, 3], [3, 2], [4, 1], [5, 0]]) == 1\n assert candidate(n = 25,mines = [[0, 0], [0, 1], [0, 2], [0, 22], [0, 23], [0, 24], [1, 0], [1, 24], [2, 0], [2, 24], [22, 0], [22, 24], [23, 0], [23, 24], [24, 0], [24, 1], [24, 2], [24, 22], [24, 23], [24, 24]]) == 13\n assert candidate(n = 20,mines = [[1, 1], [1, 18], [18, 1], [18, 18], [9, 9], [10, 10], [11, 11]]) == 9\n assert candidate(n = 10,mines = [[5, 5], [4, 4], [6, 6], [5, 4], [4, 5], [5, 6], [6, 5]]) == 4\n assert candidate(n = 100,mines = [[10, 10], [10, 11], [10, 12], [11, 10], [11, 12], [12, 10], [12, 11], [12, 12]]) == 50\n assert candidate(n = 200,mines = [[100, 100], [100, 101], [101, 100], [99, 99], [101, 99], [99, 101], [98, 98], [102, 102]]) == 98\n assert candidate(n = 10,mines = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 3\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [7, 9], [8, 7], [8, 9], [9, 7], [9, 8], [9, 9], [5, 5], [5, 6], [5, 7], [6, 5], [6, 7], [7, 5], [7, 6], [7, 7], [8, 5], [8, 6], [8, 7]]) == 5\n assert candidate(n = 15,mines = [[3, 3], [3, 4], [3, 5], [4, 3], [4, 5], [5, 3], [5, 4], [5, 5]]) == 8\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [8, 7], [8, 8], [7, 9], [8, 9], [9, 7], [9, 8], [9, 9]]) == 7\n assert candidate(n = 10,mines = [[0, 5], [5, 0], [5, 5], [9, 5], [5, 9]]) == 5\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [8, 7], [8, 8], [6, 6], [6, 7], [6, 8], [6, 9], [7, 6], [7, 9], [8, 6], [8, 9], [9, 6], [9, 7], [9, 8], [9, 9], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [6, 5], [6, 10], [7, 5], [7, 10], [8, 5], [8, 10], [9, 5], [9, 10], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9]]) == 5\n assert candidate(n = 25,mines = [[12, 12], [11, 11], [13, 13], [10, 10], [11, 10], [10, 11], [13, 12], [12, 11], [11, 13], [12, 13], [13, 11], [10, 12], [12, 10], [12, 14], [14, 12], [11, 12], [13, 12], [12, 11], [12, 13]]) == 10\n assert candidate(n = 10,mines = [[5, 5], [4, 4], [6, 6], [5, 6], [6, 5], [5, 4], [4, 5], [3, 3], [7, 7], [2, 2], [8, 8], [1, 1], [9, 9]]) == 3\n assert candidate(n = 7,mines = [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]]) == 3\n assert candidate(n = 25,mines = [[5, 5], [5, 19], [19, 5], [19, 19], [12, 12], [13, 13], [12, 13], [13, 12]]) == 12\n assert candidate(n = 7,mines = [[1, 2], [2, 2], [3, 2], [2, 1], [2, 3], [2, 4], [2, 5], [4, 2], [5, 2], [6, 2]]) == 2\n assert candidate(n = 8,mines = [[2, 2], [2, 3], [3, 2], [3, 3], [4, 4], [4, 5], [5, 4], [5, 5]]) == 2\n assert candidate(n = 7,mines = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6]]) == 2\n assert candidate(n = 10,mines = [[4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6], [6, 4], [6, 5], [6, 6]]) == 4\n assert candidate(n = 30,mines = [[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], [0, 0]]) == 14\n assert candidate(n = 10,mines = [[1, 1], [1, 2], [2, 1], [2, 2], [3, 3], [3, 4], [4, 3], [4, 4], [5, 5], [5, 6], [6, 5], [6, 6], [7, 7], [7, 8], [8, 7], [8, 8]]) == 3\n assert candidate(n = 8,mines = [[1, 1], [1, 6], [6, 1], [6, 6], [2, 2], [2, 5], [5, 2], [5, 5]]) == 4\n assert candidate(n = 300,mines = [[150, 150], [149, 149], [149, 151], [151, 149], [151, 151], [149, 150], [150, 149], [150, 151], [100, 100], [200, 200]]) == 149\n assert candidate(n = 20,mines = [[10, 10], [10, 11], [11, 10], [11, 11], [9, 9], [9, 10], [9, 11], [10, 9], [11, 9], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [9, 8], [9, 12], [10, 8], [10, 12], [11, 8], [11, 12], [12, 8], [12, 9], [12, 10], [12, 11], [12, 12], [7, 7], [7, 8], [7, 9], [7, 10], [7, 11], [7, 12], [7, 13], [8, 7], [8, 13], [9, 7], [9, 13], [10, 7], [10, 13], [11, 7], [11, 13], [12, 7], [12, 13], [13, 7], [13, 8], [13, 9], [13, 10], [13, 11], [13, 12], [13, 13]]) == 7\n assert candidate(n = 20,mines = [[10, 10], [10, 9], [10, 8], [10, 7], [10, 6], [10, 5], [10, 4], [10, 3], [10, 2], [10, 1], [10, 0]]) == 9\n assert candidate(n = 50,mines = [[25, 25], [25, 24], [25, 23], [25, 22], [25, 21], [25, 20], [25, 19], [25, 18], [25, 17], [25, 16], [25, 15], [25, 14], [25, 13], [25, 12], [25, 11], [25, 10], [25, 9], [25, 8], [25, 7], [25, 6], [25, 5], [25, 4], [25, 3], [25, 2], [25, 1], [25, 0]]) == 24\n assert candidate(n = 100,mines = [[49, 49], [50, 49], [51, 49], [49, 50], [50, 50], [51, 50], [49, 51], [50, 51], [51, 51], [20, 20], [21, 20], [19, 20], [20, 19], [20, 21]]) == 49\n assert candidate(n = 20,mines = [[10, 10], [10, 11], [10, 12], [10, 9], [9, 10], [9, 11], [9, 12], [9, 9], [11, 10], [11, 11], [11, 12], [11, 9]]) == 9\n assert candidate(n = 30,mines = [[15, 14], [15, 15], [15, 16], [14, 14], [14, 15], [14, 16], [16, 14], [16, 15], [16, 16], [15, 0], [15, 1], [15, 29], [14, 0], [14, 1], [14, 29], [16, 0], [16, 1], [16, 29], [0, 15], [1, 15], [29, 15], [0, 14], [0, 16], [29, 14], [29, 16]]) == 14\n assert candidate(n = 50,mines = [[25, 24], [25, 25], [25, 26], [24, 24], [24, 25], [24, 26], [26, 24], [26, 25], [26, 26], [10, 10], [10, 11], [10, 12], [9, 10], [9, 11], [9, 12], [11, 10], [11, 11], [11, 12]]) == 24\n assert candidate(n = 20,mines = [[9, 9], [9, 10], [10, 9], [8, 9], [9, 8], [9, 11], [11, 9], [7, 9], [9, 7], [10, 10]]) == 8\n assert candidate(n = 8,mines = [[3, 3], [4, 4], [5, 5], [3, 4], [4, 3], [3, 5], [4, 5], [5, 3], [5, 4], [5, 6], [6, 5], [6, 3], [6, 4]]) == 3\n assert candidate(n = 300,mines = [[150, 150], [151, 151], [149, 149], [152, 152], [148, 148]]) == 148\n assert candidate(n = 6,mines = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]) == 3\n assert candidate(n = 30,mines = [[0, 0], [0, 1], [0, 2], [0, 27], [0, 28], [0, 29], [1, 0], [1, 29], [2, 0], [2, 29], [27, 0], [27, 29], [28, 0], [28, 29], [29, 0], [29, 1], [29, 2], [29, 27], [29, 28], [29, 29], [10, 10], [10, 19], [19, 10], [19, 19]]) == 15\n assert candidate(n = 10,mines = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9]]) == 5\n assert candidate(n = 25,mines = [[5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7], [7, 5], [7, 6], [7, 7], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == 10\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [8, 7], [6, 7], [7, 6], [7, 9], [9, 7]]) == 6\n assert candidate(n = 10,mines = [[5, 5], [4, 5], [6, 5], [5, 4], [5, 6], [0, 0], [9, 9], [0, 9], [9, 0]]) == 4\n assert candidate(n = 20,mines = [[10, 10], [9, 10], [11, 10], [10, 9], [10, 11], [5, 5], [15, 15], [0, 0], [19, 19], [1, 1], [18, 18]]) == 9\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [8, 7], [8, 8], [6, 6], [6, 7], [7, 6], [6, 8], [8, 6], [8, 9], [9, 8], [7, 9], [9, 7]]) == 6\n assert candidate(n = 12,mines = [[5, 5], [5, 6], [5, 7], [6, 5], [6, 6], [6, 7], [7, 5], [7, 6], [7, 7], [0, 0], [11, 11]]) == 5\n assert candidate(n = 500,mines = [[250, 250], [251, 250], [249, 250], [250, 251], [250, 249]]) == 249\n assert candidate(n = 50,mines = [[25, 25], [24, 24], [24, 26], [26, 24], [26, 26], [10, 10], [10, 39], [39, 10], [39, 39]]) == 24\n assert candidate(n = 500,mines = [[250, 250], [249, 249], [251, 251], [248, 248], [252, 252], [247, 247], [253, 253], [246, 246], [254, 254], [245, 245], [255, 255]]) == 245\n assert candidate(n = 10,mines = [[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, 1], [9, 2], [9, 3], [9, 4], [9, 5], [9, 6], [9, 7], [9, 8]]) == 4\n assert candidate(n = 500,mines = [[250, 250], [250, 251], [251, 250], [251, 251]]) == 250\n assert candidate(n = 7,mines = [[3, 3], [3, 4], [4, 3], [4, 4], [2, 2], [2, 4], [4, 2], [5, 3], [3, 5], [5, 5]]) == 2\n assert candidate(n = 30,mines = [[10, 10], [10, 11], [10, 12], [11, 10], [11, 11], [11, 12], [12, 10], [12, 11], [12, 12], [15, 15], [15, 16], [15, 17], [16, 15], [16, 16], [16, 17], [17, 15], [17, 16], [17, 17]]) == 15\n assert candidate(n = 12,mines = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11]]) == 4\n assert candidate(n = 10,mines = [[4, 5], [4, 4], [4, 3], [4, 2], [4, 1], [4, 0], [4, 6], [4, 7], [4, 8], [4, 9]]) == 3\n assert candidate(n = 15,mines = [[7, 7], [7, 8], [7, 9], [8, 7], [8, 8], [8, 9], [9, 7], [9, 8], [9, 9], [6, 6], [6, 10], [10, 6], [10, 10]]) == 6\n assert candidate(n = 400,mines = [[200, 200], [199, 199], [199, 201], [201, 199], [201, 201], [199, 200], [200, 199], [200, 201], [150, 150], [250, 250]]) == 199\n assert candidate(n = 8,mines = [[3, 3], [3, 4], [3, 5], [4, 3], [4, 4], [4, 5], [5, 3], [5, 4], [5, 5], [3, 2], [4, 2], [5, 2], [3, 6], [4, 6], [5, 6], [2, 3], [2, 4], [2, 5], [6, 3], [6, 4], [6, 5]]) == 2\n", "comparison": "exact"}, "public_tests": ["5\n[[4,2]]", "1\n[[0,0]]"], "hints": ["For each direction such as \"left\", find left[r][c] = the number of 1s you will see before a zero starting at r, c and walking left. You can find this in N^2 time with a dp. The largest plus sign at r, c is just the minimum of left[r][c], up[r][c] etc."], "metadata": {"canonical_parameter_names": ["n", "mines"], "leetcode_dataset_entry_point": "Solution().orderOfLargestPlusSign", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:48+00:00", "tests_total": 91, "tests_dropped": 3, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming"]}, "language": "cpp", "interface": {"raw_signature": "int orderOfLargestPlusSign(int n, vector>& mines) {", "container": "Solution", "callable": "orderOfLargestPlusSign", "parameters": [{"name": "n", "type": "int"}, {"name": "mines", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 765, "task_id": "couples-holding-hands", "difficulty": "Hard", "problem_description": "There are n couples sitting in 2n seats arranged in a row and want to hold hands.\n\nThe people and seats are represented by an integer array row where row[i] is the ID of the person sitting in the i^th seat. The couples are numbered in order, the first couple being (0, 1), the second couple being (2, 3), and so on with the last couple being (2n - 2, 2n - 1).\n\nReturn the minimum number of swaps so that every couple is sitting side by side. A swap consists of choosing any two people, then they stand up and switch seats.\n\nExample 1:\n\nInput: row = [0,2,1,3]\nOutput: 1\nExplanation: We only need to swap the second (row[1]) and third (row[2]) person.\n\nExample 2:\n\nInput: row = [3,2,0,1]\nOutput: 0\nExplanation: All couples are already seated side by side.\n\nConstraints:\n\n- 2n == row.length\n- 2 <= n <= 30\n- 0 <= row[i] < 2n\n- All the elements of row are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(row = [2, 0, 5, 4, 3, 1]) == 1\n assert candidate(row = [0, 1, 2, 3]) == 0\n assert candidate(row = [0, 2, 1, 3]) == 1\n assert candidate(row = [4, 3, 2, 1, 0, 5]) == 2\n assert candidate(row = [2, 0, 5, 4, 3, 6, 7, 1]) == 2\n assert candidate(row = [0, 2, 4, 6, 7, 1, 3, 5]) == 3\n assert candidate(row = [0, 1, 2, 3, 4, 5]) == 0\n assert candidate(row = [4, 3, 2, 5, 1, 6, 7, 8, 9, 0]) == 3\n assert candidate(row = [5, 4, 3, 2, 1, 0]) == 0\n assert candidate(row = [5, 4, 2, 6, 3, 1, 7, 0]) == 2\n assert candidate(row = [1, 4, 0, 5, 8, 7, 6, 3, 2, 9]) == 3\n assert candidate(row = [4, 6, 2, 8, 5, 3, 7, 0, 1, 9]) == 4\n assert candidate(row = [2, 0, 1, 3]) == 1\n assert candidate(row = [6, 2, 1, 7, 4, 5, 0, 3]) == 2\n assert candidate(row = [0, 5, 4, 2, 1, 6, 7, 3, 8, 9]) == 3\n assert candidate(row = [3, 2, 0, 1]) == 0\n assert candidate(row = [1, 3, 2, 0]) == 1\n assert candidate(row = [0, 29, 1, 28, 2, 27, 3, 26, 4, 25, 5, 24, 6, 23, 7, 22, 8, 21, 9, 20, 10, 19, 11, 18, 12, 17, 13, 16, 14, 15]) == 7\n assert candidate(row = [0, 1, 4, 5, 8, 9, 12, 13, 2, 3, 6, 7, 10, 11, 14, 15]) == 0\n assert candidate(row = [4, 5, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11, 6, 7, 20, 21, 22, 23, 24, 25, 16, 17, 18, 19, 26, 27, 28, 29, 30, 31]) == 0\n assert candidate(row = [0, 1, 4, 5, 2, 3, 6, 7, 10, 11, 8, 9, 12, 13, 14, 15]) == 0\n assert candidate(row = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(row = [14, 4, 13, 3, 12, 2, 11, 1, 10, 0, 9, 5, 8, 6, 7, 15]) == 5\n assert candidate(row = [0, 3, 2, 1, 8, 7, 6, 5, 4, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 3\n assert candidate(row = [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]) == 0\n assert candidate(row = [14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 15]) == 7\n assert candidate(row = [0, 15, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1]) == 1\n assert candidate(row = [14, 15, 12, 13, 6, 7, 10, 11, 2, 3, 0, 1, 8, 9, 4, 5]) == 0\n assert candidate(row = [1, 2, 3, 0, 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, 31, 30]) == 1\n assert candidate(row = [14, 13, 12, 15, 10, 9, 8, 11, 6, 7, 4, 5, 2, 3, 0, 1]) == 2\n assert candidate(row = [16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 17]) == 8\n assert candidate(row = [0, 8, 2, 12, 4, 6, 10, 14, 1, 9, 3, 13, 5, 7, 11, 15]) == 4\n assert candidate(row = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10]) == 0\n assert candidate(row = [1, 2, 3, 0, 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]) == 1\n assert candidate(row = [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]) == 0\n assert candidate(row = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11]) == 7\n assert candidate(row = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 14\n assert candidate(row = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14]) == 0\n assert candidate(row = [29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28]) == 7\n assert candidate(row = [14, 15, 8, 9, 10, 11, 6, 7, 2, 3, 0, 1, 12, 13, 4, 5]) == 0\n assert candidate(row = [0, 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, 29, 27]) == 14\n assert candidate(row = [5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6]) == 0\n assert candidate(row = [0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15]) == 4\n assert candidate(row = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16]) == 0\n assert candidate(row = [10, 11, 8, 9, 6, 7, 2, 3, 0, 1, 4, 5, 12, 13, 14, 15]) == 0\n assert candidate(row = [1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 14]) == 4\n assert candidate(row = [15, 2, 13, 3, 14, 11, 9, 12, 5, 6, 7, 8, 10, 0, 1, 4]) == 7\n assert candidate(row = [22, 23, 18, 19, 12, 13, 28, 27, 20, 21, 24, 25, 16, 17, 8, 9, 26, 29, 2, 3, 0, 1, 14, 15, 6, 7, 10, 11, 4, 5]) == 1\n assert candidate(row = [10, 9, 8, 11, 6, 7, 4, 3, 2, 5, 0, 1]) == 2\n assert candidate(row = [0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11, 12, 14, 13, 15]) == 4\n assert candidate(row = [14, 15, 10, 2, 13, 3, 8, 9, 6, 7, 0, 1, 12, 11, 4, 5]) == 2\n assert candidate(row = [1, 2, 3, 4, 5, 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]) == 14\n assert candidate(row = [0, 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]) == 14\n assert candidate(row = [1, 2, 3, 0, 7, 5, 6, 4, 11, 9, 10, 8]) == 3\n assert candidate(row = [14, 13, 10, 8, 12, 15, 0, 2, 4, 5, 1, 3, 6, 7, 9, 11]) == 3\n assert candidate(row = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(row = [10, 1, 2, 5, 4, 3, 8, 7, 6, 11, 9, 12, 14, 13, 15, 0]) == 6\n assert candidate(row = [14, 13, 12, 15, 10, 9, 8, 11, 6, 7, 4, 5, 2, 3, 0, 1]) == 2\n assert candidate(row = [1, 2, 0, 3, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14]) == 1\n assert candidate(row = [12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 0\n assert candidate(row = [10, 8, 9, 7, 6, 5, 4, 3, 2, 1, 0, 11]) == 5\n assert candidate(row = [29, 28, 25, 24, 27, 26, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(row = [1, 3, 0, 2, 5, 7, 4, 6, 9, 11, 8, 10, 13, 15, 12, 14]) == 4\n assert candidate(row = [14, 13, 12, 15, 2, 3, 0, 1, 10, 11, 8, 9, 6, 7, 4, 5]) == 1\n assert candidate(row = [2, 3, 0, 1, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15]) == 3\n assert candidate(row = [14, 15, 8, 13, 12, 9, 0, 1, 2, 11, 10, 3, 6, 5, 4, 7]) == 3\n assert candidate(row = [0, 3, 5, 2, 1, 6, 7, 4, 8, 9, 10, 11]) == 3\n assert candidate(row = [1, 3, 2, 6, 5, 4, 7, 8, 9, 11, 10, 15, 14, 13, 12, 0]) == 6\n assert candidate(row = [28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 7\n assert candidate(row = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26]) == 0\n assert candidate(row = [3, 2, 1, 0, 5, 4, 7, 6, 9, 8, 11, 10, 15, 14, 13, 12, 17, 16, 19, 18]) == 0\n assert candidate(row = [6, 5, 0, 4, 3, 2, 7, 1, 10, 9, 8, 11]) == 3\n assert candidate(row = [8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 10, 11]) == 4\n assert candidate(row = [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 0\n assert candidate(row = [0, 1, 14, 15, 6, 7, 2, 3, 8, 9, 4, 5, 12, 13, 10, 11, 22, 23, 16, 17, 18, 19, 20, 21, 24, 25, 26, 27, 28, 29]) == 0\n assert candidate(row = [0, 3, 2, 1, 4, 7, 6, 5, 8, 11, 10, 9, 12, 15, 14, 13]) == 4\n assert candidate(row = [18, 19, 16, 17, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1]) == 0\n assert candidate(row = [2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9]) == 0\n assert candidate(row = [28, 29, 26, 27, 24, 25, 22, 23, 20, 21, 18, 19, 16, 17, 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1]) == 0\n", "comparison": "exact"}, "public_tests": ["[0,2,1,3]", "[3,2,0,1]"], "hints": ["Say there are N two-seat couches. For each couple, draw an edge from the couch of one partner to the couch of the other partner."], "metadata": {"canonical_parameter_names": ["row"], "leetcode_dataset_entry_point": "Solution().minSwapsCouples", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:51+00:00", "tests_total": 81, "tests_dropped": 2, "flags": [], "topic_tags": ["greedy", "depth-first-search", "breadth-first-search", "union-find", "graph"]}, "language": "cpp", "interface": {"raw_signature": "int minSwapsCouples(vector& row) {", "container": "Solution", "callable": "minSwapsCouples", "parameters": [{"name": "row", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 766, "task_id": "toeplitz-matrix", "difficulty": "Easy", "problem_description": "Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false.\n\nA matrix is Toeplitz if every diagonal from top-left to bottom-right has the same elements.\n\nExample 1:\n\nInput: matrix = [[1,2,3,4],[5,1,2,3],[9,5,1,2]]\nOutput: true\nExplanation:\nIn the above grid, the diagonals are:\n\"[9]\", \"[5, 5]\", \"[1, 1, 1]\", \"[2, 2, 2]\", \"[3, 3]\", \"[4]\".\nIn each diagonal all elements are the same, so the answer is True.\n\nExample 2:\n\nInput: matrix = [[1,2],[2,2]]\nOutput: false\nExplanation:\nThe diagonal \"[1, 2]\" has different elements.\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 20\n- 0 <= matrix[i][j] <= 99\n\nFollow up:\n\n- What if the matrix is stored on disk, and the memory is limited such that you can only load at most one row of the matrix into the memory at once?\n- What if the matrix is so large that you can only load up a partial row into the memory at once?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[3, 4, 5], [6, 3, 4], [7, 6, 3]]) == True\n assert candidate(matrix = [[1, 2, 3], [4, 1, 2], [7, 4, 1]]) == True\n assert candidate(matrix = [[1]]) == True\n assert candidate(matrix = [[1, 2], [3, 4]]) == False\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == False\n assert candidate(matrix = [[1, 1], [1, 1], [1, 1]]) == True\n assert candidate(matrix = [[3, 3, 3], [3, 3, 3], [3, 3, 3]]) == True\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6]]) == False\n assert candidate(matrix = [[1, 1, 1], [1, 1, 1], [1, 1, 1]]) == True\n assert candidate(matrix = [[1, 2], [2, 2]]) == False\n assert candidate(matrix = [[1, 2, 3, 4], [5, 1, 2, 3], [9, 5, 1, 2]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 1, 2, 3, 4, 5, 6, 7], [17, 9, 1, 2, 3, 4, 5, 6], [25, 17, 9, 1, 2, 3, 4, 5]]) == True\n assert candidate(matrix = [[9, 8, 7, 6], [8, 9, 8, 7], [7, 8, 9, 8], [6, 7, 8, 9]]) == 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]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 1, 2, 3, 4, 5], [8, 7, 1, 2, 3, 4], [9, 8, 7, 1, 2, 3]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 1, 2, 3, 4], [11, 6, 1, 2, 3], [17, 11, 6, 1, 2]]) == True\n assert candidate(matrix = [[1, 0, 0, 0], [1, 1, 0, 0], [1, 1, 1, 0], [1, 1, 1, 1]]) == True\n assert candidate(matrix = [[1, 2, 2], [3, 1, 2], [4, 3, 1]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 1, 2, 3, 4], [11, 6, 1, 2, 3], [16, 11, 6, 1, 2], [21, 16, 11, 6, 1]]) == True\n assert candidate(matrix = [[5, 6, 7, 8], [4, 5, 6, 7], [3, 4, 5, 6], [2, 3, 4, 5], [1, 2, 3, 4]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 6, 7, 8, 9], [12, 13, 6, 7, 8]]) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 1, 2, 3, 4, 5, 6, 7, 8], [19, 10, 1, 2, 3, 4, 5, 6, 7], [28, 19, 10, 1, 2, 3, 4, 5, 6]]) == True\n assert candidate(matrix = [[3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5]]) == True\n assert candidate(matrix = [[7, 8, 9], [1, 7, 8], [2, 1, 7], [3, 2, 1]]) == True\n assert candidate(matrix = [[7, 7, 7, 7], [7, 7, 7, 7], [7, 7, 7, 7], [7, 7, 7, 7]]) == True\n assert candidate(matrix = [[9], [8], [7], [6], [5]]) == True\n assert candidate(matrix = [[1, 2, 2], [4, 1, 2], [7, 4, 1]]) == True\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1], [3, 2, 1, 1, 1, 1], [4, 3, 2, 1, 1, 1]]) == True\n assert candidate(matrix = [[5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5]]) == True\n assert candidate(matrix = [[3, 8, 4, 2], [6, 3, 8, 4], [7, 6, 3, 8]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 1, 2, 3, 4], [7, 6, 1, 2, 3], [8, 7, 6, 1, 2], [9, 8, 7, 6, 1]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 1, 2, 3, 4, 5], [13, 7, 1, 2, 3, 4], [19, 13, 7, 1, 2, 3]]) == True\n assert candidate(matrix = [[10, 11, 12, 13], [14, 10, 11, 12], [15, 14, 10, 11]]) == True\n assert candidate(matrix = [[9, 8, 7, 6, 5], [8, 7, 6, 5, 4], [7, 6, 5, 4, 3], [6, 5, 4, 3, 2]]) == False\n assert candidate(matrix = [[1, 2, 3, 4], [5, 1, 2, 9], [9, 5, 1, 10]]) == False\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]]) == True\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]) == False\n assert candidate(matrix = [[0, 1, 2, 3, 4, 5], [0, 0, 1, 2, 3, 4], [0, 0, 0, 1, 2, 3], [0, 0, 0, 0, 1, 2], [0, 0, 0, 0, 0, 1]]) == True\n assert candidate(matrix = [[10, 20, 30], [20, 10, 20], [30, 20, 10]]) == True\n assert candidate(matrix = [[1, 2, 3], [2, 3, 4], [3, 4, 5]]) == False\n assert candidate(matrix = [[5, 6, 7], [8, 5, 6], [9, 8, 5], [10, 9, 8]]) == True\n assert candidate(matrix = [[9, 8, 7], [8, 7, 6], [7, 6, 5], [6, 5, 4]]) == False\n assert candidate(matrix = [[1, 2], [2, 1], [3, 2], [4, 3]]) == True\n assert candidate(matrix = [[1, 0, 0, 0], [2, 1, 0, 0], [3, 2, 1, 0], [4, 3, 2, 1]]) == True\n assert candidate(matrix = [[10, 11, 12], [13, 10, 11], [14, 13, 10]]) == True\n assert candidate(matrix = [[1, 2], [3, 1], [4, 3], [5, 4], [6, 5]]) == True\n assert candidate(matrix = [[9, 8, 7, 6], [8, 7, 6, 5], [7, 6, 5, 4], [6, 5, 4, 3]]) == False\n assert candidate(matrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) == True\n assert candidate(matrix = [[10, 11, 12, 13, 14], [5, 10, 11, 12, 13], [0, 5, 10, 11, 12], [9, 0, 5, 10, 11]]) == True\n assert candidate(matrix = [[0, 1, 2, 3], [1, 0, 1, 2], [2, 1, 0, 1]]) == True\n assert candidate(matrix = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) == True\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]]) == True\n assert candidate(matrix = [[4, 5, 6, 7], [1, 4, 5, 6], [2, 1, 4, 5], [3, 2, 1, 4], [4, 3, 2, 1]]) == True\n assert candidate(matrix = [[7, 8, 9, 10], [4, 7, 8, 9], [1, 4, 7, 8], [0, 1, 4, 7]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]]) == False\n assert candidate(matrix = [[1, 2], [2, 1], [1, 2]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1]]) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 1, 2, 3, 4, 5, 6, 7, 8, 9], [21, 11, 1, 2, 3, 4, 5, 6, 7, 8], [31, 21, 11, 1, 2, 3, 4, 5, 6, 7], [41, 31, 21, 11, 1, 2, 3, 4, 5, 6]]) == True\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) == False\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) == False\n assert candidate(matrix = [[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]]) == False\n assert candidate(matrix = [[3, 3, 3, 3], [3, 3, 3, 3], [3, 3, 3, 3], [3, 3, 3, 3]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 1, 2, 3, 4], [7, 6, 1, 2, 3], [8, 7, 6, 1, 2]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 1, 2, 3, 4], [11, 6, 1, 2, 3], [12, 11, 6, 1, 2]]) == True\n assert candidate(matrix = [[1, 2, 3, 4], [5, 1, 2, 3], [9, 5, 1, 2], [8, 9, 5, 1]]) == True\n assert candidate(matrix = [[1, 2, 3], [2, 3, 4], [1, 2, 3]]) == False\n assert candidate(matrix = [[1, 2], [2, 3], [3, 4], [4, 5]]) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5]]) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7], [8, 1, 2, 3, 4, 5, 6], [15, 8, 1, 2, 3, 4, 5], [22, 15, 8, 1, 2, 3, 4]]) == True\n assert candidate(matrix = [[9, 8, 7], [8, 9, 8], [7, 8, 9]]) == True\n assert candidate(matrix = [[10, 11, 12, 13, 14], [9, 10, 11, 12, 13], [8, 9, 10, 11, 12], [7, 8, 9, 10, 11]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 0, 1, 2, 3, 4, 5, 6, 7], [0, 0, 0, 1, 2, 3, 4, 5, 6], [0, 0, 0, 0, 1, 2, 3, 4, 5]]) == True\n assert candidate(matrix = [[5], [4], [3], [2], [1]]) == True\n assert candidate(matrix = [[1, 2, 3, 4], [4, 1, 2, 3], [3, 4, 1, 2], [2, 3, 4, 1]]) == True\n assert candidate(matrix = [[1, 1, 1, 2], [1, 1, 2, 3], [1, 2, 3, 4]]) == False\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8]]) == False\n assert candidate(matrix = [[5, 4, 3], [6, 5, 4], [7, 6, 5], [8, 7, 6]]) == True\n assert candidate(matrix = [[5, 6, 7, 8], [4, 5, 6, 7], [3, 4, 5, 6], [2, 3, 4, 5]]) == True\n assert candidate(matrix = [[1, 2, 3, 4], [2, 1, 2, 3], [3, 2, 1, 2], [4, 3, 2, 1]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [2, 1, 2, 3, 4, 5, 6, 7, 8], [3, 2, 1, 2, 3, 4, 5, 6, 7], [4, 3, 2, 1, 2, 3, 4, 5, 6]]) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8], [4, 5, 6, 7, 8, 9]]) == False\n assert candidate(matrix = [[9, 8, 7, 6, 5], [8, 9, 8, 7, 6], [7, 8, 9, 8, 7], [6, 7, 8, 9, 8]]) == 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]]) == True\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]]) == False\n", "comparison": "exact"}, "public_tests": ["[[1,2,3,4],[5,1,2,3],[9,5,1,2]]", "[[1,2],[2,2]]"], "hints": ["Check whether each value is equal to the value of it's top-left neighbor."], "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().isToeplitzMatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:53+00:00", "tests_total": 84, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "bool isToeplitzMatrix(vector>& matrix) {", "container": "Solution", "callable": "isToeplitzMatrix", "parameters": [{"name": "matrix", "type": "vector>&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 767, "task_id": "reorganize-string", "difficulty": "Medium", "problem_description": "Given a string s, rearrange the characters of s so that any two adjacent characters are not the same.\n\nReturn any possible rearrangement of s or return \"\" if not possible.\n\nExample 1:\n\nInput: s = \"aab\"\nOutput: \"aba\"\n\nExample 2:\n\nInput: s = \"aaab\"\nOutput: \"\"\n\nConstraints:\n\n- 1 <= s.length <= 500\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aaabc\") == \"abaca\"\n assert candidate(s = \"aabbccc\") == \"cacbcba\"\n assert candidate(s = \"abcdefg\") == \"aebfcgd\"\n assert candidate(s = \"aaabbbccc\") == \"abacacbcb\"\n assert candidate(s = \"aabbccddeeffgghhijklmnop\") == \"agagbhbhcicjdkdlemenfofp\"\n assert candidate(s = \"abbabbaaa\") == \"ababababa\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == \"anbocpdqerfsgthuivjwkxlymz\"\n assert candidate(s = \"aabac\") == \"abaca\"\n assert candidate(s = \"zzzza\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstuvwxy\") == \"ajakblbmcncodpdqeresftfugvgwhxhyi\"\n assert candidate(s = \"aabbaa\") == \"\"\n assert candidate(s = \"aabbbb\") == \"\"\n assert candidate(s = \"abababab\") == \"abababab\"\n assert candidate(s = \"aaabbbcccd\") == \"abacacbcbd\"\n assert candidate(s = \"aabbbcccc\") == \"cbcbcacab\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqr\") == \"agahbhbicjckdldmeneofpfqgr\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrs\") == \"ahahbibjckcldmdneoepfqfrgsg\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstuvwxyz\") == \"ajakblbmcncodpdqeresftfugvgwhxhyiz\"\n assert candidate(s = \"aabbccddeeffgghhij\") == \"aeafbfbgcgchdhdiej\"\n assert candidate(s = \"aaaaabc\") == \"\"\n assert candidate(s = \"zzzzzzz\") == \"\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"aabbc\") == \"abacb\"\n assert candidate(s = \"zzzzzaabbcc\") == \"zazbzbzczca\"\n assert candidate(s = \"aa\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhi\") == \"aeafbfbgcgchdhdie\"\n assert candidate(s = \"aaabbcc\") == \"abacacb\"\n assert candidate(s = \"abcabc\") == \"abacbc\"\n assert candidate(s = \"aabb\") == \"abab\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstuvw\") == \"aiajbkblcmcndodpeqerfsftgugvhwh\"\n assert candidate(s = \"vvvlo\") == \"vlvov\"\n assert candidate(s = \"abc\") == \"acb\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstuvwx\") == \"aiajbkblcmcndodpeqerfsftgugvhwhx\"\n assert candidate(s = \"aabbccddeeffgghhijkl\") == \"afafbgbgchchdidjekel\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrst\") == \"ahahbibjckcldmdneoepfqfrgsgt\"\n assert candidate(s = \"geeksforgeeks\") == \"ekesesefgogrk\"\n assert candidate(s = \"aabbccddeeffgghhijklm\") == \"afagbgbhchcidjdkelemf\"\n assert candidate(s = \"aabbccddeeffgg\") == \"adaebebfcfcgdg\"\n assert candidate(s = \"aaabcbb\") == \"ababacb\"\n assert candidate(s = \"aabbccddeeffgghh\") == \"aeaebfbfcgcgdhdh\"\n assert candidate(s = \"bfrbs\") == \"brbsf\"\n assert candidate(s = \"aab\") == \"aba\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstuv\") == \"ahaibjbkclcmdndoepeqfrfsgtguhv\"\n assert candidate(s = \"aabbcc\") == \"abacbc\"\n assert candidate(s = \"mississippi\") == \"isisipipsms\"\n assert candidate(s = \"zzzzz\") == \"\"\n assert candidate(s = \"zmrlllllll\") == \"\"\n assert candidate(s = \"ababab\") == \"ababab\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"ananbobocpcpdqdqererfsfsgtgthuhuivivjwjwkxkxlylymzmz\"\n assert candidate(s = \"programming\") == \"rprogagimnm\"\n assert candidate(s = \"abacaba\") == \"ababaca\"\n assert candidate(s = \"zzzzzzzz\") == \"\"\n assert candidate(s = \"aaaabc\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopq\") == \"agahbhbicjckdldmeneofpfqg\"\n assert candidate(s = \"aabbccddeeffgghhijklmnopqrstu\") == \"ahaibjbkclcmdndoepeqfrfsgtguh\"\n assert candidate(s = \"aaab\") == \"\"\n", "comparison": "exact"}, "public_tests": ["\"aab\"", "\"aaab\""], "hints": ["Alternate placing the most common letters."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().reorganizeString", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:55+00:00", "tests_total": 56, "tests_dropped": 0, "flags": ["multiple_answers"], "topic_tags": ["hash-table", "string", "greedy", "sorting", "heap-priority-queue", "counting"]}, "language": "cpp", "interface": {"raw_signature": "string reorganizeString(string s) {", "container": "Solution", "callable": "reorganizeString", "parameters": [{"name": "s", "type": "string"}], "return_type": "string", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 768, "task_id": "max-chunks-to-make-sorted-ii", "difficulty": "Hard", "problem_description": "You are given an integer array arr.\n\nWe split arr into some number of chunks (i.e., partitions), and individually sort each chunk. After concatenating them, the result should equal the sorted array.\n\nReturn the largest number of chunks we can make to sort the array.\n\nExample 1:\n\nInput: arr = [5,4,3,2,1]\nOutput: 1\nExplanation:\nSplitting into two or more chunks will not return the required result.\nFor example, splitting into [5, 4], [3, 2, 1] will result in [4, 5, 1, 2, 3], which isn't sorted.\n\nExample 2:\n\nInput: arr = [2,1,3,4,4]\nOutput: 4\nExplanation:\nWe can split into two chunks, such as [2, 1], [3, 4, 4].\nHowever, splitting into [2, 1], [3], [4], [4] is the highest number of chunks possible.\n\nConstraints:\n\n- 1 <= arr.length <= 2000\n- 0 <= arr[i] <= 10^8\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(arr = [4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [3, 2, 1, 0, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(arr = [5, 4, 3, 2, 1]) == 1\n assert candidate(arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [3, 2, 1, 4, 5]) == 3\n assert candidate(arr = [4, 3, 2, 1, 0, 9, 8, 7, 6, 5]) == 2\n assert candidate(arr = [1, 2, 3, 4, 5]) == 5\n assert candidate(arr = [4, 2, 2, 1, 3]) == 1\n assert candidate(arr = [0, 1, 2, 3, 4]) == 5\n assert candidate(arr = [1, 2, 0, 3, 4, 5]) == 4\n assert candidate(arr = [1, 0, 2, 3, 4]) == 4\n assert candidate(arr = [2, 1, 3, 4, 4]) == 4\n assert candidate(arr = [0, 2, 1, 2, 1]) == 2\n assert candidate(arr = [1, 1, 1, 1, 1]) == 5\n assert candidate(arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(arr = [1, 0, 2, 0, 3]) == 2\n assert candidate(arr = [1, 1, 0, 0, 1]) == 2\n assert candidate(arr = [0, 0, 1, 1, 2, 2, 3, 3]) == 8\n assert candidate(arr = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16]) == 9\n assert candidate(arr = [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]) == 1\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(arr = [1, 3, 2, 4, 6, 5, 7, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 20]) == 12\n assert candidate(arr = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 20\n assert candidate(arr = [2, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 16\n assert candidate(arr = [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]) == 30\n assert candidate(arr = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(arr = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 15, 14, 13, 12, 11, 20, 19, 18, 17, 16]) == 4\n assert candidate(arr = [5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1]) == 1\n assert candidate(arr = [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [1, 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(arr = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(arr = [5, 6, 1, 2, 3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 15\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 21\n assert candidate(arr = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 1\n assert candidate(arr = [10, 20, 30, 40, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 1\n assert candidate(arr = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 1\n assert candidate(arr = [3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10]) == 4\n assert candidate(arr = [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(arr = [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(arr = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == 1\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 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(arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 11, 12, 13, 14, 15]) == 7\n assert candidate(arr = [1, 3, 2, 4, 5, 7, 6, 9, 8, 10]) == 7\n assert candidate(arr = [3, 2, 1, 4, 5, 6, 0]) == 1\n assert candidate(arr = [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(arr = [1, 3, 2, 5, 4, 7, 6, 9, 8, 10, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]) == 11\n assert candidate(arr = [1, 5, 3, 4, 2, 6, 8, 7, 9, 10, 0, 11]) == 2\n assert candidate(arr = [10, 1, 20, 2, 30, 3, 40, 4, 50, 5, 60, 6, 70, 7, 80, 8, 90, 9, 100, 10]) == 1\n assert candidate(arr = [1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7]) == 3\n assert candidate(arr = [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, 0]) == 1\n assert candidate(arr = [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]) == 11\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 3\n assert candidate(arr = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(arr = [1, 2, 0, 3, 4, 5, 6]) == 5\n assert candidate(arr = [5, 9, 3, 8, 7, 2, 4, 10, 1, 6]) == 1\n assert candidate(arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 12\n assert candidate(arr = [1, 2, 3, 0, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]) == 1\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 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(arr = [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\n assert candidate(arr = [1, 3, 2, 4, 5, 7, 6, 8, 10, 9]) == 7\n assert candidate(arr = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 16\n assert candidate(arr = [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]) == 30\n assert candidate(arr = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]) == 2\n assert candidate(arr = [5, 3, 2, 4, 1, 6, 7]) == 3\n assert candidate(arr = [3, 1, 2, 4, 6, 5, 7]) == 4\n assert candidate(arr = [1, 2, 0, 3, 4, 5, 6, 7, 8, 9]) == 8\n assert candidate(arr = [1, 0, 2, 3, 4, 5, 6, 7, 8, 9]) == 9\n assert candidate(arr = [4, 5, 6, 0, 1, 2, 3]) == 1\n assert candidate(arr = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 3\n assert candidate(arr = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 11, 13, 15, 17, 19]) == 4\n assert candidate(arr = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == 2\n assert candidate(arr = [2, 1, 1, 1, 3, 4, 4, 4]) == 5\n assert candidate(arr = [20, 10, 30, 20, 40, 30, 50, 40, 60, 50, 70, 60, 80, 70, 90, 80, 100, 90, 110, 100]) == 10\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(arr = [1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(arr = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1]) == 2\n assert candidate(arr = [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]) == 40\n assert candidate(arr = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 10, 9, 8, 7, 6]) == 1\n assert candidate(arr = [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]) == 2\n assert candidate(arr = [1, 2, 3, 4, 0, 5]) == 2\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 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(arr = [1, 5, 3, 4, 2, 6, 8, 7, 9, 10]) == 6\n assert candidate(arr = [5, 0, 3, 4, 1, 2]) == 1\n assert candidate(arr = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 15\n assert candidate(arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [1, 0, 2, 3, 4, 5]) == 5\n assert candidate(arr = [2, 3, 1, 4, 5, 3, 7, 6, 8, 9, 10, 8, 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]) == 50\n assert candidate(arr = [7, 5, 2, 3, 1, 4, 6, 8]) == 2\n assert candidate(arr = [3, 2, 1, 6, 5, 4, 9, 8, 7, 10]) == 4\n assert candidate(arr = [2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]) == 8\n assert candidate(arr = [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, 0, 0, 0]) == 1\n assert candidate(arr = [5, 2, 6, 3, 7, 4, 8, 1, 9, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 11\n assert candidate(arr = [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]) == 3\n assert candidate(arr = [5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 3\n assert candidate(arr = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(arr = [1, 5, 2, 6, 3, 7, 4, 8, 9, 10, 11, 12, 13, 14, 15]) == 10\n assert candidate(arr = [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]) == 21\n assert candidate(arr = [2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate(arr = [5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 21\n assert candidate(arr = [1, 2, 3, 4, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 15\n assert candidate(arr = [4, 1, 2, 3, 5, 6, 7, 8, 9, 0]) == 1\n assert candidate(arr = [2, 3, 1, 5, 4, 8, 7, 10, 9, 6]) == 3\n assert candidate(arr = [1, 2, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 2\n assert candidate(arr = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9]) == 6\n assert candidate(arr = [5, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 9, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4]) == 1\n assert candidate(arr = [3, 2, 1, 4, 6, 5, 9, 8, 7, 10]) == 5\n assert candidate(arr = [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(arr = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(arr = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 1\n assert candidate(arr = [1, 0, 2, 3, 5, 4, 6, 7, 8, 9]) == 8\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(arr = [5, 1, 4, 2, 3, 8, 6, 10, 7, 9]) == 2\n assert candidate(arr = [1, 3, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 17\n assert candidate(arr = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24]) == 2\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 0]) == 1\n assert candidate(arr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 12\n assert candidate(arr = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 20, 12, 19, 13, 18, 14, 17, 15, 16]) == 4\n assert candidate(arr = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 0, 0]) == 1\n assert candidate(arr = [4, 3, 2, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 12\n assert candidate(arr = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 20]) == 11\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 20\n assert candidate(arr = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 2, 4, 3, 5, 6, 7, 8, 9, 10, 11]) == 4\n assert candidate(arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6]) == 1\n assert candidate(arr = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8]) == 5\n assert candidate(arr = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 10\n assert candidate(arr = [1, 5, 3, 4, 2, 6, 8, 7, 9, 10, 11, 15, 13, 14, 12, 16, 18, 17, 19, 20]) == 12\n assert candidate(arr = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(arr = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 20\n assert candidate(arr = [1, 2, 3, 4, 5, 0, 6]) == 2\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(arr = [4, 3, 2, 1, 5, 6, 7, 8, 9, 10]) == 7\n assert candidate(arr = [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]) == 3\n assert candidate(arr = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 10\n assert candidate(arr = [9, 7, 5, 3, 1, 8, 6, 4, 2, 10]) == 2\n assert candidate(arr = [5, 3, 2, 4, 1, 6, 8, 7, 9, 11, 10, 13, 15, 14, 16, 17]) == 9\n assert candidate(arr = [1, 3, 2, 4, 7, 6, 5, 8, 9, 0]) == 1\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(arr = [8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9]) == 2\n assert candidate(arr = [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]) == 27\n assert candidate(arr = [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]) == 3\n assert candidate(arr = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 15\n assert candidate(arr = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 10\n assert candidate(arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 11\n assert candidate(arr = [1, 2, 3, 4, 0, 5, 6, 7, 8, 9]) == 6\n", "comparison": "exact"}, "public_tests": ["[5,4,3,2,1]", "[2,1,3,4,4]"], "hints": ["Each k for which some permutation of arr[:k] is equal to sorted(arr)[:k] is where we should cut each chunk."], "metadata": {"canonical_parameter_names": ["arr"], "leetcode_dataset_entry_point": "Solution().maxChunksToSorted", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:57+00:00", "tests_total": 149, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "stack", "greedy", "sorting", "monotonic-stack"]}, "language": "cpp", "interface": {"raw_signature": "int maxChunksToSorted(vector& arr) {", "container": "Solution", "callable": "maxChunksToSorted", "parameters": [{"name": "arr", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 769, "task_id": "max-chunks-to-make-sorted", "difficulty": "Medium", "problem_description": "You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n - 1].\n\nWe split arr into some number of chunks (i.e., partitions), and individually sort each chunk. After concatenating them, the result should equal the sorted array.\n\nReturn the largest number of chunks we can make to sort the array.\n\nExample 1:\n\nInput: arr = [4,3,2,1,0]\nOutput: 1\nExplanation:\nSplitting into two or more chunks will not return the required result.\nFor example, splitting into [4, 3], [2, 1, 0] will result in [3, 4, 0, 1, 2], which isn't sorted.\n\nExample 2:\n\nInput: arr = [1,0,2,3,4]\nOutput: 4\nExplanation:\nWe can split into two chunks, such as [1, 0], [2, 3, 4].\nHowever, splitting into [1, 0], [2], [3], [4] is the highest number of chunks possible.\n\nConstraints:\n\n- n == arr.length\n- 1 <= n <= 10\n- 0 <= arr[i] < n\n- All the elements of arr are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(arr = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [1, 2, 0, 3, 4]) == 3\n assert candidate(arr = [5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [3, 1, 0, 2, 4]) == 2\n assert candidate(arr = [2, 0, 1, 3, 4]) == 3\n assert candidate(arr = [2, 1, 0, 3, 4]) == 3\n assert candidate(arr = [4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [3, 2, 1, 0, 4]) == 2\n assert candidate(arr = [1, 2, 3, 0, 4]) == 2\n assert candidate(arr = [2, 1, 0, 5, 4, 3]) == 2\n assert candidate(arr = [3, 2, 0, 1, 4]) == 2\n assert candidate(arr = [1, 2, 3, 4, 0]) == 1\n assert candidate(arr = [3, 2, 1, 6, 5, 4, 0]) == 1\n assert candidate(arr = [0, 1, 3, 2, 4]) == 4\n assert candidate(arr = [1, 0, 2, 3, 4]) == 4\n assert candidate(arr = [3, 0, 1, 4, 2]) == 1\n assert candidate(arr = [4, 0, 1, 2, 3]) == 1\n assert candidate(arr = [1, 2, 4, 3, 0]) == 1\n assert candidate(arr = [0, 1, 2, 3, 4, 5]) == 6\n assert candidate(arr = [0, 1, 2, 3, 4]) == 5\n assert candidate(arr = [0, 2, 1, 3, 4]) == 4\n assert candidate(arr = [0, 1, 2, 4, 3]) == 4\n assert candidate(arr = [2, 1, 0, 4, 3]) == 2\n assert candidate(arr = [2, 0, 1, 4, 3]) == 2\n assert candidate(arr = [5, 6, 7, 8, 9, 0, 1, 2, 3, 4]) == 1\n assert candidate(arr = [0, 1, 3, 2, 4, 5]) == 5\n assert candidate(arr = [4, 3, 2, 1, 0, 9, 8, 7, 6, 5]) == 2\n assert candidate(arr = [2, 1, 3, 0, 4, 5]) == 3\n assert candidate(arr = [3, 2, 1, 4, 0, 5]) == 2\n assert candidate(arr = [0, 1, 2, 4, 5, 3]) == 4\n assert candidate(arr = [6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [5, 0, 1, 2, 4, 3, 9, 8, 7, 6]) == 2\n assert candidate(arr = [0, 1, 5, 2, 3, 4]) == 3\n assert candidate(arr = [0, 1, 5, 3, 2, 4]) == 3\n assert candidate(arr = [5, 1, 2, 3, 0, 4, 7, 6, 9, 8]) == 3\n assert candidate(arr = [2, 1, 4, 3, 0, 5]) == 2\n assert candidate(arr = [5, 0, 1, 2, 4, 3]) == 1\n assert candidate(arr = [8, 0, 1, 2, 3, 4, 5, 6, 7, 9]) == 2\n assert candidate(arr = [0, 1, 2, 3, 8, 7, 6, 5, 4, 9]) == 6\n assert candidate(arr = [0, 2, 1, 3, 5, 4]) == 4\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 9, 8]) == 9\n assert candidate(arr = [2, 0, 1, 4, 3, 6, 5, 8, 7, 9]) == 5\n assert candidate(arr = [1, 3, 2, 0, 5, 4, 6, 8, 7, 9]) == 5\n assert candidate(arr = [1, 2, 0, 4, 5, 3, 7, 8, 9, 6]) == 3\n assert candidate(arr = [1, 2, 0, 3, 5, 4, 7, 6, 9, 8]) == 5\n assert candidate(arr = [0, 4, 5, 2, 3, 1]) == 2\n assert candidate(arr = [3, 1, 2, 0, 5, 4, 7, 6, 9, 8]) == 4\n assert candidate(arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == 1\n assert candidate(arr = [1, 0, 3, 2, 4, 5]) == 4\n assert candidate(arr = [8, 6, 7, 5, 3, 0, 9, 2, 1, 4]) == 1\n assert candidate(arr = [0, 1, 4, 3, 2, 5]) == 4\n assert candidate(arr = [1, 3, 2, 0, 4, 6, 5, 8, 7, 9]) == 5\n assert candidate(arr = [0, 4, 1, 3, 2, 7, 6, 9, 8, 5]) == 3\n assert candidate(arr = [2, 3, 0, 1, 4, 5]) == 3\n assert candidate(arr = [7, 6, 5, 4, 3, 2, 9, 8, 1, 0]) == 1\n assert candidate(arr = [1, 2, 3, 0, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(arr = [1, 2, 0, 3, 4, 6, 5, 7, 9, 8]) == 6\n assert candidate(arr = [5, 1, 4, 3, 2, 0]) == 1\n assert candidate(arr = [3, 2, 5, 4, 1, 0]) == 1\n assert candidate(arr = [1, 0, 2, 5, 4, 3]) == 3\n assert candidate(arr = [0, 2, 1, 3, 5, 4, 6, 8, 7, 9]) == 7\n assert candidate(arr = [5, 1, 2, 3, 4, 0, 6, 7, 8, 9]) == 5\n assert candidate(arr = [0, 3, 2, 1, 5, 4]) == 3\n assert candidate(arr = [5, 4, 0, 1, 2, 3, 9, 8, 6, 7]) == 2\n assert candidate(arr = [5, 4, 3, 2, 1, 0, 9, 8, 7, 6]) == 2\n assert candidate(arr = [4, 2, 0, 1, 3, 8, 6, 7, 5, 9]) == 3\n assert candidate(arr = [0, 1, 3, 2, 5, 4, 6]) == 5\n assert candidate(arr = [0, 1, 4, 3, 5, 2]) == 3\n assert candidate(arr = [0, 3, 2, 1, 4, 5]) == 4\n assert candidate(arr = [3, 0, 1, 2, 5, 4, 6]) == 3\n assert candidate(arr = [1, 2, 0, 4, 5, 3, 8, 7, 9, 6]) == 3\n assert candidate(arr = [6, 0, 2, 1, 4, 3, 8, 5, 9, 7]) == 1\n assert candidate(arr = [2, 0, 1, 3, 5, 4, 6]) == 4\n assert candidate(arr = [0, 2, 1, 4, 3, 6, 5, 8, 7, 9]) == 6\n assert candidate(arr = [2, 0, 1, 5, 4, 3, 7, 6, 9, 8]) == 4\n assert candidate(arr = [1, 0, 2, 3, 5, 4, 6]) == 5\n assert candidate(arr = [6, 0, 1, 2, 3, 5, 4]) == 1\n assert candidate(arr = [1, 0, 4, 3, 2, 5]) == 3\n assert candidate(arr = [4, 3, 2, 1, 0, 5, 6, 7, 8, 9]) == 6\n assert candidate(arr = [0, 3, 1, 2, 4, 5, 6, 7, 8, 9]) == 8\n assert candidate(arr = [3, 1, 0, 2, 5, 4]) == 2\n assert candidate(arr = [1, 3, 0, 2, 5, 4, 7, 6, 9, 8]) == 4\n assert candidate(arr = [0, 3, 2, 1, 4]) == 3\n assert candidate(arr = [3, 0, 1, 2, 7, 4, 6, 5, 9, 8]) == 3\n assert candidate(arr = [2, 0, 1, 4, 3, 5]) == 3\n assert candidate(arr = [0, 1, 4, 5, 2, 3]) == 3\n assert candidate(arr = [0, 1, 3, 5, 2, 4]) == 3\n assert candidate(arr = [5, 4, 0, 1, 2, 3, 9, 8, 7, 6]) == 2\n assert candidate(arr = [0, 2, 4, 1, 3, 5, 7, 6, 8, 9]) == 6\n assert candidate(arr = [0, 3, 2, 1, 4, 7, 6, 5, 8, 9]) == 6\n assert candidate(arr = [1, 0, 4, 3, 2, 5, 6, 7, 8, 9]) == 7\n assert candidate(arr = [9, 7, 8, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(arr = [2, 3, 0, 1, 6, 7, 4, 5, 9, 8]) == 3\n assert candidate(arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 10\n assert candidate(arr = [1, 4, 0, 3, 2, 5]) == 2\n assert candidate(arr = [0, 3, 1, 2, 6, 5, 4, 7, 9, 8]) == 5\n assert candidate(arr = [3, 0, 1, 2, 5, 4, 7, 6, 9, 8]) == 4\n assert candidate(arr = [3, 2, 1, 0, 7, 6, 5, 4, 9, 8]) == 3\n assert candidate(arr = [8, 9, 6, 7, 4, 5, 2, 3, 0, 1]) == 1\n assert candidate(arr = [1, 2, 0, 4, 5, 3]) == 2\n assert candidate(arr = [1, 2, 0, 3, 5, 4]) == 3\n assert candidate(arr = [3, 0, 2, 1, 5, 4]) == 2\n assert candidate(arr = [6, 5, 4, 3, 2, 1, 0, 9, 8, 7]) == 2\n assert candidate(arr = [5, 0, 1, 2, 3, 4]) == 1\n assert candidate(arr = [4, 2, 3, 1, 0, 5]) == 2\n assert candidate(arr = [2, 0, 1, 4, 3, 6, 5, 9, 7, 8]) == 4\n assert candidate(arr = [0, 5, 1, 3, 2, 4]) == 2\n assert candidate(arr = [0, 1, 3, 5, 4, 2]) == 3\n assert candidate(arr = [2, 1, 0, 3, 4, 5]) == 4\n assert candidate(arr = [0, 1, 3, 2, 4, 5, 7, 6, 8, 9]) == 8\n assert candidate(arr = [6, 5, 0, 1, 3, 4, 2]) == 1\n assert candidate(arr = [1, 2, 0, 3, 4, 5]) == 4\n assert candidate(arr = [5, 3, 2, 4, 0, 1]) == 1\n assert candidate(arr = [0, 1, 3, 2, 5, 4]) == 4\n assert candidate(arr = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8]) == 5\n assert candidate(arr = [0, 1, 2, 5, 3, 4]) == 4\n assert candidate(arr = [1, 3, 2, 0, 5, 4]) == 2\n assert candidate(arr = [1, 2, 0, 4, 5, 3, 7, 8, 6, 9]) == 4\n assert candidate(arr = [1, 2, 0, 4, 3, 6, 5]) == 3\n assert candidate(arr = [0, 5, 1, 2, 3, 4]) == 2\n assert candidate(arr = [0, 1, 2, 3, 5, 4]) == 5\n assert candidate(arr = [0, 1, 4, 2, 3, 5]) == 4\n assert candidate(arr = [3, 1, 2, 0, 4, 5, 8, 6, 9, 7]) == 4\n assert candidate(arr = [3, 2, 1, 0, 5, 4]) == 2\n", "comparison": "exact"}, "public_tests": ["[4,3,2,1,0]", "[1,0,2,3,4]"], "hints": ["The first chunk can be found as the smallest k for which A[:k+1] == [0, 1, 2, ...k]; then we repeat this process."], "metadata": {"canonical_parameter_names": ["arr"], "leetcode_dataset_entry_point": "Solution().maxChunksToSorted", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:58:59+00:00", "tests_total": 127, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "stack", "greedy", "sorting", "monotonic-stack"]}, "language": "cpp", "interface": {"raw_signature": "int maxChunksToSorted(vector& arr) {", "container": "Solution", "callable": "maxChunksToSorted", "parameters": [{"name": "arr", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 770, "task_id": "basic-calculator-iv", "difficulty": "Hard", "problem_description": "Given an expression such as expression = \"e + 8 - a + 5\" and an evaluation map such as {\"e\": 1} (given in terms of evalvars = [\"e\"] and evalints = [1]), return a list of tokens representing the simplified expression, such as [\"-1*a\",\"14\"]\n\n- An expression alternates chunks and symbols, with a space separating each chunk and symbol.\n- A chunk is either an expression in parentheses, a variable, or a non-negative integer.\n- A variable is a string of lowercase letters (not including digits.) Note that variables can be multiple letters, and note that variables never have a leading coefficient or unary operator like \"2x\" or \"-x\".\n\nExpressions are evaluated in the usual order: brackets first, then multiplication, then addition and subtraction.\n\n- For example, expression = \"1 + 2 * 3\" has an answer of [\"7\"].\n\nThe format of the output is as follows:\n\n- For each term of free variables with a non-zero coefficient, we write the free variables within a term in sorted order lexicographically.\n - For example, we would never write a term like \"b*a*c\", only \"a*b*c\".\n- Terms have degrees equal to the number of free variables being multiplied, counting multiplicity. We write the largest degree terms of our answer first, breaking ties by lexicographic order ignoring the leading coefficient of the term.\n - For example, \"a*a*b*c\" has degree 4.\n- The leading coefficient of the term is placed directly to the left with an asterisk separating it from the variables (if they exist.) A leading coefficient of 1 is still printed.\n- An example of a well-formatted answer is [\"-2*a*a*a\", \"3*a*a*b\", \"3*b*b\", \"4*a\", \"5*c\", \"-6\"].\n- Terms (including constant terms) with coefficient 0 are not included.\n - For example, an expression of \"0\" has an output of [].\n\nNote: You may assume that the given expression is always valid. All intermediate results will be in the range of [-2^31, 2^31 - 1].\n\nExample 1:\n\nInput: expression = \"e + 8 - a + 5\", evalvars = [\"e\"], evalints = [1]\nOutput: [\"-1*a\",\"14\"]\n\nExample 2:\n\nInput: expression = \"e - 8 + temperature - pressure\", evalvars = [\"e\", \"temperature\"], evalints = [1, 12]\nOutput: [\"-1*pressure\",\"5\"]\n\nExample 3:\n\nInput: expression = \"(e + 8) * (e - 8)\", evalvars = [], evalints = []\nOutput: [\"1*e*e\",\"-64\"]\n\nConstraints:\n\n- 1 <= expression.length <= 250\n- expression consists of lowercase English letters, digits, '+', '-', '*', '(', ')', ' '.\n- expression does not contain any leading or trailing spaces.\n- All the tokens in expression are separated by a single space.\n- 0 <= evalvars.length <= 100\n- 1 <= evalvars[i].length <= 20\n- evalvars[i] consists of lowercase English letters.\n- evalints.length == evalvars.length\n- -100 <= evalints[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(expression = \"1 + (2 * 3) + (4 * (5 + 6))\",evalvars = [],evalints = []) == ['51']\n assert candidate(expression = \"10 + 20 * (30 + 40) - 50\",evalvars = [],evalints = []) == ['1360']\n assert candidate(expression = \"(x + y) * (x - y) + (x + z) * (x - z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['-11']\n assert candidate(expression = \"a * (b + c) * (d + e)\",evalvars = ['a', 'b', 'c', 'd', 'e'],evalints = [1, 2, 3, 4, 5]) == ['45']\n assert candidate(expression = \"(x + y) * (x - y) + (x + y) * (x + y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['6']\n assert candidate(expression = \"x + y * 2\",evalvars = ['x'],evalints = [3]) == ['2*y', '3']\n assert candidate(expression = \"a + b + c + d + e\",evalvars = ['a', 'b', 'c'],evalints = [1, 2, 3]) == ['1*d', '1*e', '6']\n assert candidate(expression = \"3 * (a + b) - 2 * (a - b)\",evalvars = ['a'],evalints = [2]) == ['5*b', '2']\n assert candidate(expression = \"x + y * 2 - (x - y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['6']\n assert candidate(expression = \"(a * b) * (c * d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['24']\n assert candidate(expression = \"10 + 2 * 6\",evalvars = [],evalints = []) == ['22']\n assert candidate(expression = \"e - 8 + temperature - pressure\",evalvars = ['e', 'temperature'],evalints = [1, 12]) == ['-1*pressure', '5']\n assert candidate(expression = \"(x + y) * (x - y) + (x + z) * (x - z)\",evalvars = [],evalints = []) == ['2*x*x', '-1*y*y', '-1*z*z']\n assert candidate(expression = \"100 * ( 2 + 12 )\",evalvars = [],evalints = []) == ['1400']\n assert candidate(expression = \"x * y + y * x\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['4']\n assert candidate(expression = \"x * y + z\",evalvars = ['x', 'y'],evalints = [2, 3]) == ['1*z', '6']\n assert candidate(expression = \"(x + y) * (x - y) + z\",evalvars = ['x', 'y', 'z'],evalints = [3, 4, 5]) == ['-2']\n assert candidate(expression = \"(a + b) * (a - b)\",evalvars = ['a', 'b'],evalints = [3, 2]) == ['5']\n assert candidate(expression = \"e + 8 - a + 5\",evalvars = ['e'],evalints = [1]) == ['-1*a', '14']\n assert candidate(expression = \"x * x + 2 * x + 1\",evalvars = ['x'],evalints = [1]) == ['4']\n assert candidate(expression = \"(e + 8) * (e - 8)\",evalvars = [],evalints = []) == ['1*e*e', '-64']\n assert candidate(expression = \"x * (y + z) + w\",evalvars = ['x', 'y', 'z'],evalints = [2, 3, 4]) == ['1*w', '14']\n assert candidate(expression = \"x + y * (2 + 3) - z\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['8']\n assert candidate(expression = \"(a + b) * (a - b)\",evalvars = ['a', 'b'],evalints = [3, 4]) == ['-7']\n assert candidate(expression = \"x + 2 * (y + z)\",evalvars = ['x'],evalints = [1]) == ['2*y', '2*z', '1']\n assert candidate(expression = \"(a + b) * (a - b)\",evalvars = [],evalints = []) == ['1*a*a', '-1*b*b']\n assert candidate(expression = \"x * x + y * y + z * z\",evalvars = [],evalints = []) == ['1*x*x', '1*y*y', '1*z*z']\n assert candidate(expression = \"(a + b) + (c + d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['10']\n assert candidate(expression = \"(x + y) * (x + y)\",evalvars = [],evalints = []) == ['1*x*x', '2*x*y', '1*y*y']\n assert candidate(expression = \"(x + y) * (x + y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['9']\n assert candidate(expression = \"a + b * c + d\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['11']\n assert candidate(expression = \"10 * (x + y) + 5\",evalvars = ['x', 'y'],evalints = [1, 1]) == ['25']\n assert candidate(expression = \"100 * 2 + 12\",evalvars = [],evalints = []) == ['212']\n assert candidate(expression = \"(x + y + z) * (x - y + z) * (x + y - z) * (x - y - z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == []\n assert candidate(expression = \"(a + b) * (c + d + e) * (f + g + h) + (i + j) * (k + l + m) * (n + o + p)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == ['31536']\n assert candidate(expression = \"(x + y + z) * (x + y + z) * (x + y + z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['216']\n assert candidate(expression = \"(x + 2*y + 3*z) * (4*x + 5*y + 6*z) - (7*x + 8*y + 9*z) * (10*x + 11*y + 12*z)\",evalvars = ['x', 'y', 'z'],evalints = [1, -1, 2]) == ['-336']\n assert candidate(expression = \"((x + 2*y) * (z + 3)) + ((4*x - 5*y) * (z - 6))\",evalvars = ['x', 'y', 'z'],evalints = [2, 3, 4]) == ['70']\n assert candidate(expression = \"(x + 2 * y + 3 * z + 4 * w) * (x - 2 * y - 3 * z - 4 * w) * (x + 5 * y + 6 * z + 7 * w) + 40\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, 1, 1, 1]) == ['-1480']\n assert candidate(expression = \"((a + b) * (c - d) + e) * f\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f'],evalints = [1, 2, 3, 4, 5, 6]) == ['12']\n assert candidate(expression = \"(a + b + c + d) * (a + b + c - d) * (a + b - c + d) * (a + b - c - d) * (a - b + c + d) * (a - b + c - d) * (a - b - c + d) * (a - b - c - d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 1, 1, 1]) == []\n assert candidate(expression = \"(a + b) * (c + d) * (e + f) + (g + h) * (i + j) * (k + l)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'],evalints = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == ['16']\n assert candidate(expression = \"(1 + x) * (1 - x) * (1 + x * x) + (1 - x * x) * (1 - x * x) * (1 + x * x * x) + 7\",evalvars = ['x'],evalints = [0]) == ['9']\n assert candidate(expression = \"(2 * x + 3 * y) * (4 * z + 5) - (6 * w + 7 * v) * (8 * u + 9)\",evalvars = ['x', 'y', 'z', 'w', 'v', 'u'],evalints = [1, -1, 2, -2, 3, -3]) == ['122']\n assert candidate(expression = \"(a + 2 * b) * (3 * c + 4 * d) - (a - b) * (c - 2 * d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['120']\n assert candidate(expression = \"(a + b + c) * (a - b - c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 2, 3]) == ['-24']\n assert candidate(expression = \"(a + b + c) * (d + e + f)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f'],evalints = [1, 2, 3, 4, 5, 6]) == ['90']\n assert candidate(expression = \"((a + b) * (c + d) + (e + f) * (g + h)) * ((i + j) * (k + l) + (m + n) * (o + p))\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == ['236964']\n assert candidate(expression = \"(a + b) * (c + d) + (e + f) * (g + h)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],evalints = [1, 2, 3, 4, 5, 6, 7, 8]) == ['186']\n assert candidate(expression = \"((x + y) * (z + w)) * ((x - y) * (z - w))\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, -1, 2, -2]) == []\n assert candidate(expression = \"10 * (x + 2 * y + 3 * z) - 5 * (x - 2 * y + 3 * z) + 2 * (x + 2 * y - 3 * z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['102']\n assert candidate(expression = \"(x + 2*y + 3*z) * (4*x + 5*y + 6*z) - (7*x + 8*y + 9*z) * (10*x + 11*y + 12*z) + (13*x + 14*y + 15*z) * (16*x + 17*y + 18*z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['1440']\n assert candidate(expression = \"(x + 2*y) * (3*z + 4*w) - (5*v + 6*u) * (7*t + 8*s)\",evalvars = ['x', 'y', 'z', 'w', 'v', 'u', 't', 's'],evalints = [1, 2, 3, 4, 5, 6, 7, 8]) == ['-6768']\n assert candidate(expression = \"(a + b + c + d) * (e + f + g + h)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],evalints = [1, 2, 3, 4, 5, 6, 7, 8]) == ['260']\n assert candidate(expression = \"(2*x + 3*y + 4*z) * (5*x + 6*y + 7*z) + (8*x + 9*y + 10*z) * (11*x + 12*y + 13*z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['1134']\n assert candidate(expression = \"(a + b + c + d + e) * (a + b + c + d + e) * (a + b + c + d + e)\",evalvars = ['a', 'b', 'c', 'd', 'e'],evalints = [1, 2, 3, 4, 5]) == ['3375']\n assert candidate(expression = \"((x + y + z) * (x - y + z)) * ((x + y - z) * (x - y - z))\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == []\n assert candidate(expression = \"(a + b + c) * (d + e + f) * (g + h + i)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'],evalints = [1, -1, 2, -2, 3, -3, 4, -4, 5]) == ['-20']\n assert candidate(expression = \"(a + b) * (a - b) + (a + c) * (a - c) + (b + c) * (b - c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 1, 1]) == []\n assert candidate(expression = \"((x + y) * (z + w) + (v + u) * (t + s)) * (r + q + p)\",evalvars = ['x', 'y', 'z', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p'],evalints = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == ['24']\n assert candidate(expression = \"(x + 2 * y + 3 * z) * (x - 2 * y - 3 * z) * (x + 4 * y + 5 * z) + 30\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['-210']\n assert candidate(expression = \"(a + b) * (c + d) * (e + f)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f'],evalints = [1, 2, 3, 4, 5, 6]) == ['231']\n assert candidate(expression = \"(x + 3) * (x - 3) * (x + 2) * (x - 2) + 10\",evalvars = ['x'],evalints = [0]) == ['46']\n assert candidate(expression = \"(x * y * z * w) + (x * y + z * w) + (x + y) * (z + w) + (x + y) * (z + w) * (x * y + z * w)\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, 1, 1, 1]) == ['15']\n assert candidate(expression = \"(a + b + c) * (d + e + f) + (a - b - c) * (d - e - f)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f'],evalints = [1, 2, 3, 4, 5, 6]) == ['118']\n assert candidate(expression = \"((a + b) * (c + d)) + ((a - b) * (c - d))\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['22']\n assert candidate(expression = \"((x + y) * (z + w) + (v + u) * (t + s)) * ((r + q) * (p + o) + (n + m) * (l + k))\",evalvars = ['x', 'y', 'z', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o', 'n', 'm', 'l', 'k'],evalints = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == ['64']\n assert candidate(expression = \"(a + b + c) * (d + e + f) + (g + h + i) * (j + k + l)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == ['882']\n assert candidate(expression = \"(a + 2*b) * (3*a - 4*b) + (5*a + 6*b) * (7*a - 8*b)\",evalvars = ['a', 'b'],evalints = [1, 1]) == ['-14']\n assert candidate(expression = \"(x + y + z) * (x + y + z) - (x + y) * (x + y)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['27']\n assert candidate(expression = \"(x + y + z) * (x - y - z) + (x + y - z) * (x - y + z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['-24']\n assert candidate(expression = \"((x + y) * (x - y)) + ((x + z) * (x - z))\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['-11']\n assert candidate(expression = \"100 * (x + 2*y) - 50 * (x - 3*y)\",evalvars = ['x', 'y'],evalints = [2, 3]) == ['1150']\n assert candidate(expression = \"(x + y + z) * (x + y - z) * (x - y + z) * (x - y - z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == []\n assert candidate(expression = \"(a + b) * (c + d) + (a - b) * (c - d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['22']\n assert candidate(expression = \"(x + y) * (x - y) * (x + y) + (x - y) * (x - y) * (x + y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['-6']\n assert candidate(expression = \"x * (y + z) * (y - z) + x * (y + w) * (y - w)\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, 2, 3, 4]) == ['-17']\n assert candidate(expression = \"(e + 8) * (e - 8) + (e + 2) * (e - 2) - (e + 1) * (e - 1)\",evalvars = ['e'],evalints = [1]) == ['-66']\n assert candidate(expression = \"(a * b * c + d * e * f) * (g + h + i)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == ['3024']\n assert candidate(expression = \"(a + b + c) * (a - b - c) * (a + b - c)\",evalvars = ['a', 'b', 'c'],evalints = [1, -1, 2]) == []\n assert candidate(expression = \"(a * b + c) * (d - e) + f * (g + h)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],evalints = [1, 2, 3, 4, 5, 6, 7, 8]) == ['85']\n assert candidate(expression = \"(a * b * c * d) + (a * b * c * e) + (a * b * d * e) + (a * c * d * e) + (b * c * d * e)\",evalvars = ['a', 'b', 'c', 'd', 'e'],evalints = [1, 2, 3, 4, 5]) == ['274']\n assert candidate(expression = \"(x + 2*y + 3*z) * (x - y + z) + 2 * (x + y + z) * (x - y + z) + 3 * (x + y) * (x - y + z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['18']\n assert candidate(expression = \"(x + 2 * y + 3 * z) * (x - 2 * y + 3 * z) - (x + 2 * y - 3 * z) * (x - 2 * y - 3 * z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['36']\n assert candidate(expression = \"(a + 2*b + 3*c) * (4*d + 5*e + 6*f) + (7*g + 8*h + 9*i) * (10*j + 11*k + 12*l)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == ['71888']\n assert candidate(expression = \"(a + 2*b) * (3*c + 4*d) + (5*e + 6*f) * (7*g + 8*h)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],evalints = [1, -1, 2, -2, 3, -3, 4, -4]) == ['14']\n assert candidate(expression = \"(x + y + z + w) * (x + y + z + w) * (x + y + z + w) * (x + y + z + w)\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, 1, 1, 1]) == ['256']\n assert candidate(expression = \"(a + b) * (a - b) + (b + c) * (b - c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 2, 3]) == ['-8']\n assert candidate(expression = \"(x * y + z) * (w * v + u) - (t * s + r) * (q * p + o)\",evalvars = ['x', 'y', 'z', 'w', 'v', 'u', 't', 's', 'r', 'q', 'p', 'o'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == ['-7800']\n assert candidate(expression = \"x * (y + z) - y * (x + z) + z * (x + y)\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['2']\n assert candidate(expression = \"10 * (a + 5 * (b + c)) - 3 * (a - b)\",evalvars = ['a', 'b', 'c'],evalints = [1, 2, 3]) == ['263']\n assert candidate(expression = \"(x + y + z) * (x - y - z) + (x + 2 * y + 3 * z) * (x - 2 * y - 3 * z) + 15\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['-12']\n assert candidate(expression = \"3 * (a * b + b * c + c * a) - 2 * (a * a + b * b + c * c) + (a + b + c) * (a + b + c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 1, 1]) == ['12']\n assert candidate(expression = \"2 * (x + 3 * (y + 4)) - 5 * (x - y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['43']\n assert candidate(expression = \"(a + b + c) * (a - b + c) * (a + b - c) * (a - b - c) + (d + e + f) * (d - e + f) * (d + e - f) * (d - e - f)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f'],evalints = [1, 2, 3, 4, 5, 6]) == ['-1575']\n assert candidate(expression = \"(a + b) * (a - b) - (a * a - b * b) + (c + d) * (c - d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == ['-7']\n assert candidate(expression = \"(a + b) * (c + d) - (e + f) * (g + h)\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'],evalints = [1, 2, 3, 4, 5, 6, 7, 8]) == ['-144']\n assert candidate(expression = \"(a + b + c + d) * (a - b + c - d) - (a - b - c + d) * (a + b - c - d) + 25\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 1, 1, 1]) == ['25']\n assert candidate(expression = \"(a + 3*b) * (c + 5*d) + (2*a - 4*b) * (6*c + 8*d) - (3*a + 6*b) * (9*c + 12*d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 1, 1, 1]) == ['-193']\n assert candidate(expression = \"(a + b + c + d + e) * (a - b + c - d + e) - (a - b - c + d - e) * (a + b - c - d - e) + 35\",evalvars = ['a', 'b', 'c', 'd', 'e'],evalints = [1, 1, 1, 1, 1]) == ['39']\n assert candidate(expression = \"(a + b) * (a + b) * (a + b) + (c + d) * (c + d) * (c + d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 1, 1, 1]) == ['16']\n assert candidate(expression = \"(x - 2*y) * (3*z - 4) + (5*x + 6*y) * (7*z - 8)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['206']\n assert candidate(expression = \"(a + b + c + d) * (a - b + c - d) * (a + b - c - d) * (a - b - c + d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, 2, 3, 4]) == []\n assert candidate(expression = \"(x + 2*y + 3*z) * (4*x + 5*y + 6*z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['448']\n assert candidate(expression = \"((x + y) * (x - y)) * ((x + z) * (x - z))\",evalvars = ['x', 'y', 'z'],evalints = [2, 3, 4]) == ['60']\n assert candidate(expression = \"3 * (x + 2 * y + 3 * z) - 2 * (x - y + z) + 4 * (x - 2 * y + 3 * z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['62']\n assert candidate(expression = \"(x + y + z) * (x + y + z) * (x + y + z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == ['27']\n assert candidate(expression = \"((x + y) * (x - y) + (y + z) * (y - z) + (z + x) * (z - x)) * 2\",evalvars = ['x', 'y', 'z'],evalints = [1, 1, 1]) == []\n assert candidate(expression = \"(a + b) * (a - b) * (c + d) * (c - d)\",evalvars = ['a', 'b', 'c', 'd'],evalints = [1, -1, 2, -2]) == []\n assert candidate(expression = \"(a + b + c) * (a + b + c) * (a + b + c) - 3 * (a + b) * (a + b) * (a + b) + 3 * (a + b) * (a + b) * (a + b) - (a + b) * (a + b) * (a + b)\",evalvars = ['a', 'b', 'c'],evalints = [1, 1, 1]) == ['19']\n assert candidate(expression = \"(x + 2*y + 3*z) * (4*x + 5*y + 6*z) - (7*x + 8*y + 9*z) * (10*x + 11*y + 12*z)\",evalvars = ['x', 'y', 'z'],evalints = [1, 2, 3]) == ['-2952']\n assert candidate(expression = \"(a + b) * (a + b) * (a + b) + (a + c) * (a + c) * (a + c) + (b + c) * (b + c) * (b + c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 2, 3]) == ['216']\n assert candidate(expression = \"10 * (x + 2 * y) - 5 * (x - 3 * y)\",evalvars = ['x', 'y'],evalints = [1, 2]) == ['75']\n assert candidate(expression = \"(a + b) * (a - b) + (a + b) * (a + b) - (a - b) * (a - b)\",evalvars = ['a', 'b'],evalints = [1, 2]) == ['5']\n assert candidate(expression = \"(2*a + 3*b + 4*c) * (5*a + 6*b + 7*c) - (8*a + 9*b + 10*c) * (11*a + 12*b + 13*c)\",evalvars = ['a', 'b', 'c'],evalints = [1, -1, 2]) == ['-384']\n assert candidate(expression = \"(x + 3) * (x - 3) * (x + 3)\",evalvars = ['x'],evalints = [2]) == ['-25']\n assert candidate(expression = \"((x + y) * (x - y)) * ((x + z) * (x - z)) + (x * x)\",evalvars = ['x', 'y', 'z'],evalints = [2, 3, 4]) == ['64']\n assert candidate(expression = \"(x + y + z + w) * (x - y - z - w) + (x + y - z + w) * (x - y + z - w)\",evalvars = ['x', 'y', 'z', 'w'],evalints = [1, 2, 3, 4]) == ['-88']\n assert candidate(expression = \"(a + b) * (a - b) + (b + c) * (b - c) + (c + a) * (c - a)\",evalvars = ['a', 'b', 'c'],evalints = [1, 1, 1]) == []\n assert candidate(expression = \"(a + 2*b + 3*c) * (a - b + c) + 2 * (a + b + c) * (a - b + c)\",evalvars = ['a', 'b', 'c'],evalints = [1, 1, 1]) == ['12']\n assert candidate(expression = \"(x + 3) * (x - 3) * (x + 5) + 2 * (x + 1) * (x - 1)\",evalvars = ['x'],evalints = [2]) == ['-29']\n assert candidate(expression = \"(a + b + c) * (d + e + f) - (g + h + i) * (j + k + l) + 20\",evalvars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'],evalints = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == ['-682']\n", "comparison": "exact"}, "public_tests": ["\"e + 8 - a + 5\"\n[\"e\"]\n[1]", "\"e - 8 + temperature - pressure\"\n[\"e\", \"temperature\"]\n[1, 12]", "\"(e + 8) * (e - 8)\"\n[]\n[]"], "hints": ["One way is with a Polynomial class. For example, * `Poly:add(this, that)` returns the result of `this + that`. * `Poly:sub(this, that)` returns the result of `this - that`. * `Poly:mul(this, that)` returns the result of `this * that`. * `Poly:evaluate(this, evalmap)` returns the polynomial after replacing all free variables with constants as specified by `evalmap`. * `Poly:toList(this)` returns the polynomial in the correct output format. * `Solution::combine(left, right, symbol)` returns the result of applying the binary operator represented by `symbol` to `left` and `right`. * `Solution::make(expr)` makes a new `Poly` represented by either the constant or free variable specified by `expr`. * `Solution::parse(expr)` parses an expression into a new `Poly`."], "metadata": {"canonical_parameter_names": ["expression", "evalvars", "evalints"], "leetcode_dataset_entry_point": "Solution().basicCalculatorIV", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:02+00:00", "tests_total": 126, "tests_dropped": 4, "flags": [], "topic_tags": ["hash-table", "math", "string", "stack", "recursion"]}, "language": "cpp", "interface": {"raw_signature": "vector basicCalculatorIV(string expression, vector& evalvars, vector& evalints) {", "container": "Solution", "callable": "basicCalculatorIV", "parameters": [{"name": "expression", "type": "string"}, {"name": "evalvars", "type": "vector&"}, {"name": "evalints", "type": "vector&"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 771, "task_id": "jewels-and-stones", "difficulty": "Easy", "problem_description": "You're given strings jewels representing the types of stones that are jewels, and stones representing the stones you have. Each character in stones is a type of stone you have. You want to know how many of the stones you have are also jewels.\n\nLetters are case sensitive, so \"a\" is considered a different type of stone from \"A\".\n\nExample 1:\n\nInput: jewels = \"aA\", stones = \"aAAbbbb\"\nOutput: 3\n\nExample 2:\n\nInput: jewels = \"z\", stones = \"ZZ\"\nOutput: 0\n\nConstraints:\n\n- 1 <= jewels.length, stones.length <= 50\n- jewels and stones consist of only English letters.\n- All the characters of jewels are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(jewels = \"aA\",stones = \"aAAbbbb\") == 3\n assert candidate(jewels = \"xyz\",stones = \"aabbcc\") == 0\n assert candidate(jewels = \"abcdefg\",stones = \"aghfbadcegf\") == 10\n assert candidate(jewels = \"abcdefg\",stones = \"aghgfedcba\") == 9\n assert candidate(jewels = \"XYZ\",stones = \"xyzbxyz\") == 0\n assert candidate(jewels = \"abcdef\",stones = \"fedcba\") == 6\n assert candidate(jewels = \"J\",stones = \"jjjjjJ\") == 1\n assert candidate(jewels = \"aBcD\",stones = \"abCdEfGhIjKlMnOpQrStUvWxYz\") == 1\n assert candidate(jewels = \"A\",stones = \"aAaAaA\") == 3\n assert candidate(jewels = \"XYZ\",stones = \"xyzXYZxyz\") == 3\n assert candidate(jewels = \"J\",stones = \"Jjjjjjjjjjj\") == 1\n assert candidate(jewels = \"A\",stones = \"aA\") == 1\n assert candidate(jewels = \"xyz\",stones = \"xyzzxyzz\") == 8\n assert candidate(jewels = \"z\",stones = \"ZZ\") == 0\n assert candidate(jewels = \"abc\",stones = \"acbacba\") == 7\n assert candidate(jewels = \"abc\",stones = \"aaabbbccc\") == 9\n assert candidate(jewels = \"xyz\",stones = \"xyzzzyx\") == 7\n assert candidate(jewels = \"ABC\",stones = \"abcABC\") == 3\n assert candidate(jewels = \"abc\",stones = \"aabbcc\") == 6\n assert candidate(jewels = \"xyzXYZ\",stones = \"zyxwvutsrqponmlkjihgfedcbaZXCVBNMLKJIHGFEDCBA\") == 5\n assert candidate(jewels = \"ABCDEFGHIJK\",stones = \"ABCDEFGHIJKabcdefghijk\") == 11\n assert candidate(jewels = \"mnopqr\",stones = \"mnopqrzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 6\n assert candidate(jewels = \"abcdef\",stones = \"aabbccddeeff\") == 12\n assert candidate(jewels = \"mnopqr\",stones = \"mnopqrstuvwxyz\") == 6\n assert candidate(jewels = \"ABCDEFGHIJKL\",stones = \"LJKIHFEDCBA\") == 11\n assert candidate(jewels = \"mnopqr\",stones = \"rstuvwrstuvwrstuvwrstuvw\") == 4\n assert candidate(jewels = \"yza\",stones = \"yzayzayzayza\") == 12\n assert candidate(jewels = \"LMNOPQ\",stones = \"mnopqrLMNOPQ\") == 6\n assert candidate(jewels = \"LMNOPQRSTU\",stones = \"LMNOPQRSTULMNOPQRSTUVWXYZ\") == 20\n assert candidate(jewels = \"QWERTY\",stones = \"qwertyuiopasdfghjklzxcvbnmQWERTY\") == 6\n assert candidate(jewels = \"aAbBcC\",stones = \"aabbccAAzz\") == 8\n assert candidate(jewels = \"pythonPYTHON\",stones = \"pythooonPYTHOOONpy\") == 18\n assert candidate(jewels = \"ABCDEFGHIJKL\",stones = \"abcdefghijlkjihgfedcba\") == 0\n assert candidate(jewels = \"javaJAVA\",stones = \"jjjaaaaavvvaaaAAAVVVAAA\") == 23\n assert candidate(jewels = \"abcdefghij\",stones = \"zzzzzzzzzzzzzzzzzzzz\") == 0\n assert candidate(jewels = \"AEIOU\",stones = \"aeiouAEIOUaeiouAEIOU\") == 10\n assert candidate(jewels = \"fghij\",stones = \"jihgf\") == 5\n assert candidate(jewels = \"xyzXYZ\",stones = \"zzzzzyyyxXxXyYy\") == 15\n assert candidate(jewels = \"pqrst\",stones = \"tsrpq\") == 5\n assert candidate(jewels = \"abcdefghijk\",stones = \"ABCDEFGHIJKabcdefghijk\") == 11\n assert candidate(jewels = \"ghijkl\",stones = \"lkjihg\") == 6\n assert candidate(jewels = \"abcdefg\",stones = \"abcdefgabcdefgabcdefg\") == 21\n assert candidate(jewels = \"abcde\",stones = \"edcba\") == 5\n assert candidate(jewels = \"z\",stones = \"zzzzzzzzzzzzzzzzzzzz\") == 20\n assert candidate(jewels = \"mnopqr\",stones = \"mnopqrnopqrxyz\") == 11\n assert candidate(jewels = \"aAbBcC\",stones = \"aAbBcCxxxyyyzzz\") == 6\n assert candidate(jewels = \"uvwxy\",stones = \"yxwvu\") == 5\n assert candidate(jewels = \"aAbBcC\",stones = \"abcABCabcABC\") == 12\n assert candidate(jewels = \"mnopqr\",stones = \"mnoqrpmnopqrmmmnopqr\") == 20\n assert candidate(jewels = \"QWJRTY\",stones = \"QWJRTYqwerty\") == 6\n assert candidate(jewels = \"Z\",stones = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 0\n assert candidate(jewels = \"JKLM\",stones = \"ABCDEFGHIJKLmnopqrstu\") == 3\n assert candidate(jewels = \"abcABC\",stones = \"aAbBcCabcABC\") == 12\n assert candidate(jewels = \"QRSTU\",stones = \"UTSRQ\") == 5\n assert candidate(jewels = \"abcdefgABCDEFG\",stones = \"gfedcbaGFEDCBAgfedcba\") == 21\n assert candidate(jewels = \"LMNOPQ\",stones = \"PQLNOM\") == 6\n assert candidate(jewels = \"abcABC\",stones = \"aBcDeFgHiJkLmNoPqRsTuVwXyZ\") == 3\n assert candidate(jewels = \"xyzXYZ\",stones = \"zyxZYXzyxZYXzyxZYX\") == 18\n assert candidate(jewels = \"abcdef\",stones = \"fedcbafedcbafedcba\") == 18\n assert candidate(jewels = \"xyzXYZ\",stones = \"xyzzzzyyxXXYYZZZ\") == 16\n assert candidate(jewels = \"abcdefg\",stones = \"hijklmnopqrstuvwxyz\") == 0\n assert candidate(jewels = \"MNOPQR\",stones = \"ZYXWVUTSRQPONMLKJIHGFEDCBA\") == 6\n assert candidate(jewels = \"abcdefghijkABCDEFGHIJK\",stones = \"abcdefghijkABCDEFGHIJK\") == 22\n assert candidate(jewels = \"GHIJKL\",stones = \"ghijklGHJKLMN\") == 5\n assert candidate(jewels = \"xyzXYZ\",stones = \"aAbBcCxyzXYZ\") == 6\n assert candidate(jewels = \"abcdef\",stones = \"abcdefabcdefabcdefabcdef\") == 24\n assert candidate(jewels = \"klmnopqrKLMNOPQR\",stones = \"klmnopqrKLMNOPQR\") == 16\n assert candidate(jewels = \"mnopqr\",stones = \"mnopqrstoopqrmmn\") == 14\n assert candidate(jewels = \"abcdefghijABCDEFGHIJ\",stones = \"abcdefghijABCDEFGHIJ\") == 20\n assert candidate(jewels = \"mnopqrstuvwxyz\",stones = \"abcdefghijklmnopqrstuvwxyz\") == 14\n assert candidate(jewels = \"mnopqrstuv\",stones = \"mlkjihgfdsazxcvbnm\") == 5\n assert candidate(jewels = \"klmno\",stones = \"onmlk\") == 5\n assert candidate(jewels = \"rstuvw\",stones = \"vwutsr\") == 6\n assert candidate(jewels = \"abcABC\",stones = \"abcABCabcABC\") == 12\n assert candidate(jewels = \"stuvwxyzSTUVWXYZ\",stones = \"stuvwxyzSTUVWXYZ\") == 16\n assert candidate(jewels = \"xyzXYZ\",stones = \"xyzzzXXYyyZZZ\") == 13\n assert candidate(jewels = \"worldWORLD\",stones = \"wwoorrllddWWOOORRLLDD\") == 21\n assert candidate(jewels = \"qrstuv\",stones = \"qwertyuiopasdfghjklzxcvbnm\") == 6\n assert candidate(jewels = \"abcdef\",stones = \"fedcbaghijklmnopqrstuvwxyz\") == 6\n assert candidate(jewels = \"ABCDEFG\",stones = \"abcdefgABCDEFG\") == 7\n assert candidate(jewels = \"xyzXYZ\",stones = \"xYzXyZxYzXyZxYzXyZ\") == 18\n assert candidate(jewels = \"helloHELLO\",stones = \"hheelloollleeHHHELLO\") == 20\n assert candidate(jewels = \"ABCDEFGHIJ\",stones = \"ABCDEFGHIJabcdefghij\") == 10\n assert candidate(jewels = \"asdfghjklzxcvbnm\",stones = \"qwertyuiopzxcvbnmasdfghjklqwertyuiop\") == 16\n assert candidate(jewels = \"VWXYZ\",stones = \"ZYXWV\") == 5\n assert candidate(jewels = \"hijklmnopqrstuvwxyz\",stones = \"abcdefg\") == 0\n", "comparison": "exact"}, "public_tests": ["\"aA\"\n\"aAAbbbb\"", "\"z\"\n\"ZZ\""], "hints": ["For each stone, check if it is a jewel."], "metadata": {"canonical_parameter_names": ["jewels", "stones"], "leetcode_dataset_entry_point": "Solution().numJewelsInStones", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:04+00:00", "tests_total": 103, "tests_dropped": 17, "flags": [], "topic_tags": ["hash-table", "string"]}, "language": "cpp", "interface": {"raw_signature": "int numJewelsInStones(string jewels, string stones) {", "container": "Solution", "callable": "numJewelsInStones", "parameters": [{"name": "jewels", "type": "string"}, {"name": "stones", "type": "string"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 773, "task_id": "sliding-puzzle", "difficulty": "Hard", "problem_description": "On an 2 x 3 board, there are five tiles labeled from 1 to 5, and an empty square represented by 0. A move consists of choosing 0 and a 4-directionally adjacent number and swapping it.\n\nThe state of the board is solved if and only if the board is [[1,2,3],[4,5,0]].\n\nGiven the puzzle board board, return the least number of moves required so that the state of the board is solved. If it is impossible for the state of the board to be solved, return -1.\n\nExample 1:\n\nInput: board = [[1,2,3],[4,0,5]]\nOutput: 1\nExplanation: Swap the 0 and the 5 in one move.\n\nExample 2:\n\nInput: board = [[1,2,3],[5,4,0]]\nOutput: -1\nExplanation: No number of moves will make the board solved.\n\nExample 3:\n\nInput: board = [[4,1,2],[5,0,3]]\nOutput: 5\nExplanation: 5 is the smallest number of moves that solves the board.\nAn example path:\nAfter move 0: [[4,1,2],[5,0,3]]\nAfter move 1: [[4,1,2],[0,5,3]]\nAfter move 2: [[0,1,2],[4,5,3]]\nAfter move 3: [[1,0,2],[4,5,3]]\nAfter move 4: [[1,2,0],[4,5,3]]\nAfter move 5: [[1,2,3],[4,5,0]]\n\nConstraints:\n\n- board.length == 2\n- board[i].length == 3\n- 0 <= board[i][j] <= 5\n- Each value board[i][j] is unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [[4, 1, 2], [0, 5, 3]]) == 4\n assert candidate(board = [[3, 2, 4], [1, 5, 0]]) == 14\n assert candidate(board = [[0, 1, 2], [4, 5, 3]]) == 3\n assert candidate(board = [[1, 2, 3], [4, 0, 5]]) == 1\n assert candidate(board = [[1, 2, 0], [3, 4, 5]]) == 13\n assert candidate(board = [[1, 0, 2], [4, 5, 3]]) == 2\n assert candidate(board = [[1, 2, 3], [5, 4, 0]]) == -1\n assert candidate(board = [[0, 1, 2], [3, 4, 5]]) == 15\n assert candidate(board = [[1, 0, 3], [4, 2, 5]]) == 2\n assert candidate(board = [[1, 2, 3], [0, 4, 5]]) == 2\n assert candidate(board = [[4, 1, 2], [5, 0, 3]]) == 5\n assert candidate(board = [[3, 4, 2], [0, 1, 5]]) == -1\n assert candidate(board = [[2, 0, 3], [1, 5, 4]]) == -1\n assert candidate(board = [[2, 5, 3], [0, 4, 1]]) == 14\n assert candidate(board = [[1, 3, 0], [4, 2, 5]]) == 3\n assert candidate(board = [[2, 3, 1], [4, 0, 5]]) == 15\n assert candidate(board = [[4, 1, 0], [2, 5, 3]]) == 7\n assert candidate(board = [[5, 3, 0], [4, 1, 2]]) == 17\n assert candidate(board = [[1, 3, 5], [2, 4, 0]]) == -1\n assert candidate(board = [[2, 3, 4], [1, 0, 5]]) == -1\n assert candidate(board = [[5, 3, 4], [1, 2, 0]]) == 12\n assert candidate(board = [[1, 2, 5], [0, 4, 3]]) == -1\n assert candidate(board = [[4, 3, 2], [1, 5, 0]]) == 20\n assert candidate(board = [[3, 5, 4], [0, 2, 1]]) == 14\n assert candidate(board = [[5, 1, 3], [4, 0, 2]]) == 15\n assert candidate(board = [[2, 3, 0], [1, 5, 4]]) == -1\n assert candidate(board = [[1, 2, 0], [5, 4, 3]]) == -1\n assert candidate(board = [[1, 4, 2], [3, 5, 0]]) == 16\n assert candidate(board = [[2, 3, 4], [5, 0, 1]]) == 15\n assert candidate(board = [[3, 2, 1], [0, 5, 4]]) == 20\n assert candidate(board = [[5, 1, 4], [2, 3, 0]]) == 14\n assert candidate(board = [[5, 3, 0], [1, 4, 2]]) == -1\n assert candidate(board = [[0, 5, 4], [3, 2, 1]]) == 15\n assert candidate(board = [[2, 5, 3], [1, 4, 0]]) == -1\n assert candidate(board = [[0, 5, 4], [2, 3, 1]]) == -1\n assert candidate(board = [[5, 4, 0], [3, 2, 1]]) == 13\n assert candidate(board = [[3, 5, 4], [1, 2, 0]]) == -1\n assert candidate(board = [[5, 0, 2], [4, 3, 1]]) == 16\n assert candidate(board = [[0, 5, 1], [3, 4, 2]]) == 13\n assert candidate(board = [[5, 1, 2], [4, 0, 3]]) == -1\n assert candidate(board = [[1, 3, 5], [4, 0, 2]]) == 5\n assert candidate(board = [[1, 3, 0], [2, 4, 5]]) == -1\n assert candidate(board = [[3, 2, 0], [1, 5, 4]]) == 13\n assert candidate(board = [[3, 1, 2], [0, 4, 5]]) == 16\n assert candidate(board = [[1, 0, 2], [5, 3, 4]]) == 14\n assert candidate(board = [[1, 5, 3], [2, 4, 0]]) == 14\n assert candidate(board = [[5, 1, 2], [4, 3, 0]]) == -1\n assert candidate(board = [[5, 2, 3], [4, 1, 0]]) == -1\n assert candidate(board = [[1, 5, 3], [2, 0, 4]]) == 13\n assert candidate(board = [[3, 5, 2], [4, 1, 0]]) == -1\n assert candidate(board = [[1, 4, 0], [3, 5, 2]]) == 15\n assert candidate(board = [[4, 3, 5], [0, 1, 2]]) == -1\n assert candidate(board = [[4, 1, 2], [5, 3, 0]]) == 6\n assert candidate(board = [[3, 0, 1], [4, 2, 5]]) == -1\n assert candidate(board = [[5, 4, 3], [2, 1, 0]]) == 14\n assert candidate(board = [[1, 0, 5], [4, 3, 2]]) == 6\n assert candidate(board = [[2, 1, 3], [4, 5, 0]]) == -1\n assert candidate(board = [[2, 1, 0], [5, 3, 4]]) == -1\n assert candidate(board = [[4, 3, 1], [5, 0, 2]]) == 9\n assert candidate(board = [[5, 0, 1], [4, 3, 2]]) == -1\n assert candidate(board = [[2, 5, 1], [0, 4, 3]]) == -1\n assert candidate(board = [[4, 0, 2], [3, 5, 1]]) == 14\n assert candidate(board = [[1, 3, 2], [4, 0, 5]]) == -1\n assert candidate(board = [[3, 1, 2], [4, 5, 0]]) == 14\n assert candidate(board = [[4, 2, 0], [5, 1, 3]]) == 7\n assert candidate(board = [[5, 2, 3], [0, 4, 1]]) == -1\n assert candidate(board = [[4, 5, 1], [0, 3, 2]]) == -1\n assert candidate(board = [[4, 3, 0], [1, 2, 5]]) == -1\n assert candidate(board = [[4, 5, 3], [2, 0, 1]]) == -1\n assert candidate(board = [[0, 5, 2], [1, 3, 4]]) == -1\n assert candidate(board = [[2, 1, 3], [0, 5, 4]]) == 14\n assert candidate(board = [[4, 3, 5], [2, 0, 1]]) == 9\n assert candidate(board = [[4, 2, 3], [1, 5, 0]]) == -1\n assert candidate(board = [[2, 5, 3], [4, 0, 1]]) == 13\n assert candidate(board = [[2, 3, 1], [5, 4, 0]]) == -1\n assert candidate(board = [[5, 1, 2], [0, 4, 3]]) == -1\n assert candidate(board = [[3, 0, 1], [4, 5, 2]]) == 12\n assert candidate(board = [[2, 3, 5], [4, 1, 0]]) == -1\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[4,0,5]]", "[[1,2,3],[5,4,0]]", "[[4,1,2],[5,0,3]]"], "hints": ["Perform a breadth-first-search, where the nodes are the puzzle boards and edges are if two puzzle boards can be transformed into one another with one move."], "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().slidingPuzzle", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:08+00:00", "tests_total": 78, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "backtracking", "breadth-first-search", "memoization", "matrix", "heuristic-search", "bidirectional-search", "a-search"]}, "language": "cpp", "interface": {"raw_signature": "int slidingPuzzle(vector>& board) {", "container": "Solution", "callable": "slidingPuzzle", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 775, "task_id": "global-and-local-inversions", "difficulty": "Medium", "problem_description": "You are given an integer array nums of length n which represents a permutation of all the integers in the range [0, n - 1].\n\nThe number of global inversions is the number of the different pairs (i, j) where:\n\n- 0 <= i < j < n\n- nums[i] > nums[j]\n\nThe number of local inversions is the number of indices i where:\n\n- 0 <= i < n - 1\n- nums[i] > nums[i + 1]\n\nReturn true if the number of global inversions is equal to the number of local inversions.\n\nExample 1:\n\nInput: nums = [1,0,2]\nOutput: true\nExplanation: There is 1 global inversion and 1 local inversion.\n\nExample 2:\n\nInput: nums = [1,2,0]\nOutput: false\nExplanation: There are 2 global inversions and 1 local inversion.\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^5\n- 0 <= nums[i] < n\n- All the integers of nums are unique.\n- nums is a permutation of all the numbers in the range [0, n - 1].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 1, 2, 3, 4]) == True\n assert candidate(nums = [4, 3, 2, 1, 0]) == False\n assert candidate(nums = [2, 0, 1, 3]) == False\n assert candidate(nums = [2, 1, 0, 3]) == False\n assert candidate(nums = [3, 2, 1, 0]) == False\n assert candidate(nums = [0, 2, 1, 3]) == True\n assert candidate(nums = [0, 1, 2, 3]) == True\n assert candidate(nums = [0, 1, 3, 2]) == True\n assert candidate(nums = [1, 0, 2]) == True\n assert candidate(nums = [1, 2, 0]) == False\n assert candidate(nums = [1, 2, 3, 0, 4, 5, 6]) == False\n assert candidate(nums = [0, 2, 4, 1, 3, 5, 7, 6, 9, 8]) == False\n assert candidate(nums = [6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [5, 2, 4, 0, 3, 1]) == False\n assert candidate(nums = [2, 1, 0, 3, 4, 5, 6, 7]) == False\n assert candidate(nums = [0, 2, 1, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [0, 3, 1, 2, 4, 5, 6, 7]) == False\n assert candidate(nums = [1, 3, 0, 2, 5, 4, 7, 6, 9, 8]) == False\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 10, 11]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [8, 1, 2, 3, 4, 5, 6, 7, 0]) == False\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [0, 2, 4, 1, 3, 5]) == False\n assert candidate(nums = [0, 2, 1, 3, 5, 4, 6]) == True\n assert candidate(nums = [2, 3, 0, 1, 4, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10]) == False\n assert candidate(nums = [6, 4, 2, 0, 3, 1, 8, 5, 7, 9, 10]) == False\n assert candidate(nums = [5, 1, 0, 4, 3, 2]) == False\n assert candidate(nums = [1, 3, 0, 2, 4]) == False\n assert candidate(nums = [2, 1, 0, 5, 4, 3, 8, 7, 6]) == False\n assert candidate(nums = [0, 2, 1, 3, 4, 5, 7, 6, 8]) == True\n assert candidate(nums = [5, 3, 1, 4, 2, 0]) == False\n assert candidate(nums = [2, 0, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11]) == False\n assert candidate(nums = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9]) == True\n assert candidate(nums = [11, 5, 3, 7, 2, 8, 1, 6, 9, 4, 0, 10]) == False\n assert candidate(nums = [1, 2, 3, 0, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [13, 7, 5, 9, 3, 11, 2, 10, 12, 4, 1, 6, 8, 0]) == False\n assert candidate(nums = [3, 0, 1, 2, 5, 4]) == False\n assert candidate(nums = [1, 0, 3, 2, 5, 4]) == True\n assert candidate(nums = [3, 0, 1, 2, 5, 4, 7, 6, 9, 8]) == False\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11]) == False\n assert candidate(nums = [5, 0, 1, 2, 3, 4, 6, 7, 8, 9]) == False\n assert candidate(nums = [4, 0, 3, 1, 2, 6, 5, 8, 9, 7]) == False\n assert candidate(nums = [0, 2, 1, 4, 3, 5]) == True\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 6]) == True\n assert candidate(nums = [1, 3, 0, 2, 4, 5, 7, 6, 8, 9]) == False\n assert candidate(nums = [4, 0, 2, 1, 3]) == False\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8]) == True\n assert candidate(nums = [5, 2, 3, 4, 0, 1, 6, 7, 8, 9]) == False\n assert candidate(nums = [9, 0, 8, 1, 7, 2, 6, 3, 5, 4]) == False\n assert candidate(nums = [1, 3, 0, 2, 4, 5]) == False\n assert candidate(nums = [5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10]) == True\n assert candidate(nums = [5, 0, 1, 2, 3, 4]) == False\n assert candidate(nums = [10, 3, 4, 5, 2, 1, 8, 6, 9, 7, 0]) == False\n assert candidate(nums = [0, 1, 3, 2, 4, 5, 6]) == 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]) == True\n assert candidate(nums = [0, 1, 2, 4, 3, 5, 6, 7]) == True\n assert candidate(nums = [0, 2, 1, 3, 4]) == True\n assert candidate(nums = [1, 0, 5, 4, 3, 2, 6]) == False\n assert candidate(nums = [1, 0, 2, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5]) == True\n assert candidate(nums = [3, 1, 0, 4, 2, 5]) == False\n assert candidate(nums = [1, 3, 2, 4, 0, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [0, 1, 3, 2, 4]) == True\n assert candidate(nums = [4, 3, 2, 1, 0]) == False\n assert candidate(nums = [0, 2, 1, 3, 5, 4, 7, 6, 9, 8]) == True\n assert candidate(nums = [1, 3, 0, 2, 4]) == False\n assert candidate(nums = [0, 1, 3, 2, 5, 4, 7, 6, 9, 8]) == True\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [2, 0, 1, 4, 3, 6, 5, 8, 7, 9]) == False\n assert candidate(nums = [0, 2, 1, 3, 4, 5]) == True\n assert candidate(nums = [0, 2, 3, 1, 4, 5, 6]) == False\n assert candidate(nums = [0, 2, 1, 4, 3, 6, 5, 8, 7, 9]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 0]) == False\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12, 13, 14]) == False\n assert candidate(nums = [0, 1, 3, 2, 4, 6, 5, 7]) == True\n assert candidate(nums = [6, 0, 5, 2, 1, 4, 3]) == False\n assert candidate(nums = [8, 0, 7, 1, 6, 2, 5, 3, 4]) == False\n assert candidate(nums = [10, 1, 9, 2, 8, 3, 7, 4, 6, 5, 0]) == False\n assert candidate(nums = [0, 2, 1, 3, 5, 4]) == True\n assert candidate(nums = [4, 3, 2, 1, 0, 5]) == False\n assert candidate(nums = [6, 2, 3, 5, 0, 4, 1]) == False\n assert candidate(nums = [2, 0, 1, 4, 3, 6, 5, 8, 7, 9, 10, 11]) == False\n assert candidate(nums = [0, 3, 1, 2, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [0, 1, 2, 4, 3, 5, 7, 6]) == True\n assert candidate(nums = [0, 3, 2, 1, 4]) == False\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10]) == True\n assert candidate(nums = [3, 0, 2, 1, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6]) == True\n assert candidate(nums = [3, 0, 1, 2, 5, 4, 6, 7]) == False\n assert candidate(nums = [4, 3, 0, 1, 2]) == False\n assert candidate(nums = [1, 3, 2, 0, 5, 4, 6]) == False\n assert candidate(nums = [5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [5, 2, 3, 0, 1, 4]) == False\n assert candidate(nums = [0, 1, 2, 3, 5, 4, 6, 7, 8]) == True\n assert candidate(nums = [12, 6, 4, 8, 2, 10, 1, 7, 11, 3, 0, 5, 9]) == False\n assert candidate(nums = [2, 4, 0, 1, 3, 5]) == False\n assert candidate(nums = [1, 2, 3, 0, 4, 5]) == False\n assert candidate(nums = [9, 4, 2, 5, 7, 1, 3, 6, 8, 0]) == False\n assert candidate(nums = [1, 2, 0, 3, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [7, 3, 4, 1, 2, 0, 5, 6]) == False\n", "comparison": "exact"}, "public_tests": ["[1,0,2]", "[1,2,0]"], "hints": ["Where can the 0 be placed in an ideal permutation? What about the 1?"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().isIdealPermutation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:13+00:00", "tests_total": 109, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "math"]}, "language": "cpp", "interface": {"raw_signature": "bool isIdealPermutation(vector& nums) {", "container": "Solution", "callable": "isIdealPermutation", "parameters": [{"name": "nums", "type": "vector&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 777, "task_id": "swap-adjacent-in-lr-string", "difficulty": "Medium", "problem_description": "In a string composed of 'L', 'R', and 'X' characters, like \"RXXLRXRXL\", a move consists of either replacing one occurrence of \"XL\" with \"LX\", or replacing one occurrence of \"RX\" with \"XR\". Given the starting string start and the ending string result, return True if and only if there exists a sequence of moves to transform start to result.\n\nExample 1:\n\nInput: start = \"RXXLRXRXL\", result = \"XRLXXRRLX\"\nOutput: true\nExplanation: We can transform start to result following these steps:\nRXXLRXRXL ->\nXRXLRXRXL ->\nXRLXRXRXL ->\nXRLXXRRXL ->\nXRLXXRRLX\n\nExample 2:\n\nInput: start = \"X\", result = \"L\"\nOutput: false\n\nConstraints:\n\n- 1 <= start.length <= 10^4\n- start.length == result.length\n- Both start and result will only consist of characters in 'L', 'R', and 'X'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(start = \"XXL\",result = \"LXX\") == True\n assert candidate(start = \"RXXLRXRXL\",result = \"XRLXXRRLX\") == True\n assert candidate(start = \"LLR\",result = \"RRL\") == False\n assert candidate(start = \"RXXL\",result = \"XRXL\") == True\n assert candidate(start = \"XRXL\",result = \"LXXR\") == False\n assert candidate(start = \"RL\",result = \"LR\") == False\n assert candidate(start = \"RLX\",result = \"LXR\") == False\n assert candidate(start = \"XXXXXLXXXX\",result = \"LXXXXXXXXX\") == True\n assert candidate(start = \"XXRXXLXXXX\",result = \"XXXXRXXLXX\") == False\n assert candidate(start = \"XXLXXRXXX\",result = \"XXXLXXRXX\") == False\n assert candidate(start = \"RLXXXRRLL\",result = \"RXXRLXXLR\") == False\n assert candidate(start = \"XXXX\",result = \"XXXX\") == True\n assert candidate(start = \"LXXR\",result = \"XRXL\") == False\n assert candidate(start = \"RXX\",result = \"XXR\") == True\n assert candidate(start = \"XRLR\",result = \"LRXR\") == False\n assert candidate(start = \"XRXRX\",result = \"XXRRX\") == True\n assert candidate(start = \"LL\",result = \"RR\") == False\n assert candidate(start = \"X\",result = \"L\") == False\n assert candidate(start = \"LRRXXLRR\",result = \"XXLLRRRR\") == False\n assert candidate(start = \"XXRXLXLRRXL\",result = \"LXXRXRXLRXR\") == False\n assert candidate(start = \"RXLXLXLXXR\",result = \"XXLXLXLRXR\") == False\n assert candidate(start = \"RXXRXXRXX\",result = \"XXRXXRXXR\") == True\n assert candidate(start = \"RXLXLXLXRXXR\",result = \"LXRXRXRXLXXR\") == False\n assert candidate(start = \"RXXLXXRXLXXL\",result = \"XRLXXXRXLXXL\") == True\n assert candidate(start = \"RRXXLXXR\",result = \"RRXLXXXR\") == True\n assert candidate(start = \"RRXLXXL\",result = \"XXLXXLR\") == False\n assert candidate(start = \"RXLXLXLXL\",result = \"LXRXRXRXL\") == False\n assert candidate(start = \"LLLLLXXXXXX\",result = \"XXXXXXXXLLL\") == False\n assert candidate(start = \"RXLXRXLXX\",result = \"XRLXLXXRX\") == False\n assert candidate(start = \"LXXRXXLXXLR\",result = \"XLXXRXXRLXR\") == False\n assert candidate(start = \"RRRRRRXXXXX\",result = \"XXXXXRRRRRR\") == True\n assert candidate(start = \"RXLXXLXXR\",result = \"XRLXXLXXR\") == True\n assert candidate(start = \"LXXRXRXLR\",result = \"XXLRXRXLX\") == False\n assert candidate(start = \"LXXRXRXLX\",result = \"XLXRLXXRX\") == False\n assert candidate(start = \"LXXXXXXRXX\",result = \"XXLXXXXXRX\") == False\n assert candidate(start = \"RXXXXL\",result = \"XXLRXX\") == False\n assert candidate(start = \"LRXLRXLRXLR\",result = \"RXLRXLRXLRX\") == False\n assert candidate(start = \"RRXXLXXLXXR\",result = \"XXRXLXXRXLR\") == False\n assert candidate(start = \"XXLRLRXRXRX\",result = \"LLRXRXRXRXR\") == False\n assert candidate(start = \"LRRXLXXR\",result = \"XLLRXRXR\") == False\n assert candidate(start = \"RXXXXXXLXX\",result = \"XXXXXXLRXX\") == False\n assert candidate(start = \"XLXRXLXRXLX\",result = \"LXRLXRLXRLX\") == False\n assert candidate(start = \"RXRXRXRXRXR\",result = \"XRXRXRXRXRX\") == False\n assert candidate(start = \"XXRXLXRLX\",result = \"XRLXXRXRX\") == False\n assert candidate(start = \"RXXLXLXXRL\",result = \"XLRXRXRXLX\") == False\n assert candidate(start = \"RRXLRXLXXL\",result = \"XRLXXLRXLR\") == False\n assert candidate(start = \"LRRXLXXL\",result = \"XXLRXXRL\") == False\n assert candidate(start = \"LRLRLRLRLRL\",result = \"RLRLRLRLRLR\") == False\n assert candidate(start = \"RRRXXXXXXXL\",result = \"XXXXXXLRRRR\") == False\n assert candidate(start = \"XXLXXLXXLXX\",result = \"LXXLXXLXXLX\") == False\n assert candidate(start = \"RXXXXLRRXXL\",result = \"XXLRXRXRLXX\") == False\n assert candidate(start = \"RXLXXLXXRLXX\",result = \"XLXXLXXLXXRX\") == False\n assert candidate(start = \"RXXLRXRXLXXL\",result = \"XRLXXRRLXRXL\") == False\n assert candidate(start = \"LXRXRXRXRLX\",result = \"XRLXRXRXLXL\") == False\n assert candidate(start = \"RRXXLXXLXXR\",result = \"LLXXRXRXRXR\") == False\n assert candidate(start = \"XXLXXRXR\",result = \"XLXXLXXR\") == False\n assert candidate(start = \"LRXXLXXR\",result = \"LXXRXXRL\") == False\n assert candidate(start = \"RLXXXXL\",result = \"XRLXXXX\") == False\n assert candidate(start = \"LXXRXRXXL\",result = \"XLRXLXXRX\") == False\n assert candidate(start = \"RLXXXLR\",result = \"XRLXXLR\") == False\n assert candidate(start = \"RRXXLXXR\",result = \"XXRXXRRL\") == False\n assert candidate(start = \"LRXRXLXRXL\",result = \"RXLXLRXLRX\") == False\n assert candidate(start = \"RXXXXLXXXR\",result = \"XXLXXXRXRX\") == False\n assert candidate(start = \"LXXRXRXL\",result = \"XXLXRXRX\") == False\n assert candidate(start = \"XRXRXRXRXRX\",result = \"RXRXRXRXRXR\") == False\n assert candidate(start = \"RXLXRXLX\",result = \"XRLXXLXR\") == False\n assert candidate(start = \"XXXXLXXXXLXXX\",result = \"LXXXXXXXXXXLX\") == False\n assert candidate(start = \"LXXRXRXLXX\",result = \"XXLXXRXLXR\") == False\n assert candidate(start = \"RXXRXRXRX\",result = \"XXRXXRXXR\") == False\n assert candidate(start = \"RRXXLXXLXXL\",result = \"XXLXRXRXLXR\") == False\n assert candidate(start = \"LXLXLXLXL\",result = \"XLXLXLXLX\") == False\n assert candidate(start = \"RXLXRXRXRXL\",result = \"LXRXRXRXRXL\") == False\n assert candidate(start = \"XRXLXXRXL\",result = \"XXLXXRXXR\") == False\n assert candidate(start = \"RRXLXRXLL\",result = \"XXRXLRXLR\") == False\n assert candidate(start = \"RXLRLXXLR\",result = \"XLRLXLRXR\") == False\n assert candidate(start = \"RXRXRXRXRX\",result = \"XRXRXRXRXR\") == True\n assert candidate(start = \"RRXXXXLL\",result = \"LLXXXXRR\") == False\n assert candidate(start = \"RXXRXRXLXX\",result = \"XXRXXRXLXR\") == False\n assert candidate(start = \"XXRXXL\",result = \"LXXRXX\") == False\n assert candidate(start = \"XRXLXLXLXL\",result = \"LXRXRXRXRX\") == False\n assert candidate(start = \"RXLXLXLXL\",result = \"XLXLXLXLR\") == False\n assert candidate(start = \"XXXXXXXXXXX\",result = \"XXXXXXXXXXX\") == True\n assert candidate(start = \"RXLXXLXXR\",result = \"XXLXXRXLR\") == False\n assert candidate(start = \"RXLXLXLXR\",result = \"XRLXLXLXR\") == True\n assert candidate(start = \"XXLXXRXXLXXR\",result = \"XXLXXLXXRXXR\") == False\n assert candidate(start = \"RXLXRRXLX\",result = \"XRLXXRXLX\") == False\n assert candidate(start = \"LXXRXRXXL\",result = \"XXLRXRXLX\") == False\n assert candidate(start = \"LXRXRXLXR\",result = \"XXLXLXLXR\") == False\n assert candidate(start = \"RXLXLXRX\",result = \"LXRXLXXR\") == False\n assert candidate(start = \"RXXXXLXRXL\",result = \"XRLXXRXLXX\") == False\n assert candidate(start = \"RRXXLLRXXXR\",result = \"XXLRRLXXRXR\") == False\n assert candidate(start = \"LXXLXRXLX\",result = \"XXLXXRLRX\") == False\n assert candidate(start = \"XLRXLRXLRXL\",result = \"LXRLXRLXRLX\") == True\n assert candidate(start = \"XRXXLXXRXL\",result = \"XRLXXRXLXX\") == False\n assert candidate(start = \"XXRLRXXL\",result = \"LXXLRXXR\") == False\n assert candidate(start = \"RXLXRXRXLXR\",result = \"XRLXRXRXLXR\") == True\n assert candidate(start = \"LXRXRXRXLXXL\",result = \"XXLXXLXXLXXR\") == False\n assert candidate(start = \"RXLXXRXLX\",result = \"XRLXXLXXR\") == False\n assert candidate(start = \"XXLRRXXLXXR\",result = \"LXXLXXRXXRX\") == False\n assert candidate(start = \"XXLRXXLXX\",result = \"LXXRXXLXX\") == True\n assert candidate(start = \"RRXXLXXL\",result = \"XXLXXLRX\") == False\n assert candidate(start = \"RXXLXXXL\",result = \"XXLXRXLX\") == False\n assert candidate(start = \"RRXXLXXR\",result = \"XXRRLXXR\") == True\n assert candidate(start = \"LLRRLRRRLL\",result = \"RLLLLRRRLL\") == False\n assert candidate(start = \"LXXXXLXXXXR\",result = \"XXXXLXXLXXR\") == False\n assert candidate(start = \"RXLXRXLXR\",result = \"XRLXRXLRX\") == False\n assert candidate(start = \"LRXXLXRXXRL\",result = \"XRLXLXXRRLX\") == False\n assert candidate(start = \"RXXLXXLXXR\",result = \"LXXRXXLXXR\") == False\n assert candidate(start = \"RXXLRLXXRX\",result = \"XRLXXLXXRX\") == False\n assert candidate(start = \"LXXXXXXRRRR\",result = \"RRRRXXXXXXL\") == False\n assert candidate(start = \"LXXRXXLXX\",result = \"XLRXXLXXX\") == False\n assert candidate(start = \"LXXLXXLXXL\",result = \"XXLXXLXXLX\") == False\n assert candidate(start = \"LRXXLXXRL\",result = \"LXXRXXLRL\") == False\n assert candidate(start = \"RXLXRXRXLXRX\",result = \"LXRXRXRXRXRX\") == False\n assert candidate(start = \"XXRLXXLXXR\",result = \"LXXRXXRXXL\") == False\n assert candidate(start = \"RXLXRXRXLXXL\",result = \"XLXXLXXLXXRX\") == False\n assert candidate(start = \"RXRXRXRXR\",result = \"RRRRRXRXR\") == False\n assert candidate(start = \"RXLXXLRXLX\",result = \"XXLXXRXRXL\") == False\n assert candidate(start = \"RXLXXRXXL\",result = \"XXLRXRXLX\") == False\n assert candidate(start = \"LRRRRRXXL\",result = \"XXLRRRRRR\") == False\n assert candidate(start = \"LXXLXXLXXLX\",result = \"LXLXLXLXXLX\") == False\n assert candidate(start = \"XXXXXXXXXX\",result = \"XXXXXXXXXX\") == True\n assert candidate(start = \"RXLR\",result = \"LXRR\") == False\n assert candidate(start = \"LRLR\",result = \"RLLR\") == False\n assert candidate(start = \"RLXXRXLXXR\",result = \"RLXXRXLXXR\") == True\n assert candidate(start = \"XXRXL\",result = \"XXLXR\") == False\n assert candidate(start = \"XRXXLXL\",result = \"XRLXXXL\") == True\n assert candidate(start = \"RXLXRX\",result = \"XRLXXR\") == True\n assert candidate(start = \"LXXR\",result = \"LRXX\") == False\n assert candidate(start = \"RLXXRXLXL\",result = \"XRLXXLRXL\") == False\n assert candidate(start = \"LXXRXXL\",result = \"XXLXXRL\") == False\n assert candidate(start = \"XXRXLXLXX\",result = \"XLXXXLRXX\") == False\n assert candidate(start = \"RXRXRXRX\",result = \"XRXRXRXR\") == True\n assert candidate(start = \"RXL\",result = \"LXR\") == False\n assert candidate(start = \"RXLXLXR\",result = \"XLRXRXL\") == False\n assert candidate(start = \"RLXXXXXXXXXXRXXL\",result = \"XRLXXXXXXXXXXRLX\") == False\n assert candidate(start = \"RLXXXRRXXL\",result = \"RLXXXRXLXL\") == False\n assert candidate(start = \"RLXXXXXXL\",result = \"LXXXXXXXX\") == False\n assert candidate(start = \"LXXXXLXXXX\",result = \"XXXXXXXXLL\") == False\n assert candidate(start = \"RLRXXRLLXL\",result = \"RLRXRLLXXL\") == False\n assert candidate(start = \"RLXXRXLX\",result = \"LXRXRXXL\") == False\n assert candidate(start = \"RXLX\",result = \"XLXR\") == False\n assert candidate(start = \"XRLXXRLXXX\",result = \"XXXRLXXRLX\") == False\n assert candidate(start = \"LXXXRXX\",result = \"XXLXXRX\") == False\n assert candidate(start = \"XXXXX\",result = \"XXXXX\") == True\n assert candidate(start = \"RXLR\",result = \"LXRX\") == False\n assert candidate(start = \"RXLXLXRXL\",result = \"XXRLXXLXR\") == False\n assert candidate(start = \"RXXXXXLXXX\",result = \"XXXXXXLRXX\") == False\n assert candidate(start = \"XXLXXRXXLX\",result = \"XXXLXXRXLX\") == False\n assert candidate(start = \"RXXLRXRXLX\",result = \"XRLXXRRXLX\") == True\n assert candidate(start = \"RXXXXXXXXR\",result = \"XXXXXXXXXR\") == False\n assert candidate(start = \"RXXXL\",result = \"LXXXX\") == False\n assert candidate(start = \"RXR\",result = \"XRX\") == False\n assert candidate(start = \"LLRRLRLLRL\",result = \"LRLRLLRLRL\") == False\n assert candidate(start = \"RXXLRXRXLXX\",result = \"XRLXXRRLXXX\") == True\n assert candidate(start = \"RRXXLXXL\",result = \"XXRLXXLR\") == False\n assert candidate(start = \"RLXX\",result = \"XLRX\") == False\n assert candidate(start = \"LRLR\",result = \"LRLR\") == True\n assert candidate(start = \"XXLXXRXXL\",result = \"LXXXXRXXX\") == False\n assert candidate(start = \"XRXR\",result = \"RXXR\") == False\n assert candidate(start = \"RXXXXXLXXXL\",result = \"XLRXXXXXXRL\") == False\n assert candidate(start = \"XXLX\",result = \"LXXX\") == True\n assert candidate(start = \"RLXXRXLXLX\",result = \"LRXXRXLXLX\") == False\n assert candidate(start = \"LLRXXRXL\",result = \"LXXLRXRL\") == False\n assert candidate(start = \"XRXRXRXXLX\",result = \"XXLRXRXLXX\") == False\n assert candidate(start = \"RXXLRXRXL\",result = \"XRLXRXRXL\") == True\n assert candidate(start = \"LXXXXLXXXX\",result = \"XXXXXXXXXX\") == False\n assert candidate(start = \"LXXR\",result = \"XLXR\") == False\n assert candidate(start = \"XXLXLXRXRXXLXXXXL\",result = \"XXXLLXXXXXXLRLXXR\") == False\n assert candidate(start = \"RXXLRXRXL\",result = \"XRLXXRRXL\") == True\n assert candidate(start = \"XXLXR\",result = \"LXXRX\") == False\n assert candidate(start = \"XXXXXXX\",result = \"XXXXXXX\") == True\n assert candidate(start = \"XXXLXXRXX\",result = \"XXLXXXXXR\") == True\n assert candidate(start = \"RXLXL\",result = \"LXRXR\") == False\n assert candidate(start = \"RXXXXRXXXX\",result = \"XXXXXXXXXX\") == False\n assert candidate(start = \"LRLR\",result = \"LRRL\") == False\n assert candidate(start = \"RLXXXXXXLRLX\",result = \"LXXXXXXXXXRL\") == False\n assert candidate(start = \"XXLXXLXX\",result = \"LXXLXXLX\") == False\n assert candidate(start = \"RLXXXRXL\",result = \"XRLXXRXL\") == False\n assert candidate(start = \"RXLXRXRXRX\",result = \"XRXRXRXLXR\") == False\n assert candidate(start = \"RXXLRXRXLXR\",result = \"XRLXXRRLXXR\") == True\n assert candidate(start = \"LLLL\",result = \"LLLL\") == True\n assert candidate(start = \"LXXLXRLXXL\",result = \"XLLXRXXLXL\") == False\n assert candidate(start = \"XRL\",result = \"LXR\") == False\n assert candidate(start = \"RLXXL\",result = \"LXXRL\") == False\n assert candidate(start = \"RRXXLXXR\",result = \"RXLXXRRX\") == False\n assert candidate(start = \"RRRR\",result = \"RRRR\") == True\n assert candidate(start = \"XXLXXLXXXX\",result = \"LXLXXXXXXL\") == False\n assert candidate(start = \"LXXLXRXRXL\",result = \"XLLXRXXRXX\") == False\n assert candidate(start = \"RXRXL\",result = \"XRLXR\") == False\n assert candidate(start = \"LRXXRXLX\",result = \"LXRLXXRX\") == False\n assert candidate(start = \"RXL\",result = \"XLR\") == False\n assert candidate(start = \"XXLXXXXLXX\",result = \"XXLXXXXLXX\") == True\n assert candidate(start = \"RXLXLXRXL\",result = \"XXRLXLXLX\") == False\n assert candidate(start = \"XXRXLXLXX\",result = \"LXXRXLXXR\") == False\n assert candidate(start = \"LXX\",result = \"XXL\") == False\n assert candidate(start = \"RXXLRXRXL\",result = \"XRXXLXRXL\") == False\n assert candidate(start = \"RXLXLXR\",result = \"LXRXLXR\") == False\n assert candidate(start = \"XXXXXXXLXX\",result = \"LXXXXXXXXX\") == True\n assert candidate(start = \"RXRXLXLXX\",result = \"XXRLXXLXR\") == False\n assert candidate(start = \"RLXXXL\",result = \"XLRXRX\") == False\n assert candidate(start = \"LXR\",result = \"XLR\") == False\n assert candidate(start = \"RXRXLXL\",result = \"XRLXXLR\") == False\n assert candidate(start = \"XXXXLXXXX\",result = \"LXXXXXXXX\") == True\n assert candidate(start = \"LXXXXXXR\",result = \"RXXXXXXL\") == False\n assert candidate(start = \"LXXLXRLXX\",result = \"XLLXRXXRX\") == False\n assert candidate(start = \"RXLR\",result = \"LXXR\") == False\n assert candidate(start = \"XXXXXLXXXX\",result = \"XXXXLXXXXX\") == True\n assert candidate(start = \"LXXLXRXRXXL\",result = \"XLLXRRLXXXL\") == False\n assert candidate(start = \"RXR\",result = \"RXR\") == True\n assert candidate(start = \"RXXLXXXXXX\",result = \"XXXXXXLXXR\") == False\n assert candidate(start = \"RLXXXXXRXL\",result = \"XRLXXRXLXR\") == False\n assert candidate(start = \"RLXXLRXRXL\",result = \"LRXXRXLXRX\") == False\n assert candidate(start = \"RRLL\",result = \"LLRR\") == False\n assert candidate(start = \"LXXR\",result = \"XXLR\") == False\n assert candidate(start = \"RXLXRXRXL\",result = \"XRLXXRRLX\") == True\n assert candidate(start = \"LR\",result = \"LR\") == True\n assert candidate(start = \"RLXXL\",result = \"XLRXL\") == False\n assert candidate(start = \"XXLXXXRXX\",result = \"LXXXXXXRX\") == True\n assert candidate(start = \"LXRX\",result = \"XLXR\") == False\n assert candidate(start = \"LLRR\",result = \"LLRR\") == True\n assert candidate(start = \"LLRXRXL\",result = \"LRXRLXL\") == False\n assert candidate(start = \"LXXR\",result = \"XRLX\") == False\n assert candidate(start = \"RXL\",result = \"XRL\") == True\n assert candidate(start = \"XXRXL\",result = \"XRLXX\") == False\n assert candidate(start = \"LXXLXRLXXL\",result = \"XLLXRXLXLX\") == False\n assert candidate(start = \"RLXXRXLXR\",result = \"XRLXXLRXR\") == False\n assert candidate(start = \"RXXXXXLXXXL\",result = \"XXXXXXXXLRL\") == False\n assert candidate(start = \"RLXXXRRLL\",result = \"RLXXRXXLL\") == False\n assert candidate(start = \"RXXLRXRXL\",result = \"XLRXXRRLX\") == False\n assert candidate(start = \"XXRXXXXL\",result = \"XXXXLXXR\") == False\n assert candidate(start = \"LXXL\",result = \"XLXL\") == False\n assert candidate(start = \"RXXLRXRXLX\",result = \"XRLXXRXRXL\") == False\n assert candidate(start = \"RXXLRXRXL\",result = \"RXXLRXRXL\") == True\n assert candidate(start = \"LR\",result = \"RL\") == False\n assert candidate(start = \"RLXXLRXRXL\",result = \"LRXXLXLXXR\") == False\n assert candidate(start = \"XXXXXX\",result = \"XXXXXX\") == True\n assert candidate(start = \"LXR\",result = \"LRX\") == False\n assert candidate(start = \"XRLXXRRLX\",result = \"RXXLRXRXL\") == False\n assert candidate(start = \"LXXLXRXRXL\",result = \"XLLXRXRXLX\") == False\n assert candidate(start = \"XXR\",result = \"RXX\") == False\n assert candidate(start = \"LLRXXRXLX\",result = \"XLLXRXXRX\") == False\n assert candidate(start = \"XXRXL\",result = \"LXXRX\") == False\n assert candidate(start = \"XRLXL\",result = \"LXRLX\") == False\n assert candidate(start = \"XXXXXLXXXX\",result = \"XXXXXLXXXX\") == True\n assert candidate(start = \"RXLR\",result = \"LRXR\") == False\n assert candidate(start = \"RXRXXRXL\",result = \"XXRXLXRL\") == False\n", "comparison": "exact"}, "public_tests": ["\"RXXLRXRXL\"\n\"XRLXXRRLX\"", "\"X\"\n\"L\""], "hints": ["Think of the L and R's as people on a horizontal line, where X is a space. The people can't cross each other, and also you can't go from XRX to RXX."], "metadata": {"canonical_parameter_names": ["start", "result"], "leetcode_dataset_entry_point": "Solution().canTransform", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:15+00:00", "tests_total": 257, "tests_dropped": 10, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "cpp", "interface": {"raw_signature": "bool canTransform(string start, string result) {", "container": "Solution", "callable": "canTransform", "parameters": [{"name": "start", "type": "string"}, {"name": "result", "type": "string"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 778, "task_id": "swim-in-rising-water", "difficulty": "Hard", "problem_description": "You are given an n x n integer matrix grid where each value grid[i][j] represents the elevation at that point (i, j).\n\nIt starts raining, and water gradually rises over time. At time t, the water level is t, meaning any cell with elevation less than equal to t is submerged or reachable.\n\nYou can swim from a square to another 4-directionally adjacent square if and only if the elevation of both squares individually are at most t. You can swim infinite distances in zero time. Of course, you must stay within the boundaries of the grid during your swim.\n\nReturn the minimum time until you can reach the bottom right square (n - 1, n - 1) if you start at the top left square (0, 0).\n\nExample 1:\n\nInput: grid = [[0,2],[1,3]]\nOutput: 3\nExplanation:\nAt time 0, you are in grid location (0, 0).\nYou cannot go anywhere else because 4-directionally adjacent neighbors have a higher elevation than t = 0.\nYou cannot reach point (1, 1) until time 3.\nWhen the depth of water is 3, we can swim anywhere inside the grid.\n\nExample 2:\n\nInput: grid = [[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]]\nOutput: 16\nExplanation: The final route is shown.\nWe need to wait until time 16 so that (0, 0) and (4, 4) are connected.\n\nConstraints:\n\n- n == grid.length\n- n == grid[i].length\n- 1 <= n <= 50\n- 0 <= grid[i][j] < n^2\n- Each value grid[i][j] is unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [[3, 0, 8, 4], [2, 5, 1, 7], [9, 6, 10, 11], [13, 12, 14, 15]]) == 15\n assert candidate(grid = [[7, 1, 4, 0, 5], [2, 3, 6, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]]) == 24\n assert candidate(grid = [[0, 1, 2, 3, 4], [24, 23, 22, 21, 5], [12, 13, 14, 15, 16], [11, 17, 18, 19, 20], [10, 9, 8, 7, 6]]) == 16\n assert candidate(grid = [[0, 2], [1, 3]]) == 3\n assert candidate(grid = [[0]]) == 0\n assert candidate(grid = [[3, 0, 8, 0, 0], [0, 2, 0, 0, 4], [0, 0, 1, 2, 0], [0, 9, 0, 3, 0], [7, 0, 3, 0, 5]]) == 8\n assert candidate(grid = [[3, 0, 8, 0, 6], [5, 0, 0, 4, 0], [7, 8, 9, 5, 0], [9, 0, 0, 9, 0], [0, 4, 6, 0, 7]]) == -1\n assert candidate(grid = [[1, 14, 15, 16, 17, 18], [2, 13, 24, 23, 22, 19], [3, 12, 25, 28, 27, 20], [4, 11, 26, 29, 30, 21], [5, 10, 27, 32, 31, 34], [6, 9, 8, 7, 33, 35]]) == 35\n assert candidate(grid = [[0, 7, 4, 10, 5, 9], [2, 1, 6, 12, 8, 11], [3, 13, 30, 18, 14, 17], [15, 19, 24, 28, 21, 22], [32, 33, 31, 25, 26, 27], [16, 20, 23, 29, 34, 35]]) == 35\n assert candidate(grid = [[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, 26, 27, 28, 29], [35, 34, 33, 32, 31, 30]]) == 30\n assert candidate(grid = [[0, 3, 2, 4, 1], [7, 6, 5, 8, 9], [12, 11, 10, 13, 14], [19, 18, 17, 16, 15], [24, 23, 22, 21, 20]]) == 20\n assert candidate(grid = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [19, 18, 17, 16, 15, 14, 13, 12, 11, 10], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [39, 38, 37, 36, 35, 34, 33, 32, 31, 30], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], [59, 58, 57, 56, 55, 54, 53, 52, 51, 50], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], [79, 78, 77, 76, 75, 74, 73, 72, 71, 70], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89], [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]]) == 90\n assert candidate(grid = [[5, 0, 4, 1, 2, 6], [9, 11, 13, 15, 17, 19], [8, 10, 12, 14, 16, 18], [7, 3, 23, 21, 25, 27], [6, 22, 20, 24, 26, 28], [29, 30, 31, 32, 33, 34]]) == 34\n assert candidate(grid = [[8, 3, 2, 6, 1, 4], [7, 5, 0, 9, 11, 13], [12, 10, 14, 15, 17, 19], [16, 18, 20, 21, 23, 25], [22, 24, 26, 27, 29, 31], [28, 30, 32, 33, 34, 35]]) == 35\n assert candidate(grid = [[0, 1, 2, 3, 4, 5], [16, 15, 14, 13, 12, 6], [17, 28, 27, 26, 11, 7], [18, 29, 34, 25, 10, 8], [19, 30, 33, 32, 9, 13], [20, 21, 22, 23, 24, 14]]) == 14\n assert candidate(grid = [[30, 29, 28, 27, 26, 25, 24], [31, 8, 7, 6, 5, 4, 23], [32, 9, 0, 1, 2, 3, 22], [33, 10, 11, 12, 13, 14, 21], [34, 19, 18, 17, 16, 15, 20], [35, 36, 37, 38, 39, 40, 41], [42, 43, 44, 45, 46, 47, 48]]) == 48\n assert candidate(grid = [[1, 14, 15, 16, 17], [12, 8, 9, 10, 18], [11, 7, 2, 13, 19], [10, 6, 5, 3, 20], [9, 4, 1, 0, 24]]) == 24\n assert candidate(grid = [[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]]) == 48\n assert candidate(grid = [[13, 14, 15, 16, 17], [8, 9, 10, 11, 12], [3, 4, 5, 6, 7], [0, 1, 2, 18, 19], [20, 21, 22, 23, 24]]) == 24\n assert candidate(grid = [[20, 21, 22, 23, 24, 25], [19, 18, 17, 16, 15, 26], [10, 9, 8, 7, 14, 27], [11, 12, 13, 6, 5, 28], [0, 1, 2, 3, 4, 29], [30, 31, 32, 33, 34, 35]]) == 35\n assert candidate(grid = [[4, 0, 7, 6, 5], [3, 9, 8, 1, 2], [16, 15, 14, 13, 10], [11, 12, 17, 18, 19], [20, 21, 22, 23, 24]]) == 24\n assert candidate(grid = [[0, 1, 2, 3, 4, 5, 6], [35, 34, 33, 32, 31, 30, 7], [36, 19, 18, 17, 16, 29, 8], [37, 20, 7, 6, 15, 28, 9], [38, 21, 8, 5, 4, 14, 10], [39, 22, 9, 10, 11, 13, 12], [40, 41, 42, 43, 44, 45, 46]]) == 46\n assert candidate(grid = [[0, 5, 9, 12, 17], [3, 1, 8, 10, 18], [4, 7, 2, 15, 16], [13, 6, 11, 14, 21], [22, 20, 19, 23, 24]]) == 24\n assert candidate(grid = [[37, 34, 26, 25, 38, 35, 31, 27, 36], [17, 20, 33, 29, 19, 23, 22, 21, 32], [2, 18, 16, 39, 40, 24, 11, 9, 30], [3, 5, 6, 42, 14, 4, 1, 8, 7], [41, 13, 43, 15, 44, 47, 50, 48, 49], [45, 12, 46, 10, 9, 11, 28, 39, 38], [29, 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]]) == 51\n assert candidate(grid = [[3, 17, 12, 4, 16], [13, 14, 10, 11, 8], [6, 0, 7, 5, 15], [18, 1, 19, 2, 9], [24, 22, 23, 20, 21]]) == 21\n assert candidate(grid = [[0, 1, 2, 3, 4, 5], [19, 18, 17, 16, 15, 6], [14, 23, 22, 21, 10, 7], [13, 24, 25, 20, 11, 8], [12, 27, 26, 29, 12, 9], [34, 33, 32, 31, 30, 35]]) == 35\n assert candidate(grid = [[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, 35, 34, 33, 32, 31]]) == 31\n assert candidate(grid = [[49, 48, 47, 46, 45, 44, 43, 42, 41, 40], [40, 39, 38, 37, 36, 35, 34, 33, 32, 31], [31, 30, 29, 28, 27, 26, 25, 24, 23, 22], [22, 21, 20, 19, 18, 17, 16, 15, 14, 13], [13, 12, 11, 10, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 0, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54, 55], [55, 54, 53, 52, 51, 50, 49, 48, 47, 46], [45, 44, 43, 42, 41, 56, 57, 58, 59, 60], [60, 59, 58, 57, 56, 61, 62, 63, 64, 65]]) == -1\n assert candidate(grid = [[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, 29, 28, 27, 26], [35, 34, 33, 32, 31, 30]]) == 30\n assert candidate(grid = [[0, 9, 8, 7, 6, 5], [1, 2, 3, 4, 30, 31], [14, 13, 12, 11, 10, 32], [15, 16, 17, 18, 19, 33], [24, 23, 22, 21, 20, 34], [25, 26, 27, 28, 29, 35]]) == 35\n assert candidate(grid = [[33, 16, 21, 30, 22, 10], [18, 5, 29, 3, 24, 20], [34, 2, 31, 17, 19, 9], [15, 13, 14, 23, 28, 32], [4, 35, 8, 7, 6, 27], [1, 0, 12, 11, 26, 25]]) == 33\n assert candidate(grid = [[5, 24, 19, 22, 21, 6], [4, 4, 20, 17, 15, 9], [14, 10, 3, 16, 1, 11], [7, 18, 23, 13, 12, 8], [2, 0, 5, 25, 27, 26], [30, 31, 32, 33, 34, 35]]) == 35\n assert candidate(grid = [[8, 2, 3], [4, 7, 6], [5, 1, 0]]) == 8\n", "comparison": "exact"}, "public_tests": ["[[0,2],[1,3]]", "[[0,1,2,3,4],[24,23,22,21,5],[12,13,14,15,16],[11,17,18,19,20],[10,9,8,7,6]]"], "hints": ["Use either Dijkstra's, or binary search for the best time T for which you can reach the end if you only step on squares at most T."], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().swimInWater", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:17+00:00", "tests_total": 33, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "binary-search", "depth-first-search", "breadth-first-search", "union-find", "minimax-algorithm", "heap-priority-queue", "matrix", "dijkstra"]}, "language": "cpp", "interface": {"raw_signature": "int swimInWater(vector>& grid) {", "container": "Solution", "callable": "swimInWater", "parameters": [{"name": "grid", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 779, "task_id": "k-th-symbol-in-grammar", "difficulty": "Medium", "problem_description": "We build a table of n rows (1-indexed). We start by writing 0 in the 1^st row. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each occurrence of 1 with 10.\n\n- For example, for n = 3, the 1^st row is 0, the 2^nd row is 01, and the 3^rd row is 0110.\n\nGiven two integer n and k, return the k^th (1-indexed) symbol in the n^th row of a table of n rows.\n\nExample 1:\n\nInput: n = 1, k = 1\nOutput: 0\nExplanation: row 1: 0\n\nExample 2:\n\nInput: n = 2, k = 1\nOutput: 0\nExplanation:\nrow 1: 0\nrow 2: 01\n\nExample 3:\n\nInput: n = 2, k = 2\nOutput: 1\nExplanation:\nrow 1: 0\nrow 2: 01\n\nConstraints:\n\n- 1 <= n <= 30\n- 1 <= k <= 2^{n - 1}\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 4,k = 8) == 1\n assert candidate(n = 30,k = 536870912) == 1\n assert candidate(n = 3,k = 2) == 1\n assert candidate(n = 1,k = 1) == 0\n assert candidate(n = 30,k = 536870911) == 0\n assert candidate(n = 4,k = 5) == 1\n assert candidate(n = 4,k = 1) == 0\n assert candidate(n = 5,k = 10) == 0\n assert candidate(n = 2,k = 1) == 0\n assert candidate(n = 3,k = 3) == 1\n assert candidate(n = 3,k = 4) == 0\n assert candidate(n = 5,k = 15) == 1\n assert candidate(n = 4,k = 2) == 1\n assert candidate(n = 5,k = 16) == 0\n assert candidate(n = 4,k = 3) == 1\n assert candidate(n = 3,k = 1) == 0\n assert candidate(n = 4,k = 6) == 0\n assert candidate(n = 2,k = 2) == 1\n assert candidate(n = 4,k = 7) == 0\n assert candidate(n = 4,k = 4) == 0\n assert candidate(n = 7,k = 63) == 1\n assert candidate(n = 9,k = 128) == 1\n assert candidate(n = 19,k = 262144) == 0\n assert candidate(n = 18,k = 131071) == 0\n assert candidate(n = 12,k = 2047) == 0\n assert candidate(n = 25,k = 1048575) == 1\n assert candidate(n = 14,k = 8192) == 1\n assert candidate(n = 10,k = 511) == 0\n assert candidate(n = 20,k = 524287) == 0\n assert candidate(n = 18,k = 65536) == 0\n assert candidate(n = 10,k = 350) == 0\n assert candidate(n = 9,k = 255) == 1\n assert candidate(n = 20,k = 524288) == 1\n assert candidate(n = 15,k = 16383) == 1\n assert candidate(n = 15,k = 16382) == 1\n assert candidate(n = 15,k = 16384) == 0\n assert candidate(n = 10,k = 512) == 1\n assert candidate(n = 22,k = 2097151) == 0\n assert candidate(n = 12,k = 2048) == 1\n assert candidate(n = 18,k = 131072) == 1\n assert candidate(n = 8,k = 128) == 1\n assert candidate(n = 25,k = 16777215) == 1\n assert candidate(n = 24,k = 8388608) == 1\n assert candidate(n = 13,k = 4096) == 0\n assert candidate(n = 8,k = 127) == 0\n assert candidate(n = 9,k = 256) == 0\n assert candidate(n = 20,k = 262144) == 0\n assert candidate(n = 15,k = 8192) == 1\n assert candidate(n = 10,k = 256) == 0\n assert candidate(n = 7,k = 64) == 0\n", "comparison": "exact"}, "public_tests": ["1\n1", "2\n1", "2\n2"], "hints": ["Try to represent the current (N, K) in terms of some (N-1, prevK). What is prevK ?"], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().kthGrammar", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:20+00:00", "tests_total": 86, "tests_dropped": 36, "flags": [], "topic_tags": ["math", "bit-manipulation", "recursion"]}, "language": "cpp", "interface": {"raw_signature": "int kthGrammar(int n, int k) {", "container": "Solution", "callable": "kthGrammar", "parameters": [{"name": "n", "type": "int"}, {"name": "k", "type": "int"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 780, "task_id": "reaching-points", "difficulty": "Hard", "problem_description": "Given four integers sx, sy, tx, and ty, return true if it is possible to convert the point (sx, sy) to the point (tx, ty) through some operations, or false otherwise.\n\nThe allowed operation on some point (x, y) is to convert it to either (x, x + y) or (x + y, y).\n\nExample 1:\n\nInput: sx = 1, sy = 1, tx = 3, ty = 5\nOutput: true\nExplanation:\nOne series of moves that transforms the starting point to the target is:\n(1, 1) -> (1, 2)\n(1, 2) -> (3, 2)\n(3, 2) -> (3, 5)\n\nExample 2:\n\nInput: sx = 1, sy = 1, tx = 2, ty = 2\nOutput: false\n\nExample 3:\n\nInput: sx = 1, sy = 1, tx = 1, ty = 1\nOutput: true\n\nConstraints:\n\n- 1 <= sx, sy, tx, ty <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(sx = 1,sy = 1,tx = 3,ty = 5) == True\n assert candidate(sx = 3,sy = 4,tx = 3,ty = 12) == False\n assert candidate(sx = 3,sy = 7,tx = 31,ty = 19) == False\n assert candidate(sx = 1,sy = 1,tx = 1000000000,ty = 1000000000) == False\n assert candidate(sx = 5,sy = 5,tx = 5,ty = 5) == True\n assert candidate(sx = 1,sy = 1,tx = 1,ty = 1) == True\n assert candidate(sx = 1,sy = 1,tx = 2,ty = 2) == False\n assert candidate(sx = 2,sy = 3,tx = 8,ty = 11) == True\n assert candidate(sx = 5,sy = 1,tx = 1000000000,ty = 1000000000) == False\n assert candidate(sx = 2,sy = 3,tx = 10,ty = 15) == False\n assert candidate(sx = 5,sy = 5,tx = 100,ty = 100) == False\n assert candidate(sx = 1,sy = 1,tx = 1000000000,ty = 1) == True\n assert candidate(sx = 2,sy = 3,tx = 10,ty = 3) == False\n assert candidate(sx = 7,sy = 11,tx = 412,ty = 575) == False\n assert candidate(sx = 10,sy = 15,tx = 55,ty = 70) == True\n assert candidate(sx = 2,sy = 5,tx = 27,ty = 35) == False\n assert candidate(sx = 5,sy = 7,tx = 29,ty = 41) == True\n assert candidate(sx = 3,sy = 1,tx = 10,ty = 28) == False\n assert candidate(sx = 3,sy = 10,tx = 81,ty = 270) == False\n assert candidate(sx = 1,sy = 1,tx = 987654321,ty = 123456789) == False\n assert candidate(sx = 15,sy = 10,tx = 225,ty = 150) == False\n assert candidate(sx = 17,sy = 29,tx = 306,ty = 511) == False\n assert candidate(sx = 2,sy = 5,tx = 23,ty = 47) == False\n assert candidate(sx = 7,sy = 9,tx = 161,ty = 208) == False\n assert candidate(sx = 2,sy = 7,tx = 113,ty = 287) == False\n assert candidate(sx = 21,sy = 34,tx = 1597,ty = 2584) == False\n assert candidate(sx = 8,sy = 5,tx = 144,ty = 95) == False\n assert candidate(sx = 3,sy = 3,tx = 18,ty = 27) == False\n assert candidate(sx = 2,sy = 3,tx = 50,ty = 83) == False\n assert candidate(sx = 12345,sy = 67890,tx = 56789,ty = 45678) == False\n assert candidate(sx = 13,sy = 8,tx = 65,ty = 40) == False\n assert candidate(sx = 7,sy = 3,tx = 49,ty = 24) == False\n assert candidate(sx = 5,sy = 5,tx = 35,ty = 35) == False\n assert candidate(sx = 2,sy = 5,tx = 17,ty = 27) == False\n assert candidate(sx = 3,sy = 2,tx = 18,ty = 33) == False\n assert candidate(sx = 999999999,sy = 1,tx = 1000000000,ty = 1) == True\n assert candidate(sx = 7,sy = 17,tx = 128,ty = 17) == False\n assert candidate(sx = 2,sy = 5,tx = 18,ty = 47) == False\n assert candidate(sx = 2,sy = 5,tx = 29,ty = 44) == False\n assert candidate(sx = 2,sy = 7,tx = 10,ty = 17) == False\n assert candidate(sx = 8,sy = 7,tx = 1000,ty = 875) == False\n assert candidate(sx = 13,sy = 21,tx = 286,ty = 455) == False\n assert candidate(sx = 3,sy = 1,tx = 39,ty = 19) == False\n assert candidate(sx = 5,sy = 7,tx = 22,ty = 37) == False\n assert candidate(sx = 6,sy = 19,tx = 114,ty = 175) == False\n assert candidate(sx = 10,sy = 10,tx = 110,ty = 110) == False\n assert candidate(sx = 5,sy = 7,tx = 35,ty = 56) == False\n assert candidate(sx = 1,sy = 1,tx = 19,ty = 29) == True\n assert candidate(sx = 5,sy = 7,tx = 46,ty = 33) == False\n assert candidate(sx = 10,sy = 10,tx = 100000000,ty = 100000000) == False\n assert candidate(sx = 5,sy = 6,tx = 60,ty = 55) == False\n assert candidate(sx = 10,sy = 4,tx = 100,ty = 64) == False\n assert candidate(sx = 8,sy = 13,tx = 104,ty = 169) == False\n assert candidate(sx = 13,sy = 8,tx = 104,ty = 80) == False\n assert candidate(sx = 7,sy = 17,tx = 119,ty = 203) == False\n assert candidate(sx = 2,sy = 3,tx = 1046527,ty = 165580141) == False\n assert candidate(sx = 4,sy = 9,tx = 100,ty = 225) == False\n assert candidate(sx = 1,sy = 2,tx = 47,ty = 70) == True\n assert candidate(sx = 1,sy = 1,tx = 55,ty = 89) == True\n assert candidate(sx = 3,sy = 9,tx = 27,ty = 81) == False\n assert candidate(sx = 4,sy = 6,tx = 144,ty = 216) == False\n assert candidate(sx = 3,sy = 9,tx = 81,ty = 243) == False\n assert candidate(sx = 8,sy = 13,tx = 233,ty = 377) == False\n assert candidate(sx = 5,sy = 5,tx = 125,ty = 125) == False\n assert candidate(sx = 11,sy = 22,tx = 121,ty = 242) == False\n assert candidate(sx = 13,sy = 21,tx = 34,ty = 55) == True\n assert candidate(sx = 3,sy = 11,tx = 121,ty = 55) == False\n assert candidate(sx = 10,sy = 10,tx = 100,ty = 100) == False\n assert candidate(sx = 12,sy = 18,tx = 108,ty = 162) == False\n assert candidate(sx = 10,sy = 15,tx = 150,ty = 225) == False\n assert candidate(sx = 3,sy = 1,tx = 10,ty = 7) == True\n assert candidate(sx = 11,sy = 23,tx = 132,ty = 303) == False\n assert candidate(sx = 1,sy = 2,tx = 5,ty = 8) == False\n assert candidate(sx = 7,sy = 11,tx = 217,ty = 352) == False\n assert candidate(sx = 7,sy = 3,tx = 31,ty = 9) == False\n assert candidate(sx = 5,sy = 10,tx = 100,ty = 150) == False\n assert candidate(sx = 8,sy = 5,tx = 8,ty = 13) == True\n assert candidate(sx = 12,sy = 18,tx = 324,ty = 486) == False\n assert candidate(sx = 3,sy = 5,tx = 100,ty = 150) == False\n assert candidate(sx = 1,sy = 1,tx = 987654321,ty = 987654321) == False\n assert candidate(sx = 1,sy = 2,tx = 1,ty = 1046527) == True\n assert candidate(sx = 21,sy = 34,tx = 55,ty = 89) == True\n assert candidate(sx = 5,sy = 2,tx = 27,ty = 11) == False\n assert candidate(sx = 2,sy = 5,tx = 29,ty = 37) == False\n assert candidate(sx = 5,sy = 7,tx = 1235,ty = 1907) == False\n assert candidate(sx = 100,sy = 1,tx = 999999999,ty = 1000000000) == True\n assert candidate(sx = 21,sy = 14,tx = 420,ty = 280) == False\n assert candidate(sx = 3,sy = 3,tx = 99,ty = 99) == False\n assert candidate(sx = 8,sy = 3,tx = 217,ty = 58) == False\n assert candidate(sx = 1,sy = 2,tx = 1000000000,ty = 999999999) == True\n assert candidate(sx = 10,sy = 15,tx = 110,ty = 165) == False\n assert candidate(sx = 5,sy = 8,tx = 165,ty = 280) == False\n assert candidate(sx = 10,sy = 15,tx = 100,ty = 150) == False\n assert candidate(sx = 1,sy = 1,tx = 1,ty = 1000000000) == True\n assert candidate(sx = 5,sy = 17,tx = 104,ty = 193) == False\n assert candidate(sx = 7,sy = 3,tx = 105,ty = 45) == False\n assert candidate(sx = 8,sy = 13,tx = 184,ty = 299) == False\n assert candidate(sx = 7,sy = 17,tx = 196,ty = 511) == False\n assert candidate(sx = 2,sy = 5,tx = 29,ty = 17) == True\n assert candidate(sx = 1,sy = 10,tx = 100,ty = 91) == False\n assert candidate(sx = 2,sy = 1,tx = 1046527,ty = 1) == True\n", "comparison": "exact"}, "public_tests": ["1\n1\n3\n5", "1\n1\n2\n2", "1\n1\n1\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["sx", "sy", "tx", "ty"], "leetcode_dataset_entry_point": "Solution().reachingPoints", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:22+00:00", "tests_total": 101, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "euclidean-algorithm", "greatest-common-divisor"]}, "language": "cpp", "interface": {"raw_signature": "bool reachingPoints(int sx, int sy, int tx, int ty) {", "container": "Solution", "callable": "reachingPoints", "parameters": [{"name": "sx", "type": "int"}, {"name": "sy", "type": "int"}, {"name": "tx", "type": "int"}, {"name": "ty", "type": "int"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 781, "task_id": "rabbits-in-forest", "difficulty": "Medium", "problem_description": "There is a forest with an unknown number of rabbits. We asked n rabbits \"How many other rabbits have the same color as you?\" and collected the answers in an integer array answers where answers[i] is the answer of the i^th rabbit.\n\nGiven the array answers, return the minimum number of rabbits that could be in the forest.\n\nExample 1:\n\nInput: answers = [1,1,2]\nOutput: 5\nExplanation:\nThe two rabbits that answered \"1\" could both be the same color, say red.\nThe rabbit that answered \"2\" can't be red or the answers would be inconsistent.\nSay the rabbit that answered \"2\" was blue.\nThen there should be 2 other blue rabbits in the forest that didn't answer into the array.\nThe smallest possible number of rabbits in the forest is therefore 5: 3 that answered plus 2 that didn't.\n\nExample 2:\n\nInput: answers = [10,10,10]\nOutput: 11\n\nConstraints:\n\n- 1 <= answers.length <= 1000\n- 0 <= answers[i] < 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(answers = [1, 2, 3, 4, 5]) == 20\n assert candidate(answers = [4, 4, 4, 4, 4, 4]) == 10\n assert candidate(answers = [1, 1, 2]) == 5\n assert candidate(answers = [0, 0, 1, 1, 1]) == 6\n assert candidate(answers = [999, 999, 999]) == 1000\n assert candidate(answers = [1, 1, 2, 2, 2, 3, 3, 3, 3]) == 9\n assert candidate(answers = [3, 3, 3, 3, 3, 3]) == 8\n assert candidate(answers = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 20\n assert candidate(answers = [2, 2, 2, 2, 2, 2]) == 6\n assert candidate(answers = [0, 0, 1, 1, 1, 2, 2, 2, 2]) == 12\n assert candidate(answers = [0, 0, 0]) == 3\n assert candidate(answers = [2, 2, 2, 2, 2, 2, 2]) == 9\n assert candidate(answers = [10, 10, 10]) == 11\n assert candidate(answers = [1, 0, 1, 0, 0]) == 5\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 12\n assert candidate(answers = [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, 3, 3, 3, 3, 3]) == 38\n assert candidate(answers = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 21\n assert candidate(answers = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 28\n assert candidate(answers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 153\n assert candidate(answers = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 77\n assert candidate(answers = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 152\n assert candidate(answers = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 24\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 12\n assert candidate(answers = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 40\n assert candidate(answers = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 24\n assert candidate(answers = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 30\n assert candidate(answers = [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, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 65\n assert candidate(answers = [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]) == 1326\n assert candidate(answers = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 101\n assert candidate(answers = [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]) == 70\n assert candidate(answers = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 42\n assert candidate(answers = [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3]) == 18\n assert candidate(answers = [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]) == 41\n assert candidate(answers = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 32\n assert candidate(answers = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 20\n assert candidate(answers = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) == 10\n assert candidate(answers = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == 21\n assert candidate(answers = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 21\n assert candidate(answers = [4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 1, 1, 0]) == 15\n assert candidate(answers = [999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999, 999]) == 1000\n assert candidate(answers = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7]) == 37\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 24\n assert candidate(answers = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 32\n assert candidate(answers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 65\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 24\n assert candidate(answers = [1, 2, 3, 4, 5, 6, 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]) == 5049\n assert candidate(answers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 20\n assert candidate(answers = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 24\n assert candidate(answers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 231\n assert candidate(answers = [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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 54\n assert candidate(answers = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 33\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 18\n assert candidate(answers = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 66\n assert candidate(answers = [1, 1, 2, 2, 2, 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]) == 59\n assert candidate(answers = [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, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 45\n assert candidate(answers = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 20\n assert candidate(answers = [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]) == 59\n assert candidate(answers = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 77\n assert candidate(answers = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 40\n assert candidate(answers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 30\n assert candidate(answers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 61\n assert candidate(answers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 65\n assert candidate(answers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 66\n assert candidate(answers = [99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99]) == 200\n assert candidate(answers = [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]) == 27\n assert candidate(answers = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5]) == 22\n", "comparison": "exact"}, "public_tests": ["[1,1,2]", "[10,10,10]"], "hints": [], "metadata": {"canonical_parameter_names": ["answers"], "leetcode_dataset_entry_point": "Solution().numRabbits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:24+00:00", "tests_total": 66, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "math", "greedy"]}, "language": "cpp", "interface": {"raw_signature": "int numRabbits(vector& answers) {", "container": "Solution", "callable": "numRabbits", "parameters": [{"name": "answers", "type": "vector&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 782, "task_id": "transform-to-chessboard", "difficulty": "Hard", "problem_description": "You are given an n x n binary grid board. In each move, you can swap any two rows with each other, or any two columns with each other.\n\nReturn the minimum number of moves to transform the board into a chessboard board. If the task is impossible, return -1.\n\nA chessboard board is a board where no 0's and no 1's are 4-directionally adjacent.\n\nExample 1:\n\nInput: board = [[0,1,1,0],[0,1,1,0],[1,0,0,1],[1,0,0,1]]\nOutput: 2\nExplanation: One potential sequence of moves is shown.\nThe first move swaps the first and second column.\nThe second move swaps the second and third row.\n\nExample 2:\n\nInput: board = [[0,1],[1,0]]\nOutput: 0\nExplanation: Also note that the board with 0 in the top left corner, is also a valid chessboard.\n\nExample 3:\n\nInput: board = [[1,0],[1,0]]\nOutput: -1\nExplanation: No matter what sequence of moves you make, you cannot end with a valid chessboard.\n\nConstraints:\n\n- n == board.length\n- n == board[i].length\n- 2 <= n <= 30\n- board[i][j] is either 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [[0, 0, 1, 1], [0, 0, 1, 1], [1, 1, 0, 0], [1, 1, 0, 0]]) == 2\n assert candidate(board = [[1, 0], [1, 0]]) == -1\n assert candidate(board = [[0, 1], [1, 0]]) == 0\n assert candidate(board = [[0, 0, 1, 1], [1, 1, 0, 0], [1, 1, 0, 0], [0, 0, 1, 1]]) == 2\n assert candidate(board = [[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1]]) == 0\n assert candidate(board = [[0, 0], [0, 0]]) == -1\n assert candidate(board = [[0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0]]) == 0\n assert candidate(board = [[1, 1], [1, 1]]) == -1\n assert candidate(board = [[1, 1, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1], [1, 1, 0, 0]]) == 2\n assert candidate(board = [[0, 1, 1, 0], [0, 1, 1, 0], [1, 0, 0, 1], [1, 0, 0, 1]]) == 2\n assert candidate(board = [[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]]) == 1\n assert candidate(board = [[1, 1, 0], [0, 0, 1], [0, 1, 0]]) == -1\n assert candidate(board = [[0, 0, 0, 0], [1, 1, 1, 1], [0, 0, 0, 0], [1, 1, 1, 1]]) == -1\n assert candidate(board = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 0, 0], [0, 0, 1, 1]]) == 1\n assert candidate(board = [[1, 0, 1], [0, 1, 0], [1, 0, 1]]) == 0\n assert candidate(board = [[0, 1, 1, 0], [1, 0, 0, 1], [0, 1, 1, 0], [1, 0, 0, 1]]) == 1\n assert candidate(board = [[1, 0, 0, 1], [0, 1, 1, 0], [0, 1, 1, 0], [1, 0, 0, 1]]) == 2\n assert candidate(board = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) == -1\n assert candidate(board = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) == -1\n assert candidate(board = [[1, 0, 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(board = [[1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 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, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0]]) == 2\n assert candidate(board = [[0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1]]) == 2\n assert candidate(board = [[0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1, 0, 0]]) == 4\n assert candidate(board = [[1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 0]]) == 2\n assert candidate(board = [[1, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 0], [1, 0, 0, 1, 1, 0, 0], [0, 1, 1, 0, 0, 1, 1], [0, 1, 1, 0, 0, 1, 1]]) == 4\n assert candidate(board = [[1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0], [0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1]]) == 2\n assert candidate(board = [[0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0], [1, 0, 0, 1, 0, 1], [0, 1, 1, 0, 1, 0]]) == 2\n assert candidate(board = [[0, 1, 1, 0, 0], [1, 0, 0, 1, 1], [0, 1, 1, 0, 0], [1, 0, 0, 1, 1], [0, 1, 1, 0, 0]]) == 1\n assert candidate(board = [[0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 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(board = [[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\n assert candidate(board = [[0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0], [0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 1, 0]]) == 1\n assert candidate(board = [[1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 0, 0, 1], [0, 0, 1, 1, 0, 0, 1]]) == 5\n assert candidate(board = [[1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1]]) == -1\n assert candidate(board = [[0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1]]) == 4\n assert candidate(board = [[0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1, 1, 0]]) == 4\n assert candidate(board = [[1, 0, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1], [0, 1, 1, 0, 1, 1], [1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0], [0, 1, 1, 0, 1, 1]]) == -1\n assert candidate(board = [[0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 0], [1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 1, 0, 0]]) == 1\n assert candidate(board = [[1, 0, 0, 1, 1], [0, 1, 1, 0, 0], [1, 0, 0, 1, 1], [0, 1, 1, 0, 0], [1, 0, 0, 1, 1]]) == 1\n assert candidate(board = [[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], [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]]) == 0\n assert candidate(board = [[0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 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(board = [[0, 1, 1, 0, 1], [1, 0, 0, 1, 0], [0, 1, 1, 0, 1], [1, 0, 0, 1, 0], [0, 1, 1, 0, 1]]) == 1\n assert candidate(board = [[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]]) == 0\n assert candidate(board = [[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]]) == 0\n assert candidate(board = [[0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0]]) == 2\n assert candidate(board = [[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]]) == -1\n assert candidate(board = [[0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0]]) == 2\n assert candidate(board = [[1, 0, 1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0, 0, 1]]) == 1\n assert candidate(board = [[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\n assert candidate(board = [[1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 1], [0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0, 0, 0, 1]]) == -1\n assert candidate(board = [[0, 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(board = [[1, 0, 0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1, 1, 0], [1, 0, 0, 1, 1, 0, 0, 1]]) == 4\n assert candidate(board = [[1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 0, 0, 1, 1]]) == 2\n assert candidate(board = [[1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0], [1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0], [1, 1, 0, 0, 0, 1], [0, 0, 1, 1, 1, 0]]) == 1\n assert candidate(board = [[1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0]]) == 4\n assert candidate(board = [[1, 1, 0, 0, 1], [1, 1, 0, 0, 1], [0, 0, 1, 1, 0], [0, 0, 1, 1, 0], [1, 1, 0, 0, 1]]) == 2\n assert candidate(board = [[1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 0], [0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 1, 0]]) == 3\n assert candidate(board = [[1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 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(board = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0]]) == -1\n assert candidate(board = [[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\n assert candidate(board = [[1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1]]) == 2\n assert candidate(board = [[1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 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(board = [[1, 0, 0, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 0, 1, 0]]) == -1\n assert candidate(board = [[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\n assert candidate(board = [[1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1]]) == 1\n assert candidate(board = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1]]) == 2\n assert candidate(board = [[1, 0, 0, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1], [0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1], [1, 0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0], [0, 1, 1, 0, 1, 1, 0, 1]]) == -1\n assert candidate(board = [[1, 1, 1, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1]]) == 2\n assert candidate(board = [[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]]) == 1\n assert candidate(board = [[1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0]]) == 4\n assert candidate(board = [[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], [0, 1, 0, 1, 0, 1, 0, 1]]) == 0\n assert candidate(board = [[1, 1, 0, 0, 1], [0, 0, 1, 1, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 0], [1, 1, 0, 0, 1]]) == 1\n assert candidate(board = [[1, 1, 0, 0], [0, 1, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0]]) == -1\n assert candidate(board = [[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 1, 1]]) == -1\n assert candidate(board = [[1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1]]) == 4\n assert candidate(board = [[0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 1, 1], [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\n", "comparison": "exact"}, "public_tests": ["[[0,1,1,0],[0,1,1,0],[1,0,0,1],[1,0,0,1]]", "[[0,1],[1,0]]", "[[1,0],[1,0]]"], "hints": [], "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().movesToChessboard", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:26+00:00", "tests_total": 75, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "math", "bit-manipulation", "matrix"]}, "language": "cpp", "interface": {"raw_signature": "int movesToChessboard(vector>& board) {", "container": "Solution", "callable": "movesToChessboard", "parameters": [{"name": "board", "type": "vector>&"}], "return_type": "int", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 784, "task_id": "letter-case-permutation", "difficulty": "Medium", "problem_description": "Given a string s, you can transform every letter individually to be lowercase or uppercase to create another string.\n\nReturn a list of all possible strings we could create. Return the output in any order.\n\nExample 1:\n\nInput: s = \"a1b2\"\nOutput: [\"a1b2\",\"a1B2\",\"A1b2\",\"A1B2\"]\n\nExample 2:\n\nInput: s = \"3z4\"\nOutput: [\"3z4\",\"3Z4\"]\n\nConstraints:\n\n- 1 <= s.length <= 12\n- s consists of lowercase English letters, uppercase English letters, and digits.\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='aBcDeF'), ['aBcDeF', 'aBcDef', 'aBcDEf', 'aBcDEF', 'aBcdEF', 'aBcdEf', 'aBcdef', 'aBcdeF', 'aBCdeF', 'aBCdef', 'aBCdEf', 'aBCdEF', 'aBCDEF', 'aBCDEf', 'aBCDef', 'aBCDeF', 'abCDeF', 'abCDef', 'abCDEf', 'abCDEF', 'abCdEF', 'abCdEf', 'abCdef', 'abCdeF', 'abcdeF', 'abcdef', 'abcdEf', 'abcdEF', 'abcDEF', 'abcDEf', 'abcDef', 'abcDeF', 'AbcDeF', 'AbcDef', 'AbcDEf', 'AbcDEF', 'AbcdEF', 'AbcdEf', 'Abcdef', 'AbcdeF', 'AbCdeF', 'AbCdef', 'AbCdEf', 'AbCdEF', 'AbCDEF', 'AbCDEf', 'AbCDef', 'AbCDeF', 'ABCDeF', 'ABCDef', 'ABCDEf', 'ABCDEF', 'ABCdEF', 'ABCdEf', 'ABCdef', 'ABCdeF', 'ABcdeF', 'ABcdef', 'ABcdEf', 'ABcdEF', 'ABcDEF', 'ABcDEf', 'ABcDef', 'ABcDeF'])\n assert answers_match(candidate(s='3z4'), ['3z4', '3Z4'])\n assert answers_match(candidate(s='aBc1'), ['aBc1', 'aBC1', 'abC1', 'abc1', 'Abc1', 'AbC1', 'ABC1', 'ABc1'])\n assert answers_match(candidate(s='abcdef'), ['abcdef', 'abcdeF', 'abcdEF', 'abcdEf', 'abcDEf', 'abcDEF', 'abcDeF', 'abcDef', 'abCDef', 'abCDeF', 'abCDEF', 'abCDEf', 'abCdEf', 'abCdEF', 'abCdeF', 'abCdef', 'aBCdef', 'aBCdeF', 'aBCdEF', 'aBCdEf', 'aBCDEf', 'aBCDEF', 'aBCDeF', 'aBCDef', 'aBcDef', 'aBcDeF', 'aBcDEF', 'aBcDEf', 'aBcdEf', 'aBcdEF', 'aBcdeF', 'aBcdef', 'ABcdef', 'ABcdeF', 'ABcdEF', 'ABcdEf', 'ABcDEf', 'ABcDEF', 'ABcDeF', 'ABcDef', 'ABCDef', 'ABCDeF', 'ABCDEF', 'ABCDEf', 'ABCdEf', 'ABCdEF', 'ABCdeF', 'ABCdef', 'AbCdef', 'AbCdeF', 'AbCdEF', 'AbCdEf', 'AbCDEf', 'AbCDEF', 'AbCDeF', 'AbCDef', 'AbcDef', 'AbcDeF', 'AbcDEF', 'AbcDEf', 'AbcdEf', 'AbcdEF', 'AbcdeF', 'Abcdef'])\n assert answers_match(candidate(s='ABC123'), ['ABC123', 'ABc123', 'Abc123', 'AbC123', 'abC123', 'abc123', 'aBc123', 'aBC123'])\n assert answers_match(candidate(s='123abc456DEF'), ['123abc456DEF', '123abc456DEf', '123abc456Def', '123abc456DeF', '123abc456deF', '123abc456def', '123abc456dEf', '123abc456dEF', '123abC456dEF', '123abC456dEf', '123abC456def', '123abC456deF', '123abC456DeF', '123abC456Def', '123abC456DEf', '123abC456DEF', '123aBC456DEF', '123aBC456DEf', '123aBC456Def', '123aBC456DeF', '123aBC456deF', '123aBC456def', '123aBC456dEf', '123aBC456dEF', '123aBc456dEF', '123aBc456dEf', '123aBc456def', '123aBc456deF', '123aBc456DeF', '123aBc456Def', '123aBc456DEf', '123aBc456DEF', '123ABc456DEF', '123ABc456DEf', '123ABc456Def', '123ABc456DeF', '123ABc456deF', '123ABc456def', '123ABc456dEf', '123ABc456dEF', '123ABC456dEF', '123ABC456dEf', '123ABC456def', '123ABC456deF', '123ABC456DeF', '123ABC456Def', '123ABC456DEf', '123ABC456DEF', '123AbC456DEF', '123AbC456DEf', '123AbC456Def', '123AbC456DeF', '123AbC456deF', '123AbC456def', '123AbC456dEf', '123AbC456dEF', '123Abc456dEF', '123Abc456dEf', '123Abc456def', '123Abc456deF', '123Abc456DeF', '123Abc456Def', '123Abc456DEf', '123Abc456DEF'])\n assert answers_match(candidate(s='1234567890'), ['1234567890'])\n assert answers_match(candidate(s='a'), ['a', 'A'])\n assert answers_match(candidate(s='a1b2'), ['a1b2', 'a1B2', 'A1B2', 'A1b2'])\n assert answers_match(candidate(s='ab'), ['ab', 'aB', 'AB', 'Ab'])\n assert answers_match(candidate(s='A1B2C3'), ['A1B2C3', 'A1B2c3', 'A1b2c3', 'A1b2C3', 'a1b2C3', 'a1b2c3', 'a1B2c3', 'a1B2C3'])\n assert answers_match(candidate(s='Z1y2X3'), ['Z1y2X3', 'Z1y2x3', 'Z1Y2x3', 'Z1Y2X3', 'z1Y2X3', 'z1Y2x3', 'z1y2x3', 'z1y2X3'])\n assert answers_match(candidate(s='A1B'), ['A1B', 'A1b', 'a1b', 'a1B'])\n assert answers_match(candidate(s='A'), ['A', 'a'])\n assert answers_match(candidate(s='1a2B3c4D'), ['1a2B3c4D', '1a2B3c4d', '1a2B3C4d', '1a2B3C4D', '1a2b3C4D', '1a2b3C4d', '1a2b3c4d', '1a2b3c4D', '1A2b3c4D', '1A2b3c4d', '1A2b3C4d', '1A2b3C4D', '1A2B3C4D', '1A2B3C4d', '1A2B3c4d', '1A2B3c4D'])\n assert answers_match(candidate(s='aBc123'), ['aBc123', 'aBC123', 'abC123', 'abc123', 'Abc123', 'AbC123', 'ABC123', 'ABc123'])\n assert answers_match(candidate(s='123abcDEF'), ['123abcDEF', '123abcDEf', '123abcDef', '123abcDeF', '123abcdeF', '123abcdef', '123abcdEf', '123abcdEF', '123abCdEF', '123abCdEf', '123abCdef', '123abCdeF', '123abCDeF', '123abCDef', '123abCDEf', '123abCDEF', '123aBCDEF', '123aBCDEf', '123aBCDef', '123aBCDeF', '123aBCdeF', '123aBCdef', '123aBCdEf', '123aBCdEF', '123aBcdEF', '123aBcdEf', '123aBcdef', '123aBcdeF', '123aBcDeF', '123aBcDef', '123aBcDEf', '123aBcDEF', '123ABcDEF', '123ABcDEf', '123ABcDef', '123ABcDeF', '123ABcdeF', '123ABcdef', '123ABcdEf', '123ABcdEF', '123ABCdEF', '123ABCdEf', '123ABCdef', '123ABCdeF', '123ABCDeF', '123ABCDef', '123ABCDEf', '123ABCDEF', '123AbCDEF', '123AbCDEf', '123AbCDef', '123AbCDeF', '123AbCdeF', '123AbCdef', '123AbCdEf', '123AbCdEF', '123AbcdEF', '123AbcdEf', '123Abcdef', '123AbcdeF', '123AbcDeF', '123AbcDef', '123AbcDEf', '123AbcDEF'])\n assert answers_match(candidate(s='1'), ['1'])\n assert answers_match(candidate(s='123'), ['123'])\n assert answers_match(candidate(s='aBc'), ['aBc', 'aBC', 'abC', 'abc', 'Abc', 'AbC', 'ABC', 'ABc'])\n assert answers_match(candidate(s='aB'), ['aB', 'ab', 'Ab', 'AB'])\n assert answers_match(candidate(s='ABCDEFG'), ['ABCDEFG', 'ABCDEFg', 'ABCDEfg', 'ABCDEfG', 'ABCDefG', 'ABCDefg', 'ABCDeFg', 'ABCDeFG', 'ABCdeFG', 'ABCdeFg', 'ABCdefg', 'ABCdefG', 'ABCdEfG', 'ABCdEfg', 'ABCdEFg', 'ABCdEFG', 'ABcdEFG', 'ABcdEFg', 'ABcdEfg', 'ABcdEfG', 'ABcdefG', 'ABcdefg', 'ABcdeFg', 'ABcdeFG', 'ABcDeFG', 'ABcDeFg', 'ABcDefg', 'ABcDefG', 'ABcDEfG', 'ABcDEfg', 'ABcDEFg', 'ABcDEFG', 'AbcDEFG', 'AbcDEFg', 'AbcDEfg', 'AbcDEfG', 'AbcDefG', 'AbcDefg', 'AbcDeFg', 'AbcDeFG', 'AbcdeFG', 'AbcdeFg', 'Abcdefg', 'AbcdefG', 'AbcdEfG', 'AbcdEfg', 'AbcdEFg', 'AbcdEFG', 'AbCdEFG', 'AbCdEFg', 'AbCdEfg', 'AbCdEfG', 'AbCdefG', 'AbCdefg', 'AbCdeFg', 'AbCdeFG', 'AbCDeFG', 'AbCDeFg', 'AbCDefg', 'AbCDefG', 'AbCDEfG', 'AbCDEfg', 'AbCDEFg', 'AbCDEFG', 'abCDEFG', 'abCDEFg', 'abCDEfg', 'abCDEfG', 'abCDefG', 'abCDefg', 'abCDeFg', 'abCDeFG', 'abCdeFG', 'abCdeFg', 'abCdefg', 'abCdefG', 'abCdEfG', 'abCdEfg', 'abCdEFg', 'abCdEFG', 'abcdEFG', 'abcdEFg', 'abcdEfg', 'abcdEfG', 'abcdefG', 'abcdefg', 'abcdeFg', 'abcdeFG', 'abcDeFG', 'abcDeFg', 'abcDefg', 'abcDefG', 'abcDEfG', 'abcDEfg', 'abcDEFg', 'abcDEFG', 'aBcDEFG', 'aBcDEFg', 'aBcDEfg', 'aBcDEfG', 'aBcDefG', 'aBcDefg', 'aBcDeFg', 'aBcDeFG', 'aBcdeFG', 'aBcdeFg', 'aBcdefg', 'aBcdefG', 'aBcdEfG', 'aBcdEfg', 'aBcdEFg', 'aBcdEFG', 'aBCdEFG', 'aBCdEFg', 'aBCdEfg', 'aBCdEfG', 'aBCdefG', 'aBCdefg', 'aBCdeFg', 'aBCdeFG', 'aBCDeFG', 'aBCDeFg', 'aBCDefg', 'aBCDefG', 'aBCDEfG', 'aBCDEfg', 'aBCDEFg', 'aBCDEFG'])\n assert answers_match(candidate(s='GHIjkl456'), ['GHIjkl456', 'GHIjkL456', 'GHIjKL456', 'GHIjKl456', 'GHIJKl456', 'GHIJKL456', 'GHIJkL456', 'GHIJkl456', 'GHiJkl456', 'GHiJkL456', 'GHiJKL456', 'GHiJKl456', 'GHijKl456', 'GHijKL456', 'GHijkL456', 'GHijkl456', 'Ghijkl456', 'GhijkL456', 'GhijKL456', 'GhijKl456', 'GhiJKl456', 'GhiJKL456', 'GhiJkL456', 'GhiJkl456', 'GhIJkl456', 'GhIJkL456', 'GhIJKL456', 'GhIJKl456', 'GhIjKl456', 'GhIjKL456', 'GhIjkL456', 'GhIjkl456', 'ghIjkl456', 'ghIjkL456', 'ghIjKL456', 'ghIjKl456', 'ghIJKl456', 'ghIJKL456', 'ghIJkL456', 'ghIJkl456', 'ghiJkl456', 'ghiJkL456', 'ghiJKL456', 'ghiJKl456', 'ghijKl456', 'ghijKL456', 'ghijkL456', 'ghijkl456', 'gHijkl456', 'gHijkL456', 'gHijKL456', 'gHijKl456', 'gHiJKl456', 'gHiJKL456', 'gHiJkL456', 'gHiJkl456', 'gHIJkl456', 'gHIJkL456', 'gHIJKL456', 'gHIJKl456', 'gHIjKl456', 'gHIjKL456', 'gHIjkL456', 'gHIjkl456'])\n assert answers_match(candidate(s='000aBc111'), ['000aBc111', '000aBC111', '000abC111', '000abc111', '000Abc111', '000AbC111', '000ABC111', '000ABc111'])\n assert answers_match(candidate(s='123ABC'), ['123ABC', '123ABc', '123Abc', '123AbC', '123abC', '123abc', '123aBc', '123aBC'])\n assert answers_match(candidate(s='aBcD'), ['aBcD', 'aBcd', 'aBCd', 'aBCD', 'abCD', 'abCd', 'abcd', 'abcD', 'AbcD', 'Abcd', 'AbCd', 'AbCD', 'ABCD', 'ABCd', 'ABcd', 'ABcD'])\n assert answers_match(candidate(s='xyz789'), ['xyz789', 'xyZ789', 'xYZ789', 'xYz789', 'XYz789', 'XYZ789', 'XyZ789', 'Xyz789'])\n assert answers_match(candidate(s='0f1G2h'), ['0f1G2h', '0f1G2H', '0f1g2H', '0f1g2h', '0F1g2h', '0F1g2H', '0F1G2H', '0F1G2h'])\n assert answers_match(candidate(s='9a8B7'), ['9a8B7', '9a8b7', '9A8b7', '9A8B7'])\n assert answers_match(candidate(s='A1b2C3d4E5'), ['A1b2C3d4E5', 'A1b2C3d4e5', 'A1b2C3D4e5', 'A1b2C3D4E5', 'A1b2c3D4E5', 'A1b2c3D4e5', 'A1b2c3d4e5', 'A1b2c3d4E5', 'A1B2c3d4E5', 'A1B2c3d4e5', 'A1B2c3D4e5', 'A1B2c3D4E5', 'A1B2C3D4E5', 'A1B2C3D4e5', 'A1B2C3d4e5', 'A1B2C3d4E5', 'a1B2C3d4E5', 'a1B2C3d4e5', 'a1B2C3D4e5', 'a1B2C3D4E5', 'a1B2c3D4E5', 'a1B2c3D4e5', 'a1B2c3d4e5', 'a1B2c3d4E5', 'a1b2c3d4E5', 'a1b2c3d4e5', 'a1b2c3D4e5', 'a1b2c3D4E5', 'a1b2C3D4E5', 'a1b2C3D4e5', 'a1b2C3d4e5', 'a1b2C3d4E5'])\n assert answers_match(candidate(s='XYZ789'), ['XYZ789', 'XYz789', 'Xyz789', 'XyZ789', 'xyZ789', 'xyz789', 'xYz789', 'xYZ789'])\n assert answers_match(candidate(s='aBc1D'), ['aBc1D', 'aBc1d', 'aBC1d', 'aBC1D', 'abC1D', 'abC1d', 'abc1d', 'abc1D', 'Abc1D', 'Abc1d', 'AbC1d', 'AbC1D', 'ABC1D', 'ABC1d', 'ABc1d', 'ABc1D'])\n assert answers_match(candidate(s='0Z9X'), ['0Z9X', '0Z9x', '0z9x', '0z9X'])\n assert answers_match(candidate(s='ZZZZ9999'), ['ZZZZ9999', 'ZZZz9999', 'ZZzz9999', 'ZZzZ9999', 'ZzzZ9999', 'Zzzz9999', 'ZzZz9999', 'ZzZZ9999', 'zzZZ9999', 'zzZz9999', 'zzzz9999', 'zzzZ9999', 'zZzZ9999', 'zZzz9999', 'zZZz9999', 'zZZZ9999'])\n assert answers_match(candidate(s='A1B2C3D4'), ['A1B2C3D4', 'A1B2C3d4', 'A1B2c3d4', 'A1B2c3D4', 'A1b2c3D4', 'A1b2c3d4', 'A1b2C3d4', 'A1b2C3D4', 'a1b2C3D4', 'a1b2C3d4', 'a1b2c3d4', 'a1b2c3D4', 'a1B2c3D4', 'a1B2c3d4', 'a1B2C3d4', 'a1B2C3D4'])\n assert answers_match(candidate(s='123abc456'), ['123abc456', '123abC456', '123aBC456', '123aBc456', '123ABc456', '123ABC456', '123AbC456', '123Abc456'])\n assert answers_match(candidate(s='AaBbCc'), ['AaBbCc', 'AaBbCC', 'AaBbcC', 'AaBbcc', 'AaBBcc', 'AaBBcC', 'AaBBCC', 'AaBBCc', 'AabBCc', 'AabBCC', 'AabBcC', 'AabBcc', 'Aabbcc', 'AabbcC', 'AabbCC', 'AabbCc', 'AAbbCc', 'AAbbCC', 'AAbbcC', 'AAbbcc', 'AAbBcc', 'AAbBcC', 'AAbBCC', 'AAbBCc', 'AABBCc', 'AABBCC', 'AABBcC', 'AABBcc', 'AABbcc', 'AABbcC', 'AABbCC', 'AABbCc', 'aABbCc', 'aABbCC', 'aABbcC', 'aABbcc', 'aABBcc', 'aABBcC', 'aABBCC', 'aABBCc', 'aAbBCc', 'aAbBCC', 'aAbBcC', 'aAbBcc', 'aAbbcc', 'aAbbcC', 'aAbbCC', 'aAbbCc', 'aabbCc', 'aabbCC', 'aabbcC', 'aabbcc', 'aabBcc', 'aabBcC', 'aabBCC', 'aabBCc', 'aaBBCc', 'aaBBCC', 'aaBBcC', 'aaBBcc', 'aaBbcc', 'aaBbcC', 'aaBbCC', 'aaBbCc'])\n assert answers_match(candidate(s='WORLD456'), ['WORLD456', 'WORLd456', 'WORld456', 'WORlD456', 'WOrlD456', 'WOrld456', 'WOrLd456', 'WOrLD456', 'WorLD456', 'WorLd456', 'World456', 'WorlD456', 'WoRlD456', 'WoRld456', 'WoRLd456', 'WoRLD456', 'woRLD456', 'woRLd456', 'woRld456', 'woRlD456', 'worlD456', 'world456', 'worLd456', 'worLD456', 'wOrLD456', 'wOrLd456', 'wOrld456', 'wOrlD456', 'wORlD456', 'wORld456', 'wORLd456', 'wORLD456'])\n assert answers_match(candidate(s='123abcDEF456'), ['123abcDEF456', '123abcDEf456', '123abcDef456', '123abcDeF456', '123abcdeF456', '123abcdef456', '123abcdEf456', '123abcdEF456', '123abCdEF456', '123abCdEf456', '123abCdef456', '123abCdeF456', '123abCDeF456', '123abCDef456', '123abCDEf456', '123abCDEF456', '123aBCDEF456', '123aBCDEf456', '123aBCDef456', '123aBCDeF456', '123aBCdeF456', '123aBCdef456', '123aBCdEf456', '123aBCdEF456', '123aBcdEF456', '123aBcdEf456', '123aBcdef456', '123aBcdeF456', '123aBcDeF456', '123aBcDef456', '123aBcDEf456', '123aBcDEF456', '123ABcDEF456', '123ABcDEf456', '123ABcDef456', '123ABcDeF456', '123ABcdeF456', '123ABcdef456', '123ABcdEf456', '123ABcdEF456', '123ABCdEF456', '123ABCdEf456', '123ABCdef456', '123ABCdeF456', '123ABCDeF456', '123ABCDef456', '123ABCDEf456', '123ABCDEF456', '123AbCDEF456', '123AbCDEf456', '123AbCDef456', '123AbCDeF456', '123AbCdeF456', '123AbCdef456', '123AbCdEf456', '123AbCdEF456', '123AbcdEF456', '123AbcdEf456', '123Abcdef456', '123AbcdeF456', '123AbcDeF456', '123AbcDef456', '123AbcDEf456', '123AbcDEF456'])\n assert answers_match(candidate(s='AbC1dE2f3'), ['AbC1dE2f3', 'AbC1dE2F3', 'AbC1de2F3', 'AbC1de2f3', 'AbC1De2f3', 'AbC1De2F3', 'AbC1DE2F3', 'AbC1DE2f3', 'Abc1DE2f3', 'Abc1DE2F3', 'Abc1De2F3', 'Abc1De2f3', 'Abc1de2f3', 'Abc1de2F3', 'Abc1dE2F3', 'Abc1dE2f3', 'ABc1dE2f3', 'ABc1dE2F3', 'ABc1de2F3', 'ABc1de2f3', 'ABc1De2f3', 'ABc1De2F3', 'ABc1DE2F3', 'ABc1DE2f3', 'ABC1DE2f3', 'ABC1DE2F3', 'ABC1De2F3', 'ABC1De2f3', 'ABC1de2f3', 'ABC1de2F3', 'ABC1dE2F3', 'ABC1dE2f3', 'aBC1dE2f3', 'aBC1dE2F3', 'aBC1de2F3', 'aBC1de2f3', 'aBC1De2f3', 'aBC1De2F3', 'aBC1DE2F3', 'aBC1DE2f3', 'aBc1DE2f3', 'aBc1DE2F3', 'aBc1De2F3', 'aBc1De2f3', 'aBc1de2f3', 'aBc1de2F3', 'aBc1dE2F3', 'aBc1dE2f3', 'abc1dE2f3', 'abc1dE2F3', 'abc1de2F3', 'abc1de2f3', 'abc1De2f3', 'abc1De2F3', 'abc1DE2F3', 'abc1DE2f3', 'abC1DE2f3', 'abC1DE2F3', 'abC1De2F3', 'abC1De2f3', 'abC1de2f3', 'abC1de2F3', 'abC1dE2F3', 'abC1dE2f3'])\n assert answers_match(candidate(s='a123b456c789'), ['a123b456c789', 'a123b456C789', 'a123B456C789', 'a123B456c789', 'A123B456c789', 'A123B456C789', 'A123b456C789', 'A123b456c789'])\n assert answers_match(candidate(s='a1B2c3'), ['a1B2c3', 'a1B2C3', 'a1b2C3', 'a1b2c3', 'A1b2c3', 'A1b2C3', 'A1B2C3', 'A1B2c3'])\n assert answers_match(candidate(s='MnOpQrSt'), ['MnOpQrSt', 'MnOpQrST', 'MnOpQrsT', 'MnOpQrst', 'MnOpQRst', 'MnOpQRsT', 'MnOpQRST', 'MnOpQRSt', 'MnOpqRSt', 'MnOpqRST', 'MnOpqRsT', 'MnOpqRst', 'MnOpqrst', 'MnOpqrsT', 'MnOpqrST', 'MnOpqrSt', 'MnOPqrSt', 'MnOPqrST', 'MnOPqrsT', 'MnOPqrst', 'MnOPqRst', 'MnOPqRsT', 'MnOPqRST', 'MnOPqRSt', 'MnOPQRSt', 'MnOPQRST', 'MnOPQRsT', 'MnOPQRst', 'MnOPQrst', 'MnOPQrsT', 'MnOPQrST', 'MnOPQrSt', 'MnoPQrSt', 'MnoPQrST', 'MnoPQrsT', 'MnoPQrst', 'MnoPQRst', 'MnoPQRsT', 'MnoPQRST', 'MnoPQRSt', 'MnoPqRSt', 'MnoPqRST', 'MnoPqRsT', 'MnoPqRst', 'MnoPqrst', 'MnoPqrsT', 'MnoPqrST', 'MnoPqrSt', 'MnopqrSt', 'MnopqrST', 'MnopqrsT', 'Mnopqrst', 'MnopqRst', 'MnopqRsT', 'MnopqRST', 'MnopqRSt', 'MnopQRSt', 'MnopQRST', 'MnopQRsT', 'MnopQRst', 'MnopQrst', 'MnopQrsT', 'MnopQrST', 'MnopQrSt', 'MNopQrSt', 'MNopQrST', 'MNopQrsT', 'MNopQrst', 'MNopQRst', 'MNopQRsT', 'MNopQRST', 'MNopQRSt', 'MNopqRSt', 'MNopqRST', 'MNopqRsT', 'MNopqRst', 'MNopqrst', 'MNopqrsT', 'MNopqrST', 'MNopqrSt', 'MNoPqrSt', 'MNoPqrST', 'MNoPqrsT', 'MNoPqrst', 'MNoPqRst', 'MNoPqRsT', 'MNoPqRST', 'MNoPqRSt', 'MNoPQRSt', 'MNoPQRST', 'MNoPQRsT', 'MNoPQRst', 'MNoPQrst', 'MNoPQrsT', 'MNoPQrST', 'MNoPQrSt', 'MNOPQrSt', 'MNOPQrST', 'MNOPQrsT', 'MNOPQrst', 'MNOPQRst', 'MNOPQRsT', 'MNOPQRST', 'MNOPQRSt', 'MNOPqRSt', 'MNOPqRST', 'MNOPqRsT', 'MNOPqRst', 'MNOPqrst', 'MNOPqrsT', 'MNOPqrST', 'MNOPqrSt', 'MNOpqrSt', 'MNOpqrST', 'MNOpqrsT', 'MNOpqrst', 'MNOpqRst', 'MNOpqRsT', 'MNOpqRST', 'MNOpqRSt', 'MNOpQRSt', 'MNOpQRST', 'MNOpQRsT', 'MNOpQRst', 'MNOpQrst', 'MNOpQrsT', 'MNOpQrST', 'MNOpQrSt', 'mNOpQrSt', 'mNOpQrST', 'mNOpQrsT', 'mNOpQrst', 'mNOpQRst', 'mNOpQRsT', 'mNOpQRST', 'mNOpQRSt', 'mNOpqRSt', 'mNOpqRST', 'mNOpqRsT', 'mNOpqRst', 'mNOpqrst', 'mNOpqrsT', 'mNOpqrST', 'mNOpqrSt', 'mNOPqrSt', 'mNOPqrST', 'mNOPqrsT', 'mNOPqrst', 'mNOPqRst', 'mNOPqRsT', 'mNOPqRST', 'mNOPqRSt', 'mNOPQRSt', 'mNOPQRST', 'mNOPQRsT', 'mNOPQRst', 'mNOPQrst', 'mNOPQrsT', 'mNOPQrST', 'mNOPQrSt', 'mNoPQrSt', 'mNoPQrST', 'mNoPQrsT', 'mNoPQrst', 'mNoPQRst', 'mNoPQRsT', 'mNoPQRST', 'mNoPQRSt', 'mNoPqRSt', 'mNoPqRST', 'mNoPqRsT', 'mNoPqRst', 'mNoPqrst', 'mNoPqrsT', 'mNoPqrST', 'mNoPqrSt', 'mNopqrSt', 'mNopqrST', 'mNopqrsT', 'mNopqrst', 'mNopqRst', 'mNopqRsT', 'mNopqRST', 'mNopqRSt', 'mNopQRSt', 'mNopQRST', 'mNopQRsT', 'mNopQRst', 'mNopQrst', 'mNopQrsT', 'mNopQrST', 'mNopQrSt', 'mnopQrSt', 'mnopQrST', 'mnopQrsT', 'mnopQrst', 'mnopQRst', 'mnopQRsT', 'mnopQRST', 'mnopQRSt', 'mnopqRSt', 'mnopqRST', 'mnopqRsT', 'mnopqRst', 'mnopqrst', 'mnopqrsT', 'mnopqrST', 'mnopqrSt', 'mnoPqrSt', 'mnoPqrST', 'mnoPqrsT', 'mnoPqrst', 'mnoPqRst', 'mnoPqRsT', 'mnoPqRST', 'mnoPqRSt', 'mnoPQRSt', 'mnoPQRST', 'mnoPQRsT', 'mnoPQRst', 'mnoPQrst', 'mnoPQrsT', 'mnoPQrST', 'mnoPQrSt', 'mnOPQrSt', 'mnOPQrST', 'mnOPQrsT', 'mnOPQrst', 'mnOPQRst', 'mnOPQRsT', 'mnOPQRST', 'mnOPQRSt', 'mnOPqRSt', 'mnOPqRST', 'mnOPqRsT', 'mnOPqRst', 'mnOPqrst', 'mnOPqrsT', 'mnOPqrST', 'mnOPqrSt', 'mnOpqrSt', 'mnOpqrST', 'mnOpqrsT', 'mnOpqrst', 'mnOpqRst', 'mnOpqRsT', 'mnOpqRST', 'mnOpqRSt', 'mnOpQRSt', 'mnOpQRST', 'mnOpQRsT', 'mnOpQRst', 'mnOpQrst', 'mnOpQrsT', 'mnOpQrST', 'mnOpQrSt'])\n assert answers_match(candidate(s='xYz'), ['xYz', 'xYZ', 'xyZ', 'xyz', 'Xyz', 'XyZ', 'XYZ', 'XYz'])\n assert answers_match(candidate(s='ABCDEFGHIJ'), ['ABCDEFGHIJ', 'ABCDEFGHIj', 'ABCDEFGHij', 'ABCDEFGHiJ', 'ABCDEFGhiJ', 'ABCDEFGhij', 'ABCDEFGhIj', 'ABCDEFGhIJ', 'ABCDEFghIJ', 'ABCDEFghIj', 'ABCDEFghij', 'ABCDEFghiJ', 'ABCDEFgHiJ', 'ABCDEFgHij', 'ABCDEFgHIj', 'ABCDEFgHIJ', 'ABCDEfgHIJ', 'ABCDEfgHIj', 'ABCDEfgHij', 'ABCDEfgHiJ', 'ABCDEfghiJ', 'ABCDEfghij', 'ABCDEfghIj', 'ABCDEfghIJ', 'ABCDEfGhIJ', 'ABCDEfGhIj', 'ABCDEfGhij', 'ABCDEfGhiJ', 'ABCDEfGHiJ', 'ABCDEfGHij', 'ABCDEfGHIj', 'ABCDEfGHIJ', 'ABCDefGHIJ', 'ABCDefGHIj', 'ABCDefGHij', 'ABCDefGHiJ', 'ABCDefGhiJ', 'ABCDefGhij', 'ABCDefGhIj', 'ABCDefGhIJ', 'ABCDefghIJ', 'ABCDefghIj', 'ABCDefghij', 'ABCDefghiJ', 'ABCDefgHiJ', 'ABCDefgHij', 'ABCDefgHIj', 'ABCDefgHIJ', 'ABCDeFgHIJ', 'ABCDeFgHIj', 'ABCDeFgHij', 'ABCDeFgHiJ', 'ABCDeFghiJ', 'ABCDeFghij', 'ABCDeFghIj', 'ABCDeFghIJ', 'ABCDeFGhIJ', 'ABCDeFGhIj', 'ABCDeFGhij', 'ABCDeFGhiJ', 'ABCDeFGHiJ', 'ABCDeFGHij', 'ABCDeFGHIj', 'ABCDeFGHIJ', 'ABCdeFGHIJ', 'ABCdeFGHIj', 'ABCdeFGHij', 'ABCdeFGHiJ', 'ABCdeFGhiJ', 'ABCdeFGhij', 'ABCdeFGhIj', 'ABCdeFGhIJ', 'ABCdeFghIJ', 'ABCdeFghIj', 'ABCdeFghij', 'ABCdeFghiJ', 'ABCdeFgHiJ', 'ABCdeFgHij', 'ABCdeFgHIj', 'ABCdeFgHIJ', 'ABCdefgHIJ', 'ABCdefgHIj', 'ABCdefgHij', 'ABCdefgHiJ', 'ABCdefghiJ', 'ABCdefghij', 'ABCdefghIj', 'ABCdefghIJ', 'ABCdefGhIJ', 'ABCdefGhIj', 'ABCdefGhij', 'ABCdefGhiJ', 'ABCdefGHiJ', 'ABCdefGHij', 'ABCdefGHIj', 'ABCdefGHIJ', 'ABCdEfGHIJ', 'ABCdEfGHIj', 'ABCdEfGHij', 'ABCdEfGHiJ', 'ABCdEfGhiJ', 'ABCdEfGhij', 'ABCdEfGhIj', 'ABCdEfGhIJ', 'ABCdEfghIJ', 'ABCdEfghIj', 'ABCdEfghij', 'ABCdEfghiJ', 'ABCdEfgHiJ', 'ABCdEfgHij', 'ABCdEfgHIj', 'ABCdEfgHIJ', 'ABCdEFgHIJ', 'ABCdEFgHIj', 'ABCdEFgHij', 'ABCdEFgHiJ', 'ABCdEFghiJ', 'ABCdEFghij', 'ABCdEFghIj', 'ABCdEFghIJ', 'ABCdEFGhIJ', 'ABCdEFGhIj', 'ABCdEFGhij', 'ABCdEFGhiJ', 'ABCdEFGHiJ', 'ABCdEFGHij', 'ABCdEFGHIj', 'ABCdEFGHIJ', 'ABcdEFGHIJ', 'ABcdEFGHIj', 'ABcdEFGHij', 'ABcdEFGHiJ', 'ABcdEFGhiJ', 'ABcdEFGhij', 'ABcdEFGhIj', 'ABcdEFGhIJ', 'ABcdEFghIJ', 'ABcdEFghIj', 'ABcdEFghij', 'ABcdEFghiJ', 'ABcdEFgHiJ', 'ABcdEFgHij', 'ABcdEFgHIj', 'ABcdEFgHIJ', 'ABcdEfgHIJ', 'ABcdEfgHIj', 'ABcdEfgHij', 'ABcdEfgHiJ', 'ABcdEfghiJ', 'ABcdEfghij', 'ABcdEfghIj', 'ABcdEfghIJ', 'ABcdEfGhIJ', 'ABcdEfGhIj', 'ABcdEfGhij', 'ABcdEfGhiJ', 'ABcdEfGHiJ', 'ABcdEfGHij', 'ABcdEfGHIj', 'ABcdEfGHIJ', 'ABcdefGHIJ', 'ABcdefGHIj', 'ABcdefGHij', 'ABcdefGHiJ', 'ABcdefGhiJ', 'ABcdefGhij', 'ABcdefGhIj', 'ABcdefGhIJ', 'ABcdefghIJ', 'ABcdefghIj', 'ABcdefghij', 'ABcdefghiJ', 'ABcdefgHiJ', 'ABcdefgHij', 'ABcdefgHIj', 'ABcdefgHIJ', 'ABcdeFgHIJ', 'ABcdeFgHIj', 'ABcdeFgHij', 'ABcdeFgHiJ', 'ABcdeFghiJ', 'ABcdeFghij', 'ABcdeFghIj', 'ABcdeFghIJ', 'ABcdeFGhIJ', 'ABcdeFGhIj', 'ABcdeFGhij', 'ABcdeFGhiJ', 'ABcdeFGHiJ', 'ABcdeFGHij', 'ABcdeFGHIj', 'ABcdeFGHIJ', 'ABcDeFGHIJ', 'ABcDeFGHIj', 'ABcDeFGHij', 'ABcDeFGHiJ', 'ABcDeFGhiJ', 'ABcDeFGhij', 'ABcDeFGhIj', 'ABcDeFGhIJ', 'ABcDeFghIJ', 'ABcDeFghIj', 'ABcDeFghij', 'ABcDeFghiJ', 'ABcDeFgHiJ', 'ABcDeFgHij', 'ABcDeFgHIj', 'ABcDeFgHIJ', 'ABcDefgHIJ', 'ABcDefgHIj', 'ABcDefgHij', 'ABcDefgHiJ', 'ABcDefghiJ', 'ABcDefghij', 'ABcDefghIj', 'ABcDefghIJ', 'ABcDefGhIJ', 'ABcDefGhIj', 'ABcDefGhij', 'ABcDefGhiJ', 'ABcDefGHiJ', 'ABcDefGHij', 'ABcDefGHIj', 'ABcDefGHIJ', 'ABcDEfGHIJ', 'ABcDEfGHIj', 'ABcDEfGHij', 'ABcDEfGHiJ', 'ABcDEfGhiJ', 'ABcDEfGhij', 'ABcDEfGhIj', 'ABcDEfGhIJ', 'ABcDEfghIJ', 'ABcDEfghIj', 'ABcDEfghij', 'ABcDEfghiJ', 'ABcDEfgHiJ', 'ABcDEfgHij', 'ABcDEfgHIj', 'ABcDEfgHIJ', 'ABcDEFgHIJ', 'ABcDEFgHIj', 'ABcDEFgHij', 'ABcDEFgHiJ', 'ABcDEFghiJ', 'ABcDEFghij', 'ABcDEFghIj', 'ABcDEFghIJ', 'ABcDEFGhIJ', 'ABcDEFGhIj', 'ABcDEFGhij', 'ABcDEFGhiJ', 'ABcDEFGHiJ', 'ABcDEFGHij', 'ABcDEFGHIj', 'ABcDEFGHIJ', 'AbcDEFGHIJ', 'AbcDEFGHIj', 'AbcDEFGHij', 'AbcDEFGHiJ', 'AbcDEFGhiJ', 'AbcDEFGhij', 'AbcDEFGhIj', 'AbcDEFGhIJ', 'AbcDEFghIJ', 'AbcDEFghIj', 'AbcDEFghij', 'AbcDEFghiJ', 'AbcDEFgHiJ', 'AbcDEFgHij', 'AbcDEFgHIj', 'AbcDEFgHIJ', 'AbcDEfgHIJ', 'AbcDEfgHIj', 'AbcDEfgHij', 'AbcDEfgHiJ', 'AbcDEfghiJ', 'AbcDEfghij', 'AbcDEfghIj', 'AbcDEfghIJ', 'AbcDEfGhIJ', 'AbcDEfGhIj', 'AbcDEfGhij', 'AbcDEfGhiJ', 'AbcDEfGHiJ', 'AbcDEfGHij', 'AbcDEfGHIj', 'AbcDEfGHIJ', 'AbcDefGHIJ', 'AbcDefGHIj', 'AbcDefGHij', 'AbcDefGHiJ', 'AbcDefGhiJ', 'AbcDefGhij', 'AbcDefGhIj', 'AbcDefGhIJ', 'AbcDefghIJ', 'AbcDefghIj', 'AbcDefghij', 'AbcDefghiJ', 'AbcDefgHiJ', 'AbcDefgHij', 'AbcDefgHIj', 'AbcDefgHIJ', 'AbcDeFgHIJ', 'AbcDeFgHIj', 'AbcDeFgHij', 'AbcDeFgHiJ', 'AbcDeFghiJ', 'AbcDeFghij', 'AbcDeFghIj', 'AbcDeFghIJ', 'AbcDeFGhIJ', 'AbcDeFGhIj', 'AbcDeFGhij', 'AbcDeFGhiJ', 'AbcDeFGHiJ', 'AbcDeFGHij', 'AbcDeFGHIj', 'AbcDeFGHIJ', 'AbcdeFGHIJ', 'AbcdeFGHIj', 'AbcdeFGHij', 'AbcdeFGHiJ', 'AbcdeFGhiJ', 'AbcdeFGhij', 'AbcdeFGhIj', 'AbcdeFGhIJ', 'AbcdeFghIJ', 'AbcdeFghIj', 'AbcdeFghij', 'AbcdeFghiJ', 'AbcdeFgHiJ', 'AbcdeFgHij', 'AbcdeFgHIj', 'AbcdeFgHIJ', 'AbcdefgHIJ', 'AbcdefgHIj', 'AbcdefgHij', 'AbcdefgHiJ', 'AbcdefghiJ', 'Abcdefghij', 'AbcdefghIj', 'AbcdefghIJ', 'AbcdefGhIJ', 'AbcdefGhIj', 'AbcdefGhij', 'AbcdefGhiJ', 'AbcdefGHiJ', 'AbcdefGHij', 'AbcdefGHIj', 'AbcdefGHIJ', 'AbcdEfGHIJ', 'AbcdEfGHIj', 'AbcdEfGHij', 'AbcdEfGHiJ', 'AbcdEfGhiJ', 'AbcdEfGhij', 'AbcdEfGhIj', 'AbcdEfGhIJ', 'AbcdEfghIJ', 'AbcdEfghIj', 'AbcdEfghij', 'AbcdEfghiJ', 'AbcdEfgHiJ', 'AbcdEfgHij', 'AbcdEfgHIj', 'AbcdEfgHIJ', 'AbcdEFgHIJ', 'AbcdEFgHIj', 'AbcdEFgHij', 'AbcdEFgHiJ', 'AbcdEFghiJ', 'AbcdEFghij', 'AbcdEFghIj', 'AbcdEFghIJ', 'AbcdEFGhIJ', 'AbcdEFGhIj', 'AbcdEFGhij', 'AbcdEFGhiJ', 'AbcdEFGHiJ', 'AbcdEFGHij', 'AbcdEFGHIj', 'AbcdEFGHIJ', 'AbCdEFGHIJ', 'AbCdEFGHIj', 'AbCdEFGHij', 'AbCdEFGHiJ', 'AbCdEFGhiJ', 'AbCdEFGhij', 'AbCdEFGhIj', 'AbCdEFGhIJ', 'AbCdEFghIJ', 'AbCdEFghIj', 'AbCdEFghij', 'AbCdEFghiJ', 'AbCdEFgHiJ', 'AbCdEFgHij', 'AbCdEFgHIj', 'AbCdEFgHIJ', 'AbCdEfgHIJ', 'AbCdEfgHIj', 'AbCdEfgHij', 'AbCdEfgHiJ', 'AbCdEfghiJ', 'AbCdEfghij', 'AbCdEfghIj', 'AbCdEfghIJ', 'AbCdEfGhIJ', 'AbCdEfGhIj', 'AbCdEfGhij', 'AbCdEfGhiJ', 'AbCdEfGHiJ', 'AbCdEfGHij', 'AbCdEfGHIj', 'AbCdEfGHIJ', 'AbCdefGHIJ', 'AbCdefGHIj', 'AbCdefGHij', 'AbCdefGHiJ', 'AbCdefGhiJ', 'AbCdefGhij', 'AbCdefGhIj', 'AbCdefGhIJ', 'AbCdefghIJ', 'AbCdefghIj', 'AbCdefghij', 'AbCdefghiJ', 'AbCdefgHiJ', 'AbCdefgHij', 'AbCdefgHIj', 'AbCdefgHIJ', 'AbCdeFgHIJ', 'AbCdeFgHIj', 'AbCdeFgHij', 'AbCdeFgHiJ', 'AbCdeFghiJ', 'AbCdeFghij', 'AbCdeFghIj', 'AbCdeFghIJ', 'AbCdeFGhIJ', 'AbCdeFGhIj', 'AbCdeFGhij', 'AbCdeFGhiJ', 'AbCdeFGHiJ', 'AbCdeFGHij', 'AbCdeFGHIj', 'AbCdeFGHIJ', 'AbCDeFGHIJ', 'AbCDeFGHIj', 'AbCDeFGHij', 'AbCDeFGHiJ', 'AbCDeFGhiJ', 'AbCDeFGhij', 'AbCDeFGhIj', 'AbCDeFGhIJ', 'AbCDeFghIJ', 'AbCDeFghIj', 'AbCDeFghij', 'AbCDeFghiJ', 'AbCDeFgHiJ', 'AbCDeFgHij', 'AbCDeFgHIj', 'AbCDeFgHIJ', 'AbCDefgHIJ', 'AbCDefgHIj', 'AbCDefgHij', 'AbCDefgHiJ', 'AbCDefghiJ', 'AbCDefghij', 'AbCDefghIj', 'AbCDefghIJ', 'AbCDefGhIJ', 'AbCDefGhIj', 'AbCDefGhij', 'AbCDefGhiJ', 'AbCDefGHiJ', 'AbCDefGHij', 'AbCDefGHIj', 'AbCDefGHIJ', 'AbCDEfGHIJ', 'AbCDEfGHIj', 'AbCDEfGHij', 'AbCDEfGHiJ', 'AbCDEfGhiJ', 'AbCDEfGhij', 'AbCDEfGhIj', 'AbCDEfGhIJ', 'AbCDEfghIJ', 'AbCDEfghIj', 'AbCDEfghij', 'AbCDEfghiJ', 'AbCDEfgHiJ', 'AbCDEfgHij', 'AbCDEfgHIj', 'AbCDEfgHIJ', 'AbCDEFgHIJ', 'AbCDEFgHIj', 'AbCDEFgHij', 'AbCDEFgHiJ', 'AbCDEFghiJ', 'AbCDEFghij', 'AbCDEFghIj', 'AbCDEFghIJ', 'AbCDEFGhIJ', 'AbCDEFGhIj', 'AbCDEFGhij', 'AbCDEFGhiJ', 'AbCDEFGHiJ', 'AbCDEFGHij', 'AbCDEFGHIj', 'AbCDEFGHIJ', 'abCDEFGHIJ', 'abCDEFGHIj', 'abCDEFGHij', 'abCDEFGHiJ', 'abCDEFGhiJ', 'abCDEFGhij', 'abCDEFGhIj', 'abCDEFGhIJ', 'abCDEFghIJ', 'abCDEFghIj', 'abCDEFghij', 'abCDEFghiJ', 'abCDEFgHiJ', 'abCDEFgHij', 'abCDEFgHIj', 'abCDEFgHIJ', 'abCDEfgHIJ', 'abCDEfgHIj', 'abCDEfgHij', 'abCDEfgHiJ', 'abCDEfghiJ', 'abCDEfghij', 'abCDEfghIj', 'abCDEfghIJ', 'abCDEfGhIJ', 'abCDEfGhIj', 'abCDEfGhij', 'abCDEfGhiJ', 'abCDEfGHiJ', 'abCDEfGHij', 'abCDEfGHIj', 'abCDEfGHIJ', 'abCDefGHIJ', 'abCDefGHIj', 'abCDefGHij', 'abCDefGHiJ', 'abCDefGhiJ', 'abCDefGhij', 'abCDefGhIj', 'abCDefGhIJ', 'abCDefghIJ', 'abCDefghIj', 'abCDefghij', 'abCDefghiJ', 'abCDefgHiJ', 'abCDefgHij', 'abCDefgHIj', 'abCDefgHIJ', 'abCDeFgHIJ', 'abCDeFgHIj', 'abCDeFgHij', 'abCDeFgHiJ', 'abCDeFghiJ', 'abCDeFghij', 'abCDeFghIj', 'abCDeFghIJ', 'abCDeFGhIJ', 'abCDeFGhIj', 'abCDeFGhij', 'abCDeFGhiJ', 'abCDeFGHiJ', 'abCDeFGHij', 'abCDeFGHIj', 'abCDeFGHIJ', 'abCdeFGHIJ', 'abCdeFGHIj', 'abCdeFGHij', 'abCdeFGHiJ', 'abCdeFGhiJ', 'abCdeFGhij', 'abCdeFGhIj', 'abCdeFGhIJ', 'abCdeFghIJ', 'abCdeFghIj', 'abCdeFghij', 'abCdeFghiJ', 'abCdeFgHiJ', 'abCdeFgHij', 'abCdeFgHIj', 'abCdeFgHIJ', 'abCdefgHIJ', 'abCdefgHIj', 'abCdefgHij', 'abCdefgHiJ', 'abCdefghiJ', 'abCdefghij', 'abCdefghIj', 'abCdefghIJ', 'abCdefGhIJ', 'abCdefGhIj', 'abCdefGhij', 'abCdefGhiJ', 'abCdefGHiJ', 'abCdefGHij', 'abCdefGHIj', 'abCdefGHIJ', 'abCdEfGHIJ', 'abCdEfGHIj', 'abCdEfGHij', 'abCdEfGHiJ', 'abCdEfGhiJ', 'abCdEfGhij', 'abCdEfGhIj', 'abCdEfGhIJ', 'abCdEfghIJ', 'abCdEfghIj', 'abCdEfghij', 'abCdEfghiJ', 'abCdEfgHiJ', 'abCdEfgHij', 'abCdEfgHIj', 'abCdEfgHIJ', 'abCdEFgHIJ', 'abCdEFgHIj', 'abCdEFgHij', 'abCdEFgHiJ', 'abCdEFghiJ', 'abCdEFghij', 'abCdEFghIj', 'abCdEFghIJ', 'abCdEFGhIJ', 'abCdEFGhIj', 'abCdEFGhij', 'abCdEFGhiJ', 'abCdEFGHiJ', 'abCdEFGHij', 'abCdEFGHIj', 'abCdEFGHIJ', 'abcdEFGHIJ', 'abcdEFGHIj', 'abcdEFGHij', 'abcdEFGHiJ', 'abcdEFGhiJ', 'abcdEFGhij', 'abcdEFGhIj', 'abcdEFGhIJ', 'abcdEFghIJ', 'abcdEFghIj', 'abcdEFghij', 'abcdEFghiJ', 'abcdEFgHiJ', 'abcdEFgHij', 'abcdEFgHIj', 'abcdEFgHIJ', 'abcdEfgHIJ', 'abcdEfgHIj', 'abcdEfgHij', 'abcdEfgHiJ', 'abcdEfghiJ', 'abcdEfghij', 'abcdEfghIj', 'abcdEfghIJ', 'abcdEfGhIJ', 'abcdEfGhIj', 'abcdEfGhij', 'abcdEfGhiJ', 'abcdEfGHiJ', 'abcdEfGHij', 'abcdEfGHIj', 'abcdEfGHIJ', 'abcdefGHIJ', 'abcdefGHIj', 'abcdefGHij', 'abcdefGHiJ', 'abcdefGhiJ', 'abcdefGhij', 'abcdefGhIj', 'abcdefGhIJ', 'abcdefghIJ', 'abcdefghIj', 'abcdefghij', 'abcdefghiJ', 'abcdefgHiJ', 'abcdefgHij', 'abcdefgHIj', 'abcdefgHIJ', 'abcdeFgHIJ', 'abcdeFgHIj', 'abcdeFgHij', 'abcdeFgHiJ', 'abcdeFghiJ', 'abcdeFghij', 'abcdeFghIj', 'abcdeFghIJ', 'abcdeFGhIJ', 'abcdeFGhIj', 'abcdeFGhij', 'abcdeFGhiJ', 'abcdeFGHiJ', 'abcdeFGHij', 'abcdeFGHIj', 'abcdeFGHIJ', 'abcDeFGHIJ', 'abcDeFGHIj', 'abcDeFGHij', 'abcDeFGHiJ', 'abcDeFGhiJ', 'abcDeFGhij', 'abcDeFGhIj', 'abcDeFGhIJ', 'abcDeFghIJ', 'abcDeFghIj', 'abcDeFghij', 'abcDeFghiJ', 'abcDeFgHiJ', 'abcDeFgHij', 'abcDeFgHIj', 'abcDeFgHIJ', 'abcDefgHIJ', 'abcDefgHIj', 'abcDefgHij', 'abcDefgHiJ', 'abcDefghiJ', 'abcDefghij', 'abcDefghIj', 'abcDefghIJ', 'abcDefGhIJ', 'abcDefGhIj', 'abcDefGhij', 'abcDefGhiJ', 'abcDefGHiJ', 'abcDefGHij', 'abcDefGHIj', 'abcDefGHIJ', 'abcDEfGHIJ', 'abcDEfGHIj', 'abcDEfGHij', 'abcDEfGHiJ', 'abcDEfGhiJ', 'abcDEfGhij', 'abcDEfGhIj', 'abcDEfGhIJ', 'abcDEfghIJ', 'abcDEfghIj', 'abcDEfghij', 'abcDEfghiJ', 'abcDEfgHiJ', 'abcDEfgHij', 'abcDEfgHIj', 'abcDEfgHIJ', 'abcDEFgHIJ', 'abcDEFgHIj', 'abcDEFgHij', 'abcDEFgHiJ', 'abcDEFghiJ', 'abcDEFghij', 'abcDEFghIj', 'abcDEFghIJ', 'abcDEFGhIJ', 'abcDEFGhIj', 'abcDEFGhij', 'abcDEFGhiJ', 'abcDEFGHiJ', 'abcDEFGHij', 'abcDEFGHIj', 'abcDEFGHIJ', 'aBcDEFGHIJ', 'aBcDEFGHIj', 'aBcDEFGHij', 'aBcDEFGHiJ', 'aBcDEFGhiJ', 'aBcDEFGhij', 'aBcDEFGhIj', 'aBcDEFGhIJ', 'aBcDEFghIJ', 'aBcDEFghIj', 'aBcDEFghij', 'aBcDEFghiJ', 'aBcDEFgHiJ', 'aBcDEFgHij', 'aBcDEFgHIj', 'aBcDEFgHIJ', 'aBcDEfgHIJ', 'aBcDEfgHIj', 'aBcDEfgHij', 'aBcDEfgHiJ', 'aBcDEfghiJ', 'aBcDEfghij', 'aBcDEfghIj', 'aBcDEfghIJ', 'aBcDEfGhIJ', 'aBcDEfGhIj', 'aBcDEfGhij', 'aBcDEfGhiJ', 'aBcDEfGHiJ', 'aBcDEfGHij', 'aBcDEfGHIj', 'aBcDEfGHIJ', 'aBcDefGHIJ', 'aBcDefGHIj', 'aBcDefGHij', 'aBcDefGHiJ', 'aBcDefGhiJ', 'aBcDefGhij', 'aBcDefGhIj', 'aBcDefGhIJ', 'aBcDefghIJ', 'aBcDefghIj', 'aBcDefghij', 'aBcDefghiJ', 'aBcDefgHiJ', 'aBcDefgHij', 'aBcDefgHIj', 'aBcDefgHIJ', 'aBcDeFgHIJ', 'aBcDeFgHIj', 'aBcDeFgHij', 'aBcDeFgHiJ', 'aBcDeFghiJ', 'aBcDeFghij', 'aBcDeFghIj', 'aBcDeFghIJ', 'aBcDeFGhIJ', 'aBcDeFGhIj', 'aBcDeFGhij', 'aBcDeFGhiJ', 'aBcDeFGHiJ', 'aBcDeFGHij', 'aBcDeFGHIj', 'aBcDeFGHIJ', 'aBcdeFGHIJ', 'aBcdeFGHIj', 'aBcdeFGHij', 'aBcdeFGHiJ', 'aBcdeFGhiJ', 'aBcdeFGhij', 'aBcdeFGhIj', 'aBcdeFGhIJ', 'aBcdeFghIJ', 'aBcdeFghIj', 'aBcdeFghij', 'aBcdeFghiJ', 'aBcdeFgHiJ', 'aBcdeFgHij', 'aBcdeFgHIj', 'aBcdeFgHIJ', 'aBcdefgHIJ', 'aBcdefgHIj', 'aBcdefgHij', 'aBcdefgHiJ', 'aBcdefghiJ', 'aBcdefghij', 'aBcdefghIj', 'aBcdefghIJ', 'aBcdefGhIJ', 'aBcdefGhIj', 'aBcdefGhij', 'aBcdefGhiJ', 'aBcdefGHiJ', 'aBcdefGHij', 'aBcdefGHIj', 'aBcdefGHIJ', 'aBcdEfGHIJ', 'aBcdEfGHIj', 'aBcdEfGHij', 'aBcdEfGHiJ', 'aBcdEfGhiJ', 'aBcdEfGhij', 'aBcdEfGhIj', 'aBcdEfGhIJ', 'aBcdEfghIJ', 'aBcdEfghIj', 'aBcdEfghij', 'aBcdEfghiJ', 'aBcdEfgHiJ', 'aBcdEfgHij', 'aBcdEfgHIj', 'aBcdEfgHIJ', 'aBcdEFgHIJ', 'aBcdEFgHIj', 'aBcdEFgHij', 'aBcdEFgHiJ', 'aBcdEFghiJ', 'aBcdEFghij', 'aBcdEFghIj', 'aBcdEFghIJ', 'aBcdEFGhIJ', 'aBcdEFGhIj', 'aBcdEFGhij', 'aBcdEFGhiJ', 'aBcdEFGHiJ', 'aBcdEFGHij', 'aBcdEFGHIj', 'aBcdEFGHIJ', 'aBCdEFGHIJ', 'aBCdEFGHIj', 'aBCdEFGHij', 'aBCdEFGHiJ', 'aBCdEFGhiJ', 'aBCdEFGhij', 'aBCdEFGhIj', 'aBCdEFGhIJ', 'aBCdEFghIJ', 'aBCdEFghIj', 'aBCdEFghij', 'aBCdEFghiJ', 'aBCdEFgHiJ', 'aBCdEFgHij', 'aBCdEFgHIj', 'aBCdEFgHIJ', 'aBCdEfgHIJ', 'aBCdEfgHIj', 'aBCdEfgHij', 'aBCdEfgHiJ', 'aBCdEfghiJ', 'aBCdEfghij', 'aBCdEfghIj', 'aBCdEfghIJ', 'aBCdEfGhIJ', 'aBCdEfGhIj', 'aBCdEfGhij', 'aBCdEfGhiJ', 'aBCdEfGHiJ', 'aBCdEfGHij', 'aBCdEfGHIj', 'aBCdEfGHIJ', 'aBCdefGHIJ', 'aBCdefGHIj', 'aBCdefGHij', 'aBCdefGHiJ', 'aBCdefGhiJ', 'aBCdefGhij', 'aBCdefGhIj', 'aBCdefGhIJ', 'aBCdefghIJ', 'aBCdefghIj', 'aBCdefghij', 'aBCdefghiJ', 'aBCdefgHiJ', 'aBCdefgHij', 'aBCdefgHIj', 'aBCdefgHIJ', 'aBCdeFgHIJ', 'aBCdeFgHIj', 'aBCdeFgHij', 'aBCdeFgHiJ', 'aBCdeFghiJ', 'aBCdeFghij', 'aBCdeFghIj', 'aBCdeFghIJ', 'aBCdeFGhIJ', 'aBCdeFGhIj', 'aBCdeFGhij', 'aBCdeFGhiJ', 'aBCdeFGHiJ', 'aBCdeFGHij', 'aBCdeFGHIj', 'aBCdeFGHIJ', 'aBCDeFGHIJ', 'aBCDeFGHIj', 'aBCDeFGHij', 'aBCDeFGHiJ', 'aBCDeFGhiJ', 'aBCDeFGhij', 'aBCDeFGhIj', 'aBCDeFGhIJ', 'aBCDeFghIJ', 'aBCDeFghIj', 'aBCDeFghij', 'aBCDeFghiJ', 'aBCDeFgHiJ', 'aBCDeFgHij', 'aBCDeFgHIj', 'aBCDeFgHIJ', 'aBCDefgHIJ', 'aBCDefgHIj', 'aBCDefgHij', 'aBCDefgHiJ', 'aBCDefghiJ', 'aBCDefghij', 'aBCDefghIj', 'aBCDefghIJ', 'aBCDefGhIJ', 'aBCDefGhIj', 'aBCDefGhij', 'aBCDefGhiJ', 'aBCDefGHiJ', 'aBCDefGHij', 'aBCDefGHIj', 'aBCDefGHIJ', 'aBCDEfGHIJ', 'aBCDEfGHIj', 'aBCDEfGHij', 'aBCDEfGHiJ', 'aBCDEfGhiJ', 'aBCDEfGhij', 'aBCDEfGhIj', 'aBCDEfGhIJ', 'aBCDEfghIJ', 'aBCDEfghIj', 'aBCDEfghij', 'aBCDEfghiJ', 'aBCDEfgHiJ', 'aBCDEfgHij', 'aBCDEfgHIj', 'aBCDEfgHIJ', 'aBCDEFgHIJ', 'aBCDEFgHIj', 'aBCDEFgHij', 'aBCDEFgHiJ', 'aBCDEFghiJ', 'aBCDEFghij', 'aBCDEFghIj', 'aBCDEFghIJ', 'aBCDEFGhIJ', 'aBCDEFGhIj', 'aBCDEFGhij', 'aBCDEFGhiJ', 'aBCDEFGHiJ', 'aBCDEFGHij', 'aBCDEFGHIj', 'aBCDEFGHIJ'])\n assert answers_match(candidate(s='123aB4cD'), ['123aB4cD', '123aB4cd', '123aB4Cd', '123aB4CD', '123ab4CD', '123ab4Cd', '123ab4cd', '123ab4cD', '123Ab4cD', '123Ab4cd', '123Ab4Cd', '123Ab4CD', '123AB4CD', '123AB4Cd', '123AB4cd', '123AB4cD'])\n assert answers_match(candidate(s='abc123ABC'), ['abc123ABC', 'abc123ABc', 'abc123Abc', 'abc123AbC', 'abc123abC', 'abc123abc', 'abc123aBc', 'abc123aBC', 'abC123aBC', 'abC123aBc', 'abC123abc', 'abC123abC', 'abC123AbC', 'abC123Abc', 'abC123ABc', 'abC123ABC', 'aBC123ABC', 'aBC123ABc', 'aBC123Abc', 'aBC123AbC', 'aBC123abC', 'aBC123abc', 'aBC123aBc', 'aBC123aBC', 'aBc123aBC', 'aBc123aBc', 'aBc123abc', 'aBc123abC', 'aBc123AbC', 'aBc123Abc', 'aBc123ABc', 'aBc123ABC', 'ABc123ABC', 'ABc123ABc', 'ABc123Abc', 'ABc123AbC', 'ABc123abC', 'ABc123abc', 'ABc123aBc', 'ABc123aBC', 'ABC123aBC', 'ABC123aBc', 'ABC123abc', 'ABC123abC', 'ABC123AbC', 'ABC123Abc', 'ABC123ABc', 'ABC123ABC', 'AbC123ABC', 'AbC123ABc', 'AbC123Abc', 'AbC123AbC', 'AbC123abC', 'AbC123abc', 'AbC123aBc', 'AbC123aBC', 'Abc123aBC', 'Abc123aBc', 'Abc123abc', 'Abc123abC', 'Abc123AbC', 'Abc123Abc', 'Abc123ABc', 'Abc123ABC'])\n assert answers_match(candidate(s='123ABCdef'), ['123ABCdef', '123ABCdeF', '123ABCdEF', '123ABCdEf', '123ABCDEf', '123ABCDEF', '123ABCDeF', '123ABCDef', '123ABcDef', '123ABcDeF', '123ABcDEF', '123ABcDEf', '123ABcdEf', '123ABcdEF', '123ABcdeF', '123ABcdef', '123Abcdef', '123AbcdeF', '123AbcdEF', '123AbcdEf', '123AbcDEf', '123AbcDEF', '123AbcDeF', '123AbcDef', '123AbCDef', '123AbCDeF', '123AbCDEF', '123AbCDEf', '123AbCdEf', '123AbCdEF', '123AbCdeF', '123AbCdef', '123abCdef', '123abCdeF', '123abCdEF', '123abCdEf', '123abCDEf', '123abCDEF', '123abCDeF', '123abCDef', '123abcDef', '123abcDeF', '123abcDEF', '123abcDEf', '123abcdEf', '123abcdEF', '123abcdeF', '123abcdef', '123aBcdef', '123aBcdeF', '123aBcdEF', '123aBcdEf', '123aBcDEf', '123aBcDEF', '123aBcDeF', '123aBcDef', '123aBCDef', '123aBCDeF', '123aBCDEF', '123aBCDEf', '123aBCdEf', '123aBCdEF', '123aBCdeF', '123aBCdef'])\n assert answers_match(candidate(s='12a3b4c5d'), ['12a3b4c5d', '12a3b4c5D', '12a3b4C5D', '12a3b4C5d', '12a3B4C5d', '12a3B4C5D', '12a3B4c5D', '12a3B4c5d', '12A3B4c5d', '12A3B4c5D', '12A3B4C5D', '12A3B4C5d', '12A3b4C5d', '12A3b4C5D', '12A3b4c5D', '12A3b4c5d'])\n assert answers_match(candidate(s='abcd'), ['abcd', 'abcD', 'abCD', 'abCd', 'aBCd', 'aBCD', 'aBcD', 'aBcd', 'ABcd', 'ABcD', 'ABCD', 'ABCd', 'AbCd', 'AbCD', 'AbcD', 'Abcd'])\n assert answers_match(candidate(s='XyZ9'), ['XyZ9', 'Xyz9', 'XYz9', 'XYZ9', 'xYZ9', 'xYz9', 'xyz9', 'xyZ9'])\n assert answers_match(candidate(s='mNoPqRsT'), ['mNoPqRsT', 'mNoPqRst', 'mNoPqRSt', 'mNoPqRST', 'mNoPqrST', 'mNoPqrSt', 'mNoPqrst', 'mNoPqrsT', 'mNoPQrsT', 'mNoPQrst', 'mNoPQrSt', 'mNoPQrST', 'mNoPQRST', 'mNoPQRSt', 'mNoPQRst', 'mNoPQRsT', 'mNopQRsT', 'mNopQRst', 'mNopQRSt', 'mNopQRST', 'mNopQrST', 'mNopQrSt', 'mNopQrst', 'mNopQrsT', 'mNopqrsT', 'mNopqrst', 'mNopqrSt', 'mNopqrST', 'mNopqRST', 'mNopqRSt', 'mNopqRst', 'mNopqRsT', 'mNOpqRsT', 'mNOpqRst', 'mNOpqRSt', 'mNOpqRST', 'mNOpqrST', 'mNOpqrSt', 'mNOpqrst', 'mNOpqrsT', 'mNOpQrsT', 'mNOpQrst', 'mNOpQrSt', 'mNOpQrST', 'mNOpQRST', 'mNOpQRSt', 'mNOpQRst', 'mNOpQRsT', 'mNOPQRsT', 'mNOPQRst', 'mNOPQRSt', 'mNOPQRST', 'mNOPQrST', 'mNOPQrSt', 'mNOPQrst', 'mNOPQrsT', 'mNOPqrsT', 'mNOPqrst', 'mNOPqrSt', 'mNOPqrST', 'mNOPqRST', 'mNOPqRSt', 'mNOPqRst', 'mNOPqRsT', 'mnOPqRsT', 'mnOPqRst', 'mnOPqRSt', 'mnOPqRST', 'mnOPqrST', 'mnOPqrSt', 'mnOPqrst', 'mnOPqrsT', 'mnOPQrsT', 'mnOPQrst', 'mnOPQrSt', 'mnOPQrST', 'mnOPQRST', 'mnOPQRSt', 'mnOPQRst', 'mnOPQRsT', 'mnOpQRsT', 'mnOpQRst', 'mnOpQRSt', 'mnOpQRST', 'mnOpQrST', 'mnOpQrSt', 'mnOpQrst', 'mnOpQrsT', 'mnOpqrsT', 'mnOpqrst', 'mnOpqrSt', 'mnOpqrST', 'mnOpqRST', 'mnOpqRSt', 'mnOpqRst', 'mnOpqRsT', 'mnopqRsT', 'mnopqRst', 'mnopqRSt', 'mnopqRST', 'mnopqrST', 'mnopqrSt', 'mnopqrst', 'mnopqrsT', 'mnopQrsT', 'mnopQrst', 'mnopQrSt', 'mnopQrST', 'mnopQRST', 'mnopQRSt', 'mnopQRst', 'mnopQRsT', 'mnoPQRsT', 'mnoPQRst', 'mnoPQRSt', 'mnoPQRST', 'mnoPQrST', 'mnoPQrSt', 'mnoPQrst', 'mnoPQrsT', 'mnoPqrsT', 'mnoPqrst', 'mnoPqrSt', 'mnoPqrST', 'mnoPqRST', 'mnoPqRSt', 'mnoPqRst', 'mnoPqRsT', 'MnoPqRsT', 'MnoPqRst', 'MnoPqRSt', 'MnoPqRST', 'MnoPqrST', 'MnoPqrSt', 'MnoPqrst', 'MnoPqrsT', 'MnoPQrsT', 'MnoPQrst', 'MnoPQrSt', 'MnoPQrST', 'MnoPQRST', 'MnoPQRSt', 'MnoPQRst', 'MnoPQRsT', 'MnopQRsT', 'MnopQRst', 'MnopQRSt', 'MnopQRST', 'MnopQrST', 'MnopQrSt', 'MnopQrst', 'MnopQrsT', 'MnopqrsT', 'Mnopqrst', 'MnopqrSt', 'MnopqrST', 'MnopqRST', 'MnopqRSt', 'MnopqRst', 'MnopqRsT', 'MnOpqRsT', 'MnOpqRst', 'MnOpqRSt', 'MnOpqRST', 'MnOpqrST', 'MnOpqrSt', 'MnOpqrst', 'MnOpqrsT', 'MnOpQrsT', 'MnOpQrst', 'MnOpQrSt', 'MnOpQrST', 'MnOpQRST', 'MnOpQRSt', 'MnOpQRst', 'MnOpQRsT', 'MnOPQRsT', 'MnOPQRst', 'MnOPQRSt', 'MnOPQRST', 'MnOPQrST', 'MnOPQrSt', 'MnOPQrst', 'MnOPQrsT', 'MnOPqrsT', 'MnOPqrst', 'MnOPqrSt', 'MnOPqrST', 'MnOPqRST', 'MnOPqRSt', 'MnOPqRst', 'MnOPqRsT', 'MNOPqRsT', 'MNOPqRst', 'MNOPqRSt', 'MNOPqRST', 'MNOPqrST', 'MNOPqrSt', 'MNOPqrst', 'MNOPqrsT', 'MNOPQrsT', 'MNOPQrst', 'MNOPQrSt', 'MNOPQrST', 'MNOPQRST', 'MNOPQRSt', 'MNOPQRst', 'MNOPQRsT', 'MNOpQRsT', 'MNOpQRst', 'MNOpQRSt', 'MNOpQRST', 'MNOpQrST', 'MNOpQrSt', 'MNOpQrst', 'MNOpQrsT', 'MNOpqrsT', 'MNOpqrst', 'MNOpqrSt', 'MNOpqrST', 'MNOpqRST', 'MNOpqRSt', 'MNOpqRst', 'MNOpqRsT', 'MNopqRsT', 'MNopqRst', 'MNopqRSt', 'MNopqRST', 'MNopqrST', 'MNopqrSt', 'MNopqrst', 'MNopqrsT', 'MNopQrsT', 'MNopQrst', 'MNopQrSt', 'MNopQrST', 'MNopQRST', 'MNopQRSt', 'MNopQRst', 'MNopQRsT', 'MNoPQRsT', 'MNoPQRst', 'MNoPQRSt', 'MNoPQRST', 'MNoPQrST', 'MNoPQrSt', 'MNoPQrst', 'MNoPQrsT', 'MNoPqrsT', 'MNoPqrst', 'MNoPqrSt', 'MNoPqrST', 'MNoPqRST', 'MNoPqRSt', 'MNoPqRst', 'MNoPqRsT'])\n assert answers_match(candidate(s='aBcDeFgHiJ'), ['aBcDeFgHiJ', 'aBcDeFgHij', 'aBcDeFgHIj', 'aBcDeFgHIJ', 'aBcDeFghIJ', 'aBcDeFghIj', 'aBcDeFghij', 'aBcDeFghiJ', 'aBcDeFGhiJ', 'aBcDeFGhij', 'aBcDeFGhIj', 'aBcDeFGhIJ', 'aBcDeFGHIJ', 'aBcDeFGHIj', 'aBcDeFGHij', 'aBcDeFGHiJ', 'aBcDefGHiJ', 'aBcDefGHij', 'aBcDefGHIj', 'aBcDefGHIJ', 'aBcDefGhIJ', 'aBcDefGhIj', 'aBcDefGhij', 'aBcDefGhiJ', 'aBcDefghiJ', 'aBcDefghij', 'aBcDefghIj', 'aBcDefghIJ', 'aBcDefgHIJ', 'aBcDefgHIj', 'aBcDefgHij', 'aBcDefgHiJ', 'aBcDEfgHiJ', 'aBcDEfgHij', 'aBcDEfgHIj', 'aBcDEfgHIJ', 'aBcDEfghIJ', 'aBcDEfghIj', 'aBcDEfghij', 'aBcDEfghiJ', 'aBcDEfGhiJ', 'aBcDEfGhij', 'aBcDEfGhIj', 'aBcDEfGhIJ', 'aBcDEfGHIJ', 'aBcDEfGHIj', 'aBcDEfGHij', 'aBcDEfGHiJ', 'aBcDEFGHiJ', 'aBcDEFGHij', 'aBcDEFGHIj', 'aBcDEFGHIJ', 'aBcDEFGhIJ', 'aBcDEFGhIj', 'aBcDEFGhij', 'aBcDEFGhiJ', 'aBcDEFghiJ', 'aBcDEFghij', 'aBcDEFghIj', 'aBcDEFghIJ', 'aBcDEFgHIJ', 'aBcDEFgHIj', 'aBcDEFgHij', 'aBcDEFgHiJ', 'aBcdEFgHiJ', 'aBcdEFgHij', 'aBcdEFgHIj', 'aBcdEFgHIJ', 'aBcdEFghIJ', 'aBcdEFghIj', 'aBcdEFghij', 'aBcdEFghiJ', 'aBcdEFGhiJ', 'aBcdEFGhij', 'aBcdEFGhIj', 'aBcdEFGhIJ', 'aBcdEFGHIJ', 'aBcdEFGHIj', 'aBcdEFGHij', 'aBcdEFGHiJ', 'aBcdEfGHiJ', 'aBcdEfGHij', 'aBcdEfGHIj', 'aBcdEfGHIJ', 'aBcdEfGhIJ', 'aBcdEfGhIj', 'aBcdEfGhij', 'aBcdEfGhiJ', 'aBcdEfghiJ', 'aBcdEfghij', 'aBcdEfghIj', 'aBcdEfghIJ', 'aBcdEfgHIJ', 'aBcdEfgHIj', 'aBcdEfgHij', 'aBcdEfgHiJ', 'aBcdefgHiJ', 'aBcdefgHij', 'aBcdefgHIj', 'aBcdefgHIJ', 'aBcdefghIJ', 'aBcdefghIj', 'aBcdefghij', 'aBcdefghiJ', 'aBcdefGhiJ', 'aBcdefGhij', 'aBcdefGhIj', 'aBcdefGhIJ', 'aBcdefGHIJ', 'aBcdefGHIj', 'aBcdefGHij', 'aBcdefGHiJ', 'aBcdeFGHiJ', 'aBcdeFGHij', 'aBcdeFGHIj', 'aBcdeFGHIJ', 'aBcdeFGhIJ', 'aBcdeFGhIj', 'aBcdeFGhij', 'aBcdeFGhiJ', 'aBcdeFghiJ', 'aBcdeFghij', 'aBcdeFghIj', 'aBcdeFghIJ', 'aBcdeFgHIJ', 'aBcdeFgHIj', 'aBcdeFgHij', 'aBcdeFgHiJ', 'aBCdeFgHiJ', 'aBCdeFgHij', 'aBCdeFgHIj', 'aBCdeFgHIJ', 'aBCdeFghIJ', 'aBCdeFghIj', 'aBCdeFghij', 'aBCdeFghiJ', 'aBCdeFGhiJ', 'aBCdeFGhij', 'aBCdeFGhIj', 'aBCdeFGhIJ', 'aBCdeFGHIJ', 'aBCdeFGHIj', 'aBCdeFGHij', 'aBCdeFGHiJ', 'aBCdefGHiJ', 'aBCdefGHij', 'aBCdefGHIj', 'aBCdefGHIJ', 'aBCdefGhIJ', 'aBCdefGhIj', 'aBCdefGhij', 'aBCdefGhiJ', 'aBCdefghiJ', 'aBCdefghij', 'aBCdefghIj', 'aBCdefghIJ', 'aBCdefgHIJ', 'aBCdefgHIj', 'aBCdefgHij', 'aBCdefgHiJ', 'aBCdEfgHiJ', 'aBCdEfgHij', 'aBCdEfgHIj', 'aBCdEfgHIJ', 'aBCdEfghIJ', 'aBCdEfghIj', 'aBCdEfghij', 'aBCdEfghiJ', 'aBCdEfGhiJ', 'aBCdEfGhij', 'aBCdEfGhIj', 'aBCdEfGhIJ', 'aBCdEfGHIJ', 'aBCdEfGHIj', 'aBCdEfGHij', 'aBCdEfGHiJ', 'aBCdEFGHiJ', 'aBCdEFGHij', 'aBCdEFGHIj', 'aBCdEFGHIJ', 'aBCdEFGhIJ', 'aBCdEFGhIj', 'aBCdEFGhij', 'aBCdEFGhiJ', 'aBCdEFghiJ', 'aBCdEFghij', 'aBCdEFghIj', 'aBCdEFghIJ', 'aBCdEFgHIJ', 'aBCdEFgHIj', 'aBCdEFgHij', 'aBCdEFgHiJ', 'aBCDEFgHiJ', 'aBCDEFgHij', 'aBCDEFgHIj', 'aBCDEFgHIJ', 'aBCDEFghIJ', 'aBCDEFghIj', 'aBCDEFghij', 'aBCDEFghiJ', 'aBCDEFGhiJ', 'aBCDEFGhij', 'aBCDEFGhIj', 'aBCDEFGhIJ', 'aBCDEFGHIJ', 'aBCDEFGHIj', 'aBCDEFGHij', 'aBCDEFGHiJ', 'aBCDEfGHiJ', 'aBCDEfGHij', 'aBCDEfGHIj', 'aBCDEfGHIJ', 'aBCDEfGhIJ', 'aBCDEfGhIj', 'aBCDEfGhij', 'aBCDEfGhiJ', 'aBCDEfghiJ', 'aBCDEfghij', 'aBCDEfghIj', 'aBCDEfghIJ', 'aBCDEfgHIJ', 'aBCDEfgHIj', 'aBCDEfgHij', 'aBCDEfgHiJ', 'aBCDefgHiJ', 'aBCDefgHij', 'aBCDefgHIj', 'aBCDefgHIJ', 'aBCDefghIJ', 'aBCDefghIj', 'aBCDefghij', 'aBCDefghiJ', 'aBCDefGhiJ', 'aBCDefGhij', 'aBCDefGhIj', 'aBCDefGhIJ', 'aBCDefGHIJ', 'aBCDefGHIj', 'aBCDefGHij', 'aBCDefGHiJ', 'aBCDeFGHiJ', 'aBCDeFGHij', 'aBCDeFGHIj', 'aBCDeFGHIJ', 'aBCDeFGhIJ', 'aBCDeFGhIj', 'aBCDeFGhij', 'aBCDeFGhiJ', 'aBCDeFghiJ', 'aBCDeFghij', 'aBCDeFghIj', 'aBCDeFghIJ', 'aBCDeFgHIJ', 'aBCDeFgHIj', 'aBCDeFgHij', 'aBCDeFgHiJ', 'abCDeFgHiJ', 'abCDeFgHij', 'abCDeFgHIj', 'abCDeFgHIJ', 'abCDeFghIJ', 'abCDeFghIj', 'abCDeFghij', 'abCDeFghiJ', 'abCDeFGhiJ', 'abCDeFGhij', 'abCDeFGhIj', 'abCDeFGhIJ', 'abCDeFGHIJ', 'abCDeFGHIj', 'abCDeFGHij', 'abCDeFGHiJ', 'abCDefGHiJ', 'abCDefGHij', 'abCDefGHIj', 'abCDefGHIJ', 'abCDefGhIJ', 'abCDefGhIj', 'abCDefGhij', 'abCDefGhiJ', 'abCDefghiJ', 'abCDefghij', 'abCDefghIj', 'abCDefghIJ', 'abCDefgHIJ', 'abCDefgHIj', 'abCDefgHij', 'abCDefgHiJ', 'abCDEfgHiJ', 'abCDEfgHij', 'abCDEfgHIj', 'abCDEfgHIJ', 'abCDEfghIJ', 'abCDEfghIj', 'abCDEfghij', 'abCDEfghiJ', 'abCDEfGhiJ', 'abCDEfGhij', 'abCDEfGhIj', 'abCDEfGhIJ', 'abCDEfGHIJ', 'abCDEfGHIj', 'abCDEfGHij', 'abCDEfGHiJ', 'abCDEFGHiJ', 'abCDEFGHij', 'abCDEFGHIj', 'abCDEFGHIJ', 'abCDEFGhIJ', 'abCDEFGhIj', 'abCDEFGhij', 'abCDEFGhiJ', 'abCDEFghiJ', 'abCDEFghij', 'abCDEFghIj', 'abCDEFghIJ', 'abCDEFgHIJ', 'abCDEFgHIj', 'abCDEFgHij', 'abCDEFgHiJ', 'abCdEFgHiJ', 'abCdEFgHij', 'abCdEFgHIj', 'abCdEFgHIJ', 'abCdEFghIJ', 'abCdEFghIj', 'abCdEFghij', 'abCdEFghiJ', 'abCdEFGhiJ', 'abCdEFGhij', 'abCdEFGhIj', 'abCdEFGhIJ', 'abCdEFGHIJ', 'abCdEFGHIj', 'abCdEFGHij', 'abCdEFGHiJ', 'abCdEfGHiJ', 'abCdEfGHij', 'abCdEfGHIj', 'abCdEfGHIJ', 'abCdEfGhIJ', 'abCdEfGhIj', 'abCdEfGhij', 'abCdEfGhiJ', 'abCdEfghiJ', 'abCdEfghij', 'abCdEfghIj', 'abCdEfghIJ', 'abCdEfgHIJ', 'abCdEfgHIj', 'abCdEfgHij', 'abCdEfgHiJ', 'abCdefgHiJ', 'abCdefgHij', 'abCdefgHIj', 'abCdefgHIJ', 'abCdefghIJ', 'abCdefghIj', 'abCdefghij', 'abCdefghiJ', 'abCdefGhiJ', 'abCdefGhij', 'abCdefGhIj', 'abCdefGhIJ', 'abCdefGHIJ', 'abCdefGHIj', 'abCdefGHij', 'abCdefGHiJ', 'abCdeFGHiJ', 'abCdeFGHij', 'abCdeFGHIj', 'abCdeFGHIJ', 'abCdeFGhIJ', 'abCdeFGhIj', 'abCdeFGhij', 'abCdeFGhiJ', 'abCdeFghiJ', 'abCdeFghij', 'abCdeFghIj', 'abCdeFghIJ', 'abCdeFgHIJ', 'abCdeFgHIj', 'abCdeFgHij', 'abCdeFgHiJ', 'abcdeFgHiJ', 'abcdeFgHij', 'abcdeFgHIj', 'abcdeFgHIJ', 'abcdeFghIJ', 'abcdeFghIj', 'abcdeFghij', 'abcdeFghiJ', 'abcdeFGhiJ', 'abcdeFGhij', 'abcdeFGhIj', 'abcdeFGhIJ', 'abcdeFGHIJ', 'abcdeFGHIj', 'abcdeFGHij', 'abcdeFGHiJ', 'abcdefGHiJ', 'abcdefGHij', 'abcdefGHIj', 'abcdefGHIJ', 'abcdefGhIJ', 'abcdefGhIj', 'abcdefGhij', 'abcdefGhiJ', 'abcdefghiJ', 'abcdefghij', 'abcdefghIj', 'abcdefghIJ', 'abcdefgHIJ', 'abcdefgHIj', 'abcdefgHij', 'abcdefgHiJ', 'abcdEfgHiJ', 'abcdEfgHij', 'abcdEfgHIj', 'abcdEfgHIJ', 'abcdEfghIJ', 'abcdEfghIj', 'abcdEfghij', 'abcdEfghiJ', 'abcdEfGhiJ', 'abcdEfGhij', 'abcdEfGhIj', 'abcdEfGhIJ', 'abcdEfGHIJ', 'abcdEfGHIj', 'abcdEfGHij', 'abcdEfGHiJ', 'abcdEFGHiJ', 'abcdEFGHij', 'abcdEFGHIj', 'abcdEFGHIJ', 'abcdEFGhIJ', 'abcdEFGhIj', 'abcdEFGhij', 'abcdEFGhiJ', 'abcdEFghiJ', 'abcdEFghij', 'abcdEFghIj', 'abcdEFghIJ', 'abcdEFgHIJ', 'abcdEFgHIj', 'abcdEFgHij', 'abcdEFgHiJ', 'abcDEFgHiJ', 'abcDEFgHij', 'abcDEFgHIj', 'abcDEFgHIJ', 'abcDEFghIJ', 'abcDEFghIj', 'abcDEFghij', 'abcDEFghiJ', 'abcDEFGhiJ', 'abcDEFGhij', 'abcDEFGhIj', 'abcDEFGhIJ', 'abcDEFGHIJ', 'abcDEFGHIj', 'abcDEFGHij', 'abcDEFGHiJ', 'abcDEfGHiJ', 'abcDEfGHij', 'abcDEfGHIj', 'abcDEfGHIJ', 'abcDEfGhIJ', 'abcDEfGhIj', 'abcDEfGhij', 'abcDEfGhiJ', 'abcDEfghiJ', 'abcDEfghij', 'abcDEfghIj', 'abcDEfghIJ', 'abcDEfgHIJ', 'abcDEfgHIj', 'abcDEfgHij', 'abcDEfgHiJ', 'abcDefgHiJ', 'abcDefgHij', 'abcDefgHIj', 'abcDefgHIJ', 'abcDefghIJ', 'abcDefghIj', 'abcDefghij', 'abcDefghiJ', 'abcDefGhiJ', 'abcDefGhij', 'abcDefGhIj', 'abcDefGhIJ', 'abcDefGHIJ', 'abcDefGHIj', 'abcDefGHij', 'abcDefGHiJ', 'abcDeFGHiJ', 'abcDeFGHij', 'abcDeFGHIj', 'abcDeFGHIJ', 'abcDeFGhIJ', 'abcDeFGhIj', 'abcDeFGhij', 'abcDeFGhiJ', 'abcDeFghiJ', 'abcDeFghij', 'abcDeFghIj', 'abcDeFghIJ', 'abcDeFgHIJ', 'abcDeFgHIj', 'abcDeFgHij', 'abcDeFgHiJ', 'AbcDeFgHiJ', 'AbcDeFgHij', 'AbcDeFgHIj', 'AbcDeFgHIJ', 'AbcDeFghIJ', 'AbcDeFghIj', 'AbcDeFghij', 'AbcDeFghiJ', 'AbcDeFGhiJ', 'AbcDeFGhij', 'AbcDeFGhIj', 'AbcDeFGhIJ', 'AbcDeFGHIJ', 'AbcDeFGHIj', 'AbcDeFGHij', 'AbcDeFGHiJ', 'AbcDefGHiJ', 'AbcDefGHij', 'AbcDefGHIj', 'AbcDefGHIJ', 'AbcDefGhIJ', 'AbcDefGhIj', 'AbcDefGhij', 'AbcDefGhiJ', 'AbcDefghiJ', 'AbcDefghij', 'AbcDefghIj', 'AbcDefghIJ', 'AbcDefgHIJ', 'AbcDefgHIj', 'AbcDefgHij', 'AbcDefgHiJ', 'AbcDEfgHiJ', 'AbcDEfgHij', 'AbcDEfgHIj', 'AbcDEfgHIJ', 'AbcDEfghIJ', 'AbcDEfghIj', 'AbcDEfghij', 'AbcDEfghiJ', 'AbcDEfGhiJ', 'AbcDEfGhij', 'AbcDEfGhIj', 'AbcDEfGhIJ', 'AbcDEfGHIJ', 'AbcDEfGHIj', 'AbcDEfGHij', 'AbcDEfGHiJ', 'AbcDEFGHiJ', 'AbcDEFGHij', 'AbcDEFGHIj', 'AbcDEFGHIJ', 'AbcDEFGhIJ', 'AbcDEFGhIj', 'AbcDEFGhij', 'AbcDEFGhiJ', 'AbcDEFghiJ', 'AbcDEFghij', 'AbcDEFghIj', 'AbcDEFghIJ', 'AbcDEFgHIJ', 'AbcDEFgHIj', 'AbcDEFgHij', 'AbcDEFgHiJ', 'AbcdEFgHiJ', 'AbcdEFgHij', 'AbcdEFgHIj', 'AbcdEFgHIJ', 'AbcdEFghIJ', 'AbcdEFghIj', 'AbcdEFghij', 'AbcdEFghiJ', 'AbcdEFGhiJ', 'AbcdEFGhij', 'AbcdEFGhIj', 'AbcdEFGhIJ', 'AbcdEFGHIJ', 'AbcdEFGHIj', 'AbcdEFGHij', 'AbcdEFGHiJ', 'AbcdEfGHiJ', 'AbcdEfGHij', 'AbcdEfGHIj', 'AbcdEfGHIJ', 'AbcdEfGhIJ', 'AbcdEfGhIj', 'AbcdEfGhij', 'AbcdEfGhiJ', 'AbcdEfghiJ', 'AbcdEfghij', 'AbcdEfghIj', 'AbcdEfghIJ', 'AbcdEfgHIJ', 'AbcdEfgHIj', 'AbcdEfgHij', 'AbcdEfgHiJ', 'AbcdefgHiJ', 'AbcdefgHij', 'AbcdefgHIj', 'AbcdefgHIJ', 'AbcdefghIJ', 'AbcdefghIj', 'Abcdefghij', 'AbcdefghiJ', 'AbcdefGhiJ', 'AbcdefGhij', 'AbcdefGhIj', 'AbcdefGhIJ', 'AbcdefGHIJ', 'AbcdefGHIj', 'AbcdefGHij', 'AbcdefGHiJ', 'AbcdeFGHiJ', 'AbcdeFGHij', 'AbcdeFGHIj', 'AbcdeFGHIJ', 'AbcdeFGhIJ', 'AbcdeFGhIj', 'AbcdeFGhij', 'AbcdeFGhiJ', 'AbcdeFghiJ', 'AbcdeFghij', 'AbcdeFghIj', 'AbcdeFghIJ', 'AbcdeFgHIJ', 'AbcdeFgHIj', 'AbcdeFgHij', 'AbcdeFgHiJ', 'AbCdeFgHiJ', 'AbCdeFgHij', 'AbCdeFgHIj', 'AbCdeFgHIJ', 'AbCdeFghIJ', 'AbCdeFghIj', 'AbCdeFghij', 'AbCdeFghiJ', 'AbCdeFGhiJ', 'AbCdeFGhij', 'AbCdeFGhIj', 'AbCdeFGhIJ', 'AbCdeFGHIJ', 'AbCdeFGHIj', 'AbCdeFGHij', 'AbCdeFGHiJ', 'AbCdefGHiJ', 'AbCdefGHij', 'AbCdefGHIj', 'AbCdefGHIJ', 'AbCdefGhIJ', 'AbCdefGhIj', 'AbCdefGhij', 'AbCdefGhiJ', 'AbCdefghiJ', 'AbCdefghij', 'AbCdefghIj', 'AbCdefghIJ', 'AbCdefgHIJ', 'AbCdefgHIj', 'AbCdefgHij', 'AbCdefgHiJ', 'AbCdEfgHiJ', 'AbCdEfgHij', 'AbCdEfgHIj', 'AbCdEfgHIJ', 'AbCdEfghIJ', 'AbCdEfghIj', 'AbCdEfghij', 'AbCdEfghiJ', 'AbCdEfGhiJ', 'AbCdEfGhij', 'AbCdEfGhIj', 'AbCdEfGhIJ', 'AbCdEfGHIJ', 'AbCdEfGHIj', 'AbCdEfGHij', 'AbCdEfGHiJ', 'AbCdEFGHiJ', 'AbCdEFGHij', 'AbCdEFGHIj', 'AbCdEFGHIJ', 'AbCdEFGhIJ', 'AbCdEFGhIj', 'AbCdEFGhij', 'AbCdEFGhiJ', 'AbCdEFghiJ', 'AbCdEFghij', 'AbCdEFghIj', 'AbCdEFghIJ', 'AbCdEFgHIJ', 'AbCdEFgHIj', 'AbCdEFgHij', 'AbCdEFgHiJ', 'AbCDEFgHiJ', 'AbCDEFgHij', 'AbCDEFgHIj', 'AbCDEFgHIJ', 'AbCDEFghIJ', 'AbCDEFghIj', 'AbCDEFghij', 'AbCDEFghiJ', 'AbCDEFGhiJ', 'AbCDEFGhij', 'AbCDEFGhIj', 'AbCDEFGhIJ', 'AbCDEFGHIJ', 'AbCDEFGHIj', 'AbCDEFGHij', 'AbCDEFGHiJ', 'AbCDEfGHiJ', 'AbCDEfGHij', 'AbCDEfGHIj', 'AbCDEfGHIJ', 'AbCDEfGhIJ', 'AbCDEfGhIj', 'AbCDEfGhij', 'AbCDEfGhiJ', 'AbCDEfghiJ', 'AbCDEfghij', 'AbCDEfghIj', 'AbCDEfghIJ', 'AbCDEfgHIJ', 'AbCDEfgHIj', 'AbCDEfgHij', 'AbCDEfgHiJ', 'AbCDefgHiJ', 'AbCDefgHij', 'AbCDefgHIj', 'AbCDefgHIJ', 'AbCDefghIJ', 'AbCDefghIj', 'AbCDefghij', 'AbCDefghiJ', 'AbCDefGhiJ', 'AbCDefGhij', 'AbCDefGhIj', 'AbCDefGhIJ', 'AbCDefGHIJ', 'AbCDefGHIj', 'AbCDefGHij', 'AbCDefGHiJ', 'AbCDeFGHiJ', 'AbCDeFGHij', 'AbCDeFGHIj', 'AbCDeFGHIJ', 'AbCDeFGhIJ', 'AbCDeFGhIj', 'AbCDeFGhij', 'AbCDeFGhiJ', 'AbCDeFghiJ', 'AbCDeFghij', 'AbCDeFghIj', 'AbCDeFghIJ', 'AbCDeFgHIJ', 'AbCDeFgHIj', 'AbCDeFgHij', 'AbCDeFgHiJ', 'ABCDeFgHiJ', 'ABCDeFgHij', 'ABCDeFgHIj', 'ABCDeFgHIJ', 'ABCDeFghIJ', 'ABCDeFghIj', 'ABCDeFghij', 'ABCDeFghiJ', 'ABCDeFGhiJ', 'ABCDeFGhij', 'ABCDeFGhIj', 'ABCDeFGhIJ', 'ABCDeFGHIJ', 'ABCDeFGHIj', 'ABCDeFGHij', 'ABCDeFGHiJ', 'ABCDefGHiJ', 'ABCDefGHij', 'ABCDefGHIj', 'ABCDefGHIJ', 'ABCDefGhIJ', 'ABCDefGhIj', 'ABCDefGhij', 'ABCDefGhiJ', 'ABCDefghiJ', 'ABCDefghij', 'ABCDefghIj', 'ABCDefghIJ', 'ABCDefgHIJ', 'ABCDefgHIj', 'ABCDefgHij', 'ABCDefgHiJ', 'ABCDEfgHiJ', 'ABCDEfgHij', 'ABCDEfgHIj', 'ABCDEfgHIJ', 'ABCDEfghIJ', 'ABCDEfghIj', 'ABCDEfghij', 'ABCDEfghiJ', 'ABCDEfGhiJ', 'ABCDEfGhij', 'ABCDEfGhIj', 'ABCDEfGhIJ', 'ABCDEfGHIJ', 'ABCDEfGHIj', 'ABCDEfGHij', 'ABCDEfGHiJ', 'ABCDEFGHiJ', 'ABCDEFGHij', 'ABCDEFGHIj', 'ABCDEFGHIJ', 'ABCDEFGhIJ', 'ABCDEFGhIj', 'ABCDEFGhij', 'ABCDEFGhiJ', 'ABCDEFghiJ', 'ABCDEFghij', 'ABCDEFghIj', 'ABCDEFghIJ', 'ABCDEFgHIJ', 'ABCDEFgHIj', 'ABCDEFgHij', 'ABCDEFgHiJ', 'ABCdEFgHiJ', 'ABCdEFgHij', 'ABCdEFgHIj', 'ABCdEFgHIJ', 'ABCdEFghIJ', 'ABCdEFghIj', 'ABCdEFghij', 'ABCdEFghiJ', 'ABCdEFGhiJ', 'ABCdEFGhij', 'ABCdEFGhIj', 'ABCdEFGhIJ', 'ABCdEFGHIJ', 'ABCdEFGHIj', 'ABCdEFGHij', 'ABCdEFGHiJ', 'ABCdEfGHiJ', 'ABCdEfGHij', 'ABCdEfGHIj', 'ABCdEfGHIJ', 'ABCdEfGhIJ', 'ABCdEfGhIj', 'ABCdEfGhij', 'ABCdEfGhiJ', 'ABCdEfghiJ', 'ABCdEfghij', 'ABCdEfghIj', 'ABCdEfghIJ', 'ABCdEfgHIJ', 'ABCdEfgHIj', 'ABCdEfgHij', 'ABCdEfgHiJ', 'ABCdefgHiJ', 'ABCdefgHij', 'ABCdefgHIj', 'ABCdefgHIJ', 'ABCdefghIJ', 'ABCdefghIj', 'ABCdefghij', 'ABCdefghiJ', 'ABCdefGhiJ', 'ABCdefGhij', 'ABCdefGhIj', 'ABCdefGhIJ', 'ABCdefGHIJ', 'ABCdefGHIj', 'ABCdefGHij', 'ABCdefGHiJ', 'ABCdeFGHiJ', 'ABCdeFGHij', 'ABCdeFGHIj', 'ABCdeFGHIJ', 'ABCdeFGhIJ', 'ABCdeFGhIj', 'ABCdeFGhij', 'ABCdeFGhiJ', 'ABCdeFghiJ', 'ABCdeFghij', 'ABCdeFghIj', 'ABCdeFghIJ', 'ABCdeFgHIJ', 'ABCdeFgHIj', 'ABCdeFgHij', 'ABCdeFgHiJ', 'ABcdeFgHiJ', 'ABcdeFgHij', 'ABcdeFgHIj', 'ABcdeFgHIJ', 'ABcdeFghIJ', 'ABcdeFghIj', 'ABcdeFghij', 'ABcdeFghiJ', 'ABcdeFGhiJ', 'ABcdeFGhij', 'ABcdeFGhIj', 'ABcdeFGhIJ', 'ABcdeFGHIJ', 'ABcdeFGHIj', 'ABcdeFGHij', 'ABcdeFGHiJ', 'ABcdefGHiJ', 'ABcdefGHij', 'ABcdefGHIj', 'ABcdefGHIJ', 'ABcdefGhIJ', 'ABcdefGhIj', 'ABcdefGhij', 'ABcdefGhiJ', 'ABcdefghiJ', 'ABcdefghij', 'ABcdefghIj', 'ABcdefghIJ', 'ABcdefgHIJ', 'ABcdefgHIj', 'ABcdefgHij', 'ABcdefgHiJ', 'ABcdEfgHiJ', 'ABcdEfgHij', 'ABcdEfgHIj', 'ABcdEfgHIJ', 'ABcdEfghIJ', 'ABcdEfghIj', 'ABcdEfghij', 'ABcdEfghiJ', 'ABcdEfGhiJ', 'ABcdEfGhij', 'ABcdEfGhIj', 'ABcdEfGhIJ', 'ABcdEfGHIJ', 'ABcdEfGHIj', 'ABcdEfGHij', 'ABcdEfGHiJ', 'ABcdEFGHiJ', 'ABcdEFGHij', 'ABcdEFGHIj', 'ABcdEFGHIJ', 'ABcdEFGhIJ', 'ABcdEFGhIj', 'ABcdEFGhij', 'ABcdEFGhiJ', 'ABcdEFghiJ', 'ABcdEFghij', 'ABcdEFghIj', 'ABcdEFghIJ', 'ABcdEFgHIJ', 'ABcdEFgHIj', 'ABcdEFgHij', 'ABcdEFgHiJ', 'ABcDEFgHiJ', 'ABcDEFgHij', 'ABcDEFgHIj', 'ABcDEFgHIJ', 'ABcDEFghIJ', 'ABcDEFghIj', 'ABcDEFghij', 'ABcDEFghiJ', 'ABcDEFGhiJ', 'ABcDEFGhij', 'ABcDEFGhIj', 'ABcDEFGhIJ', 'ABcDEFGHIJ', 'ABcDEFGHIj', 'ABcDEFGHij', 'ABcDEFGHiJ', 'ABcDEfGHiJ', 'ABcDEfGHij', 'ABcDEfGHIj', 'ABcDEfGHIJ', 'ABcDEfGhIJ', 'ABcDEfGhIj', 'ABcDEfGhij', 'ABcDEfGhiJ', 'ABcDEfghiJ', 'ABcDEfghij', 'ABcDEfghIj', 'ABcDEfghIJ', 'ABcDEfgHIJ', 'ABcDEfgHIj', 'ABcDEfgHij', 'ABcDEfgHiJ', 'ABcDefgHiJ', 'ABcDefgHij', 'ABcDefgHIj', 'ABcDefgHIJ', 'ABcDefghIJ', 'ABcDefghIj', 'ABcDefghij', 'ABcDefghiJ', 'ABcDefGhiJ', 'ABcDefGhij', 'ABcDefGhIj', 'ABcDefGhIJ', 'ABcDefGHIJ', 'ABcDefGHIj', 'ABcDefGHij', 'ABcDefGHiJ', 'ABcDeFGHiJ', 'ABcDeFGHij', 'ABcDeFGHIj', 'ABcDeFGHIJ', 'ABcDeFGhIJ', 'ABcDeFGhIj', 'ABcDeFGhij', 'ABcDeFGhiJ', 'ABcDeFghiJ', 'ABcDeFghij', 'ABcDeFghIj', 'ABcDeFghIJ', 'ABcDeFgHIJ', 'ABcDeFgHIj', 'ABcDeFgHij', 'ABcDeFgHiJ'])\n assert answers_match(candidate(s='aBcDeFgH'), ['aBcDeFgH', 'aBcDeFgh', 'aBcDeFGh', 'aBcDeFGH', 'aBcDefGH', 'aBcDefGh', 'aBcDefgh', 'aBcDefgH', 'aBcDEfgH', 'aBcDEfgh', 'aBcDEfGh', 'aBcDEfGH', 'aBcDEFGH', 'aBcDEFGh', 'aBcDEFgh', 'aBcDEFgH', 'aBcdEFgH', 'aBcdEFgh', 'aBcdEFGh', 'aBcdEFGH', 'aBcdEfGH', 'aBcdEfGh', 'aBcdEfgh', 'aBcdEfgH', 'aBcdefgH', 'aBcdefgh', 'aBcdefGh', 'aBcdefGH', 'aBcdeFGH', 'aBcdeFGh', 'aBcdeFgh', 'aBcdeFgH', 'aBCdeFgH', 'aBCdeFgh', 'aBCdeFGh', 'aBCdeFGH', 'aBCdefGH', 'aBCdefGh', 'aBCdefgh', 'aBCdefgH', 'aBCdEfgH', 'aBCdEfgh', 'aBCdEfGh', 'aBCdEfGH', 'aBCdEFGH', 'aBCdEFGh', 'aBCdEFgh', 'aBCdEFgH', 'aBCDEFgH', 'aBCDEFgh', 'aBCDEFGh', 'aBCDEFGH', 'aBCDEfGH', 'aBCDEfGh', 'aBCDEfgh', 'aBCDEfgH', 'aBCDefgH', 'aBCDefgh', 'aBCDefGh', 'aBCDefGH', 'aBCDeFGH', 'aBCDeFGh', 'aBCDeFgh', 'aBCDeFgH', 'abCDeFgH', 'abCDeFgh', 'abCDeFGh', 'abCDeFGH', 'abCDefGH', 'abCDefGh', 'abCDefgh', 'abCDefgH', 'abCDEfgH', 'abCDEfgh', 'abCDEfGh', 'abCDEfGH', 'abCDEFGH', 'abCDEFGh', 'abCDEFgh', 'abCDEFgH', 'abCdEFgH', 'abCdEFgh', 'abCdEFGh', 'abCdEFGH', 'abCdEfGH', 'abCdEfGh', 'abCdEfgh', 'abCdEfgH', 'abCdefgH', 'abCdefgh', 'abCdefGh', 'abCdefGH', 'abCdeFGH', 'abCdeFGh', 'abCdeFgh', 'abCdeFgH', 'abcdeFgH', 'abcdeFgh', 'abcdeFGh', 'abcdeFGH', 'abcdefGH', 'abcdefGh', 'abcdefgh', 'abcdefgH', 'abcdEfgH', 'abcdEfgh', 'abcdEfGh', 'abcdEfGH', 'abcdEFGH', 'abcdEFGh', 'abcdEFgh', 'abcdEFgH', 'abcDEFgH', 'abcDEFgh', 'abcDEFGh', 'abcDEFGH', 'abcDEfGH', 'abcDEfGh', 'abcDEfgh', 'abcDEfgH', 'abcDefgH', 'abcDefgh', 'abcDefGh', 'abcDefGH', 'abcDeFGH', 'abcDeFGh', 'abcDeFgh', 'abcDeFgH', 'AbcDeFgH', 'AbcDeFgh', 'AbcDeFGh', 'AbcDeFGH', 'AbcDefGH', 'AbcDefGh', 'AbcDefgh', 'AbcDefgH', 'AbcDEfgH', 'AbcDEfgh', 'AbcDEfGh', 'AbcDEfGH', 'AbcDEFGH', 'AbcDEFGh', 'AbcDEFgh', 'AbcDEFgH', 'AbcdEFgH', 'AbcdEFgh', 'AbcdEFGh', 'AbcdEFGH', 'AbcdEfGH', 'AbcdEfGh', 'AbcdEfgh', 'AbcdEfgH', 'AbcdefgH', 'Abcdefgh', 'AbcdefGh', 'AbcdefGH', 'AbcdeFGH', 'AbcdeFGh', 'AbcdeFgh', 'AbcdeFgH', 'AbCdeFgH', 'AbCdeFgh', 'AbCdeFGh', 'AbCdeFGH', 'AbCdefGH', 'AbCdefGh', 'AbCdefgh', 'AbCdefgH', 'AbCdEfgH', 'AbCdEfgh', 'AbCdEfGh', 'AbCdEfGH', 'AbCdEFGH', 'AbCdEFGh', 'AbCdEFgh', 'AbCdEFgH', 'AbCDEFgH', 'AbCDEFgh', 'AbCDEFGh', 'AbCDEFGH', 'AbCDEfGH', 'AbCDEfGh', 'AbCDEfgh', 'AbCDEfgH', 'AbCDefgH', 'AbCDefgh', 'AbCDefGh', 'AbCDefGH', 'AbCDeFGH', 'AbCDeFGh', 'AbCDeFgh', 'AbCDeFgH', 'ABCDeFgH', 'ABCDeFgh', 'ABCDeFGh', 'ABCDeFGH', 'ABCDefGH', 'ABCDefGh', 'ABCDefgh', 'ABCDefgH', 'ABCDEfgH', 'ABCDEfgh', 'ABCDEfGh', 'ABCDEfGH', 'ABCDEFGH', 'ABCDEFGh', 'ABCDEFgh', 'ABCDEFgH', 'ABCdEFgH', 'ABCdEFgh', 'ABCdEFGh', 'ABCdEFGH', 'ABCdEfGH', 'ABCdEfGh', 'ABCdEfgh', 'ABCdEfgH', 'ABCdefgH', 'ABCdefgh', 'ABCdefGh', 'ABCdefGH', 'ABCdeFGH', 'ABCdeFGh', 'ABCdeFgh', 'ABCdeFgH', 'ABcdeFgH', 'ABcdeFgh', 'ABcdeFGh', 'ABcdeFGH', 'ABcdefGH', 'ABcdefGh', 'ABcdefgh', 'ABcdefgH', 'ABcdEfgH', 'ABcdEfgh', 'ABcdEfGh', 'ABcdEfGH', 'ABcdEFGH', 'ABcdEFGh', 'ABcdEFgh', 'ABcdEFgH', 'ABcDEFgH', 'ABcDEFgh', 'ABcDEFGh', 'ABcDEFGH', 'ABcDEfGH', 'ABcDEfGh', 'ABcDEfgh', 'ABcDEfgH', 'ABcDefgH', 'ABcDefgh', 'ABcDefGh', 'ABcDefGH', 'ABcDeFGH', 'ABcDeFGh', 'ABcDeFgh', 'ABcDeFgH'])\n assert answers_match(candidate(s='mNoPQ'), ['mNoPQ', 'mNoPq', 'mNopq', 'mNopQ', 'mNOpQ', 'mNOpq', 'mNOPq', 'mNOPQ', 'mnOPQ', 'mnOPq', 'mnOpq', 'mnOpQ', 'mnopQ', 'mnopq', 'mnoPq', 'mnoPQ', 'MnoPQ', 'MnoPq', 'Mnopq', 'MnopQ', 'MnOpQ', 'MnOpq', 'MnOPq', 'MnOPQ', 'MNOPQ', 'MNOPq', 'MNOpq', 'MNOpQ', 'MNopQ', 'MNopq', 'MNoPq', 'MNoPQ'])\n assert answers_match(candidate(s='AbCd'), ['AbCd', 'AbCD', 'AbcD', 'Abcd', 'ABcd', 'ABcD', 'ABCD', 'ABCd', 'aBCd', 'aBCD', 'aBcD', 'aBcd', 'abcd', 'abcD', 'abCD', 'abCd'])\n assert answers_match(candidate(s='abcDEF123'), ['abcDEF123', 'abcDEf123', 'abcDef123', 'abcDeF123', 'abcdeF123', 'abcdef123', 'abcdEf123', 'abcdEF123', 'abCdEF123', 'abCdEf123', 'abCdef123', 'abCdeF123', 'abCDeF123', 'abCDef123', 'abCDEf123', 'abCDEF123', 'aBCDEF123', 'aBCDEf123', 'aBCDef123', 'aBCDeF123', 'aBCdeF123', 'aBCdef123', 'aBCdEf123', 'aBCdEF123', 'aBcdEF123', 'aBcdEf123', 'aBcdef123', 'aBcdeF123', 'aBcDeF123', 'aBcDef123', 'aBcDEf123', 'aBcDEF123', 'ABcDEF123', 'ABcDEf123', 'ABcDef123', 'ABcDeF123', 'ABcdeF123', 'ABcdef123', 'ABcdEf123', 'ABcdEF123', 'ABCdEF123', 'ABCdEf123', 'ABCdef123', 'ABCdeF123', 'ABCDeF123', 'ABCDef123', 'ABCDEf123', 'ABCDEF123', 'AbCDEF123', 'AbCDEf123', 'AbCDef123', 'AbCDeF123', 'AbCdeF123', 'AbCdef123', 'AbCdEf123', 'AbCdEF123', 'AbcdEF123', 'AbcdEf123', 'Abcdef123', 'AbcdeF123', 'AbcDeF123', 'AbcDef123', 'AbcDEf123', 'AbcDEF123'])\n assert answers_match(candidate(s='aAaAaAaA'), ['aAaAaAaA', 'aAaAaAaa', 'aAaAaAAa', 'aAaAaAAA', 'aAaAaaAA', 'aAaAaaAa', 'aAaAaaaa', 'aAaAaaaA', 'aAaAAaaA', 'aAaAAaaa', 'aAaAAaAa', 'aAaAAaAA', 'aAaAAAAA', 'aAaAAAAa', 'aAaAAAaa', 'aAaAAAaA', 'aAaaAAaA', 'aAaaAAaa', 'aAaaAAAa', 'aAaaAAAA', 'aAaaAaAA', 'aAaaAaAa', 'aAaaAaaa', 'aAaaAaaA', 'aAaaaaaA', 'aAaaaaaa', 'aAaaaaAa', 'aAaaaaAA', 'aAaaaAAA', 'aAaaaAAa', 'aAaaaAaa', 'aAaaaAaA', 'aAAaaAaA', 'aAAaaAaa', 'aAAaaAAa', 'aAAaaAAA', 'aAAaaaAA', 'aAAaaaAa', 'aAAaaaaa', 'aAAaaaaA', 'aAAaAaaA', 'aAAaAaaa', 'aAAaAaAa', 'aAAaAaAA', 'aAAaAAAA', 'aAAaAAAa', 'aAAaAAaa', 'aAAaAAaA', 'aAAAAAaA', 'aAAAAAaa', 'aAAAAAAa', 'aAAAAAAA', 'aAAAAaAA', 'aAAAAaAa', 'aAAAAaaa', 'aAAAAaaA', 'aAAAaaaA', 'aAAAaaaa', 'aAAAaaAa', 'aAAAaaAA', 'aAAAaAAA', 'aAAAaAAa', 'aAAAaAaa', 'aAAAaAaA', 'aaAAaAaA', 'aaAAaAaa', 'aaAAaAAa', 'aaAAaAAA', 'aaAAaaAA', 'aaAAaaAa', 'aaAAaaaa', 'aaAAaaaA', 'aaAAAaaA', 'aaAAAaaa', 'aaAAAaAa', 'aaAAAaAA', 'aaAAAAAA', 'aaAAAAAa', 'aaAAAAaa', 'aaAAAAaA', 'aaAaAAaA', 'aaAaAAaa', 'aaAaAAAa', 'aaAaAAAA', 'aaAaAaAA', 'aaAaAaAa', 'aaAaAaaa', 'aaAaAaaA', 'aaAaaaaA', 'aaAaaaaa', 'aaAaaaAa', 'aaAaaaAA', 'aaAaaAAA', 'aaAaaAAa', 'aaAaaAaa', 'aaAaaAaA', 'aaaaaAaA', 'aaaaaAaa', 'aaaaaAAa', 'aaaaaAAA', 'aaaaaaAA', 'aaaaaaAa', 'aaaaaaaa', 'aaaaaaaA', 'aaaaAaaA', 'aaaaAaaa', 'aaaaAaAa', 'aaaaAaAA', 'aaaaAAAA', 'aaaaAAAa', 'aaaaAAaa', 'aaaaAAaA', 'aaaAAAaA', 'aaaAAAaa', 'aaaAAAAa', 'aaaAAAAA', 'aaaAAaAA', 'aaaAAaAa', 'aaaAAaaa', 'aaaAAaaA', 'aaaAaaaA', 'aaaAaaaa', 'aaaAaaAa', 'aaaAaaAA', 'aaaAaAAA', 'aaaAaAAa', 'aaaAaAaa', 'aaaAaAaA', 'AaaAaAaA', 'AaaAaAaa', 'AaaAaAAa', 'AaaAaAAA', 'AaaAaaAA', 'AaaAaaAa', 'AaaAaaaa', 'AaaAaaaA', 'AaaAAaaA', 'AaaAAaaa', 'AaaAAaAa', 'AaaAAaAA', 'AaaAAAAA', 'AaaAAAAa', 'AaaAAAaa', 'AaaAAAaA', 'AaaaAAaA', 'AaaaAAaa', 'AaaaAAAa', 'AaaaAAAA', 'AaaaAaAA', 'AaaaAaAa', 'AaaaAaaa', 'AaaaAaaA', 'AaaaaaaA', 'Aaaaaaaa', 'AaaaaaAa', 'AaaaaaAA', 'AaaaaAAA', 'AaaaaAAa', 'AaaaaAaa', 'AaaaaAaA', 'AaAaaAaA', 'AaAaaAaa', 'AaAaaAAa', 'AaAaaAAA', 'AaAaaaAA', 'AaAaaaAa', 'AaAaaaaa', 'AaAaaaaA', 'AaAaAaaA', 'AaAaAaaa', 'AaAaAaAa', 'AaAaAaAA', 'AaAaAAAA', 'AaAaAAAa', 'AaAaAAaa', 'AaAaAAaA', 'AaAAAAaA', 'AaAAAAaa', 'AaAAAAAa', 'AaAAAAAA', 'AaAAAaAA', 'AaAAAaAa', 'AaAAAaaa', 'AaAAAaaA', 'AaAAaaaA', 'AaAAaaaa', 'AaAAaaAa', 'AaAAaaAA', 'AaAAaAAA', 'AaAAaAAa', 'AaAAaAaa', 'AaAAaAaA', 'AAAAaAaA', 'AAAAaAaa', 'AAAAaAAa', 'AAAAaAAA', 'AAAAaaAA', 'AAAAaaAa', 'AAAAaaaa', 'AAAAaaaA', 'AAAAAaaA', 'AAAAAaaa', 'AAAAAaAa', 'AAAAAaAA', 'AAAAAAAA', 'AAAAAAAa', 'AAAAAAaa', 'AAAAAAaA', 'AAAaAAaA', 'AAAaAAaa', 'AAAaAAAa', 'AAAaAAAA', 'AAAaAaAA', 'AAAaAaAa', 'AAAaAaaa', 'AAAaAaaA', 'AAAaaaaA', 'AAAaaaaa', 'AAAaaaAa', 'AAAaaaAA', 'AAAaaAAA', 'AAAaaAAa', 'AAAaaAaa', 'AAAaaAaA', 'AAaaaAaA', 'AAaaaAaa', 'AAaaaAAa', 'AAaaaAAA', 'AAaaaaAA', 'AAaaaaAa', 'AAaaaaaa', 'AAaaaaaA', 'AAaaAaaA', 'AAaaAaaa', 'AAaaAaAa', 'AAaaAaAA', 'AAaaAAAA', 'AAaaAAAa', 'AAaaAAaa', 'AAaaAAaA', 'AAaAAAaA', 'AAaAAAaa', 'AAaAAAAa', 'AAaAAAAA', 'AAaAAaAA', 'AAaAAaAa', 'AAaAAaaa', 'AAaAAaaA', 'AAaAaaaA', 'AAaAaaaa', 'AAaAaaAa', 'AAaAaaAA', 'AAaAaAAA', 'AAaAaAAa', 'AAaAaAaa', 'AAaAaAaA'])\n assert answers_match(candidate(s='0a1B2c3D4'), ['0a1B2c3D4', '0a1B2c3d4', '0a1B2C3d4', '0a1B2C3D4', '0a1b2C3D4', '0a1b2C3d4', '0a1b2c3d4', '0a1b2c3D4', '0A1b2c3D4', '0A1b2c3d4', '0A1b2C3d4', '0A1b2C3D4', '0A1B2C3D4', '0A1B2C3d4', '0A1B2c3d4', '0A1B2c3D4'])\n assert answers_match(candidate(s='1a2b3c'), ['1a2b3c', '1a2b3C', '1a2B3C', '1a2B3c', '1A2B3c', '1A2B3C', '1A2b3C', '1A2b3c'])\n assert answers_match(candidate(s='a1b2c3'), ['a1b2c3', 'a1b2C3', 'a1B2C3', 'a1B2c3', 'A1B2c3', 'A1B2C3', 'A1b2C3', 'A1b2c3'])\n assert answers_match(candidate(s='abc123XYZ'), ['abc123XYZ', 'abc123XYz', 'abc123Xyz', 'abc123XyZ', 'abc123xyZ', 'abc123xyz', 'abc123xYz', 'abc123xYZ', 'abC123xYZ', 'abC123xYz', 'abC123xyz', 'abC123xyZ', 'abC123XyZ', 'abC123Xyz', 'abC123XYz', 'abC123XYZ', 'aBC123XYZ', 'aBC123XYz', 'aBC123Xyz', 'aBC123XyZ', 'aBC123xyZ', 'aBC123xyz', 'aBC123xYz', 'aBC123xYZ', 'aBc123xYZ', 'aBc123xYz', 'aBc123xyz', 'aBc123xyZ', 'aBc123XyZ', 'aBc123Xyz', 'aBc123XYz', 'aBc123XYZ', 'ABc123XYZ', 'ABc123XYz', 'ABc123Xyz', 'ABc123XyZ', 'ABc123xyZ', 'ABc123xyz', 'ABc123xYz', 'ABc123xYZ', 'ABC123xYZ', 'ABC123xYz', 'ABC123xyz', 'ABC123xyZ', 'ABC123XyZ', 'ABC123Xyz', 'ABC123XYz', 'ABC123XYZ', 'AbC123XYZ', 'AbC123XYz', 'AbC123Xyz', 'AbC123XyZ', 'AbC123xyZ', 'AbC123xyz', 'AbC123xYz', 'AbC123xYZ', 'Abc123xYZ', 'Abc123xYz', 'Abc123xyz', 'Abc123xyZ', 'Abc123XyZ', 'Abc123Xyz', 'Abc123XYz', 'Abc123XYZ'])\n assert answers_match(candidate(s='aBcDeF1G2H3'), ['aBcDeF1G2H3', 'aBcDeF1G2h3', 'aBcDeF1g2h3', 'aBcDeF1g2H3', 'aBcDef1g2H3', 'aBcDef1g2h3', 'aBcDef1G2h3', 'aBcDef1G2H3', 'aBcDEf1G2H3', 'aBcDEf1G2h3', 'aBcDEf1g2h3', 'aBcDEf1g2H3', 'aBcDEF1g2H3', 'aBcDEF1g2h3', 'aBcDEF1G2h3', 'aBcDEF1G2H3', 'aBcdEF1G2H3', 'aBcdEF1G2h3', 'aBcdEF1g2h3', 'aBcdEF1g2H3', 'aBcdEf1g2H3', 'aBcdEf1g2h3', 'aBcdEf1G2h3', 'aBcdEf1G2H3', 'aBcdef1G2H3', 'aBcdef1G2h3', 'aBcdef1g2h3', 'aBcdef1g2H3', 'aBcdeF1g2H3', 'aBcdeF1g2h3', 'aBcdeF1G2h3', 'aBcdeF1G2H3', 'aBCdeF1G2H3', 'aBCdeF1G2h3', 'aBCdeF1g2h3', 'aBCdeF1g2H3', 'aBCdef1g2H3', 'aBCdef1g2h3', 'aBCdef1G2h3', 'aBCdef1G2H3', 'aBCdEf1G2H3', 'aBCdEf1G2h3', 'aBCdEf1g2h3', 'aBCdEf1g2H3', 'aBCdEF1g2H3', 'aBCdEF1g2h3', 'aBCdEF1G2h3', 'aBCdEF1G2H3', 'aBCDEF1G2H3', 'aBCDEF1G2h3', 'aBCDEF1g2h3', 'aBCDEF1g2H3', 'aBCDEf1g2H3', 'aBCDEf1g2h3', 'aBCDEf1G2h3', 'aBCDEf1G2H3', 'aBCDef1G2H3', 'aBCDef1G2h3', 'aBCDef1g2h3', 'aBCDef1g2H3', 'aBCDeF1g2H3', 'aBCDeF1g2h3', 'aBCDeF1G2h3', 'aBCDeF1G2H3', 'abCDeF1G2H3', 'abCDeF1G2h3', 'abCDeF1g2h3', 'abCDeF1g2H3', 'abCDef1g2H3', 'abCDef1g2h3', 'abCDef1G2h3', 'abCDef1G2H3', 'abCDEf1G2H3', 'abCDEf1G2h3', 'abCDEf1g2h3', 'abCDEf1g2H3', 'abCDEF1g2H3', 'abCDEF1g2h3', 'abCDEF1G2h3', 'abCDEF1G2H3', 'abCdEF1G2H3', 'abCdEF1G2h3', 'abCdEF1g2h3', 'abCdEF1g2H3', 'abCdEf1g2H3', 'abCdEf1g2h3', 'abCdEf1G2h3', 'abCdEf1G2H3', 'abCdef1G2H3', 'abCdef1G2h3', 'abCdef1g2h3', 'abCdef1g2H3', 'abCdeF1g2H3', 'abCdeF1g2h3', 'abCdeF1G2h3', 'abCdeF1G2H3', 'abcdeF1G2H3', 'abcdeF1G2h3', 'abcdeF1g2h3', 'abcdeF1g2H3', 'abcdef1g2H3', 'abcdef1g2h3', 'abcdef1G2h3', 'abcdef1G2H3', 'abcdEf1G2H3', 'abcdEf1G2h3', 'abcdEf1g2h3', 'abcdEf1g2H3', 'abcdEF1g2H3', 'abcdEF1g2h3', 'abcdEF1G2h3', 'abcdEF1G2H3', 'abcDEF1G2H3', 'abcDEF1G2h3', 'abcDEF1g2h3', 'abcDEF1g2H3', 'abcDEf1g2H3', 'abcDEf1g2h3', 'abcDEf1G2h3', 'abcDEf1G2H3', 'abcDef1G2H3', 'abcDef1G2h3', 'abcDef1g2h3', 'abcDef1g2H3', 'abcDeF1g2H3', 'abcDeF1g2h3', 'abcDeF1G2h3', 'abcDeF1G2H3', 'AbcDeF1G2H3', 'AbcDeF1G2h3', 'AbcDeF1g2h3', 'AbcDeF1g2H3', 'AbcDef1g2H3', 'AbcDef1g2h3', 'AbcDef1G2h3', 'AbcDef1G2H3', 'AbcDEf1G2H3', 'AbcDEf1G2h3', 'AbcDEf1g2h3', 'AbcDEf1g2H3', 'AbcDEF1g2H3', 'AbcDEF1g2h3', 'AbcDEF1G2h3', 'AbcDEF1G2H3', 'AbcdEF1G2H3', 'AbcdEF1G2h3', 'AbcdEF1g2h3', 'AbcdEF1g2H3', 'AbcdEf1g2H3', 'AbcdEf1g2h3', 'AbcdEf1G2h3', 'AbcdEf1G2H3', 'Abcdef1G2H3', 'Abcdef1G2h3', 'Abcdef1g2h3', 'Abcdef1g2H3', 'AbcdeF1g2H3', 'AbcdeF1g2h3', 'AbcdeF1G2h3', 'AbcdeF1G2H3', 'AbCdeF1G2H3', 'AbCdeF1G2h3', 'AbCdeF1g2h3', 'AbCdeF1g2H3', 'AbCdef1g2H3', 'AbCdef1g2h3', 'AbCdef1G2h3', 'AbCdef1G2H3', 'AbCdEf1G2H3', 'AbCdEf1G2h3', 'AbCdEf1g2h3', 'AbCdEf1g2H3', 'AbCdEF1g2H3', 'AbCdEF1g2h3', 'AbCdEF1G2h3', 'AbCdEF1G2H3', 'AbCDEF1G2H3', 'AbCDEF1G2h3', 'AbCDEF1g2h3', 'AbCDEF1g2H3', 'AbCDEf1g2H3', 'AbCDEf1g2h3', 'AbCDEf1G2h3', 'AbCDEf1G2H3', 'AbCDef1G2H3', 'AbCDef1G2h3', 'AbCDef1g2h3', 'AbCDef1g2H3', 'AbCDeF1g2H3', 'AbCDeF1g2h3', 'AbCDeF1G2h3', 'AbCDeF1G2H3', 'ABCDeF1G2H3', 'ABCDeF1G2h3', 'ABCDeF1g2h3', 'ABCDeF1g2H3', 'ABCDef1g2H3', 'ABCDef1g2h3', 'ABCDef1G2h3', 'ABCDef1G2H3', 'ABCDEf1G2H3', 'ABCDEf1G2h3', 'ABCDEf1g2h3', 'ABCDEf1g2H3', 'ABCDEF1g2H3', 'ABCDEF1g2h3', 'ABCDEF1G2h3', 'ABCDEF1G2H3', 'ABCdEF1G2H3', 'ABCdEF1G2h3', 'ABCdEF1g2h3', 'ABCdEF1g2H3', 'ABCdEf1g2H3', 'ABCdEf1g2h3', 'ABCdEf1G2h3', 'ABCdEf1G2H3', 'ABCdef1G2H3', 'ABCdef1G2h3', 'ABCdef1g2h3', 'ABCdef1g2H3', 'ABCdeF1g2H3', 'ABCdeF1g2h3', 'ABCdeF1G2h3', 'ABCdeF1G2H3', 'ABcdeF1G2H3', 'ABcdeF1G2h3', 'ABcdeF1g2h3', 'ABcdeF1g2H3', 'ABcdef1g2H3', 'ABcdef1g2h3', 'ABcdef1G2h3', 'ABcdef1G2H3', 'ABcdEf1G2H3', 'ABcdEf1G2h3', 'ABcdEf1g2h3', 'ABcdEf1g2H3', 'ABcdEF1g2H3', 'ABcdEF1g2h3', 'ABcdEF1G2h3', 'ABcdEF1G2H3', 'ABcDEF1G2H3', 'ABcDEF1G2h3', 'ABcDEF1g2h3', 'ABcDEF1g2H3', 'ABcDEf1g2H3', 'ABcDEf1g2h3', 'ABcDEf1G2h3', 'ABcDEf1G2H3', 'ABcDef1G2H3', 'ABcDef1G2h3', 'ABcDef1g2h3', 'ABcDef1g2H3', 'ABcDeF1g2H3', 'ABcDeF1g2h3', 'ABcDeF1G2h3', 'ABcDeF1G2H3'])\n assert answers_match(candidate(s='xYz09'), ['xYz09', 'xYZ09', 'xyZ09', 'xyz09', 'Xyz09', 'XyZ09', 'XYZ09', 'XYz09'])\n assert answers_match(candidate(s='Zz123Yy456Xx'), ['Zz123Yy456Xx', 'Zz123Yy456XX', 'Zz123Yy456xX', 'Zz123Yy456xx', 'Zz123YY456xx', 'Zz123YY456xX', 'Zz123YY456XX', 'Zz123YY456Xx', 'Zz123yY456Xx', 'Zz123yY456XX', 'Zz123yY456xX', 'Zz123yY456xx', 'Zz123yy456xx', 'Zz123yy456xX', 'Zz123yy456XX', 'Zz123yy456Xx', 'ZZ123yy456Xx', 'ZZ123yy456XX', 'ZZ123yy456xX', 'ZZ123yy456xx', 'ZZ123yY456xx', 'ZZ123yY456xX', 'ZZ123yY456XX', 'ZZ123yY456Xx', 'ZZ123YY456Xx', 'ZZ123YY456XX', 'ZZ123YY456xX', 'ZZ123YY456xx', 'ZZ123Yy456xx', 'ZZ123Yy456xX', 'ZZ123Yy456XX', 'ZZ123Yy456Xx', 'zZ123Yy456Xx', 'zZ123Yy456XX', 'zZ123Yy456xX', 'zZ123Yy456xx', 'zZ123YY456xx', 'zZ123YY456xX', 'zZ123YY456XX', 'zZ123YY456Xx', 'zZ123yY456Xx', 'zZ123yY456XX', 'zZ123yY456xX', 'zZ123yY456xx', 'zZ123yy456xx', 'zZ123yy456xX', 'zZ123yy456XX', 'zZ123yy456Xx', 'zz123yy456Xx', 'zz123yy456XX', 'zz123yy456xX', 'zz123yy456xx', 'zz123yY456xx', 'zz123yY456xX', 'zz123yY456XX', 'zz123yY456Xx', 'zz123YY456Xx', 'zz123YY456XX', 'zz123YY456xX', 'zz123YY456xx', 'zz123Yy456xx', 'zz123Yy456xX', 'zz123Yy456XX', 'zz123Yy456Xx'])\n assert answers_match(candidate(s='a1B2c3D4'), ['a1B2c3D4', 'a1B2c3d4', 'a1B2C3d4', 'a1B2C3D4', 'a1b2C3D4', 'a1b2C3d4', 'a1b2c3d4', 'a1b2c3D4', 'A1b2c3D4', 'A1b2c3d4', 'A1b2C3d4', 'A1b2C3D4', 'A1B2C3D4', 'A1B2C3d4', 'A1B2c3d4', 'A1B2c3D4'])\n assert answers_match(candidate(s='987xyz'), ['987xyz', '987xyZ', '987xYZ', '987xYz', '987XYz', '987XYZ', '987XyZ', '987Xyz'])\n assert answers_match(candidate(s='A1bC2dE3fG4'), ['A1bC2dE3fG4', 'A1bC2dE3fg4', 'A1bC2dE3Fg4', 'A1bC2dE3FG4', 'A1bC2de3FG4', 'A1bC2de3Fg4', 'A1bC2de3fg4', 'A1bC2de3fG4', 'A1bC2De3fG4', 'A1bC2De3fg4', 'A1bC2De3Fg4', 'A1bC2De3FG4', 'A1bC2DE3FG4', 'A1bC2DE3Fg4', 'A1bC2DE3fg4', 'A1bC2DE3fG4', 'A1bc2DE3fG4', 'A1bc2DE3fg4', 'A1bc2DE3Fg4', 'A1bc2DE3FG4', 'A1bc2De3FG4', 'A1bc2De3Fg4', 'A1bc2De3fg4', 'A1bc2De3fG4', 'A1bc2de3fG4', 'A1bc2de3fg4', 'A1bc2de3Fg4', 'A1bc2de3FG4', 'A1bc2dE3FG4', 'A1bc2dE3Fg4', 'A1bc2dE3fg4', 'A1bc2dE3fG4', 'A1Bc2dE3fG4', 'A1Bc2dE3fg4', 'A1Bc2dE3Fg4', 'A1Bc2dE3FG4', 'A1Bc2de3FG4', 'A1Bc2de3Fg4', 'A1Bc2de3fg4', 'A1Bc2de3fG4', 'A1Bc2De3fG4', 'A1Bc2De3fg4', 'A1Bc2De3Fg4', 'A1Bc2De3FG4', 'A1Bc2DE3FG4', 'A1Bc2DE3Fg4', 'A1Bc2DE3fg4', 'A1Bc2DE3fG4', 'A1BC2DE3fG4', 'A1BC2DE3fg4', 'A1BC2DE3Fg4', 'A1BC2DE3FG4', 'A1BC2De3FG4', 'A1BC2De3Fg4', 'A1BC2De3fg4', 'A1BC2De3fG4', 'A1BC2de3fG4', 'A1BC2de3fg4', 'A1BC2de3Fg4', 'A1BC2de3FG4', 'A1BC2dE3FG4', 'A1BC2dE3Fg4', 'A1BC2dE3fg4', 'A1BC2dE3fG4', 'a1BC2dE3fG4', 'a1BC2dE3fg4', 'a1BC2dE3Fg4', 'a1BC2dE3FG4', 'a1BC2de3FG4', 'a1BC2de3Fg4', 'a1BC2de3fg4', 'a1BC2de3fG4', 'a1BC2De3fG4', 'a1BC2De3fg4', 'a1BC2De3Fg4', 'a1BC2De3FG4', 'a1BC2DE3FG4', 'a1BC2DE3Fg4', 'a1BC2DE3fg4', 'a1BC2DE3fG4', 'a1Bc2DE3fG4', 'a1Bc2DE3fg4', 'a1Bc2DE3Fg4', 'a1Bc2DE3FG4', 'a1Bc2De3FG4', 'a1Bc2De3Fg4', 'a1Bc2De3fg4', 'a1Bc2De3fG4', 'a1Bc2de3fG4', 'a1Bc2de3fg4', 'a1Bc2de3Fg4', 'a1Bc2de3FG4', 'a1Bc2dE3FG4', 'a1Bc2dE3Fg4', 'a1Bc2dE3fg4', 'a1Bc2dE3fG4', 'a1bc2dE3fG4', 'a1bc2dE3fg4', 'a1bc2dE3Fg4', 'a1bc2dE3FG4', 'a1bc2de3FG4', 'a1bc2de3Fg4', 'a1bc2de3fg4', 'a1bc2de3fG4', 'a1bc2De3fG4', 'a1bc2De3fg4', 'a1bc2De3Fg4', 'a1bc2De3FG4', 'a1bc2DE3FG4', 'a1bc2DE3Fg4', 'a1bc2DE3fg4', 'a1bc2DE3fG4', 'a1bC2DE3fG4', 'a1bC2DE3fg4', 'a1bC2DE3Fg4', 'a1bC2DE3FG4', 'a1bC2De3FG4', 'a1bC2De3Fg4', 'a1bC2De3fg4', 'a1bC2De3fG4', 'a1bC2de3fG4', 'a1bC2de3fg4', 'a1bC2de3Fg4', 'a1bC2de3FG4', 'a1bC2dE3FG4', 'a1bC2dE3Fg4', 'a1bC2dE3fg4', 'a1bC2dE3fG4'])\n assert answers_match(candidate(s='123ABC456'), ['123ABC456', '123ABc456', '123Abc456', '123AbC456', '123abC456', '123abc456', '123aBc456', '123aBC456'])\n assert answers_match(candidate(s='abcXYZ'), ['abcXYZ', 'abcXYz', 'abcXyz', 'abcXyZ', 'abcxyZ', 'abcxyz', 'abcxYz', 'abcxYZ', 'abCxYZ', 'abCxYz', 'abCxyz', 'abCxyZ', 'abCXyZ', 'abCXyz', 'abCXYz', 'abCXYZ', 'aBCXYZ', 'aBCXYz', 'aBCXyz', 'aBCXyZ', 'aBCxyZ', 'aBCxyz', 'aBCxYz', 'aBCxYZ', 'aBcxYZ', 'aBcxYz', 'aBcxyz', 'aBcxyZ', 'aBcXyZ', 'aBcXyz', 'aBcXYz', 'aBcXYZ', 'ABcXYZ', 'ABcXYz', 'ABcXyz', 'ABcXyZ', 'ABcxyZ', 'ABcxyz', 'ABcxYz', 'ABcxYZ', 'ABCxYZ', 'ABCxYz', 'ABCxyz', 'ABCxyZ', 'ABCXyZ', 'ABCXyz', 'ABCXYz', 'ABCXYZ', 'AbCXYZ', 'AbCXYz', 'AbCXyz', 'AbCXyZ', 'AbCxyZ', 'AbCxyz', 'AbCxYz', 'AbCxYZ', 'AbcxYZ', 'AbcxYz', 'Abcxyz', 'AbcxyZ', 'AbcXyZ', 'AbcXyz', 'AbcXYz', 'AbcXYZ'])\n assert answers_match(candidate(s='aBcDeF12'), ['aBcDeF12', 'aBcDef12', 'aBcDEf12', 'aBcDEF12', 'aBcdEF12', 'aBcdEf12', 'aBcdef12', 'aBcdeF12', 'aBCdeF12', 'aBCdef12', 'aBCdEf12', 'aBCdEF12', 'aBCDEF12', 'aBCDEf12', 'aBCDef12', 'aBCDeF12', 'abCDeF12', 'abCDef12', 'abCDEf12', 'abCDEF12', 'abCdEF12', 'abCdEf12', 'abCdef12', 'abCdeF12', 'abcdeF12', 'abcdef12', 'abcdEf12', 'abcdEF12', 'abcDEF12', 'abcDEf12', 'abcDef12', 'abcDeF12', 'AbcDeF12', 'AbcDef12', 'AbcDEf12', 'AbcDEF12', 'AbcdEF12', 'AbcdEf12', 'Abcdef12', 'AbcdeF12', 'AbCdeF12', 'AbCdef12', 'AbCdEf12', 'AbCdEF12', 'AbCDEF12', 'AbCDEf12', 'AbCDef12', 'AbCDeF12', 'ABCDeF12', 'ABCDef12', 'ABCDEf12', 'ABCDEF12', 'ABCdEF12', 'ABCdEf12', 'ABCdef12', 'ABCdeF12', 'ABcdeF12', 'ABcdef12', 'ABcdEf12', 'ABcdEF12', 'ABcDEF12', 'ABcDEf12', 'ABcDef12', 'ABcDeF12'])\n assert answers_match(candidate(s='aBc123dE'), ['aBc123dE', 'aBc123de', 'aBc123De', 'aBc123DE', 'aBC123DE', 'aBC123De', 'aBC123de', 'aBC123dE', 'abC123dE', 'abC123de', 'abC123De', 'abC123DE', 'abc123DE', 'abc123De', 'abc123de', 'abc123dE', 'Abc123dE', 'Abc123de', 'Abc123De', 'Abc123DE', 'AbC123DE', 'AbC123De', 'AbC123de', 'AbC123dE', 'ABC123dE', 'ABC123de', 'ABC123De', 'ABC123DE', 'ABc123DE', 'ABc123De', 'ABc123de', 'ABc123dE'])\n assert answers_match(candidate(s='abcdefghij'), ['abcdefghij', 'abcdefghiJ', 'abcdefghIJ', 'abcdefghIj', 'abcdefgHIj', 'abcdefgHIJ', 'abcdefgHiJ', 'abcdefgHij', 'abcdefGHij', 'abcdefGHiJ', 'abcdefGHIJ', 'abcdefGHIj', 'abcdefGhIj', 'abcdefGhIJ', 'abcdefGhiJ', 'abcdefGhij', 'abcdeFGhij', 'abcdeFGhiJ', 'abcdeFGhIJ', 'abcdeFGhIj', 'abcdeFGHIj', 'abcdeFGHIJ', 'abcdeFGHiJ', 'abcdeFGHij', 'abcdeFgHij', 'abcdeFgHiJ', 'abcdeFgHIJ', 'abcdeFgHIj', 'abcdeFghIj', 'abcdeFghIJ', 'abcdeFghiJ', 'abcdeFghij', 'abcdEFghij', 'abcdEFghiJ', 'abcdEFghIJ', 'abcdEFghIj', 'abcdEFgHIj', 'abcdEFgHIJ', 'abcdEFgHiJ', 'abcdEFgHij', 'abcdEFGHij', 'abcdEFGHiJ', 'abcdEFGHIJ', 'abcdEFGHIj', 'abcdEFGhIj', 'abcdEFGhIJ', 'abcdEFGhiJ', 'abcdEFGhij', 'abcdEfGhij', 'abcdEfGhiJ', 'abcdEfGhIJ', 'abcdEfGhIj', 'abcdEfGHIj', 'abcdEfGHIJ', 'abcdEfGHiJ', 'abcdEfGHij', 'abcdEfgHij', 'abcdEfgHiJ', 'abcdEfgHIJ', 'abcdEfgHIj', 'abcdEfghIj', 'abcdEfghIJ', 'abcdEfghiJ', 'abcdEfghij', 'abcDEfghij', 'abcDEfghiJ', 'abcDEfghIJ', 'abcDEfghIj', 'abcDEfgHIj', 'abcDEfgHIJ', 'abcDEfgHiJ', 'abcDEfgHij', 'abcDEfGHij', 'abcDEfGHiJ', 'abcDEfGHIJ', 'abcDEfGHIj', 'abcDEfGhIj', 'abcDEfGhIJ', 'abcDEfGhiJ', 'abcDEfGhij', 'abcDEFGhij', 'abcDEFGhiJ', 'abcDEFGhIJ', 'abcDEFGhIj', 'abcDEFGHIj', 'abcDEFGHIJ', 'abcDEFGHiJ', 'abcDEFGHij', 'abcDEFgHij', 'abcDEFgHiJ', 'abcDEFgHIJ', 'abcDEFgHIj', 'abcDEFghIj', 'abcDEFghIJ', 'abcDEFghiJ', 'abcDEFghij', 'abcDeFghij', 'abcDeFghiJ', 'abcDeFghIJ', 'abcDeFghIj', 'abcDeFgHIj', 'abcDeFgHIJ', 'abcDeFgHiJ', 'abcDeFgHij', 'abcDeFGHij', 'abcDeFGHiJ', 'abcDeFGHIJ', 'abcDeFGHIj', 'abcDeFGhIj', 'abcDeFGhIJ', 'abcDeFGhiJ', 'abcDeFGhij', 'abcDefGhij', 'abcDefGhiJ', 'abcDefGhIJ', 'abcDefGhIj', 'abcDefGHIj', 'abcDefGHIJ', 'abcDefGHiJ', 'abcDefGHij', 'abcDefgHij', 'abcDefgHiJ', 'abcDefgHIJ', 'abcDefgHIj', 'abcDefghIj', 'abcDefghIJ', 'abcDefghiJ', 'abcDefghij', 'abCDefghij', 'abCDefghiJ', 'abCDefghIJ', 'abCDefghIj', 'abCDefgHIj', 'abCDefgHIJ', 'abCDefgHiJ', 'abCDefgHij', 'abCDefGHij', 'abCDefGHiJ', 'abCDefGHIJ', 'abCDefGHIj', 'abCDefGhIj', 'abCDefGhIJ', 'abCDefGhiJ', 'abCDefGhij', 'abCDeFGhij', 'abCDeFGhiJ', 'abCDeFGhIJ', 'abCDeFGhIj', 'abCDeFGHIj', 'abCDeFGHIJ', 'abCDeFGHiJ', 'abCDeFGHij', 'abCDeFgHij', 'abCDeFgHiJ', 'abCDeFgHIJ', 'abCDeFgHIj', 'abCDeFghIj', 'abCDeFghIJ', 'abCDeFghiJ', 'abCDeFghij', 'abCDEFghij', 'abCDEFghiJ', 'abCDEFghIJ', 'abCDEFghIj', 'abCDEFgHIj', 'abCDEFgHIJ', 'abCDEFgHiJ', 'abCDEFgHij', 'abCDEFGHij', 'abCDEFGHiJ', 'abCDEFGHIJ', 'abCDEFGHIj', 'abCDEFGhIj', 'abCDEFGhIJ', 'abCDEFGhiJ', 'abCDEFGhij', 'abCDEfGhij', 'abCDEfGhiJ', 'abCDEfGhIJ', 'abCDEfGhIj', 'abCDEfGHIj', 'abCDEfGHIJ', 'abCDEfGHiJ', 'abCDEfGHij', 'abCDEfgHij', 'abCDEfgHiJ', 'abCDEfgHIJ', 'abCDEfgHIj', 'abCDEfghIj', 'abCDEfghIJ', 'abCDEfghiJ', 'abCDEfghij', 'abCdEfghij', 'abCdEfghiJ', 'abCdEfghIJ', 'abCdEfghIj', 'abCdEfgHIj', 'abCdEfgHIJ', 'abCdEfgHiJ', 'abCdEfgHij', 'abCdEfGHij', 'abCdEfGHiJ', 'abCdEfGHIJ', 'abCdEfGHIj', 'abCdEfGhIj', 'abCdEfGhIJ', 'abCdEfGhiJ', 'abCdEfGhij', 'abCdEFGhij', 'abCdEFGhiJ', 'abCdEFGhIJ', 'abCdEFGhIj', 'abCdEFGHIj', 'abCdEFGHIJ', 'abCdEFGHiJ', 'abCdEFGHij', 'abCdEFgHij', 'abCdEFgHiJ', 'abCdEFgHIJ', 'abCdEFgHIj', 'abCdEFghIj', 'abCdEFghIJ', 'abCdEFghiJ', 'abCdEFghij', 'abCdeFghij', 'abCdeFghiJ', 'abCdeFghIJ', 'abCdeFghIj', 'abCdeFgHIj', 'abCdeFgHIJ', 'abCdeFgHiJ', 'abCdeFgHij', 'abCdeFGHij', 'abCdeFGHiJ', 'abCdeFGHIJ', 'abCdeFGHIj', 'abCdeFGhIj', 'abCdeFGhIJ', 'abCdeFGhiJ', 'abCdeFGhij', 'abCdefGhij', 'abCdefGhiJ', 'abCdefGhIJ', 'abCdefGhIj', 'abCdefGHIj', 'abCdefGHIJ', 'abCdefGHiJ', 'abCdefGHij', 'abCdefgHij', 'abCdefgHiJ', 'abCdefgHIJ', 'abCdefgHIj', 'abCdefghIj', 'abCdefghIJ', 'abCdefghiJ', 'abCdefghij', 'aBCdefghij', 'aBCdefghiJ', 'aBCdefghIJ', 'aBCdefghIj', 'aBCdefgHIj', 'aBCdefgHIJ', 'aBCdefgHiJ', 'aBCdefgHij', 'aBCdefGHij', 'aBCdefGHiJ', 'aBCdefGHIJ', 'aBCdefGHIj', 'aBCdefGhIj', 'aBCdefGhIJ', 'aBCdefGhiJ', 'aBCdefGhij', 'aBCdeFGhij', 'aBCdeFGhiJ', 'aBCdeFGhIJ', 'aBCdeFGhIj', 'aBCdeFGHIj', 'aBCdeFGHIJ', 'aBCdeFGHiJ', 'aBCdeFGHij', 'aBCdeFgHij', 'aBCdeFgHiJ', 'aBCdeFgHIJ', 'aBCdeFgHIj', 'aBCdeFghIj', 'aBCdeFghIJ', 'aBCdeFghiJ', 'aBCdeFghij', 'aBCdEFghij', 'aBCdEFghiJ', 'aBCdEFghIJ', 'aBCdEFghIj', 'aBCdEFgHIj', 'aBCdEFgHIJ', 'aBCdEFgHiJ', 'aBCdEFgHij', 'aBCdEFGHij', 'aBCdEFGHiJ', 'aBCdEFGHIJ', 'aBCdEFGHIj', 'aBCdEFGhIj', 'aBCdEFGhIJ', 'aBCdEFGhiJ', 'aBCdEFGhij', 'aBCdEfGhij', 'aBCdEfGhiJ', 'aBCdEfGhIJ', 'aBCdEfGhIj', 'aBCdEfGHIj', 'aBCdEfGHIJ', 'aBCdEfGHiJ', 'aBCdEfGHij', 'aBCdEfgHij', 'aBCdEfgHiJ', 'aBCdEfgHIJ', 'aBCdEfgHIj', 'aBCdEfghIj', 'aBCdEfghIJ', 'aBCdEfghiJ', 'aBCdEfghij', 'aBCDEfghij', 'aBCDEfghiJ', 'aBCDEfghIJ', 'aBCDEfghIj', 'aBCDEfgHIj', 'aBCDEfgHIJ', 'aBCDEfgHiJ', 'aBCDEfgHij', 'aBCDEfGHij', 'aBCDEfGHiJ', 'aBCDEfGHIJ', 'aBCDEfGHIj', 'aBCDEfGhIj', 'aBCDEfGhIJ', 'aBCDEfGhiJ', 'aBCDEfGhij', 'aBCDEFGhij', 'aBCDEFGhiJ', 'aBCDEFGhIJ', 'aBCDEFGhIj', 'aBCDEFGHIj', 'aBCDEFGHIJ', 'aBCDEFGHiJ', 'aBCDEFGHij', 'aBCDEFgHij', 'aBCDEFgHiJ', 'aBCDEFgHIJ', 'aBCDEFgHIj', 'aBCDEFghIj', 'aBCDEFghIJ', 'aBCDEFghiJ', 'aBCDEFghij', 'aBCDeFghij', 'aBCDeFghiJ', 'aBCDeFghIJ', 'aBCDeFghIj', 'aBCDeFgHIj', 'aBCDeFgHIJ', 'aBCDeFgHiJ', 'aBCDeFgHij', 'aBCDeFGHij', 'aBCDeFGHiJ', 'aBCDeFGHIJ', 'aBCDeFGHIj', 'aBCDeFGhIj', 'aBCDeFGhIJ', 'aBCDeFGhiJ', 'aBCDeFGhij', 'aBCDefGhij', 'aBCDefGhiJ', 'aBCDefGhIJ', 'aBCDefGhIj', 'aBCDefGHIj', 'aBCDefGHIJ', 'aBCDefGHiJ', 'aBCDefGHij', 'aBCDefgHij', 'aBCDefgHiJ', 'aBCDefgHIJ', 'aBCDefgHIj', 'aBCDefghIj', 'aBCDefghIJ', 'aBCDefghiJ', 'aBCDefghij', 'aBcDefghij', 'aBcDefghiJ', 'aBcDefghIJ', 'aBcDefghIj', 'aBcDefgHIj', 'aBcDefgHIJ', 'aBcDefgHiJ', 'aBcDefgHij', 'aBcDefGHij', 'aBcDefGHiJ', 'aBcDefGHIJ', 'aBcDefGHIj', 'aBcDefGhIj', 'aBcDefGhIJ', 'aBcDefGhiJ', 'aBcDefGhij', 'aBcDeFGhij', 'aBcDeFGhiJ', 'aBcDeFGhIJ', 'aBcDeFGhIj', 'aBcDeFGHIj', 'aBcDeFGHIJ', 'aBcDeFGHiJ', 'aBcDeFGHij', 'aBcDeFgHij', 'aBcDeFgHiJ', 'aBcDeFgHIJ', 'aBcDeFgHIj', 'aBcDeFghIj', 'aBcDeFghIJ', 'aBcDeFghiJ', 'aBcDeFghij', 'aBcDEFghij', 'aBcDEFghiJ', 'aBcDEFghIJ', 'aBcDEFghIj', 'aBcDEFgHIj', 'aBcDEFgHIJ', 'aBcDEFgHiJ', 'aBcDEFgHij', 'aBcDEFGHij', 'aBcDEFGHiJ', 'aBcDEFGHIJ', 'aBcDEFGHIj', 'aBcDEFGhIj', 'aBcDEFGhIJ', 'aBcDEFGhiJ', 'aBcDEFGhij', 'aBcDEfGhij', 'aBcDEfGhiJ', 'aBcDEfGhIJ', 'aBcDEfGhIj', 'aBcDEfGHIj', 'aBcDEfGHIJ', 'aBcDEfGHiJ', 'aBcDEfGHij', 'aBcDEfgHij', 'aBcDEfgHiJ', 'aBcDEfgHIJ', 'aBcDEfgHIj', 'aBcDEfghIj', 'aBcDEfghIJ', 'aBcDEfghiJ', 'aBcDEfghij', 'aBcdEfghij', 'aBcdEfghiJ', 'aBcdEfghIJ', 'aBcdEfghIj', 'aBcdEfgHIj', 'aBcdEfgHIJ', 'aBcdEfgHiJ', 'aBcdEfgHij', 'aBcdEfGHij', 'aBcdEfGHiJ', 'aBcdEfGHIJ', 'aBcdEfGHIj', 'aBcdEfGhIj', 'aBcdEfGhIJ', 'aBcdEfGhiJ', 'aBcdEfGhij', 'aBcdEFGhij', 'aBcdEFGhiJ', 'aBcdEFGhIJ', 'aBcdEFGhIj', 'aBcdEFGHIj', 'aBcdEFGHIJ', 'aBcdEFGHiJ', 'aBcdEFGHij', 'aBcdEFgHij', 'aBcdEFgHiJ', 'aBcdEFgHIJ', 'aBcdEFgHIj', 'aBcdEFghIj', 'aBcdEFghIJ', 'aBcdEFghiJ', 'aBcdEFghij', 'aBcdeFghij', 'aBcdeFghiJ', 'aBcdeFghIJ', 'aBcdeFghIj', 'aBcdeFgHIj', 'aBcdeFgHIJ', 'aBcdeFgHiJ', 'aBcdeFgHij', 'aBcdeFGHij', 'aBcdeFGHiJ', 'aBcdeFGHIJ', 'aBcdeFGHIj', 'aBcdeFGhIj', 'aBcdeFGhIJ', 'aBcdeFGhiJ', 'aBcdeFGhij', 'aBcdefGhij', 'aBcdefGhiJ', 'aBcdefGhIJ', 'aBcdefGhIj', 'aBcdefGHIj', 'aBcdefGHIJ', 'aBcdefGHiJ', 'aBcdefGHij', 'aBcdefgHij', 'aBcdefgHiJ', 'aBcdefgHIJ', 'aBcdefgHIj', 'aBcdefghIj', 'aBcdefghIJ', 'aBcdefghiJ', 'aBcdefghij', 'ABcdefghij', 'ABcdefghiJ', 'ABcdefghIJ', 'ABcdefghIj', 'ABcdefgHIj', 'ABcdefgHIJ', 'ABcdefgHiJ', 'ABcdefgHij', 'ABcdefGHij', 'ABcdefGHiJ', 'ABcdefGHIJ', 'ABcdefGHIj', 'ABcdefGhIj', 'ABcdefGhIJ', 'ABcdefGhiJ', 'ABcdefGhij', 'ABcdeFGhij', 'ABcdeFGhiJ', 'ABcdeFGhIJ', 'ABcdeFGhIj', 'ABcdeFGHIj', 'ABcdeFGHIJ', 'ABcdeFGHiJ', 'ABcdeFGHij', 'ABcdeFgHij', 'ABcdeFgHiJ', 'ABcdeFgHIJ', 'ABcdeFgHIj', 'ABcdeFghIj', 'ABcdeFghIJ', 'ABcdeFghiJ', 'ABcdeFghij', 'ABcdEFghij', 'ABcdEFghiJ', 'ABcdEFghIJ', 'ABcdEFghIj', 'ABcdEFgHIj', 'ABcdEFgHIJ', 'ABcdEFgHiJ', 'ABcdEFgHij', 'ABcdEFGHij', 'ABcdEFGHiJ', 'ABcdEFGHIJ', 'ABcdEFGHIj', 'ABcdEFGhIj', 'ABcdEFGhIJ', 'ABcdEFGhiJ', 'ABcdEFGhij', 'ABcdEfGhij', 'ABcdEfGhiJ', 'ABcdEfGhIJ', 'ABcdEfGhIj', 'ABcdEfGHIj', 'ABcdEfGHIJ', 'ABcdEfGHiJ', 'ABcdEfGHij', 'ABcdEfgHij', 'ABcdEfgHiJ', 'ABcdEfgHIJ', 'ABcdEfgHIj', 'ABcdEfghIj', 'ABcdEfghIJ', 'ABcdEfghiJ', 'ABcdEfghij', 'ABcDEfghij', 'ABcDEfghiJ', 'ABcDEfghIJ', 'ABcDEfghIj', 'ABcDEfgHIj', 'ABcDEfgHIJ', 'ABcDEfgHiJ', 'ABcDEfgHij', 'ABcDEfGHij', 'ABcDEfGHiJ', 'ABcDEfGHIJ', 'ABcDEfGHIj', 'ABcDEfGhIj', 'ABcDEfGhIJ', 'ABcDEfGhiJ', 'ABcDEfGhij', 'ABcDEFGhij', 'ABcDEFGhiJ', 'ABcDEFGhIJ', 'ABcDEFGhIj', 'ABcDEFGHIj', 'ABcDEFGHIJ', 'ABcDEFGHiJ', 'ABcDEFGHij', 'ABcDEFgHij', 'ABcDEFgHiJ', 'ABcDEFgHIJ', 'ABcDEFgHIj', 'ABcDEFghIj', 'ABcDEFghIJ', 'ABcDEFghiJ', 'ABcDEFghij', 'ABcDeFghij', 'ABcDeFghiJ', 'ABcDeFghIJ', 'ABcDeFghIj', 'ABcDeFgHIj', 'ABcDeFgHIJ', 'ABcDeFgHiJ', 'ABcDeFgHij', 'ABcDeFGHij', 'ABcDeFGHiJ', 'ABcDeFGHIJ', 'ABcDeFGHIj', 'ABcDeFGhIj', 'ABcDeFGhIJ', 'ABcDeFGhiJ', 'ABcDeFGhij', 'ABcDefGhij', 'ABcDefGhiJ', 'ABcDefGhIJ', 'ABcDefGhIj', 'ABcDefGHIj', 'ABcDefGHIJ', 'ABcDefGHiJ', 'ABcDefGHij', 'ABcDefgHij', 'ABcDefgHiJ', 'ABcDefgHIJ', 'ABcDefgHIj', 'ABcDefghIj', 'ABcDefghIJ', 'ABcDefghiJ', 'ABcDefghij', 'ABCDefghij', 'ABCDefghiJ', 'ABCDefghIJ', 'ABCDefghIj', 'ABCDefgHIj', 'ABCDefgHIJ', 'ABCDefgHiJ', 'ABCDefgHij', 'ABCDefGHij', 'ABCDefGHiJ', 'ABCDefGHIJ', 'ABCDefGHIj', 'ABCDefGhIj', 'ABCDefGhIJ', 'ABCDefGhiJ', 'ABCDefGhij', 'ABCDeFGhij', 'ABCDeFGhiJ', 'ABCDeFGhIJ', 'ABCDeFGhIj', 'ABCDeFGHIj', 'ABCDeFGHIJ', 'ABCDeFGHiJ', 'ABCDeFGHij', 'ABCDeFgHij', 'ABCDeFgHiJ', 'ABCDeFgHIJ', 'ABCDeFgHIj', 'ABCDeFghIj', 'ABCDeFghIJ', 'ABCDeFghiJ', 'ABCDeFghij', 'ABCDEFghij', 'ABCDEFghiJ', 'ABCDEFghIJ', 'ABCDEFghIj', 'ABCDEFgHIj', 'ABCDEFgHIJ', 'ABCDEFgHiJ', 'ABCDEFgHij', 'ABCDEFGHij', 'ABCDEFGHiJ', 'ABCDEFGHIJ', 'ABCDEFGHIj', 'ABCDEFGhIj', 'ABCDEFGhIJ', 'ABCDEFGhiJ', 'ABCDEFGhij', 'ABCDEfGhij', 'ABCDEfGhiJ', 'ABCDEfGhIJ', 'ABCDEfGhIj', 'ABCDEfGHIj', 'ABCDEfGHIJ', 'ABCDEfGHiJ', 'ABCDEfGHij', 'ABCDEfgHij', 'ABCDEfgHiJ', 'ABCDEfgHIJ', 'ABCDEfgHIj', 'ABCDEfghIj', 'ABCDEfghIJ', 'ABCDEfghiJ', 'ABCDEfghij', 'ABCdEfghij', 'ABCdEfghiJ', 'ABCdEfghIJ', 'ABCdEfghIj', 'ABCdEfgHIj', 'ABCdEfgHIJ', 'ABCdEfgHiJ', 'ABCdEfgHij', 'ABCdEfGHij', 'ABCdEfGHiJ', 'ABCdEfGHIJ', 'ABCdEfGHIj', 'ABCdEfGhIj', 'ABCdEfGhIJ', 'ABCdEfGhiJ', 'ABCdEfGhij', 'ABCdEFGhij', 'ABCdEFGhiJ', 'ABCdEFGhIJ', 'ABCdEFGhIj', 'ABCdEFGHIj', 'ABCdEFGHIJ', 'ABCdEFGHiJ', 'ABCdEFGHij', 'ABCdEFgHij', 'ABCdEFgHiJ', 'ABCdEFgHIJ', 'ABCdEFgHIj', 'ABCdEFghIj', 'ABCdEFghIJ', 'ABCdEFghiJ', 'ABCdEFghij', 'ABCdeFghij', 'ABCdeFghiJ', 'ABCdeFghIJ', 'ABCdeFghIj', 'ABCdeFgHIj', 'ABCdeFgHIJ', 'ABCdeFgHiJ', 'ABCdeFgHij', 'ABCdeFGHij', 'ABCdeFGHiJ', 'ABCdeFGHIJ', 'ABCdeFGHIj', 'ABCdeFGhIj', 'ABCdeFGhIJ', 'ABCdeFGhiJ', 'ABCdeFGhij', 'ABCdefGhij', 'ABCdefGhiJ', 'ABCdefGhIJ', 'ABCdefGhIj', 'ABCdefGHIj', 'ABCdefGHIJ', 'ABCdefGHiJ', 'ABCdefGHij', 'ABCdefgHij', 'ABCdefgHiJ', 'ABCdefgHIJ', 'ABCdefgHIj', 'ABCdefghIj', 'ABCdefghIJ', 'ABCdefghiJ', 'ABCdefghij', 'AbCdefghij', 'AbCdefghiJ', 'AbCdefghIJ', 'AbCdefghIj', 'AbCdefgHIj', 'AbCdefgHIJ', 'AbCdefgHiJ', 'AbCdefgHij', 'AbCdefGHij', 'AbCdefGHiJ', 'AbCdefGHIJ', 'AbCdefGHIj', 'AbCdefGhIj', 'AbCdefGhIJ', 'AbCdefGhiJ', 'AbCdefGhij', 'AbCdeFGhij', 'AbCdeFGhiJ', 'AbCdeFGhIJ', 'AbCdeFGhIj', 'AbCdeFGHIj', 'AbCdeFGHIJ', 'AbCdeFGHiJ', 'AbCdeFGHij', 'AbCdeFgHij', 'AbCdeFgHiJ', 'AbCdeFgHIJ', 'AbCdeFgHIj', 'AbCdeFghIj', 'AbCdeFghIJ', 'AbCdeFghiJ', 'AbCdeFghij', 'AbCdEFghij', 'AbCdEFghiJ', 'AbCdEFghIJ', 'AbCdEFghIj', 'AbCdEFgHIj', 'AbCdEFgHIJ', 'AbCdEFgHiJ', 'AbCdEFgHij', 'AbCdEFGHij', 'AbCdEFGHiJ', 'AbCdEFGHIJ', 'AbCdEFGHIj', 'AbCdEFGhIj', 'AbCdEFGhIJ', 'AbCdEFGhiJ', 'AbCdEFGhij', 'AbCdEfGhij', 'AbCdEfGhiJ', 'AbCdEfGhIJ', 'AbCdEfGhIj', 'AbCdEfGHIj', 'AbCdEfGHIJ', 'AbCdEfGHiJ', 'AbCdEfGHij', 'AbCdEfgHij', 'AbCdEfgHiJ', 'AbCdEfgHIJ', 'AbCdEfgHIj', 'AbCdEfghIj', 'AbCdEfghIJ', 'AbCdEfghiJ', 'AbCdEfghij', 'AbCDEfghij', 'AbCDEfghiJ', 'AbCDEfghIJ', 'AbCDEfghIj', 'AbCDEfgHIj', 'AbCDEfgHIJ', 'AbCDEfgHiJ', 'AbCDEfgHij', 'AbCDEfGHij', 'AbCDEfGHiJ', 'AbCDEfGHIJ', 'AbCDEfGHIj', 'AbCDEfGhIj', 'AbCDEfGhIJ', 'AbCDEfGhiJ', 'AbCDEfGhij', 'AbCDEFGhij', 'AbCDEFGhiJ', 'AbCDEFGhIJ', 'AbCDEFGhIj', 'AbCDEFGHIj', 'AbCDEFGHIJ', 'AbCDEFGHiJ', 'AbCDEFGHij', 'AbCDEFgHij', 'AbCDEFgHiJ', 'AbCDEFgHIJ', 'AbCDEFgHIj', 'AbCDEFghIj', 'AbCDEFghIJ', 'AbCDEFghiJ', 'AbCDEFghij', 'AbCDeFghij', 'AbCDeFghiJ', 'AbCDeFghIJ', 'AbCDeFghIj', 'AbCDeFgHIj', 'AbCDeFgHIJ', 'AbCDeFgHiJ', 'AbCDeFgHij', 'AbCDeFGHij', 'AbCDeFGHiJ', 'AbCDeFGHIJ', 'AbCDeFGHIj', 'AbCDeFGhIj', 'AbCDeFGhIJ', 'AbCDeFGhiJ', 'AbCDeFGhij', 'AbCDefGhij', 'AbCDefGhiJ', 'AbCDefGhIJ', 'AbCDefGhIj', 'AbCDefGHIj', 'AbCDefGHIJ', 'AbCDefGHiJ', 'AbCDefGHij', 'AbCDefgHij', 'AbCDefgHiJ', 'AbCDefgHIJ', 'AbCDefgHIj', 'AbCDefghIj', 'AbCDefghIJ', 'AbCDefghiJ', 'AbCDefghij', 'AbcDefghij', 'AbcDefghiJ', 'AbcDefghIJ', 'AbcDefghIj', 'AbcDefgHIj', 'AbcDefgHIJ', 'AbcDefgHiJ', 'AbcDefgHij', 'AbcDefGHij', 'AbcDefGHiJ', 'AbcDefGHIJ', 'AbcDefGHIj', 'AbcDefGhIj', 'AbcDefGhIJ', 'AbcDefGhiJ', 'AbcDefGhij', 'AbcDeFGhij', 'AbcDeFGhiJ', 'AbcDeFGhIJ', 'AbcDeFGhIj', 'AbcDeFGHIj', 'AbcDeFGHIJ', 'AbcDeFGHiJ', 'AbcDeFGHij', 'AbcDeFgHij', 'AbcDeFgHiJ', 'AbcDeFgHIJ', 'AbcDeFgHIj', 'AbcDeFghIj', 'AbcDeFghIJ', 'AbcDeFghiJ', 'AbcDeFghij', 'AbcDEFghij', 'AbcDEFghiJ', 'AbcDEFghIJ', 'AbcDEFghIj', 'AbcDEFgHIj', 'AbcDEFgHIJ', 'AbcDEFgHiJ', 'AbcDEFgHij', 'AbcDEFGHij', 'AbcDEFGHiJ', 'AbcDEFGHIJ', 'AbcDEFGHIj', 'AbcDEFGhIj', 'AbcDEFGhIJ', 'AbcDEFGhiJ', 'AbcDEFGhij', 'AbcDEfGhij', 'AbcDEfGhiJ', 'AbcDEfGhIJ', 'AbcDEfGhIj', 'AbcDEfGHIj', 'AbcDEfGHIJ', 'AbcDEfGHiJ', 'AbcDEfGHij', 'AbcDEfgHij', 'AbcDEfgHiJ', 'AbcDEfgHIJ', 'AbcDEfgHIj', 'AbcDEfghIj', 'AbcDEfghIJ', 'AbcDEfghiJ', 'AbcDEfghij', 'AbcdEfghij', 'AbcdEfghiJ', 'AbcdEfghIJ', 'AbcdEfghIj', 'AbcdEfgHIj', 'AbcdEfgHIJ', 'AbcdEfgHiJ', 'AbcdEfgHij', 'AbcdEfGHij', 'AbcdEfGHiJ', 'AbcdEfGHIJ', 'AbcdEfGHIj', 'AbcdEfGhIj', 'AbcdEfGhIJ', 'AbcdEfGhiJ', 'AbcdEfGhij', 'AbcdEFGhij', 'AbcdEFGhiJ', 'AbcdEFGhIJ', 'AbcdEFGhIj', 'AbcdEFGHIj', 'AbcdEFGHIJ', 'AbcdEFGHiJ', 'AbcdEFGHij', 'AbcdEFgHij', 'AbcdEFgHiJ', 'AbcdEFgHIJ', 'AbcdEFgHIj', 'AbcdEFghIj', 'AbcdEFghIJ', 'AbcdEFghiJ', 'AbcdEFghij', 'AbcdeFghij', 'AbcdeFghiJ', 'AbcdeFghIJ', 'AbcdeFghIj', 'AbcdeFgHIj', 'AbcdeFgHIJ', 'AbcdeFgHiJ', 'AbcdeFgHij', 'AbcdeFGHij', 'AbcdeFGHiJ', 'AbcdeFGHIJ', 'AbcdeFGHIj', 'AbcdeFGhIj', 'AbcdeFGhIJ', 'AbcdeFGhiJ', 'AbcdeFGhij', 'AbcdefGhij', 'AbcdefGhiJ', 'AbcdefGhIJ', 'AbcdefGhIj', 'AbcdefGHIj', 'AbcdefGHIJ', 'AbcdefGHiJ', 'AbcdefGHij', 'AbcdefgHij', 'AbcdefgHiJ', 'AbcdefgHIJ', 'AbcdefgHIj', 'AbcdefghIj', 'AbcdefghIJ', 'AbcdefghiJ', 'Abcdefghij'])\n assert answers_match(candidate(s='mNoPqR'), ['mNoPqR', 'mNoPqr', 'mNoPQr', 'mNoPQR', 'mNopQR', 'mNopQr', 'mNopqr', 'mNopqR', 'mNOpqR', 'mNOpqr', 'mNOpQr', 'mNOpQR', 'mNOPQR', 'mNOPQr', 'mNOPqr', 'mNOPqR', 'mnOPqR', 'mnOPqr', 'mnOPQr', 'mnOPQR', 'mnOpQR', 'mnOpQr', 'mnOpqr', 'mnOpqR', 'mnopqR', 'mnopqr', 'mnopQr', 'mnopQR', 'mnoPQR', 'mnoPQr', 'mnoPqr', 'mnoPqR', 'MnoPqR', 'MnoPqr', 'MnoPQr', 'MnoPQR', 'MnopQR', 'MnopQr', 'Mnopqr', 'MnopqR', 'MnOpqR', 'MnOpqr', 'MnOpQr', 'MnOpQR', 'MnOPQR', 'MnOPQr', 'MnOPqr', 'MnOPqR', 'MNOPqR', 'MNOPqr', 'MNOPQr', 'MNOPQR', 'MNOpQR', 'MNOpQr', 'MNOpqr', 'MNOpqR', 'MNopqR', 'MNopqr', 'MNopQr', 'MNopQR', 'MNoPQR', 'MNoPQr', 'MNoPqr', 'MNoPqR'])\n assert answers_match(candidate(s='hello123'), ['hello123', 'hellO123', 'helLO123', 'helLo123', 'heLLo123', 'heLLO123', 'heLlO123', 'heLlo123', 'hELlo123', 'hELlO123', 'hELLO123', 'hELLo123', 'hElLo123', 'hElLO123', 'hEllO123', 'hEllo123', 'HEllo123', 'HEllO123', 'HElLO123', 'HElLo123', 'HELLo123', 'HELLO123', 'HELlO123', 'HELlo123', 'HeLlo123', 'HeLlO123', 'HeLLO123', 'HeLLo123', 'HelLo123', 'HelLO123', 'HellO123', 'Hello123'])\n assert answers_match(candidate(s='aA1Bb2Cc3'), ['aA1Bb2Cc3', 'aA1Bb2CC3', 'aA1Bb2cC3', 'aA1Bb2cc3', 'aA1BB2cc3', 'aA1BB2cC3', 'aA1BB2CC3', 'aA1BB2Cc3', 'aA1bB2Cc3', 'aA1bB2CC3', 'aA1bB2cC3', 'aA1bB2cc3', 'aA1bb2cc3', 'aA1bb2cC3', 'aA1bb2CC3', 'aA1bb2Cc3', 'aa1bb2Cc3', 'aa1bb2CC3', 'aa1bb2cC3', 'aa1bb2cc3', 'aa1bB2cc3', 'aa1bB2cC3', 'aa1bB2CC3', 'aa1bB2Cc3', 'aa1BB2Cc3', 'aa1BB2CC3', 'aa1BB2cC3', 'aa1BB2cc3', 'aa1Bb2cc3', 'aa1Bb2cC3', 'aa1Bb2CC3', 'aa1Bb2Cc3', 'Aa1Bb2Cc3', 'Aa1Bb2CC3', 'Aa1Bb2cC3', 'Aa1Bb2cc3', 'Aa1BB2cc3', 'Aa1BB2cC3', 'Aa1BB2CC3', 'Aa1BB2Cc3', 'Aa1bB2Cc3', 'Aa1bB2CC3', 'Aa1bB2cC3', 'Aa1bB2cc3', 'Aa1bb2cc3', 'Aa1bb2cC3', 'Aa1bb2CC3', 'Aa1bb2Cc3', 'AA1bb2Cc3', 'AA1bb2CC3', 'AA1bb2cC3', 'AA1bb2cc3', 'AA1bB2cc3', 'AA1bB2cC3', 'AA1bB2CC3', 'AA1bB2Cc3', 'AA1BB2Cc3', 'AA1BB2CC3', 'AA1BB2cC3', 'AA1BB2cc3', 'AA1Bb2cc3', 'AA1Bb2cC3', 'AA1Bb2CC3', 'AA1Bb2Cc3'])\n assert answers_match(candidate(s='helloWORLD'), ['helloWORLD', 'helloWORLd', 'helloWORld', 'helloWORlD', 'helloWOrlD', 'helloWOrld', 'helloWOrLd', 'helloWOrLD', 'helloWorLD', 'helloWorLd', 'helloWorld', 'helloWorlD', 'helloWoRlD', 'helloWoRld', 'helloWoRLd', 'helloWoRLD', 'hellowoRLD', 'hellowoRLd', 'hellowoRld', 'hellowoRlD', 'helloworlD', 'helloworld', 'helloworLd', 'helloworLD', 'hellowOrLD', 'hellowOrLd', 'hellowOrld', 'hellowOrlD', 'hellowORlD', 'hellowORld', 'hellowORLd', 'hellowORLD', 'hellOwORLD', 'hellOwORLd', 'hellOwORld', 'hellOwORlD', 'hellOwOrlD', 'hellOwOrld', 'hellOwOrLd', 'hellOwOrLD', 'hellOworLD', 'hellOworLd', 'hellOworld', 'hellOworlD', 'hellOwoRlD', 'hellOwoRld', 'hellOwoRLd', 'hellOwoRLD', 'hellOWoRLD', 'hellOWoRLd', 'hellOWoRld', 'hellOWoRlD', 'hellOWorlD', 'hellOWorld', 'hellOWorLd', 'hellOWorLD', 'hellOWOrLD', 'hellOWOrLd', 'hellOWOrld', 'hellOWOrlD', 'hellOWORlD', 'hellOWORld', 'hellOWORLd', 'hellOWORLD', 'helLOWORLD', 'helLOWORLd', 'helLOWORld', 'helLOWORlD', 'helLOWOrlD', 'helLOWOrld', 'helLOWOrLd', 'helLOWOrLD', 'helLOWorLD', 'helLOWorLd', 'helLOWorld', 'helLOWorlD', 'helLOWoRlD', 'helLOWoRld', 'helLOWoRLd', 'helLOWoRLD', 'helLOwoRLD', 'helLOwoRLd', 'helLOwoRld', 'helLOwoRlD', 'helLOworlD', 'helLOworld', 'helLOworLd', 'helLOworLD', 'helLOwOrLD', 'helLOwOrLd', 'helLOwOrld', 'helLOwOrlD', 'helLOwORlD', 'helLOwORld', 'helLOwORLd', 'helLOwORLD', 'helLowORLD', 'helLowORLd', 'helLowORld', 'helLowORlD', 'helLowOrlD', 'helLowOrld', 'helLowOrLd', 'helLowOrLD', 'helLoworLD', 'helLoworLd', 'helLoworld', 'helLoworlD', 'helLowoRlD', 'helLowoRld', 'helLowoRLd', 'helLowoRLD', 'helLoWoRLD', 'helLoWoRLd', 'helLoWoRld', 'helLoWoRlD', 'helLoWorlD', 'helLoWorld', 'helLoWorLd', 'helLoWorLD', 'helLoWOrLD', 'helLoWOrLd', 'helLoWOrld', 'helLoWOrlD', 'helLoWORlD', 'helLoWORld', 'helLoWORLd', 'helLoWORLD', 'heLLoWORLD', 'heLLoWORLd', 'heLLoWORld', 'heLLoWORlD', 'heLLoWOrlD', 'heLLoWOrld', 'heLLoWOrLd', 'heLLoWOrLD', 'heLLoWorLD', 'heLLoWorLd', 'heLLoWorld', 'heLLoWorlD', 'heLLoWoRlD', 'heLLoWoRld', 'heLLoWoRLd', 'heLLoWoRLD', 'heLLowoRLD', 'heLLowoRLd', 'heLLowoRld', 'heLLowoRlD', 'heLLoworlD', 'heLLoworld', 'heLLoworLd', 'heLLoworLD', 'heLLowOrLD', 'heLLowOrLd', 'heLLowOrld', 'heLLowOrlD', 'heLLowORlD', 'heLLowORld', 'heLLowORLd', 'heLLowORLD', 'heLLOwORLD', 'heLLOwORLd', 'heLLOwORld', 'heLLOwORlD', 'heLLOwOrlD', 'heLLOwOrld', 'heLLOwOrLd', 'heLLOwOrLD', 'heLLOworLD', 'heLLOworLd', 'heLLOworld', 'heLLOworlD', 'heLLOwoRlD', 'heLLOwoRld', 'heLLOwoRLd', 'heLLOwoRLD', 'heLLOWoRLD', 'heLLOWoRLd', 'heLLOWoRld', 'heLLOWoRlD', 'heLLOWorlD', 'heLLOWorld', 'heLLOWorLd', 'heLLOWorLD', 'heLLOWOrLD', 'heLLOWOrLd', 'heLLOWOrld', 'heLLOWOrlD', 'heLLOWORlD', 'heLLOWORld', 'heLLOWORLd', 'heLLOWORLD', 'heLlOWORLD', 'heLlOWORLd', 'heLlOWORld', 'heLlOWORlD', 'heLlOWOrlD', 'heLlOWOrld', 'heLlOWOrLd', 'heLlOWOrLD', 'heLlOWorLD', 'heLlOWorLd', 'heLlOWorld', 'heLlOWorlD', 'heLlOWoRlD', 'heLlOWoRld', 'heLlOWoRLd', 'heLlOWoRLD', 'heLlOwoRLD', 'heLlOwoRLd', 'heLlOwoRld', 'heLlOwoRlD', 'heLlOworlD', 'heLlOworld', 'heLlOworLd', 'heLlOworLD', 'heLlOwOrLD', 'heLlOwOrLd', 'heLlOwOrld', 'heLlOwOrlD', 'heLlOwORlD', 'heLlOwORld', 'heLlOwORLd', 'heLlOwORLD', 'heLlowORLD', 'heLlowORLd', 'heLlowORld', 'heLlowORlD', 'heLlowOrlD', 'heLlowOrld', 'heLlowOrLd', 'heLlowOrLD', 'heLloworLD', 'heLloworLd', 'heLloworld', 'heLloworlD', 'heLlowoRlD', 'heLlowoRld', 'heLlowoRLd', 'heLlowoRLD', 'heLloWoRLD', 'heLloWoRLd', 'heLloWoRld', 'heLloWoRlD', 'heLloWorlD', 'heLloWorld', 'heLloWorLd', 'heLloWorLD', 'heLloWOrLD', 'heLloWOrLd', 'heLloWOrld', 'heLloWOrlD', 'heLloWORlD', 'heLloWORld', 'heLloWORLd', 'heLloWORLD', 'hELloWORLD', 'hELloWORLd', 'hELloWORld', 'hELloWORlD', 'hELloWOrlD', 'hELloWOrld', 'hELloWOrLd', 'hELloWOrLD', 'hELloWorLD', 'hELloWorLd', 'hELloWorld', 'hELloWorlD', 'hELloWoRlD', 'hELloWoRld', 'hELloWoRLd', 'hELloWoRLD', 'hELlowoRLD', 'hELlowoRLd', 'hELlowoRld', 'hELlowoRlD', 'hELloworlD', 'hELloworld', 'hELloworLd', 'hELloworLD', 'hELlowOrLD', 'hELlowOrLd', 'hELlowOrld', 'hELlowOrlD', 'hELlowORlD', 'hELlowORld', 'hELlowORLd', 'hELlowORLD', 'hELlOwORLD', 'hELlOwORLd', 'hELlOwORld', 'hELlOwORlD', 'hELlOwOrlD', 'hELlOwOrld', 'hELlOwOrLd', 'hELlOwOrLD', 'hELlOworLD', 'hELlOworLd', 'hELlOworld', 'hELlOworlD', 'hELlOwoRlD', 'hELlOwoRld', 'hELlOwoRLd', 'hELlOwoRLD', 'hELlOWoRLD', 'hELlOWoRLd', 'hELlOWoRld', 'hELlOWoRlD', 'hELlOWorlD', 'hELlOWorld', 'hELlOWorLd', 'hELlOWorLD', 'hELlOWOrLD', 'hELlOWOrLd', 'hELlOWOrld', 'hELlOWOrlD', 'hELlOWORlD', 'hELlOWORld', 'hELlOWORLd', 'hELlOWORLD', 'hELLOWORLD', 'hELLOWORLd', 'hELLOWORld', 'hELLOWORlD', 'hELLOWOrlD', 'hELLOWOrld', 'hELLOWOrLd', 'hELLOWOrLD', 'hELLOWorLD', 'hELLOWorLd', 'hELLOWorld', 'hELLOWorlD', 'hELLOWoRlD', 'hELLOWoRld', 'hELLOWoRLd', 'hELLOWoRLD', 'hELLOwoRLD', 'hELLOwoRLd', 'hELLOwoRld', 'hELLOwoRlD', 'hELLOworlD', 'hELLOworld', 'hELLOworLd', 'hELLOworLD', 'hELLOwOrLD', 'hELLOwOrLd', 'hELLOwOrld', 'hELLOwOrlD', 'hELLOwORlD', 'hELLOwORld', 'hELLOwORLd', 'hELLOwORLD', 'hELLowORLD', 'hELLowORLd', 'hELLowORld', 'hELLowORlD', 'hELLowOrlD', 'hELLowOrld', 'hELLowOrLd', 'hELLowOrLD', 'hELLoworLD', 'hELLoworLd', 'hELLoworld', 'hELLoworlD', 'hELLowoRlD', 'hELLowoRld', 'hELLowoRLd', 'hELLowoRLD', 'hELLoWoRLD', 'hELLoWoRLd', 'hELLoWoRld', 'hELLoWoRlD', 'hELLoWorlD', 'hELLoWorld', 'hELLoWorLd', 'hELLoWorLD', 'hELLoWOrLD', 'hELLoWOrLd', 'hELLoWOrld', 'hELLoWOrlD', 'hELLoWORlD', 'hELLoWORld', 'hELLoWORLd', 'hELLoWORLD', 'hElLoWORLD', 'hElLoWORLd', 'hElLoWORld', 'hElLoWORlD', 'hElLoWOrlD', 'hElLoWOrld', 'hElLoWOrLd', 'hElLoWOrLD', 'hElLoWorLD', 'hElLoWorLd', 'hElLoWorld', 'hElLoWorlD', 'hElLoWoRlD', 'hElLoWoRld', 'hElLoWoRLd', 'hElLoWoRLD', 'hElLowoRLD', 'hElLowoRLd', 'hElLowoRld', 'hElLowoRlD', 'hElLoworlD', 'hElLoworld', 'hElLoworLd', 'hElLoworLD', 'hElLowOrLD', 'hElLowOrLd', 'hElLowOrld', 'hElLowOrlD', 'hElLowORlD', 'hElLowORld', 'hElLowORLd', 'hElLowORLD', 'hElLOwORLD', 'hElLOwORLd', 'hElLOwORld', 'hElLOwORlD', 'hElLOwOrlD', 'hElLOwOrld', 'hElLOwOrLd', 'hElLOwOrLD', 'hElLOworLD', 'hElLOworLd', 'hElLOworld', 'hElLOworlD', 'hElLOwoRlD', 'hElLOwoRld', 'hElLOwoRLd', 'hElLOwoRLD', 'hElLOWoRLD', 'hElLOWoRLd', 'hElLOWoRld', 'hElLOWoRlD', 'hElLOWorlD', 'hElLOWorld', 'hElLOWorLd', 'hElLOWorLD', 'hElLOWOrLD', 'hElLOWOrLd', 'hElLOWOrld', 'hElLOWOrlD', 'hElLOWORlD', 'hElLOWORld', 'hElLOWORLd', 'hElLOWORLD', 'hEllOWORLD', 'hEllOWORLd', 'hEllOWORld', 'hEllOWORlD', 'hEllOWOrlD', 'hEllOWOrld', 'hEllOWOrLd', 'hEllOWOrLD', 'hEllOWorLD', 'hEllOWorLd', 'hEllOWorld', 'hEllOWorlD', 'hEllOWoRlD', 'hEllOWoRld', 'hEllOWoRLd', 'hEllOWoRLD', 'hEllOwoRLD', 'hEllOwoRLd', 'hEllOwoRld', 'hEllOwoRlD', 'hEllOworlD', 'hEllOworld', 'hEllOworLd', 'hEllOworLD', 'hEllOwOrLD', 'hEllOwOrLd', 'hEllOwOrld', 'hEllOwOrlD', 'hEllOwORlD', 'hEllOwORld', 'hEllOwORLd', 'hEllOwORLD', 'hEllowORLD', 'hEllowORLd', 'hEllowORld', 'hEllowORlD', 'hEllowOrlD', 'hEllowOrld', 'hEllowOrLd', 'hEllowOrLD', 'hElloworLD', 'hElloworLd', 'hElloworld', 'hElloworlD', 'hEllowoRlD', 'hEllowoRld', 'hEllowoRLd', 'hEllowoRLD', 'hElloWoRLD', 'hElloWoRLd', 'hElloWoRld', 'hElloWoRlD', 'hElloWorlD', 'hElloWorld', 'hElloWorLd', 'hElloWorLD', 'hElloWOrLD', 'hElloWOrLd', 'hElloWOrld', 'hElloWOrlD', 'hElloWORlD', 'hElloWORld', 'hElloWORLd', 'hElloWORLD', 'HElloWORLD', 'HElloWORLd', 'HElloWORld', 'HElloWORlD', 'HElloWOrlD', 'HElloWOrld', 'HElloWOrLd', 'HElloWOrLD', 'HElloWorLD', 'HElloWorLd', 'HElloWorld', 'HElloWorlD', 'HElloWoRlD', 'HElloWoRld', 'HElloWoRLd', 'HElloWoRLD', 'HEllowoRLD', 'HEllowoRLd', 'HEllowoRld', 'HEllowoRlD', 'HElloworlD', 'HElloworld', 'HElloworLd', 'HElloworLD', 'HEllowOrLD', 'HEllowOrLd', 'HEllowOrld', 'HEllowOrlD', 'HEllowORlD', 'HEllowORld', 'HEllowORLd', 'HEllowORLD', 'HEllOwORLD', 'HEllOwORLd', 'HEllOwORld', 'HEllOwORlD', 'HEllOwOrlD', 'HEllOwOrld', 'HEllOwOrLd', 'HEllOwOrLD', 'HEllOworLD', 'HEllOworLd', 'HEllOworld', 'HEllOworlD', 'HEllOwoRlD', 'HEllOwoRld', 'HEllOwoRLd', 'HEllOwoRLD', 'HEllOWoRLD', 'HEllOWoRLd', 'HEllOWoRld', 'HEllOWoRlD', 'HEllOWorlD', 'HEllOWorld', 'HEllOWorLd', 'HEllOWorLD', 'HEllOWOrLD', 'HEllOWOrLd', 'HEllOWOrld', 'HEllOWOrlD', 'HEllOWORlD', 'HEllOWORld', 'HEllOWORLd', 'HEllOWORLD', 'HElLOWORLD', 'HElLOWORLd', 'HElLOWORld', 'HElLOWORlD', 'HElLOWOrlD', 'HElLOWOrld', 'HElLOWOrLd', 'HElLOWOrLD', 'HElLOWorLD', 'HElLOWorLd', 'HElLOWorld', 'HElLOWorlD', 'HElLOWoRlD', 'HElLOWoRld', 'HElLOWoRLd', 'HElLOWoRLD', 'HElLOwoRLD', 'HElLOwoRLd', 'HElLOwoRld', 'HElLOwoRlD', 'HElLOworlD', 'HElLOworld', 'HElLOworLd', 'HElLOworLD', 'HElLOwOrLD', 'HElLOwOrLd', 'HElLOwOrld', 'HElLOwOrlD', 'HElLOwORlD', 'HElLOwORld', 'HElLOwORLd', 'HElLOwORLD', 'HElLowORLD', 'HElLowORLd', 'HElLowORld', 'HElLowORlD', 'HElLowOrlD', 'HElLowOrld', 'HElLowOrLd', 'HElLowOrLD', 'HElLoworLD', 'HElLoworLd', 'HElLoworld', 'HElLoworlD', 'HElLowoRlD', 'HElLowoRld', 'HElLowoRLd', 'HElLowoRLD', 'HElLoWoRLD', 'HElLoWoRLd', 'HElLoWoRld', 'HElLoWoRlD', 'HElLoWorlD', 'HElLoWorld', 'HElLoWorLd', 'HElLoWorLD', 'HElLoWOrLD', 'HElLoWOrLd', 'HElLoWOrld', 'HElLoWOrlD', 'HElLoWORlD', 'HElLoWORld', 'HElLoWORLd', 'HElLoWORLD', 'HELLoWORLD', 'HELLoWORLd', 'HELLoWORld', 'HELLoWORlD', 'HELLoWOrlD', 'HELLoWOrld', 'HELLoWOrLd', 'HELLoWOrLD', 'HELLoWorLD', 'HELLoWorLd', 'HELLoWorld', 'HELLoWorlD', 'HELLoWoRlD', 'HELLoWoRld', 'HELLoWoRLd', 'HELLoWoRLD', 'HELLowoRLD', 'HELLowoRLd', 'HELLowoRld', 'HELLowoRlD', 'HELLoworlD', 'HELLoworld', 'HELLoworLd', 'HELLoworLD', 'HELLowOrLD', 'HELLowOrLd', 'HELLowOrld', 'HELLowOrlD', 'HELLowORlD', 'HELLowORld', 'HELLowORLd', 'HELLowORLD', 'HELLOwORLD', 'HELLOwORLd', 'HELLOwORld', 'HELLOwORlD', 'HELLOwOrlD', 'HELLOwOrld', 'HELLOwOrLd', 'HELLOwOrLD', 'HELLOworLD', 'HELLOworLd', 'HELLOworld', 'HELLOworlD', 'HELLOwoRlD', 'HELLOwoRld', 'HELLOwoRLd', 'HELLOwoRLD', 'HELLOWoRLD', 'HELLOWoRLd', 'HELLOWoRld', 'HELLOWoRlD', 'HELLOWorlD', 'HELLOWorld', 'HELLOWorLd', 'HELLOWorLD', 'HELLOWOrLD', 'HELLOWOrLd', 'HELLOWOrld', 'HELLOWOrlD', 'HELLOWORlD', 'HELLOWORld', 'HELLOWORLd', 'HELLOWORLD', 'HELlOWORLD', 'HELlOWORLd', 'HELlOWORld', 'HELlOWORlD', 'HELlOWOrlD', 'HELlOWOrld', 'HELlOWOrLd', 'HELlOWOrLD', 'HELlOWorLD', 'HELlOWorLd', 'HELlOWorld', 'HELlOWorlD', 'HELlOWoRlD', 'HELlOWoRld', 'HELlOWoRLd', 'HELlOWoRLD', 'HELlOwoRLD', 'HELlOwoRLd', 'HELlOwoRld', 'HELlOwoRlD', 'HELlOworlD', 'HELlOworld', 'HELlOworLd', 'HELlOworLD', 'HELlOwOrLD', 'HELlOwOrLd', 'HELlOwOrld', 'HELlOwOrlD', 'HELlOwORlD', 'HELlOwORld', 'HELlOwORLd', 'HELlOwORLD', 'HELlowORLD', 'HELlowORLd', 'HELlowORld', 'HELlowORlD', 'HELlowOrlD', 'HELlowOrld', 'HELlowOrLd', 'HELlowOrLD', 'HELloworLD', 'HELloworLd', 'HELloworld', 'HELloworlD', 'HELlowoRlD', 'HELlowoRld', 'HELlowoRLd', 'HELlowoRLD', 'HELloWoRLD', 'HELloWoRLd', 'HELloWoRld', 'HELloWoRlD', 'HELloWorlD', 'HELloWorld', 'HELloWorLd', 'HELloWorLD', 'HELloWOrLD', 'HELloWOrLd', 'HELloWOrld', 'HELloWOrlD', 'HELloWORlD', 'HELloWORld', 'HELloWORLd', 'HELloWORLD', 'HeLloWORLD', 'HeLloWORLd', 'HeLloWORld', 'HeLloWORlD', 'HeLloWOrlD', 'HeLloWOrld', 'HeLloWOrLd', 'HeLloWOrLD', 'HeLloWorLD', 'HeLloWorLd', 'HeLloWorld', 'HeLloWorlD', 'HeLloWoRlD', 'HeLloWoRld', 'HeLloWoRLd', 'HeLloWoRLD', 'HeLlowoRLD', 'HeLlowoRLd', 'HeLlowoRld', 'HeLlowoRlD', 'HeLloworlD', 'HeLloworld', 'HeLloworLd', 'HeLloworLD', 'HeLlowOrLD', 'HeLlowOrLd', 'HeLlowOrld', 'HeLlowOrlD', 'HeLlowORlD', 'HeLlowORld', 'HeLlowORLd', 'HeLlowORLD', 'HeLlOwORLD', 'HeLlOwORLd', 'HeLlOwORld', 'HeLlOwORlD', 'HeLlOwOrlD', 'HeLlOwOrld', 'HeLlOwOrLd', 'HeLlOwOrLD', 'HeLlOworLD', 'HeLlOworLd', 'HeLlOworld', 'HeLlOworlD', 'HeLlOwoRlD', 'HeLlOwoRld', 'HeLlOwoRLd', 'HeLlOwoRLD', 'HeLlOWoRLD', 'HeLlOWoRLd', 'HeLlOWoRld', 'HeLlOWoRlD', 'HeLlOWorlD', 'HeLlOWorld', 'HeLlOWorLd', 'HeLlOWorLD', 'HeLlOWOrLD', 'HeLlOWOrLd', 'HeLlOWOrld', 'HeLlOWOrlD', 'HeLlOWORlD', 'HeLlOWORld', 'HeLlOWORLd', 'HeLlOWORLD', 'HeLLOWORLD', 'HeLLOWORLd', 'HeLLOWORld', 'HeLLOWORlD', 'HeLLOWOrlD', 'HeLLOWOrld', 'HeLLOWOrLd', 'HeLLOWOrLD', 'HeLLOWorLD', 'HeLLOWorLd', 'HeLLOWorld', 'HeLLOWorlD', 'HeLLOWoRlD', 'HeLLOWoRld', 'HeLLOWoRLd', 'HeLLOWoRLD', 'HeLLOwoRLD', 'HeLLOwoRLd', 'HeLLOwoRld', 'HeLLOwoRlD', 'HeLLOworlD', 'HeLLOworld', 'HeLLOworLd', 'HeLLOworLD', 'HeLLOwOrLD', 'HeLLOwOrLd', 'HeLLOwOrld', 'HeLLOwOrlD', 'HeLLOwORlD', 'HeLLOwORld', 'HeLLOwORLd', 'HeLLOwORLD', 'HeLLowORLD', 'HeLLowORLd', 'HeLLowORld', 'HeLLowORlD', 'HeLLowOrlD', 'HeLLowOrld', 'HeLLowOrLd', 'HeLLowOrLD', 'HeLLoworLD', 'HeLLoworLd', 'HeLLoworld', 'HeLLoworlD', 'HeLLowoRlD', 'HeLLowoRld', 'HeLLowoRLd', 'HeLLowoRLD', 'HeLLoWoRLD', 'HeLLoWoRLd', 'HeLLoWoRld', 'HeLLoWoRlD', 'HeLLoWorlD', 'HeLLoWorld', 'HeLLoWorLd', 'HeLLoWorLD', 'HeLLoWOrLD', 'HeLLoWOrLd', 'HeLLoWOrld', 'HeLLoWOrlD', 'HeLLoWORlD', 'HeLLoWORld', 'HeLLoWORLd', 'HeLLoWORLD', 'HelLoWORLD', 'HelLoWORLd', 'HelLoWORld', 'HelLoWORlD', 'HelLoWOrlD', 'HelLoWOrld', 'HelLoWOrLd', 'HelLoWOrLD', 'HelLoWorLD', 'HelLoWorLd', 'HelLoWorld', 'HelLoWorlD', 'HelLoWoRlD', 'HelLoWoRld', 'HelLoWoRLd', 'HelLoWoRLD', 'HelLowoRLD', 'HelLowoRLd', 'HelLowoRld', 'HelLowoRlD', 'HelLoworlD', 'HelLoworld', 'HelLoworLd', 'HelLoworLD', 'HelLowOrLD', 'HelLowOrLd', 'HelLowOrld', 'HelLowOrlD', 'HelLowORlD', 'HelLowORld', 'HelLowORLd', 'HelLowORLD', 'HelLOwORLD', 'HelLOwORLd', 'HelLOwORld', 'HelLOwORlD', 'HelLOwOrlD', 'HelLOwOrld', 'HelLOwOrLd', 'HelLOwOrLD', 'HelLOworLD', 'HelLOworLd', 'HelLOworld', 'HelLOworlD', 'HelLOwoRlD', 'HelLOwoRld', 'HelLOwoRLd', 'HelLOwoRLD', 'HelLOWoRLD', 'HelLOWoRLd', 'HelLOWoRld', 'HelLOWoRlD', 'HelLOWorlD', 'HelLOWorld', 'HelLOWorLd', 'HelLOWorLD', 'HelLOWOrLD', 'HelLOWOrLd', 'HelLOWOrld', 'HelLOWOrlD', 'HelLOWORlD', 'HelLOWORld', 'HelLOWORLd', 'HelLOWORLD', 'HellOWORLD', 'HellOWORLd', 'HellOWORld', 'HellOWORlD', 'HellOWOrlD', 'HellOWOrld', 'HellOWOrLd', 'HellOWOrLD', 'HellOWorLD', 'HellOWorLd', 'HellOWorld', 'HellOWorlD', 'HellOWoRlD', 'HellOWoRld', 'HellOWoRLd', 'HellOWoRLD', 'HellOwoRLD', 'HellOwoRLd', 'HellOwoRld', 'HellOwoRlD', 'HellOworlD', 'HellOworld', 'HellOworLd', 'HellOworLD', 'HellOwOrLD', 'HellOwOrLd', 'HellOwOrld', 'HellOwOrlD', 'HellOwORlD', 'HellOwORld', 'HellOwORLd', 'HellOwORLD', 'HellowORLD', 'HellowORLd', 'HellowORld', 'HellowORlD', 'HellowOrlD', 'HellowOrld', 'HellowOrLd', 'HellowOrLD', 'HelloworLD', 'HelloworLd', 'Helloworld', 'HelloworlD', 'HellowoRlD', 'HellowoRld', 'HellowoRLd', 'HellowoRLD', 'HelloWoRLD', 'HelloWoRLd', 'HelloWoRld', 'HelloWoRlD', 'HelloWorlD', 'HelloWorld', 'HelloWorLd', 'HelloWorLD', 'HelloWOrLD', 'HelloWOrLd', 'HelloWOrld', 'HelloWOrlD', 'HelloWORlD', 'HelloWORld', 'HelloWORLd', 'HelloWORLD'])\n assert answers_match(candidate(s='A1bC2dE3'), ['A1bC2dE3', 'A1bC2de3', 'A1bC2De3', 'A1bC2DE3', 'A1bc2DE3', 'A1bc2De3', 'A1bc2de3', 'A1bc2dE3', 'A1Bc2dE3', 'A1Bc2de3', 'A1Bc2De3', 'A1Bc2DE3', 'A1BC2DE3', 'A1BC2De3', 'A1BC2de3', 'A1BC2dE3', 'a1BC2dE3', 'a1BC2de3', 'a1BC2De3', 'a1BC2DE3', 'a1Bc2DE3', 'a1Bc2De3', 'a1Bc2de3', 'a1Bc2dE3', 'a1bc2dE3', 'a1bc2de3', 'a1bc2De3', 'a1bc2DE3', 'a1bC2DE3', 'a1bC2De3', 'a1bC2de3', 'a1bC2dE3'])\n assert answers_match(candidate(s='abcdefg'), ['abcdefg', 'abcdefG', 'abcdeFG', 'abcdeFg', 'abcdEFg', 'abcdEFG', 'abcdEfG', 'abcdEfg', 'abcDEfg', 'abcDEfG', 'abcDEFG', 'abcDEFg', 'abcDeFg', 'abcDeFG', 'abcDefG', 'abcDefg', 'abCDefg', 'abCDefG', 'abCDeFG', 'abCDeFg', 'abCDEFg', 'abCDEFG', 'abCDEfG', 'abCDEfg', 'abCdEfg', 'abCdEfG', 'abCdEFG', 'abCdEFg', 'abCdeFg', 'abCdeFG', 'abCdefG', 'abCdefg', 'aBCdefg', 'aBCdefG', 'aBCdeFG', 'aBCdeFg', 'aBCdEFg', 'aBCdEFG', 'aBCdEfG', 'aBCdEfg', 'aBCDEfg', 'aBCDEfG', 'aBCDEFG', 'aBCDEFg', 'aBCDeFg', 'aBCDeFG', 'aBCDefG', 'aBCDefg', 'aBcDefg', 'aBcDefG', 'aBcDeFG', 'aBcDeFg', 'aBcDEFg', 'aBcDEFG', 'aBcDEfG', 'aBcDEfg', 'aBcdEfg', 'aBcdEfG', 'aBcdEFG', 'aBcdEFg', 'aBcdeFg', 'aBcdeFG', 'aBcdefG', 'aBcdefg', 'ABcdefg', 'ABcdefG', 'ABcdeFG', 'ABcdeFg', 'ABcdEFg', 'ABcdEFG', 'ABcdEfG', 'ABcdEfg', 'ABcDEfg', 'ABcDEfG', 'ABcDEFG', 'ABcDEFg', 'ABcDeFg', 'ABcDeFG', 'ABcDefG', 'ABcDefg', 'ABCDefg', 'ABCDefG', 'ABCDeFG', 'ABCDeFg', 'ABCDEFg', 'ABCDEFG', 'ABCDEfG', 'ABCDEfg', 'ABCdEfg', 'ABCdEfG', 'ABCdEFG', 'ABCdEFg', 'ABCdeFg', 'ABCdeFG', 'ABCdefG', 'ABCdefg', 'AbCdefg', 'AbCdefG', 'AbCdeFG', 'AbCdeFg', 'AbCdEFg', 'AbCdEFG', 'AbCdEfG', 'AbCdEfg', 'AbCDEfg', 'AbCDEfG', 'AbCDEFG', 'AbCDEFg', 'AbCDeFg', 'AbCDeFG', 'AbCDefG', 'AbCDefg', 'AbcDefg', 'AbcDefG', 'AbcDeFG', 'AbcDeFg', 'AbcDEFg', 'AbcDEFG', 'AbcDEfG', 'AbcDEfg', 'AbcdEfg', 'AbcdEfG', 'AbcdEFG', 'AbcdEFg', 'AbcdeFg', 'AbcdeFG', 'AbcdefG', 'Abcdefg'])\n assert answers_match(candidate(s='0a1B2'), ['0a1B2', '0a1b2', '0A1b2', '0A1B2'])\n assert answers_match(candidate(s='1A2B3C4D'), ['1A2B3C4D', '1A2B3C4d', '1A2B3c4d', '1A2B3c4D', '1A2b3c4D', '1A2b3c4d', '1A2b3C4d', '1A2b3C4D', '1a2b3C4D', '1a2b3C4d', '1a2b3c4d', '1a2b3c4D', '1a2B3c4D', '1a2B3c4d', '1a2B3C4d', '1a2B3C4D'])\n assert answers_match(candidate(s='z9Y8X7W6'), ['z9Y8X7W6', 'z9Y8X7w6', 'z9Y8x7w6', 'z9Y8x7W6', 'z9y8x7W6', 'z9y8x7w6', 'z9y8X7w6', 'z9y8X7W6', 'Z9y8X7W6', 'Z9y8X7w6', 'Z9y8x7w6', 'Z9y8x7W6', 'Z9Y8x7W6', 'Z9Y8x7w6', 'Z9Y8X7w6', 'Z9Y8X7W6'])\n assert answers_match(candidate(s='A1bC2d3'), ['A1bC2d3', 'A1bC2D3', 'A1bc2D3', 'A1bc2d3', 'A1Bc2d3', 'A1Bc2D3', 'A1BC2D3', 'A1BC2d3', 'a1BC2d3', 'a1BC2D3', 'a1Bc2D3', 'a1Bc2d3', 'a1bc2d3', 'a1bc2D3', 'a1bC2D3', 'a1bC2d3'])\n assert answers_match(candidate(s='12abc34'), ['12abc34', '12abC34', '12aBC34', '12aBc34', '12ABc34', '12ABC34', '12AbC34', '12Abc34'])\n assert answers_match(candidate(s='0000'), ['0000'])\n assert answers_match(candidate(s='mN9oP'), ['mN9oP', 'mN9op', 'mN9Op', 'mN9OP', 'mn9OP', 'mn9Op', 'mn9op', 'mn9oP', 'Mn9oP', 'Mn9op', 'Mn9Op', 'Mn9OP', 'MN9OP', 'MN9Op', 'MN9op', 'MN9oP'])\n assert answers_match(candidate(s='0xYz9'), ['0xYz9', '0xYZ9', '0xyZ9', '0xyz9', '0Xyz9', '0XyZ9', '0XYZ9', '0XYz9'])\n assert answers_match(candidate(s='A1b2C3d4'), ['A1b2C3d4', 'A1b2C3D4', 'A1b2c3D4', 'A1b2c3d4', 'A1B2c3d4', 'A1B2c3D4', 'A1B2C3D4', 'A1B2C3d4', 'a1B2C3d4', 'a1B2C3D4', 'a1B2c3D4', 'a1B2c3d4', 'a1b2c3d4', 'a1b2c3D4', 'a1b2C3D4', 'a1b2C3d4'])\n assert answers_match(candidate(s='XyZ'), ['XyZ', 'Xyz', 'XYz', 'XYZ', 'xYZ', 'xYz', 'xyz', 'xyZ'])\n assert answers_match(candidate(s='aBcDe'), ['aBcDe', 'aBcDE', 'aBcdE', 'aBcde', 'aBCde', 'aBCdE', 'aBCDE', 'aBCDe', 'abCDe', 'abCDE', 'abCdE', 'abCde', 'abcde', 'abcdE', 'abcDE', 'abcDe', 'AbcDe', 'AbcDE', 'AbcdE', 'Abcde', 'AbCde', 'AbCdE', 'AbCDE', 'AbCDe', 'ABCDe', 'ABCDE', 'ABCdE', 'ABCde', 'ABcde', 'ABcdE', 'ABcDE', 'ABcDe'])\n assert answers_match(candidate(s='W3R5T'), ['W3R5T', 'W3R5t', 'W3r5t', 'W3r5T', 'w3r5T', 'w3r5t', 'w3R5t', 'w3R5T'])\n assert answers_match(candidate(s='a1B2C3'), ['a1B2C3', 'a1B2c3', 'a1b2c3', 'a1b2C3', 'A1b2C3', 'A1b2c3', 'A1B2c3', 'A1B2C3'])\n assert answers_match(candidate(s='xYz0A1b2C3'), ['xYz0A1b2C3', 'xYz0A1b2c3', 'xYz0A1B2c3', 'xYz0A1B2C3', 'xYz0a1B2C3', 'xYz0a1B2c3', 'xYz0a1b2c3', 'xYz0a1b2C3', 'xYZ0a1b2C3', 'xYZ0a1b2c3', 'xYZ0a1B2c3', 'xYZ0a1B2C3', 'xYZ0A1B2C3', 'xYZ0A1B2c3', 'xYZ0A1b2c3', 'xYZ0A1b2C3', 'xyZ0A1b2C3', 'xyZ0A1b2c3', 'xyZ0A1B2c3', 'xyZ0A1B2C3', 'xyZ0a1B2C3', 'xyZ0a1B2c3', 'xyZ0a1b2c3', 'xyZ0a1b2C3', 'xyz0a1b2C3', 'xyz0a1b2c3', 'xyz0a1B2c3', 'xyz0a1B2C3', 'xyz0A1B2C3', 'xyz0A1B2c3', 'xyz0A1b2c3', 'xyz0A1b2C3', 'Xyz0A1b2C3', 'Xyz0A1b2c3', 'Xyz0A1B2c3', 'Xyz0A1B2C3', 'Xyz0a1B2C3', 'Xyz0a1B2c3', 'Xyz0a1b2c3', 'Xyz0a1b2C3', 'XyZ0a1b2C3', 'XyZ0a1b2c3', 'XyZ0a1B2c3', 'XyZ0a1B2C3', 'XyZ0A1B2C3', 'XyZ0A1B2c3', 'XyZ0A1b2c3', 'XyZ0A1b2C3', 'XYZ0A1b2C3', 'XYZ0A1b2c3', 'XYZ0A1B2c3', 'XYZ0A1B2C3', 'XYZ0a1B2C3', 'XYZ0a1B2c3', 'XYZ0a1b2c3', 'XYZ0a1b2C3', 'XYz0a1b2C3', 'XYz0a1b2c3', 'XYz0a1B2c3', 'XYz0a1B2C3', 'XYz0A1B2C3', 'XYz0A1B2c3', 'XYz0A1b2c3', 'XYz0A1b2C3'])\n assert answers_match(candidate(s='aBc123D'), ['aBc123D', 'aBc123d', 'aBC123d', 'aBC123D', 'abC123D', 'abC123d', 'abc123d', 'abc123D', 'Abc123D', 'Abc123d', 'AbC123d', 'AbC123D', 'ABC123D', 'ABC123d', 'ABc123d', 'ABc123D'])\n assert answers_match(candidate(s='987abc654'), ['987abc654', '987abC654', '987aBC654', '987aBc654', '987ABc654', '987ABC654', '987AbC654', '987Abc654'])\n assert answers_match(candidate(s='A1bC2d3E4f'), ['A1bC2d3E4f', 'A1bC2d3E4F', 'A1bC2d3e4F', 'A1bC2d3e4f', 'A1bC2D3e4f', 'A1bC2D3e4F', 'A1bC2D3E4F', 'A1bC2D3E4f', 'A1bc2D3E4f', 'A1bc2D3E4F', 'A1bc2D3e4F', 'A1bc2D3e4f', 'A1bc2d3e4f', 'A1bc2d3e4F', 'A1bc2d3E4F', 'A1bc2d3E4f', 'A1Bc2d3E4f', 'A1Bc2d3E4F', 'A1Bc2d3e4F', 'A1Bc2d3e4f', 'A1Bc2D3e4f', 'A1Bc2D3e4F', 'A1Bc2D3E4F', 'A1Bc2D3E4f', 'A1BC2D3E4f', 'A1BC2D3E4F', 'A1BC2D3e4F', 'A1BC2D3e4f', 'A1BC2d3e4f', 'A1BC2d3e4F', 'A1BC2d3E4F', 'A1BC2d3E4f', 'a1BC2d3E4f', 'a1BC2d3E4F', 'a1BC2d3e4F', 'a1BC2d3e4f', 'a1BC2D3e4f', 'a1BC2D3e4F', 'a1BC2D3E4F', 'a1BC2D3E4f', 'a1Bc2D3E4f', 'a1Bc2D3E4F', 'a1Bc2D3e4F', 'a1Bc2D3e4f', 'a1Bc2d3e4f', 'a1Bc2d3e4F', 'a1Bc2d3E4F', 'a1Bc2d3E4f', 'a1bc2d3E4f', 'a1bc2d3E4F', 'a1bc2d3e4F', 'a1bc2d3e4f', 'a1bc2D3e4f', 'a1bc2D3e4F', 'a1bc2D3E4F', 'a1bc2D3E4f', 'a1bC2D3E4f', 'a1bC2D3E4F', 'a1bC2D3e4F', 'a1bC2D3e4f', 'a1bC2d3e4f', 'a1bC2d3e4F', 'a1bC2d3E4F', 'a1bC2d3E4f'])\n assert answers_match(candidate(s='1a2B3c4D5'), ['1a2B3c4D5', '1a2B3c4d5', '1a2B3C4d5', '1a2B3C4D5', '1a2b3C4D5', '1a2b3C4d5', '1a2b3c4d5', '1a2b3c4D5', '1A2b3c4D5', '1A2b3c4d5', '1A2b3C4d5', '1A2b3C4D5', '1A2B3C4D5', '1A2B3C4d5', '1A2B3c4d5', '1A2B3c4D5'])\n assert answers_match(candidate(s='123abcXYZ'), ['123abcXYZ', '123abcXYz', '123abcXyz', '123abcXyZ', '123abcxyZ', '123abcxyz', '123abcxYz', '123abcxYZ', '123abCxYZ', '123abCxYz', '123abCxyz', '123abCxyZ', '123abCXyZ', '123abCXyz', '123abCXYz', '123abCXYZ', '123aBCXYZ', '123aBCXYz', '123aBCXyz', '123aBCXyZ', '123aBCxyZ', '123aBCxyz', '123aBCxYz', '123aBCxYZ', '123aBcxYZ', '123aBcxYz', '123aBcxyz', '123aBcxyZ', '123aBcXyZ', '123aBcXyz', '123aBcXYz', '123aBcXYZ', '123ABcXYZ', '123ABcXYz', '123ABcXyz', '123ABcXyZ', '123ABcxyZ', '123ABcxyz', '123ABcxYz', '123ABcxYZ', '123ABCxYZ', '123ABCxYz', '123ABCxyz', '123ABCxyZ', '123ABCXyZ', '123ABCXyz', '123ABCXYz', '123ABCXYZ', '123AbCXYZ', '123AbCXYz', '123AbCXyz', '123AbCXyZ', '123AbCxyZ', '123AbCxyz', '123AbCxYz', '123AbCxYZ', '123AbcxYZ', '123AbcxYz', '123Abcxyz', '123AbcxyZ', '123AbcXyZ', '123AbcXyz', '123AbcXYz', '123AbcXYZ'])\n assert answers_match(candidate(s='A1b2C3d4E5f6'), ['A1b2C3d4E5f6', 'A1b2C3d4E5F6', 'A1b2C3d4e5F6', 'A1b2C3d4e5f6', 'A1b2C3D4e5f6', 'A1b2C3D4e5F6', 'A1b2C3D4E5F6', 'A1b2C3D4E5f6', 'A1b2c3D4E5f6', 'A1b2c3D4E5F6', 'A1b2c3D4e5F6', 'A1b2c3D4e5f6', 'A1b2c3d4e5f6', 'A1b2c3d4e5F6', 'A1b2c3d4E5F6', 'A1b2c3d4E5f6', 'A1B2c3d4E5f6', 'A1B2c3d4E5F6', 'A1B2c3d4e5F6', 'A1B2c3d4e5f6', 'A1B2c3D4e5f6', 'A1B2c3D4e5F6', 'A1B2c3D4E5F6', 'A1B2c3D4E5f6', 'A1B2C3D4E5f6', 'A1B2C3D4E5F6', 'A1B2C3D4e5F6', 'A1B2C3D4e5f6', 'A1B2C3d4e5f6', 'A1B2C3d4e5F6', 'A1B2C3d4E5F6', 'A1B2C3d4E5f6', 'a1B2C3d4E5f6', 'a1B2C3d4E5F6', 'a1B2C3d4e5F6', 'a1B2C3d4e5f6', 'a1B2C3D4e5f6', 'a1B2C3D4e5F6', 'a1B2C3D4E5F6', 'a1B2C3D4E5f6', 'a1B2c3D4E5f6', 'a1B2c3D4E5F6', 'a1B2c3D4e5F6', 'a1B2c3D4e5f6', 'a1B2c3d4e5f6', 'a1B2c3d4e5F6', 'a1B2c3d4E5F6', 'a1B2c3d4E5f6', 'a1b2c3d4E5f6', 'a1b2c3d4E5F6', 'a1b2c3d4e5F6', 'a1b2c3d4e5f6', 'a1b2c3D4e5f6', 'a1b2c3D4e5F6', 'a1b2c3D4E5F6', 'a1b2c3D4E5f6', 'a1b2C3D4E5f6', 'a1b2C3D4E5F6', 'a1b2C3D4e5F6', 'a1b2C3D4e5f6', 'a1b2C3d4e5f6', 'a1b2C3d4e5F6', 'a1b2C3d4E5F6', 'a1b2C3d4E5f6'])\n", "comparison": "unordered"}, "public_tests": ["\"a1b2\"", "\"3z4\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().letterCasePermutation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:31+00:00", "tests_total": 111, "tests_dropped": 12, "flags": ["any_order"], "topic_tags": ["string", "backtracking", "bit-manipulation"]}, "language": "cpp", "interface": {"raw_signature": "vector letterCasePermutation(string s) {", "container": "Solution", "callable": "letterCasePermutation", "parameters": [{"name": "s", "type": "string"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 785, "task_id": "is-graph-bipartite", "difficulty": "Medium", "problem_description": "There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. More formally, for each v in graph[u], there is an undirected edge between node u and node v. The graph has the following properties:\n\n- There are no self-edges (graph[u] does not contain u).\n- There are no parallel edges (graph[u] does not contain duplicate values).\n- If v is in graph[u], then u is in graph[v] (the graph is undirected).\n- The graph may not be connected, meaning there may be two nodes u and v such that there is no path between them.\n\nA graph is bipartite if the nodes can be partitioned into two independent sets A and B such that every edge in the graph connects a node in set A and a node in set B.\n\nReturn true if and only if it is bipartite.\n\nExample 1:\n\nInput: graph = [[1,2,3],[0,2],[0,1,3],[0,2]]\nOutput: false\nExplanation: There is no way to partition the nodes into two independent sets such that every edge connects a node in one and a node in the other.\n\nExample 2:\n\nInput: graph = [[1,3],[0,2],[1,3],[0,2]]\nOutput: true\nExplanation: We can partition the nodes into two sets: {0, 2} and {1, 3}.\n\nConstraints:\n\n- graph.length == n\n- 1 <= n <= 100\n- 0 <= graph[u].length < n\n- 0 <= graph[u][i] <= n - 1\n- graph[u] does not contain u.\n- All the values of graph[u] are unique.\n- If graph[u] contains v, then graph[v] contains u.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(graph = [[], [3], [], [1]]) == True\n assert candidate(graph = [[], [2, 4, 6], [1, 4, 8, 9], [7, 8], [1, 2, 8, 9], [6, 9], [1, 5, 7, 8, 9], [3, 6, 9], [2, 3, 4, 6, 9], [2, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[1, 3], [0, 2], [1, 3], [0, 2]]) == True\n assert candidate(graph = [[2, 4], [2, 4], [0, 1, 3, 4], [2, 4], [0, 1, 2, 3]]) == False\n assert candidate(graph = [[], [2], [1, 3], [2], [6], [7, 8], [4], [5], [5]]) == True\n assert candidate(graph = [[], [2, 4, 6], [1, 4, 8, 9], [7, 8], [1, 3, 8, 9], [6, 9], [1, 5, 7, 8, 9], [3, 6, 9], [1, 3, 5, 6, 9], [2, 3, 4, 5, 6, 7]]) == False\n assert candidate(graph = [[], [2, 3, 6], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 8], [2, 3], [2, 3], [1, 2, 3, 7, 8], [2, 6, 8], [2, 6, 7]]) == False\n assert candidate(graph = [[3, 4, 6], [3, 6], [3, 6], [0, 1, 2, 5], [0, 6], [3], [0, 1, 2, 4]]) == False\n assert candidate(graph = [[], [3], [3], [1, 2]]) == True\n assert candidate(graph = [[2, 3, 4], [3, 4], [0, 4], [0, 1], [0, 1, 2]]) == False\n assert candidate(graph = [[2, 4], [2, 3, 4, 5], [0, 1, 4, 5], [1], [0, 1, 2], [1, 2]]) == False\n assert candidate(graph = [[2, 3], [2, 4, 5, 7], [0, 1, 5], [0, 6], [1], [1, 2, 6], [3, 5], [1]]) == False\n assert candidate(graph = [[1, 2, 3], [0, 2], [0, 1, 3], [0, 2]]) == False\n assert candidate(graph = [[2], [2, 3, 4], [0, 1], [1], [1]]) == True\n assert candidate(graph = [[1], [0]]) == True\n assert candidate(graph = [[3], [2, 4], [1], [0, 4], [1, 3]]) == True\n assert candidate(graph = [[1], [0], [3, 4], [2], [2], [6], [5], [9], [9], [7, 8]]) == True\n assert candidate(graph = [[], [3, 4, 6], [4, 6, 8], [1, 4, 5], [1, 2, 3, 5, 6, 7, 8], [3, 4, 6, 7], [1, 2, 4, 5, 7, 8], [4, 5, 6, 8], [2, 4, 5, 6, 7]]) == False\n assert candidate(graph = [[1, 2, 3, 4], [0, 3, 4], [0, 3], [0, 1, 2, 4], [0, 1, 3]]) == False\n assert candidate(graph = [[1, 4, 5], [0, 2], [1, 3, 4, 5], [2], [0, 1, 2, 5], [0, 1, 2, 4]]) == False\n assert candidate(graph = [[1, 4, 6], [0, 5, 7], [3, 6, 8], [2, 6, 9], [0, 5, 7, 10], [1, 4, 7, 8, 10], [0, 2, 3, 7, 8, 11], [1, 4, 6, 8, 9, 11], [2, 5, 6, 7, 10, 12], [3, 6, 7, 12], [4, 5, 8, 9, 12], [6, 7, 10], [8, 9, 10, 11]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 7, 8]]) == False\n assert candidate(graph = [[1], [0], [3, 5, 7, 8], [2, 5, 7, 8], [2, 5, 6, 8], [2, 3, 4, 6, 7], [4, 5, 7, 8], [2, 3, 5, 6, 8], [2, 3, 4, 6, 7]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9]]) == True\n assert candidate(graph = [[1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11], [0, 2, 4, 6, 8, 10]]) == True\n assert candidate(graph = [[1, 5], [0, 2, 6], [1, 3], [2, 5], [5], [0, 3, 4], [1]]) == False\n assert candidate(graph = [[1, 5, 6], [0, 2, 3, 4], [1, 3], [1, 2], [1, 5], [0, 4], [0]]) == False\n assert candidate(graph = [[1, 5], [0, 6], [6, 3, 4], [2, 5], [2, 6], [0, 3, 6], [1, 2, 4, 5]]) == False\n assert candidate(graph = [[1, 2, 3], [0, 2, 4], [0, 1, 3], [0, 2, 4], [1, 3]]) == False\n assert candidate(graph = [[1, 5, 7], [0, 2, 6], [1, 3], [2, 5, 7], [5, 6], [0, 2, 3, 4, 6], [1, 4, 5, 7], [0, 3, 5, 6], [9, 11, 12], [8, 10, 13], [9], [8, 13, 14], [8, 14, 15], [9, 10, 16], [11, 12, 17, 18], [12, 18], [13, 16, 17], [14, 16], [14, 15, 17]]) == False\n assert candidate(graph = [[2, 3, 4], [2, 3, 5], [0, 1], [0, 1, 5], [0], [1, 3]]) == False\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]]) == False\n assert candidate(graph = [[1], [0, 2, 6, 8], [1, 3, 4, 5], [2], [2], [2], [1, 7, 8], [6, 8, 9], [1, 6, 7, 9], [7, 8]]) == False\n assert candidate(graph = [[1, 2, 5], [0, 2, 4], [0, 1, 3, 4], [2], [1, 2], [0]]) == False\n assert candidate(graph = [[1, 4, 6, 8], [0, 3, 5, 7], [4, 6, 8], [1, 5, 7], [0, 2, 6], [1, 3, 7], [0, 2, 4, 8], [1, 3, 5], [0, 2, 4, 6]]) == False\n assert candidate(graph = [[1, 3, 4, 6], [0, 2, 4, 7], [1, 3, 5, 7], [0, 2, 6, 8], [0, 1, 5, 9], [2, 4, 6, 10], [0, 3, 5, 11], [1, 2, 8, 10], [3, 7, 9, 11], [4, 8, 10], [5, 7, 9, 11], [6, 7, 8, 10]]) == False\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8]]) == False\n assert candidate(graph = [[1], [0], [3], [2, 5], [6], [3, 6], [4], [8], [7, 9], [8]]) == True\n assert candidate(graph = [[1, 5, 9], [0, 4, 8], [3, 4, 6, 10], [2, 5, 11], [1, 5, 10], [0, 4, 8, 9, 11], [2, 7, 10], [6, 11], [1, 4, 9, 10], [0, 4, 8, 11], [2, 5, 6, 8, 10], [3, 5, 7, 9]]) == False\n assert candidate(graph = [[1, 3, 7], [0, 2, 4, 6], [1, 3, 6, 8], [0, 2, 5, 7], [1, 5, 7], [3, 4, 6, 8], [1, 2, 4, 5, 7], [0, 3, 4, 6, 8], [2, 5, 7]]) == False\n assert candidate(graph = [[1, 2], [0, 3, 4], [0, 3], [1, 2], [1, 5], [4, 6], [5]]) == True\n assert candidate(graph = [[], [2, 4, 6], [1, 4, 8, 9], [6, 7, 8], [1, 2, 8, 9], [6, 9], [1, 3, 5, 7, 8, 9], [3, 6], [1, 2, 3, 4, 9], [2, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[1, 2], [0, 3, 4, 5], [0, 3, 4, 5], [1, 2, 6, 7], [1, 2, 6, 7], [1, 2, 8, 9], [3, 4, 9, 10], [3, 4, 10, 11], [5, 9, 10, 11], [5, 6, 8, 11], [5, 6, 7, 8], [6, 7, 8, 9]]) == False\n assert candidate(graph = [[], [2, 4, 6], [1, 4, 8, 9], [5, 6, 7, 8], [1, 2, 8, 9], [3, 6, 9], [1, 3, 5, 7, 8, 9], [3, 6, 8, 9], [2, 3, 4, 6, 7, 9], [2, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[1, 2, 4, 6], [0, 3, 5, 8], [0, 3, 6, 8], [1, 2, 7, 8], [0, 5, 6, 9], [1, 4, 6, 9], [0, 1, 2, 4, 5, 9], [3, 8], [1, 2, 3, 7], [4, 5, 6]]) == False\n assert candidate(graph = [[1], [0], [3, 4], [2], [2], [6, 7], [5, 7], [5, 6]]) == False\n assert candidate(graph = [[1, 2, 3], [0, 4, 5], [0, 4, 6], [0, 5, 6], [1, 2, 7], [1, 3, 7], [2, 3, 8], [4, 5, 8], [6, 7, 9], [8]]) == False\n assert candidate(graph = [[1, 2, 3], [0, 4, 5], [0, 4], [0, 5], [1, 2], [1, 3]]) == True\n assert candidate(graph = [[1, 2, 3], [0, 4, 5], [0, 4, 6], [0, 5, 6], [1, 2], [1, 3], [2, 3]]) == True\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8, 10], [1], [0, 4, 6, 8, 10], [1, 3], [0, 6, 8, 10], [1, 3, 5], [0, 8, 10], [1, 3, 5, 7], [0, 6, 8], [1, 3, 5, 7, 9]]) == True\n assert candidate(graph = [[1, 5], [0, 2, 6], [1, 3], [2, 4, 6], [3, 5], [0, 4], [1, 3]]) == True\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [0, 2, 4, 6, 8, 10, 12, 14], [0, 1, 3, 5, 7, 9, 11, 13, 15], [0, 2, 4, 6, 8, 10, 12, 14], [0, 1, 3, 5, 7, 9, 11, 13, 15], [0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 14, 15], [0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14], [0, 2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15], [0, 1, 3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15], [0, 2, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15], [0, 1, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15], [0, 2, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], [0, 1, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15], [0, 2, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15], [0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15], [0, 1, 3, 5, 7, 9, 11, 13, 14]]) == False\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]]) == True\n assert candidate(graph = [[1, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 6], [0, 1, 3, 4, 5, 6], [0, 1, 2, 4, 5, 6], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 5]]) == False\n assert candidate(graph = [[1, 2], [0, 3], [0, 4], [1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6], [7]]) == True\n assert candidate(graph = [[1, 5], [0, 2, 6], [1, 3], [2, 4, 6], [3, 5], [0, 4, 6], [1, 3, 5]]) == True\n assert candidate(graph = [[1, 4], [0, 2, 5], [1, 3, 6], [2, 7], [0, 8], [1, 9], [2, 10], [3, 11], [4, 12], [5, 13], [6, 14], [7, 15], [8, 16], [9, 17], [10, 18], [11, 19], [12], [13], [14], [15]]) == True\n assert candidate(graph = [[1], [0, 3, 4], [5, 6, 7], [1], [1], [2], [2], [2]]) == True\n assert candidate(graph = [[1, 2, 3], [4, 5, 6], [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, 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, 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]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8]]) == True\n assert candidate(graph = [[1, 2, 3], [0, 4, 5], [0, 4, 5], [0, 6, 7], [1, 2, 6, 7], [1, 2, 8, 9], [3, 4, 9, 10], [3, 4, 10, 11], [5, 9, 10, 11], [4, 6, 8, 11], [5, 6, 7, 8], [6, 7, 8, 9]]) == False\n assert candidate(graph = [[1, 2], [0, 3, 8, 9], [0, 4, 6, 9], [1, 5, 7, 8], [2, 6, 8, 9], [3, 7, 8, 9], [2, 4, 5, 7, 8, 9], [3, 5, 6, 8, 9], [1, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[], [2, 4, 6], [1, 4, 8, 9], [7, 8], [1, 2, 8, 9], [6, 8, 9], [1, 5, 7, 8, 9], [3, 6, 9], [2, 3, 4, 6, 9], [2, 3, 4, 5, 6, 7]]) == False\n assert candidate(graph = [[1, 2, 6], [0, 3, 5], [0, 3, 6, 7], [1, 2, 5, 8], [5, 6, 9], [1, 3, 4, 6, 8], [0, 2, 3, 4, 5, 7, 9], [2, 6, 8], [3, 5, 7], [4, 6]]) == False\n assert candidate(graph = [[1, 4], [0, 2, 5], [1, 3, 6], [2, 7], [0, 6, 8], [1, 7, 9], [2, 4, 10], [3, 5, 11], [4, 10, 12], [5, 11, 13], [6, 8, 12], [7, 9, 13], [8, 10, 14], [9, 11, 14], [12, 13]]) == False\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[1, 2], [0], [0], [4], [3], [6, 7, 8], [5], [5, 8], [5, 7], [10, 11, 12], [9], [9], [9], [14], [13]]) == False\n assert candidate(graph = [[1], [0, 3, 4], [3], [1, 2], [1]]) == True\n assert candidate(graph = [[1, 4, 5], [0, 2, 3, 6], [1, 3, 4, 5, 6], [1, 2, 6], [0, 2], [0, 2], [1, 3]]) == False\n assert candidate(graph = [[1], [0, 3, 4], [3], [1, 2, 5], [1], [3, 6], [5, 7], [6]]) == True\n assert candidate(graph = [[1], [0], [3, 4], [2, 4], [2, 3], [6, 7, 8], [5, 7, 8], [5, 6, 8], [5, 6, 7], [10, 11, 12, 13], [9, 11, 13], [9, 10, 12], [9, 11], [9, 10]]) == False\n assert candidate(graph = [[1, 2], [0, 3], [0, 3, 4], [1, 2, 4], [2, 3, 5], [4]]) == False\n assert candidate(graph = [[1, 2, 4, 6, 8], [0, 3, 5, 7, 9], [0, 3, 5, 7, 9], [1, 2, 6, 8, 9], [0, 2, 6, 8, 9], [1, 2, 4, 8, 9], [0, 3, 4, 7, 9], [1, 3, 4, 6, 8], [0, 3, 4, 5, 6], [1, 2, 4, 5, 7]]) == False\n assert candidate(graph = [[2, 4, 6], [2, 5, 7], [0, 1, 8], [7, 9], [0, 9], [1, 9], [0, 8], [1, 6, 8], [2, 6, 7, 9], [3, 4, 5, 7, 8]]) == False\n assert candidate(graph = [[1, 3, 5], [0, 4, 6], [4, 7], [0, 5], [1, 7, 8], [0, 3], [1], [2, 4], [4]]) == False\n assert candidate(graph = [[1], [0], [], [4, 5], [3, 5], [3, 4], [7, 8], [6, 8], [6, 7]]) == False\n assert candidate(graph = [[1, 3, 4, 6], [0, 2, 5, 7], [1, 3, 5, 8], [0, 2, 6, 9], [0, 7, 8, 9], [1, 2, 6, 7, 8, 9], [0, 1, 3, 5, 7, 8, 9], [1, 4, 5, 6, 8, 9], [2, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 8]]) == False\n assert candidate(graph = [[1], [0, 3, 4, 5], [3, 4, 5], [1, 2], [1, 2, 5, 6], [1, 2, 4, 6], [4, 5]]) == False\n assert candidate(graph = [[1, 2, 5, 7, 8], [0, 2, 4, 6, 9], [0, 1, 3, 4, 8], [2, 5, 7, 9], [1, 2, 6], [0, 3, 4, 7, 8, 9], [1, 4, 8], [0, 3, 4, 5, 8], [0, 2, 5, 6, 7], [1, 3, 5, 7]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6]]) == True\n assert candidate(graph = [[1, 2, 3], [0, 2], [0, 1, 3], [0, 2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7], [10], [9]]) == False\n assert candidate(graph = [[1, 4, 5, 6], [0, 2, 5, 7], [1, 3, 6, 7], [2, 4, 6, 7], [0, 3, 5, 7], [0, 1, 4, 7], [0, 1, 2, 7], [1, 2, 3, 4, 5, 6]]) == False\n assert candidate(graph = [[1, 2, 5, 7], [0, 3, 6], [0, 4, 7], [1, 5], [2, 6], [0, 3, 4], [1, 4], [0, 2]]) == False\n assert candidate(graph = [[1, 3, 4], [0, 4, 5], [4, 5, 6], [0, 6], [0, 1, 2], [1, 2], [2, 3]]) == False\n assert candidate(graph = [[1, 2, 3, 4], [0, 2], [0, 1, 4], [0], [0, 2]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [3, 5, 7, 9], [0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [0, 2, 4, 6, 8]]) == True\n assert candidate(graph = [[1, 2, 3, 4], [0, 5, 6], [0, 5, 6], [0, 7, 8], [0, 7, 8], [1, 2, 9], [1, 2, 9], [3, 4, 9], [3, 4, 9], [5, 6, 7, 8]]) == True\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0], [0], [0], [0], [0], [0], [0], [0], [0], [0]]) == True\n assert candidate(graph = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8], [0, 1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [0, 1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [0, 1, 3, 5, 7, 9], [0, 2, 4, 6, 8], [0, 1, 3, 5, 7, 9], [0, 2, 4, 6, 8]]) == False\n assert candidate(graph = [[1, 3, 6], [0, 4], [3, 5], [0, 2, 4], [1, 3, 5, 7], [2, 4, 6], [0, 5, 7], [4, 6]]) == False\n assert candidate(graph = [[1, 3, 5], [0, 2, 4, 6], [1, 3, 5], [0, 2, 6], [1, 5], [0, 2, 4], [1, 3]]) == True\n assert candidate(graph = [[1, 4, 5], [0, 2, 4], [1, 3, 5], [2], [0, 1], [0, 2]]) == False\n assert candidate(graph = [[1, 2], [0, 3, 4], [0, 3], [1, 2, 4], [1, 3]]) == False\n assert candidate(graph = [[1], [0, 3, 5], [4], [1, 5], [2, 5], [1, 3, 4]]) == False\n assert candidate(graph = [[1, 3, 5, 7, 9], [0, 2, 6, 8, 10], [1, 3, 7, 9, 11], [0, 2, 6, 8, 12], [5, 9, 11, 13, 15], [0, 4, 8, 10, 14], [1, 3, 7, 11, 13], [0, 2, 4, 8, 12], [1, 3, 5, 9, 13], [0, 2, 4, 6, 14], [1, 3, 5, 7, 15], [2, 4, 6, 8, 15], [3, 5, 7, 9, 11], [4, 6, 8, 10, 12], [5, 7, 9, 11, 13], [6, 8, 10, 12, 14]]) == False\n assert candidate(graph = [[1, 2, 3, 4], [0, 5, 6, 7], [0, 8, 9, 10], [0, 11, 12, 13], [0, 14, 15, 16], [1], [1], [1], [2], [2], [2], [3], [3], [3], [4], [4], [4], [4]]) == True\n assert candidate(graph = [[1, 2, 4, 5], [0, 3, 6, 7], [0, 3, 8], [1, 2, 9], [0, 8, 10], [0, 10, 11], [1, 7], [1, 6], [2, 4], [3], [4, 5], [5]]) == False\n assert candidate(graph = [[1, 2, 4, 5], [0, 2, 3, 6], [0, 1, 3, 5], [1, 2, 6], [0, 5], [0, 2, 4, 6], [1, 3, 5]]) == False\n assert candidate(graph = [[3, 4, 6], [3, 6], [3, 6], [0, 1, 2, 5], [0, 7, 8], [3], [0, 1, 2, 7], [4, 6], [4, 6], [10], [9]]) == True\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[0,2],[0,1,3],[0,2]]", "[[1,3],[0,2],[1,3],[0,2]]"], "hints": [], "metadata": {"canonical_parameter_names": ["graph"], "leetcode_dataset_entry_point": "Solution().isBipartite", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:33+00:00", "tests_total": 103, "tests_dropped": 3, "flags": ["has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "union-find", "graph", "graph-coloring", "bipartite-graph"]}, "language": "cpp", "interface": {"raw_signature": "bool isBipartite(vector>& graph) {", "container": "Solution", "callable": "isBipartite", "parameters": [{"name": "graph", "type": "vector>&"}], "return_type": "bool", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}} +{"question_id": 786, "task_id": "k-th-smallest-prime-fraction", "difficulty": "Medium", "problem_description": "You are given a sorted integer array arr containing 1 and prime numbers, where all the integers of arr are unique. You are also given an integer k.\n\nFor every i and j where 0 <= i < j < arr.length, we consider the fraction arr[i] / arr[j].\n\nReturn the k^th smallest fraction considered. Return your answer as an array of integers of size 2, where answer[0] == arr[i] and answer[1] == arr[j].\n\nExample 1:\n\nInput: arr = [1,2,3,5], k = 3\nOutput: [2,5]\nExplanation: The fractions to be considered in sorted order are:\n1/5, 1/3, 2/5, 1/2, 3/5, and 2/3.\nThe third fraction is 2/5.\n\nExample 2:\n\nInput: arr = [1,7], k = 1\nOutput: [1,7]\n\nConstraints:\n\n- 2 <= arr.length <= 1000\n- 1 <= arr[i] <= 3 * 10^4\n- arr[0] == 1\n- arr[i] is a prime number for i > 0.\n- All the numbers of arr are unique and sorted in strictly increasing order.\n- 1 <= k <= arr.length * (arr.length - 1) / 2\n\nFollow up: Can you solve the problem with better than O(n^2) complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(arr = [1, 2, 5, 13, 17, 19],k = 10) == [5, 13]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 25) == [2, 7]\n assert candidate(arr = [1, 2, 3, 5],k = 3) == [2, 5]\n assert candidate(arr = [1, 2, 5, 7, 11, 13, 17, 19],k = 10) == [1, 5]\n assert candidate(arr = [1, 7],k = 1) == [1, 7]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23],k = 20) == [2, 7]\n assert candidate(arr = [1, 3, 7, 11, 13],k = 5) == [3, 11]\n assert candidate(arr = [1, 2, 5, 11, 17, 23],k = 10) == [2, 5]\n assert candidate(arr = [1, 3, 7, 11, 13, 17],k = 5) == [3, 17]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 20) == [5, 23]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 15) == [3, 19]\n assert candidate(arr = [1, 2, 5, 7, 11, 13, 17],k = 10) == [5, 17]\n assert candidate(arr = [1, 5, 7, 11, 13, 17, 19, 23, 29],k = 20) == [5, 11]\n assert candidate(arr = [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],k = 500) == [23, 67]\n assert candidate(arr = [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, 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],k = 1500) == [107, 277]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47],k = 20) == [3, 37]\n assert candidate(arr = [1, 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],k = 1) == [1, 317]\n assert candidate(arr = [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, 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],k = 2000) == [179, 317]\n assert candidate(arr = [1, 2, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53],k = 50) == [5, 17]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313],k = 500) == [5, 37]\n assert candidate(arr = [1, 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],k = 1000) == [89, 239]\n assert candidate(arr = [1, 5, 13, 29, 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],k = 3000) == [137, 179]\n assert candidate(arr = [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],k = 150) == [19, 61]\n assert candidate(arr = [1, 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],k = 200) == [23, 199]\n assert candidate(arr = [1, 5, 13, 17, 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],k = 500) == [107, 181]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47],k = 50) == [5, 19]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43],k = 30) == [3, 19]\n assert candidate(arr = [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],k = 100) == [5, 29]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317],k = 500) == [29, 223]\n assert candidate(arr = [1, 2, 5, 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],k = 700) == [131, 191]\n assert candidate(arr = [1, 5, 13, 29, 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],k = 1) == [1, 499]\n assert candidate(arr = [1, 3, 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],k = 1000) == [53, 73]\n assert candidate(arr = [1, 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],k = 200) == [29, 197]\n assert candidate(arr = [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, 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],k = 1000) == [23, 173]\n assert candidate(arr = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47],k = 100) == [13, 19]\n assert candidate(arr = [1, 2, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61],k = 70) == [17, 53]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317],k = 10) == [1, 269]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317],k = 1500) == [149, 251]\n assert candidate(arr = [1, 7, 13, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97],k = 200) == [43, 47]\n assert candidate(arr = [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],k = 300) == [7, 43]\n assert candidate(arr = [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],k = 300) == [71, 83]\n assert candidate(arr = [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],k = 300) == [7, 43]\n assert candidate(arr = [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],k = 100) == [5, 29]\n assert candidate(arr = [1, 5, 13, 29, 37, 41, 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],k = 1000) == [13, 47]\n assert candidate(arr = [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, 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],k = 2000) == [103, 149]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313],k = 500) == [5, 37]\n assert candidate(arr = [1, 3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97],k = 50) == [7, 53]\n assert candidate(arr = [1, 3, 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],k = 1000) == [47, 283]\n assert candidate(arr = [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, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313],k = 1000) == [47, 131]\n assert candidate(arr = [1, 5, 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],k = 300) == [89, 109]\n assert candidate(arr = [1, 2, 5, 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],k = 2000) == [193, 479]\n", "comparison": "exact"}, "public_tests": ["[1,2,3,5]\n3", "[1,7]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["arr", "k"], "leetcode_dataset_entry_point": "Solution().kthSmallestPrimeFraction", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:59:35+00:00", "tests_total": 51, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "sorting", "heap-priority-queue"]}, "language": "cpp", "interface": {"raw_signature": "vector kthSmallestPrimeFraction(vector& arr, int k) {", "container": "Solution", "callable": "kthSmallestPrimeFraction", "parameters": [{"name": "arr", "type": "vector&"}, {"name": "k", "type": "int"}], "return_type": "vector", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}