{"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/1", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-1", "template_id": "humaneval::HumanEval/1", "text": "from typing import List\n\n\ndef separate_paren_groups(paren_string: str) -> List[str]:\n \"\"\" Input to this function is a string containing multiple groups of nested parentheses. Your goal is to\n separate those group into separate strings and return the list of those.\n Separate groups are balanced (each open brace is properly closed) and not nested within each other\n Ignore any spaces in the input string.\n >>> separate_paren_groups('( ) (( )) (( )( ))')\n ['()', '(())', '(()())']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-3", "template_id": "humaneval::HumanEval/3", "text": "from typing import List\n\n\ndef below_zero(operations: List[int]) -> bool:\n \"\"\" You're given a list of deposit and withdrawal operations on a bank account that starts with\n zero balance. Your task is to detect if at any point the balance of account fallls below zero, and\n at that point function should return True. Otherwise it should return False.\n >>> below_zero([1, 2, 3])\n False\n >>> below_zero([1, 2, -4, 5])\n True\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/5", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-5", "template_id": "humaneval::HumanEval/5", "text": "from typing import List\n\n\ndef intersperse(numbers: List[int], delimeter: int) -> List[int]:\n \"\"\" Insert a number 'delimeter' between every two consecutive elements of input list `numbers'\n >>> intersperse([], 4)\n []\n >>> intersperse([1, 2, 3], 4)\n [1, 4, 2, 4, 3]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/6", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-6", "template_id": "humaneval::HumanEval/6", "text": "from typing import List\n\n\ndef parse_nested_parens(paren_string: str) -> List[int]:\n \"\"\" Input to this function is a string represented multiple groups for nested parentheses separated by spaces.\n For each of the group, output the deepest level of nesting of parentheses.\n E.g. (()()) has maximum two levels of nesting while ((())) has three.\n\n >>> parse_nested_parens('(()()) ((())) () ((())()())')\n [2, 3, 1, 3]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/7", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-7", "template_id": "humaneval::HumanEval/7", "text": "from typing import List\n\n\ndef filter_by_substring(strings: List[str], substring: str) -> List[str]:\n \"\"\" Filter an input list of strings only for ones that contain given substring\n >>> filter_by_substring([], 'a')\n []\n >>> filter_by_substring(['abc', 'bacd', 'cde', 'array'], 'a')\n ['abc', 'bacd', 'array']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/8", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-8", "template_id": "humaneval::HumanEval/8", "text": "from typing import List, Tuple\n\n\ndef sum_product(numbers: List[int]) -> Tuple[int, int]:\n \"\"\" For a given list of integers, return a tuple consisting of a sum and a product of all the integers in a list.\n Empty sum should be equal to 0 and empty product should be equal to 1.\n >>> sum_product([])\n (0, 1)\n >>> sum_product([1, 2, 3, 4])\n (10, 24)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/9", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-9", "template_id": "humaneval::HumanEval/9", "text": "from typing import List, Tuple\n\n\ndef rolling_max(numbers: List[int]) -> List[int]:\n \"\"\" From a given list of integers, generate a list of rolling maximum element found until given moment\n in the sequence.\n >>> rolling_max([1, 2, 3, 2, 3, 4, 2])\n [1, 2, 3, 3, 3, 4, 4]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/10", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-10", "template_id": "humaneval::HumanEval/10", "text": "def is_palindrome(string: str) -> bool:\n \"\"\" Test if given string is a palindrome \"\"\"\n return string == string[::-1]\n\n\ndef make_palindrome(string: str) -> str:\n \"\"\" Find the shortest palindrome that begins with a supplied string.\n Algorithm idea is simple:\n - Find the longest postfix of supplied string that is a palindrome.\n - Append to the end of the string reverse of a string prefix that comes before the palindromic suffix.\n >>> make_palindrome('')\n ''\n >>> make_palindrome('cat')\n 'catac'\n >>> make_palindrome('cata')\n 'catac'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/11", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-11", "template_id": "humaneval::HumanEval/11", "text": "from typing import List\n\n\ndef string_xor(a: str, b: str) -> str:\n \"\"\" Input are two strings a and b consisting only of 1s and 0s.\n Perform binary XOR on these inputs and return result also as a string.\n >>> string_xor('010', '110')\n '100'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/14", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-14", "template_id": "humaneval::HumanEval/14", "text": "from typing import List\n\n\ndef all_prefixes(string: str) -> List[str]:\n \"\"\" Return list of all prefixes from shortest to longest of the input string\n >>> all_prefixes('abc')\n ['a', 'ab', 'abc']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/17", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-17", "template_id": "humaneval::HumanEval/17", "text": "from typing import List\n\n\ndef parse_music(music_string: str) -> List[int]:\n \"\"\" Input to this function is a string representing musical notes in a special ASCII format.\n Your task is to parse this string and return list of integers corresponding to how many beats does each\n not last.\n\n Here is a legend:\n 'o' - whole note, lasts four beats\n 'o|' - half note, lasts two beats\n '.|' - quater note, lasts one beat\n\n >>> parse_music('o o| .| o| o| .| .| .| .| o o')\n [4, 2, 1, 2, 2, 1, 1, 1, 1, 4, 4]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/18", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-18", "template_id": "humaneval::HumanEval/18", "text": "def how_many_times(string: str, substring: str) -> int:\n \"\"\" Find how many times a given substring can be found in the original string. Count overlaping cases.\n >>> how_many_times('', 'a')\n 0\n >>> how_many_times('aaa', 'a')\n 3\n >>> how_many_times('aaaa', 'aa')\n 3\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/20", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-20", "template_id": "humaneval::HumanEval/20", "text": "from typing import List, Tuple\n\n\ndef find_closest_elements(numbers: List[float]) -> Tuple[float, float]:\n \"\"\" From a supplied list of numbers (of length at least two) select and return two that are the closest to each\n other and return them in order (smaller number, larger number).\n >>> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.2])\n (2.0, 2.2)\n >>> find_closest_elements([1.0, 2.0, 3.0, 4.0, 5.0, 2.0])\n (2.0, 2.0)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/21", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-21", "template_id": "humaneval::HumanEval/21", "text": "from typing import List\n\n\ndef rescale_to_unit(numbers: List[float]) -> List[float]:\n \"\"\" Given list of numbers (of at least two elements), apply a linear transform to that list,\n such that the smallest number will become 0 and the largest will become 1\n >>> rescale_to_unit([1.0, 2.0, 3.0, 4.0, 5.0])\n [0.0, 0.25, 0.5, 0.75, 1.0]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/22", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-22", "template_id": "humaneval::HumanEval/22", "text": "from typing import List, Any\n\n\ndef filter_integers(values: List[Any]) -> List[int]:\n \"\"\" Filter given list of any python values only for integers\n >>> filter_integers(['a', 3.14, 5])\n [5]\n >>> filter_integers([1, 2, 3, 'abc', {}, []])\n [1, 2, 3]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/25", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-25", "template_id": "humaneval::HumanEval/25", "text": "from typing import List\n\n\ndef factorize(n: int) -> List[int]:\n \"\"\" Return list of prime factors of given integer in the order from smallest to largest.\n Each of the factors should be listed number of times corresponding to how many times it appeares in factorization.\n Input number should be equal to the product of all factors\n >>> factorize(8)\n [2, 2, 2]\n >>> factorize(25)\n [5, 5]\n >>> factorize(70)\n [2, 5, 7]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/26", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-26", "template_id": "humaneval::HumanEval/26", "text": "from typing import List\n\n\ndef remove_duplicates(numbers: List[int]) -> List[int]:\n \"\"\" From a list of integers, remove all elements that occur more than once.\n Keep order of elements left the same as in the input.\n >>> remove_duplicates([1, 2, 3, 2, 4])\n [1, 3, 4]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/27", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-27", "template_id": "humaneval::HumanEval/27", "text": "def flip_case(string: str) -> str:\n \"\"\" For a given string, flip lowercase characters to uppercase and uppercase to lowercase.\n >>> flip_case('Hello')\n 'hELLO'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/28", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-28", "template_id": "humaneval::HumanEval/28", "text": "from typing import List\n\n\ndef concatenate(strings: List[str]) -> str:\n \"\"\" Concatenate list of strings into a single string\n >>> concatenate([])\n ''\n >>> concatenate(['a', 'b', 'c'])\n 'abc'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/31", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-31", "template_id": "humaneval::HumanEval/31", "text": "def is_prime(n):\n \"\"\"Return true if a given number is prime, and false otherwise.\n >>> is_prime(6)\n False\n >>> is_prime(101)\n True\n >>> is_prime(11)\n True\n >>> is_prime(13441)\n True\n >>> is_prime(61)\n True\n >>> is_prime(4)\n False\n >>> is_prime(1)\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/32", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-32", "template_id": "humaneval::HumanEval/32", "text": "import math\n\n\ndef poly(xs: list, x: float):\n \"\"\"\n Evaluates polynomial with coefficients xs at point x.\n return xs[0] + xs[1] * x + xs[1] * x^2 + .... xs[n] * x^n\n \"\"\"\n return sum([coeff * math.pow(x, i) for i, coeff in enumerate(xs)])\n\n\ndef find_zero(xs: list):\n \"\"\" xs are coefficients of a polynomial.\n find_zero find x such that poly(x) = 0.\n find_zero returns only only zero point, even if there are many.\n Moreover, find_zero only takes list xs having even number of coefficients\n and largest non zero coefficient as it guarantees\n a solution.\n >>> round(find_zero([1, 2]), 2) # f(x) = 1 + 2x\n -0.5\n >>> round(find_zero([-6, 11, -6, 1]), 2) # (x - 1) * (x - 2) * (x - 3) = -6 + 11x - 6x^2 + x^3\n 1.0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/33", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-33", "template_id": "humaneval::HumanEval/33", "text": "def sort_third(l: list):\n \"\"\"This function takes a list l and returns a list l' such that\n l' is identical to l in the indicies that are not divisible by three, while its values at the indicies that are divisible by three are equal\n to the values of the corresponding indicies of l, but sorted.\n >>> sort_third([1, 2, 3])\n [1, 2, 3]\n >>> sort_third([5, 6, 3, 4, 8, 9, 2])\n [2, 6, 3, 4, 8, 9, 5]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/34", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-34", "template_id": "humaneval::HumanEval/34", "text": "def unique(l: list):\n \"\"\"Return sorted unique elements in a list\n >>> unique([5, 3, 5, 2, 3, 3, 9, 0, 123])\n [0, 2, 3, 5, 9, 123]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/35", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-35", "template_id": "humaneval::HumanEval/35", "text": "def max_element(l: list):\n \"\"\"Return maximum element in the list.\n >>> max_element([1, 2, 3])\n 3\n >>> max_element([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n 123\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/37", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-37", "template_id": "humaneval::HumanEval/37", "text": "def sort_even(l: list):\n \"\"\"This function takes a list l and returns a list l' such that\n l' is identical to l in the odd indicies, while its values at the even indicies are equal\n to the values of the even indicies of l, but sorted.\n >>> sort_even([1, 2, 3])\n [1, 2, 3]\n >>> sort_even([5, 6, 3, 4])\n [3, 6, 5, 4]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/38", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-38", "template_id": "humaneval::HumanEval/38", "text": "def encode_cyclic(s: str):\n \"\"\"\n returns encoded string by cycling groups of three characters.\n \"\"\"\n # split string to groups. Each of length 3.\n groups = [s[(3 * i):min((3 * i + 3), len(s))] for i in range((len(s) + 2) // 3)]\n # cycle elements in each group. Unless group has fewer elements than 3.\n groups = [(group[1:] + group[0]) if len(group) == 3 else group for group in groups]\n return \"\".join(groups)\n\n\ndef decode_cyclic(s: str):\n \"\"\"\n takes as input string encoded with encode_cyclic function. Returns decoded string.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/39", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-39", "template_id": "humaneval::HumanEval/39", "text": "def prime_fib(n: int):\n \"\"\"\n prime_fib returns n-th number that is a Fibonacci number and it's also prime.\n >>> prime_fib(1)\n 2\n >>> prime_fib(2)\n 3\n >>> prime_fib(3)\n 5\n >>> prime_fib(4)\n 13\n >>> prime_fib(5)\n 89\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/40", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-40", "template_id": "humaneval::HumanEval/40", "text": "def triples_sum_to_zero(l: list):\n \"\"\"\n triples_sum_to_zero takes a list of integers as an input.\n it returns True if there are three distinct elements in the list that\n sum to zero, and False otherwise.\n\n >>> triples_sum_to_zero([1, 3, 5, 0])\n False\n >>> triples_sum_to_zero([1, 3, -2, 1])\n True\n >>> triples_sum_to_zero([1, 2, 3, 7])\n False\n >>> triples_sum_to_zero([2, 4, -5, 3, 9, 7])\n True\n >>> triples_sum_to_zero([1])\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/41", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-41", "template_id": "humaneval::HumanEval/41", "text": "def car_race_collision(n: int):\n \"\"\"\n Imagine a road that's a perfectly straight infinitely long line.\n n cars are driving left to right; simultaneously, a different set of n cars\n are driving right to left. The two sets of cars start out being very far from\n each other. All cars move in the same speed. Two cars are said to collide\n when a car that's moving left to right hits a car that's moving right to left.\n However, the cars are infinitely sturdy and strong; as a result, they continue moving\n in their trajectory as if they did not collide.\n\n This function outputs the number of such collisions.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/42", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-42", "template_id": "humaneval::HumanEval/42", "text": "def incr_list(l: list):\n \"\"\"Return list with elements incremented by 1.\n >>> incr_list([1, 2, 3])\n [2, 3, 4]\n >>> incr_list([5, 3, 5, 2, 3, 3, 9, 0, 123])\n [6, 4, 6, 3, 4, 4, 10, 1, 124]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/44", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-44", "template_id": "humaneval::HumanEval/44", "text": "def change_base(x: int, base: int):\n \"\"\"Change numerical base of input number x to base.\n return string representation after the conversion.\n base numbers are less than 10.\n >>> change_base(8, 3)\n '22'\n >>> change_base(8, 2)\n '1000'\n >>> change_base(7, 2)\n '111'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/47", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-47", "template_id": "humaneval::HumanEval/47", "text": "def median(l: list):\n \"\"\"Return median of elements in the list l.\n >>> median([3, 1, 2, 4, 5])\n 3\n >>> median([-10, 4, 6, 1000, 10, 20])\n 15.0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/49", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-49", "template_id": "humaneval::HumanEval/49", "text": "def modp(n: int, p: int):\n \"\"\"Return 2^n modulo p (be aware of numerics).\n >>> modp(3, 5)\n 3\n >>> modp(1101, 101)\n 2\n >>> modp(0, 101)\n 1\n >>> modp(3, 11)\n 8\n >>> modp(100, 101)\n 1\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/54", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-54", "template_id": "humaneval::HumanEval/54", "text": "def same_chars(s0: str, s1: str):\n \"\"\"\n Check if two words have the same characters.\n >>> same_chars('eabcdzzzz', 'dddzzzzzzzddeddabc')\n True\n >>> same_chars('abcd', 'dddddddabc')\n True\n >>> same_chars('dddddddabc', 'abcd')\n True\n >>> same_chars('eabcd', 'dddddddabc')\n False\n >>> same_chars('abcd', 'dddddddabce')\n False\n >>> same_chars('eabcdzzzz', 'dddzzzzzzzddddabc')\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/55", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-55", "template_id": "humaneval::HumanEval/55", "text": "def fib(n: int):\n \"\"\"Return n-th Fibonacci number.\n >>> fib(10)\n 55\n >>> fib(1)\n 1\n >>> fib(8)\n 21\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/56|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-56", "template_id": "humaneval::HumanEval/56", "text": "def correct_bracketing(brackets: str):\n \"\"\" brackets is a string of \"<\" and \">\".\n return True if every opening bracket has a corresponding closing bracket.\n\n >>> correct_bracketing(\"<\")\n False\n >>> correct_bracketing(\"<>\")\n True\n >>> correct_bracketing(\"<<><>>\")\n True\n >>> correct_bracketing(\"><<>\")\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/57", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-57", "template_id": "humaneval::HumanEval/57", "text": "def monotonic(l: list):\n \"\"\"Return True is list elements are monotonically increasing or decreasing.\n >>> monotonic([1, 2, 4, 20])\n True\n >>> monotonic([1, 20, 4, 10])\n False\n >>> monotonic([4, 1, 0, -10])\n True\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/60", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-60", "template_id": "humaneval::HumanEval/60", "text": "def sum_to_n(n: int):\n \"\"\"sum_to_n is a function that sums numbers from 1 to n.\n >>> sum_to_n(30)\n 465\n >>> sum_to_n(100)\n 5050\n >>> sum_to_n(5)\n 15\n >>> sum_to_n(10)\n 55\n >>> sum_to_n(1)\n 1\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/56|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-61", "template_id": "humaneval::HumanEval/61", "text": "def correct_bracketing(brackets: str):\n \"\"\" brackets is a string of \"(\" and \")\".\n return True if every opening bracket has a corresponding closing bracket.\n\n >>> correct_bracketing(\"(\")\n False\n >>> correct_bracketing(\"()\")\n True\n >>> correct_bracketing(\"(()())\")\n True\n >>> correct_bracketing(\")(()\")\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/63", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-63", "template_id": "humaneval::HumanEval/63", "text": "def fibfib(n: int):\n \"\"\"The FibFib number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n fibfib(0) == 0\n fibfib(1) == 0\n fibfib(2) == 1\n fibfib(n) == fibfib(n-1) + fibfib(n-2) + fibfib(n-3).\n Please write a function to efficiently compute the n-th element of the fibfib number sequence.\n >>> fibfib(1)\n 0\n >>> fibfib(5)\n 4\n >>> fibfib(8)\n 24\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/64", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-64", "template_id": "humaneval::HumanEval/64", "text": "FIX = \"\"\"\nAdd more test cases.\n\"\"\"\n\ndef vowels_count(s):\n \"\"\"Write a function vowels_count which takes a string representing\n a word as input and returns the number of vowels in the string.\n Vowels in this case are 'a', 'e', 'i', 'o', 'u'. Here, 'y' is also a\n vowel, but only when it is at the end of the given word.\n\n Example:\n >>> vowels_count(\"abcde\")\n 2\n >>> vowels_count(\"ACEDY\")\n 3\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/66", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-66", "template_id": "humaneval::HumanEval/66", "text": "def digitSum(s):\n \"\"\"Task\n Write a function that takes a string as input and returns the sum of the upper characters only'\n ASCII codes.\n\n Examples:\n digitSum(\"\") => 0\n digitSum(\"abAB\") => 131\n digitSum(\"abcCd\") => 67\n digitSum(\"helloE\") => 69\n digitSum(\"woArBld\") => 131\n digitSum(\"aAaaaXa\") => 153\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/67", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-67", "template_id": "humaneval::HumanEval/67", "text": "def fruit_distribution(s,n):\n \"\"\"\n In this task, you will be given a string that represents a number of apples and oranges\n that are distributed in a basket of fruit this basket contains\n apples, oranges, and mango fruits. Given the string that represents the total number of\n the oranges and apples and an integer that represent the total number of the fruits\n in the basket return the number of the mango fruits in the basket.\n for examble:\n fruit_distribution(\"5 apples and 6 oranges\", 19) ->19 - 5 - 6 = 8\n fruit_distribution(\"0 apples and 1 oranges\",3) -> 3 - 0 - 1 = 2\n fruit_distribution(\"2 apples and 3 oranges\", 100) -> 100 - 2 - 3 = 95\n fruit_distribution(\"100 apples and 1 oranges\",120) -> 120 - 100 - 1 = 19\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/69", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-69", "template_id": "humaneval::HumanEval/69", "text": "def search(lst):\n '''\n You are given a non-empty list of positive integers. Return the greatest integer that is greater than\n zero, and has a frequency greater than or equal to the value of the integer itself.\n The frequency of an integer is the number of times it appears in the list.\n If no such a value exist, return -1.\n Examples:\n search([4, 1, 2, 2, 3, 1]) == 2\n search([1, 2, 2, 3, 3, 3, 4, 4, 4]) == 3\n search([5, 5, 4, 4, 4]) == -1\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/73", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-73", "template_id": "humaneval::HumanEval/73", "text": "def smallest_change(arr):\n \"\"\"\n Given an array arr of integers, find the minimum number of elements that\n need to be changed to make the array palindromic. A palindromic array is an array that\n is read the same backwards and forwards. In one change, you can change one element to any other element.\n\n For example:\n smallest_change([1,2,3,5,4,7,9,6]) == 4\n smallest_change([1, 2, 3, 4, 3, 2, 2]) == 1\n smallest_change([1, 2, 3, 2, 1]) == 0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/75", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-75", "template_id": "humaneval::HumanEval/75", "text": "def is_multiply_prime(a):\n \"\"\"Write a function that returns true if the given number is the multiplication of 3 prime numbers\n and false otherwise.\n Knowing that (a) is less then 100.\n Example:\n is_multiply_prime(30) == True\n 30 = 2 * 3 * 5\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/77", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-77", "template_id": "humaneval::HumanEval/77", "text": "def iscube(a):\n '''\n Write a function that takes an integer a and returns True\n if this ingeger is a cube of some integer number.\n Note: you may assume the input is always valid.\n Examples:\n iscube(1) ==> True\n iscube(2) ==> False\n iscube(-1) ==> True\n iscube(64) ==> True\n iscube(0) ==> True\n iscube(180) ==> False\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/78", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-78", "template_id": "humaneval::HumanEval/78", "text": "def hex_key(num):\n \"\"\"You have been tasked to write a function that receives\n a hexadecimal number as a string and counts the number of hexadecimal\n digits that are primes (prime number, or a prime, is a natural number\n greater than 1 that is not a product of two smaller natural numbers).\n Hexadecimal digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.\n Prime numbers are 2, 3, 5, 7, 11, 13, 17,...\n So you have to determine a number of the following digits: 2, 3, 5, 7,\n B (=decimal 11), D (=decimal 13).\n Note: you may assume the input is always correct or empty string,\n and symbols A,B,C,D,E,F are always uppercase.\n Examples:\n For num = \"AB\" the output should be 1.\n For num = \"1077E\" the output should be 2.\n For num = \"ABED1A33\" the output should be 4.\n For num = \"123456789ABCDEF0\" the output should be 6.\n For num = \"2020\" the output should be 2.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/79", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-79", "template_id": "humaneval::HumanEval/79", "text": "def decimal_to_binary(decimal):\n \"\"\"You will be given a number in decimal form and your task is to convert it to\n binary format. The function should return a string, with each character representing a binary\n number. Each character in the string will be '0' or '1'.\n\n There will be an extra couple of characters 'db' at the beginning and at the end of the string.\n The extra characters are there to help with the format.\n\n Examples:\n decimal_to_binary(15) # returns \"db1111db\"\n decimal_to_binary(32) # returns \"db100000db\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/81", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-81", "template_id": "humaneval::HumanEval/81", "text": "def numerical_letter_grade(grades):\n \"\"\"It is the last week of the semester and the teacher has to give the grades\n to students. The teacher has been making her own algorithm for grading.\n The only problem is, she has lost the code she used for grading.\n She has given you a list of GPAs for some students and you have to write\n a function that can output a list of letter grades using the following table:\n GPA | Letter grade\n 4.0 A+\n > 3.7 A\n > 3.3 A-\n > 3.0 B+\n > 2.7 B\n > 2.3 B-\n > 2.0 C+\n > 1.7 C\n > 1.3 C-\n > 1.0 D+\n > 0.7 D\n > 0.0 D-\n 0.0 E\n\n\n Example:\n grade_equation([4.0, 3, 1.7, 2, 3.5]) ==> ['A+', 'B', 'C-', 'C', 'A-']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/83", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-83", "template_id": "humaneval::HumanEval/83", "text": "def starts_one_ends(n):\n \"\"\"\n Given a positive integer n, return the count of the numbers of n-digit\n positive integers that start or end with 1.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/85", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-85", "template_id": "humaneval::HumanEval/85", "text": "def add(lst):\n \"\"\"Given a non-empty list of integers lst. add the even elements that are at odd indices..\n\n\n Examples:\n add([4, 2, 6, 7]) ==> 2\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/87", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-87", "template_id": "humaneval::HumanEval/87", "text": "def get_row(lst, x):\n \"\"\"\n You are given a 2 dimensional data, as a nested lists,\n which is similar to matrix, however, unlike matrices,\n each row may contain a different number of columns.\n Given lst, and integer x, find integers x in the list,\n and return list of tuples, [(x1, y1), (x2, y2) ...] such that\n each tuple is a coordinate - (row, columns), starting with 0.\n Sort coordinates initially by rows in ascending order.\n Also, sort coordinates of the row by columns in descending order.\n\n Examples:\n get_row([\n [1,2,3,4,5,6],\n [1,2,3,4,1,6],\n [1,2,3,4,5,1]\n ], 1) == [(0, 0), (1, 4), (1, 0), (2, 5), (2, 0)]\n get_row([], 1) == []\n get_row([[], [1], [1, 2, 3]], 3) == [(2, 2)]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/88", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-88", "template_id": "humaneval::HumanEval/88", "text": "def sort_array(array):\n \"\"\"\n Given an array of non-negative integers, return a copy of the given array after sorting,\n you will sort the given array in ascending order if the sum( first index value, last index value) is odd,\n or sort it in descending order if the sum( first index value, last index value) is even.\n\n Note:\n * don't change the given array.\n\n Examples:\n * sort_array([]) => []\n * sort_array([5]) => [5]\n * sort_array([2, 4, 3, 0, 1, 5]) => [0, 1, 2, 3, 4, 5]\n * sort_array([2, 4, 3, 0, 1, 5, 6]) => [6, 5, 4, 3, 2, 1, 0]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/90", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-90", "template_id": "humaneval::HumanEval/90", "text": "def next_smallest(lst):\n \"\"\"\n You are given a list of integers.\n Write a function next_smallest() that returns the 2nd smallest element of the list.\n Return None if there is no such element.\n\n next_smallest([1, 2, 3, 4, 5]) == 2\n next_smallest([5, 1, 4, 3, 2]) == 2\n next_smallest([]) == None\n next_smallest([1, 1]) == None\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/91", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-91", "template_id": "humaneval::HumanEval/91", "text": "def is_bored(S):\n \"\"\"\n You'll be given a string of words, and your task is to count the number\n of boredoms. A boredom is a sentence that starts with the word \"I\".\n Sentences are delimited by '.', '?' or '!'.\n\n For example:\n >>> is_bored(\"Hello world\")\n 0\n >>> is_bored(\"The sky is blue. The sun is shining. I love this weather\")\n 1\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/92", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-92", "template_id": "humaneval::HumanEval/92", "text": "def any_int(x, y, z):\n '''\n Create a function that takes 3 numbers.\n Returns true if one of the numbers is equal to the sum of the other two, and all numbers are integers.\n Returns false in any other cases.\n\n Examples\n any_int(5, 2, 7) ➞ True\n\n any_int(3, 2, 2) ➞ False\n\n any_int(3, -2, 1) ➞ True\n\n any_int(3.6, -2.2, 2) ➞ False\n\n\n\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/93", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-93", "template_id": "humaneval::HumanEval/93", "text": "def encode(message):\n \"\"\"\n Write a function that takes a message, and encodes in such a\n way that it swaps case of all letters, replaces all vowels in\n the message with the letter that appears 2 places ahead of that\n vowel in the english alphabet.\n Assume only letters.\n\n Examples:\n >>> encode('test')\n 'TGST'\n >>> encode('This is a message')\n 'tHKS KS C MGSSCGG'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/94", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-94", "template_id": "humaneval::HumanEval/94", "text": "def skjkasdkd(lst):\n \"\"\"You are given a list of integers.\n You need to find the largest prime value and return the sum of its digits.\n\n Examples:\n For lst = [0,3,2,1,3,5,7,4,5,5,5,2,181,32,4,32,3,2,32,324,4,3] the output should be 10\n For lst = [1,0,1,8,2,4597,2,1,3,40,1,2,1,2,4,2,5,1] the output should be 25\n For lst = [1,3,1,32,5107,34,83278,109,163,23,2323,32,30,1,9,3] the output should be 13\n For lst = [0,724,32,71,99,32,6,0,5,91,83,0,5,6] the output should be 11\n For lst = [0,81,12,3,1,21] the output should be 3\n For lst = [0,8,1,2,1,7] the output should be 7\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/97", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-97", "template_id": "humaneval::HumanEval/97", "text": "def multiply(a, b):\n \"\"\"Complete the function that takes two integers and returns\n the product of their unit digits.\n Assume the input is always valid.\n Examples:\n multiply(148, 412) should return 16.\n multiply(19, 28) should return 72.\n multiply(2020, 1851) should return 0.\n multiply(14,-15) should return 20.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/100", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-100", "template_id": "humaneval::HumanEval/100", "text": "def make_a_pile(n):\n \"\"\"\n Given a positive integer n, you have to make a pile of n levels of stones.\n The first level has n stones.\n The number of stones in the next level is:\n - the next odd number if n is odd.\n - the next even number if n is even.\n Return the number of stones in each level in a list, where element at index\n i represents the number of stones in the level (i+1).\n\n Examples:\n >>> make_a_pile(3)\n [3, 5, 7]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/101", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-101", "template_id": "humaneval::HumanEval/101", "text": "def words_string(s):\n \"\"\"\n You will be given a string of words separated by commas or spaces. Your task is\n to split the string into words and return an array of the words.\n\n For example:\n words_string(\"Hi, my name is John\") == [\"Hi\", \"my\", \"name\", \"is\", \"John\"]\n words_string(\"One, two, three, four, five, six\") == [\"One\", \"two\", \"three\", \"four\", \"five\", \"six\"]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/102", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-102", "template_id": "humaneval::HumanEval/102", "text": "def choose_num(x, y):\n \"\"\"This function takes two positive numbers x and y and returns the\n biggest even integer number that is in the range [x, y] inclusive. If\n there's no such number, then the function should return -1.\n\n For example:\n choose_num(12, 15) = 14\n choose_num(13, 12) = -1\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/103", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-103", "template_id": "humaneval::HumanEval/103", "text": "def rounded_avg(n, m):\n \"\"\"You are given two positive integers n and m, and your task is to compute the\n average of the integers from n through m (including n and m).\n Round the answer to the nearest integer and convert that to binary.\n If n is greater than m, return -1.\n Example:\n rounded_avg(1, 5) => \"0b11\"\n rounded_avg(7, 5) => -1\n rounded_avg(10, 20) => \"0b1111\"\n rounded_avg(20, 33) => \"0b11010\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/106", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-106", "template_id": "humaneval::HumanEval/106", "text": "def f(n):\n \"\"\" Implement the function f that takes n as a parameter,\n and returns a list of size n, such that the value of the element at index i is the factorial of i if i is even\n or the sum of numbers from 1 to i otherwise.\n i starts from 1.\n the factorial of i is the multiplication of the numbers from 1 to i (1 * 2 * ... * i).\n Example:\n f(5) == [1, 2, 6, 24, 15]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/107", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-107", "template_id": "humaneval::HumanEval/107", "text": "def even_odd_palindrome(n):\n \"\"\"\n Given a positive integer n, return a tuple that has the number of even and odd\n integer palindromes that fall within the range(1, n), inclusive.\n\n Example 1:\n\n Input: 3\n Output: (1, 2)\n Explanation:\n Integer palindrome are 1, 2, 3. one of them is even, and two of them are odd.\n\n Example 2:\n\n Input: 12\n Output: (4, 6)\n Explanation:\n Integer palindrome are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11. four of them are even, and 6 of them are odd.\n\n Note:\n 1. 1 <= n <= 10^3\n 2. returned tuple has the number of even and odd integer palindromes respectively.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/108", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-108", "template_id": "humaneval::HumanEval/108", "text": "def count_nums(arr):\n \"\"\"\n Write a function count_nums which takes an array of integers and returns\n the number of elements which has a sum of digits > 0.\n If a number is negative, then its first signed digit will be negative:\n e.g. -123 has signed digits -1, 2, and 3.\n >>> count_nums([]) == 0\n >>> count_nums([-1, 11, -11]) == 1\n >>> count_nums([1, 1, 2]) == 3\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/109", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-109", "template_id": "humaneval::HumanEval/109", "text": "def move_one_ball(arr):\n \"\"\"We have an array 'arr' of N integers arr[1], arr[2], ..., arr[N].The\n numbers in the array will be randomly ordered. Your task is to determine if\n it is possible to get an array sorted in non-decreasing order by performing\n the following operation on the given array:\n You are allowed to perform right shift operation any number of times.\n\n One right shift operation means shifting all elements of the array by one\n position in the right direction. The last element of the array will be moved to\n the starting position in the array i.e. 0th index.\n\n If it is possible to obtain the sorted array by performing the above operation\n then return True else return False.\n If the given array is empty then return True.\n\n Note: The given list is guaranteed to have unique elements.\n\n For Example:\n\n move_one_ball([3, 4, 5, 1, 2])==>True\n Explanation: By performin 2 right shift operations, non-decreasing order can\n be achieved for the given array.\n move_one_ball([3, 5, 4, 1, 2])==>False\n Explanation:It is not possible to get non-decreasing order for the given\n array by performing any number of right shift operations.\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/110", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-110", "template_id": "humaneval::HumanEval/110", "text": "def exchange(lst1, lst2):\n \"\"\"In this problem, you will implement a function that takes two lists of numbers,\n and determines whether it is possible to perform an exchange of elements\n between them to make lst1 a list of only even numbers.\n There is no limit on the number of exchanged elements between lst1 and lst2.\n If it is possible to exchange elements between the lst1 and lst2 to make\n all the elements of lst1 to be even, return \"YES\".\n Otherwise, return \"NO\".\n For example:\n exchange([1, 2, 3, 4], [1, 2, 3, 4]) => \"YES\"\n exchange([1, 2, 3, 4], [1, 5, 3, 4]) => \"NO\"\n It is assumed that the input lists will be non-empty.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/111", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-111", "template_id": "humaneval::HumanEval/111", "text": "def histogram(test):\n \"\"\"Given a string representing a space separated lowercase letters, return a dictionary\n of the letter with the most repetition and containing the corresponding count.\n If several letters have the same occurrence, return all of them.\n\n Example:\n histogram('a b c') == {'a': 1, 'b': 1, 'c': 1}\n histogram('a b b a') == {'a': 2, 'b': 2}\n histogram('a b c a b') == {'a': 2, 'b': 2}\n histogram('b b b b a') == {'b': 4}\n histogram('') == {}\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/114", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-114", "template_id": "humaneval::HumanEval/114", "text": "def minSubArraySum(nums):\n \"\"\"\n Given an array of integers nums, find the minimum sum of any non-empty sub-array\n of nums.\n Example\n minSubArraySum([2, 3, 4, 1, 2, 4]) == 1\n minSubArraySum([-1, -2, -3]) == -6\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/115", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-115", "template_id": "humaneval::HumanEval/115", "text": "def max_fill(grid, capacity):\n import math\n \"\"\"\n You are given a rectangular grid of wells. Each row represents a single well,\n and each 1 in a row represents a single unit of water.\n Each well has a corresponding bucket that can be used to extract water from it,\n and all buckets have the same capacity.\n Your task is to use the buckets to empty the wells.\n Output the number of times you need to lower the buckets.\n\n Example 1:\n Input:\n grid : [[0,0,1,0], [0,1,0,0], [1,1,1,1]]\n bucket_capacity : 1\n Output: 6\n\n Example 2:\n Input:\n grid : [[0,0,1,1], [0,0,0,0], [1,1,1,1], [0,1,1,1]]\n bucket_capacity : 2\n Output: 5\n\n Example 3:\n Input:\n grid : [[0,0,0], [0,0,0]]\n bucket_capacity : 5\n Output: 0\n\n Constraints:\n * all wells have the same length\n * 1 <= grid.length <= 10^2\n * 1 <= grid[:,1].length <= 10^2\n * grid[i][j] -> 0 | 1\n * 1 <= capacity <= 10\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/116", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-116", "template_id": "humaneval::HumanEval/116", "text": "def sort_array(arr):\n \"\"\"\n In this Kata, you have to sort an array of non-negative integers according to\n number of ones in their binary representation in ascending order.\n For similar number of ones, sort based on decimal value.\n\n It must be implemented like this:\n >>> sort_array([1, 5, 2, 3, 4]) == [1, 2, 3, 4, 5]\n >>> sort_array([-2, -3, -4, -5, -6]) == [-6, -5, -4, -3, -2]\n >>> sort_array([1, 0, 2, 3, 4]) [0, 1, 2, 3, 4]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/118", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-118", "template_id": "humaneval::HumanEval/118", "text": "def get_closest_vowel(word):\n \"\"\"You are given a word. Your task is to find the closest vowel that stands between\n two consonants from the right side of the word (case sensitive).\n\n Vowels in the beginning and ending doesn't count. Return empty string if you didn't\n find any vowel met the above condition.\n\n You may assume that the given string contains English letter only.\n\n Example:\n get_closest_vowel(\"yogurt\") ==> \"u\"\n get_closest_vowel(\"FULL\") ==> \"U\"\n get_closest_vowel(\"quick\") ==> \"\"\n get_closest_vowel(\"ab\") ==> \"\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/119", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-119", "template_id": "humaneval::HumanEval/119", "text": "def match_parens(lst):\n '''\n You are given a list of two strings, both strings consist of open\n parentheses '(' or close parentheses ')' only.\n Your job is to check if it is possible to concatenate the two strings in\n some order, that the resulting string will be good.\n A string S is considered to be good if and only if all parentheses in S\n are balanced. For example: the string '(())()' is good, while the string\n '())' is not.\n Return 'Yes' if there's a way to make a good string, and return 'No' otherwise.\n\n Examples:\n match_parens(['()(', ')']) == 'Yes'\n match_parens([')', ')']) == 'No'\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/123", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-123", "template_id": "humaneval::HumanEval/123", "text": "def get_odd_collatz(n):\n \"\"\"\n Given a positive integer n, return a sorted list that has the odd numbers in collatz sequence.\n\n The Collatz conjecture is a conjecture in mathematics that concerns a sequence defined\n as follows: start with any positive integer n. Then each term is obtained from the\n previous term as follows: if the previous term is even, the next term is one half of\n the previous term. If the previous term is odd, the next term is 3 times the previous\n term plus 1. The conjecture is that no matter what value of n, the sequence will always reach 1.\n\n Note:\n 1. Collatz(1) is [1].\n 2. returned list sorted in increasing order.\n\n For example:\n get_odd_collatz(5) returns [1, 5] # The collatz sequence for 5 is [5, 16, 8, 4, 2, 1], so the odd numbers are only 1, and 5.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/125", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-125", "template_id": "humaneval::HumanEval/125", "text": "def split_words(txt):\n '''\n Given a string of words, return a list of words split on whitespace, if no whitespaces exists in the text you\n should split on commas ',' if no commas exists you should return the number of lower-case letters with odd order in the\n alphabet, ord('a') = 0, ord('b') = 1, ... ord('z') = 25\n Examples\n split_words(\"Hello world!\") ➞ [\"Hello\", \"world!\"]\n split_words(\"Hello,world!\") ➞ [\"Hello\", \"world!\"]\n split_words(\"abcdef\") == 3\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/128", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-128", "template_id": "humaneval::HumanEval/128", "text": "def prod_signs(arr):\n \"\"\"\n You are given an array arr of integers and you need to return\n sum of magnitudes of integers multiplied by product of all signs\n of each number in the array, represented by 1, -1 or 0.\n Note: return None for empty arr.\n\n Example:\n >>> prod_signs([1, 2, 2, -4]) == -9\n >>> prod_signs([0, 1]) == 0\n >>> prod_signs([]) == None\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/130", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-130", "template_id": "humaneval::HumanEval/130", "text": "def tri(n):\n \"\"\"Everyone knows Fibonacci sequence, it was studied deeply by mathematicians in\n the last couple centuries. However, what people don't know is Tribonacci sequence.\n Tribonacci sequence is defined by the recurrence:\n tri(1) = 3\n tri(n) = 1 + n / 2, if n is even.\n tri(n) = tri(n - 1) + tri(n - 2) + tri(n + 1), if n is odd.\n For example:\n tri(2) = 1 + (2 / 2) = 2\n tri(4) = 3\n tri(3) = tri(2) + tri(1) + tri(4)\n = 2 + 3 + 3 = 8\n You are given a non-negative integer number n, you have to a return a list of the\n first n + 1 numbers of the Tribonacci sequence.\n Examples:\n tri(3) = [1, 3, 2, 8]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/131", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-131", "template_id": "humaneval::HumanEval/131", "text": "def digits(n):\n \"\"\"Given a positive integer n, return the product of the odd digits.\n Return 0 if all digits are even.\n For example:\n digits(1) == 1\n digits(4) == 0\n digits(235) == 15\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/132", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-132", "template_id": "humaneval::HumanEval/132", "text": "def is_nested(string):\n '''\n Create a function that takes a string as input which contains only square brackets.\n The function should return True if and only if there is a valid subsequence of brackets\n where at least one bracket in the subsequence is nested.\n\n is_nested('[[]]') ➞ True\n is_nested('[]]]]]]][[[[[]') ➞ False\n is_nested('[][]') ➞ False\n is_nested('[]') ➞ False\n is_nested('[[][]]') ➞ True\n is_nested('[[]][[') ➞ True\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/133", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-133", "template_id": "humaneval::HumanEval/133", "text": "def sum_squares(lst):\n \"\"\"You are given a list of numbers.\n You need to return the sum of squared numbers in the given list,\n round each element in the list to the upper int(Ceiling) first.\n Examples:\n For lst = [1,2,3] the output should be 14\n For lst = [1,4,9] the output should be 98\n For lst = [1,3,5,7] the output should be 84\n For lst = [1.4,4.2,0] the output should be 29\n For lst = [-2.4,1,1] the output should be 6\n\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/135", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-135", "template_id": "humaneval::HumanEval/135", "text": "def can_arrange(arr):\n \"\"\"Create a function which returns the largest index of an element which\n is not greater than or equal to the element immediately preceding it. If\n no such element exists then return -1. The given array will not contain\n duplicate values.\n\n Examples:\n can_arrange([1,2,4,3,5]) = 3\n can_arrange([1,2,3]) = -1\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/136", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-136", "template_id": "humaneval::HumanEval/136", "text": "def largest_smallest_integers(lst):\n '''\n Create a function that returns a tuple (a, b), where 'a' is\n the largest of negative integers, and 'b' is the smallest\n of positive integers in a list.\n If there is no negative or positive integers, return them as None.\n\n Examples:\n largest_smallest_integers([2, 4, 1, 3, 5, 7]) == (None, 1)\n largest_smallest_integers([]) == (None, None)\n largest_smallest_integers([0]) == (None, None)\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/137", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-137", "template_id": "humaneval::HumanEval/137", "text": "def compare_one(a, b):\n \"\"\"\n Create a function that takes integers, floats, or strings representing\n real numbers, and returns the larger variable in its given variable type.\n Return None if the values are equal.\n Note: If a real number is represented as a string, the floating point might be . or ,\n\n compare_one(1, 2.5) ➞ 2.5\n compare_one(1, \"2,3\") ➞ \"2,3\"\n compare_one(\"5,1\", \"6\") ➞ \"6\"\n compare_one(\"1\", 1) ➞ None\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/139", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-139", "template_id": "humaneval::HumanEval/139", "text": "def special_factorial(n):\n \"\"\"The Brazilian factorial is defined as:\n brazilian_factorial(n) = n! * (n-1)! * (n-2)! * ... * 1!\n where n > 0\n\n For example:\n >>> special_factorial(4)\n 288\n\n The function will receive an integer as input and should return the special\n factorial of this integer.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/140", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-140", "template_id": "humaneval::HumanEval/140", "text": "def fix_spaces(text):\n \"\"\"\n Given a string text, replace all spaces in it with underscores,\n and if a string has more than 2 consecutive spaces,\n then replace all consecutive spaces with -\n\n fix_spaces(\"Example\") == \"Example\"\n fix_spaces(\"Example 1\") == \"Example_1\"\n fix_spaces(\" Example 2\") == \"_Example_2\"\n fix_spaces(\" Example 3\") == \"_Example-3\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/142", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-142", "template_id": "humaneval::HumanEval/142", "text": "def sum_squares(lst):\n \"\"\"\"\n This function will take a list of integers. For all entries in the list, the function shall square the integer entry if its index is a\n multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not\n change the entries in the list whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries.\n\n Examples:\n For lst = [1,2,3] the output should be 6\n For lst = [] the output should be 0\n For lst = [-1,-5,2,-1,-5] the output should be -126\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/143", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-143", "template_id": "humaneval::HumanEval/143", "text": "def words_in_sentence(sentence):\n \"\"\"\n You are given a string representing a sentence,\n the sentence contains some words separated by a space,\n and you have to return a string that contains the words from the original sentence,\n whose lengths are prime numbers,\n the order of the words in the new string should be the same as the original one.\n\n Example 1:\n Input: sentence = \"This is a test\"\n Output: \"is\"\n\n Example 2:\n Input: sentence = \"lets go for swimming\"\n Output: \"go for\"\n\n Constraints:\n * 1 <= len(sentence) <= 100\n * sentence contains only letters\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/150", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-150", "template_id": "humaneval::HumanEval/150", "text": "def x_or_y(n, x, y):\n \"\"\"A simple program which should return the value of x if n is\n a prime number and should return the value of y otherwise.\n\n Examples:\n for x_or_y(7, 34, 12) == 34\n for x_or_y(15, 8, 5) == 5\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/151", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-151", "template_id": "humaneval::HumanEval/151", "text": "def double_the_difference(lst):\n '''\n Given a list of numbers, return the sum of squares of the numbers\n in the list that are odd. Ignore numbers that are negative or not integers.\n\n double_the_difference([1, 3, 2, 0]) == 1 + 9 + 0 + 0 = 10\n double_the_difference([-1, -2, 0]) == 0\n double_the_difference([9, -2]) == 81\n double_the_difference([0]) == 0\n\n If the input list is empty, return 0.\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/153", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-153", "template_id": "humaneval::HumanEval/153", "text": "def Strongest_Extension(class_name, extensions):\n \"\"\"You will be given the name of a class (a string) and a list of extensions.\n The extensions are to be used to load additional classes to the class. The\n strength of the extension is as follows: Let CAP be the number of the uppercase\n letters in the extension's name, and let SM be the number of lowercase letters\n in the extension's name, the strength is given by the fraction CAP - SM.\n You should find the strongest extension and return a string in this\n format: ClassName.StrongestExtensionName.\n If there are two or more extensions with the same strength, you should\n choose the one that comes first in the list.\n For example, if you are given \"Slices\" as the class and a list of the\n extensions: ['SErviNGSliCes', 'Cheese', 'StuFfed'] then you should\n return 'Slices.SErviNGSliCes' since 'SErviNGSliCes' is the strongest extension\n (its strength is -1).\n Example:\n for Strongest_Extension('my_class', ['AA', 'Be', 'CC']) == 'my_class.AA'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/156", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-156", "template_id": "humaneval::HumanEval/156", "text": "def int_to_mini_roman(number):\n \"\"\"\n Given a positive integer, obtain its roman numeral equivalent as a string,\n and return it in lowercase.\n Restrictions: 1 <= num <= 1000\n\n Examples:\n >>> int_to_mini_roman(19) == 'xix'\n >>> int_to_mini_roman(152) == 'clii'\n >>> int_to_mini_roman(426) == 'cdxxvi'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/158", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-158", "template_id": "humaneval::HumanEval/158", "text": "def find_max(words):\n \"\"\"Write a function that accepts a list of strings.\n The list contains different words. Return the word with maximum number\n of unique characters. If multiple strings have maximum number of unique\n characters, return the one which comes first in lexicographical order.\n\n find_max([\"name\", \"of\", \"string\"]) == \"string\"\n find_max([\"name\", \"enam\", \"game\"]) == \"enam\"\n find_max([\"aaaaaaa\", \"bb\" ,\"cc\"]) == \"\"aaaaaaa\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/160", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-160", "template_id": "humaneval::HumanEval/160", "text": "def do_algebra(operator, operand):\n \"\"\"\n Given two lists operator, and operand. The first list has basic algebra operations, and\n the second list is a list of integers. Use the two given lists to build the algebric\n expression and return the evaluation of this expression.\n\n The basic algebra operations:\n Addition ( + )\n Subtraction ( - )\n Multiplication ( * )\n Floor division ( // )\n Exponentiation ( ** )\n\n Example:\n operator['+', '*', '-']\n array = [2, 3, 4, 5]\n result = 2 + 3 * 4 - 5\n => result = 9\n\n Note:\n The length of operator list is equal to the length of operand list minus one.\n Operand is a list of of non-negative integers.\n Operator list has at least one operator, and operand list has at least two operands.\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/161", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "train", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-161", "template_id": "humaneval::HumanEval/161", "text": "def solve(s):\n \"\"\"You are given a string s.\n if s[i] is a letter, reverse its case from lower to upper or vise versa,\n otherwise keep it as it is.\n If the string contains no letters, reverse the string.\n The function should return the resulted string.\n Examples\n solve(\"1234\") = \"4321\"\n solve(\"ab\") = \"AB\"\n solve(\"#a@C\") = \"#A@c\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::1", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::1", "template_id": "mbpp::1", "text": "Write a function to find the minimum cost path to reach (m, n) from (0, 0) for the given cost matrix cost[][] and a position (m, n) in cost[][].\n\nYour function must be named `min_cost`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::3", "template_id": "mbpp::3", "text": "Write a python function to identify non-prime numbers.\n\nYour function must be named `is_not_prime`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::5", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::5", "template_id": "mbpp::5", "text": "Write a function to find the number of ways to fill it with 2 x 1 dominoes for the given 3 x n board.\n\nYour function must be named `count_ways`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::6", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::6", "template_id": "mbpp::6", "text": "Write a python function to check whether the two numbers differ at one bit position only or not.\n\nYour function must be named `is_Power_Of_Two`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::8", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::8", "template_id": "mbpp::8", "text": "Write a function to find squares of individual elements in a list using lambda function.\n\nYour function must be named `square_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::9", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::9", "template_id": "mbpp::9", "text": "Write a python function to find the minimum number of rotations required to get the same string.\n\nYour function must be named `find_Rotations`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::10", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::10", "template_id": "mbpp::10", "text": "Write a function to get the n smallest items from a dataset.\n\nYour function must be named `small_nnum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::12", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::12", "template_id": "mbpp::12", "text": "Write a function to sort a given matrix in ascending order according to the sum of its rows.\n\nYour function must be named `sort_matrix`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::14", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::14", "template_id": "mbpp::14", "text": "Write a python function to find the volume of a triangular prism.\n\nYour function must be named `find_Volume`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::15", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::15", "template_id": "mbpp::15", "text": "Write a function to split a string at lowercase letters.\n\nYour function must be named `split_lowerstring`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::16", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::16", "template_id": "mbpp::16", "text": "Write a function to find sequences of lowercase letters joined with an underscore.\n\nYour function must be named `text_lowercase_underscore`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::17|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::17", "template_id": "mbpp::17", "text": "Write a function to find the perimeter of a square.\n\nYour function must be named `square_perimeter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::20", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::20", "template_id": "mbpp::20", "text": "Write a function to check if the given number is woodball or not.\n\nYour function must be named `is_woodall`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::21", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::21", "template_id": "mbpp::21", "text": "Write a function to find m number of multiples of n.\n\nYour function must be named `multiples_of_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::24", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::24", "template_id": "mbpp::24", "text": "Write a function to convert the given binary number to its decimal equivalent.\n\nYour function must be named `binary_to_decimal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::27", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::27", "template_id": "mbpp::27", "text": "Write a python function to remove all digits from a list of strings.\n\nYour function must be named `remove`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::28", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::28", "template_id": "mbpp::28", "text": "Write a python function to find binomial co-efficient.\n\nYour function must be named `binomial_Coeff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::32", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::32", "template_id": "mbpp::32", "text": "Write a python function to find the largest prime factor of a given number.\n\nYour function must be named `max_Prime_Factors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::34", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::34", "template_id": "mbpp::34", "text": "Write a python function to find the missing number in a sorted array.\n\nYour function must be named `find_missing`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::37", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::37", "template_id": "mbpp::37", "text": "Write a function to sort a given mixed list of integers and strings.\n\nYour function must be named `sort_mixed_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::38", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::38", "template_id": "mbpp::38", "text": "Write a function to find the division of first even and odd number of a given list.\n\nYour function must be named `div_even_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::40", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::40", "template_id": "mbpp::40", "text": "Write a function to find frequency of the elements in a given list of lists using collections module.\n\nYour function must be named `freq_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::41", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::41", "template_id": "mbpp::41", "text": "Write a function to filter even numbers using lambda function.\n\nYour function must be named `filter_evennumbers`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::43", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::43", "template_id": "mbpp::43", "text": "Write a function to find sequences of lowercase letters joined with an underscore using regex.\n\nYour function must be named `text_match`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::45", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::45", "template_id": "mbpp::45", "text": "Write a function to find the gcd of the given array elements.\n\nYour function must be named `find_gcd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::46", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::46", "template_id": "mbpp::46", "text": "Write a python function to determine whether all the numbers are different from each other are not.\n\nYour function must be named `test_distinct`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::47", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::47", "template_id": "mbpp::47", "text": "Write a python function to find the last digit when factorial of a divides factorial of b.\n\nYour function must be named `compute_Last_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::48", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::48", "template_id": "mbpp::48", "text": "Write a python function to set all odd bits of a given number.\n\nYour function must be named `odd_bit_set_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::50", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::50", "template_id": "mbpp::50", "text": "Write a function to find the list with minimum length using lambda function.\n\nYour function must be named `min_length_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::327|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::51", "template_id": "mbpp::51", "text": "Write a function to print check if the triangle is equilateral or not.\n\nYour function must be named `check_equilateral`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::52", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::52", "template_id": "mbpp::52", "text": "Write a function to caluclate area of a parallelogram.\n\nYour function must be named `parallelogram_area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::57", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::57", "template_id": "mbpp::57", "text": "Write a python function to find the largest number that can be formed with the given digits.\n\nYour function must be named `find_Max_Num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::135|n4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::59", "template_id": "mbpp::59", "text": "Write a function to find the nth octagonal number.\n\nYour function must be named `is_octagonal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::60", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::60", "template_id": "mbpp::60", "text": "Write a function to find the maximum length of the subsequence with difference between adjacent elements for the given array.\n\nYour function must be named `max_len_sub`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::62", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::62", "template_id": "mbpp::62", "text": "Write a python function to find smallest number in a list.\n\nYour function must be named `smallest_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::64", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::64", "template_id": "mbpp::64", "text": "Write a function to sort a list of tuples using lambda.\n\nYour function must be named `subject_marks`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::65", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::65", "template_id": "mbpp::65", "text": "Write a function of recursion list sum.\n\nYour function must be named `recursive_list_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::67", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::67", "template_id": "mbpp::67", "text": "Write a function to find the number of ways to partition a set of bell numbers.\n\nYour function must be named `bell_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::68", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::68", "template_id": "mbpp::68", "text": "Write a python function to check whether the given array is monotonic or not.\n\nYour function must be named `is_Monotonic`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::71", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::71", "template_id": "mbpp::71", "text": "Write a function to sort a list of elements using comb sort.\n\nYour function must be named `comb_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::72", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::72", "template_id": "mbpp::72", "text": "Write a python function to check whether the given number can be represented as difference of two squares or not.\n\nYour function must be named `dif_Square`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::73", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::73", "template_id": "mbpp::73", "text": "Write a function to split the given string with multiple delimiters by using regex.\n\nYour function must be named `multiple_split`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::74", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::74", "template_id": "mbpp::74", "text": "Write a function to check whether it follows the sequence given in the patterns array.\n\nYour function must be named `is_samepatterns`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::347|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::76", "template_id": "mbpp::76", "text": "Write a python function to count the number of squares in a rectangle.\n\nYour function must be named `count_Squares`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::78", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::78", "template_id": "mbpp::78", "text": "Write a python function to find number of integers with odd number of set bits.\n\nYour function must be named `count_With_Odd_SetBits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::79", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::79", "template_id": "mbpp::79", "text": "Write a python function to check whether the length of the word is odd or not.\n\nYour function must be named `word_len`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::80", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::80", "template_id": "mbpp::80", "text": "Write a function to find the nth tetrahedral number.\n\nYour function must be named `tetrahedral_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::81", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::81", "template_id": "mbpp::81", "text": "Write a function to zip the two given tuples.\n\nYour function must be named `zip_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::82", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::82", "template_id": "mbpp::82", "text": "Write a function to find the volume of a sphere.\n\nYour function must be named `volume_sphere`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::84", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::84", "template_id": "mbpp::84", "text": "Write a function to find the n-th number in newman conway sequence.\n\nYour function must be named `sequence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::497|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::85", "template_id": "mbpp::85", "text": "Write a function to find the surface area of a sphere.\n\nYour function must be named `surfacearea_sphere`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::86", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::86", "template_id": "mbpp::86", "text": "Write a function to find nth centered hexagonal number.\n\nYour function must be named `centered_hexagonal_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::87", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::87", "template_id": "mbpp::87", "text": "Write a function to merge three dictionaries into a single expression.\n\nYour function must be named `merge_dictionaries_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::88", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::88", "template_id": "mbpp::88", "text": "Write a function to get the frequency of the elements in a list.\n\nYour function must be named `freq_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::89|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::89", "template_id": "mbpp::89", "text": "Write a function to find the closest smaller number than n.\n\nYour function must be named `closest_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::90|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::90", "template_id": "mbpp::90", "text": "Write a python function to find the length of the longest word.\n\nYour function must be named `len_log`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::91", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::91", "template_id": "mbpp::91", "text": "Write a function to check if a substring is present in a given list of string values.\n\nYour function must be named `find_substring`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::93", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::93", "template_id": "mbpp::93", "text": "Write a function to calculate the value of 'a' to the power 'b'.\n\nYour function must be named `power`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::98", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::98", "template_id": "mbpp::98", "text": "Write a function to multiply all the numbers in a list and divide with the length of the list.\n\nYour function must be named `multiply_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::99", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::99", "template_id": "mbpp::99", "text": "Write a function to convert the given decimal number to its binary equivalent.\n\nYour function must be named `decimal_to_binary`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::101", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::101", "template_id": "mbpp::101", "text": "Write a function to find the kth element in the given array.\n\nYour function must be named `kth_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::102", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::102", "template_id": "mbpp::102", "text": "Write a function to convert snake case string to camel case string.\n\nYour function must be named `snake_to_camel`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::103", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::103", "template_id": "mbpp::103", "text": "Write a function to find eulerian number a(n, m).\n\nYour function must be named `eulerian_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::104", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::104", "template_id": "mbpp::104", "text": "Write a function to sort each sublist of strings in a given list of lists using lambda function.\n\nYour function must be named `sort_sublists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::105", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::105", "template_id": "mbpp::105", "text": "Write a python function to count true booleans in the given list.\n\nYour function must be named `count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::107", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::107", "template_id": "mbpp::107", "text": "Write a python function to count hexadecimal numbers for a given range.\n\nYour function must be named `count_Hexadecimal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::111", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::111", "template_id": "mbpp::111", "text": "Write a function to find common elements in given nested lists. * list item * list item * list item * list item\n\nYour function must be named `common_in_nested_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::112", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::112", "template_id": "mbpp::112", "text": "Write a python function to find the perimeter of a cylinder.\n\nYour function must be named `perimeter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::113", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::113", "template_id": "mbpp::113", "text": "Write a function to check if a string represents an integer or not.\n\nYour function must be named `check_integer`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::115", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::115", "template_id": "mbpp::115", "text": "Write a function to check whether all dictionaries in a list are empty or not.\n\nYour function must be named `empty_dit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::118", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::118", "template_id": "mbpp::118", "text": "[link text](https:// [link text](https:// [link text](https://)))write a function to convert a string to a list.\n\nYour function must be named `string_to_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::120", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::120", "template_id": "mbpp::120", "text": "Write a function to find the maximum product from the pairs of tuples within a given list.\n\nYour function must be named `max_product_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::123", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::123", "template_id": "mbpp::123", "text": "Write a function to sum all amicable numbers from 1 to a specified number.\n\nYour function must be named `amicable_numbers_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::126", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::126", "template_id": "mbpp::126", "text": "Write a python function to find the sum of common divisors of two given numbers.\n\nYour function must be named `sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::127", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::127", "template_id": "mbpp::127", "text": "Write a function to multiply two integers without using the * operator in python.\n\nYour function must be named `multiply_int`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::128", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::128", "template_id": "mbpp::128", "text": "Write a function to shortlist words that are longer than n from a given list of words.\n\nYour function must be named `long_words`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::130", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::130", "template_id": "mbpp::130", "text": "Write a function to find the item with maximum frequency in a given list.\n\nYour function must be named `max_occurrences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::131", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::131", "template_id": "mbpp::131", "text": "Write a python function to reverse only the vowels of a given string.\n\nYour function must be named `reverse_vowels`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::132", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::132", "template_id": "mbpp::132", "text": "Write a function to convert tuple to a string.\n\nYour function must be named `tup_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::133", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::133", "template_id": "mbpp::133", "text": "Write a function to calculate the sum of the negative numbers of a given list of numbers using lambda function.\n\nYour function must be named `sum_negativenum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::134", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::134", "template_id": "mbpp::134", "text": "Write a python function to check whether the last element of given array is even or odd after performing an operation p times.\n\nYour function must be named `check_last`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::135|n4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::135", "template_id": "mbpp::135", "text": "Write a function to find the nth hexagonal number.\n\nYour function must be named `hexagonal_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::138", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::138", "template_id": "mbpp::138", "text": "Write a python function to check whether the given number can be represented as sum of non-zero powers of 2 or not.\n\nYour function must be named `is_Sum_Of_Powers_Of_Two`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::140", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::140", "template_id": "mbpp::140", "text": "Write a function to extract elements that occur singly in the given tuple list.\n\nYour function must be named `extract_singly`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::141", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::141", "template_id": "mbpp::141", "text": "Write a function to sort a list of elements using pancake sort.\n\nYour function must be named `pancake_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::143", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::143", "template_id": "mbpp::143", "text": "Write a function to find number of lists present in the given tuple.\n\nYour function must be named `find_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::144", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::144", "template_id": "mbpp::144", "text": "Write a python function to find the sum of absolute differences in all pairs of the given array.\n\nYour function must be named `sum_Pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::145", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::145", "template_id": "mbpp::145", "text": "Write a python function to find the maximum difference between any two elements in a given array.\n\nYour function must be named `max_Abs_Diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::147", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::147", "template_id": "mbpp::147", "text": "Write a function to find the maximum total path sum in the given triangle.\n\nYour function must be named `max_path_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::148", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::148", "template_id": "mbpp::148", "text": "Write a function to divide a number into two parts such that the sum of digits is maximum.\n\nYour function must be named `sum_digits_single`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::151", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::151", "template_id": "mbpp::151", "text": "Write a python function to check whether the given number is co-prime or not.\n\nYour function must be named `gcd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::153", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::153", "template_id": "mbpp::153", "text": "Write a function to find the vertex of a parabola.\n\nYour function must be named `parabola_vertex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::155", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::155", "template_id": "mbpp::155", "text": "Write a python function to toggle all even bits of a given number.\n\nYour function must be named `even_bit_toggle_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::156", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::156", "template_id": "mbpp::156", "text": "Write a function to convert a tuple of string values to a tuple of integer values.\n\nYour function must be named `tuple_int_str`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::157", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::157", "template_id": "mbpp::157", "text": "Write a function to reflect the run-length encoding from a list.\n\nYour function must be named `encode_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::158", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::158", "template_id": "mbpp::158", "text": "Write a python function to find k number of operations required to make all elements equal.\n\nYour function must be named `min_Ops`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::159", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::159", "template_id": "mbpp::159", "text": "Write a function to print the season for the given month and day.\n\nYour function must be named `month_season`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::161", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::161", "template_id": "mbpp::161", "text": "Write a function to remove all elements from a given list present in another list.\n\nYour function must be named `remove_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::162", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::162", "template_id": "mbpp::162", "text": "Write a function to calculate the sum of the positive integers of n+(n-2)+(n-4)... (until n-x =< 0).\n\nYour function must be named `sum_series`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::163", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::163", "template_id": "mbpp::163", "text": "Write a function to calculate the area of a regular polygon.\n\nYour function must be named `area_polygon`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::164", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::164", "template_id": "mbpp::164", "text": "Write a python function to check whether the sum of divisors are same or not.\n\nYour function must be named `divSum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::165", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::165", "template_id": "mbpp::165", "text": "Write a python function to count characters at same position in a given string (lower and uppercase characters) as in english alphabet.\n\nYour function must be named `count_char_position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::166", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::166", "template_id": "mbpp::166", "text": "Write a python function to count the pairs with xor as an even number.\n\nYour function must be named `find_even_Pair`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::167", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::167", "template_id": "mbpp::167", "text": "Write a python function to find smallest power of 2 greater than or equal to n.\n\nYour function must be named `next_Power_Of_2`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::168", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::168", "template_id": "mbpp::168", "text": "Write a python function to find the frequency of a number in a given array.\n\nYour function must be named `frequency`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::169", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::169", "template_id": "mbpp::169", "text": "Write a function to calculate the nth pell number.\n\nYour function must be named `get_pell`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::170", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::170", "template_id": "mbpp::170", "text": "Write a function to find sum of the numbers in a list between the indices of a specified range.\n\nYour function must be named `sum_range_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::175", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::175", "template_id": "mbpp::175", "text": "Write a function to verify validity of a string of parentheses.\n\nYour function must be named `is_valid_parenthese`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::176", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::176", "template_id": "mbpp::176", "text": "Write a function to find the perimeter of a triangle.\n\nYour function must be named `perimeter_triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::177", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::177", "template_id": "mbpp::177", "text": "Write a python function to find two distinct numbers such that their lcm lies within the given range.\n\nYour function must be named `answer`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::179", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::179", "template_id": "mbpp::179", "text": "Write a function to find if the given number is a keith number or not.\n\nYour function must be named `is_num_keith`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::180", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::180", "template_id": "mbpp::180", "text": "Write a function to calculate distance between two points using latitude and longitude.\n\nYour function must be named `distance_lat_long`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::182", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::182", "template_id": "mbpp::182", "text": "Write a function to find uppercase, lowercase, special character and numeric values using regex.\n\nYour function must be named `find_character`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::183", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::183", "template_id": "mbpp::183", "text": "Write a function to count all the distinct pairs having a difference of k in any array.\n\nYour function must be named `count_pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::184", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::184", "template_id": "mbpp::184", "text": "Write a function to find all the values in a list that are greater than a specified number.\n\nYour function must be named `greater_specificnum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::187", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::187", "template_id": "mbpp::187", "text": "Write a function to find the longest common subsequence for the given two sequences.\n\nYour function must be named `longest_common_subsequence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::188", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::188", "template_id": "mbpp::188", "text": "Write a python function to check whether the given number can be represented by product of two squares or not.\n\nYour function must be named `prod_Square`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::189", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::189", "template_id": "mbpp::189", "text": "Write a python function to find the first missing positive number.\n\nYour function must be named `first_Missing_Positive`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::192", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::192", "template_id": "mbpp::192", "text": "Write a python function to check whether a string has atleast one letter and one number.\n\nYour function must be named `check_String`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::195", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::195", "template_id": "mbpp::195", "text": "Write a python function to find the first position of an element in a sorted array.\n\nYour function must be named `first`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::196", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::196", "template_id": "mbpp::196", "text": "Write a function to remove all the tuples with length k.\n\nYour function must be named `remove_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::201|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::201", "template_id": "mbpp::201", "text": "Write a python function to check whether the elements in a list are same or not.\n\nYour function must be named `chkList`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::202", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::202", "template_id": "mbpp::202", "text": "Write a function to remove even characters in a string.\n\nYour function must be named `remove_even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::203", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::203", "template_id": "mbpp::203", "text": "Write a python function to find the hamming distance between given two integers.\n\nYour function must be named `hamming_Distance`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::205", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::205", "template_id": "mbpp::205", "text": "Write a function to find the inversions of tuple elements in the given tuple list.\n\nYour function must be named `inversion_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::206", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::206", "template_id": "mbpp::206", "text": "Write a function to perform the adjacent element concatenation in the given tuples.\n\nYour function must be named `concatenate_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::208", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::208", "template_id": "mbpp::208", "text": "Write a function to check the given decimal with a precision of 2 by using regex.\n\nYour function must be named `is_decimal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::211", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::211", "template_id": "mbpp::211", "text": "Write a python function to count numbers whose oth and nth bits are set.\n\nYour function must be named `count_Num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::212", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::212", "template_id": "mbpp::212", "text": "Write a python function to find the sum of fourth power of n natural numbers.\n\nYour function must be named `fourth_Power_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::213", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::213", "template_id": "mbpp::213", "text": "Write a function to perform the concatenation of two string tuples.\n\nYour function must be named `concatenate_strings`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::214", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::214", "template_id": "mbpp::214", "text": "Write a function to convert radians to degrees.\n\nYour function must be named `degree_radian`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::215", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::215", "template_id": "mbpp::215", "text": "Write a function to decode a run-length encoded given list.\n\nYour function must be named `decode_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::216", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::216", "template_id": "mbpp::216", "text": "Write a function to check if a nested list is a subset of another nested list.\n\nYour function must be named `check_subset_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::217|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::217", "template_id": "mbpp::217", "text": "Write a python function to find the first repeated character in a given string.\n\nYour function must be named `first_Repeated_Char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::219", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::219", "template_id": "mbpp::219", "text": "Write a function to extract maximum and minimum k elements in the given tuple.\n\nYour function must be named `extract_min_max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::220", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::220", "template_id": "mbpp::220", "text": "Write a function to replace maximum n occurrences of spaces, commas, or dots with a colon.\n\nYour function must be named `replace_max_specialchar`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::222", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::222", "template_id": "mbpp::222", "text": "Write a function to check if all the elements in tuple have same data type or not.\n\nYour function must be named `check_type`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::226", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::226", "template_id": "mbpp::226", "text": "Write a python function to remove the characters which have odd index values of a given string.\n\nYour function must be named `odd_values_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::230", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::230", "template_id": "mbpp::230", "text": "Write a function to replace blank spaces with any character in a string.\n\nYour function must be named `replace_blank`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::231", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::231", "template_id": "mbpp::231", "text": "Write a function to find the maximum sum in the given right triangle of numbers.\n\nYour function must be named `max_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::233", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::233", "template_id": "mbpp::233", "text": "Write a function to find the lateral surface area of a cylinder.\n\nYour function must be named `lateralsuface_cylinder`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::235", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::235", "template_id": "mbpp::235", "text": "Write a python function to set all even bits of a given number.\n\nYour function must be named `even_bit_set_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::237", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::237", "template_id": "mbpp::237", "text": "Write a function to check the occurrences of records which occur similar times in the given tuples.\n\nYour function must be named `check_occurences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::238", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::238", "template_id": "mbpp::238", "text": "Write a python function to count number of non-empty substrings of a given string.\n\nYour function must be named `number_of_substrings`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::240", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::240", "template_id": "mbpp::240", "text": "Write a function to replace the last element of the list with another list.\n\nYour function must be named `replace_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::242", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::242", "template_id": "mbpp::242", "text": "Write a function to count total characters in a string.\n\nYour function must be named `count_charac`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::245", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::245", "template_id": "mbpp::245", "text": "Write a function to find the maximum sum of bi-tonic sub-sequence for the given array.\n\nYour function must be named `max_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::246", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::246", "template_id": "mbpp::246", "text": "Write a function for computing square roots using the babylonian method.\n\nYour function must be named `babylonian_squareroot`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::248|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::248", "template_id": "mbpp::248", "text": "Write a function to calculate the harmonic sum of n-1.\n\nYour function must be named `harmonic_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::250", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::250", "template_id": "mbpp::250", "text": "Write a python function to count the occcurences of an element in a tuple.\n\nYour function must be named `count_X`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::251", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::251", "template_id": "mbpp::251", "text": "Write a function to insert an element before each element of a list.\n\nYour function must be named `insert_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::252", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::252", "template_id": "mbpp::252", "text": "Write a python function to convert complex numbers to polar coordinates.\n\nYour function must be named `convert`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::253", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::253", "template_id": "mbpp::253", "text": "Write a python function to count integers from a given list.\n\nYour function must be named `count_integer`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::255", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::255", "template_id": "mbpp::255", "text": "Write a function to choose specified number of colours from three different colours and generate all the combinations with repetitions.\n\nYour function must be named `combinations_colors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::257", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::257", "template_id": "mbpp::257", "text": "Write a function to swap two numbers.\n\nYour function must be named `swap_numbers`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::259", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::259", "template_id": "mbpp::259", "text": "Write a function to maximize the given two tuples.\n\nYour function must be named `maximize_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::261", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::261", "template_id": "mbpp::261", "text": "Write a function to perform mathematical division operation across the given tuples.\n\nYour function must be named `division_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::262", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::262", "template_id": "mbpp::262", "text": "Write a function to split a given list into two parts where the length of the first part of the list is given.\n\nYour function must be named `split_two_parts`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::263", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::263", "template_id": "mbpp::263", "text": "Write a function to merge two dictionaries.\n\nYour function must be named `merge_dict`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::265", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::265", "template_id": "mbpp::265", "text": "Write a function to split a list for every nth element.\n\nYour function must be named `list_split`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::267|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::267", "template_id": "mbpp::267", "text": "Write a python function to find the sum of squares of first n odd natural numbers.\n\nYour function must be named `square_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::268", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::268", "template_id": "mbpp::268", "text": "Write a function to find the n'th star number.\n\nYour function must be named `find_star_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::269", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::269", "template_id": "mbpp::269", "text": "Write a function to find the ascii value of a character.\n\nYour function must be named `ascii_value`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::270", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::270", "template_id": "mbpp::270", "text": "Write a python function to find the sum of even numbers at even positions.\n\nYour function must be named `sum_even_and_even_index`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::267|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::271", "template_id": "mbpp::271", "text": "Write a python function to find the sum of fifth power of first n even natural numbers.\n\nYour function must be named `even_Power_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::273", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::273", "template_id": "mbpp::273", "text": "Write a function to substract the contents of one tuple with corresponding index of other tuple.\n\nYour function must be named `substract_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::277", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::277", "template_id": "mbpp::277", "text": "Write a function to filter a dictionary based on values.\n\nYour function must be named `dict_filter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::280|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::280", "template_id": "mbpp::280", "text": "Write a function to search an element in the given array by using sequential search.\n\nYour function must be named `sequential_search`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::282", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::282", "template_id": "mbpp::282", "text": "Write a function to substaract two lists using map and lambda function.\n\nYour function must be named `sub_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::283", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::283", "template_id": "mbpp::283", "text": "Write a python function to check whether the frequency of each digit is less than or equal to the digit itself.\n\nYour function must be named `validate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::284", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::284", "template_id": "mbpp::284", "text": "Write a function to check whether all items of a list are equal to a given string.\n\nYour function must be named `check_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::285", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::285", "template_id": "mbpp::285", "text": "Write a function that matches a string that has an a followed by two to three 'b'.\n\nYour function must be named `text_match_two_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::267|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::287", "template_id": "mbpp::287", "text": "Write a python function to find the sum of squares of first n even natural numbers.\n\nYour function must be named `square_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::288", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::288", "template_id": "mbpp::288", "text": "Write a function to count array elements having modular inverse under given prime number p equal to itself.\n\nYour function must be named `modular_inverse`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::289", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::289", "template_id": "mbpp::289", "text": "Write a python function to calculate the number of odd days in a given year.\n\nYour function must be named `odd_Days`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::290", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::290", "template_id": "mbpp::290", "text": "Write a function to find the list of lists with maximum length.\n\nYour function must be named `max_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::291", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::291", "template_id": "mbpp::291", "text": "Write a function to find out the number of ways of painting the fence such that at most 2 adjacent posts have the same color for the given fence with n posts and k colors.\n\nYour function must be named `count_no_of_ways`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::292|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::292", "template_id": "mbpp::292", "text": "Write a python function to find quotient of two numbers.\n\nYour function must be named `find`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::293", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::293", "template_id": "mbpp::293", "text": "Write a function to find the third side of a right angled triangle.\n\nYour function must be named `otherside_rightangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::294", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::294", "template_id": "mbpp::294", "text": "Write a function to find the maximum value in a given heterogeneous list.\n\nYour function must be named `max_val`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::296", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::296", "template_id": "mbpp::296", "text": "Write a python function to count inversions in an array.\n\nYour function must be named `get_Inv_Count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::298", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::298", "template_id": "mbpp::298", "text": "Write a function to find the nested list elements which are present in another list.\n\nYour function must be named `intersection_nested_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::299", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::299", "template_id": "mbpp::299", "text": "Write a function to calculate the maximum aggregate from the list of tuples.\n\nYour function must be named `max_aggregate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::301", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::301", "template_id": "mbpp::301", "text": "Write a function to find the depth of a dictionary.\n\nYour function must be named `dict_depth`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::302", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::302", "template_id": "mbpp::302", "text": "Write a python function to find the most significant bit number which is also a set bit.\n\nYour function must be named `set_Bit_Number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::305", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::305", "template_id": "mbpp::305", "text": "Write a function to match two words from a list of words starting with letter 'p'.\n\nYour function must be named `start_withp`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::306", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::306", "template_id": "mbpp::306", "text": "Write a function to find the maximum sum of increasing subsequence from prefix till ith index and also including a given kth element which is after i, i.e., k > i .\n\nYour function must be named `max_sum_increasing_subseq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::307", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::307", "template_id": "mbpp::307", "text": "Write a function to get a colon of a tuple.\n\nYour function must be named `colon_tuplex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::309", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::309", "template_id": "mbpp::309", "text": "Write a python function to find the maximum of two numbers.\n\nYour function must be named `maximum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::311", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::311", "template_id": "mbpp::311", "text": "Write a python function to set the left most unset bit.\n\nYour function must be named `set_left_most_unset_bit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::312", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::312", "template_id": "mbpp::312", "text": "Write a function to find the volume of a cone.\n\nYour function must be named `volume_cone`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::313", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::313", "template_id": "mbpp::313", "text": "Write a python function to print positive numbers in a list.\n\nYour function must be named `pos_nos`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::314", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::314", "template_id": "mbpp::314", "text": "Write a function to find out the maximum sum such that no two chosen numbers are adjacent for the given rectangular grid of dimension 2 x n.\n\nYour function must be named `max_sum_rectangular_grid`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::315", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::315", "template_id": "mbpp::315", "text": "Write a python function to find the first maximum length of even word.\n\nYour function must be named `find_Max_Len_Even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::316", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::316", "template_id": "mbpp::316", "text": "Write a function to find the index of the last occurrence of a given number in a sorted array.\n\nYour function must be named `find_last_occurrence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::319", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::319", "template_id": "mbpp::319", "text": "Write a function to find all five characters long word in the given string by using regex.\n\nYour function must be named `find_long_word`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::320", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::320", "template_id": "mbpp::320", "text": "Write a function to calculate the difference between the squared sum of first n natural numbers and the sum of squared first n natural numbers.\n\nYour function must be named `sum_difference`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::322", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::322", "template_id": "mbpp::322", "text": "Write a function to find all index positions of the minimum values in a given list.\n\nYour function must be named `position_min`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::324", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::324", "template_id": "mbpp::324", "text": "Write a function to extract the sum of alternate chains of tuples.\n\nYour function must be named `sum_of_alternates`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::325", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::325", "template_id": "mbpp::325", "text": "Write a python function to find the minimum number of squares whose sum is equal to a given number.\n\nYour function must be named `get_Min_Squares`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::326", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::326", "template_id": "mbpp::326", "text": "Write a function to get the word with most number of occurrences in the given strings list.\n\nYour function must be named `most_occurrences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::327|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::327", "template_id": "mbpp::327", "text": "Write a function to print check if the triangle is isosceles or not.\n\nYour function must be named `check_isosceles`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::328", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::328", "template_id": "mbpp::328", "text": "Write a function to rotate a given list by specified number of items to the left direction.\n\nYour function must be named `rotate_left`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::201|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::329", "template_id": "mbpp::329", "text": "Write a python function to count negative numbers in a list.\n\nYour function must be named `neg_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::330", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::330", "template_id": "mbpp::330", "text": "Write a function to find all three, four, five characters long words in the given string by using regex.\n\nYour function must be named `find_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::333", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::333", "template_id": "mbpp::333", "text": "Write a python function to sort a list according to the second element in sublist.\n\nYour function must be named `Sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::335", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::335", "template_id": "mbpp::335", "text": "Write a function to find the sum of arithmetic progression.\n\nYour function must be named `ap_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::336", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::336", "template_id": "mbpp::336", "text": "Write a function to check whether the given month name contains 28 days or not.\n\nYour function must be named `check_monthnum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::340", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::340", "template_id": "mbpp::340", "text": "Write a python function to find the sum of the three lowest positive numbers from a given list of numbers.\n\nYour function must be named `sum_three_smallest_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::341", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::341", "template_id": "mbpp::341", "text": "Write a function to convert the given set into ordered tuples.\n\nYour function must be named `set_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::344", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::344", "template_id": "mbpp::344", "text": "Write a python function to find number of elements with odd factors in a given range.\n\nYour function must be named `count_Odd_Squares`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::345", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::345", "template_id": "mbpp::345", "text": "Write a function to find the difference between two consecutive numbers in a given list.\n\nYour function must be named `diff_consecutivenums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::346", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::346", "template_id": "mbpp::346", "text": "Write a function to find entringer number e(n, k).\n\nYour function must be named `zigzag`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::347|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::347", "template_id": "mbpp::347", "text": "Write a python function to count the number of squares in a rectangle.\n\nYour function must be named `count_Squares`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::349", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::349", "template_id": "mbpp::349", "text": "Write a python function to check whether the given string is a binary string or not.\n\nYour function must be named `check`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::352", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::352", "template_id": "mbpp::352", "text": "Write a python function to check whether all the characters in a given string are unique.\n\nYour function must be named `unique_Characters`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::353", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::353", "template_id": "mbpp::353", "text": "Write a function to remove a specified column from a given nested list.\n\nYour function must be named `remove_column`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::354", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::354", "template_id": "mbpp::354", "text": "Write a function to find t-nth term of arithemetic progression.\n\nYour function must be named `tn_ap`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::356", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::356", "template_id": "mbpp::356", "text": "Write a function to find the third angle of a triangle using two angles.\n\nYour function must be named `find_angle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::359", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::359", "template_id": "mbpp::359", "text": "Write a python function to check whether one root of the quadratic equation is twice of the other or not.\n\nYour function must be named `Check_Solution`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::361", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::361", "template_id": "mbpp::361", "text": "Write a function to remove empty lists from a given list of lists.\n\nYour function must be named `remove_empty`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::362", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::362", "template_id": "mbpp::362", "text": "Write a python function to find the item with maximum occurrences in a given list.\n\nYour function must be named `max_occurrences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::363", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::363", "template_id": "mbpp::363", "text": "Write a function to add the k elements to each element in the tuple.\n\nYour function must be named `add_K_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::364", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::364", "template_id": "mbpp::364", "text": "Write a function to find the number of flips required to make the given binary string a sequence of alternate characters.\n\nYour function must be named `make_flip`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::366", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::366", "template_id": "mbpp::366", "text": "Write a python function to find the largest product of the pair of adjacent elements from a given list of integers.\n\nYour function must be named `adjacent_num_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::369", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::369", "template_id": "mbpp::369", "text": "Write a function to find the lateral surface area of cuboid\n\nYour function must be named `lateralsurface_cuboid`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::370", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::370", "template_id": "mbpp::370", "text": "Write a function to sort a tuple by its float element.\n\nYour function must be named `float_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::371", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::371", "template_id": "mbpp::371", "text": "Write a function to find the smallest missing element in a sorted array.\n\nYour function must be named `smallest_missing`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::372", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::372", "template_id": "mbpp::372", "text": "Write a function to sort a given list of elements in ascending order using heap queue algorithm.\n\nYour function must be named `heap_assending`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::373", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::373", "template_id": "mbpp::373", "text": "Write a function to find the volume of a cuboid.\n\nYour function must be named `volume_cuboid`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::374", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::374", "template_id": "mbpp::374", "text": "Write a function to print all permutations of a given string including duplicates.\n\nYour function must be named `permute_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::377", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::377", "template_id": "mbpp::377", "text": "Write a python function to remove all occurrences of a character in a given string.\n\nYour function must be named `remove_Char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::378", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::378", "template_id": "mbpp::378", "text": "Write a python function to shift last element to first position in the given list.\n\nYour function must be named `move_first`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::382", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::382", "template_id": "mbpp::382", "text": "Write a function to find the number of rotations in a circularly sorted array.\n\nYour function must be named `find_rotation_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::384", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::384", "template_id": "mbpp::384", "text": "Write a python function to find the frequency of the smallest value in a given array.\n\nYour function must be named `frequency_Of_Smallest`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::387", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::387", "template_id": "mbpp::387", "text": "Write a python function to check whether the hexadecimal number is even or odd.\n\nYour function must be named `even_or_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::389", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::389", "template_id": "mbpp::389", "text": "Write a function to find the n'th lucas number.\n\nYour function must be named `find_lucas`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::390", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::390", "template_id": "mbpp::390", "text": "Write a function to insert a given string at the beginning of all items in a list.\n\nYour function must be named `add_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::393", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::393", "template_id": "mbpp::393", "text": "Write a function to find the list with maximum length using lambda function.\n\nYour function must be named `max_length_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::395", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::395", "template_id": "mbpp::395", "text": "Write a python function to find the first non-repeated character in a given string.\n\nYour function must be named `first_non_repeating_character`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::397", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::397", "template_id": "mbpp::397", "text": "Write a function to find the median of three specific numbers.\n\nYour function must be named `median_numbers`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::399", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::399", "template_id": "mbpp::399", "text": "Write a function to perform the mathematical bitwise xor operation across the given tuples.\n\nYour function must be named `bitwise_xor`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::401", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::401", "template_id": "mbpp::401", "text": "Write a function to perform index wise addition of tuple elements in the given two nested tuples.\n\nYour function must be named `add_nested_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::402", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::402", "template_id": "mbpp::402", "text": "Write a function to compute the value of ncr%p.\n\nYour function must be named `ncr_modp`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::407", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::407", "template_id": "mbpp::407", "text": "Write a function to create the next bigger number by rearranging the digits of a given number.\n\nYour function must be named `rearrange_bigger`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::408", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::408", "template_id": "mbpp::408", "text": "Write a function to find k number of pairs which consist of one element from the first array and one element from the second array.\n\nYour function must be named `k_smallest_pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::409", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::409", "template_id": "mbpp::409", "text": "Write a function to find the minimum product from the pairs of tuples within a given list.\n\nYour function must be named `min_product_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::410", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::410", "template_id": "mbpp::410", "text": "Write a function to find the minimum value in a given heterogeneous list.\n\nYour function must be named `min_val`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::411", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::411", "template_id": "mbpp::411", "text": "Write a function to convert the given snake case string to camel case string by using regex.\n\nYour function must be named `snake_to_camel`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::412", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::412", "template_id": "mbpp::412", "text": "Write a python function to remove odd numbers from a given list.\n\nYour function must be named `remove_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::414", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::414", "template_id": "mbpp::414", "text": "Write a python function to check whether the value exists in a sequence or not.\n\nYour function must be named `overlapping`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::415", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::415", "template_id": "mbpp::415", "text": "Write a python function to find a pair with highest product from a given array of integers.\n\nYour function must be named `max_Product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::416", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::416", "template_id": "mbpp::416", "text": "Write a function to find the maximum sum we can make by dividing number in three parts recursively and summing them up together for the given number.\n\nYour function must be named `breakSum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::419", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::419", "template_id": "mbpp::419", "text": "Write a function to round every number of a given list of numbers and print the total sum multiplied by the length of the list.\n\nYour function must be named `round_and_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::422|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::422", "template_id": "mbpp::422", "text": "Write a python function to find the average of cubes of first n natural numbers.\n\nYour function must be named `find_Average_Of_Cube`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::425", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::425", "template_id": "mbpp::425", "text": "Write a function to count the number of sublists containing a particular element.\n\nYour function must be named `count_element_in_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::426", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::426", "template_id": "mbpp::426", "text": "Write a function to filter odd numbers using lambda function.\n\nYour function must be named `filter_oddnumbers`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::427", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::427", "template_id": "mbpp::427", "text": "Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format by using regex.\n\nYour function must be named `change_date_format`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::428", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::428", "template_id": "mbpp::428", "text": "Write a function to sort the given array by using shell sort.\n\nYour function must be named `shell_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::431", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::431", "template_id": "mbpp::431", "text": "Write a function that takes two lists and returns true if they have at least one common element.\n\nYour function must be named `common_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::432", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::432", "template_id": "mbpp::432", "text": "Write a function to find the median of a trapezium.\n\nYour function must be named `median_trapezium`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::433", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::433", "template_id": "mbpp::433", "text": "Write a function to check whether the entered number is greater than the elements of the given array.\n\nYour function must be named `check_greater`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::434", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::434", "template_id": "mbpp::434", "text": "Write a function that matches a string that has an a followed by one or more b's.\n\nYour function must be named `text_match_one`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::435", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::435", "template_id": "mbpp::435", "text": "Write a python function to find the last digit of a given number.\n\nYour function must be named `last_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::437", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::437", "template_id": "mbpp::437", "text": "Write a function to remove odd characters in a string.\n\nYour function must be named `remove_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::440", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::440", "template_id": "mbpp::440", "text": "Write a function to find all adverbs and their positions in a given sentence.\n\nYour function must be named `find_adverb_position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::442", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::442", "template_id": "mbpp::442", "text": "Write a function to find the ration of positive numbers in an array of integers.\n\nYour function must be named `positive_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::444", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::444", "template_id": "mbpp::444", "text": "Write a function to trim each tuple by k in the given tuple list.\n\nYour function must be named `trim_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::446", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::446", "template_id": "mbpp::446", "text": "Write a python function to count the occurence of all elements of list in a tuple.\n\nYour function must be named `count_Occurrence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::447", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::447", "template_id": "mbpp::447", "text": "Write a function to find cubes of individual elements in a list using lambda function.\n\nYour function must be named `cube_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::448", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::448", "template_id": "mbpp::448", "text": "Write a function to calculate the sum of perrin numbers.\n\nYour function must be named `cal_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::449", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::449", "template_id": "mbpp::449", "text": "Write a python function to check whether the triangle is valid or not if 3 points are given.\n\nYour function must be named `check_Triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::450", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::450", "template_id": "mbpp::450", "text": "Write a function to extract specified size of strings from a give list of string values.\n\nYour function must be named `extract_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::452", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::452", "template_id": "mbpp::452", "text": "Write a function that gives loss amount if the given amount has loss else return none.\n\nYour function must be named `loss_amount`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::455", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::455", "template_id": "mbpp::455", "text": "Write a function to check whether the given month number contains 31 days or not.\n\nYour function must be named `check_monthnumb_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::458", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::458", "template_id": "mbpp::458", "text": "Write a function to find the area of a rectangle.\n\nYour function must be named `rectangle_area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::460|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::460", "template_id": "mbpp::460", "text": "Write a python function to get the first element of each sublist.\n\nYour function must be named `Extract`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::465", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::465", "template_id": "mbpp::465", "text": "Write a function to drop empty items from a given dictionary.\n\nYour function must be named `drop_empty`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::471", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::471", "template_id": "mbpp::471", "text": "Write a python function to find remainder of array multiplication divided by n.\n\nYour function must be named `find_remainder`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::472", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::472", "template_id": "mbpp::472", "text": "Write a python function to check whether the given list contains consecutive numbers or not.\n\nYour function must be named `check_Consecutive`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::473", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::473", "template_id": "mbpp::473", "text": "Write a function to find the tuple intersection of elements in the given tuple list irrespective of their order.\n\nYour function must be named `tuple_intersection`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::475|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::475", "template_id": "mbpp::475", "text": "Write a function to sort counter by value.\n\nYour function must be named `sort_counter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::476", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::476", "template_id": "mbpp::476", "text": "Write a python function to find the sum of the largest and smallest value in a given array.\n\nYour function must be named `big_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::477", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::477", "template_id": "mbpp::477", "text": "Write a python function to convert the given string to lower case.\n\nYour function must be named `is_lower`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::479", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::479", "template_id": "mbpp::479", "text": "Write a python function to find the first digit of a given number.\n\nYour function must be named `first_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::481", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::481", "template_id": "mbpp::481", "text": "Write a function to determine if there is a subset of the given set with sum equal to the given sum.\n\nYour function must be named `is_subset_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::482", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::482", "template_id": "mbpp::482", "text": "Write a function to find sequences of one upper case letter followed by lower case letters in the given string by using regex.\n\nYour function must be named `match`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::483", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::483", "template_id": "mbpp::483", "text": "Write a python function to find the first natural number whose factorial is divisible by x.\n\nYour function must be named `first_Factorial_Divisible_Number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::484", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::484", "template_id": "mbpp::484", "text": "Write a function to remove the matching tuples from the given two tuples.\n\nYour function must be named `remove_matching_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::486", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::486", "template_id": "mbpp::486", "text": "Write a function to compute binomial probability for the given number.\n\nYour function must be named `nCr`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::487", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::487", "template_id": "mbpp::487", "text": "Write a function to sort a list of tuples in increasing order by the last element in each tuple.\n\nYour function must be named `sort_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::488", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::488", "template_id": "mbpp::488", "text": "Write a function to find the area of a pentagon.\n\nYour function must be named `area_pentagon`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::492", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::492", "template_id": "mbpp::492", "text": "Write a function to search an element in the given array by using binary search.\n\nYour function must be named `binary_search`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::493", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::493", "template_id": "mbpp::493", "text": "Write a function to calculate a grid of hexagon coordinates where function returns a list of lists containing 6 tuples of x, y point coordinates.\n\nYour function must be named `calculate_polygons`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::494", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::494", "template_id": "mbpp::494", "text": "Write a function to convert the given binary tuple to integer.\n\nYour function must be named `binary_to_integer`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::495", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::495", "template_id": "mbpp::495", "text": "Write a function to remove lowercase substrings from a given string by using regex.\n\nYour function must be named `remove_lowercase`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::496", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::496", "template_id": "mbpp::496", "text": "Write a function to find the smallest integers from a given list of numbers using heap queue algorithm.\n\nYour function must be named `heap_queue_smallest`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::497|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::497", "template_id": "mbpp::497", "text": "Write a function to find the surface area of a cone.\n\nYour function must be named `surfacearea_cone`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::498", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::498", "template_id": "mbpp::498", "text": "Write a python function to find gcd of two positive integers.\n\nYour function must be named `gcd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::475|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::499", "template_id": "mbpp::499", "text": "Write a function to find the diameter of a circle.\n\nYour function must be named `diameter_circle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::501", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::501", "template_id": "mbpp::501", "text": "Write a python function to find common divisor between two numbers in a given pair.\n\nYour function must be named `ngcd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::292|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::502", "template_id": "mbpp::502", "text": "Write a python function to find remainder of two numbers.\n\nYour function must be named `find`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::503", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::503", "template_id": "mbpp::503", "text": "Write a function to add consecutive numbers of a given list.\n\nYour function must be named `add_consecutive_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::504", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::504", "template_id": "mbpp::504", "text": "Write a python function to find the cube sum of first n natural numbers.\n\nYour function must be named `sum_Of_Series`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::505", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::505", "template_id": "mbpp::505", "text": "Write a function to move all zeroes to the end of the given array.\n\nYour function must be named `re_order`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::508", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::508", "template_id": "mbpp::508", "text": "Write a function to check if the common elements between two given lists are in the same order or not.\n\nYour function must be named `same_order`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::509", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::509", "template_id": "mbpp::509", "text": "Write a python function to find the average of odd numbers till a given odd number.\n\nYour function must be named `average_Odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::510", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::510", "template_id": "mbpp::510", "text": "Write a function to find the number of subsequences having product smaller than k for the given non negative array.\n\nYour function must be named `no_of_subsequences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::512", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::512", "template_id": "mbpp::512", "text": "Write a function to count the element frequency in the mixed nested tuple.\n\nYour function must be named `flatten`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::513", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::513", "template_id": "mbpp::513", "text": "Write a function to convert tuple into list by adding the given string after every element.\n\nYour function must be named `add_str`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::515", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::515", "template_id": "mbpp::515", "text": "Write a function to check if there is a subset with sum divisible by m.\n\nYour function must be named `modular_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::516", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::516", "template_id": "mbpp::516", "text": "Write a function to sort a list of elements using radix sort.\n\nYour function must be named `radix_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::518", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::518", "template_id": "mbpp::518", "text": "Write a function to find the square root of a perfect number.\n\nYour function must be named `sqrt_root`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::519", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::519", "template_id": "mbpp::519", "text": "Write a function to calculate volume of a tetrahedron.\n\nYour function must be named `volume_tetrahedron`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::520", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::520", "template_id": "mbpp::520", "text": "Write a function to find the lcm of the given array elements.\n\nYour function must be named `find_lcm`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::524", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::524", "template_id": "mbpp::524", "text": "Write a function to find the sum of maximum increasing subsequence of the given array.\n\nYour function must be named `max_sum_increasing_subsequence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::525", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::525", "template_id": "mbpp::525", "text": "Write a python function to check whether two given lines are parallel or not.\n\nYour function must be named `parallel_lines`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::526", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::526", "template_id": "mbpp::526", "text": "Write a python function to capitalize first and last letters of each word of a given string.\n\nYour function must be named `capitalize_first_last_letters`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::530", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::530", "template_id": "mbpp::530", "text": "Write a function to find the ration of negative numbers in an array of integers.\n\nYour function must be named `negative_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::531", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::531", "template_id": "mbpp::531", "text": "Write a function to find minimum number of coins that make a given value.\n\nYour function must be named `min_coins`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::533", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::533", "template_id": "mbpp::533", "text": "Write a function to remove particular data type elements from the given tuple.\n\nYour function must be named `remove_datatype`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::534", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::534", "template_id": "mbpp::534", "text": "Write a function to search a literals string in a string and also find the location within the original string where the pattern occurs.\n\nYour function must be named `search_literal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::535", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::535", "template_id": "mbpp::535", "text": "Write a function to find the top or bottom surface area of a cylinder.\n\nYour function must be named `topbottom_surfacearea`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::536", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::536", "template_id": "mbpp::536", "text": "Write a function to select the nth items of a list.\n\nYour function must be named `nth_items`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::537", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::537", "template_id": "mbpp::537", "text": "Write a python function to find the first repeated word in a given string.\n\nYour function must be named `first_repeated_word`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::542", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::542", "template_id": "mbpp::542", "text": "Write a function to replace all occurrences of spaces, commas, or dots with a colon in the given string by using regex.\n\nYour function must be named `fill_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::543", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::543", "template_id": "mbpp::543", "text": "Write a function to add two numbers and print number of digits of sum.\n\nYour function must be named `count_digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::544", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::544", "template_id": "mbpp::544", "text": "Write a function to flatten the tuple list to a string.\n\nYour function must be named `flatten_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::546", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::546", "template_id": "mbpp::546", "text": "Write a function to find the last occurrence of a character in a string.\n\nYour function must be named `last_occurence_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::548", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::548", "template_id": "mbpp::548", "text": "Write a function to find the length of the longest increasing subsequence of the given sequence.\n\nYour function must be named `longest_increasing_subsequence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::549", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::549", "template_id": "mbpp::549", "text": "Write a python function to find the sum of fifth power of first n odd natural numbers.\n\nYour function must be named `odd_Num_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::550", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::550", "template_id": "mbpp::550", "text": "Write a python function to find the maximum element in a sorted and rotated array.\n\nYour function must be named `find_Max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::551", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::551", "template_id": "mbpp::551", "text": "Write a function to extract a specified column from a given nested list.\n\nYour function must be named `extract_column`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::552", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::552", "template_id": "mbpp::552", "text": "Write a python function to check whether a given sequence is linear or not.\n\nYour function must be named `Seq_Linear`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::553", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::553", "template_id": "mbpp::553", "text": "Write a function to convert the given tuple to a floating-point number.\n\nYour function must be named `tuple_to_float`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::554|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::554", "template_id": "mbpp::554", "text": "Write a python function to find odd numbers from a mixed list.\n\nYour function must be named `Split`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::556", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::556", "template_id": "mbpp::556", "text": "Write a python function to count the pairs with xor as an odd number.\n\nYour function must be named `find_Odd_Pair`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::558", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::558", "template_id": "mbpp::558", "text": "Write a python function to find the digit distance between two integers.\n\nYour function must be named `digit_distance_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::559", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::559", "template_id": "mbpp::559", "text": "Write a function to find the largest sum of contiguous subarray in the given array.\n\nYour function must be named `max_sub_array_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::560", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::560", "template_id": "mbpp::560", "text": "Write a function to find the union of elements of the given tuples.\n\nYour function must be named `union_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::561", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::561", "template_id": "mbpp::561", "text": "Write a function to assign with each element, its pair elements from other similar pairs in the given tuple.\n\nYour function must be named `assign_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::563", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::563", "template_id": "mbpp::563", "text": "Write a function to extract values between quotation marks of a string.\n\nYour function must be named `extract_values`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::564|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::564", "template_id": "mbpp::564", "text": "Write a python function to count unequal element pairs from the given array.\n\nYour function must be named `count_Pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::565|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::565", "template_id": "mbpp::565", "text": "Write a python function to split a string into characters.\n\nYour function must be named `split`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::566", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::566", "template_id": "mbpp::566", "text": "Write a function to get the sum of a non-negative integer.\n\nYour function must be named `sum_digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::568", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::568", "template_id": "mbpp::568", "text": "Write a function to create a list of empty dictionaries.\n\nYour function must be named `empty_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::569", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::569", "template_id": "mbpp::569", "text": "Write a function to sort each sublist of strings in a given list of lists.\n\nYour function must be named `sort_sublists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::570", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::570", "template_id": "mbpp::570", "text": "Write a function to remove words from a given list of strings containing a character or string.\n\nYour function must be named `remove_words`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::571", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::571", "template_id": "mbpp::571", "text": "Write a function to find maximum possible sum of disjoint pairs for the given array of integers and a number k.\n\nYour function must be named `max_sum_pair_diff_lessthan_K`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::572", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::572", "template_id": "mbpp::572", "text": "Write a python function to remove two duplicate numbers from a given number of lists.\n\nYour function must be named `two_unique_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::573", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::573", "template_id": "mbpp::573", "text": "Write a python function to calculate the product of the unique numbers of a given list.\n\nYour function must be named `unique_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::574", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::574", "template_id": "mbpp::574", "text": "Write a function to find the surface area of a cylinder.\n\nYour function must be named `surfacearea_cylinder`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::575", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::575", "template_id": "mbpp::575", "text": "Write a python function to find nth number in a sequence which is not a multiple of a given number.\n\nYour function must be named `count_no`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::576", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::576", "template_id": "mbpp::576", "text": "Write a python function to check whether an array is subarray of another or not.\n\nYour function must be named `is_Sub_Array`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::578", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::578", "template_id": "mbpp::578", "text": "Write a function to interleave lists of the same length.\n\nYour function must be named `interleave_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::579", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::579", "template_id": "mbpp::579", "text": "Write a function to find the dissimilar elements in the given two tuples.\n\nYour function must be named `find_dissimilar`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::580", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::580", "template_id": "mbpp::580", "text": "Write a function to extract the even elements in the nested mixed tuple.\n\nYour function must be named `even_ele`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::581", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::581", "template_id": "mbpp::581", "text": "Write a python function to find the surface area of the square pyramid.\n\nYour function must be named `surface_Area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::582", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::582", "template_id": "mbpp::582", "text": "Write a function to check if a dictionary is empty or not.\n\nYour function must be named `my_dict`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::584", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::584", "template_id": "mbpp::584", "text": "Write a function to find all adverbs and their positions in a given sentence by using regex.\n\nYour function must be named `find_adverbs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::585", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::585", "template_id": "mbpp::585", "text": "Write a function to find the n - expensive price items from a given dataset using heap queue algorithm.\n\nYour function must be named `expensive_items`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::587", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::587", "template_id": "mbpp::587", "text": "Write a function to convert a list to a tuple.\n\nYour function must be named `list_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::588", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::588", "template_id": "mbpp::588", "text": "Write a python function to find the difference between largest and smallest value in a given array.\n\nYour function must be named `big_diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::589", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::589", "template_id": "mbpp::589", "text": "Write a function to find perfect squares between two given numbers.\n\nYour function must be named `perfect_squares`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::591", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::591", "template_id": "mbpp::591", "text": "Write a python function to interchange the first and last elements in a list.\n\nYour function must be named `swap_List`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::592", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::592", "template_id": "mbpp::592", "text": "Write a python function to find sum of product of binomial co-efficients.\n\nYour function must be named `binomial_Coeff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::593", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::593", "template_id": "mbpp::593", "text": "Write a function to remove leading zeroes from an ip address.\n\nYour function must be named `removezero_ip`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::594", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::594", "template_id": "mbpp::594", "text": "Write a function to find the difference of first even and odd number of a given list.\n\nYour function must be named `diff_even_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::595", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::595", "template_id": "mbpp::595", "text": "Write a python function to count minimum number of swaps required to convert one binary string to another.\n\nYour function must be named `min_Swaps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::596", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::596", "template_id": "mbpp::596", "text": "Write a function to find the size of the given tuple.\n\nYour function must be named `tuple_size`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::597", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::597", "template_id": "mbpp::597", "text": "Write a function to find kth element from the given two sorted arrays.\n\nYour function must be named `find_kth`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::600", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::600", "template_id": "mbpp::600", "text": "Write a python function to check whether the given number is even or not using bitwise operator.\n\nYour function must be named `is_Even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::217|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::602", "template_id": "mbpp::602", "text": "Write a python function to find the first repeated character in a given string.\n\nYour function must be named `first_repeated_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::603", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::603", "template_id": "mbpp::603", "text": "Write a function to get a lucid number smaller than or equal to n.\n\nYour function must be named `get_ludic`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::604", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::604", "template_id": "mbpp::604", "text": "Write a function to reverse words in a given string.\n\nYour function must be named `reverse_words`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::607", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::607", "template_id": "mbpp::607", "text": "Write a function to search a literals string in a string and also find the location within the original string where the pattern occurs by using regex.\n\nYour function must be named `find_literals`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::608", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::608", "template_id": "mbpp::608", "text": "Write a python function to find nth bell number.\n\nYour function must be named `bell_Number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::609", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::609", "template_id": "mbpp::609", "text": "Write a python function to find minimum possible value for the given periodic function.\n\nYour function must be named `floor_Min`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::610", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::610", "template_id": "mbpp::610", "text": "Write a python function to remove the k'th element from a given list.\n\nYour function must be named `remove_kth_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::615", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::615", "template_id": "mbpp::615", "text": "Write a function to find average value of the numbers in a given tuple of tuples.\n\nYour function must be named `average_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::616", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::616", "template_id": "mbpp::616", "text": "Write a function to perfom the modulo of tuple elements in the given two tuples.\n\nYour function must be named `tuple_modulo`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::617", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::617", "template_id": "mbpp::617", "text": "Write a function to check for the number of jumps required of given length to reach a point of form (d, 0) from origin in a 2d plane.\n\nYour function must be named `min_Jumps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::280|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::620", "template_id": "mbpp::620", "text": "Write a function to find the largest subset where each pair is divisible.\n\nYour function must be named `largest_subset`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::623", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::623", "template_id": "mbpp::623", "text": "Write a function to find the n-th power of individual elements in a list using lambda function.\n\nYour function must be named `nth_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::625", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::625", "template_id": "mbpp::625", "text": "Write a python function to interchange first and last elements in a given list.\n\nYour function must be named `swap_List`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::626", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::626", "template_id": "mbpp::626", "text": "Write a python function to find the largest triangle that can be inscribed in the semicircle.\n\nYour function must be named `triangle_area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::627", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::627", "template_id": "mbpp::627", "text": "Write a python function to find the smallest missing number from the given array.\n\nYour function must be named `find_First_Missing`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::628", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::628", "template_id": "mbpp::628", "text": "Write a function to replace all spaces in the given string with character * list item * list item * list item * list item '%20'.\n\nYour function must be named `replace_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::554|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::629", "template_id": "mbpp::629", "text": "Write a python function to find even numbers from a mixed list.\n\nYour function must be named `Split`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::632", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::632", "template_id": "mbpp::632", "text": "Write a python function to move all zeroes to the end of the given list.\n\nYour function must be named `move_zero`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::635", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::635", "template_id": "mbpp::635", "text": "Write a function to push all values into a heap and then pop off the smallest values one at a time.\n\nYour function must be named `heap_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::636", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::636", "template_id": "mbpp::636", "text": "Write a python function to check if roots of a quadratic equation are reciprocal of each other or not.\n\nYour function must be named `Check_Solution`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::637", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::637", "template_id": "mbpp::637", "text": "Write a function to check whether the given amount has no profit and no loss\n\nYour function must be named `noprofit_noloss`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::638", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::638", "template_id": "mbpp::638", "text": "Write a function to calculate wind chill index.\n\nYour function must be named `wind_chill`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::639", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::639", "template_id": "mbpp::639", "text": "Write a function to sum the length of the names of a given list of names after removing the names that start with a lowercase letter.\n\nYour function must be named `sample_nam`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::640", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::640", "template_id": "mbpp::640", "text": "Write a function to remove the parenthesis area in a string.\n\nYour function must be named `remove_parenthesis`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::135|n4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::641", "template_id": "mbpp::641", "text": "Write a function to find the nth nonagonal number.\n\nYour function must be named `is_nonagonal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::642", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::642", "template_id": "mbpp::642", "text": "Write a function to remove similar rows from the given tuple matrix.\n\nYour function must be named `remove_similar_row`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::643", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::643", "template_id": "mbpp::643", "text": "Write a function that matches a word containing 'z', not at the start or end of the word.\n\nYour function must be named `text_match_wordz_middle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::644", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::644", "template_id": "mbpp::644", "text": "Write a python function to reverse an array upto a given position.\n\nYour function must be named `reverse_Array_Upto_K`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::645", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::645", "template_id": "mbpp::645", "text": "Write a function to find the product of it’s kth index in the given tuples.\n\nYour function must be named `get_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::646", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::646", "template_id": "mbpp::646", "text": "Write a python function to count number of cubes of size k in a cube of size n.\n\nYour function must be named `No_of_cubes`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::647", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::647", "template_id": "mbpp::647", "text": "Write a function to split a string at uppercase letters.\n\nYour function must be named `split_upperstring`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::648", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::648", "template_id": "mbpp::648", "text": "Write a function to exchange the position of every n-th value with (n+1)th value and (n+1)th value with n-th value in a given list.\n\nYour function must be named `exchange_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::649", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::649", "template_id": "mbpp::649", "text": "Write a python function to calculate the sum of the numbers in a list between the indices of a specified range.\n\nYour function must be named `sum_Range_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::651", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::651", "template_id": "mbpp::651", "text": "Write a function to check if one tuple is a subset of another tuple.\n\nYour function must be named `check_subset`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::653", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::653", "template_id": "mbpp::653", "text": "Write a function to group a sequence of key-value pairs into a dictionary of lists using collections module.\n\nYour function must be named `grouping_dictionary`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::17|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::654", "template_id": "mbpp::654", "text": "Write a function to find the perimeter of a rectangle.\n\nYour function must be named `rectangle_perimeter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::655", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::655", "template_id": "mbpp::655", "text": "Write a python function to find the sum of fifth power of n natural numbers.\n\nYour function must be named `fifth_Power_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::656", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::656", "template_id": "mbpp::656", "text": "Write a python function to find the minimum sum of absolute differences of two arrays.\n\nYour function must be named `find_Min_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::657", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::657", "template_id": "mbpp::657", "text": "Write a python function to find the first digit in factorial of a given number.\n\nYour function must be named `first_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::661", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::661", "template_id": "mbpp::661", "text": "Write a function to find the maximum sum that can be formed which has no three consecutive elements present.\n\nYour function must be named `max_sum_of_three_consecutive`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::663", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::663", "template_id": "mbpp::663", "text": "Write a function to find the largest possible value of k such that k modulo x is y.\n\nYour function must be named `find_max_val`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::666", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::666", "template_id": "mbpp::666", "text": "Write a function to count occurrence of a character in a string.\n\nYour function must be named `count_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::667", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::667", "template_id": "mbpp::667", "text": "Write a python function to count number of vowels in the string.\n\nYour function must be named `Check_Vow`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::669", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::669", "template_id": "mbpp::669", "text": "Write a function to check whether the given ip address is valid or not using regex.\n\nYour function must be named `check_IP`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::672", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::672", "template_id": "mbpp::672", "text": "Write a function to find maximum of three numbers.\n\nYour function must be named `max_of_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::673", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::673", "template_id": "mbpp::673", "text": "Write a python function to convert a list of multiple integers into a single integer.\n\nYour function must be named `convert`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::674", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::674", "template_id": "mbpp::674", "text": "Write a function to remove duplicate words from a given string using collections module.\n\nYour function must be named `remove_duplicate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::678", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::678", "template_id": "mbpp::678", "text": "Write a python function to remove spaces from a given string.\n\nYour function must be named `remove_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::679", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::679", "template_id": "mbpp::679", "text": "Write a function to access dictionary key’s element by index.\n\nYour function must be named `access_key`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::680", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::680", "template_id": "mbpp::680", "text": "Write a python function to check whether a sequence of numbers has an increasing trend or not.\n\nYour function must be named `increasing_trend`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::681", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::681", "template_id": "mbpp::681", "text": "Write a python function to find the smallest prime divisor of a number.\n\nYour function must be named `smallest_Divisor`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::683", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::683", "template_id": "mbpp::683", "text": "Write a python function to check whether the given number can be represented by sum of two squares or not.\n\nYour function must be named `sum_Square`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::686", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::686", "template_id": "mbpp::686", "text": "Write a function to find the frequency of each element in the given list.\n\nYour function must be named `freq_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::688", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::688", "template_id": "mbpp::688", "text": "Write a function to get the length of a complex number.\n\nYour function must be named `len_complex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::689", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::689", "template_id": "mbpp::689", "text": "## write a function to find the minimum number of jumps to reach the end of the array for the given array of integers where each element represents the max number of steps that can be made forward from that element. > indented block > indented block\n\nYour function must be named `min_jumps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::690", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::690", "template_id": "mbpp::690", "text": "Write a function to multiply consecutive numbers of a given list.\n\nYour function must be named `mul_consecutive_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::691", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::691", "template_id": "mbpp::691", "text": "Write a function to group the 1st elements on the basis of 2nd elements in the given tuple list.\n\nYour function must be named `group_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::693", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::693", "template_id": "mbpp::693", "text": "Write a function to remove multiple spaces in a string by using regex.\n\nYour function must be named `remove_multiple_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::694", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::694", "template_id": "mbpp::694", "text": "Write a function to extract unique values from the given dictionary values.\n\nYour function must be named `extract_unique`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::699", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::699", "template_id": "mbpp::699", "text": "Write a python function to find the minimum number of swaps required to convert one binary string to another.\n\nYour function must be named `min_Swaps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::701", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::701", "template_id": "mbpp::701", "text": "Write a function to find the equilibrium index of the given array.\n\nYour function must be named `equilibrium_index`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::248|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::704", "template_id": "mbpp::704", "text": "Write a function to calculate the harmonic sum of n-1.\n\nYour function must be named `harmonic_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::705", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::705", "template_id": "mbpp::705", "text": "Write a function to sort a list of lists by length and value.\n\nYour function must be named `sort_sublists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::706", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::706", "template_id": "mbpp::706", "text": "Write a function to find whether an array is subset of another array.\n\nYour function must be named `is_subset`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::708", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::708", "template_id": "mbpp::708", "text": "Write a python function to convert a string to a list.\n\nYour function must be named `Convert`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::709", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::709", "template_id": "mbpp::709", "text": "Write a function to count unique keys for each value present in the tuple.\n\nYour function must be named `get_unique`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::710", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::710", "template_id": "mbpp::710", "text": "Write a function to access the initial and last data of the given tuple record.\n\nYour function must be named `front_and_rear`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::715", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::715", "template_id": "mbpp::715", "text": "Write a function to convert the given string of integers into a tuple.\n\nYour function must be named `str_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::17|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::716", "template_id": "mbpp::716", "text": "Write a function to find the perimeter of a rombus.\n\nYour function must be named `rombus_perimeter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::717", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::717", "template_id": "mbpp::717", "text": "Write a function to calculate the standard deviation.\n\nYour function must be named `sd_calc`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::720", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::720", "template_id": "mbpp::720", "text": "Write a function to add a dictionary to the tuple.\n\nYour function must be named `add_dict_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::721", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::721", "template_id": "mbpp::721", "text": "Write a function to find a path with the maximum average over all existing paths for the given square matrix of size n*n.\n\nYour function must be named `maxAverageOfPath`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::723", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::723", "template_id": "mbpp::723", "text": "Write a function to count the same pair in two given lists using map function.\n\nYour function must be named `count_same_pair`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::725", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::725", "template_id": "mbpp::725", "text": "Write a function to extract values between quotation marks of the given string by using regex.\n\nYour function must be named `extract_quotation`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::726", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::726", "template_id": "mbpp::726", "text": "Write a function to multiply the adjacent elements of the given tuple.\n\nYour function must be named `multiply_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::727", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::727", "template_id": "mbpp::727", "text": "Write a function to remove all characters except letters and numbers using regex\n\nYour function must be named `remove_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::731", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::731", "template_id": "mbpp::731", "text": "Write a function to find the lateral surface area of a cone.\n\nYour function must be named `lateralsurface_cone`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::733", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::733", "template_id": "mbpp::733", "text": "Write a function to find the index of the first occurrence of a given number in a sorted array.\n\nYour function must be named `find_first_occurrence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::734", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::734", "template_id": "mbpp::734", "text": "Write a python function to find sum of products of all possible subarrays.\n\nYour function must be named `sum_Of_Subarray_Prod`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::735", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::735", "template_id": "mbpp::735", "text": "Write a python function to toggle bits of the number except the first and the last bit.\n\nYour function must be named `set_middle_bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::737", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::737", "template_id": "mbpp::737", "text": "Write a function to check whether the given string is starting with a vowel or not using regex.\n\nYour function must be named `check_str`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::248|n3", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::738", "template_id": "mbpp::738", "text": "Write a function to calculate the geometric sum of n-1.\n\nYour function must be named `geometric_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::739", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::739", "template_id": "mbpp::739", "text": "Write a python function to find the index of smallest triangular number with n digits.\n\nYour function must be named `find_Index`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::740", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::740", "template_id": "mbpp::740", "text": "Write a function to convert the given tuple to a key-value dictionary using adjacent elements.\n\nYour function must be named `tuple_to_dict`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::741", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::741", "template_id": "mbpp::741", "text": "Write a python function to check whether all the characters are same or not.\n\nYour function must be named `all_Characters_Same`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::746", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::746", "template_id": "mbpp::746", "text": "Write a function to find area of a sector.\n\nYour function must be named `sector_area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::747", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::747", "template_id": "mbpp::747", "text": "Write a function to find the longest common subsequence for the given three string sequence.\n\nYour function must be named `lcs_of_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::749", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::749", "template_id": "mbpp::749", "text": "Write a function to sort a given list of strings of numbers numerically.\n\nYour function must be named `sort_numeric_strings`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::750", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::750", "template_id": "mbpp::750", "text": "Write a function to add the given tuple to the given list.\n\nYour function must be named `add_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::751", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::751", "template_id": "mbpp::751", "text": "Write a function to check if the given array represents min heap or not.\n\nYour function must be named `check_min_heap`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::135|n4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::752", "template_id": "mbpp::752", "text": "Write a function to find the nth jacobsthal number.\n\nYour function must be named `jacobsthal_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::753", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::753", "template_id": "mbpp::753", "text": "Write a function to find minimum k records from tuple list.\n\nYour function must be named `min_k`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::754", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::754", "template_id": "mbpp::754", "text": "Write a function to find common index elements from three lists.\n\nYour function must be named `extract_index_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::756", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::756", "template_id": "mbpp::756", "text": "Write a function that matches a string that has an a followed by zero or one 'b'.\n\nYour function must be named `text_match_zero_one`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::759", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::759", "template_id": "mbpp::759", "text": "Write a function to check a decimal with a precision of 2.\n\nYour function must be named `is_decimal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::761", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::761", "template_id": "mbpp::761", "text": "Write a function to caluclate arc length of an angle.\n\nYour function must be named `arc_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::762", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::762", "template_id": "mbpp::762", "text": "Write a function to check whether the given month number contains 30 days or not.\n\nYour function must be named `check_monthnumber_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::764", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::764", "template_id": "mbpp::764", "text": "Write a python function to count numeric values in a given string.\n\nYour function must be named `number_ctr`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::765", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::765", "template_id": "mbpp::765", "text": "Write a function to find nth polite number.\n\nYour function must be named `is_polite`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::769", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::769", "template_id": "mbpp::769", "text": "Write a python function to get the difference between two lists.\n\nYour function must be named `Diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::770", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::770", "template_id": "mbpp::770", "text": "Write a python function to find the sum of fourth power of first n odd natural numbers.\n\nYour function must be named `odd_Num_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::771", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::771", "template_id": "mbpp::771", "text": "Write a function to check if the given expression is balanced or not.\n\nYour function must be named `check_expression`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::773", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::773", "template_id": "mbpp::773", "text": "Write a function to find the occurrence and position of the substrings within a string.\n\nYour function must be named `occurance_substring`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::774", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::774", "template_id": "mbpp::774", "text": "Write a function to check if the string is a valid email address or not using regex.\n\nYour function must be named `check_email`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::775", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::775", "template_id": "mbpp::775", "text": "Write a python function to check whether every odd index contains odd numbers of a given list.\n\nYour function must be named `odd_position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::776", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::776", "template_id": "mbpp::776", "text": "Write a function to count those characters which have vowels as their neighbors in the given string.\n\nYour function must be named `count_vowels`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::422|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::777", "template_id": "mbpp::777", "text": "Write a python function to find the sum of non-repeated elements in a given array.\n\nYour function must be named `find_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::780", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::780", "template_id": "mbpp::780", "text": "Write a function to find the combinations of sums with tuples in the given tuple list.\n\nYour function must be named `find_combinations`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::783", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::783", "template_id": "mbpp::783", "text": "Write a function to convert rgb color to hsv color.\n\nYour function must be named `rgb_to_hsv`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::784|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::784", "template_id": "mbpp::784", "text": "Write a function to find the product of first even and odd number of a given list.\n\nYour function must be named `mul_even_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::787", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::787", "template_id": "mbpp::787", "text": "Write a function that matches a string that has an a followed by three 'b'.\n\nYour function must be named `text_match_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::788", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::788", "template_id": "mbpp::788", "text": "Write a function to create a new tuple from the given string and list.\n\nYour function must be named `new_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::790", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::790", "template_id": "mbpp::790", "text": "Write a python function to check whether every even index contains even numbers of a given list.\n\nYour function must be named `even_position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::791", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::791", "template_id": "mbpp::791", "text": "Write a function to remove the nested record from the given tuple.\n\nYour function must be named `remove_nested`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::793", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::793", "template_id": "mbpp::793", "text": "Write a python function to find the last position of an element in a sorted array.\n\nYour function must be named `last`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::794", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::794", "template_id": "mbpp::794", "text": "Write a function that matches a string that has an 'a' followed by anything, ending in 'b'.\n\nYour function must be named `text_starta_endb`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::796", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::796", "template_id": "mbpp::796", "text": "Write function to find the sum of all items in the given dictionary.\n\nYour function must be named `return_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::799", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::799", "template_id": "mbpp::799", "text": "Write a python function to left rotate the bits of a given number.\n\nYour function must be named `left_Rotate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::800", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::800", "template_id": "mbpp::800", "text": "Write a function to remove all whitespaces from a string.\n\nYour function must be named `remove_all_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::802", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::802", "template_id": "mbpp::802", "text": "Write a python function to count the number of rotations required to generate a sorted array.\n\nYour function must be named `count_Rotation`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::804", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::804", "template_id": "mbpp::804", "text": "Write a python function to check whether the product of numbers is even or not.\n\nYour function must be named `is_Product_Even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::806", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::806", "template_id": "mbpp::806", "text": "Write a function to find maximum run of uppercase characters in the given string.\n\nYour function must be named `max_run_uppercase`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::807", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::807", "template_id": "mbpp::807", "text": "Write a python function to find the first odd number in a given list of numbers.\n\nYour function must be named `first_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::809", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::809", "template_id": "mbpp::809", "text": "Write a function to check if each element of second tuple is smaller than its corresponding index in first tuple.\n\nYour function must be named `check_smaller`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::810", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::810", "template_id": "mbpp::810", "text": "Write a function to iterate over elements repeating each as many times as its count.\n\nYour function must be named `count_variable`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::814", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::814", "template_id": "mbpp::814", "text": "Write a function to find the area of a rombus.\n\nYour function must be named `rombus_area`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::815", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::815", "template_id": "mbpp::815", "text": "Write a function to sort the given array without using any sorting algorithm. the given array consists of only 0, 1, and 2.\n\nYour function must be named `sort_by_dnf`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::816", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::816", "template_id": "mbpp::816", "text": "Write a function to clear the values of the given tuples.\n\nYour function must be named `clear_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::818", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::818", "template_id": "mbpp::818", "text": "Write a python function to count lower case letters in a given string.\n\nYour function must be named `lower_ctr`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::820", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::820", "template_id": "mbpp::820", "text": "Write a function to check whether the given month number contains 28 days or not.\n\nYour function must be named `check_monthnum_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::821", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::821", "template_id": "mbpp::821", "text": "Write a function to merge two dictionaries into a single expression.\n\nYour function must be named `merge_dictionaries`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::822", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::822", "template_id": "mbpp::822", "text": "Write a function to return true if the password is valid.\n\nYour function must be named `pass_validity`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::824", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::824", "template_id": "mbpp::824", "text": "Write a python function to remove even numbers from a given list.\n\nYour function must be named `remove_even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::825", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::825", "template_id": "mbpp::825", "text": "Write a python function to access multiple elements of specified index from a given list.\n\nYour function must be named `access_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::828", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::828", "template_id": "mbpp::828", "text": "Write a function to count alphabets,digits and special charactes in a given string.\n\nYour function must be named `count_alpha_dig_spl`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::829", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::829", "template_id": "mbpp::829", "text": "Write a function to find out the second most repeated (or frequent) string in the given sequence.\n\nYour function must be named `second_frequent`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::564|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::831", "template_id": "mbpp::831", "text": "Write a python function to count equal element pairs from the given array.\n\nYour function must be named `count_Pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::832", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::832", "template_id": "mbpp::832", "text": "Write a function to extract the maximum numeric value from a string by using regex.\n\nYour function must be named `extract_max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::833", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::833", "template_id": "mbpp::833", "text": "Write a function to get dictionary keys as a list.\n\nYour function must be named `get_key`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::834", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::834", "template_id": "mbpp::834", "text": "Write a function to generate a square matrix filled with elements from 1 to n raised to the power of 2 in spiral order.\n\nYour function must be named `generate_matrix`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::835", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::835", "template_id": "mbpp::835", "text": "Write a python function to find the slope of a line.\n\nYour function must be named `slope`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::837", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::837", "template_id": "mbpp::837", "text": "Write a python function to find the cube sum of first n odd natural numbers.\n\nYour function must be named `cube_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::839", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::839", "template_id": "mbpp::839", "text": "Write a function to sort the tuples alphabetically by the first item of each tuple.\n\nYour function must be named `sort_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::841", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::841", "template_id": "mbpp::841", "text": "Write a function to count the number of inversions in the given array.\n\nYour function must be named `get_inv_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::844", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::844", "template_id": "mbpp::844", "text": "Write a python function to find the kth element in an array containing odd elements first and then even elements.\n\nYour function must be named `get_Number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::845", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::845", "template_id": "mbpp::845", "text": "Write a python function to count the number of digits in factorial of a given number.\n\nYour function must be named `find_Digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::847", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::847", "template_id": "mbpp::847", "text": "Write a python function to copy a list from a singleton tuple.\n\nYour function must be named `lcopy`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::850", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::850", "template_id": "mbpp::850", "text": "Write a function to check if a triangle of positive area is possible with the given angles.\n\nYour function must be named `is_triangleexists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::851", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::851", "template_id": "mbpp::851", "text": "Write a python function to find sum of inverse of divisors.\n\nYour function must be named `Sum_of_Inverse_Divisors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::855", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::855", "template_id": "mbpp::855", "text": "Write a python function to check for even parity of a given number.\n\nYour function must be named `check_Even_Parity`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::856", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::856", "template_id": "mbpp::856", "text": "Write a python function to find minimum adjacent swaps required to sort binary array.\n\nYour function must be named `find_Min_Swaps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::858", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::858", "template_id": "mbpp::858", "text": "Write a function to count number of lists in a given list of lists and square the count.\n\nYour function must be named `count_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::860", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::860", "template_id": "mbpp::860", "text": "Write a function to check whether the given string is ending with only alphanumeric characters or not using regex.\n\nYour function must be named `check_alphanumeric`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::861", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::861", "template_id": "mbpp::861", "text": "Write a function to find all anagrams of a string in a given list of strings using lambda function.\n\nYour function must be named `anagram_lambda`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::565|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::864", "template_id": "mbpp::864", "text": "Write a function to find palindromes in a given list of strings using lambda function.\n\nYour function must be named `palindrome_lambda`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::868", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::868", "template_id": "mbpp::868", "text": "Write a python function to find the length of the last word in a given string.\n\nYour function must be named `length_Of_Last_Word`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::870", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::870", "template_id": "mbpp::870", "text": "Write a function to calculate the sum of the positive numbers of a given list of numbers using lambda function.\n\nYour function must be named `sum_positivenum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::873", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::873", "template_id": "mbpp::873", "text": "Write a function to solve the fibonacci sequence using recursion.\n\nYour function must be named `fibonacci`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::874", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::874", "template_id": "mbpp::874", "text": "Write a python function to check if the string is a concatenation of another string.\n\nYour function must be named `check_Concat`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::875", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::875", "template_id": "mbpp::875", "text": "Write a function to find the minimum difference in the tuple pairs of given tuples.\n\nYour function must be named `min_difference`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::876", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::876", "template_id": "mbpp::876", "text": "Write a python function to find lcm of two positive integers.\n\nYour function must be named `lcm`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::878", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::878", "template_id": "mbpp::878", "text": "Write a function to check if the given tuple contains only k elements.\n\nYour function must be named `check_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::880", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::880", "template_id": "mbpp::880", "text": "Write a python function to find number of solutions in quadratic equation.\n\nYour function must be named `Check_Solution`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::784|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::881", "template_id": "mbpp::881", "text": "Write a function to find the sum of first even and odd number of a given list.\n\nYour function must be named `sum_even_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::883", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::883", "template_id": "mbpp::883", "text": "Write a function to find numbers divisible by m and n from a list of numbers using lambda function.\n\nYour function must be named `div_of_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::884", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::884", "template_id": "mbpp::884", "text": "Write a python function to check whether all the bits are within a given range or not.\n\nYour function must be named `all_Bits_Set_In_The_Given_Range`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::886", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::886", "template_id": "mbpp::886", "text": "Write a function to add all the numbers in a list and divide it with the length of the list.\n\nYour function must be named `sum_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::887", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::887", "template_id": "mbpp::887", "text": "Write a python function to check whether the given number is odd or not using bitwise operator.\n\nYour function must be named `is_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::889", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::889", "template_id": "mbpp::889", "text": "Write a function to reverse each list in a given list of lists.\n\nYour function must be named `reverse_list_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::890", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::890", "template_id": "mbpp::890", "text": "Write a python function to find the index of an extra element present in one sorted array.\n\nYour function must be named `find_Extra`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::891", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::891", "template_id": "mbpp::891", "text": "Write a python function to check whether the given two numbers have same number of digits or not.\n\nYour function must be named `same_Length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::460|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::893", "template_id": "mbpp::893", "text": "Write a python function to get the last element of each sublist.\n\nYour function must be named `Extract`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::894", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::894", "template_id": "mbpp::894", "text": "Write a function to convert the given string of float type into tuple.\n\nYour function must be named `float_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::895", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::895", "template_id": "mbpp::895", "text": "Write a function to find the maximum sum of subsequences of given array with no adjacent elements.\n\nYour function must be named `max_sum_subseq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::896", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::896", "template_id": "mbpp::896", "text": "Write a function to sort a list in increasing order by the last element in each tuple from a given list of non-empty tuples.\n\nYour function must be named `last`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::901", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::901", "template_id": "mbpp::901", "text": "Write a function to find the smallest multiple of the first n numbers.\n\nYour function must be named `smallest_multiple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::905", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::905", "template_id": "mbpp::905", "text": "Write a python function to find the sum of squares of binomial co-efficients.\n\nYour function must be named `factorial`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::906", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::906", "template_id": "mbpp::906", "text": "Write a function to extract year, month and date from a url by using regex.\n\nYour function must be named `extract_date`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::909", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::909", "template_id": "mbpp::909", "text": "Write a function to find the previous palindrome of a specified number.\n\nYour function must be named `previous_palindrome`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::89|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::910", "template_id": "mbpp::910", "text": "Write a function to validate a gregorian date.\n\nYour function must be named `check_date`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::913", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::913", "template_id": "mbpp::913", "text": "Write a function to check for a number at the end of a string.\n\nYour function must be named `end_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::914", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::914", "template_id": "mbpp::914", "text": "Write a python function to check whether the given string is made up of two alternating characters or not.\n\nYour function must be named `is_Two_Alter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::915", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::915", "template_id": "mbpp::915", "text": "Write a function to rearrange positive and negative numbers in a given array using lambda function.\n\nYour function must be named `rearrange_numbs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::916", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::916", "template_id": "mbpp::916", "text": "Write a function to find if there is a triplet in the array whose sum is equal to a given value.\n\nYour function must be named `find_triplet_array`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::917", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::917", "template_id": "mbpp::917", "text": "Write a function to find the sequences of one upper case letter followed by lower case letters.\n\nYour function must be named `text_uppercase_lowercase`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::919", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::919", "template_id": "mbpp::919", "text": "Write a python function to multiply all items in the list.\n\nYour function must be named `multiply_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::921", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::921", "template_id": "mbpp::921", "text": "Write a function to perform chunking of tuples each of size n.\n\nYour function must be named `chunk_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::924", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::924", "template_id": "mbpp::924", "text": "Write a function to find maximum of two numbers.\n\nYour function must be named `max_of_two`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::927", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::927", "template_id": "mbpp::927", "text": "Write a function to calculate the height of the given binary tree.\n\nYour function must be named `__init__`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::928", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::928", "template_id": "mbpp::928", "text": "Write a function to convert a date of yyyy-mm-dd format to dd-mm-yyyy format.\n\nYour function must be named `change_date_format`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::931", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::931", "template_id": "mbpp::931", "text": "Write a function to calculate the sum of series 1³+2³+3³+….+n³.\n\nYour function must be named `sum_series`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::934", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::934", "template_id": "mbpp::934", "text": "Write a function to find the nth delannoy number.\n\nYour function must be named `dealnnoy_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::935", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::935", "template_id": "mbpp::935", "text": "Write a function to calculate the sum of series 1²+2²+3²+….+n².\n\nYour function must be named `series_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::938", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::938", "template_id": "mbpp::938", "text": "Write a function to find three closest elements from three sorted arrays.\n\nYour function must be named `find_closet`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::939", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::939", "template_id": "mbpp::939", "text": "Write a function to sort a list of dictionaries using lambda function.\n\nYour function must be named `sorted_models`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::942", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::942", "template_id": "mbpp::942", "text": "Write a function to check if any list element is present in the given list.\n\nYour function must be named `check_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::943", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::943", "template_id": "mbpp::943", "text": "Write a function to combine two given sorted lists using heapq module.\n\nYour function must be named `combine_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::944", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::944", "template_id": "mbpp::944", "text": "Write a function to separate and print the numbers and their position of a given string.\n\nYour function must be named `num_position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::945", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::945", "template_id": "mbpp::945", "text": "Write a function to convert the given tuples into set.\n\nYour function must be named `tuple_to_set`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::946", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::946", "template_id": "mbpp::946", "text": "Write a function to find the most common elements and their counts of a specified text.\n\nYour function must be named `most_common_elem`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::90|n2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::947", "template_id": "mbpp::947", "text": "Write a python function to find the length of the shortest word.\n\nYour function must be named `len_log`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::948", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::948", "template_id": "mbpp::948", "text": "Write a function to get an item of a tuple.\n\nYour function must be named `get_item`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::949", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::949", "template_id": "mbpp::949", "text": "Write a function to sort the given tuple list basis the total digits in tuple.\n\nYour function must be named `count_digs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::950", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::950", "template_id": "mbpp::950", "text": "Write a function to display sign of the chinese zodiac for given year.\n\nYour function must be named `chinese_zodiac`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::951", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::951", "template_id": "mbpp::951", "text": "Write a function to find the maximum of similar indices in two lists of tuples.\n\nYour function must be named `max_similar_indices`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::952", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::952", "template_id": "mbpp::952", "text": "Write a function to compute the value of ncr mod p.\n\nYour function must be named `nCr_mod_p`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::955", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::955", "template_id": "mbpp::955", "text": "Write a function to find out, if the given number is abundant.\n\nYour function must be named `is_abundant`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::956", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::956", "template_id": "mbpp::956", "text": "Write a function to split the given string at uppercase letters by using regex.\n\nYour function must be named `split_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::957", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::957", "template_id": "mbpp::957", "text": "Write a python function to get the position of rightmost set bit.\n\nYour function must be named `get_First_Set_Bit_Pos`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::958", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::958", "template_id": "mbpp::958", "text": "Write a function to convert an integer into a roman numeral.\n\nYour function must be named `int_to_roman`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::960", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::960", "template_id": "mbpp::960", "text": "Write a function to solve tiling problem.\n\nYour function must be named `get_noOfways`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::961", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::961", "template_id": "mbpp::961", "text": "Write a function to convert a roman numeral to an integer.\n\nYour function must be named `roman_to_int`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::962", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::962", "template_id": "mbpp::962", "text": "Write a python function to find the sum of all even natural numbers within the range l and r.\n\nYour function must be named `sum_Natural`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::963", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::963", "template_id": "mbpp::963", "text": "Write a function to calculate the discriminant value.\n\nYour function must be named `discriminant_value`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::965", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::965", "template_id": "mbpp::965", "text": "Write a function to convert camel case string to snake case string.\n\nYour function must be named `camel_to_snake`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::966", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::966", "template_id": "mbpp::966", "text": "Write a function to remove an empty tuple from a list of tuples.\n\nYour function must be named `remove_empty`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::969", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::969", "template_id": "mbpp::969", "text": "Write a function to join the tuples if they have similar initial elements.\n\nYour function must be named `join_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::971", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::971", "template_id": "mbpp::971", "text": "Write a function to find the maximum number of segments of lengths a, b and c that can be formed from n.\n\nYour function must be named `maximum_segments`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::974", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "train", "task_family": "mbpp", "task_id": "real::mbpp::974", "template_id": "mbpp::974", "text": "Write a function to find the minimum total path sum in the given triangle.\n\nYour function must be named `min_sum_path`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3759", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3759-2caa9a3d", "template_id": "apps::3759", "text": "Imagine you have an infinite 2D plane with Cartesian coordinate system. Some of the integral points are blocked, and others are not. Two integral points A and B on the plane are 4-connected if and only if: the Euclidean distance between A and B is one unit and neither A nor B is blocked; or there is some integral point C, such that A is 4-connected with C, and C is 4-connected with B.\n\nLet's assume that the plane doesn't contain blocked points. Consider all the integral points of the plane whose Euclidean distance from the origin is no more than n, we'll name these points special. Chubby Yang wants to get the following property: no special point is 4-connected to some non-special point. To get the property she can pick some integral points of the plane and make them blocked. What is the minimum number of points she needs to pick?\n\n\n-----Input-----\n\nThe first line contains an integer n (0 ≤ n ≤ 4·10^7).\n\n\n-----Output-----\n\nPrint a single integer — the minimum number of points that should be blocked.\n\n\n-----Examples-----\nInput\n1\n\nOutput\n4\n\nInput\n2\n\nOutput\n8\n\nInput\n3\n\nOutput\n16\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3929", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3929-9511cf6b", "template_id": "apps::3929", "text": "Snuke has decided to play with N cards and a deque (that is, a double-ended queue).\nEach card shows an integer from 1 through N, and the deque is initially empty.\nSnuke will insert the cards at the beginning or the end of the deque one at a time, in order from 1 to N.\nThen, he will perform the following action N times: take out the card from the beginning or the end of the deque and eat it.\nAfterwards, we will construct an integer sequence by arranging the integers written on the eaten cards, in the order they are eaten. Among the sequences that can be obtained in this way, find the number of the sequences such that the K-th element is 1. Print the answer modulo 10^{9} + 7.\n\n-----Constraints-----\n - 1 ≦ K ≦ N ≦ 2{,}000\n\n-----Input-----\nThe input is given from Standard Input in the following format:\nN K\n\n-----Output-----\nPrint the answer modulo 10^{9} + 7.\n\n-----Sample Input-----\n2 1\n\n-----Sample Output-----\n1\n\nThere is one sequence satisfying the condition: 1,2. One possible way to obtain this sequence is the following:\n - Insert both cards, 1 and 2, at the end of the deque.\n - Eat the card at the beginning of the deque twice.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3791", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3791-badaa252", "template_id": "apps::3791", "text": "Some time ago Mister B detected a strange signal from the space, which he started to study.\n\nAfter some transformation the signal turned out to be a permutation p of length n or its cyclic shift. For the further investigation Mister B need some basis, that's why he decided to choose cyclic shift of this permutation which has the minimum possible deviation.\n\nLet's define the deviation of a permutation p as $\\sum_{i = 1}^{i = n}|p [ i ] - i|$.\n\nFind a cyclic shift of permutation p with minimum possible deviation. If there are multiple solutions, print any of them.\n\nLet's denote id k (0 ≤ k < n) of a cyclic shift of permutation p as the number of right shifts needed to reach this shift, for example:\n\n k = 0: shift p_1, p_2, ... p_{n}, k = 1: shift p_{n}, p_1, ... p_{n} - 1, ..., k = n - 1: shift p_2, p_3, ... p_{n}, p_1.\n\n\n-----Input-----\n\nFirst line contains single integer n (2 ≤ n ≤ 10^6) — the length of the permutation.\n\nThe second line contains n space-separated integers p_1, p_2, ..., p_{n} (1 ≤ p_{i} ≤ n) — the elements of the permutation. It is guaranteed that all elements are distinct.\n\n\n-----Output-----\n\nPrint two integers: the minimum deviation of cyclic shifts of permutation p and the id of such shift. If there are multiple solutions, print any of them.\n\n\n-----Examples-----\nInput\n3\n1 2 3\n\nOutput\n0 0\n\nInput\n3\n2 3 1\n\nOutput\n0 1\n\nInput\n3\n3 2 1\n\nOutput\n2 1\n\n\n\n-----Note-----\n\nIn the first sample test the given permutation p is the identity permutation, that's why its deviation equals to 0, the shift id equals to 0 as well.\n\nIn the second sample test the deviation of p equals to 4, the deviation of the 1-st cyclic shift (1, 2, 3) equals to 0, the deviation of the 2-nd cyclic shift (3, 1, 2) equals to 4, the optimal is the 1-st cyclic shift.\n\nIn the third sample test the deviation of p equals to 4, the deviation of the 1-st cyclic shift (1, 3, 2) equals to 2, the deviation of the 2-nd cyclic shift (2, 1, 3) also equals to 2, so the optimal are both 1-st and 2-nd cyclic shifts.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3830", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3830-720ab4cf", "template_id": "apps::3830", "text": "In the snake exhibition, there are $n$ rooms (numbered $0$ to $n - 1$) arranged in a circle, with a snake in each room. The rooms are connected by $n$ conveyor belts, and the $i$-th conveyor belt connects the rooms $i$ and $(i+1) \\bmod n$. In the other words, rooms $0$ and $1$, $1$ and $2$, $\\ldots$, $n-2$ and $n-1$, $n-1$ and $0$ are connected with conveyor belts.\n\nThe $i$-th conveyor belt is in one of three states: If it is clockwise, snakes can only go from room $i$ to $(i+1) \\bmod n$. If it is anticlockwise, snakes can only go from room $(i+1) \\bmod n$ to $i$. If it is off, snakes can travel in either direction. [Image]\n\nAbove is an example with $4$ rooms, where belts $0$ and $3$ are off, $1$ is clockwise, and $2$ is anticlockwise.\n\nEach snake wants to leave its room and come back to it later. A room is returnable if the snake there can leave the room, and later come back to it using the conveyor belts. How many such returnable rooms are there?\n\n\n-----Input-----\n\nEach test contains multiple test cases. The first line contains a single integer $t$ ($1 \\le t \\le 1000$): the number of test cases. The description of the test cases follows.\n\n The first line of each test case description contains a single integer $n$ ($2 \\le n \\le 300\\,000$): the number of rooms.\n\n The next line of each test case description contains a string $s$ of length $n$, consisting of only '<', '>' and '-'. If $s_{i} = $ '>', the $i$-th conveyor belt goes clockwise. If $s_{i} = $ '<', the $i$-th conveyor belt goes anticlockwise. If $s_{i} = $ '-', the $i$-th conveyor belt is off.\n\nIt is guaranteed that the sum of $n$ among all test cases does not exceed $300\\,000$.\n\n\n-----Output-----\n\nFor each test case, output the number of returnable rooms.\n\n\n-----Example-----\nInput\n4\n4\n-><-\n5\n>>>>>\n3\n<--\n2\n<>\n\nOutput\n3\n5\n3\n0\n\n\n\n-----Note-----\n\nIn the first test case, all rooms are returnable except room $2$. The snake in the room $2$ is trapped and cannot exit. This test case corresponds to the picture from the problem statement.\n\n In the second test case, all rooms are returnable by traveling on the series of clockwise belts.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3925", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3925-e75e9c1c", "template_id": "apps::3925", "text": "Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending the entire weekend accompanied by pretty striped zebras.\n\nInspired by this adventure and an accidentally found plasticine pack (represented as a sequence of black and white stripes), Grisha now wants to select several consequent (contiguous) pieces of alternating colors to create a zebra. Let's call the number of selected pieces the length of the zebra.\n\nBefore assembling the zebra Grisha can make the following operation $0$ or more times. He splits the sequence in some place into two parts, then reverses each of them and sticks them together again. For example, if Grisha has pieces in the order \"bwbbw\" (here 'b' denotes a black strip, and 'w' denotes a white strip), then he can split the sequence as bw|bbw (here the vertical bar represents the cut), reverse both parts and obtain \"wbwbb\".\n\nDetermine the maximum possible length of the zebra that Grisha can produce.\n\n\n-----Input-----\n\nThe only line contains a string $s$ ($1 \\le |s| \\le 10^5$, where $|s|$ denotes the length of the string $s$) comprised of lowercase English letters 'b' and 'w' only, where 'w' denotes a white piece and 'b' denotes a black piece.\n\n\n-----Output-----\n\nPrint a single integer — the maximum possible zebra length.\n\n\n-----Examples-----\nInput\nbwwwbwwbw\n\nOutput\n5\n\nInput\nbwwbwwb\n\nOutput\n3\n\n\n\n-----Note-----\n\nIn the first example one of the possible sequence of operations is bwwwbww|bw $\\to$ w|wbwwwbwb $\\to$ wbwbwwwbw, that gives the answer equal to $5$.\n\nIn the second example no operation can increase the answer.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3998", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3998-373b7514", "template_id": "apps::3998", "text": "A group of n friends enjoys playing popular video game Toda 2. There is a rating system describing skill level of each player, initially the rating of the i-th friend is r_{i}.\n\nThe friends decided to take part in the championship as a team. But they should have equal ratings to be allowed to compose a single team consisting of all n friends. So the friends are faced with the problem: how to make all their ratings equal.\n\nOne way to change ratings is to willingly lose in some matches. Friends can form a party consisting of two to five (but not more than n) friends and play a match in the game. When the party loses, the rating of each of its members decreases by 1. A rating can't become negative, so r_{i} = 0 doesn't change after losing.\n\nThe friends can take part in multiple matches, each time making a party from any subset of friends (but remember about constraints on party size: from 2 to 5 members).\n\nThe friends want to make their ratings equal but as high as possible.\n\nHelp the friends develop a strategy of losing the matches so that all their ratings become equal and the resulting rating is maximum possible.\n\n\n-----Input-----\n\nThe first line contains a single integer n (2 ≤ n ≤ 100) — the number of friends.\n\nThe second line contains n non-negative integers r_1, r_2, ..., r_{n} (0 ≤ r_{i} ≤ 100), where r_{i} is the initial rating of the i-th friend.\n\n\n-----Output-----\n\nIn the first line, print a single integer R — the final rating of each of the friends.\n\nIn the second line, print integer t — the number of matches the friends have to play. Each of the following t lines should contain n characters '0' or '1', where the j-th character of the i-th line is equal to:\n\n '0', if friend j should not play in match i, '1', if friend j should play in match i.\n\nEach line should contain between two and five characters '1', inclusive.\n\nThe value t should not exceed 10^4, it is guaranteed that such solution exists.\n\nRemember that you shouldn't minimize the value t, but you should maximize R. If there are multiple solutions, print any of them.\n\n\n-----Examples-----\nInput\n5\n4 5 1 7 4\n\nOutput\n1\n8\n01010\n00011\n01010\n10010\n00011\n11000\n00011\n11000\n\nInput\n2\n1 2\n\nOutput\n0\n2\n11\n11\n\nInput\n3\n1 1 1\n\nOutput\n1\n0\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3942", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3942-0903e43e", "template_id": "apps::3942", "text": "Malek has recently found a treasure map. While he was looking for a treasure he found a locked door. There was a string s written on the door consisting of characters '(', ')' and '#'. Below there was a manual on how to open the door. After spending a long time Malek managed to decode the manual and found out that the goal is to replace each '#' with one or more ')' characters so that the final string becomes beautiful.\n\nBelow there was also written that a string is called beautiful if for each i (1 ≤ i ≤ |s|) there are no more ')' characters than '(' characters among the first i characters of s and also the total number of '(' characters is equal to the total number of ')' characters.\n\nHelp Malek open the door by telling him for each '#' character how many ')' characters he must replace it with.\n\n\n-----Input-----\n\nThe first line of the input contains a string s (1 ≤ |s| ≤ 10^5). Each character of this string is one of the characters '(', ')' or '#'. It is guaranteed that s contains at least one '#' character.\n\n\n-----Output-----\n\nIf there is no way of replacing '#' characters which leads to a beautiful string print - 1. Otherwise for each character '#' print a separate line containing a positive integer, the number of ')' characters this character must be replaced with.\n\nIf there are several possible answers, you may output any of them.\n\n\n-----Examples-----\nInput\n(((#)((#)\n\nOutput\n1\n2\n\nInput\n()((#((#(#()\n\nOutput\n2\n2\n1\nInput\n#\n\nOutput\n-1\n\nInput\n(#)\n\nOutput\n-1\n\n\n\n-----Note-----\n\n|s| denotes the length of the string s.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3996", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3996-7ac3a3a4", "template_id": "apps::3996", "text": "As we all know Barney's job is \"PLEASE\" and he has not much to do at work. That's why he started playing \"cups and key\". In this game there are three identical cups arranged in a line from left to right. Initially key to Barney's heart is under the middle cup. [Image]\n\nThen at one turn Barney swaps the cup in the middle with any of other two cups randomly (he choses each with equal probability), so the chosen cup becomes the middle one. Game lasts n turns and Barney independently choses a cup to swap with the middle one within each turn, and the key always remains in the cup it was at the start.\n\nAfter n-th turn Barney asks a girl to guess which cup contains the key. The girl points to the middle one but Barney was distracted while making turns and doesn't know if the key is under the middle cup. That's why he asked you to tell him the probability that girl guessed right.\n\nNumber n of game turns can be extremely large, that's why Barney did not give it to you. Instead he gave you an array a_1, a_2, ..., a_{k} such that $n = \\prod_{i = 1}^{k} a_{i}$\n\nin other words, n is multiplication of all elements of the given array.\n\nBecause of precision difficulties, Barney asked you to tell him the answer as an irreducible fraction. In other words you need to find it as a fraction p / q such that $\\operatorname{gcd}(p, q) = 1$, where $gcd$ is the greatest common divisor. Since p and q can be extremely large, you only need to find the remainders of dividing each of them by 10^9 + 7.\n\nPlease note that we want $gcd$ of p and q to be 1, not $gcd$ of their remainders after dividing by 10^9 + 7.\n\n\n-----Input-----\n\nThe first line of input contains a single integer k (1 ≤ k ≤ 10^5) — the number of elements in array Barney gave you.\n\nThe second line contains k integers a_1, a_2, ..., a_{k} (1 ≤ a_{i} ≤ 10^18) — the elements of the array.\n\n\n-----Output-----\n\nIn the only line of output print a single string x / y where x is the remainder of dividing p by 10^9 + 7 and y is the remainder of dividing q by 10^9 + 7.\n\n\n-----Examples-----\nInput\n1\n2\n\nOutput\n1/2\n\nInput\n3\n1 1 1\n\nOutput\n0/1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3720", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3720-d01de77a", "template_id": "apps::3720", "text": "Vasya and Petya wrote down all integers from 1 to n to play the \"powers\" game (n can be quite large; however, Vasya and Petya are not confused by this fact).\n\nPlayers choose numbers in turn (Vasya chooses first). If some number x is chosen at the current turn, it is forbidden to choose x or all of its other positive integer powers (that is, x^2, x^3, ...) at the next turns. For instance, if the number 9 is chosen at the first turn, one cannot choose 9 or 81 later, while it is still allowed to choose 3 or 27. The one who cannot make a move loses.\n\nWho wins if both Vasya and Petya play optimally?\n\n\n-----Input-----\n\nInput contains single integer n (1 ≤ n ≤ 10^9).\n\n\n-----Output-----\n\nPrint the name of the winner — \"Vasya\" or \"Petya\" (without quotes).\n\n\n-----Examples-----\nInput\n1\n\nOutput\nVasya\n\nInput\n2\n\nOutput\nPetya\n\nInput\n8\n\nOutput\nPetya\n\n\n\n-----Note-----\n\nIn the first sample Vasya will choose 1 and win immediately.\n\nIn the second sample no matter which number Vasya chooses during his first turn, Petya can choose the remaining number and win.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3850", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_competition", "task_id": "real::apps::apps-3850-e59fe94c", "template_id": "apps::3850", "text": "There are n people and k keys on a straight line. Every person wants to get to the office which is located on the line as well. To do that, he needs to reach some point with a key, take the key and then go to the office. Once a key is taken by somebody, it couldn't be taken by anybody else.\n\nYou are to determine the minimum time needed for all n people to get to the office with keys. Assume that people move a unit distance per 1 second. If two people reach a key at the same time, only one of them can take the key. A person can pass through a point with a key without taking it.\n\n\n-----Input-----\n\nThe first line contains three integers n, k and p (1 ≤ n ≤ 1 000, n ≤ k ≤ 2 000, 1 ≤ p ≤ 10^9) — the number of people, the number of keys and the office location.\n\nThe second line contains n distinct integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^9) — positions in which people are located initially. The positions are given in arbitrary order.\n\nThe third line contains k distinct integers b_1, b_2, ..., b_{k} (1 ≤ b_{j} ≤ 10^9) — positions of the keys. The positions are given in arbitrary order.\n\nNote that there can't be more than one person or more than one key in the same point. A person and a key can be located in the same point.\n\n\n-----Output-----\n\nPrint the minimum time (in seconds) needed for all n to reach the office with keys.\n\n\n-----Examples-----\nInput\n2 4 50\n20 100\n60 10 40 80\n\nOutput\n50\n\nInput\n1 2 10\n11\n15 7\n\nOutput\n7\n\n\n\n-----Note-----\n\nIn the first example the person located at point 20 should take the key located at point 40 and go with it to the office located at point 50. He spends 30 seconds. The person located at point 100 can take the key located at point 80 and go to the office with it. He spends 50 seconds. Thus, after 50 seconds everybody is in office with keys.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::910", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-910-a683dc30", "template_id": "apps::910", "text": "There are n parliamentarians in Berland. They are numbered with integers from 1 to n. It happened that all parliamentarians with odd indices are Democrats and all parliamentarians with even indices are Republicans.\n\nNew parliament assembly hall is a rectangle consisting of a × b chairs — a rows of b chairs each. Two chairs are considered neighbouring if they share as side. For example, chair number 5 in row number 2 is neighbouring to chairs number 4 and 6 in this row and chairs with number 5 in rows 1 and 3. Thus, chairs have four neighbours in general, except for the chairs on the border of the hall\n\nWe know that if two parliamentarians from one political party (that is two Democrats or two Republicans) seat nearby they spent all time discussing internal party issues.\n\nWrite the program that given the number of parliamentarians and the sizes of the hall determine if there is a way to find a seat for any parliamentarian, such that no two members of the same party share neighbouring seats.\n\n\n-----Input-----\n\nThe first line of the input contains three integers n, a and b (1 ≤ n ≤ 10 000, 1 ≤ a, b ≤ 100) — the number of parliamentarians, the number of rows in the assembly hall and the number of seats in each row, respectively.\n\n\n-----Output-----\n\nIf there is no way to assigns seats to parliamentarians in a proper way print -1.\n\nOtherwise print the solution in a lines, each containing b integers. The j-th integer of the i-th line should be equal to the index of parliamentarian occupying this seat, or 0 if this seat should remain empty. If there are multiple possible solution, you may print any of them.\n\n\n-----Examples-----\nInput\n3 2 2\n\nOutput\n0 3\n1 2\n\nInput\n8 4 3\n\nOutput\n7 8 3\n0 1 4\n6 0 5\n0 2 0\n\nInput\n10 2 2\n\nOutput\n-1\n\n\n\n-----Note-----\n\nIn the first sample there are many other possible solutions. For example, 3 2\n\n0 1\n\n\n\nand 2 1\n\n3 0\n\n\n\nThe following assignment 3 2\n\n1 0\n\n\n\nis incorrect, because parliamentarians 1 and 3 are both from Democrats party but will occupy neighbouring seats.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1674", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1674-601f269d", "template_id": "apps::1674", "text": "You are playing a new famous fighting game: Kortal Mombat XII. You have to perform a brutality on your opponent's character.\n\nYou are playing the game on the new generation console so your gamepad have $26$ buttons. Each button has a single lowercase Latin letter from 'a' to 'z' written on it. All the letters on buttons are pairwise distinct.\n\nYou are given a sequence of hits, the $i$-th hit deals $a_i$ units of damage to the opponent's character. To perform the $i$-th hit you have to press the button $s_i$ on your gamepad. Hits are numbered from $1$ to $n$.\n\nYou know that if you press some button more than $k$ times in a row then it'll break. You cherish your gamepad and don't want to break any of its buttons.\n\nTo perform a brutality you have to land some of the hits of the given sequence. You are allowed to skip any of them, however changing the initial order of the sequence is prohibited. The total damage dealt is the sum of $a_i$ over all $i$ for the hits which weren't skipped.\n\nNote that if you skip the hit then the counter of consecutive presses the button won't reset.\n\nYour task is to skip some hits to deal the maximum possible total damage to the opponent's character and not break your gamepad buttons.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $k$ ($1 \\le k \\le n \\le 2 \\cdot 10^5$) — the number of hits and the maximum number of times you can push the same button in a row.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 10^9$), where $a_i$ is the damage of the $i$-th hit.\n\nThe third line of the input contains the string $s$ consisting of exactly $n$ lowercase Latin letters — the sequence of hits (each character is the letter on the button you need to press to perform the corresponding hit).\n\n\n-----Output-----\n\nPrint one integer $dmg$ — the maximum possible damage to the opponent's character you can deal without breaking your gamepad buttons.\n\n\n-----Examples-----\nInput\n7 3\n1 5 16 18 7 2 10\nbaaaaca\n\nOutput\n54\n\nInput\n5 5\n2 4 1 3 1000\naaaaa\n\nOutput\n1010\n\nInput\n5 4\n2 4 1 3 1000\naaaaa\n\nOutput\n1009\n\nInput\n8 1\n10 15 2 1 4 8 15 16\nqqwweerr\n\nOutput\n41\n\nInput\n6 3\n14 18 9 19 2 15\ncccccc\n\nOutput\n52\n\nInput\n2 1\n10 10\nqq\n\nOutput\n10\n\n\n\n-----Note-----\n\nIn the first example you can choose hits with numbers $[1, 3, 4, 5, 6, 7]$ with the total damage $1 + 16 + 18 + 7 + 2 + 10 = 54$.\n\nIn the second example you can choose all hits so the total damage is $2 + 4 + 1 + 3 + 1000 = 1010$.\n\nIn the third example you can choose all hits expect the third one so the total damage is $2 + 4 + 3 + 1000 = 1009$.\n\nIn the fourth example you can choose hits with numbers $[2, 3, 6, 8]$. Only this way you can reach the maximum total damage $15 + 2 + 8 + 16 = 41$.\n\nIn the fifth example you can choose only hits with numbers $[2, 4, 6]$ with the total damage $18 + 19 + 15 = 52$.\n\nIn the sixth example you can change either first hit or the second hit (it does not matter) with the total damage $10$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1844", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1844-457d9dad", "template_id": "apps::1844", "text": "Janusz is a businessman. He owns a company \"Januszex\", which produces games for teenagers. Last hit of Januszex was a cool one-person game \"Make it one\". The player is given a sequence of $n$ integers $a_i$.\n\nIt is allowed to select any subset of them, and the score is equal to the greatest common divisor of selected elements. The goal is to take as little elements as it is possible, getting the score $1$. Now Janusz wonders, for given sequence, how much elements should the player choose?\n\n\n-----Input-----\n\nThe first line contains an only integer $n$ ($1 \\le n \\le 300\\,000$) — the number of integers in the sequence.\n\nThe second line contains $n$ integers $a_1, a_2, \\ldots, a_n$ ($1 \\le a_i \\le 300\\,000$).\n\n\n-----Output-----\n\nIf there is no subset of the given sequence with gcd equal to $1$, output -1.\n\nOtherwise, output exactly one integer — the size of the smallest subset with gcd equal to $1$.\n\n\n-----Examples-----\nInput\n3\n10 6 15\n\nOutput\n3\n\nInput\n3\n2 4 6\n\nOutput\n-1\n\nInput\n7\n30 60 21 42 70 15 30\n\nOutput\n3\n\n\n\n-----Note-----\n\nIn the first example, selecting a subset of all numbers gives a gcd of $1$ and for all smaller subsets the gcd is greater than $1$.\n\nIn the second example, for all subsets of numbers the gcd is at least $2$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::832", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-832-4fd0a3e9", "template_id": "apps::832", "text": "Manao works on a sports TV. He's spent much time watching the football games of some country. After a while he began to notice different patterns. For example, each team has two sets of uniforms: home uniform and guest uniform. When a team plays a game at home, the players put on the home uniform. When a team plays as a guest on somebody else's stadium, the players put on the guest uniform. The only exception to that rule is: when the home uniform color of the host team matches the guests' uniform, the host team puts on its guest uniform as well. For each team the color of the home and guest uniform is different.\n\nThere are n teams taking part in the national championship. The championship consists of n·(n - 1) games: each team invites each other team to its stadium. At this point Manao wondered: how many times during the championship is a host team going to put on the guest uniform? Note that the order of the games does not affect this number.\n\nYou know the colors of the home and guest uniform for each team. For simplicity, the colors are numbered by integers in such a way that no two distinct colors have the same number. Help Manao find the answer to his question.\n\n\n-----Input-----\n\nThe first line contains an integer n (2 ≤ n ≤ 30). Each of the following n lines contains a pair of distinct space-separated integers h_{i}, a_{i} (1 ≤ h_{i}, a_{i} ≤ 100) — the colors of the i-th team's home and guest uniforms, respectively.\n\n\n-----Output-----\n\nIn a single line print the number of games where the host team is going to play in the guest uniform.\n\n\n-----Examples-----\nInput\n3\n1 2\n2 4\n3 4\n\nOutput\n1\n\nInput\n4\n100 42\n42 100\n5 42\n100 5\n\nOutput\n5\n\nInput\n2\n1 2\n1 2\n\nOutput\n0\n\n\n\n-----Note-----\n\nIn the first test case the championship consists of 6 games. The only game with the event in question is the game between teams 2 and 1 on the stadium of team 2.\n\nIn the second test sample the host team will have to wear guest uniform in the games between teams: 1 and 2, 2 and 1, 2 and 3, 3 and 4, 4 and 2 (the host team is written first).\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1575", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1575-f2d36628", "template_id": "apps::1575", "text": "Finally! Vasya have come of age and that means he can finally get a passport! To do it, he needs to visit the passport office, but it's not that simple. There's only one receptionist at the passport office and people can queue up long before it actually opens. Vasya wants to visit the passport office tomorrow.\n\nHe knows that the receptionist starts working after t_{s} minutes have passed after midnight and closes after t_{f} minutes have passed after midnight (so that (t_{f} - 1) is the last minute when the receptionist is still working). The receptionist spends exactly t minutes on each person in the queue. If the receptionist would stop working within t minutes, he stops serving visitors (other than the one he already serves).\n\nVasya also knows that exactly n visitors would come tomorrow. For each visitor Vasya knows the point of time when he would come to the passport office. Each visitor queues up and doesn't leave until he was served. If the receptionist is free when a visitor comes (in particular, if the previous visitor was just served and the queue is empty), the receptionist begins to serve the newcomer immediately. [Image] \"Reception 1\"\n\nFor each visitor, the point of time when he would come to the passport office is positive. Vasya can come to the office at the time zero (that is, at midnight) if he needs so, but he can come to the office only at integer points of time. If Vasya arrives at the passport office at the same time with several other visitors, he yields to them and stand in the queue after the last of them.\n\nVasya wants to come at such point of time that he will be served by the receptionist, and he would spend the minimum possible time in the queue. Help him!\n\n\n-----Input-----\n\nThe first line contains three integers: the point of time when the receptionist begins to work t_{s}, the point of time when the receptionist stops working t_{f} and the time the receptionist spends on each visitor t. The second line contains one integer n — the amount of visitors (0 ≤ n ≤ 100 000). The third line contains positive integers in non-decreasing order — the points of time when the visitors arrive to the passport office.\n\nAll times are set in minutes and do not exceed 10^12; it is guaranteed that t_{s} < t_{f}. It is also guaranteed that Vasya can arrive at the passport office at such a point of time that he would be served by the receptionist.\n\n\n-----Output-----\n\nPrint single non-negative integer — the point of time when Vasya should arrive at the passport office. If Vasya arrives at the passport office at the same time with several other visitors, he yields to them and queues up the last. If there are many answers, you can print any of them.\n\n\n-----Examples-----\nInput\n10 15 2\n2\n10 13\n\nOutput\n12\nInput\n8 17 3\n4\n3 4 5 8\n\nOutput\n2\n\n\n-----Note-----\n\nIn the first example the first visitor comes exactly at the point of time when the receptionist begins to work, and he is served for two minutes. At 12 minutes after the midnight the receptionist stops serving the first visitor, and if Vasya arrives at this moment, he will be served immediately, because the next visitor would only come at 13 minutes after midnight.\n\nIn the second example, Vasya has to come before anyone else to be served.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1014", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1014-c20d3eb3", "template_id": "apps::1014", "text": "Vasya decided to learn to play chess. Classic chess doesn't seem interesting to him, so he plays his own sort of chess.\n\nThe queen is the piece that captures all squares on its vertical, horizontal and diagonal lines. If the cell is located on the same vertical, horizontal or diagonal line with queen, and the cell contains a piece of the enemy color, the queen is able to move to this square. After that the enemy's piece is removed from the board. The queen cannot move to a cell containing an enemy piece if there is some other piece between it and the queen.\n\nThere is an n × n chessboard. We'll denote a cell on the intersection of the r-th row and c-th column as (r, c). The square (1, 1) contains the white queen and the square (1, n) contains the black queen. All other squares contain green pawns that don't belong to anyone.\n\nThe players move in turns. The player that moves first plays for the white queen, his opponent plays for the black queen.\n\nOn each move the player has to capture some piece with his queen (that is, move to a square that contains either a green pawn or the enemy queen). The player loses if either he cannot capture any piece during his move or the opponent took his queen during the previous move.\n\nHelp Vasya determine who wins if both players play with an optimal strategy on the board n × n.\n\n\n-----Input-----\n\nThe input contains a single number n (2 ≤ n ≤ 10^9) — the size of the board.\n\n\n-----Output-----\n\nOn the first line print the answer to problem — string \"white\" or string \"black\", depending on who wins if the both players play optimally.\n\nIf the answer is \"white\", then you should also print two integers r and c representing the cell (r, c), where the first player should make his first move to win. If there are multiple such cells, print the one with the minimum r. If there are still multiple squares, print the one with the minimum c.\n\n\n-----Examples-----\nInput\n2\n\nOutput\nwhite\n1 2\n\nInput\n3\n\nOutput\nblack\n\n\n\n-----Note-----\n\nIn the first sample test the white queen can capture the black queen at the first move, so the white player wins.\n\nIn the second test from the statement if the white queen captures the green pawn located on the central vertical line, then it will be captured by the black queen during the next move. So the only move for the white player is to capture the green pawn located at (2, 1).\n\nSimilarly, the black queen doesn't have any other options but to capture the green pawn located at (2, 3), otherwise if it goes to the middle vertical line, it will be captured by the white queen.\n\nDuring the next move the same thing happens — neither the white, nor the black queen has other options rather than to capture green pawns situated above them. Thus, the white queen ends up on square (3, 1), and the black queen ends up on square (3, 3).\n\nIn this situation the white queen has to capture any of the green pawns located on the middle vertical line, after that it will be captured by the black queen. Thus, the player who plays for the black queen wins.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1190", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1190-7ad523fa", "template_id": "apps::1190", "text": "In order to make the \"Sea Battle\" game more interesting, Boris decided to add a new ship type to it. The ship consists of two rectangles. The first rectangle has a width of $w_1$ and a height of $h_1$, while the second rectangle has a width of $w_2$ and a height of $h_2$, where $w_1 \\ge w_2$. In this game, exactly one ship is used, made up of two rectangles. There are no other ships on the field.\n\nThe rectangles are placed on field in the following way: the second rectangle is on top the first rectangle; they are aligned to the left, i.e. their left sides are on the same line; the rectangles are adjacent to each other without a gap.\n\nSee the pictures in the notes: the first rectangle is colored red, the second rectangle is colored blue.\n\nFormally, let's introduce a coordinate system. Then, the leftmost bottom cell of the first rectangle has coordinates $(1, 1)$, the rightmost top cell of the first rectangle has coordinates $(w_1, h_1)$, the leftmost bottom cell of the second rectangle has coordinates $(1, h_1 + 1)$ and the rightmost top cell of the second rectangle has coordinates $(w_2, h_1 + h_2)$.\n\nAfter the ship is completely destroyed, all cells neighboring by side or a corner with the ship are marked. Of course, only cells, which don't belong to the ship are marked. On the pictures in the notes such cells are colored green.\n\nFind out how many cells should be marked after the ship is destroyed. The field of the game is infinite in any direction.\n\n\n-----Input-----\n\nFour lines contain integers $w_1, h_1, w_2$ and $h_2$ ($1 \\leq w_1, h_1, w_2, h_2 \\leq 10^8$, $w_1 \\ge w_2$) — the width of the first rectangle, the height of the first rectangle, the width of the second rectangle and the height of the second rectangle. You can't rotate the rectangles.\n\n\n-----Output-----\n\nPrint exactly one integer — the number of cells, which should be marked after the ship is destroyed.\n\n\n-----Examples-----\nInput\n2 1 2 1\n\nOutput\n12\n\nInput\n2 2 1 2\n\nOutput\n16\n\n\n\n-----Note-----\n\nIn the first example the field looks as follows (the first rectangle is red, the second rectangle is blue, green shows the marked squares): [Image]\n\nIn the second example the field looks as: [Image]\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2412", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-2412-a9382aac", "template_id": "apps::2412", "text": "A telephone number is a sequence of exactly 11 digits, where the first digit is 8. For example, the sequence 80011223388 is a telephone number, but the sequences 70011223388 and 80000011223388 are not.\n\nYou are given a string $s$ of length $n$, consisting of digits.\n\nIn one operation you can delete any character from string $s$. For example, it is possible to obtain strings 112, 111 or 121 from string 1121.\n\nYou need to determine whether there is such a sequence of operations (possibly empty), after which the string $s$ becomes a telephone number.\n\n\n-----Input-----\n\nThe first line contains one integer $t$ ($1 \\le t \\le 100$) — the number of test cases.\n\nThe first line of each test case contains one integer $n$ ($1 \\le n \\le 100$) — the length of string $s$.\n\nThe second line of each test case contains the string $s$ ($|s| = n$) consisting of digits.\n\n\n-----Output-----\n\nFor each test print one line.\n\nIf there is a sequence of operations, after which $s$ becomes a telephone number, print YES.\n\nOtherwise, print NO.\n\n\n-----Example-----\nInput\n2\n13\n7818005553535\n11\n31415926535\n\nOutput\nYES\nNO\n\n\n\n-----Note-----\n\nIn the first test case you need to delete the first and the third digits. Then the string 7818005553535 becomes 88005553535.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::177", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-177-6679d66e", "template_id": "apps::177", "text": "Let's write all the positive integer numbers one after another from $1$ without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 123456789101112131415161718192021222324252627282930313233343536...\n\nYour task is to print the $k$-th digit of this sequence.\n\n\n-----Input-----\n\nThe first and only line contains integer $k$ ($1 \\le k \\le 10000$) — the position to process ($1$-based index).\n\n\n-----Output-----\n\nPrint the $k$-th digit of the resulting infinite sequence.\n\n\n-----Examples-----\nInput\n7\n\nOutput\n7\n\nInput\n21\n\nOutput\n5\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2239", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-2239-e9c3292f", "template_id": "apps::2239", "text": "Mishka got a six-faced dice. It has integer numbers from $2$ to $7$ written on its faces (all numbers on faces are different, so this is an almost usual dice).\n\nMishka wants to get exactly $x$ points by rolling his dice. The number of points is just a sum of numbers written at the topmost face of the dice for all the rolls Mishka makes.\n\nMishka doesn't really care about the number of rolls, so he just wants to know any number of rolls he can make to be able to get exactly $x$ points for them. Mishka is very lucky, so if the probability to get $x$ points with chosen number of rolls is non-zero, he will be able to roll the dice in such a way. Your task is to print this number. It is guaranteed that at least one answer exists.\n\nMishka is also very curious about different number of points to score so you have to answer $t$ independent queries.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $t$ ($1 \\le t \\le 100$) — the number of queries.\n\nEach of the next $t$ lines contains one integer each. The $i$-th line contains one integer $x_i$ ($2 \\le x_i \\le 100$) — the number of points Mishka wants to get.\n\n\n-----Output-----\n\nPrint $t$ lines. In the $i$-th line print the answer to the $i$-th query (i.e. any number of rolls Mishka can make to be able to get exactly $x_i$ points for them). It is guaranteed that at least one answer exists.\n\n\n-----Example-----\nInput\n4\n2\n13\n37\n100\n\nOutput\n1\n3\n8\n27\n\n\n-----Note-----\n\nIn the first query Mishka can roll a dice once and get $2$ points.\n\nIn the second query Mishka can roll a dice $3$ times and get points $5$, $5$ and $3$ (for example).\n\nIn the third query Mishka can roll a dice $8$ times and get $5$ points $7$ times and $2$ points with the remaining roll.\n\nIn the fourth query Mishka can roll a dice $27$ times and get $2$ points $11$ times, $3$ points $6$ times and $6$ points $10$ times.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1440", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1440-896d945e", "template_id": "apps::1440", "text": "Pavel has several sticks with lengths equal to powers of two.\n\nHe has $a_0$ sticks of length $2^0 = 1$, $a_1$ sticks of length $2^1 = 2$, ..., $a_{n-1}$ sticks of length $2^{n-1}$.\n\nPavel wants to make the maximum possible number of triangles using these sticks. The triangles should have strictly positive area, each stick can be used in at most one triangle.\n\nIt is forbidden to break sticks, and each triangle should consist of exactly three sticks.\n\nFind the maximum possible number of triangles.\n\n\n-----Input-----\n\nThe first line contains a single integer $n$ ($1 \\leq n \\leq 300\\,000$) — the number of different lengths of sticks.\n\nThe second line contains $n$ integers $a_0$, $a_1$, ..., $a_{n-1}$ ($1 \\leq a_i \\leq 10^9$), where $a_i$ is the number of sticks with the length equal to $2^i$.\n\n\n-----Output-----\n\nPrint a single integer — the maximum possible number of non-degenerate triangles that Pavel can make.\n\n\n-----Examples-----\nInput\n5\n1 2 2 2 2\n\nOutput\n3\n\nInput\n3\n1 1 1\n\nOutput\n0\n\nInput\n3\n3 3 3\n\nOutput\n3\n\n\n\n-----Note-----\n\nIn the first example, Pavel can, for example, make this set of triangles (the lengths of the sides of the triangles are listed): $(2^0, 2^4, 2^4)$, $(2^1, 2^3, 2^3)$, $(2^1, 2^2, 2^2)$.\n\nIn the second example, Pavel cannot make a single triangle.\n\nIn the third example, Pavel can, for example, create this set of triangles (the lengths of the sides of the triangles are listed): $(2^0, 2^0, 2^0)$, $(2^1, 2^1, 2^1)$, $(2^2, 2^2, 2^2)$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2061", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-2061-654e3020", "template_id": "apps::2061", "text": "The map of Berland is a rectangle of the size n × m, which consists of cells of size 1 × 1. Each cell is either land or water. The map is surrounded by the ocean.\n\nLakes are the maximal regions of water cells, connected by sides, which are not connected with the ocean. Formally, lake is a set of water cells, such that it's possible to get from any cell of the set to any other without leaving the set and moving only to cells adjacent by the side, none of them is located on the border of the rectangle, and it's impossible to add one more water cell to the set such that it will be connected with any other cell.\n\nYou task is to fill up with the earth the minimum number of water cells so that there will be exactly k lakes in Berland. Note that the initial number of lakes on the map is not less than k.\n\n\n-----Input-----\n\nThe first line of the input contains three integers n, m and k (1 ≤ n, m ≤ 50, 0 ≤ k ≤ 50) — the sizes of the map and the number of lakes which should be left on the map.\n\nThe next n lines contain m characters each — the description of the map. Each of the characters is either '.' (it means that the corresponding cell is water) or '*' (it means that the corresponding cell is land).\n\nIt is guaranteed that the map contain at least k lakes.\n\n\n-----Output-----\n\nIn the first line print the minimum number of cells which should be transformed from water to land.\n\nIn the next n lines print m symbols — the map after the changes. The format must strictly follow the format of the map in the input data (there is no need to print the size of the map). If there are several answers, print any of them.\n\nIt is guaranteed that the answer exists on the given data.\n\n\n-----Examples-----\nInput\n5 4 1\n****\n*..*\n****\n**.*\n..**\n\nOutput\n1\n****\n*..*\n****\n****\n..**\n\nInput\n3 3 0\n***\n*.*\n***\n\nOutput\n1\n***\n***\n***\n\n\n\n-----Note-----\n\nIn the first example there are only two lakes — the first consists of the cells (2, 2) and (2, 3), the second consists of the cell (4, 3). It is profitable to cover the second lake because it is smaller. Pay attention that the area of water in the lower left corner is not a lake because this area share a border with the ocean.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1544", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1544-9d04cf93", "template_id": "apps::1544", "text": "Because of budget cuts one IT company established new non-financial reward system instead of bonuses.\n\nTwo kinds of actions are rewarded: fixing critical bugs and suggesting new interesting features. A man who fixed a critical bug gets \"I fixed a critical bug\" pennant on his table. A man who suggested a new interesting feature gets \"I suggested a new feature\" pennant on his table.\n\nBecause of the limited budget of the new reward system only 5 \"I fixed a critical bug\" pennants and 3 \"I suggested a new feature\" pennants were bought.\n\nIn order to use these pennants for a long time they were made challenge ones. When a man fixes a new critical bug one of the earlier awarded \"I fixed a critical bug\" pennants is passed on to his table. When a man suggests a new interesting feature one of the earlier awarded \"I suggested a new feature\" pennants is passed on to his table.\n\nOne man can have several pennants of one type and of course he can have pennants of both types on his table. There are n tables in the IT company. Find the number of ways to place the pennants on these tables given that each pennant is situated on one of the tables and each table is big enough to contain any number of pennants.\n\n\n-----Input-----\n\nThe only line of the input contains one integer n (1 ≤ n ≤ 500) — the number of tables in the IT company.\n\n\n-----Output-----\n\nOutput one integer — the amount of ways to place the pennants on n tables.\n\n\n-----Examples-----\nInput\n2\n\nOutput\n24\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::346", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-346-c4940470", "template_id": "apps::346", "text": "'Jeopardy!' is an intellectual game where players answer questions and earn points. Company Q conducts a simplified 'Jeopardy!' tournament among the best IT companies. By a lucky coincidence, the old rivals made it to the finals: company R1 and company R2.\n\nThe finals will have n questions, m of them are auction questions and n - m of them are regular questions. Each question has a price. The price of the i-th question is a_{i} points. During the game the players chose the questions. At that, if the question is an auction, then the player who chose it can change the price if the number of his current points is strictly larger than the price of the question. The new price of the question cannot be less than the original price and cannot be greater than the current number of points of the player who chose the question. The correct answer brings the player the points equal to the price of the question. The wrong answer to the question reduces the number of the player's points by the value of the question price.\n\nThe game will go as follows. First, the R2 company selects a question, then the questions are chosen by the one who answered the previous question correctly. If no one answered the question, then the person who chose last chooses again.\n\nAll R2 employees support their team. They want to calculate what maximum possible number of points the R2 team can get if luck is on their side during the whole game (they will always be the first to correctly answer questions). Perhaps you are not going to be surprised, but this problem was again entrusted for you to solve.\n\n\n-----Input-----\n\nThe first line contains two space-separated integers n and m (1 ≤ n, m ≤ 100; m ≤ min(n, 30)) — the total number of questions and the number of auction questions, correspondingly. The second line contains n space-separated integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^7) — the prices of the questions. The third line contains m distinct integers b_{i} (1 ≤ b_{i} ≤ n) — the numbers of auction questions. Assume that the questions are numbered from 1 to n.\n\n\n-----Output-----\n\nIn the single line, print the answer to the problem — the maximum points the R2 company can get if it plays optimally well. It is guaranteed that the answer fits into the integer 64-bit signed type.\n\n\n-----Examples-----\nInput\n4 1\n1 3 7 5\n3\n\nOutput\n18\n\nInput\n3 2\n10 3 8\n2 3\n\nOutput\n40\n\nInput\n2 2\n100 200\n1 2\n\nOutput\n400\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1829", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1829-9bb5b843", "template_id": "apps::1829", "text": "PolandBall is playing a game with EnemyBall. The rules are simple. Players have to say words in turns. You cannot say a word which was already said. PolandBall starts. The Ball which can't say a new word loses.\n\nYou're given two lists of words familiar to PolandBall and EnemyBall. Can you determine who wins the game, if both play optimally?\n\n\n-----Input-----\n\nThe first input line contains two integers n and m (1 ≤ n, m ≤ 10^3) — number of words PolandBall and EnemyBall know, respectively.\n\nThen n strings follow, one per line — words familiar to PolandBall.\n\nThen m strings follow, one per line — words familiar to EnemyBall.\n\nNote that one Ball cannot know a word more than once (strings are unique), but some words can be known by both players.\n\nEach word is non-empty and consists of no more than 500 lowercase English alphabet letters.\n\n\n-----Output-----\n\nIn a single line of print the answer — \"YES\" if PolandBall wins and \"NO\" otherwise. Both Balls play optimally.\n\n\n-----Examples-----\nInput\n5 1\npolandball\nis\na\ncool\ncharacter\nnope\n\nOutput\nYES\nInput\n2 2\nkremowka\nwadowicka\nkremowka\nwiedenska\n\nOutput\nYES\nInput\n1 2\na\na\nb\n\nOutput\nNO\n\n\n-----Note-----\n\nIn the first example PolandBall knows much more words and wins effortlessly.\n\nIn the second example if PolandBall says kremowka first, then EnemyBall cannot use that word anymore. EnemyBall can only say wiedenska. PolandBall says wadowicka and wins.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1371", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1371-c36d97ae", "template_id": "apps::1371", "text": "Given is an integer S.\nFind how many sequences there are whose terms are all integers greater than or equal to 3, and whose sum is equal to S.\nThe answer can be very large, so output it modulo 10^9 + 7.\n\n-----Constraints-----\n - 1 \\leq S \\leq 2000\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nS\n\n-----Output-----\nPrint the answer.\n\n-----Sample Input-----\n7\n\n-----Sample Output-----\n3\n\n3 sequences satisfy the condition: \\{3,4\\}, \\{4,3\\} and \\{7\\}.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1498", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1498-c0d3938e", "template_id": "apps::1498", "text": "There are n servers in a laboratory, each of them can perform tasks. Each server has a unique id — integer from 1 to n.\n\nIt is known that during the day q tasks will come, the i-th of them is characterized with three integers: t_{i} — the moment in seconds in which the task will come, k_{i} — the number of servers needed to perform it, and d_{i} — the time needed to perform this task in seconds. All t_{i} are distinct.\n\nTo perform the i-th task you need k_{i} servers which are unoccupied in the second t_{i}. After the servers begin to perform the task, each of them will be busy over the next d_{i} seconds. Thus, they will be busy in seconds t_{i}, t_{i} + 1, ..., t_{i} + d_{i} - 1. For performing the task, k_{i} servers with the smallest ids will be chosen from all the unoccupied servers. If in the second t_{i} there are not enough unoccupied servers, the task is ignored.\n\nWrite the program that determines which tasks will be performed and which will be ignored.\n\n\n-----Input-----\n\nThe first line contains two positive integers n and q (1 ≤ n ≤ 100, 1 ≤ q ≤ 10^5) — the number of servers and the number of tasks.\n\nNext q lines contains three integers each, the i-th line contains integers t_{i}, k_{i} and d_{i} (1 ≤ t_{i} ≤ 10^6, 1 ≤ k_{i} ≤ n, 1 ≤ d_{i} ≤ 1000) — the moment in seconds in which the i-th task will come, the number of servers needed to perform it, and the time needed to perform this task in seconds. The tasks are given in a chronological order and they will come in distinct seconds.\n\n\n-----Output-----\n\nPrint q lines. If the i-th task will be performed by the servers, print in the i-th line the sum of servers' ids on which this task will be performed. Otherwise, print -1.\n\n\n-----Examples-----\nInput\n4 3\n1 3 2\n2 2 1\n3 4 3\n\nOutput\n6\n-1\n10\n\nInput\n3 2\n3 2 3\n5 1 2\n\nOutput\n3\n3\n\nInput\n8 6\n1 3 20\n4 2 1\n6 5 5\n10 1 1\n15 3 6\n21 8 8\n\nOutput\n6\n9\n30\n-1\n15\n36\n\n\n\n-----Note-----\n\nIn the first example in the second 1 the first task will come, it will be performed on the servers with ids 1, 2 and 3 (the sum of the ids equals 6) during two seconds. In the second 2 the second task will come, it will be ignored, because only the server 4 will be unoccupied at that second. In the second 3 the third task will come. By this time, servers with the ids 1, 2 and 3 will be unoccupied again, so the third task will be done on all the servers with the ids 1, 2, 3 and 4 (the sum of the ids is 10).\n\nIn the second example in the second 3 the first task will come, it will be performed on the servers with ids 1 and 2 (the sum of the ids is 3) during three seconds. In the second 5 the second task will come, it will be performed on the server 3, because the first two servers will be busy performing the first task.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::269", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-269-ba10d5cb", "template_id": "apps::269", "text": "Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.\n\nNow he has a goal to replace dead light bulbs, however he doesn't know how many light bulbs for each color are required. It is guaranteed that for each of four colors at least one light is working.\n\nIt is known that the garland contains light bulbs of four colors: red, blue, yellow and green. The garland is made as follows: if you take any four consecutive light bulbs then there will not be light bulbs with the same color among them. For example, the garland can look like \"RYBGRYBGRY\", \"YBGRYBGRYBG\", \"BGRYB\", but can not look like \"BGRYG\", \"YBGRYBYGR\" or \"BGYBGY\". Letters denote colors: 'R' — red, 'B' — blue, 'Y' — yellow, 'G' — green.\n\nUsing the information that for each color at least one light bulb still works count the number of dead light bulbs of each four colors.\n\n\n-----Input-----\n\nThe first and the only line contains the string s (4 ≤ |s| ≤ 100), which describes the garland, the i-th symbol of which describes the color of the i-th light bulb in the order from the beginning of garland: 'R' — the light bulb is red, 'B' — the light bulb is blue, 'Y' — the light bulb is yellow, 'G' — the light bulb is green, '!' — the light bulb is dead.\n\nThe string s can not contain other symbols except those five which were described.\n\nIt is guaranteed that in the given string at least once there is each of four letters 'R', 'B', 'Y' and 'G'.\n\nIt is guaranteed that the string s is correct garland with some blown light bulbs, it means that for example the line \"GRBY!!!B\" can not be in the input data.\n\n\n-----Output-----\n\nIn the only line print four integers k_{r}, k_{b}, k_{y}, k_{g} — the number of dead light bulbs of red, blue, yellow and green colors accordingly.\n\n\n-----Examples-----\nInput\nRYBGRYBGR\n\nOutput\n0 0 0 0\nInput\n!RGYB\n\nOutput\n0 1 0 0\nInput\n!!!!YGRB\n\nOutput\n1 1 1 1\nInput\n!GB!RG!Y!\n\nOutput\n2 1 1 0\n\n\n-----Note-----\n\nIn the first example there are no dead light bulbs.\n\nIn the second example it is obvious that one blue bulb is blown, because it could not be light bulbs of other colors on its place according to the statements.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::231", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-231-e1e3d588", "template_id": "apps::231", "text": "The main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at one side of the street and are numbered from 1 to n - 1 in the order from the beginning of the street to the end (in the picture: from left to right). The houses with even numbers are at the other side of the street and are numbered from 2 to n in the order from the end of the street to its beginning (in the picture: from right to left). The corresponding houses with even and odd numbers are strictly opposite each other, that is, house 1 is opposite house n, house 3 is opposite house n - 2, house 5 is opposite house n - 4 and so on. [Image]\n\nVasya needs to get to house number a as quickly as possible. He starts driving from the beginning of the street and drives his car to house a. To get from the beginning of the street to houses number 1 and n, he spends exactly 1 second. He also spends exactly one second to drive the distance between two neighbouring houses. Vasya can park at any side of the road, so the distance between the beginning of the street at the houses that stand opposite one another should be considered the same.\n\nYour task is: find the minimum time Vasya needs to reach house a.\n\n\n-----Input-----\n\nThe first line of the input contains two integers, n and a (1 ≤ a ≤ n ≤ 100 000) — the number of houses on the street and the number of the house that Vasya needs to reach, correspondingly. It is guaranteed that number n is even.\n\n\n-----Output-----\n\nPrint a single integer — the minimum time Vasya needs to get from the beginning of the street to house a.\n\n\n-----Examples-----\nInput\n4 2\n\nOutput\n2\n\nInput\n8 5\n\nOutput\n3\n\n\n\n-----Note-----\n\nIn the first sample there are only four houses on the street, two houses at each side. House 2 will be the last at Vasya's right.\n\nThe second sample corresponds to picture with n = 8. House 5 is the one before last at Vasya's left.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::181", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-181-a7515d2c", "template_id": "apps::181", "text": "Vasya started working in a machine vision company of IT City. Vasya's team creates software and hardware for identification of people by their face.\n\nOne of the project's know-how is a camera rotating around its optical axis on shooting. People see an eye-catching gadget — a rotating camera — come up to it to see it better, look into it. And the camera takes their photo at that time. What could be better for high quality identification?\n\nBut not everything is so simple. The pictures from camera appear rotated too (on clockwise camera rotation frame the content becomes rotated counter-clockwise). But the identification algorithm can work only with faces that are just slightly deviated from vertical.\n\nVasya was entrusted to correct the situation — to rotate a captured image so that image would be minimally deviated from vertical. Requirements were severe. Firstly, the picture should be rotated only on angle divisible by 90 degrees to not lose a bit of information about the image. Secondly, the frames from the camera are so huge and FPS is so big that adequate rotation speed is provided by hardware FPGA solution only. And this solution can rotate only by 90 degrees clockwise. Of course, one can apply 90 degrees turn several times but for the sake of performance the number of turns should be minimized.\n\nHelp Vasya implement the program that by the given rotation angle of the camera can determine the minimum number of 90 degrees clockwise turns necessary to get a picture in which up direction deviation from vertical is minimum.\n\nThe next figure contains frames taken from an unrotated camera, then from rotated 90 degrees clockwise, then from rotated 90 degrees counter-clockwise. Arrows show direction to \"true up\". [Image]\n\nThe next figure shows 90 degrees clockwise turn by FPGA hardware. [Image]\n\n\n-----Input-----\n\nThe only line of the input contains one integer x ( - 10^18 ≤ x ≤ 10^18) — camera angle in degrees. Positive value denotes clockwise camera rotation, negative — counter-clockwise.\n\n\n-----Output-----\n\nOutput one integer — the minimum required number of 90 degrees clockwise turns.\n\n\n-----Examples-----\nInput\n60\n\nOutput\n1\n\nInput\n-60\n\nOutput\n3\n\n\n\n-----Note-----\n\nWhen the camera is rotated 60 degrees counter-clockwise (the second example), an image from it is rotated 60 degrees clockwise. One 90 degrees clockwise turn of the image result in 150 degrees clockwise total rotation and deviation from \"true up\" for one turn is 150 degrees. Two 90 degrees clockwise turns of the image result in 240 degrees clockwise total rotation and deviation from \"true up\" for two turns is 120 degrees because 240 degrees clockwise equal to 120 degrees counter-clockwise. Three 90 degrees clockwise turns of the image result in 330 degrees clockwise total rotation and deviation from \"true up\" for three turns is 30 degrees because 330 degrees clockwise equal to 30 degrees counter-clockwise.\n\nFrom 60, 150, 120 and 30 degrees deviations the smallest is 30, and it it achieved in three 90 degrees clockwise turns.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1839", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1839-755bbc17", "template_id": "apps::1839", "text": "City X consists of n vertical and n horizontal infinite roads, forming n × n intersections. Roads (both vertical and horizontal) are numbered from 1 to n, and the intersections are indicated by the numbers of the roads that form them.\n\nSand roads have long been recognized out of date, so the decision was made to asphalt them. To do this, a team of workers was hired and a schedule of work was made, according to which the intersections should be asphalted.\n\nRoad repairs are planned for n^2 days. On the i-th day of the team arrives at the i-th intersection in the list and if none of the two roads that form the intersection were already asphalted they asphalt both roads. Otherwise, the team leaves the intersection, without doing anything with the roads.\n\nAccording to the schedule of road works tell in which days at least one road will be asphalted.\n\n\n-----Input-----\n\nThe first line contains integer n (1 ≤ n ≤ 50) — the number of vertical and horizontal roads in the city.\n\nNext n^2 lines contain the order of intersections in the schedule. The i-th of them contains two numbers h_{i}, v_{i} (1 ≤ h_{i}, v_{i} ≤ n), separated by a space, and meaning that the intersection that goes i-th in the timetable is at the intersection of the h_{i}-th horizontal and v_{i}-th vertical roads. It is guaranteed that all the intersections in the timetable are distinct.\n\n\n-----Output-----\n\nIn the single line print the numbers of the days when road works will be in progress in ascending order. The days are numbered starting from 1.\n\n\n-----Examples-----\nInput\n2\n1 1\n1 2\n2 1\n2 2\n\nOutput\n1 4\n\nInput\n1\n1 1\n\nOutput\n1\n\n\n\n-----Note-----\n\nIn the sample the brigade acts like that: On the first day the brigade comes to the intersection of the 1-st horizontal and the 1-st vertical road. As none of them has been asphalted, the workers asphalt the 1-st vertical and the 1-st horizontal road; On the second day the brigade of the workers comes to the intersection of the 1-st horizontal and the 2-nd vertical road. The 2-nd vertical road hasn't been asphalted, but as the 1-st horizontal road has been asphalted on the first day, the workers leave and do not asphalt anything; On the third day the brigade of the workers come to the intersection of the 2-nd horizontal and the 1-st vertical road. The 2-nd horizontal road hasn't been asphalted but as the 1-st vertical road has been asphalted on the first day, the workers leave and do not asphalt anything; On the fourth day the brigade come to the intersection formed by the intersection of the 2-nd horizontal and 2-nd vertical road. As none of them has been asphalted, the workers asphalt the 2-nd vertical and the 2-nd horizontal road.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::693", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-693-f55b7083", "template_id": "apps::693", "text": "There is unrest in the Galactic Senate. Several thousand solar systems have declared their intentions to leave the Republic. Master Heidi needs to select the Jedi Knights who will go on peacekeeping missions throughout the galaxy. It is well-known that the success of any peacekeeping mission depends on the colors of the lightsabers of the Jedi who will go on that mission.\n\nHeidi has n Jedi Knights standing in front of her, each one with a lightsaber of one of m possible colors. She knows that for the mission to be the most effective, she needs to select some contiguous interval of knights such that there are exactly k_1 knights with lightsabers of the first color, k_2 knights with lightsabers of the second color, ..., k_{m} knights with lightsabers of the m-th color.\n\nHowever, since the last time, she has learned that it is not always possible to select such an interval. Therefore, she decided to ask some Jedi Knights to go on an indefinite unpaid vacation leave near certain pits on Tatooine, if you know what I mean. Help Heidi decide what is the minimum number of Jedi Knights that need to be let go before she is able to select the desired interval from the subsequence of remaining knights.\n\n\n-----Input-----\n\nThe first line of the input contains n (1 ≤ n ≤ 2·10^5) and m (1 ≤ m ≤ n). The second line contains n integers in the range {1, 2, ..., m} representing colors of the lightsabers of the subsequent Jedi Knights. The third line contains m integers k_1, k_2, ..., k_{m} (with $1 \\leq \\sum_{i = 1}^{m} k_{i} \\leq n$) – the desired counts of Jedi Knights with lightsabers of each color from 1 to m.\n\n\n-----Output-----\n\nOutput one number: the minimum number of Jedi Knights that need to be removed from the sequence so that, in what remains, there is an interval with the prescribed counts of lightsaber colors. If this is not possible, output - 1.\n\n\n-----Example-----\nInput\n8 3\n3 3 1 2 2 1 1 3\n3 1 1\n\nOutput\n1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::909", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-909-220cd2f0", "template_id": "apps::909", "text": "Petya studies in a school and he adores Maths. His class has been studying arithmetic expressions. On the last class the teacher wrote three positive integers a, b, c on the blackboard. The task was to insert signs of operations '+' and '*', and probably brackets between the numbers so that the value of the resulting expression is as large as possible. Let's consider an example: assume that the teacher wrote numbers 1, 2 and 3 on the blackboard. Here are some ways of placing signs and brackets: 1+2*3=7 1*(2+3)=5 1*2*3=6 (1+2)*3=9\n\nNote that you can insert operation signs only between a and b, and between b and c, that is, you cannot swap integers. For instance, in the given sample you cannot get expression (1+3)*2.\n\nIt's easy to see that the maximum value that you can obtain is 9.\n\nYour task is: given a, b and c print the maximum value that you can get.\n\n\n-----Input-----\n\nThe input contains three integers a, b and c, each on a single line (1 ≤ a, b, c ≤ 10).\n\n\n-----Output-----\n\nPrint the maximum value of the expression that you can obtain.\n\n\n-----Examples-----\nInput\n1\n2\n3\n\nOutput\n9\n\nInput\n2\n10\n3\n\nOutput\n60\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1335", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1335-ee37d092", "template_id": "apps::1335", "text": "Vasya likes taking part in Codeforces contests. When a round is over, Vasya follows all submissions in the system testing tab.\n\nThere are $n$ solutions, the $i$-th of them should be tested on $a_i$ tests, testing one solution on one test takes $1$ second. The solutions are judged in the order from $1$ to $n$. There are $k$ testing processes which test solutions simultaneously. Each of them can test at most one solution at a time.\n\nAt any time moment $t$ when some testing process is not judging any solution, it takes the first solution from the queue and tests it on each test in increasing order of the test ids. Let this solution have id $i$, then it is being tested on the first test from time moment $t$ till time moment $t + 1$, then on the second test till time moment $t + 2$ and so on. This solution is fully tested at time moment $t + a_i$, and after that the testing process immediately starts testing another solution.\n\nConsider some time moment, let there be exactly $m$ fully tested solutions by this moment. There is a caption \"System testing: $d$%\" on the page with solutions, where $d$ is calculated as\n\n$$d = round\\left(100\\cdot\\frac{m}{n}\\right),$$\n\nwhere $round(x) = \\lfloor{x + 0.5}\\rfloor$ is a function which maps every real to the nearest integer.\n\nVasya calls a submission interesting if there is a time moment (possibly, non-integer) when the solution is being tested on some test $q$, and the caption says \"System testing: $q$%\". Find the number of interesting solutions.\n\nPlease note that in case when multiple processes attempt to take the first submission from the queue at the same moment (for instance, at the initial moment), the order they take the solutions does not matter.\n\n\n-----Input-----\n\nThe first line contains two positive integers $n$ and $k$ ($1 \\le n \\le 1000$, $1 \\le k \\le 100$) standing for the number of submissions and the number of testing processes respectively.\n\nThe second line contains $n$ positive integers $a_1, a_2, \\ldots, a_n$ ($1 \\le a_i \\le 150$), where $a_i$ is equal to the number of tests the $i$-th submission is to be run on.\n\n\n-----Output-----\n\nOutput the only integer — the number of interesting submissions.\n\n\n-----Examples-----\nInput\n2 2\n49 100\n\nOutput\n1\n\nInput\n4 2\n32 100 33 1\n\nOutput\n2\n\nInput\n14 5\n48 19 6 9 50 20 3 42 38 43 36 21 44 6\n\nOutput\n5\n\n\n\n-----Note-----\n\nConsider the first example. At time moment $0$ both solutions start testing. At time moment $49$ the first solution is fully tested, so at time moment $49.5$ the second solution is being tested on the test $50$, and the caption says \"System testing: $50$%\" (because there is one fully tested solution out of two). So, the second solution is interesting.\n\nConsider the second example. At time moment $0$ the first and the second solutions start testing. At time moment $32$ the first solution is fully tested, the third solution starts testing, the caption says \"System testing: $25$%\". At time moment $32 + 24.5 = 56.5$ the third solutions is being tested on test $25$, the caption is still the same, thus this solution is interesting. After that the third solution is fully tested at time moment $32 + 33 = 65$, the fourth solution is fully tested at time moment $65 + 1 = 66$. The captions becomes \"System testing: $75$%\", and at time moment $74.5$ the second solution is being tested on test $75$. So, this solution is also interesting. Overall, there are two interesting solutions.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1692", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1692-a3b8201c", "template_id": "apps::1692", "text": "Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and went to ask some money from his parents. Meanwhile his little brother Yusuf came and started to press the keys randomly. Unfortunately Max has forgotten the number which he had calculated. The only thing he knows is that the number is divisible by 4.\n\nYou are given a string s consisting of digits (the number on the display of the calculator after Yusuf randomly pressed the keys). Your task is to find the number of substrings which are divisible by 4. A substring can start with a zero.\n\nA substring of a string is a nonempty sequence of consecutive characters.\n\nFor example if string s is 124 then we have four substrings that are divisible by 4: 12, 4, 24 and 124. For the string 04 the answer is three: 0, 4, 04.\n\nAs input/output can reach huge size it is recommended to use fast input/output methods: for example, prefer to use gets/scanf/printf instead of getline/cin/cout in C++, prefer to use BufferedReader/PrintWriter instead of Scanner/System.out in Java.\n\n\n-----Input-----\n\nThe only line contains string s (1 ≤ |s| ≤ 3·10^5). The string s contains only digits from 0 to 9.\n\n\n-----Output-----\n\nPrint integer a — the number of substrings of the string s that are divisible by 4.\n\nNote that the answer can be huge, so you should use 64-bit integer type to store it. In C++ you can use the long long integer type and in Java you can use long integer type.\n\n\n-----Examples-----\nInput\n124\n\nOutput\n4\n\nInput\n04\n\nOutput\n3\n\nInput\n5810438174\n\nOutput\n9\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1803", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1803-97684366", "template_id": "apps::1803", "text": "Shaass has decided to hunt some birds. There are n horizontal electricity wires aligned parallel to each other. Wires are numbered 1 to n from top to bottom. On each wire there are some oskols sitting next to each other. Oskol is the name of a delicious kind of birds in Shaass's territory. Supposed there are a_{i} oskols sitting on the i-th wire. $40$\n\nSometimes Shaass shots one of the birds and the bird dies (suppose that this bird sat at the i-th wire). Consequently all the birds on the i-th wire to the left of the dead bird get scared and jump up on the wire number i - 1, if there exists no upper wire they fly away. Also all the birds to the right of the dead bird jump down on wire number i + 1, if there exists no such wire they fly away.\n\nShaass has shot m birds. You're given the initial number of birds on each wire, tell him how many birds are sitting on each wire after the shots.\n\n\n-----Input-----\n\nThe first line of the input contains an integer n, (1 ≤ n ≤ 100). The next line contains a list of space-separated integers a_1, a_2, ..., a_{n}, (0 ≤ a_{i} ≤ 100).\n\nThe third line contains an integer m, (0 ≤ m ≤ 100). Each of the next m lines contains two integers x_{i} and y_{i}. The integers mean that for the i-th time Shaass shoot the y_{i}-th (from left) bird on the x_{i}-th wire, (1 ≤ x_{i} ≤ n, 1 ≤ y_{i}). It's guaranteed there will be at least y_{i} birds on the x_{i}-th wire at that moment.\n\n\n-----Output-----\n\nOn the i-th line of the output print the number of birds on the i-th wire.\n\n\n-----Examples-----\nInput\n5\n10 10 10 10 10\n5\n2 5\n3 13\n2 12\n1 13\n4 6\n\nOutput\n0\n12\n5\n0\n16\n\nInput\n3\n2 4 1\n1\n2 2\n\nOutput\n3\n0\n3\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1565", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1565-f97f3a85", "template_id": "apps::1565", "text": "Dima worked all day and wrote down on a long paper strip his favorite number $n$ consisting of $l$ digits. Unfortunately, the strip turned out to be so long that it didn't fit in the Dima's bookshelf.\n\nTo solve the issue, Dima decided to split the strip into two non-empty parts so that each of them contains a positive integer without leading zeros. After that he will compute the sum of the two integers and write it down on a new strip.\n\nDima wants the resulting integer to be as small as possible, because it increases the chances that the sum will fit it in the bookshelf. Help Dima decide what is the minimum sum he can obtain.\n\n\n-----Input-----\n\nThe first line contains a single integer $l$ ($2 \\le l \\le 100\\,000$) — the length of the Dima's favorite number.\n\nThe second line contains the positive integer $n$ initially written on the strip: the Dima's favorite number.\n\nThe integer $n$ consists of exactly $l$ digits and it does not contain leading zeros. Dima guarantees, that there is at least one valid way to split the strip.\n\n\n-----Output-----\n\nPrint a single integer — the smallest number Dima can obtain.\n\n\n-----Examples-----\nInput\n7\n1234567\n\nOutput\n1801\n\nInput\n3\n101\n\nOutput\n11\n\n\n\n-----Note-----\n\nIn the first example Dima can split the number $1234567$ into integers $1234$ and $567$. Their sum is $1801$.\n\nIn the second example Dima can split the number $101$ into integers $10$ and $1$. Their sum is $11$. Note that it is impossible to split the strip into \"1\" and \"01\" since the numbers can't start with zeros.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::156", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-156-02227ad2", "template_id": "apps::156", "text": "Today, Osama gave Fadi an integer $X$, and Fadi was wondering about the minimum possible value of $max(a, b)$ such that $LCM(a, b)$ equals $X$. Both $a$ and $b$ should be positive integers.\n\n$LCM(a, b)$ is the smallest positive integer that is divisible by both $a$ and $b$. For example, $LCM(6, 8) = 24$, $LCM(4, 12) = 12$, $LCM(2, 3) = 6$.\n\nOf course, Fadi immediately knew the answer. Can you be just like Fadi and find any such pair?\n\n\n-----Input-----\n\nThe first and only line contains an integer $X$ ($1 \\le X \\le 10^{12}$).\n\n\n-----Output-----\n\nPrint two positive integers, $a$ and $b$, such that the value of $max(a, b)$ is minimum possible and $LCM(a, b)$ equals $X$. If there are several possible such pairs, you can print any.\n\n\n-----Examples-----\nInput\n2\n\nOutput\n1 2\n\nInput\n6\n\nOutput\n2 3\n\nInput\n4\n\nOutput\n1 4\n\nInput\n1\n\nOutput\n1 1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1925", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1925-a98115e4", "template_id": "apps::1925", "text": "Given are integers A, B, and N.\nFind the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non-negative integer x not greater than N.\nHere floor(t) denotes the greatest integer not greater than the real number t.\n\n-----Constraints-----\n - 1 ≤ A ≤ 10^{6}\n - 1 ≤ B ≤ 10^{12}\n - 1 ≤ N ≤ 10^{12}\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nA B N\n\n-----Output-----\nPrint the maximum possible value of floor(Ax/B) - A × floor(x/B) for a non-negative integer x not greater than N, as an integer.\n\n-----Sample Input-----\n5 7 4\n\n-----Sample Output-----\n2\n\nWhen x=3, floor(Ax/B)-A×floor(x/B) = floor(15/7) - 5×floor(3/7) = 2. This is the maximum value possible.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2540", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-2540-e4b196f2", "template_id": "apps::2540", "text": "You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour.\n\nLet's call colour c dominating in the subtree of vertex v if there are no other colours that appear in the subtree of vertex v more times than colour c. So it's possible that two or more colours will be dominating in the subtree of some vertex.\n\nThe subtree of vertex v is the vertex v and all other vertices that contains vertex v in each path to the root.\n\nFor each vertex v find the sum of all dominating colours in the subtree of vertex v.\n\n\n-----Input-----\n\nThe first line contains integer n (1 ≤ n ≤ 10^5) — the number of vertices in the tree.\n\nThe second line contains n integers c_{i} (1 ≤ c_{i} ≤ n), c_{i} — the colour of the i-th vertex.\n\nEach of the next n - 1 lines contains two integers x_{j}, y_{j} (1 ≤ x_{j}, y_{j} ≤ n) — the edge of the tree. The first vertex is the root of the tree.\n\n\n-----Output-----\n\nPrint n integers — the sums of dominating colours for each vertex.\n\n\n-----Examples-----\nInput\n4\n1 2 3 4\n1 2\n2 3\n2 4\n\nOutput\n10 9 3 4\n\nInput\n15\n1 2 3 1 2 3 3 1 1 3 2 2 1 2 3\n1 2\n1 3\n1 4\n1 14\n1 15\n2 5\n2 6\n2 7\n3 8\n3 9\n3 10\n4 11\n4 12\n4 13\n\nOutput\n6 5 4 3 2 3 3 1 1 3 2 2 1 2 3\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1992", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1992-fb6b570a", "template_id": "apps::1992", "text": "Anya has bought a new smartphone that uses Berdroid operating system. The smartphone menu has exactly n applications, each application has its own icon. The icons are located on different screens, one screen contains k icons. The icons from the first to the k-th one are located on the first screen, from the (k + 1)-th to the 2k-th ones are on the second screen and so on (the last screen may be partially empty).\n\nInitially the smartphone menu is showing the screen number 1. To launch the application with the icon located on the screen t, Anya needs to make the following gestures: first she scrolls to the required screen number t, by making t - 1 gestures (if the icon is on the screen t), and then make another gesture — press the icon of the required application exactly once to launch it.\n\nAfter the application is launched, the menu returns to the first screen. That is, to launch the next application you need to scroll through the menu again starting from the screen number 1.\n\nAll applications are numbered from 1 to n. We know a certain order in which the icons of the applications are located in the menu at the beginning, but it changes as long as you use the operating system. Berdroid is intelligent system, so it changes the order of the icons by moving the more frequently used icons to the beginning of the list. Formally, right after an application is launched, Berdroid swaps the application icon and the icon of a preceding application (that is, the icon of an application on the position that is smaller by one in the order of menu). The preceding icon may possibly be located on the adjacent screen. The only exception is when the icon of the launched application already occupies the first place, in this case the icon arrangement doesn't change.\n\nAnya has planned the order in which she will launch applications. How many gestures should Anya make to launch the applications in the planned order?\n\nNote that one application may be launched multiple times.\n\n\n-----Input-----\n\nThe first line of the input contains three numbers n, m, k (1 ≤ n, m, k ≤ 10^5) — the number of applications that Anya has on her smartphone, the number of applications that will be launched and the number of icons that are located on the same screen.\n\nThe next line contains n integers, permutation a_1, a_2, ..., a_{n} — the initial order of icons from left to right in the menu (from the first to the last one), a_{i} —  is the id of the application, whose icon goes i-th in the menu. Each integer from 1 to n occurs exactly once among a_{i}.\n\nThe third line contains m integers b_1, b_2, ..., b_{m}(1 ≤ b_{i} ≤ n) — the ids of the launched applications in the planned order. One application may be launched multiple times.\n\n\n-----Output-----\n\nPrint a single number — the number of gestures that Anya needs to make to launch all the applications in the desired order.\n\n\n-----Examples-----\nInput\n8 3 3\n1 2 3 4 5 6 7 8\n7 8 1\n\nOutput\n7\n\nInput\n5 4 2\n3 1 5 2 4\n4 4 4 4\n\nOutput\n8\n\n\n\n-----Note-----\n\nIn the first test the initial configuration looks like (123)(456)(78), that is, the first screen contains icons of applications 1, 2, 3, the second screen contains icons 4, 5, 6, the third screen contains icons 7, 8.\n\nAfter application 7 is launched, we get the new arrangement of the icons — (123)(457)(68). To launch it Anya makes 3 gestures.\n\nAfter application 8 is launched, we get configuration (123)(457)(86). To launch it Anya makes 3 gestures.\n\nAfter application 1 is launched, the arrangement of icons in the menu doesn't change. To launch it Anya makes 1 gesture.\n\nIn total, Anya makes 7 gestures.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::718", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-718-742fdf9d", "template_id": "apps::718", "text": "Giga Tower is the tallest and deepest building in Cyberland. There are 17 777 777 777 floors, numbered from - 8 888 888 888 to 8 888 888 888. In particular, there is floor 0 between floor - 1 and floor 1. Every day, thousands of tourists come to this place to enjoy the wonderful view.\n\nIn Cyberland, it is believed that the number \"8\" is a lucky number (that's why Giga Tower has 8 888 888 888 floors above the ground), and, an integer is lucky, if and only if its decimal notation contains at least one digit \"8\". For example, 8, - 180, 808 are all lucky while 42, - 10 are not. In the Giga Tower, if you write code at a floor with lucky floor number, good luck will always be with you (Well, this round is #278, also lucky, huh?).\n\nTourist Henry goes to the tower to seek good luck. Now he is at the floor numbered a. He wants to find the minimum positive integer b, such that, if he walks b floors higher, he will arrive at a floor with a lucky number.\n\n\n-----Input-----\n\nThe only line of input contains an integer a ( - 10^9 ≤ a ≤ 10^9).\n\n\n-----Output-----\n\nPrint the minimum b in a line.\n\n\n-----Examples-----\nInput\n179\n\nOutput\n1\n\nInput\n-1\n\nOutput\n9\n\nInput\n18\n\nOutput\n10\n\n\n\n-----Note-----\n\nFor the first sample, he has to arrive at the floor numbered 180.\n\nFor the second sample, he will arrive at 8.\n\nNote that b should be positive, so the answer for the third sample is 10, not 0.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::535", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-535-57adfd7a", "template_id": "apps::535", "text": "Makoto has a big blackboard with a positive integer $n$ written on it. He will perform the following action exactly $k$ times:\n\nSuppose the number currently written on the blackboard is $v$. He will randomly pick one of the divisors of $v$ (possibly $1$ and $v$) and replace $v$ with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses $58$ as his generator seed, each divisor is guaranteed to be chosen with equal probability.\n\nHe now wonders what is the expected value of the number written on the blackboard after $k$ steps.\n\nIt can be shown that this value can be represented as $\\frac{P}{Q}$ where $P$ and $Q$ are coprime integers and $Q \\not\\equiv 0 \\pmod{10^9+7}$. Print the value of $P \\cdot Q^{-1}$ modulo $10^9+7$.\n\n\n-----Input-----\n\nThe only line of the input contains two integers $n$ and $k$ ($1 \\leq n \\leq 10^{15}$, $1 \\leq k \\leq 10^4$).\n\n\n-----Output-----\n\nPrint a single integer — the expected value of the number on the blackboard after $k$ steps as $P \\cdot Q^{-1} \\pmod{10^9+7}$ for $P$, $Q$ defined above.\n\n\n-----Examples-----\nInput\n6 1\n\nOutput\n3\n\nInput\n6 2\n\nOutput\n875000008\n\nInput\n60 5\n\nOutput\n237178099\n\n\n\n-----Note-----\n\nIn the first example, after one step, the number written on the blackboard is $1$, $2$, $3$ or $6$ — each occurring with equal probability. Hence, the answer is $\\frac{1+2+3+6}{4}=3$.\n\nIn the second example, the answer is equal to $1 \\cdot \\frac{9}{16}+2 \\cdot \\frac{3}{16}+3 \\cdot \\frac{3}{16}+6 \\cdot \\frac{1}{16}=\\frac{15}{8}$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::463", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-463-88994d52", "template_id": "apps::463", "text": "There is an array with n elements a_1, a_2, ..., a_{n} and the number x.\n\nIn one operation you can select some i (1 ≤ i ≤ n) and replace element a_{i} with a_{i} & x, where & denotes the bitwise and operation.\n\nYou want the array to have at least two equal elements after applying some operations (possibly, none). In other words, there should be at least two distinct indices i ≠ j such that a_{i} = a_{j}. Determine whether it is possible to achieve and, if possible, the minimal number of operations to apply.\n\n\n-----Input-----\n\nThe first line contains integers n and x (2 ≤ n ≤ 100 000, 1 ≤ x ≤ 100 000), number of elements in the array and the number to and with.\n\nThe second line contains n integers a_{i} (1 ≤ a_{i} ≤ 100 000), the elements of the array.\n\n\n-----Output-----\n\nPrint a single integer denoting the minimal number of operations to do, or -1, if it is impossible.\n\n\n-----Examples-----\nInput\n4 3\n1 2 3 7\n\nOutput\n1\n\nInput\n2 228\n1 1\n\nOutput\n0\n\nInput\n3 7\n1 2 3\n\nOutput\n-1\n\n\n\n-----Note-----\n\nIn the first example one can apply the operation to the last element of the array. That replaces 7 with 3, so we achieve the goal in one move.\n\nIn the second example the array already has two equal elements.\n\nIn the third example applying the operation won't change the array at all, so it is impossible to make some pair of elements equal.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1649", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1649-c17751b3", "template_id": "apps::1649", "text": "Snuke has four cookies with deliciousness A, B, C, and D. He will choose one or more from those cookies and eat them. Is it possible that the sum of the deliciousness of the eaten cookies is equal to that of the remaining cookies?\n\n-----Constraints-----\n - All values in input are integers.\n - 1 \\leq A,B,C,D \\leq 10^{8}\n\n-----Input-----\nInput is given from Standard Input in the following format:\nA B C D\n\n-----Output-----\nIf it is possible that the sum of the deliciousness of the eaten cookies is equal to that of the remaining cookies, print Yes; otherwise, print No.\n\n-----Sample Input-----\n1 3 2 4\n\n-----Sample Output-----\nYes\n\n - If he eats the cookies with deliciousness 1 and 4, the sum of the deliciousness of the eaten cookies will be equal to that of the remaining cookies.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1978", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1978-951bfb23", "template_id": "apps::1978", "text": "The main characters have been omitted to be short.\n\nYou are given a directed unweighted graph without loops with $n$ vertexes and a path in it (that path is not necessary simple) given by a sequence $p_1, p_2, \\ldots, p_m$ of $m$ vertexes; for each $1 \\leq i < m$ there is an arc from $p_i$ to $p_{i+1}$.\n\nDefine the sequence $v_1, v_2, \\ldots, v_k$ of $k$ vertexes as good, if $v$ is a subsequence of $p$, $v_1 = p_1$, $v_k = p_m$, and $p$ is one of the shortest paths passing through the vertexes $v_1$, $\\ldots$, $v_k$ in that order.\n\nA sequence $a$ is a subsequence of a sequence $b$ if $a$ can be obtained from $b$ by deletion of several (possibly, zero or all) elements. It is obvious that the sequence $p$ is good but your task is to find the shortest good subsequence.\n\nIf there are multiple shortest good subsequences, output any of them.\n\n\n\n\n-----Input-----\n\nThe first line contains a single integer $n$ ($2 \\le n \\le 100$) — the number of vertexes in a graph.\n\nThe next $n$ lines define the graph by an adjacency matrix: the $j$-th character in the $i$-st line is equal to $1$ if there is an arc from vertex $i$ to the vertex $j$ else it is equal to $0$. It is guaranteed that the graph doesn't contain loops.\n\nThe next line contains a single integer $m$ ($2 \\le m \\le 10^6$) — the number of vertexes in the path.\n\nThe next line contains $m$ integers $p_1, p_2, \\ldots, p_m$ ($1 \\le p_i \\le n$) — the sequence of vertexes in the path. It is guaranteed that for any $1 \\leq i < m$ there is an arc from $p_i$ to $p_{i+1}$.\n\n\n-----Output-----\n\nIn the first line output a single integer $k$ ($2 \\leq k \\leq m$) — the length of the shortest good subsequence. In the second line output $k$ integers $v_1$, $\\ldots$, $v_k$ ($1 \\leq v_i \\leq n$) — the vertexes in the subsequence. If there are multiple shortest subsequences, print any. Any two consecutive numbers should be distinct.\n\n\n-----Examples-----\nInput\n4\n0110\n0010\n0001\n1000\n4\n1 2 3 4\n\nOutput\n3\n1 2 4\nInput\n4\n0110\n0010\n1001\n1000\n20\n1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4\n\nOutput\n11\n1 2 4 2 4 2 4 2 4 2 4\nInput\n3\n011\n101\n110\n7\n1 2 3 1 3 2 1\n\nOutput\n7\n1 2 3 1 3 2 1\nInput\n4\n0110\n0001\n0001\n1000\n3\n1 2 4\n\nOutput\n2\n1 4\n\n\n-----Note-----\n\nBelow you can see the graph from the first example:\n\n[Image]\n\nThe given path is passing through vertexes $1$, $2$, $3$, $4$. The sequence $1-2-4$ is good because it is the subsequence of the given path, its first and the last elements are equal to the first and the last elements of the given path respectively, and the shortest path passing through vertexes $1$, $2$ and $4$ in that order is $1-2-3-4$. Note that subsequences $1-4$ and $1-3-4$ aren't good because in both cases the shortest path passing through the vertexes of these sequences is $1-3-4$.\n\nIn the third example, the graph is full so any sequence of vertexes in which any two consecutive elements are distinct defines a path consisting of the same number of vertexes.\n\nIn the fourth example, the paths $1-2-4$ and $1-3-4$ are the shortest paths passing through the vertexes $1$ and $4$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::931", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-931-a539aeb4", "template_id": "apps::931", "text": "Inna and Dima decided to surprise Sereja. They brought a really huge candy matrix, it's big even for Sereja! Let's number the rows of the giant matrix from 1 to n from top to bottom and the columns — from 1 to m, from left to right. We'll represent the cell on the intersection of the i-th row and j-th column as (i, j). Just as is expected, some cells of the giant candy matrix contain candies. Overall the matrix has p candies: the k-th candy is at cell (x_{k}, y_{k}).\n\nThe time moved closer to dinner and Inna was already going to eat p of her favourite sweets from the matrix, when suddenly Sereja (for the reason he didn't share with anyone) rotated the matrix x times clockwise by 90 degrees. Then he performed the horizontal rotate of the matrix y times. And then he rotated the matrix z times counterclockwise by 90 degrees. The figure below shows how the rotates of the matrix looks like. [Image]\n\nInna got really upset, but Duma suddenly understood two things: the candies didn't get damaged and he remembered which cells contained Inna's favourite sweets before Sereja's strange actions. Help guys to find the new coordinates in the candy matrix after the transformation Sereja made!\n\n\n-----Input-----\n\nThe first line of the input contains fix integers n, m, x, y, z, p (1 ≤ n, m ≤ 10^9; 0 ≤ x, y, z ≤ 10^9; 1 ≤ p ≤ 10^5).\n\nEach of the following p lines contains two integers x_{k}, y_{k} (1 ≤ x_{k} ≤ n; 1 ≤ y_{k} ≤ m) — the initial coordinates of the k-th candy. Two candies can lie on the same cell.\n\n\n-----Output-----\n\nFor each of the p candies, print on a single line its space-separated new coordinates.\n\n\n-----Examples-----\nInput\n3 3 3 1 1 9\n1 1\n1 2\n1 3\n2 1\n2 2\n2 3\n3 1\n3 2\n3 3\n\nOutput\n1 3\n1 2\n1 1\n2 3\n2 2\n2 1\n3 3\n3 2\n3 1\n\n\n\n-----Note-----\n\nJust for clarity. Horizontal rotating is like a mirroring of the matrix. For matrix:\n\nQWER REWQ\n\nASDF -> FDSA\n\nZXCV VCXZ\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::457", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-457-3c634358", "template_id": "apps::457", "text": "Let's introduce some definitions that will be needed later.\n\nLet $prime(x)$ be the set of prime divisors of $x$. For example, $prime(140) = \\{ 2, 5, 7 \\}$, $prime(169) = \\{ 13 \\}$.\n\nLet $g(x, p)$ be the maximum possible integer $p^k$ where $k$ is an integer such that $x$ is divisible by $p^k$. For example: $g(45, 3) = 9$ ($45$ is divisible by $3^2=9$ but not divisible by $3^3=27$), $g(63, 7) = 7$ ($63$ is divisible by $7^1=7$ but not divisible by $7^2=49$).\n\nLet $f(x, y)$ be the product of $g(y, p)$ for all $p$ in $prime(x)$. For example: $f(30, 70) = g(70, 2) \\cdot g(70, 3) \\cdot g(70, 5) = 2^1 \\cdot 3^0 \\cdot 5^1 = 10$, $f(525, 63) = g(63, 3) \\cdot g(63, 5) \\cdot g(63, 7) = 3^2 \\cdot 5^0 \\cdot 7^1 = 63$.\n\nYou have integers $x$ and $n$. Calculate $f(x, 1) \\cdot f(x, 2) \\cdot \\ldots \\cdot f(x, n) \\bmod{(10^{9} + 7)}$.\n\n\n-----Input-----\n\nThe only line contains integers $x$ and $n$ ($2 \\le x \\le 10^{9}$, $1 \\le n \\le 10^{18}$) — the numbers used in formula.\n\n\n-----Output-----\n\nPrint the answer.\n\n\n-----Examples-----\nInput\n10 2\n\nOutput\n2\n\nInput\n20190929 1605\n\nOutput\n363165664\n\nInput\n947 987654321987654321\n\nOutput\n593574252\n\n\n\n-----Note-----\n\nIn the first example, $f(10, 1) = g(1, 2) \\cdot g(1, 5) = 1$, $f(10, 2) = g(2, 2) \\cdot g(2, 5) = 2$.\n\nIn the second example, actual value of formula is approximately $1.597 \\cdot 10^{171}$. Make sure you print the answer modulo $(10^{9} + 7)$.\n\nIn the third example, be careful about overflow issue.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1845", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1845-aefc456c", "template_id": "apps::1845", "text": "One day Sasha visited the farmer 2D and his famous magnetic farm. On this farm, the crop grows due to the influence of a special magnetic field. Maintaining of the magnetic field is provided by $n$ machines, and the power of the $i$-th machine is $a_i$.\n\nThis year 2D decided to cultivate a new culture, but what exactly he didn't say. For the successful growth of the new culture, it is necessary to slightly change the powers of the machines. 2D can at most once choose an arbitrary integer $x$, then choose one machine and reduce the power of its machine by $x$ times, and at the same time increase the power of one another machine by $x$ times (powers of all the machines must stay positive integers). Note that he may not do that if he wants. More formally, 2D can choose two such indices $i$ and $j$, and one integer $x$ such that $x$ is a divisor of $a_i$, and change powers as following: $a_i = \\frac{a_i}{x}$, $a_j = a_j \\cdot x$\n\nSasha is very curious, that's why he wants to calculate the minimum total power the farmer can reach. There are too many machines, and Sasha can't cope with computations, help him!\n\n\n-----Input-----\n\nThe first line contains one integer $n$ ($2 \\le n \\le 5 \\cdot 10^4$) — the number of machines.\n\nThe second line contains $n$ integers $a_1, a_2, \\ldots, a_n$ ($1 \\le a_i \\le 100$) — the powers of the machines.\n\n\n-----Output-----\n\nPrint one integer — minimum total power.\n\n\n-----Examples-----\nInput\n5\n1 2 3 4 5\n\nOutput\n14\n\nInput\n4\n4 2 4 4\n\nOutput\n14\n\nInput\n5\n2 4 2 3 7\n\nOutput\n18\n\n\n\n-----Note-----\n\nIn the first example, the farmer can reduce the power of the $4$-th machine by $2$ times, and increase the power of the $1$-st machine by $2$ times, then the powers will be: $[2, 2, 3, 2, 5]$.\n\nIn the second example, the farmer can reduce the power of the $3$-rd machine by $2$ times, and increase the power of the $2$-nd machine by $2$ times. At the same time, the farmer can leave is be as it is and the total power won't change.\n\nIn the third example, it is optimal to leave it be as it is.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1643", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_interview", "task_id": "real::apps::apps-1643-dcbcf53f", "template_id": "apps::1643", "text": "The only difference between easy and hard versions is the length of the string. You can hack this problem if you solve it. But you can hack the previous problem only if you solve both problems.\n\nKirk has a binary string $s$ (a string which consists of zeroes and ones) of length $n$ and he is asking you to find a binary string $t$ of the same length which satisfies the following conditions: For any $l$ and $r$ ($1 \\leq l \\leq r \\leq n$) the length of the longest non-decreasing subsequence of the substring $s_{l}s_{l+1} \\ldots s_{r}$ is equal to the length of the longest non-decreasing subsequence of the substring $t_{l}t_{l+1} \\ldots t_{r}$; The number of zeroes in $t$ is the maximum possible.\n\nA non-decreasing subsequence of a string $p$ is a sequence of indices $i_1, i_2, \\ldots, i_k$ such that $i_1 < i_2 < \\ldots < i_k$ and $p_{i_1} \\leq p_{i_2} \\leq \\ldots \\leq p_{i_k}$. The length of the subsequence is $k$.\n\nIf there are multiple substrings which satisfy the conditions, output any.\n\n\n-----Input-----\n\nThe first line contains a binary string of length not more than $10^5$.\n\n\n-----Output-----\n\nOutput a binary string which satisfied the above conditions. If there are many such strings, output any of them.\n\n\n-----Examples-----\nInput\n110\n\nOutput\n010\n\nInput\n010\n\nOutput\n010\n\nInput\n0001111\n\nOutput\n0000000\n\nInput\n0111001100111011101000\n\nOutput\n0011001100001011101000\n\n\n\n-----Note-----\n\nIn the first example: For the substrings of the length $1$ the length of the longest non-decreasing subsequnce is $1$; For $l = 1, r = 2$ the longest non-decreasing subsequnce of the substring $s_{1}s_{2}$ is $11$ and the longest non-decreasing subsequnce of the substring $t_{1}t_{2}$ is $01$; For $l = 1, r = 3$ the longest non-decreasing subsequnce of the substring $s_{1}s_{3}$ is $11$ and the longest non-decreasing subsequnce of the substring $t_{1}t_{3}$ is $00$; For $l = 2, r = 3$ the longest non-decreasing subsequnce of the substring $s_{2}s_{3}$ is $1$ and the longest non-decreasing subsequnce of the substring $t_{2}t_{3}$ is $1$;\n\nThe second example is similar to the first one.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4606", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4606-c0aa9398", "template_id": "apps::4606", "text": "This contest, AtCoder Beginner Contest, is abbreviated as ABC.\nWhen we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.\nWhat is the abbreviation for the N-th round of ABC? Write a program to output the answer.\n\n-----Constraints-----\n - 100 ≤ N ≤ 999\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\n\n-----Output-----\nPrint the abbreviation for the N-th round of ABC.\n\n-----Sample Input-----\n100\n\n-----Sample Output-----\nABC100\n\nThe 100th round of ABC is ABC100.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4144", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4144-7e0cc58f", "template_id": "apps::4144", "text": "How many integer sequences A_1,A_2,\\ldots,A_N of length N satisfy all of the following conditions?\n - 0 \\leq A_i \\leq 9\n - There exists some i such that A_i=0 holds.\n - There exists some i such that A_i=9 holds.\nThe answer can be very large, so output it modulo 10^9 + 7.\n\n-----Constraints-----\n - 1 \\leq N \\leq 10^6\n - N is an integer.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\n\n-----Output-----\nPrint the answer modulo 10^9 + 7.\n\n-----Sample Input-----\n2\n\n-----Sample Output-----\n2\n\nTwo sequences \\{0,9\\} and \\{9,0\\} satisfy all conditions.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4412", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4412-094e5be8", "template_id": "apps::4412", "text": "One important contest will take place on the most famous programming platform (Topforces) very soon!\n\nThe authors have a pool of $n$ problems and should choose at most three of them into this contest. The prettiness of the $i$-th problem is $a_i$. The authors have to compose the most pretty contest (in other words, the cumulative prettinesses of chosen problems should be maximum possible).\n\nBut there is one important thing in the contest preparation: because of some superstitions of authors, the prettinesses of problems cannot divide each other. In other words, if the prettinesses of chosen problems are $x, y, z$, then $x$ should be divisible by neither $y$, nor $z$, $y$ should be divisible by neither $x$, nor $z$ and $z$ should be divisible by neither $x$, nor $y$. If the prettinesses of chosen problems are $x$ and $y$ then neither $x$ should be divisible by $y$ nor $y$ should be divisible by $x$. Any contest composed from one problem is considered good.\n\nYour task is to find out the maximum possible total prettiness of the contest composed of at most three problems from the given pool.\n\nYou have to answer $q$ independent queries.\n\nIf you are Python programmer, consider using PyPy instead of Python when you submit your code.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $q$ ($1 \\le q \\le 2 \\cdot 10^5$) — the number of queries.\n\nThe first line of the query contains one integer $n$ ($1 \\le n \\le 2 \\cdot 10^5$) — the number of problems.\n\nThe second line of the query contains $n$ integers $a_1, a_2, \\dots, a_n$ ($2 \\le a_i \\le 2 \\cdot 10^5$), where $a_i$ is the prettiness of the $i$-th problem.\n\nIt is guaranteed that the sum of $n$ over all queries does not exceed $2 \\cdot 10^5$.\n\n\n-----Output-----\n\nFor each query print one integer — the maximum possible cumulative prettiness of the contest composed of at most three problems from the given pool of problems in the query.\n\n\n-----Example-----\nInput\n3\n4\n5 6 15 30\n4\n10 6 30 15\n3\n3 4 6\n\nOutput\n30\n31\n10\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4093", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4093-4c1d3994", "template_id": "apps::4093", "text": "You are given two integers $n$ and $m$. You have to construct the array $a$ of length $n$ consisting of non-negative integers (i.e. integers greater than or equal to zero) such that the sum of elements of this array is exactly $m$ and the value $\\sum\\limits_{i=1}^{n-1} |a_i - a_{i+1}|$ is the maximum possible. Recall that $|x|$ is the absolute value of $x$.\n\nIn other words, you have to maximize the sum of absolute differences between adjacent (consecutive) elements. For example, if the array $a=[1, 3, 2, 5, 5, 0]$ then the value above for this array is $|1-3| + |3-2| + |2-5| + |5-5| + |5-0| = 2 + 1 + 3 + 0 + 5 = 11$. Note that this example doesn't show the optimal answer but it shows how the required value for some array is calculated.\n\nYou have to answer $t$ independent test cases.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $t$ ($1 \\le t \\le 10^4$) — the number of test cases. Then $t$ test cases follow.\n\nThe only line of the test case contains two integers $n$ and $m$ ($1 \\le n, m \\le 10^9$) — the length of the array and its sum correspondingly.\n\n\n-----Output-----\n\nFor each test case, print the answer — the maximum possible value of $\\sum\\limits_{i=1}^{n-1} |a_i - a_{i+1}|$ for the array $a$ consisting of $n$ non-negative integers with the sum $m$.\n\n\n-----Example-----\nInput\n5\n1 100\n2 2\n5 5\n2 1000000000\n1000000000 1000000000\n\nOutput\n0\n2\n10\n1000000000\n2000000000\n\n\n\n-----Note-----\n\nIn the first test case of the example, the only possible array is $[100]$ and the answer is obviously $0$.\n\nIn the second test case of the example, one of the possible arrays is $[2, 0]$ and the answer is $|2-0| = 2$.\n\nIn the third test case of the example, one of the possible arrays is $[0, 2, 0, 3, 0]$ and the answer is $|0-2| + |2-0| + |0-3| + |3-0| = 10$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4576", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4576-c9b526a9", "template_id": "apps::4576", "text": "You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan).\nIn how many ways can we select some of these coins so that they are X yen in total?\nCoins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.\n\n-----Constraints-----\n - 0 \\leq A, B, C \\leq 50\n - A + B + C \\geq 1\n - 50 \\leq X \\leq 20 000\n - A, B and C are integers.\n - X is a multiple of 50.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nA\nB\nC\nX\n\n-----Output-----\nPrint the number of ways to select coins.\n\n-----Sample Input-----\n2\n2\n2\n100\n\n-----Sample Output-----\n2\n\nThere are two ways to satisfy the condition:\n - Select zero 500-yen coins, one 100-yen coin and zero 50-yen coins.\n - Select zero 500-yen coins, zero 100-yen coins and two 50-yen coins.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4609", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4609-c6a029ea", "template_id": "apps::4609", "text": "You are playing the following game with Joisino.\n - Initially, you have a blank sheet of paper.\n - Joisino announces a number. If that number is written on the sheet, erase the number from the sheet; if not, write the number on the sheet. This process is repeated N times.\n - Then, you are asked a question: How many numbers are written on the sheet now?\nThe numbers announced by Joisino are given as A_1, ... ,A_N in the order she announces them. How many numbers will be written on the sheet at the end of the game?\n\n-----Constraints-----\n - 1≤N≤100000\n - 1≤A_i≤1000000000(=10^9)\n - All input values are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\nA_1\n:\nA_N\n\n-----Output-----\nPrint how many numbers will be written on the sheet at the end of the game.\n\n-----Sample Input-----\n3\n6\n2\n6\n\n-----Sample Output-----\n1\n\nThe game proceeds as follows:\n - 6 is not written on the sheet, so write 6.\n - 2 is not written on the sheet, so write 2.\n - 6 is written on the sheet, so erase 6.\nThus, the sheet contains only 2 in the end. The answer is 1.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4200", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4200-e43bfc4b", "template_id": "apps::4200", "text": "We have held a popularity poll for N items on sale. Item i received A_i votes.\nFrom these N items, we will select M as popular items. However, we cannot select an item with less than \\dfrac{1}{4M} of the total number of votes.\nIf M popular items can be selected, print Yes; otherwise, print No.\n\n-----Constraints-----\n - 1 \\leq M \\leq N \\leq 100\n - 1 \\leq A_i \\leq 1000\n - A_i are distinct.\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN M\nA_1 ... A_N\n\n-----Output-----\nIf M popular items can be selected, print Yes; otherwise, print No.\n\n-----Sample Input-----\n4 1\n5 4 2 1\n\n-----Sample Output-----\nYes\n\nThere were 12 votes in total. The most popular item received 5 votes, and we can select it.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4030", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4030-9fb585e2", "template_id": "apps::4030", "text": "This is a hard version of the problem. The actual problems are different, but the easy version is almost a subtask of the hard version. Note that the constraints and the output format are different.\n\nYou are given a string $s$ consisting of $n$ lowercase Latin letters.\n\nYou have to color all its characters the minimum number of colors (each character to exactly one color, the same letters can be colored the same or different colors, i.e. you can choose exactly one color for each index in $s$).\n\nAfter coloring, you can swap any two neighboring characters of the string that are colored different colors. You can perform such an operation arbitrary (possibly, zero) number of times.\n\nThe goal is to make the string sorted, i.e. all characters should be in alphabetical order.\n\nYour task is to find the minimum number of colors which you have to color the given string in so that after coloring it can become sorted by some sequence of swaps. Note that you have to restore only coloring, not the sequence of swaps.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $n$ ($1 \\le n \\le 2 \\cdot 10^5$) — the length of $s$.\n\nThe second line of the input contains the string $s$ consisting of exactly $n$ lowercase Latin letters.\n\n\n-----Output-----\n\nIn the first line print one integer $res$ ($1 \\le res \\le n$) — the minimum number of colors in which you have to color the given string so that after coloring it can become sorted by some sequence of swaps.\n\nIn the second line print any possible coloring that can be used to sort the string using some sequence of swaps described in the problem statement. The coloring is the array $c$ of length $n$, where $1 \\le c_i \\le res$ and $c_i$ means the color of the $i$-th character.\n\n\n-----Examples-----\nInput\n9\nabacbecfd\n\nOutput\n2\n1 1 2 1 2 1 2 1 2\n\nInput\n8\naaabbcbb\n\nOutput\n2\n1 2 1 2 1 2 1 1\n\nInput\n7\nabcdedc\n\nOutput\n3\n1 1 1 1 1 2 3\n\nInput\n5\nabcde\n\nOutput\n1\n1 1 1 1 1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4033", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4033-9c1259e4", "template_id": "apps::4033", "text": "There is an infinite board of square tiles. Initially all tiles are white.\n\nVova has a red marker and a blue marker. Red marker can color $a$ tiles. Blue marker can color $b$ tiles. If some tile isn't white then you can't use marker of any color on it. Each marker must be drained completely, so at the end there should be exactly $a$ red tiles and exactly $b$ blue tiles across the board.\n\nVova wants to color such a set of tiles that:\n\n they would form a rectangle, consisting of exactly $a+b$ colored tiles; all tiles of at least one color would also form a rectangle.\n\nHere are some examples of correct colorings:\n\n [Image]\n\nHere are some examples of incorrect colorings:\n\n [Image]\n\nAmong all correct colorings Vova wants to choose the one with the minimal perimeter. What is the minimal perimeter Vova can obtain?\n\nIt is guaranteed that there exists at least one correct coloring.\n\n\n-----Input-----\n\nA single line contains two integers $a$ and $b$ ($1 \\le a, b \\le 10^{14}$) — the number of tiles red marker should color and the number of tiles blue marker should color, respectively.\n\n\n-----Output-----\n\nPrint a single integer — the minimal perimeter of a colored rectangle Vova can obtain by coloring exactly $a$ tiles red and exactly $b$ tiles blue.\n\nIt is guaranteed that there exists at least one correct coloring.\n\n\n-----Examples-----\nInput\n4 4\n\nOutput\n12\n\nInput\n3 9\n\nOutput\n14\n\nInput\n9 3\n\nOutput\n14\n\nInput\n3 6\n\nOutput\n12\n\nInput\n506 2708\n\nOutput\n3218\n\n\n\n-----Note-----\n\nThe first four examples correspond to the first picture of the statement.\n\nNote that for there exist multiple correct colorings for all of the examples.\n\nIn the first example you can also make a rectangle with sides $1$ and $8$, though its perimeter will be $18$ which is greater than $8$.\n\nIn the second example you can make the same resulting rectangle with sides $3$ and $4$, but red tiles will form the rectangle with sides $1$ and $3$ and blue tiles will form the rectangle with sides $3$ and $3$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4342", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4342-38281271", "template_id": "apps::4342", "text": "You are given an undirected tree of $n$ vertices.\n\nSome vertices are colored blue, some are colored red and some are uncolored. It is guaranteed that the tree contains at least one red vertex and at least one blue vertex.\n\nYou choose an edge and remove it from the tree. Tree falls apart into two connected components. Let's call an edge nice if neither of the resulting components contain vertices of both red and blue colors.\n\nHow many nice edges are there in the given tree?\n\n\n-----Input-----\n\nThe first line contains a single integer $n$ ($2 \\le n \\le 3 \\cdot 10^5$) — the number of vertices in the tree.\n\nThe second line contains $n$ integers $a_1, a_2, \\dots, a_n$ ($0 \\le a_i \\le 2$) — the colors of the vertices. $a_i = 1$ means that vertex $i$ is colored red, $a_i = 2$ means that vertex $i$ is colored blue and $a_i = 0$ means that vertex $i$ is uncolored.\n\nThe $i$-th of the next $n - 1$ lines contains two integers $v_i$ and $u_i$ ($1 \\le v_i, u_i \\le n$, $v_i \\ne u_i$) — the edges of the tree. It is guaranteed that the given edges form a tree. It is guaranteed that the tree contains at least one red vertex and at least one blue vertex.\n\n\n-----Output-----\n\nPrint a single integer — the number of nice edges in the given tree.\n\n\n-----Examples-----\nInput\n5\n2 0 0 1 2\n1 2\n2 3\n2 4\n2 5\n\nOutput\n1\n\nInput\n5\n1 0 0 0 2\n1 2\n2 3\n3 4\n4 5\n\nOutput\n4\n\nInput\n3\n1 1 2\n2 3\n1 3\n\nOutput\n0\n\n\n\n-----Note-----\n\nHere is the tree from the first example: [Image]\n\nThe only nice edge is edge $(2, 4)$. Removing it makes the tree fall apart into components $\\{4\\}$ and $\\{1, 2, 3, 5\\}$. The first component only includes a red vertex and the second component includes blue vertices and uncolored vertices.\n\nHere is the tree from the second example: [Image]\n\nEvery edge is nice in it.\n\nHere is the tree from the third example: [Image]\n\nEdge $(1, 3)$ splits the into components $\\{1\\}$ and $\\{3, 2\\}$, the latter one includes both red and blue vertex, thus the edge isn't nice. Edge $(2, 3)$ splits the into components $\\{1, 3\\}$ and $\\{2\\}$, the former one includes both red and blue vertex, thus the edge also isn't nice. So the answer is 0.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4157", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4157-31f19883", "template_id": "apps::4157", "text": "Polycarp likes to play with numbers. He takes some integer number $x$, writes it down on the board, and then performs with it $n - 1$ operations of the two kinds: divide the number $x$ by $3$ ($x$ must be divisible by $3$); multiply the number $x$ by $2$.\n\nAfter each operation, Polycarp writes down the result on the board and replaces $x$ by the result. So there will be $n$ numbers on the board after all.\n\nYou are given a sequence of length $n$ — the numbers that Polycarp wrote down. This sequence is given in arbitrary order, i.e. the order of the sequence can mismatch the order of the numbers written on the board.\n\nYour problem is to rearrange (reorder) elements of this sequence in such a way that it can match possible Polycarp's game in the order of the numbers written on the board. I.e. each next number will be exactly two times of the previous number or exactly one third of previous number.\n\nIt is guaranteed that the answer exists.\n\n\n-----Input-----\n\nThe first line of the input contatins an integer number $n$ ($2 \\le n \\le 100$) — the number of the elements in the sequence. The second line of the input contains $n$ integer numbers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 3 \\cdot 10^{18}$) — rearranged (reordered) sequence that Polycarp can wrote down on the board.\n\n\n-----Output-----\n\nPrint $n$ integer numbers — rearranged (reordered) input sequence that can be the sequence that Polycarp could write down on the board.\n\nIt is guaranteed that the answer exists.\n\n\n-----Examples-----\nInput\n6\n4 8 6 3 12 9\n\nOutput\n9 3 6 12 4 8\n\nInput\n4\n42 28 84 126\n\nOutput\n126 42 84 28\n\nInput\n2\n1000000000000000000 3000000000000000000\n\nOutput\n3000000000000000000 1000000000000000000\n\n\n\n-----Note-----\n\nIn the first example the given sequence can be rearranged in the following way: $[9, 3, 6, 12, 4, 8]$. It can match possible Polycarp's game which started with $x = 9$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4627", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4627-2d820fc2", "template_id": "apps::4627", "text": "We call two numbers $x$ and $y$ similar if they have the same parity (the same remainder when divided by $2$), or if $|x-y|=1$. For example, in each of the pairs $(2, 6)$, $(4, 3)$, $(11, 7)$, the numbers are similar to each other, and in the pairs $(1, 4)$, $(3, 12)$, they are not.\n\nYou are given an array $a$ of $n$ ($n$ is even) positive integers. Check if there is such a partition of the array into pairs that each element of the array belongs to exactly one pair and the numbers in each pair are similar to each other.\n\nFor example, for the array $a = [11, 14, 16, 12]$, there is a partition into pairs $(11, 12)$ and $(14, 16)$. The numbers in the first pair are similar because they differ by one, and in the second pair because they are both even.\n\n\n-----Input-----\n\nThe first line contains a single integer $t$ ($1 \\le t \\le 1000$) — the number of test cases. Then $t$ test cases follow.\n\nEach test case consists of two lines.\n\nThe first line contains an even positive integer $n$ ($2 \\le n \\le 50$) — length of array $a$.\n\nThe second line contains $n$ positive integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 100$).\n\n\n-----Output-----\n\nFor each test case print: YES if the such a partition exists, NO otherwise.\n\nThe letters in the words YES and NO can be displayed in any case.\n\n\n-----Example-----\nInput\n7\n4\n11 14 16 12\n2\n1 8\n4\n1 1 1 1\n4\n1 2 5 6\n2\n12 13\n6\n1 6 3 10 5 8\n6\n1 12 3 10 5 8\n\nOutput\nYES\nNO\nYES\nYES\nYES\nYES\nNO\n\n\n\n-----Note-----\n\nThe first test case was explained in the statement.\n\nIn the second test case, the two given numbers are not similar.\n\nIn the third test case, any partition is suitable.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4319", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4319-db7d09dd", "template_id": "apps::4319", "text": "Little girl Tanya climbs the stairs inside a multi-storey building. Every time Tanya climbs a stairway, she starts counting steps from $1$ to the number of steps in this stairway. She speaks every number aloud. For example, if she climbs two stairways, the first of which contains $3$ steps, and the second contains $4$ steps, she will pronounce the numbers $1, 2, 3, 1, 2, 3, 4$.\n\nYou are given all the numbers pronounced by Tanya. How many stairways did she climb? Also, output the number of steps in each stairway.\n\nThe given sequence will be a valid sequence that Tanya could have pronounced when climbing one or more stairways.\n\n\n-----Input-----\n\nThe first line contains $n$ ($1 \\le n \\le 1000$) — the total number of numbers pronounced by Tanya.\n\nThe second line contains integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 1000$) — all the numbers Tanya pronounced while climbing the stairs, in order from the first to the last pronounced number. Passing a stairway with $x$ steps, she will pronounce the numbers $1, 2, \\dots, x$ in that order.\n\nThe given sequence will be a valid sequence that Tanya could have pronounced when climbing one or more stairways.\n\n\n-----Output-----\n\nIn the first line, output $t$ — the number of stairways that Tanya climbed. In the second line, output $t$ numbers — the number of steps in each stairway she climbed. Write the numbers in the correct order of passage of the stairways.\n\n\n-----Examples-----\nInput\n7\n1 2 3 1 2 3 4\n\nOutput\n2\n3 4\nInput\n4\n1 1 1 1\n\nOutput\n4\n1 1 1 1\nInput\n5\n1 2 3 4 5\n\nOutput\n1\n5\nInput\n5\n1 2 1 2 1\n\nOutput\n3\n2 2 1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4213", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4213-aa4d1858", "template_id": "apps::4213", "text": "You are given an integer sequence A of length N.\nFind the maximum absolute difference of two elements (with different indices) in A.\n\n-----Constraints-----\n - 2 \\leq N \\leq 100\n - 1 \\leq A_i \\leq 10^9\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\nA_1 A_2 ... A_N\n\n-----Output-----\nPrint the maximum absolute difference of two elements (with different indices) in A.\n\n-----Sample Input-----\n4\n1 4 6 3\n\n-----Sample Output-----\n5\n\nThe maximum absolute difference of two elements is A_3-A_1=6-1=5.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4420", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4420-6211ca2b", "template_id": "apps::4420", "text": "You are given three integers $x, y$ and $n$. Your task is to find the maximum integer $k$ such that $0 \\le k \\le n$ that $k \\bmod x = y$, where $\\bmod$ is modulo operation. Many programming languages use percent operator % to implement it.\n\nIn other words, with given $x, y$ and $n$ you need to find the maximum possible integer from $0$ to $n$ that has the remainder $y$ modulo $x$.\n\nYou have to answer $t$ independent test cases. It is guaranteed that such $k$ exists for each test case.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $t$ ($1 \\le t \\le 5 \\cdot 10^4$) — the number of test cases. The next $t$ lines contain test cases.\n\nThe only line of the test case contains three integers $x, y$ and $n$ ($2 \\le x \\le 10^9;~ 0 \\le y < x;~ y \\le n \\le 10^9$).\n\nIt can be shown that such $k$ always exists under the given constraints.\n\n\n-----Output-----\n\nFor each test case, print the answer — maximum non-negative integer $k$ such that $0 \\le k \\le n$ and $k \\bmod x = y$. It is guaranteed that the answer always exists.\n\n\n-----Example-----\nInput\n7\n7 5 12345\n5 0 4\n10 5 15\n17 8 54321\n499999993 9 1000000000\n10 5 187\n2 0 999999999\n\nOutput\n12339\n0\n15\n54306\n999999995\n185\n999999998\n\n\n\n-----Note-----\n\nIn the first test case of the example, the answer is $12339 = 7 \\cdot 1762 + 5$ (thus, $12339 \\bmod 7 = 5$). It is obvious that there is no greater integer not exceeding $12345$ which has the remainder $5$ modulo $7$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4150", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4150-cd08ab9b", "template_id": "apps::4150", "text": "There are $n$ students standing in a row. Two coaches are forming two teams — the first coach chooses the first team and the second coach chooses the second team.\n\nThe $i$-th student has integer programming skill $a_i$. All programming skills are distinct and between $1$ and $n$, inclusive.\n\nFirstly, the first coach will choose the student with maximum programming skill among all students not taken into any team, and $k$ closest students to the left of him and $k$ closest students to the right of him (if there are less than $k$ students to the left or to the right, all of them will be chosen). All students that are chosen leave the row and join the first team. Secondly, the second coach will make the same move (but all students chosen by him join the second team). Then again the first coach will make such move, and so on. This repeats until the row becomes empty (i. e. the process ends when each student becomes to some team).\n\nYour problem is to determine which students will be taken into the first team and which students will be taken into the second team.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $k$ ($1 \\le k \\le n \\le 2 \\cdot 10^5$) — the number of students and the value determining the range of chosen students during each move, respectively.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le n$), where $a_i$ is the programming skill of the $i$-th student. It is guaranteed that all programming skills are distinct.\n\n\n-----Output-----\n\nPrint a string of $n$ characters; $i$-th character should be 1 if $i$-th student joins the first team, or 2 otherwise.\n\n\n-----Examples-----\nInput\n5 2\n2 4 5 3 1\n\nOutput\n11111\n\nInput\n5 1\n2 1 3 5 4\n\nOutput\n22111\n\nInput\n7 1\n7 2 1 3 5 4 6\n\nOutput\n1121122\n\nInput\n5 1\n2 4 5 3 1\n\nOutput\n21112\n\n\n\n-----Note-----\n\nIn the first example the first coach chooses the student on a position $3$, and the row becomes empty (all students join the first team).\n\nIn the second example the first coach chooses the student on position $4$, and the row becomes $[2, 1]$ (students with programming skills $[3, 4, 5]$ join the first team). Then the second coach chooses the student on position $1$, and the row becomes empty (and students with programming skills $[1, 2]$ join the second team).\n\nIn the third example the first coach chooses the student on position $1$, and the row becomes $[1, 3, 5, 4, 6]$ (students with programming skills $[2, 7]$ join the first team). Then the second coach chooses the student on position $5$, and the row becomes $[1, 3, 5]$ (students with programming skills $[4, 6]$ join the second team). Then the first coach chooses the student on position $3$, and the row becomes $[1]$ (students with programming skills $[3, 5]$ join the first team). And then the second coach chooses the remaining student (and the student with programming skill $1$ joins the second team).\n\nIn the fourth example the first coach chooses the student on position $3$, and the row becomes $[2, 1]$ (students with programming skills $[3, 4, 5]$ join the first team). Then the second coach chooses the student on position $1$, and the row becomes empty (and students with programming skills $[1, 2]$ join the second team).\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4401", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4401-7da9edc1", "template_id": "apps::4401", "text": "We have three boxes A, B, and C, each of which contains an integer.\n\nCurrently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.\n\nWe will now do the operations below in order. Find the content of each box afterward.\n - Swap the contents of the boxes A and B\n - Swap the contents of the boxes A and C\n\n-----Constraints-----\n - 1 \\leq X,Y,Z \\leq 100\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nX Y Z\n\n-----Output-----\nPrint the integers contained in the boxes A, B, and C, in this order, with space in between.\n\n-----Sample Input-----\n1 2 3\n\n-----Sample Output-----\n3 1 2\n\nAfter the contents of the boxes A and B are swapped, A, B, and C contain 2, 1, and 3, respectively.\n\nThen, after the contents of A and C are swapped, A, B, and C contain 3, 1, and 2, respectively.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4400", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4400-9f2fa8b6", "template_id": "apps::4400", "text": "We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is S, it means it was sunny on the i-th day; if that character is R, it means it was rainy on that day.\nFind the maximum number of consecutive rainy days in this period.\n\n-----Constraints-----\n - |S| = 3\n - Each character of S is S or R.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nS\n\n-----Output-----\nPrint the maximum number of consecutive rainy days in the period.\n\n-----Sample Input-----\nRRS\n\n-----Sample Output-----\n2\n\nWe had rain on the 1-st and 2-nd days in the period. Here, the maximum number of consecutive rainy days is 2, so we should print 2.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4148", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4148-d54c76c0", "template_id": "apps::4148", "text": "We have a string S consisting of uppercase English letters. Additionally, an integer N will be given.\nShift each character of S by N in alphabetical order (see below), and print the resulting string.\nWe assume that A follows Z. For example, shifting A by 2 results in C (A \\to B \\to C), and shifting Y by 3 results in B (Y \\to Z \\to A \\to B).\n\n-----Constraints-----\n - 0 \\leq N \\leq 26\n - 1 \\leq |S| \\leq 10^4\n - S consists of uppercase English letters.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\nS\n\n-----Output-----\nPrint the string resulting from shifting each character of S by N in alphabetical order.\n\n-----Sample Input-----\n2\nABCXYZ\n\n-----Sample Output-----\nCDEZAB\n\nNote that A follows Z.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4507", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4507-2e67b6ca", "template_id": "apps::4507", "text": "There are $n$ shovels in the nearby shop. The $i$-th shovel costs $a_i$ bourles.\n\nMisha has to buy exactly $k$ shovels. Each shovel can be bought no more than once.\n\nMisha can buy shovels by several purchases. During one purchase he can choose any subset of remaining (non-bought) shovels and buy this subset.\n\nThere are also $m$ special offers in the shop. The $j$-th of them is given as a pair $(x_j, y_j)$, and it means that if Misha buys exactly $x_j$ shovels during one purchase then $y_j$ most cheapest of them are for free (i.e. he will not pay for $y_j$ most cheapest shovels during the current purchase).\n\nMisha can use any offer any (possibly, zero) number of times, but he cannot use more than one offer during one purchase (but he can buy shovels without using any offers).\n\nYour task is to calculate the minimum cost of buying $k$ shovels, if Misha buys them optimally.\n\n\n-----Input-----\n\nThe first line of the input contains three integers $n, m$ and $k$ ($1 \\le n, m \\le 2 \\cdot 10^5, 1 \\le k \\le min(n, 2000)$) — the number of shovels in the shop, the number of special offers and the number of shovels Misha has to buy, correspondingly.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 2 \\cdot 10^5$), where $a_i$ is the cost of the $i$-th shovel.\n\nThe next $m$ lines contain special offers. The $j$-th of them is given as a pair of integers $(x_i, y_i)$ ($1 \\le y_i \\le x_i \\le n$) and means that if Misha buys exactly $x_i$ shovels during some purchase, then he can take $y_i$ most cheapest of them for free.\n\n\n-----Output-----\n\nPrint one integer — the minimum cost of buying $k$ shovels if Misha buys them optimally.\n\n\n-----Examples-----\nInput\n7 4 5\n2 5 4 2 6 3 1\n2 1\n6 5\n2 1\n3 1\n\nOutput\n7\n\nInput\n9 4 8\n6 8 5 1 8 1 1 2 1\n9 2\n8 4\n5 3\n9 7\n\nOutput\n17\n\nInput\n5 1 4\n2 5 7 4 6\n5 4\n\nOutput\n17\n\n\n\n-----Note-----\n\nIn the first example Misha can buy shovels on positions $1$ and $4$ (both with costs $2$) during the first purchase and get one of them for free using the first or the third special offer. And then he can buy shovels on positions $3$ and $6$ (with costs $4$ and $3$) during the second purchase and get the second one for free using the first or the third special offer. Then he can buy the shovel on a position $7$ with cost $1$. So the total cost is $4 + 2 + 1 = 7$.\n\nIn the second example Misha can buy shovels on positions $1$, $2$, $3$, $4$ and $8$ (costs are $6$, $8$, $5$, $1$ and $2$) and get three cheapest (with costs $5$, $1$ and $2$) for free. And then he can buy shovels on positions $6$, $7$ and $9$ (all with costs $1$) without using any special offers. So the total cost is $6 + 8 + 1 + 1 + 1 = 17$.\n\nIn the third example Misha can buy four cheapest shovels without using any special offers and get the total cost $17$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4687", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4687-fdbfb10e", "template_id": "apps::4687", "text": "There is an empty array.\nThe following N operations will be performed to insert integers into the array.\nIn the i-th operation (1≤i≤N), b_i copies of an integer a_i are inserted into the array.\nFind the K-th smallest integer in the array after the N operations.\nFor example, the 4-th smallest integer in the array \\{1,2,2,3,3,3\\} is 3.\n\n-----Constraints-----\n - 1≤N≤10^5\n - 1≤a_i,b_i≤10^5\n - 1≤K≤b_1…+…b_n\n - All input values are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN K\na_1 b_1\n:\na_N b_N\n\n-----Output-----\nPrint the K-th smallest integer in the array after the N operations.\n\n-----Sample Input-----\n3 4\n1 1\n2 2\n3 3\n\n-----Sample Output-----\n3\n\nThe resulting array is the same as the one in the problem statement.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4549", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4549-a94b9c5e", "template_id": "apps::4549", "text": "We have a canvas divided into a grid with H rows and W columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j).\n\nInitially, all the squares are white. square1001 wants to draw a picture with black paint. His specific objective is to make Square (i, j) black when s_{i, j}= #, and to make Square (i, j) white when s_{i, j}= ..\n\nHowever, since he is not a good painter, he can only choose two squares that are horizontally or vertically adjacent and paint those squares black, for some number of times (possibly zero). He may choose squares that are already painted black, in which case the color of those squares remain black.\n\nDetermine if square1001 can achieve his objective.\n\n-----Constraints-----\n - H is an integer between 1 and 50 (inclusive).\n - W is an integer between 1 and 50 (inclusive).\n - For every (i, j) (1 \\leq i \\leq H, 1 \\leq j \\leq W), s_{i, j} is # or ..\n\n-----Input-----\nInput is given from Standard Input in the following format:\nH W\ns_{1, 1} s_{1, 2} s_{1, 3} ... s_{1, W}\ns_{2, 1} s_{2, 2} s_{2, 3} ... s_{2, W}\n : :\ns_{H, 1} s_{H, 2} s_{H, 3} ... s_{H, W}\n\n-----Output-----\nIf square1001 can achieve his objective, print Yes; if he cannot, print No.\n\n-----Sample Input-----\n3 3\n.#.\n###\n.#.\n\n-----Sample Output-----\nYes\n\nOne possible way to achieve the objective is shown in the figure below. Here, the squares being painted are marked by stars.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4517", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4517-e5c47a89", "template_id": "apps::4517", "text": "You are given a rooted tree consisting of $n$ vertices numbered from $1$ to $n$. The root of the tree is a vertex number $1$.\n\nA tree is a connected undirected graph with $n-1$ edges.\n\nYou are given $m$ queries. The $i$-th query consists of the set of $k_i$ distinct vertices $v_i[1], v_i[2], \\dots, v_i[k_i]$. Your task is to say if there is a path from the root to some vertex $u$ such that each of the given $k$ vertices is either belongs to this path or has the distance $1$ to some vertex of this path.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $m$ ($2 \\le n \\le 2 \\cdot 10^5$, $1 \\le m \\le 2 \\cdot 10^5$) — the number of vertices in the tree and the number of queries.\n\nEach of the next $n-1$ lines describes an edge of the tree. Edge $i$ is denoted by two integers $u_i$ and $v_i$, the labels of vertices it connects $(1 \\le u_i, v_i \\le n, u_i \\ne v_i$).\n\nIt is guaranteed that the given edges form a tree.\n\nThe next $m$ lines describe queries. The $i$-th line describes the $i$-th query and starts with the integer $k_i$ ($1 \\le k_i \\le n$) — the number of vertices in the current query. Then $k_i$ integers follow: $v_i[1], v_i[2], \\dots, v_i[k_i]$ ($1 \\le v_i[j] \\le n$), where $v_i[j]$ is the $j$-th vertex of the $i$-th query.\n\nIt is guaranteed that all vertices in a single query are distinct.\n\nIt is guaranteed that the sum of $k_i$ does not exceed $2 \\cdot 10^5$ ($\\sum\\limits_{i=1}^{m} k_i \\le 2 \\cdot 10^5$).\n\n\n-----Output-----\n\nFor each query, print the answer — \"YES\", if there is a path from the root to some vertex $u$ such that each of the given $k$ vertices is either belongs to this path or has the distance $1$ to some vertex of this path and \"NO\" otherwise.\n\n\n-----Example-----\nInput\n10 6\n1 2\n1 3\n1 4\n2 5\n2 6\n3 7\n7 8\n7 9\n9 10\n4 3 8 9 10\n3 2 4 6\n3 2 1 5\n3 4 8 2\n2 6 10\n3 5 4 7\n\nOutput\nYES\nYES\nYES\nYES\nNO\nNO\n\n\n\n-----Note-----\n\nThe picture corresponding to the example:\n\n[Image]\n\nConsider the queries.\n\nThe first query is $[3, 8, 9, 10]$. The answer is \"YES\" as you can choose the path from the root $1$ to the vertex $u=10$. Then vertices $[3, 9, 10]$ belong to the path from $1$ to $10$ and the vertex $8$ has distance $1$ to the vertex $7$ which also belongs to this path.\n\nThe second query is $[2, 4, 6]$. The answer is \"YES\" as you can choose the path to the vertex $u=2$. Then the vertex $4$ has distance $1$ to the vertex $1$ which belongs to this path and the vertex $6$ has distance $1$ to the vertex $2$ which belongs to this path.\n\nThe third query is $[2, 1, 5]$. The answer is \"YES\" as you can choose the path to the vertex $u=5$ and all vertices of the query belong to this path.\n\nThe fourth query is $[4, 8, 2]$. The answer is \"YES\" as you can choose the path to the vertex $u=9$ so vertices $2$ and $4$ both have distance $1$ to the vertex $1$ which belongs to this path and the vertex $8$ has distance $1$ to the vertex $7$ which belongs to this path.\n\nThe fifth and the sixth queries both have answer \"NO\" because you cannot choose suitable vertex $u$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4428", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4428-35b7f30a", "template_id": "apps::4428", "text": "You are given an array $d_1, d_2, \\dots, d_n$ consisting of $n$ integer numbers.\n\nYour task is to split this array into three parts (some of which may be empty) in such a way that each element of the array belongs to exactly one of the three parts, and each of the parts forms a consecutive contiguous subsegment (possibly, empty) of the original array.\n\nLet the sum of elements of the first part be $sum_1$, the sum of elements of the second part be $sum_2$ and the sum of elements of the third part be $sum_3$. Among all possible ways to split the array you have to choose a way such that $sum_1 = sum_3$ and $sum_1$ is maximum possible.\n\nMore formally, if the first part of the array contains $a$ elements, the second part of the array contains $b$ elements and the third part contains $c$ elements, then:\n\n$$sum_1 = \\sum\\limits_{1 \\le i \\le a}d_i,$$ $$sum_2 = \\sum\\limits_{a + 1 \\le i \\le a + b}d_i,$$ $$sum_3 = \\sum\\limits_{a + b + 1 \\le i \\le a + b + c}d_i.$$\n\nThe sum of an empty array is $0$.\n\nYour task is to find a way to split the array such that $sum_1 = sum_3$ and $sum_1$ is maximum possible.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $n$ ($1 \\le n \\le 2 \\cdot 10^5$) — the number of elements in the array $d$.\n\nThe second line of the input contains $n$ integers $d_1, d_2, \\dots, d_n$ ($1 \\le d_i \\le 10^9$) — the elements of the array $d$.\n\n\n-----Output-----\n\nPrint a single integer — the maximum possible value of $sum_1$, considering that the condition $sum_1 = sum_3$ must be met.\n\nObviously, at least one valid way to split the array exists (use $a=c=0$ and $b=n$).\n\n\n-----Examples-----\nInput\n5\n1 3 1 1 4\n\nOutput\n5\n\nInput\n5\n1 3 2 1 4\n\nOutput\n4\n\nInput\n3\n4 1 2\n\nOutput\n0\n\n\n\n-----Note-----\n\nIn the first example there is only one possible splitting which maximizes $sum_1$: $[1, 3, 1], [~], [1, 4]$.\n\nIn the second example the only way to have $sum_1=4$ is: $[1, 3], [2, 1], [4]$.\n\nIn the third example there is only one way to split the array: $[~], [4, 1, 2], [~]$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4082", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "train", "task_family": "apps_introductory", "task_id": "real::apps::apps-4082-d81d853d", "template_id": "apps::4082", "text": "You are given an array $a$ consisting of $n$ integers.\n\nYou can remove at most one element from this array. Thus, the final length of the array is $n-1$ or $n$.\n\nYour task is to calculate the maximum possible length of the strictly increasing contiguous subarray of the remaining array.\n\nRecall that the contiguous subarray $a$ with indices from $l$ to $r$ is $a[l \\dots r] = a_l, a_{l + 1}, \\dots, a_r$. The subarray $a[l \\dots r]$ is called strictly increasing if $a_l < a_{l+1} < \\dots < a_r$.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $n$ ($2 \\le n \\le 2 \\cdot 10^5$) — the number of elements in $a$.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 10^9$), where $a_i$ is the $i$-th element of $a$.\n\n\n-----Output-----\n\nPrint one integer — the maximum possible length of the strictly increasing contiguous subarray of the array $a$ after removing at most one element.\n\n\n-----Examples-----\nInput\n5\n1 2 5 3 4\n\nOutput\n4\n\nInput\n2\n1 2\n\nOutput\n2\n\nInput\n7\n6 5 4 3 2 4 3\n\nOutput\n2\n\n\n\n-----Note-----\n\nIn the first example, you can delete $a_3=5$. Then the resulting array will be equal to $[1, 2, 3, 4]$ and the length of its largest increasing subarray will be equal to $4$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-4", "template_id": "humaneval::HumanEval/4", "text": "from typing import List\n\n\ndef mean_absolute_deviation(numbers: List[float]) -> float:\n \"\"\" For a given list of input numbers, calculate Mean Absolute Deviation\n around the mean of this dataset.\n Mean Absolute Deviation is the average absolute difference between each\n element and a centerpoint (mean in this case):\n MAD = average | x - x_mean |\n >>> mean_absolute_deviation([1.0, 2.0, 3.0, 4.0])\n 1.0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/12", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-12", "template_id": "humaneval::HumanEval/12", "text": "from typing import List, Optional\n\n\ndef longest(strings: List[str]) -> Optional[str]:\n \"\"\" Out of list of strings, return the longest one. Return the first one in case of multiple\n strings of the same length. Return None in case the input list is empty.\n >>> longest([])\n\n >>> longest(['a', 'b', 'c'])\n 'a'\n >>> longest(['a', 'bb', 'ccc'])\n 'ccc'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/13", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-13", "template_id": "humaneval::HumanEval/13", "text": "def greatest_common_divisor(a: int, b: int) -> int:\n \"\"\" Return a greatest common divisor of two integers a and b\n >>> greatest_common_divisor(3, 5)\n 1\n >>> greatest_common_divisor(25, 15)\n 5\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/19", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-19", "template_id": "humaneval::HumanEval/19", "text": "from typing import List\n\n\ndef sort_numbers(numbers: str) -> str:\n \"\"\" Input is a space-delimited string of numberals from 'zero' to 'nine'.\n Valid choices are 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight' and 'nine'.\n Return the string with numbers sorted from smallest to largest\n >>> sort_numbers('three one five')\n 'one three five'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/24", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-24", "template_id": "humaneval::HumanEval/24", "text": "def largest_divisor(n: int) -> int:\n \"\"\" For a given number n, find the largest number that divides n evenly, smaller than n\n >>> largest_divisor(15)\n 5\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/45", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-45", "template_id": "humaneval::HumanEval/45", "text": "def triangle_area(a, h):\n \"\"\"Given length of a side and high return area for a triangle.\n >>> triangle_area(5, 3)\n 7.5\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/46", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-46", "template_id": "humaneval::HumanEval/46", "text": "def fib4(n: int):\n \"\"\"The Fib4 number sequence is a sequence similar to the Fibbonacci sequnece that's defined as follows:\n fib4(0) -> 0\n fib4(1) -> 0\n fib4(2) -> 2\n fib4(3) -> 0\n fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).\n Please write a function to efficiently compute the n-th element of the fib4 number sequence. Do not use recursion.\n >>> fib4(5)\n 4\n >>> fib4(6)\n 8\n >>> fib4(7)\n 14\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/53", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-53", "template_id": "humaneval::HumanEval/53", "text": "def add(x: int, y: int):\n \"\"\"Add two numbers x and y\n >>> add(2, 3)\n 5\n >>> add(5, 7)\n 12\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/68", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-68", "template_id": "humaneval::HumanEval/68", "text": "def pluck(arr):\n \"\"\"\n \"Given an array representing a branch of a tree that has non-negative integer nodes\n your task is to pluck one of the nodes and return it.\n The plucked node should be the node with the smallest even value.\n If multiple nodes with the same smallest even value are found return the node that has smallest index.\n\n The plucked node should be returned in a list, [ smalest_value, its index ],\n If there are no even values or the given array is empty, return [].\n\n Example 1:\n Input: [4,2,3]\n Output: [2, 1]\n Explanation: 2 has the smallest even value, and 2 has the smallest index.\n\n Example 2:\n Input: [1,2,3]\n Output: [2, 1]\n Explanation: 2 has the smallest even value, and 2 has the smallest index.\n\n Example 3:\n Input: []\n Output: []\n\n Example 4:\n Input: [5, 0, 3, 0, 4, 2]\n Output: [0, 1]\n Explanation: 0 is the smallest value, but there are two zeros,\n so we will choose the first zero, which has the smallest index.\n\n Constraints:\n * 1 <= nodes.length <= 10000\n * 0 <= node.value\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/71", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-71", "template_id": "humaneval::HumanEval/71", "text": "def triangle_area(a, b, c):\n '''\n Given the lengths of the three sides of a triangle. Return the area of\n the triangle rounded to 2 decimal points if the three sides form a valid triangle.\n Otherwise return -1\n Three sides make a valid triangle when the sum of any two sides is greater\n than the third side.\n Example:\n triangle_area(3, 4, 5) == 6.00\n triangle_area(1, 2, 10) == -1\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/82", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-82", "template_id": "humaneval::HumanEval/82", "text": "def prime_length(string):\n \"\"\"Write a function that takes a string and returns True if the string\n length is a prime number or False otherwise\n Examples\n prime_length('Hello') == True\n prime_length('abcdcba') == True\n prime_length('kittens') == True\n prime_length('orange') == False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/86", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-86", "template_id": "humaneval::HumanEval/86", "text": "def anti_shuffle(s):\n \"\"\"\n Write a function that takes a string and returns an ordered version of it.\n Ordered version of string, is a string where all words (separated by space)\n are replaced by a new word where all the characters arranged in\n ascending order based on ascii value.\n Note: You should keep the order of words and blank spaces in the sentence.\n\n For example:\n anti_shuffle('Hi') returns 'Hi'\n anti_shuffle('hello') returns 'ehllo'\n anti_shuffle('Hello World!!!') returns 'Hello !!!Wdlor'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/89", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-89", "template_id": "humaneval::HumanEval/89", "text": "def encrypt(s):\n \"\"\"Create a function encrypt that takes a string as an argument and\n returns a string encrypted with the alphabet being rotated.\n The alphabet should be rotated in a manner such that the letters\n shift down by two multiplied to two places.\n For example:\n encrypt('hi') returns 'lm'\n encrypt('asdfghjkl') returns 'ewhjklnop'\n encrypt('gf') returns 'kj'\n encrypt('et') returns 'ix'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/95", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-95", "template_id": "humaneval::HumanEval/95", "text": "def check_dict_case(dict):\n \"\"\"\n Given a dictionary, return True if all keys are strings in lower\n case or all keys are strings in upper case, else return False.\n The function should return False is the given dictionary is empty.\n Examples:\n check_dict_case({\"a\":\"apple\", \"b\":\"banana\"}) should return True.\n check_dict_case({\"a\":\"apple\", \"A\":\"banana\", \"B\":\"banana\"}) should return False.\n check_dict_case({\"a\":\"apple\", 8:\"banana\", \"a\":\"apple\"}) should return False.\n check_dict_case({\"Name\":\"John\", \"Age\":\"36\", \"City\":\"Houston\"}) should return False.\n check_dict_case({\"STATE\":\"NC\", \"ZIP\":\"12345\" }) should return True.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/98", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-98", "template_id": "humaneval::HumanEval/98", "text": "def count_upper(s):\n \"\"\"\n Given a string s, count the number of uppercase vowels in even indices.\n\n For example:\n count_upper('aBCdEf') returns 1\n count_upper('abcdefg') returns 0\n count_upper('dBBE') returns 0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/99", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-99", "template_id": "humaneval::HumanEval/99", "text": "def closest_integer(value):\n '''\n Create a function that takes a value (string) representing a number\n and returns the closest integer to it. If the number is equidistant\n from two integers, round it away from zero.\n\n Examples\n >>> closest_integer(\"10\")\n 10\n >>> closest_integer(\"15.3\")\n 15\n\n Note:\n Rounding away from zero means that if the given number is equidistant\n from two integers, the one you should return is the one that is the\n farthest from zero. For example closest_integer(\"14.5\") should\n return 15 and closest_integer(\"-14.5\") should return -15.\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/105", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-105", "template_id": "humaneval::HumanEval/105", "text": "def by_length(arr):\n \"\"\"\n Given an array of integers, sort the integers that are between 1 and 9 inclusive,\n reverse the resulting array, and then replace each digit by its corresponding name from\n \"One\", \"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\".\n\n For example:\n arr = [2, 1, 1, 4, 5, 8, 2, 3]\n -> sort arr -> [1, 1, 2, 2, 3, 4, 5, 8]\n -> reverse arr -> [8, 5, 4, 3, 2, 2, 1, 1]\n return [\"Eight\", \"Five\", \"Four\", \"Three\", \"Two\", \"Two\", \"One\", \"One\"]\n\n If the array is empty, return an empty array:\n arr = []\n return []\n\n If the array has any strange number ignore it:\n arr = [1, -1 , 55]\n -> sort arr -> [-1, 1, 55]\n -> reverse arr -> [55, 1, -1]\n return = ['One']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/112", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-112", "template_id": "humaneval::HumanEval/112", "text": "def reverse_delete(s,c):\n \"\"\"Task\n We are given two strings s and c, you have to deleted all the characters in s that are equal to any character in c\n then check if the result string is palindrome.\n A string is called palindrome if it reads the same backward as forward.\n You should return a tuple containing the result string and True/False for the check.\n Example\n For s = \"abcde\", c = \"ae\", the result should be ('bcd',False)\n For s = \"abcdef\", c = \"b\" the result should be ('acdef',False)\n For s = \"abcdedcba\", c = \"ab\", the result should be ('cdedc',True)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/124", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-124", "template_id": "humaneval::HumanEval/124", "text": "def valid_date(date):\n \"\"\"You have to write a function which validates a given date string and\n returns True if the date is valid otherwise False.\n The date is valid if all of the following rules are satisfied:\n 1. The date string is not empty.\n 2. The number of days is not less than 1 or higher than 31 days for months 1,3,5,7,8,10,12. And the number of days is not less than 1 or higher than 30 days for months 4,6,9,11. And, the number of days is not less than 1 or higher than 29 for the month 2.\n 3. The months should not be less than 1 or higher than 12.\n 4. The date should be in the format: mm-dd-yyyy\n\n for example:\n valid_date('03-11-2000') => True\n\n valid_date('15-01-2012') => False\n\n valid_date('04-0-2040') => False\n\n valid_date('06-04-2020') => True\n\n valid_date('06/04/2020') => False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/126", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-126", "template_id": "humaneval::HumanEval/126", "text": "def is_sorted(lst):\n '''\n Given a list of numbers, return whether or not they are sorted\n in ascending order. If list has more than 1 duplicate of the same\n number, return False. Assume no negative numbers and only integers.\n\n Examples\n is_sorted([5]) ➞ True\n is_sorted([1, 2, 3, 4, 5]) ➞ True\n is_sorted([1, 3, 2, 4, 5]) ➞ False\n is_sorted([1, 2, 3, 4, 5, 6]) ➞ True\n is_sorted([1, 2, 3, 4, 5, 6, 7]) ➞ True\n is_sorted([1, 3, 2, 4, 5, 6, 7]) ➞ False\n is_sorted([1, 2, 2, 3, 3, 4]) ➞ True\n is_sorted([1, 2, 2, 2, 3, 4]) ➞ False\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/129", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-129", "template_id": "humaneval::HumanEval/129", "text": "def minPath(grid, k):\n \"\"\"\n Given a grid with N rows and N columns (N >= 2) and a positive integer k,\n each cell of the grid contains a value. Every integer in the range [1, N * N]\n inclusive appears exactly once on the cells of the grid.\n\n You have to find the minimum path of length k in the grid. You can start\n from any cell, and in each step you can move to any of the neighbor cells,\n in other words, you can go to cells which share an edge with you current\n cell.\n Please note that a path of length k means visiting exactly k cells (not\n necessarily distinct).\n You CANNOT go off the grid.\n A path A (of length k) is considered less than a path B (of length k) if\n after making the ordered lists of the values on the cells that A and B go\n through (let's call them lst_A and lst_B), lst_A is lexicographically less\n than lst_B, in other words, there exist an integer index i (1 <= i <= k)\n such that lst_A[i] < lst_B[i] and for any j (1 <= j < i) we have\n lst_A[j] = lst_B[j].\n It is guaranteed that the answer is unique.\n Return an ordered list of the values on the cells that the minimum path go through.\n\n Examples:\n\n Input: grid = [ [1,2,3], [4,5,6], [7,8,9]], k = 3\n Output: [1, 2, 1]\n\n Input: grid = [ [5,9,3], [4,1,6], [7,8,2]], k = 1\n Output: [1]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/145", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-145", "template_id": "humaneval::HumanEval/145", "text": "def order_by_points(nums):\n \"\"\"\n Write a function which sorts the given list of integers\n in ascending order according to the sum of their digits.\n Note: if there are several items with similar sum of their digits,\n order them based on their index in original list.\n\n For example:\n >>> order_by_points([1, 11, -1, -11, -12]) == [-1, -11, 1, -12, 11]\n >>> order_by_points([]) == []\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/154", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-154", "template_id": "humaneval::HumanEval/154", "text": "def cycpattern_check(a , b):\n \"\"\"You are given 2 words. You need to return True if the second word or any of its rotations is a substring in the first word\n cycpattern_check(\"abcd\",\"abd\") => False\n cycpattern_check(\"hello\",\"ell\") => True\n cycpattern_check(\"whassup\",\"psus\") => False\n cycpattern_check(\"abab\",\"baa\") => True\n cycpattern_check(\"efef\",\"eeff\") => False\n cycpattern_check(\"himenss\",\"simen\") => True\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/155", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-155", "template_id": "humaneval::HumanEval/155", "text": "def even_odd_count(num):\n \"\"\"Given an integer. return a tuple that has the number of even and odd digits respectively.\n\n Example:\n even_odd_count(-12) ==> (1, 1)\n even_odd_count(123) ==> (1, 2)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/157", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "val", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-157", "template_id": "humaneval::HumanEval/157", "text": "def right_angle_triangle(a, b, c):\n '''\n Given the lengths of the three sides of a triangle. Return True if the three\n sides form a right-angled triangle, False otherwise.\n A right-angled triangle is a triangle in which one angle is right angle or\n 90 degree.\n Example:\n right_angle_triangle(3, 4, 5) == True\n right_angle_triangle(1, 2, 3) == False\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::2", "template_id": "mbpp::2", "text": "Write a function to find the similar elements from the given two tuple lists.\n\nYour function must be named `similar_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::4", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::4", "template_id": "mbpp::4", "text": "Write a function to find the largest integers from a given list of numbers using heap queue algorithm.\n\nYour function must be named `heap_queue_largest`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::13", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::13", "template_id": "mbpp::13", "text": "Write a function to count the most common words in a dictionary.\n\nYour function must be named `count_common`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::19", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::19", "template_id": "mbpp::19", "text": "Write a function to find whether a given array of integers contains any duplicate element.\n\nYour function must be named `test_duplicate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::26", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::26", "template_id": "mbpp::26", "text": "Write a function to check if the given tuple list has all k elements.\n\nYour function must be named `check_k_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::31", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::31", "template_id": "mbpp::31", "text": "Write a function to find the top k integers that occur most frequently from given lists of sorted and distinct integers using heap queue algorithm.\n\nYour function must be named `func`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::58", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::58", "template_id": "mbpp::58", "text": "Write a python function to check whether the given two integers have opposite sign or not.\n\nYour function must be named `opposite_Signs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::69", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::69", "template_id": "mbpp::69", "text": "Write a function to check whether a list contains the given sublist or not.\n\nYour function must be named `is_sublist`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::70", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::70", "template_id": "mbpp::70", "text": "Write a function to find whether all the given tuples have equal length or not.\n\nYour function must be named `find_equal_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::75", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::75", "template_id": "mbpp::75", "text": "Write a function to find tuples which have all elements divisible by k from the given list of tuples.\n\nYour function must be named `find_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::94", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::94", "template_id": "mbpp::94", "text": "Write a function to extract the index minimum value record from the given tuples.\n\nYour function must be named `index_minimum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::96", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::96", "template_id": "mbpp::96", "text": "Write a python function to find the number of divisors of a given integer.\n\nYour function must be named `divisor`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::100", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::100", "template_id": "mbpp::100", "text": "Write a function to find the next smallest palindrome of a specified number.\n\nYour function must be named `next_smallest_palindrome`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::106", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::106", "template_id": "mbpp::106", "text": "Write a function to add the given list to the given tuples.\n\nYour function must be named `add_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::110", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::110", "template_id": "mbpp::110", "text": "Write a function to extract the ranges that are missing from the given list with the given start range and end range values.\n\nYour function must be named `extract_missing`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::114", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::114", "template_id": "mbpp::114", "text": "Write a function to assign frequency to each tuple in the given tuple list.\n\nYour function must be named `assign_freq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::137", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::137", "template_id": "mbpp::137", "text": "Write a function to find the ration of zeroes in an array of integers.\n\nYour function must be named `zero_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::146", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::146", "template_id": "mbpp::146", "text": "Write a function to find the ascii value of total characters in a string.\n\nYour function must be named `ascii_value_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::171", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::171", "template_id": "mbpp::171", "text": "Write a function to find the perimeter of a pentagon.\n\nYour function must be named `perimeter_pentagon`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::172", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::172", "template_id": "mbpp::172", "text": "Write a function to find the occurence of characters 'std' in the given string 1. list item 1. list item 1. list item 2. list item 2. list item 2. list item\n\nYour function must be named `count_occurance`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::173", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::173", "template_id": "mbpp::173", "text": "Write a function to remove everything except alphanumeric characters from a string.\n\nYour function must be named `remove_splchar`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::174", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::174", "template_id": "mbpp::174", "text": "Write a function to group a sequence of key-value pairs into a dictionary of lists.\n\nYour function must be named `group_keyvalue`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::181", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::181", "template_id": "mbpp::181", "text": "Write a function to find the longest common prefix in the given set of strings.\n\nYour function must be named `common_prefix_util`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::186", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::186", "template_id": "mbpp::186", "text": "Write a function to search some literals strings in a string by using regex.\n\nYour function must be named `check_literals`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::193", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::193", "template_id": "mbpp::193", "text": "Write a function to remove the duplicates from the given tuple.\n\nYour function must be named `remove_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::194", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::194", "template_id": "mbpp::194", "text": "Write a python function to convert octal number to decimal number.\n\nYour function must be named `octal_To_Decimal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::198", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::198", "template_id": "mbpp::198", "text": "Write a function to find the largest triangle that can be inscribed in an ellipse.\n\nYour function must be named `largest_triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::200", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::200", "template_id": "mbpp::200", "text": "Write a function to find all index positions of the maximum values in a given list.\n\nYour function must be named `position_max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::207", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::207", "template_id": "mbpp::207", "text": "Write a function to count the longest repeating subsequences such that the two subsequences don’t have same string characters at same positions.\n\nYour function must be named `find_longest_repeating_subseq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::221", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::221", "template_id": "mbpp::221", "text": "Write a python function to find the first even number in a given list of numbers.\n\nYour function must be named `first_even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::224", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::224", "template_id": "mbpp::224", "text": "Write a python function to count set bits of a given number.\n\nYour function must be named `count_Set_Bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::243", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::243", "template_id": "mbpp::243", "text": "Write a function to sort the given list based on the occurrence of first element of tuples.\n\nYour function must be named `sort_on_occurence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::247", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::247", "template_id": "mbpp::247", "text": "Write a function to find the longest palindromic subsequence in the given string.\n\nYour function must be named `lps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::256", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::256", "template_id": "mbpp::256", "text": "Write a python function to count the number of prime numbers less than a given non-negative number.\n\nYour function must be named `count_Primes_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::264", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::264", "template_id": "mbpp::264", "text": "Write a function to calculate a dog's age in dog's years.\n\nYour function must be named `dog_age`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::272", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::272", "template_id": "mbpp::272", "text": "Write a function to perfom the rear element extraction from list of tuples records.\n\nYour function must be named `rear_extract`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::275", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::275", "template_id": "mbpp::275", "text": "Write a python function to find the position of the last removed element from the given array.\n\nYour function must be named `get_Position`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::278", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::278", "template_id": "mbpp::278", "text": "Write a function to find the element count that occurs before the record in the given tuple.\n\nYour function must be named `count_first_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::295", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::295", "template_id": "mbpp::295", "text": "Write a function to return the sum of all divisors of a number.\n\nYour function must be named `sum_div`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::303", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::303", "template_id": "mbpp::303", "text": "Write a python function to check whether the count of inversion of two types are same or not.\n\nYour function must be named `solve`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::308", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::308", "template_id": "mbpp::308", "text": "Write a function to find the specified number of largest products from two given lists.\n\nYour function must be named `large_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::310", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::310", "template_id": "mbpp::310", "text": "Write a function to convert a given string to a tuple.\n\nYour function must be named `string_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::323", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::323", "template_id": "mbpp::323", "text": "Write a function to re-arrange the given array in alternating positive and negative items.\n\nYour function must be named `right_rotate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::331", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::331", "template_id": "mbpp::331", "text": "Write a python function to count unset bits of a given number.\n\nYour function must be named `count_unset_bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::332", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::332", "template_id": "mbpp::332", "text": "Write a function to count character frequency of a given string.\n\nYour function must be named `char_frequency`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::337", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::337", "template_id": "mbpp::337", "text": "Write a function that matches a word at the end of a string, with optional punctuation.\n\nYour function must be named `text_match_word`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::338", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::338", "template_id": "mbpp::338", "text": "Write a python function to count the number of substrings with same first and last characters.\n\nYour function must be named `check_Equality`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::343", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::343", "template_id": "mbpp::343", "text": "Write a function to calculate the number of digits and letters in a string.\n\nYour function must be named `dig_let`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::348", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::348", "template_id": "mbpp::348", "text": "Write a function to count sequences of given length having non-negative prefix sums that can be generated by given values.\n\nYour function must be named `bin_coff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::350", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::350", "template_id": "mbpp::350", "text": "Write a python function to minimize the length of the string by removing occurrence of only one character.\n\nYour function must be named `minimum_Length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::367", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::367", "template_id": "mbpp::367", "text": "Write a function to check if a binary tree is balanced or not.\n\nYour function must be named `__init__`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::376", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::376", "template_id": "mbpp::376", "text": "Write a function to remove tuple elements that occur more than once and replace the duplicates with some custom value.\n\nYour function must be named `remove_replica`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::379", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::379", "template_id": "mbpp::379", "text": "Write a function to find the surface area of a cuboid.\n\nYour function must be named `surfacearea_cuboid`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::385", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::385", "template_id": "mbpp::385", "text": "Write a function to find the n'th perrin number using recursion.\n\nYour function must be named `get_perrin`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::392", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::392", "template_id": "mbpp::392", "text": "Write a function to find the maximum sum possible by using the given equation f(n) = max( (f(n/2) + f(n/3) + f(n/4) + f(n/5)), n).\n\nYour function must be named `get_max_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::398", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::398", "template_id": "mbpp::398", "text": "Write a function to compute the sum of digits of each number of a given list.\n\nYour function must be named `sum_of_digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::400", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::400", "template_id": "mbpp::400", "text": "Write a function to extract the frequency of unique tuples in the given list order irrespective.\n\nYour function must be named `extract_freq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::403", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::403", "template_id": "mbpp::403", "text": "Write a function to check if a url is valid or not using regex.\n\nYour function must be named `is_valid_URL`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::404", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::404", "template_id": "mbpp::404", "text": "Write a python function to find the minimum of two numbers.\n\nYour function must be named `minimum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::405", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::405", "template_id": "mbpp::405", "text": "Write a function to check whether an element exists within a tuple.\n\nYour function must be named `check_tuplex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::413", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::413", "template_id": "mbpp::413", "text": "Write a function to extract the nth element from a given list of tuples.\n\nYour function must be named `extract_nth_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::424", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::424", "template_id": "mbpp::424", "text": "Write a function to extract only the rear index element of each string in the given tuple.\n\nYour function must be named `extract_rear`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::430", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::430", "template_id": "mbpp::430", "text": "Write a function to find the directrix of a parabola.\n\nYour function must be named `parabola_directrix`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::441", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::441", "template_id": "mbpp::441", "text": "Write a function to find the surface area of a cube.\n\nYour function must be named `surfacearea_cube`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::443", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::443", "template_id": "mbpp::443", "text": "Write a python function to find the largest negative number from the given list.\n\nYour function must be named `largest_neg`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::451", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::451", "template_id": "mbpp::451", "text": "Write a function to remove all whitespaces from the given string using regex.\n\nYour function must be named `remove_whitespaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::453", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::453", "template_id": "mbpp::453", "text": "Write a python function to find the sum of even factors of a number.\n\nYour function must be named `sumofFactors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::456", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::456", "template_id": "mbpp::456", "text": "Write a function to reverse strings in a given list of string values.\n\nYour function must be named `reverse_string_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::464", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::464", "template_id": "mbpp::464", "text": "Write a function to check if all values are same in a dictionary.\n\nYour function must be named `check_value`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::468", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::468", "template_id": "mbpp::468", "text": "Write a function to find the maximum product formed by multiplying numbers of an increasing subsequence of that array.\n\nYour function must be named `max_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::470", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::470", "template_id": "mbpp::470", "text": "Write a function to find the pairwise addition of the elements of the given tuples.\n\nYour function must be named `add_pairwise`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::478", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::478", "template_id": "mbpp::478", "text": "Write a function to remove lowercase substrings from a given string.\n\nYour function must be named `remove_lowercase`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::485", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::485", "template_id": "mbpp::485", "text": "Write a function to find the largest palindromic number in the given array.\n\nYour function must be named `is_palindrome`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::491", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::491", "template_id": "mbpp::491", "text": "Write a function to find the sum of geometric progression series.\n\nYour function must be named `sum_gp`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::522", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::522", "template_id": "mbpp::522", "text": "Write a function to find the longest bitonic subsequence for the given array.\n\nYour function must be named `lbs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::545", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::545", "template_id": "mbpp::545", "text": "Write a python function to toggle only first and last bits of a given number.\n\nYour function must be named `take_L_and_F_set_bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::547", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::547", "template_id": "mbpp::547", "text": "Write a python function to find the sum of hamming distances of all consecutive numbers from o to n.\n\nYour function must be named `Total_Hamming_Distance`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::557", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::557", "template_id": "mbpp::557", "text": "Write a function to toggle characters case in a string.\n\nYour function must be named `toggle_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::562", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::562", "template_id": "mbpp::562", "text": "Write a python function to find the maximum length of sublist.\n\nYour function must be named `Find_Max_Length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::567", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::567", "template_id": "mbpp::567", "text": "Write a function to check whether a specified list is sorted or not.\n\nYour function must be named `issort_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::577", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::577", "template_id": "mbpp::577", "text": "Write a python function to find the last digit in factorial of a given number.\n\nYour function must be named `last_Digit_Factorial`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::601", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::601", "template_id": "mbpp::601", "text": "Write a function to find the longest chain which can be formed from the given set of pairs.\n\nYour function must be named `__init__`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::611", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::611", "template_id": "mbpp::611", "text": "Write a function to find the maximum of nth column from the given tuple list.\n\nYour function must be named `max_of_nth`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::612", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::612", "template_id": "mbpp::612", "text": "Write a python function to merge the first and last elements separately in a list of lists.\n\nYour function must be named `merge`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::613", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::613", "template_id": "mbpp::613", "text": "Write a function to find the maximum value in record list as tuple attribute in the given tuple list.\n\nYour function must be named `maximum_value`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::614", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::614", "template_id": "mbpp::614", "text": "Write a function to find the cumulative sum of all the values that are present in the given tuple list.\n\nYour function must be named `cummulative_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::618", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::618", "template_id": "mbpp::618", "text": "Write a function to divide two lists using map and lambda function.\n\nYour function must be named `div_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::622", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::622", "template_id": "mbpp::622", "text": "Write a function to find the median of two sorted arrays of same size.\n\nYour function must be named `get_median`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::624", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::624", "template_id": "mbpp::624", "text": "Write a python function to convert the given string to upper case.\n\nYour function must be named `is_upper`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::631", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::631", "template_id": "mbpp::631", "text": "Write a function to replace whitespaces with an underscore and vice versa in a given string by using regex.\n\nYour function must be named `replace_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::650", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::650", "template_id": "mbpp::650", "text": "Write a python function to check whether the given two arrays are equal or not.\n\nYour function must be named `are_Equal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::652", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::652", "template_id": "mbpp::652", "text": "Write a function to flatten the given tuple matrix into the tuple list with each tuple representing each column.\n\nYour function must be named `matrix_to_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::658", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::658", "template_id": "mbpp::658", "text": "Write a function to find the item with maximum occurrences in a given list.\n\nYour function must be named `max_occurrences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::668", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::668", "template_id": "mbpp::668", "text": "Write a python function to replace multiple occurence of character by single.\n\nYour function must be named `replace`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::676", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::676", "template_id": "mbpp::676", "text": "Write a function to remove everything except alphanumeric characters from the given string by using regex.\n\nYour function must be named `remove_extra_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::685", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::685", "template_id": "mbpp::685", "text": "Write a python function to find sum of prime numbers between 1 to n.\n\nYour function must be named `sum_Of_Primes`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::692", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::692", "template_id": "mbpp::692", "text": "Write a python function to find the last two digits in factorial of a given number.\n\nYour function must be named `last_Two_Digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::700", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::700", "template_id": "mbpp::700", "text": "Write a function to count the number of elements in a list which are within a specific range.\n\nYour function must be named `count_range_in_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::702", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::702", "template_id": "mbpp::702", "text": "Write a function to find the minimum number of elements that should be removed such that amax-amin<=k.\n\nYour function must be named `find_ind`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::703", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::703", "template_id": "mbpp::703", "text": "Write a function to check whether the given key is present in the dictionary or not.\n\nYour function must be named `is_key_present`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::707", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::707", "template_id": "mbpp::707", "text": "Write a python function to count the total set bits from 1 to n.\n\nYour function must be named `count_Set_Bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::711", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::711", "template_id": "mbpp::711", "text": "Write a python function to check whether the product of digits of a number at even and odd places is equal or not.\n\nYour function must be named `product_Equal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::714", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::714", "template_id": "mbpp::714", "text": "Write a python function to count the number of distinct power of prime factor of given number.\n\nYour function must be named `count_Fac`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::724", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::724", "template_id": "mbpp::724", "text": "Write a function to calculate the sum of all digits of the base to the specified power.\n\nYour function must be named `power_base_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::728", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::728", "template_id": "mbpp::728", "text": "Write a function to sum elements in two lists.\n\nYour function must be named `sum_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::730", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::730", "template_id": "mbpp::730", "text": "Write a function to remove consecutive duplicates of a given list.\n\nYour function must be named `consecutive_duplicates`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::743", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::743", "template_id": "mbpp::743", "text": "Write a function to rotate a given list by specified number of items to the right direction.\n\nYour function must be named `rotate_right`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::755", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::755", "template_id": "mbpp::755", "text": "Write a function to find the second smallest number in a list.\n\nYour function must be named `second_smallest`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::757", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::757", "template_id": "mbpp::757", "text": "Write a function to count the pairs of reverse strings in the given string list.\n\nYour function must be named `count_reverse_pairs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::763", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::763", "template_id": "mbpp::763", "text": "Write a python function to find the minimum difference between any two elements in a given array.\n\nYour function must be named `find_Min_Diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::767", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::767", "template_id": "mbpp::767", "text": "Write a python function to count the number of pairs whose sum is equal to ‘sum’.\n\nYour function must be named `get_Pairs_Count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::781", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::781", "template_id": "mbpp::781", "text": "Write a python function to check whether the count of divisors is even or odd.\n\nYour function must be named `count_Divisors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::782", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::782", "template_id": "mbpp::782", "text": "Write a python function to find the sum of all odd length subarrays.\n\nYour function must be named `Odd_Length_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::805", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::805", "template_id": "mbpp::805", "text": "Write a function to find the list in a list of lists whose sum of elements is the highest.\n\nYour function must be named `max_sum_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::808", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::808", "template_id": "mbpp::808", "text": "Write a function to check if the given tuples contain the k or not.\n\nYour function must be named `check_K`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::811", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::811", "template_id": "mbpp::811", "text": "Write a function to check if two lists of tuples are identical or not.\n\nYour function must be named `check_identical`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::823", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::823", "template_id": "mbpp::823", "text": "Write a function to check if the given string starts with a substring using regex.\n\nYour function must be named `check_substring`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::826", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::826", "template_id": "mbpp::826", "text": "Write a python function to find the type of triangle from the given sides.\n\nYour function must be named `check_Type_Of_Triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::827", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::827", "template_id": "mbpp::827", "text": "Write a function to sum a specific column of a list in a given list of lists.\n\nYour function must be named `sum_column`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::840", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::840", "template_id": "mbpp::840", "text": "Write a python function to check whether the roots of a quadratic equation are numerically equal but opposite in sign or not.\n\nYour function must be named `Check_Solution`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::842", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::842", "template_id": "mbpp::842", "text": "Write a function to find the number which occurs for odd number of times in the given array.\n\nYour function must be named `get_odd_occurence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::843", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::843", "template_id": "mbpp::843", "text": "Write a function to find the nth super ugly number from a given prime list of size k using heap queue algorithm.\n\nYour function must be named `nth_super_ugly_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::846", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::846", "template_id": "mbpp::846", "text": "Write a function to find the minimum number of platforms required for a railway/bus station.\n\nYour function must be named `find_platform`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::852", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::852", "template_id": "mbpp::852", "text": "Write a python function to remove negative numbers from a list.\n\nYour function must be named `remove_negs`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::857", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::857", "template_id": "mbpp::857", "text": "Write a function to list out the list of given strings individually using map function.\n\nYour function must be named `listify_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::871", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::871", "template_id": "mbpp::871", "text": "Write a python function to check whether the given strings are rotations of each other or not.\n\nYour function must be named `are_Rotations`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::888", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::888", "template_id": "mbpp::888", "text": "Write a function to substract the elements of the given nested tuples.\n\nYour function must be named `substract_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::892", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::892", "template_id": "mbpp::892", "text": "Write a function to remove multiple spaces in a string.\n\nYour function must be named `remove_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::902", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::902", "template_id": "mbpp::902", "text": "Write a function to combine two dictionaries by adding values for common keys.\n\nYour function must be named `add_dict`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::912", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::912", "template_id": "mbpp::912", "text": "Write a function to find ln, m lobb number.\n\nYour function must be named `binomial_coeff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::923", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::923", "template_id": "mbpp::923", "text": "Write a function to find the length of the shortest string that has both str1 and str2 as subsequences.\n\nYour function must be named `super_seq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::925", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::925", "template_id": "mbpp::925", "text": "Write a python function to calculate the product of all the numbers of a given tuple.\n\nYour function must be named `mutiple_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::932", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::932", "template_id": "mbpp::932", "text": "Write a function to remove duplicate words from a given list of strings.\n\nYour function must be named `remove_duplic_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::933", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::933", "template_id": "mbpp::933", "text": "Write a function to convert camel case string to snake case string by using regex.\n\nYour function must be named `camel_to_snake`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::936", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::936", "template_id": "mbpp::936", "text": "Write a function to re-arrange the given tuples based on the given ordered list.\n\nYour function must be named `re_arrange_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::937", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::937", "template_id": "mbpp::937", "text": "Write a function to count the most common character in a given string.\n\nYour function must be named `max_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::940", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::940", "template_id": "mbpp::940", "text": "Write a function to sort the given array by using heap sort.\n\nYour function must be named `heap_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::953", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::953", "template_id": "mbpp::953", "text": "Write a python function to find the minimun number of subsets with distinct elements.\n\nYour function must be named `subset`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::959", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::959", "template_id": "mbpp::959", "text": "Write a python function to find the average of a list.\n\nYour function must be named `Average`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::970", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "val", "task_family": "mbpp", "task_id": "real::mbpp::970", "template_id": "mbpp::970", "text": "Write a function to find minimum of two numbers.\n\nYour function must be named `min_of_two`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3837", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_competition", "task_id": "real::apps::apps-3837-c98c17ed", "template_id": "apps::3837", "text": "Soon there will be held the world's largest programming contest, but the testing system still has m bugs. The contest organizer, a well-known university, has no choice but to attract university students to fix all the bugs. The university has n students able to perform such work. The students realize that they are the only hope of the organizers, so they don't want to work for free: the i-th student wants to get c_{i} 'passes' in his subjects (regardless of the volume of his work).\n\nBugs, like students, are not the same: every bug is characterized by complexity a_{j}, and every student has the level of his abilities b_{i}. Student i can fix a bug j only if the level of his abilities is not less than the complexity of the bug: b_{i} ≥ a_{j}, and he does it in one day. Otherwise, the bug will have to be fixed by another student. Of course, no student can work on a few bugs in one day. All bugs are not dependent on each other, so they can be corrected in any order, and different students can work simultaneously.\n\nThe university wants to fix all the bugs as quickly as possible, but giving the students the total of not more than s passes. Determine which students to use for that and come up with the schedule of work saying which student should fix which bug.\n\n\n-----Input-----\n\nThe first line contains three space-separated integers: n, m and s (1 ≤ n, m ≤ 10^5, 0 ≤ s ≤ 10^9) — the number of students, the number of bugs in the system and the maximum number of passes the university is ready to give the students.\n\nThe next line contains m space-separated integers a_1, a_2, ..., a_{m} (1 ≤ a_{i} ≤ 10^9) — the bugs' complexities.\n\nThe next line contains n space-separated integers b_1, b_2, ..., b_{n} (1 ≤ b_{i} ≤ 10^9) — the levels of the students' abilities.\n\nThe next line contains n space-separated integers c_1, c_2, ..., c_{n} (0 ≤ c_{i} ≤ 10^9) — the numbers of the passes the students want to get for their help.\n\n\n-----Output-----\n\nIf the university can't correct all bugs print \"NO\".\n\nOtherwise, on the first line print \"YES\", and on the next line print m space-separated integers: the i-th of these numbers should equal the number of the student who corrects the i-th bug in the optimal answer. The bugs should be corrected as quickly as possible (you must spend the minimum number of days), and the total given passes mustn't exceed s. If there are multiple optimal answers, you can output any of them.\n\n\n-----Examples-----\nInput\n3 4 9\n1 3 1 2\n2 1 3\n4 3 6\n\nOutput\nYES\n2 3 2 3\n\nInput\n3 4 10\n2 3 1 2\n2 1 3\n4 3 6\n\nOutput\nYES\n1 3 1 3\n\nInput\n3 4 9\n2 3 1 2\n2 1 3\n4 3 6\n\nOutput\nYES\n3 3 2 3\n\nInput\n3 4 5\n1 3 1 2\n2 1 3\n5 3 6\n\nOutput\nNO\n\n\n\n-----Note-----\n\nConsider the first sample.\n\nThe third student (with level 3) must fix the 2nd and 4th bugs (complexities 3 and 2 correspondingly) and the second student (with level 1) must fix the 1st and 3rd bugs (their complexity also equals 1). Fixing each bug takes one day for each student, so it takes 2 days to fix all bugs (the students can work in parallel).\n\nThe second student wants 3 passes for his assistance, the third student wants 6 passes. It meets the university's capabilities as it is ready to give at most 9 passes.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3704", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_competition", "task_id": "real::apps::apps-3704-aa7e0177", "template_id": "apps::3704", "text": "Berkomnadzor — Federal Service for Supervision of Communications, Information Technology and Mass Media — is a Berland federal executive body that protects ordinary residents of Berland from the threats of modern internet.\n\nBerkomnadzor maintains a list of prohibited IPv4 subnets (blacklist) and a list of allowed IPv4 subnets (whitelist). All Internet Service Providers (ISPs) in Berland must configure the network equipment to block access to all IPv4 addresses matching the blacklist. Also ISPs must provide access (that is, do not block) to all IPv4 addresses matching the whitelist. If an IPv4 address does not match either of those lists, it's up to the ISP to decide whether to block it or not. An IPv4 address matches the blacklist (whitelist) if and only if it matches some subnet from the blacklist (whitelist). An IPv4 address can belong to a whitelist and to a blacklist at the same time, this situation leads to a contradiction (see no solution case in the output description).\n\nAn IPv4 address is a 32-bit unsigned integer written in the form $a.b.c.d$, where each of the values $a,b,c,d$ is called an octet and is an integer from $0$ to $255$ written in decimal notation. For example, IPv4 address $192.168.0.1$ can be converted to a 32-bit number using the following expression $192 \\cdot 2^{24} + 168 \\cdot 2^{16} + 0 \\cdot 2^8 + 1 \\cdot 2^0$. First octet $a$ encodes the most significant (leftmost) $8$ bits, the octets $b$ and $c$ — the following blocks of $8$ bits (in this order), and the octet $d$ encodes the least significant (rightmost) $8$ bits.\n\nThe IPv4 network in Berland is slightly different from the rest of the world. There are no reserved or internal addresses in Berland and use all $2^{32}$ possible values.\n\nAn IPv4 subnet is represented either as $a.b.c.d$ or as $a.b.c.d/x$ (where $0 \\le x \\le 32$). A subnet $a.b.c.d$ contains a single address $a.b.c.d$. A subnet $a.b.c.d/x$ contains all IPv4 addresses with $x$ leftmost (most significant) bits equal to $x$ leftmost bits of the address $a.b.c.d$. It is required that $32 - x$ rightmost (least significant) bits of subnet $a.b.c.d/x$ are zeroes.\n\nNaturally it happens that all addresses matching subnet $a.b.c.d/x$ form a continuous range. The range starts with address $a.b.c.d$ (its rightmost $32 - x$ bits are zeroes). The range ends with address which $x$ leftmost bits equal to $x$ leftmost bits of address $a.b.c.d$, and its $32 - x$ rightmost bits are all ones. Subnet contains exactly $2^{32-x}$ addresses. Subnet $a.b.c.d/32$ contains exactly one address and can also be represented by just $a.b.c.d$.\n\nFor example subnet $192.168.0.0/24$ contains range of 256 addresses. $192.168.0.0$ is the first address of the range, and $192.168.0.255$ is the last one.\n\nBerkomnadzor's engineers have devised a plan to improve performance of Berland's global network. Instead of maintaining both whitelist and blacklist they want to build only a single optimised blacklist containing minimal number of subnets. The idea is to block all IPv4 addresses matching the optimised blacklist and allow all the rest addresses. Of course, IPv4 addresses from the old blacklist must remain blocked and all IPv4 addresses from the old whitelist must still be allowed. Those IPv4 addresses which matched neither the old blacklist nor the old whitelist may be either blocked or allowed regardless of their accessibility before.\n\nPlease write a program which takes blacklist and whitelist as input and produces optimised blacklist. The optimised blacklist must contain the minimal possible number of subnets and satisfy all IPv4 addresses accessibility requirements mentioned above.\n\nIPv4 subnets in the source lists may intersect arbitrarily. Please output a single number -1 if some IPv4 address matches both source whitelist and blacklist.\n\n\n-----Input-----\n\nThe first line of the input contains single integer $n$ ($1 \\le n \\le 2\\cdot10^5$) — total number of IPv4 subnets in the input.\n\nThe following $n$ lines contain IPv4 subnets. Each line starts with either '-' or '+' sign, which indicates if the subnet belongs to the blacklist or to the whitelist correspondingly. It is followed, without any spaces, by the IPv4 subnet in $a.b.c.d$ or $a.b.c.d/x$ format ($0 \\le x \\le 32$). The blacklist always contains at least one subnet.\n\nAll of the IPv4 subnets given in the input are valid. Integer numbers do not start with extra leading zeroes. The provided IPv4 subnets can intersect arbitrarily.\n\n\n-----Output-----\n\nOutput -1, if there is an IPv4 address that matches both the whitelist and the blacklist. Otherwise output $t$ — the length of the optimised blacklist, followed by $t$ subnets, with each subnet on a new line. Subnets may be printed in arbitrary order. All addresses matching the source blacklist must match the optimised blacklist. All addresses matching the source whitelist must not match the optimised blacklist. You can print a subnet $a.b.c.d/32$ in any of two ways: as $a.b.c.d/32$ or as $a.b.c.d$.\n\nIf there is more than one solution, output any.\n\n\n-----Examples-----\nInput\n1\n-149.154.167.99\n\nOutput\n1\n0.0.0.0/0\n\nInput\n4\n-149.154.167.99\n+149.154.167.100/30\n+149.154.167.128/25\n-149.154.167.120/29\n\nOutput\n2\n149.154.167.99\n149.154.167.120/29\n\nInput\n5\n-127.0.0.4/31\n+127.0.0.8\n+127.0.0.0/30\n-195.82.146.208/29\n-127.0.0.6/31\n\nOutput\n2\n195.0.0.0/8\n127.0.0.4/30\n\nInput\n2\n+127.0.0.1/32\n-127.0.0.1\n\nOutput\n-1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3851", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_competition", "task_id": "real::apps::apps-3851-8cdd88a0", "template_id": "apps::3851", "text": "Recently a Golden Circle of Beetlovers was found in Byteland. It is a circle route going through $n \\cdot k$ cities. The cities are numerated from $1$ to $n \\cdot k$, the distance between the neighboring cities is exactly $1$ km.\n\nSergey does not like beetles, he loves burgers. Fortunately for him, there are $n$ fast food restaurants on the circle, they are located in the $1$-st, the $(k + 1)$-st, the $(2k + 1)$-st, and so on, the $((n-1)k + 1)$-st cities, i.e. the distance between the neighboring cities with fast food restaurants is $k$ km.\n\nSergey began his journey at some city $s$ and traveled along the circle, making stops at cities each $l$ km ($l > 0$), until he stopped in $s$ once again. Sergey then forgot numbers $s$ and $l$, but he remembers that the distance from the city $s$ to the nearest fast food restaurant was $a$ km, and the distance from the city he stopped at after traveling the first $l$ km from $s$ to the nearest fast food restaurant was $b$ km. Sergey always traveled in the same direction along the circle, but when he calculated distances to the restaurants, he considered both directions.\n\nNow Sergey is interested in two integers. The first integer $x$ is the minimum number of stops (excluding the first) Sergey could have done before returning to $s$. The second integer $y$ is the maximum number of stops (excluding the first) Sergey could have done before returning to $s$.\n\n\n-----Input-----\n\nThe first line contains two integers $n$ and $k$ ($1 \\le n, k \\le 100\\,000$) — the number of fast food restaurants on the circle and the distance between the neighboring restaurants, respectively.\n\nThe second line contains two integers $a$ and $b$ ($0 \\le a, b \\le \\frac{k}{2}$) — the distances to the nearest fast food restaurants from the initial city and from the city Sergey made the first stop at, respectively.\n\n\n-----Output-----\n\nPrint the two integers $x$ and $y$.\n\n\n-----Examples-----\nInput\n2 3\n1 1\n\nOutput\n1 6\n\nInput\n3 2\n0 0\n\nOutput\n1 3\n\nInput\n1 10\n5 3\n\nOutput\n5 5\n\n\n\n-----Note-----\n\nIn the first example the restaurants are located in the cities $1$ and $4$, the initial city $s$ could be $2$, $3$, $5$, or $6$. The next city Sergey stopped at could also be at cities $2, 3, 5, 6$. Let's loop through all possible combinations of these cities. If both $s$ and the city of the first stop are at the city $2$ (for example, $l = 6$), then Sergey is at $s$ after the first stop already, so $x = 1$. In other pairs Sergey needs $1, 2, 3$, or $6$ stops to return to $s$, so $y = 6$.\n\nIn the second example Sergey was at cities with fast food restaurant both initially and after the first stop, so $l$ is $2$, $4$, or $6$. Thus $x = 1$, $y = 3$.\n\nIn the third example there is only one restaurant, so the possible locations of $s$ and the first stop are: $(6, 8)$ and $(6, 4)$. For the first option $l = 2$, for the second $l = 8$. In both cases Sergey needs $x=y=5$ stops to go to $s$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3987", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_competition", "task_id": "real::apps::apps-3987-7caeadf7", "template_id": "apps::3987", "text": "A dragon symbolizes wisdom, power and wealth. On Lunar New Year's Day, people model a dragon with bamboo strips and clothes, raise them with rods, and hold the rods high and low to resemble a flying dragon.\n\nA performer holding the rod low is represented by a 1, while one holding it high is represented by a 2. Thus, the line of performers can be represented by a sequence a_1, a_2, ..., a_{n}.\n\nLittle Tommy is among them. He would like to choose an interval [l, r] (1 ≤ l ≤ r ≤ n), then reverse a_{l}, a_{l} + 1, ..., a_{r} so that the length of the longest non-decreasing subsequence of the new sequence is maximum.\n\nA non-decreasing subsequence is a sequence of indices p_1, p_2, ..., p_{k}, such that p_1 < p_2 < ... < p_{k} and a_{p}_1 ≤ a_{p}_2 ≤ ... ≤ a_{p}_{k}. The length of the subsequence is k.\n\n\n-----Input-----\n\nThe first line contains an integer n (1 ≤ n ≤ 2000), denoting the length of the original sequence.\n\nThe second line contains n space-separated integers, describing the original sequence a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 2, i = 1, 2, ..., n).\n\n\n-----Output-----\n\nPrint a single integer, which means the maximum possible length of the longest non-decreasing subsequence of the new sequence.\n\n\n-----Examples-----\nInput\n4\n1 2 1 2\n\nOutput\n4\n\nInput\n10\n1 1 2 2 2 1 1 2 2 1\n\nOutput\n9\n\n\n\n-----Note-----\n\nIn the first example, after reversing [2, 3], the array will become [1, 1, 2, 2], where the length of the longest non-decreasing subsequence is 4.\n\nIn the second example, after reversing [3, 7], the array will become [1, 1, 1, 1, 2, 2, 2, 2, 2, 1], where the length of the longest non-decreasing subsequence is 9.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3920", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_competition", "task_id": "real::apps::apps-3920-8b80bef1", "template_id": "apps::3920", "text": "Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to $120^{\\circ}$. Then he measured the length of its sides, and found that each of them is equal to an integer number of centimeters. There the properties of the hexagon ended and Gerald decided to draw on it.\n\nHe painted a few lines, parallel to the sides of the hexagon. The lines split the hexagon into regular triangles with sides of 1 centimeter. Now Gerald wonders how many triangles he has got. But there were so many of them that Gerald lost the track of his counting. Help the boy count the triangles.\n\n\n-----Input-----\n\nThe first and the single line of the input contains 6 space-separated integers a_1, a_2, a_3, a_4, a_5 and a_6 (1 ≤ a_{i} ≤ 1000) — the lengths of the sides of the hexagons in centimeters in the clockwise order. It is guaranteed that the hexagon with the indicated properties and the exactly such sides exists.\n\n\n-----Output-----\n\nPrint a single integer — the number of triangles with the sides of one 1 centimeter, into which the hexagon is split.\n\n\n-----Examples-----\nInput\n1 1 1 1 1 1\n\nOutput\n6\n\nInput\n1 2 1 2 1 2\n\nOutput\n13\n\n\n\n-----Note-----\n\nThis is what Gerald's hexagon looks like in the first sample:\n\n$\\theta$\n\nAnd that's what it looks like in the second sample:\n\n$A$\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2368", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-2368-704ff394", "template_id": "apps::2368", "text": "Given is a simple undirected graph with N vertices and M edges. The i-th edge connects Vertex c_i and Vertex d_i.\nInitially, Vertex i has the value a_i written on it. You want to change the values on Vertex 1, \\ldots, Vertex N to b_1, \\cdots, b_N, respectively, by doing the operation below zero or more times.\n - Choose an edge, and let Vertex x and Vertex y be the vertices connected by that edge. Choose one of the following and do it:\n - Decrease the value a_x by 1, and increase the value a_y by 1.\n - Increase the value a_x by 1, and decrease the value a_y by 1.\nDetermine whether it is possible to achieve the objective by properly doing the operation.\n\n-----Constraints-----\n - 1 \\leq N \\leq 2 \\times 10^5\n - 0 \\leq M \\leq 2 \\times 10^5\n - -10^9 \\leq a_i,b_i \\leq 10^9\n - 1 \\leq c_i,d_i \\leq N\n - The given graph is simple, that is, has no self-loops and no multi-edges.\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN M\na_1 \\cdots a_N\nb_1 \\cdots b_N\nc_1 d_1\n\\vdots\nc_M d_M\n\n-----Output-----\nPrint Yes if it is possible to achieve the objective by properly doing the operation, and No otherwise.\n\n-----Sample Input-----\n3 2\n1 2 3\n2 2 2\n1 2\n2 3\n\n-----Sample Output-----\nYes\n\nYou can achieve the objective by, for example, doing the operation as follows:\n - In the first operation, choose the edge connecting Vertex 1 and 2. Then, increase a_1 by 1 and decrease a_2 by 1.\n - In the second operation, choose the edge connecting Vertex 2 and 3. Then, increase a_2 by 1 and decrease a_3 by 1.\nThis sequence of operations makes a_1=2, a_2=2, and a_3=2.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1483", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1483-adb9f974", "template_id": "apps::1483", "text": "In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of $n$ students doing yet another trick.\n\nLet's assume that all these students are numbered from $1$ to $n$. The teacher came to student $a$ and put a hole in his badge. The student, however, claimed that the main culprit is some other student $p_a$.\n\nAfter that, the teacher came to student $p_a$ and made a hole in his badge as well. The student in reply said that the main culprit was student $p_{p_a}$.\n\nThis process went on for a while, but, since the number of students was finite, eventually the teacher came to the student, who already had a hole in his badge.\n\nAfter that, the teacher put a second hole in the student's badge and decided that he is done with this process, and went to the sauna.\n\nYou don't know the first student who was caught by the teacher. However, you know all the numbers $p_i$. Your task is to find out for every student $a$, who would be the student with two holes in the badge if the first caught student was $a$.\n\n\n-----Input-----\n\nThe first line of the input contains the only integer $n$ ($1 \\le n \\le 1000$) — the number of the naughty students.\n\nThe second line contains $n$ integers $p_1$, ..., $p_n$ ($1 \\le p_i \\le n$), where $p_i$ indicates the student who was reported to the teacher by student $i$.\n\n\n-----Output-----\n\nFor every student $a$ from $1$ to $n$ print which student would receive two holes in the badge, if $a$ was the first student caught by the teacher.\n\n\n-----Examples-----\nInput\n3\n2 3 2\n\nOutput\n2 2 3\n\nInput\n3\n1 2 3\n\nOutput\n1 2 3\n\n\n\n-----Note-----\n\nThe picture corresponds to the first example test case.\n\n $8$\n\nWhen $a = 1$, the teacher comes to students $1$, $2$, $3$, $2$, in this order, and the student $2$ is the one who receives a second hole in his badge.\n\nWhen $a = 2$, the teacher comes to students $2$, $3$, $2$, and the student $2$ gets a second hole in his badge. When $a = 3$, the teacher will visit students $3$, $2$, $3$ with student $3$ getting a second hole in his badge.\n\nFor the second example test case it's clear that no matter with whom the teacher starts, that student would be the one who gets the second hole in his badge.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2311", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-2311-18127ea7", "template_id": "apps::2311", "text": "You are given an array $a$ of length $n$ and array $b$ of length $m$ both consisting of only integers $0$ and $1$. Consider a matrix $c$ of size $n \\times m$ formed by following rule: $c_{i, j} = a_i \\cdot b_j$ (i.e. $a_i$ multiplied by $b_j$). It's easy to see that $c$ consists of only zeroes and ones too.\n\nHow many subrectangles of size (area) $k$ consisting only of ones are there in $c$?\n\nA subrectangle is an intersection of a consecutive (subsequent) segment of rows and a consecutive (subsequent) segment of columns. I.e. consider four integers $x_1, x_2, y_1, y_2$ ($1 \\le x_1 \\le x_2 \\le n$, $1 \\le y_1 \\le y_2 \\le m$) a subrectangle $c[x_1 \\dots x_2][y_1 \\dots y_2]$ is an intersection of the rows $x_1, x_1+1, x_1+2, \\dots, x_2$ and the columns $y_1, y_1+1, y_1+2, \\dots, y_2$.\n\nThe size (area) of a subrectangle is the total number of cells in it.\n\n\n-----Input-----\n\nThe first line contains three integers $n$, $m$ and $k$ ($1 \\leq n, m \\leq 40\\,000, 1 \\leq k \\leq n \\cdot m$), length of array $a$, length of array $b$ and required size of subrectangles.\n\nThe second line contains $n$ integers $a_1, a_2, \\ldots, a_n$ ($0 \\leq a_i \\leq 1$), elements of $a$.\n\nThe third line contains $m$ integers $b_1, b_2, \\ldots, b_m$ ($0 \\leq b_i \\leq 1$), elements of $b$.\n\n\n-----Output-----\n\nOutput single integer — the number of subrectangles of $c$ with size (area) $k$ consisting only of ones.\n\n\n-----Examples-----\nInput\n3 3 2\n1 0 1\n1 1 1\n\nOutput\n4\n\nInput\n3 5 4\n1 1 1\n1 1 1 1 1\n\nOutput\n14\n\n\n\n-----Note-----\n\nIn first example matrix $c$ is:\n\n $\\left(\\begin{array}{l l l}{1} & {1} & {1} \\\\{0} & {0} & {0} \\\\{1} & {1} & {1} \\end{array} \\right)$\n\nThere are $4$ subrectangles of size $2$ consisting of only ones in it:\n\n [Image]\n\nIn second example matrix $c$ is:\n\n $\\left(\\begin{array}{l l l l l}{1} & {1} & {1} & {1} & {1} \\\\{1} & {1} & {1} & {1} & {1} \\\\{1} & {1} & {1} & {1} & {1} \\end{array} \\right)$\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1294", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1294-ad0fbfe1", "template_id": "apps::1294", "text": "Recently Polycarp noticed that some of the buttons of his keyboard are malfunctioning. For simplicity, we assume that Polycarp's keyboard contains $26$ buttons (one for each letter of the Latin alphabet). Each button is either working fine or malfunctioning.\n\nTo check which buttons need replacement, Polycarp pressed some buttons in sequence, and a string $s$ appeared on the screen. When Polycarp presses a button with character $c$, one of the following events happened:\n\n if the button was working correctly, a character $c$ appeared at the end of the string Polycarp was typing; if the button was malfunctioning, two characters $c$ appeared at the end of the string.\n\nFor example, suppose the buttons corresponding to characters a and c are working correctly, and the button corresponding to b is malfunctioning. If Polycarp presses the buttons in the order a, b, a, c, a, b, a, then the string he is typing changes as follows: a $\\rightarrow$ abb $\\rightarrow$ abba $\\rightarrow$ abbac $\\rightarrow$ abbaca $\\rightarrow$ abbacabb $\\rightarrow$ abbacabba.\n\nYou are given a string $s$ which appeared on the screen after Polycarp pressed some buttons. Help Polycarp to determine which buttons are working correctly for sure (that is, this string could not appear on the screen if any of these buttons was malfunctioning).\n\nYou may assume that the buttons don't start malfunctioning when Polycarp types the string: each button either works correctly throughout the whole process, or malfunctions throughout the whole process.\n\n\n-----Input-----\n\nThe first line contains one integer $t$ ($1 \\le t \\le 100$) — the number of test cases in the input.\n\nThen the test cases follow. Each test case is represented by one line containing a string $s$ consisting of no less than $1$ and no more than $500$ lowercase Latin letters.\n\n\n-----Output-----\n\nFor each test case, print one line containing a string $res$. The string $res$ should contain all characters which correspond to buttons that work correctly in alphabetical order, without any separators or repetitions. If all buttons may malfunction, $res$ should be empty.\n\n\n-----Example-----\nInput\n4\na\nzzaaz\nccff\ncbddbb\n\nOutput\na\nz\n\nbc\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2139", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-2139-a73c4737", "template_id": "apps::2139", "text": "The bear has a string s = s_1s_2... s_{|}s| (record |s| is the string's length), consisting of lowercase English letters. The bear wants to count the number of such pairs of indices i, j (1 ≤ i ≤ j ≤ |s|), that string x(i, j) = s_{i}s_{i} + 1... s_{j} contains at least one string \"bear\" as a substring.\n\nString x(i, j) contains string \"bear\", if there is such index k (i ≤ k ≤ j - 3), that s_{k} = b, s_{k} + 1 = e, s_{k} + 2 = a, s_{k} + 3 = r.\n\nHelp the bear cope with the given problem.\n\n\n-----Input-----\n\nThe first line contains a non-empty string s (1 ≤ |s| ≤ 5000). It is guaranteed that the string only consists of lowercase English letters.\n\n\n-----Output-----\n\nPrint a single number — the answer to the problem.\n\n\n-----Examples-----\nInput\nbearbtear\n\nOutput\n6\n\nInput\nbearaabearc\n\nOutput\n20\n\n\n\n-----Note-----\n\nIn the first sample, the following pairs (i, j) match: (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9).\n\nIn the second sample, the following pairs (i, j) match: (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (1, 11), (2, 10), (2, 11), (3, 10), (3, 11), (4, 10), (4, 11), (5, 10), (5, 11), (6, 10), (6, 11), (7, 10), (7, 11).\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1291", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1291-fce8a176", "template_id": "apps::1291", "text": "Berlanders like to eat cones after a hard day. Misha Square and Sasha Circle are local authorities of Berland. Each of them controls its points of cone trade. Misha has n points, Sasha — m. Since their subordinates constantly had conflicts with each other, they decided to build a fence in the form of a circle, so that the points of trade of one businessman are strictly inside a circle, and points of the other one are strictly outside. It doesn't matter which of the two gentlemen will have his trade points inside the circle.\n\nDetermine whether they can build a fence or not.\n\n\n-----Input-----\n\nThe first line contains two integers n and m (1 ≤ n, m ≤ 10000), numbers of Misha's and Sasha's trade points respectively.\n\nThe next n lines contains pairs of space-separated integers M_{x}, M_{y} ( - 10^4 ≤ M_{x}, M_{y} ≤ 10^4), coordinates of Misha's trade points.\n\nThe next m lines contains pairs of space-separated integers S_{x}, S_{y} ( - 10^4 ≤ S_{x}, S_{y} ≤ 10^4), coordinates of Sasha's trade points.\n\nIt is guaranteed that all n + m points are distinct.\n\n\n-----Output-----\n\nThe only output line should contain either word \"YES\" without quotes in case it is possible to build a such fence or word \"NO\" in the other case.\n\n\n-----Examples-----\nInput\n2 2\n-1 0\n1 0\n0 -1\n0 1\n\nOutput\nNO\n\nInput\n4 4\n1 0\n0 1\n-1 0\n0 -1\n1 1\n-1 1\n-1 -1\n1 -1\n\nOutput\nYES\n\n\n\n-----Note-----\n\nIn the first sample there is no possibility to separate points, because any circle that contains both points ( - 1, 0), (1, 0) also contains at least one point from the set (0, - 1), (0, 1), and vice-versa: any circle that contains both points (0, - 1), (0, 1) also contains at least one point from the set ( - 1, 0), (1, 0)\n\nIn the second sample one of the possible solution is shown below. Misha's points are marked with red colour and Sasha's are marked with blue. [Image]\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1742", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1742-23dede95", "template_id": "apps::1742", "text": "At the big break Nastya came to the school dining room. There are $n$ pupils in the school, numbered from $1$ to $n$. Unfortunately, Nastya came pretty late, so that all pupils had already stood in the queue, i.e. Nastya took the last place in the queue. Of course, it's a little bit sad for Nastya, but she is not going to despond because some pupils in the queue can agree to change places with some other pupils.\n\nFormally, there are some pairs $u$, $v$ such that if the pupil with number $u$ stands directly in front of the pupil with number $v$, Nastya can ask them and they will change places.\n\nNastya asks you to find the maximal number of places in queue she can move forward.\n\n\n-----Input-----\n\nThe first line contains two integers $n$ and $m$ ($1 \\leq n \\leq 3 \\cdot 10^{5}$, $0 \\leq m \\leq 5 \\cdot 10^{5}$) — the number of pupils in the queue and number of pairs of pupils such that the first one agrees to change places with the second one if the first is directly in front of the second.\n\nThe second line contains $n$ integers $p_1$, $p_2$, ..., $p_n$ — the initial arrangement of pupils in the queue, from the queue start to its end ($1 \\leq p_i \\leq n$, $p$ is a permutation of integers from $1$ to $n$). In other words, $p_i$ is the number of the pupil who stands on the $i$-th position in the queue.\n\nThe $i$-th of the following $m$ lines contains two integers $u_i$, $v_i$ ($1 \\leq u_i, v_i \\leq n, u_i \\neq v_i$), denoting that the pupil with number $u_i$ agrees to change places with the pupil with number $v_i$ if $u_i$ is directly in front of $v_i$. It is guaranteed that if $i \\neq j$, than $v_i \\neq v_j$ or $u_i \\neq u_j$. Note that it is possible that in some pairs both pupils agree to change places with each other.\n\nNastya is the last person in the queue, i.e. the pupil with number $p_n$.\n\n\n-----Output-----\n\nPrint a single integer — the number of places in queue she can move forward.\n\n\n-----Examples-----\nInput\n2 1\n1 2\n1 2\n\nOutput\n1\nInput\n3 3\n3 1 2\n1 2\n3 1\n3 2\n\nOutput\n2\nInput\n5 2\n3 1 5 4 2\n5 2\n5 4\n\nOutput\n1\n\n\n-----Note-----\n\nIn the first example Nastya can just change places with the first pupil in the queue.\n\nOptimal sequence of changes in the second example is change places for pupils with numbers $1$ and $3$. change places for pupils with numbers $3$ and $2$. change places for pupils with numbers $1$ and $2$.\n\nThe queue looks like $[3, 1, 2]$, then $[1, 3, 2]$, then $[1, 2, 3]$, and finally $[2, 1, 3]$ after these operations.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1768", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1768-1078cb51", "template_id": "apps::1768", "text": "Nadeko's birthday is approaching! As she decorated the room for the party, a long garland of Dianthus-shaped paper pieces was placed on a prominent part of the wall. Brother Koyomi will like it!\n\nStill unsatisfied with the garland, Nadeko decided to polish it again. The garland has n pieces numbered from 1 to n from left to right, and the i-th piece has a colour s_{i}, denoted by a lowercase English letter. Nadeko will repaint at most m of the pieces to give each of them an arbitrary new colour (still denoted by a lowercase English letter). After this work, she finds out all subsegments of the garland containing pieces of only colour c — Brother Koyomi's favourite one, and takes the length of the longest among them to be the Koyomity of the garland.\n\nFor instance, let's say the garland is represented by \"kooomo\", and Brother Koyomi's favourite colour is \"o\". Among all subsegments containing pieces of \"o\" only, \"ooo\" is the longest, with a length of 3. Thus the Koyomity of this garland equals 3.\n\nBut problem arises as Nadeko is unsure about Brother Koyomi's favourite colour, and has swaying ideas on the amount of work to do. She has q plans on this, each of which can be expressed as a pair of an integer m_{i} and a lowercase letter c_{i}, meanings of which are explained above. You are to find out the maximum Koyomity achievable after repainting the garland according to each plan.\n\n\n-----Input-----\n\nThe first line of input contains a positive integer n (1 ≤ n ≤ 1 500) — the length of the garland.\n\nThe second line contains n lowercase English letters s_1s_2... s_{n} as a string — the initial colours of paper pieces on the garland.\n\nThe third line contains a positive integer q (1 ≤ q ≤ 200 000) — the number of plans Nadeko has.\n\nThe next q lines describe one plan each: the i-th among them contains an integer m_{i} (1 ≤ m_{i} ≤ n) — the maximum amount of pieces to repaint, followed by a space, then by a lowercase English letter c_{i} — Koyomi's possible favourite colour.\n\n\n-----Output-----\n\nOutput q lines: for each work plan, output one line containing an integer — the largest Koyomity achievable after repainting the garland according to it.\n\n\n-----Examples-----\nInput\n6\nkoyomi\n3\n1 o\n4 o\n4 m\n\nOutput\n3\n6\n5\n\nInput\n15\nyamatonadeshiko\n10\n1 a\n2 a\n3 a\n4 a\n5 a\n1 b\n2 b\n3 b\n4 b\n5 b\n\nOutput\n3\n4\n5\n7\n8\n1\n2\n3\n4\n5\n\nInput\n10\naaaaaaaaaa\n2\n10 b\n10 z\n\nOutput\n10\n10\n\n\n\n-----Note-----\n\nIn the first sample, there are three plans: In the first plan, at most 1 piece can be repainted. Repainting the \"y\" piece to become \"o\" results in \"kooomi\", whose Koyomity of 3 is the best achievable; In the second plan, at most 4 pieces can be repainted, and \"oooooo\" results in a Koyomity of 6; In the third plan, at most 4 pieces can be repainted, and \"mmmmmi\" and \"kmmmmm\" both result in a Koyomity of 5.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1542", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1542-300f5a90", "template_id": "apps::1542", "text": "Vasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink \"Beecola\", which can be bought in n different shops in the city. It's known that the price of one bottle in the shop i is equal to x_{i} coins.\n\nVasiliy plans to buy his favorite drink for q consecutive days. He knows, that on the i-th day he will be able to spent m_{i} coins. Now, for each of the days he want to know in how many different shops he can buy a bottle of \"Beecola\".\n\n\n-----Input-----\n\nThe first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of shops in the city that sell Vasiliy's favourite drink.\n\nThe second line contains n integers x_{i} (1 ≤ x_{i} ≤ 100 000) — prices of the bottles of the drink in the i-th shop.\n\nThe third line contains a single integer q (1 ≤ q ≤ 100 000) — the number of days Vasiliy plans to buy the drink.\n\nThen follow q lines each containing one integer m_{i} (1 ≤ m_{i} ≤ 10^9) — the number of coins Vasiliy can spent on the i-th day.\n\n\n-----Output-----\n\nPrint q integers. The i-th of them should be equal to the number of shops where Vasiliy will be able to buy a bottle of the drink on the i-th day.\n\n\n-----Example-----\nInput\n5\n3 10 8 6 11\n4\n1\n10\n3\n11\n\nOutput\n0\n4\n1\n5\n\n\n\n-----Note-----\n\nOn the first day, Vasiliy won't be able to buy a drink in any of the shops.\n\nOn the second day, Vasiliy can buy a drink in the shops 1, 2, 3 and 4.\n\nOn the third day, Vasiliy can buy a drink only in the shop number 1.\n\nFinally, on the last day Vasiliy can buy a drink in any shop.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::2608", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-2608-2861130f", "template_id": "apps::2608", "text": "Recently, Masha was presented with a chessboard with a height of $n$ and a width of $m$.\n\nThe rows on the chessboard are numbered from $1$ to $n$ from bottom to top. The columns are numbered from $1$ to $m$ from left to right. Therefore, each cell can be specified with the coordinates $(x,y)$, where $x$ is the column number, and $y$ is the row number (do not mix up).\n\nLet us call a rectangle with coordinates $(a,b,c,d)$ a rectangle lower left point of which has coordinates $(a,b)$, and the upper right one — $(c,d)$.\n\nThe chessboard is painted black and white as follows:\n\n [Image]\n\n An example of a chessboard.\n\nMasha was very happy with the gift and, therefore, invited her friends Maxim and Denis to show off. The guys decided to make her a treat — they bought her a can of white and a can of black paint, so that if the old board deteriorates, it can be repainted. When they came to Masha, something unpleasant happened: first, Maxim went over the threshold and spilled white paint on the rectangle $(x_1,y_1,x_2,y_2)$. Then after him Denis spilled black paint on the rectangle $(x_3,y_3,x_4,y_4)$.\n\nTo spill paint of color $color$ onto a certain rectangle means that all the cells that belong to the given rectangle become $color$. The cell dyeing is superimposed on each other (if at first some cell is spilled with white paint and then with black one, then its color will be black).\n\nMasha was shocked! She drove away from the guests and decided to find out how spoiled the gift was. For this, she needs to know the number of cells of white and black color. Help her find these numbers!\n\n\n-----Input-----\n\nThe first line contains a single integer $t$ ($1 \\le t \\le 10^3$) — the number of test cases.\n\nEach of them is described in the following format:\n\nThe first line contains two integers $n$ and $m$ ($1 \\le n,m \\le 10^9$) — the size of the board.\n\nThe second line contains four integers $x_1$, $y_1$, $x_2$, $y_2$ ($1 \\le x_1 \\le x_2 \\le m, 1 \\le y_1 \\le y_2 \\le n$) — the coordinates of the rectangle, the white paint was spilled on.\n\nThe third line contains four integers $x_3$, $y_3$, $x_4$, $y_4$ ($1 \\le x_3 \\le x_4 \\le m, 1 \\le y_3 \\le y_4 \\le n$) — the coordinates of the rectangle, the black paint was spilled on.\n\n\n-----Output-----\n\nOutput $t$ lines, each of which contains two numbers — the number of white and black cells after spilling paint, respectively.\n\n\n-----Example-----\nInput\n5\n2 2\n1 1 2 2\n1 1 2 2\n3 4\n2 2 3 2\n3 1 4 3\n1 5\n1 1 5 1\n3 1 5 1\n4 4\n1 1 4 2\n1 3 4 4\n3 4\n1 2 4 2\n2 1 3 3\n\nOutput\n0 4\n3 9\n2 3\n8 8\n4 8\n\n\n\n-----Note-----\n\nExplanation for examples:\n\nThe first picture of each illustration shows how the field looked before the dyes were spilled. The second picture of each illustration shows how the field looked after Maxim spoiled white dye (the rectangle on which the dye was spilled is highlighted with red). The third picture in each illustration shows how the field looked after Denis spoiled black dye (the rectangle on which the dye was spilled is highlighted with red).\n\nIn the first test, the paint on the field changed as follows:\n\n [Image]\n\nIn the second test, the paint on the field changed as follows:\n\n [Image]\n\nIn the third test, the paint on the field changed as follows:\n\n [Image]\n\nIn the fourth test, the paint on the field changed as follows:\n\n [Image]\n\nIn the fifth test, the paint on the field changed as follows:\n\n [Image]\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1063", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1063-cbbf5207", "template_id": "apps::1063", "text": "Peter wrote on the board a strictly increasing sequence of positive integers a_1, a_2, ..., a_{n}. Then Vasil replaced some digits in the numbers of this sequence by question marks. Thus, each question mark corresponds to exactly one lost digit.\n\nRestore the the original sequence knowing digits remaining on the board.\n\n\n-----Input-----\n\nThe first line of the input contains integer n (1 ≤ n ≤ 10^5) — the length of the sequence. Next n lines contain one element of the sequence each. Each element consists only of digits and question marks. No element starts from digit 0. Each element has length from 1 to 8 characters, inclusive.\n\n\n-----Output-----\n\nIf the answer exists, print in the first line \"YES\" (without the quotes). Next n lines must contain the sequence of positive integers — a possible variant of Peter's sequence. The found sequence must be strictly increasing, it must be transformed from the given one by replacing each question mark by a single digit. All numbers on the resulting sequence must be written without leading zeroes. If there are multiple solutions, print any of them.\n\nIf there is no answer, print a single line \"NO\" (without the quotes).\n\n\n-----Examples-----\nInput\n3\n?\n18\n1?\n\nOutput\nYES\n1\n18\n19\n\nInput\n2\n??\n?\n\nOutput\nNO\n\nInput\n5\n12224\n12??5\n12226\n?0000\n?00000\n\nOutput\nYES\n12224\n12225\n12226\n20000\n100000\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1785", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_interview", "task_id": "real::apps::apps-1785-e7398549", "template_id": "apps::1785", "text": "Vasya became interested in bioinformatics. He's going to write an article about similar cyclic DNA sequences, so he invented a new method for determining the similarity of cyclic sequences.\n\nLet's assume that strings s and t have the same length n, then the function h(s, t) is defined as the number of positions in which the respective symbols of s and t are the same. Function h(s, t) can be used to define the function of Vasya distance ρ(s, t): $\\rho(s, t) = \\sum_{i = 0}^{n - 1} \\sum_{j = 0}^{n - 1} h(\\operatorname{shift}(s, i), \\operatorname{shift}(t, j))$ where $\\operatorname{shift}(s, i)$ is obtained from string s, by applying left circular shift i times. For example, ρ(\"AGC\", \"CGT\") = h(\"AGC\", \"CGT\") + h(\"AGC\", \"GTC\") + h(\"AGC\", \"TCG\") + h(\"GCA\", \"CGT\") + h(\"GCA\", \"GTC\") + h(\"GCA\", \"TCG\") + h(\"CAG\", \"CGT\") + h(\"CAG\", \"GTC\") + h(\"CAG\", \"TCG\") = 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 1 = 6\n\nVasya found a string s of length n on the Internet. Now he wants to count how many strings t there are such that the Vasya distance from the string s attains maximum possible value. Formally speaking, t must satisfy the equation: $\\rho(s, t) = \\operatorname{max}_{u :|u|=|s|} \\rho(s, u)$.\n\nVasya could not try all possible strings to find an answer, so he needs your help. As the answer may be very large, count the number of such strings modulo 10^9 + 7.\n\n\n-----Input-----\n\nThe first line of the input contains a single integer n (1 ≤ n ≤ 10^5).\n\nThe second line of the input contains a single string of length n, consisting of characters \"ACGT\".\n\n\n-----Output-----\n\nPrint a single number — the answer modulo 10^9 + 7.\n\n\n-----Examples-----\nInput\n1\nC\n\nOutput\n1\n\nInput\n2\nAG\n\nOutput\n4\n\nInput\n3\nTTT\n\nOutput\n1\n\n\n\n-----Note-----\n\nPlease note that if for two distinct strings t_1 and t_2 values ρ(s, t_1) и ρ(s, t_2) are maximum among all possible t, then both strings must be taken into account in the answer even if one of them can be obtained by a circular shift of another one.\n\nIn the first sample, there is ρ(\"C\", \"C\") = 1, for the remaining strings t of length 1 the value of ρ(s, t) is 0.\n\nIn the second sample, ρ(\"AG\", \"AG\") = ρ(\"AG\", \"GA\") = ρ(\"AG\", \"AA\") = ρ(\"AG\", \"GG\") = 4.\n\nIn the third sample, ρ(\"TTT\", \"TTT\") = 27\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4038", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4038-ab7922ef", "template_id": "apps::4038", "text": "Let's call some square matrix with integer values in its cells palindromic if it doesn't change after the order of rows is reversed and it doesn't change after the order of columns is reversed.\n\nFor example, the following matrices are palindromic: $\\left[ \\begin{array}{l l l}{1} & {3} & {1} \\\\{3} & {1} & {3} \\\\{1} & {3} & {1} \\end{array} \\right] \\quad \\left[ \\begin{array}{l l l l}{1} & {2} & {2} & {1} \\\\{8} & {2} & {2} & {8} \\\\{8} & {2} & {2} & {8} \\\\{1} & {2} & {2} & {1} \\end{array} \\right]$\n\nThe following matrices are not palindromic because they change after the order of rows is reversed: $\\left[ \\begin{array}{l l l}{1} & {3} & {1} \\\\{3} & {1} & {3} \\\\{2} & {3} & {2} \\end{array} \\right] \\rightarrow \\left[ \\begin{array}{l l l}{2} & {3} & {2} \\\\{3} & {1} & {3} \\\\{1} & {3} & {1} \\end{array} \\right] \\quad \\left[ \\begin{array}{l l l l}{1} & {8} & {8} & {9} \\\\{2} & {4} & {3} & {2} \\\\{1} & {3} & {4} & {1} \\\\{9} & {8} & {8} & {1} \\end{array} \\right] \\rightarrow \\left[ \\begin{array}{l l l l}{9} & {8} & {8} & {1} \\\\{1} & {3} & {4} & {1} \\\\{2} & {4} & {3} & {2} \\\\{1} & {8} & {8} & {9} \\end{array} \\right]$\n\nThe following matrices are not palindromic because they change after the order of columns is reversed: $\\left[ \\begin{array}{l l l}{1} & {3} & {2} \\\\{3} & {1} & {3} \\\\{1} & {3} & {2} \\end{array} \\right] \\rightarrow \\left[ \\begin{array}{l l l}{2} & {3} & {1} \\\\{3} & {1} & {3} \\\\{2} & {3} & {1} \\end{array} \\right] \\quad \\left[ \\begin{array}{l l l l}{1} & {2} & {1} & {9} \\\\{8} & {4} & {3} & {8} \\\\{8} & {3} & {4} & {8} \\\\{9} & {2} & {1} & {1} \\end{array} \\right] \\rightarrow \\left[ \\begin{array}{l l l l}{9} & {1} & {2} & {1} \\\\{8} & {3} & {4} & {8} \\\\{8} & {4} & {3} & {8} \\\\{1} & {1} & {2} & {9} \\end{array} \\right]$\n\nYou are given $n^2$ integers. Put them into a matrix of $n$ rows and $n$ columns so that each number is used exactly once, each cell contains exactly one number and the resulting matrix is palindromic. If there are multiple answers, print any. If there is no solution, print \"NO\".\n\n\n-----Input-----\n\nThe first line contains one integer $n$ ($1 \\le n \\le 20$).\n\nThe second line contains $n^2$ integers $a_1, a_2, \\dots, a_{n^2}$ ($1 \\le a_i \\le 1000$) — the numbers to put into a matrix of $n$ rows and $n$ columns.\n\n\n-----Output-----\n\nIf it is possible to put all of the $n^2$ numbers into a matrix of $n$ rows and $n$ columns so that each number is used exactly once, each cell contains exactly one number and the resulting matrix is palindromic, then print \"YES\". Then print $n$ lines with $n$ space-separated numbers — the resulting matrix.\n\nIf it's impossible to construct any matrix, then print \"NO\".\n\nYou can print each letter in any case (upper or lower). For example, \"YeS\", \"no\" and \"yES\" are all acceptable.\n\n\n-----Examples-----\nInput\n4\n1 8 8 1 2 2 2 2 2 2 2 2 1 8 8 1\n\nOutput\nYES\n1 2 2 1\n8 2 2 8\n8 2 2 8\n1 2 2 1\n\nInput\n3\n1 1 1 1 1 3 3 3 3\n\nOutput\nYES\n1 3 1\n3 1 3\n1 3 1\n\nInput\n4\n1 2 1 9 8 4 3 8 8 3 4 8 9 2 1 1\n\nOutput\nNO\n\nInput\n1\n10\n\nOutput\nYES\n10\n\n\n\n-----Note-----\n\nNote that there exist multiple answers for the first two examples.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4392", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4392-d23a1ef5", "template_id": "apps::4392", "text": "You are given an array $a$ of length $n$.\n\nYou are also given a set of distinct positions $p_1, p_2, \\dots, p_m$, where $1 \\le p_i < n$. The position $p_i$ means that you can swap elements $a[p_i]$ and $a[p_i + 1]$. You can apply this operation any number of times for each of the given positions.\n\nYour task is to determine if it is possible to sort the initial array in non-decreasing order ($a_1 \\le a_2 \\le \\dots \\le a_n$) using only allowed swaps.\n\nFor example, if $a = [3, 2, 1]$ and $p = [1, 2]$, then we can first swap elements $a[2]$ and $a[3]$ (because position $2$ is contained in the given set $p$). We get the array $a = [3, 1, 2]$. Then we swap $a[1]$ and $a[2]$ (position $1$ is also contained in $p$). We get the array $a = [1, 3, 2]$. Finally, we swap $a[2]$ and $a[3]$ again and get the array $a = [1, 2, 3]$, sorted in non-decreasing order.\n\nYou can see that if $a = [4, 1, 2, 3]$ and $p = [3, 2]$ then you cannot sort the array.\n\nYou have to answer $t$ independent test cases.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $t$ ($1 \\le t \\le 100$) — the number of test cases.\n\nThen $t$ test cases follow. The first line of each test case contains two integers $n$ and $m$ ($1 \\le m < n \\le 100$) — the number of elements in $a$ and the number of elements in $p$. The second line of the test case contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 100$). The third line of the test case contains $m$ integers $p_1, p_2, \\dots, p_m$ ($1 \\le p_i < n$, all $p_i$ are distinct) — the set of positions described in the problem statement.\n\n\n-----Output-----\n\nFor each test case, print the answer — \"YES\" (without quotes) if you can sort the initial array in non-decreasing order ($a_1 \\le a_2 \\le \\dots \\le a_n$) using only allowed swaps. Otherwise, print \"NO\".\n\n\n-----Example-----\nInput\n6\n3 2\n3 2 1\n1 2\n4 2\n4 1 2 3\n3 2\n5 1\n1 2 3 4 5\n1\n4 2\n2 1 4 3\n1 3\n4 2\n4 3 2 1\n1 3\n5 2\n2 1 2 3 3\n1 4\n\nOutput\nYES\nNO\nYES\nYES\nNO\nYES\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4171", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4171-9918d333", "template_id": "apps::4171", "text": "The only difference between easy and hard versions is the number of elements in the array.\n\nYou are given an array $a$ consisting of $n$ integers. In one move you can choose any $a_i$ and divide it by $2$ rounding down (in other words, in one move you can set $a_i := \\lfloor\\frac{a_i}{2}\\rfloor$).\n\nYou can perform such an operation any (possibly, zero) number of times with any $a_i$.\n\nYour task is to calculate the minimum possible number of operations required to obtain at least $k$ equal numbers in the array.\n\nDon't forget that it is possible to have $a_i = 0$ after some operations, thus the answer always exists.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $k$ ($1 \\le k \\le n \\le 2 \\cdot 10^5$) — the number of elements in the array and the number of equal numbers required.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 2 \\cdot 10^5$), where $a_i$ is the $i$-th element of $a$.\n\n\n-----Output-----\n\nPrint one integer — the minimum possible number of operations required to obtain at least $k$ equal numbers in the array.\n\n\n-----Examples-----\nInput\n5 3\n1 2 2 4 5\n\nOutput\n1\n\nInput\n5 3\n1 2 3 4 5\n\nOutput\n2\n\nInput\n5 3\n1 2 3 3 3\n\nOutput\n0\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4286", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4286-9773b7d0", "template_id": "apps::4286", "text": "You are given an undirected graph consisting of $n$ vertices. A number is written on each vertex; the number on vertex $i$ is $a_i$. Initially there are no edges in the graph.\n\nYou may add some edges to this graph, but you have to pay for them. The cost of adding an edge between vertices $x$ and $y$ is $a_x + a_y$ coins. There are also $m$ special offers, each of them is denoted by three numbers $x$, $y$ and $w$, and means that you can add an edge connecting vertices $x$ and $y$ and pay $w$ coins for it. You don't have to use special offers: if there is a pair of vertices $x$ and $y$ that has a special offer associated with it, you still may connect these two vertices paying $a_x + a_y$ coins for it.\n\nWhat is the minimum number of coins you have to spend to make the graph connected? Recall that a graph is connected if it's possible to get from any vertex to any other vertex using only the edges belonging to this graph.\n\n\n-----Input-----\n\nThe first line contains two integers $n$ and $m$ ($1 \\le n \\le 2 \\cdot 10^5$, $0 \\le m \\le 2 \\cdot 10^5$) — the number of vertices in the graph and the number of special offers, respectively.\n\nThe second line contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 10^{12}$) — the numbers written on the vertices.\n\nThen $m$ lines follow, each containing three integers $x$, $y$ and $w$ ($1 \\le x, y \\le n$, $1 \\le w \\le 10^{12}$, $x \\ne y$) denoting a special offer: you may add an edge connecting vertex $x$ and vertex $y$, and this edge will cost $w$ coins.\n\n\n-----Output-----\n\nPrint one integer — the minimum number of coins you have to pay to make the graph connected.\n\n\n-----Examples-----\nInput\n3 2\n1 3 3\n2 3 5\n2 1 1\n\nOutput\n5\n\nInput\n4 0\n1 3 3 7\n\nOutput\n16\n\nInput\n5 4\n1 2 3 4 5\n1 2 8\n1 3 10\n1 4 7\n1 5 15\n\nOutput\n18\n\n\n\n-----Note-----\n\nIn the first example it is possible to connect $1$ to $2$ using special offer $2$, and then $1$ to $3$ without using any offers.\n\nIn next two examples the optimal answer may be achieved without using special offers.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4299", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4299-f6fefbd2", "template_id": "apps::4299", "text": "The cat Snuke wants to play a popular Japanese game called ÅtCoder, so Iroha has decided to teach him Japanese.\nWhen counting pencils in Japanese, the counter word \"本\" follows the number. The pronunciation of this word varies depending on the number. Specifically, the pronunciation of \"本\" in the phrase \"N 本\" for a positive integer N not exceeding 999 is as follows:\n - hon when the digit in the one's place of N is 2, 4, 5, 7, or 9;\n - pon when the digit in the one's place of N is 0, 1, 6 or 8;\n - bon when the digit in the one's place of N is 3.\nGiven N, print the pronunciation of \"本\" in the phrase \"N 本\".\n\n-----Constraints-----\n - N is a positive integer not exceeding 999.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\n\n-----Output-----\nPrint the answer.\n\n-----Sample Input-----\n16\n\n-----Sample Output-----\npon\n\nThe digit in the one's place of 16 is 6, so the \"本\" in \"16 本\" is pronounced pon.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4637", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4637-7a5006f3", "template_id": "apps::4637", "text": "You are given two arrays $a$ and $b$ both consisting of $n$ positive (greater than zero) integers. You are also given an integer $k$.\n\nIn one move, you can choose two indices $i$ and $j$ ($1 \\le i, j \\le n$) and swap $a_i$ and $b_j$ (i.e. $a_i$ becomes $b_j$ and vice versa). Note that $i$ and $j$ can be equal or different (in particular, swap $a_2$ with $b_2$ or swap $a_3$ and $b_9$ both are acceptable moves).\n\nYour task is to find the maximum possible sum you can obtain in the array $a$ if you can do no more than (i.e. at most) $k$ such moves (swaps).\n\nYou have to answer $t$ independent test cases.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $t$ ($1 \\le t \\le 200$) — the number of test cases. Then $t$ test cases follow.\n\nThe first line of the test case contains two integers $n$ and $k$ ($1 \\le n \\le 30; 0 \\le k \\le n$) — the number of elements in $a$ and $b$ and the maximum number of moves you can do. The second line of the test case contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 30$), where $a_i$ is the $i$-th element of $a$. The third line of the test case contains $n$ integers $b_1, b_2, \\dots, b_n$ ($1 \\le b_i \\le 30$), where $b_i$ is the $i$-th element of $b$.\n\n\n-----Output-----\n\nFor each test case, print the answer — the maximum possible sum you can obtain in the array $a$ if you can do no more than (i.e. at most) $k$ swaps.\n\n\n-----Example-----\nInput\n5\n2 1\n1 2\n3 4\n5 5\n5 5 6 6 5\n1 2 5 4 3\n5 3\n1 2 3 4 5\n10 9 10 10 9\n4 0\n2 2 4 3\n2 4 2 3\n4 4\n1 2 2 1\n4 4 5 4\n\nOutput\n6\n27\n39\n11\n17\n\n\n\n-----Note-----\n\nIn the first test case of the example, you can swap $a_1 = 1$ and $b_2 = 4$, so $a=[4, 2]$ and $b=[3, 1]$.\n\nIn the second test case of the example, you don't need to swap anything.\n\nIn the third test case of the example, you can swap $a_1 = 1$ and $b_1 = 10$, $a_3 = 3$ and $b_3 = 10$ and $a_2 = 2$ and $b_4 = 10$, so $a=[10, 10, 10, 4, 5]$ and $b=[1, 9, 3, 2, 9]$.\n\nIn the fourth test case of the example, you cannot swap anything.\n\nIn the fifth test case of the example, you can swap arrays $a$ and $b$, so $a=[4, 4, 5, 4]$ and $b=[1, 2, 2, 1]$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4452", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4452-28ddd617", "template_id": "apps::4452", "text": "A positive (strictly greater than zero) integer is called round if it is of the form d00...0. In other words, a positive integer is round if all its digits except the leftmost (most significant) are equal to zero. In particular, all numbers from $1$ to $9$ (inclusive) are round.\n\nFor example, the following numbers are round: $4000$, $1$, $9$, $800$, $90$. The following numbers are not round: $110$, $707$, $222$, $1001$.\n\nYou are given a positive integer $n$ ($1 \\le n \\le 10^4$). Represent the number $n$ as a sum of round numbers using the minimum number of summands (addends). In other words, you need to represent the given number $n$ as a sum of the least number of terms, each of which is a round number.\n\n\n-----Input-----\n\nThe first line contains an integer $t$ ($1 \\le t \\le 10^4$) — the number of test cases in the input. Then $t$ test cases follow.\n\nEach test case is a line containing an integer $n$ ($1 \\le n \\le 10^4$).\n\n\n-----Output-----\n\nPrint $t$ answers to the test cases. Each answer must begin with an integer $k$ — the minimum number of summands. Next, $k$ terms must follow, each of which is a round number, and their sum is $n$. The terms can be printed in any order. If there are several answers, print any of them.\n\n\n-----Example-----\nInput\n5\n5009\n7\n9876\n10000\n10\n\nOutput\n2\n5000 9\n1\n7\n4\n800 70 6 9000\n1\n10000\n1\n10\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4229", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4229-6b9d6b31", "template_id": "apps::4229", "text": "Let us define the FizzBuzz sequence a_1,a_2,... as follows:\n - If both 3 and 5 divides i, a_i=\\mbox{FizzBuzz}.\n - If the above does not hold but 3 divides i, a_i=\\mbox{Fizz}.\n - If none of the above holds but 5 divides i, a_i=\\mbox{Buzz}.\n - If none of the above holds, a_i=i.\nFind the sum of all numbers among the first N terms of the FizzBuzz sequence.\n\n-----Constraints-----\n - 1 \\leq N \\leq 10^6\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\n\n-----Output-----\nPrint the sum of all numbers among the first N terms of the FizzBuzz sequence.\n\n-----Sample Input-----\n15\n\n-----Sample Output-----\n60\n\nThe first 15 terms of the FizzBuzz sequence are:\n1,2,\\mbox{Fizz},4,\\mbox{Buzz},\\mbox{Fizz},7,8,\\mbox{Fizz},\\mbox{Buzz},11,\\mbox{Fizz},13,14,\\mbox{FizzBuzz}\nAmong them, numbers are 1,2,4,7,8,11,13,14, and the sum of them is 60.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4096", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "val", "task_family": "apps_introductory", "task_id": "real::apps::apps-4096-cc1b6b63", "template_id": "apps::4096", "text": "The only difference between easy and hard versions is the constraints.\n\nPolycarp has to write a coursework. The coursework consists of $m$ pages.\n\nPolycarp also has $n$ cups of coffee. The coffee in the $i$-th cup has $a_i$ caffeine in it. Polycarp can drink some cups of coffee (each one no more than once). He can drink cups in any order. Polycarp drinks each cup instantly and completely (i.e. he cannot split any cup into several days).\n\nSurely, courseworks are not usually being written in a single day (in a perfect world of Berland, at least). Some of them require multiple days of hard work.\n\nLet's consider some day of Polycarp's work. Consider Polycarp drinks $k$ cups of coffee during this day and caffeine dosages of cups Polycarp drink during this day are $a_{i_1}, a_{i_2}, \\dots, a_{i_k}$. Then the first cup he drinks gives him energy to write $a_{i_1}$ pages of coursework, the second cup gives him energy to write $max(0, a_{i_2} - 1)$ pages, the third cup gives him energy to write $max(0, a_{i_3} - 2)$ pages, ..., the $k$-th cup gives him energy to write $max(0, a_{i_k} - k + 1)$ pages.\n\nIf Polycarp doesn't drink coffee during some day, he cannot write coursework at all that day.\n\nPolycarp has to finish his coursework as soon as possible (spend the minimum number of days to do it). Your task is to find out this number of days or say that it is impossible.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $m$ ($1 \\le n \\le 100$, $1 \\le m \\le 10^4$) — the number of cups of coffee and the number of pages in the coursework.\n\nThe second line of the input contains $n$ integers $a_1, a_2, \\dots, a_n$ ($1 \\le a_i \\le 100$), where $a_i$ is the caffeine dosage of coffee in the $i$-th cup.\n\n\n-----Output-----\n\nIf it is impossible to write the coursework, print -1. Otherwise print the minimum number of days Polycarp needs to do it.\n\n\n-----Examples-----\nInput\n5 8\n2 3 1 1 2\n\nOutput\n4\n\nInput\n7 10\n1 3 4 2 1 4 2\n\nOutput\n2\n\nInput\n5 15\n5 5 5 5 5\n\nOutput\n1\n\nInput\n5 16\n5 5 5 5 5\n\nOutput\n2\n\nInput\n5 26\n5 5 5 5 5\n\nOutput\n-1\n\n\n\n-----Note-----\n\nIn the first example Polycarp can drink fourth cup during first day (and write $1$ page), first and second cups during second day (and write $2 + (3 - 1) = 4$ pages), fifth cup during the third day (and write $2$ pages) and third cup during the fourth day (and write $1$ page) so the answer is $4$. It is obvious that there is no way to write the coursework in three or less days in this test.\n\nIn the second example Polycarp can drink third, fourth and second cups during first day (and write $4 + (2 - 1) + (3 - 2) = 6$ pages) and sixth cup during second day (and write $4$ pages) so the answer is $2$. It is obvious that Polycarp cannot write the whole coursework in one day in this test.\n\nIn the third example Polycarp can drink all cups of coffee during first day and write $5 + (5 - 1) + (5 - 2) + (5 - 3) + (5 - 4) = 15$ pages of coursework.\n\nIn the fourth example Polycarp cannot drink all cups during first day and should drink one of them during the second day. So during first day he will write $5 + (5 - 1) + (5 - 2) + (5 - 3) = 14$ pages of coursework and during second day he will write $5$ pages of coursework. This is enough to complete it.\n\nIn the fifth example Polycarp cannot write the whole coursework at all, even if he will drink one cup of coffee during each day, so the answer is -1.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/0", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-0", "template_id": "humaneval::HumanEval/0", "text": "from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/2", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-2", "template_id": "humaneval::HumanEval/2", "text": "def truncate_number(number: float) -> float:\n \"\"\" Given a positive floating point number, it can be decomposed into\n and integer part (largest integer smaller than given number) and decimals\n (leftover part always smaller than 1).\n\n Return the decimal part of the number.\n >>> truncate_number(3.5)\n 0.5\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/15", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-15", "template_id": "humaneval::HumanEval/15", "text": "def string_sequence(n: int) -> str:\n \"\"\" Return a string containing space-delimited numbers starting from 0 upto n inclusive.\n >>> string_sequence(0)\n '0'\n >>> string_sequence(5)\n '0 1 2 3 4 5'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/16", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-16", "template_id": "humaneval::HumanEval/16", "text": "def count_distinct_characters(string: str) -> int:\n \"\"\" Given a string, find out how many distinct characters (regardless of case) does it consist of\n >>> count_distinct_characters('xyzXYZ')\n 3\n >>> count_distinct_characters('Jerry')\n 4\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/23", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-23", "template_id": "humaneval::HumanEval/23", "text": "def strlen(string: str) -> int:\n \"\"\" Return length of given string\n >>> strlen('')\n 0\n >>> strlen('abc')\n 3\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/29", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-29", "template_id": "humaneval::HumanEval/29", "text": "from typing import List\n\n\ndef filter_by_prefix(strings: List[str], prefix: str) -> List[str]:\n \"\"\" Filter an input list of strings only for ones that start with a given prefix.\n >>> filter_by_prefix([], 'a')\n []\n >>> filter_by_prefix(['abc', 'bcd', 'cde', 'array'], 'a')\n ['abc', 'array']\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/30", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-30", "template_id": "humaneval::HumanEval/30", "text": "def get_positive(l: list):\n \"\"\"Return only positive numbers in the list.\n >>> get_positive([-1, 2, -4, 5, 6])\n [2, 5, 6]\n >>> get_positive([5, 3, -5, 2, -3, 3, 9, 0, 123, 1, -10])\n [5, 3, 2, 3, 9, 123, 1]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/36", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-36", "template_id": "humaneval::HumanEval/36", "text": "def fizz_buzz(n: int):\n \"\"\"Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13.\n >>> fizz_buzz(50)\n 0\n >>> fizz_buzz(78)\n 2\n >>> fizz_buzz(79)\n 3\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/43", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-43", "template_id": "humaneval::HumanEval/43", "text": "def pairs_sum_to_zero(l):\n \"\"\"\n pairs_sum_to_zero takes a list of integers as an input.\n it returns True if there are two distinct elements in the list that\n sum to zero, and False otherwise.\n >>> pairs_sum_to_zero([1, 3, 5, 0])\n False\n >>> pairs_sum_to_zero([1, 3, -2, 1])\n False\n >>> pairs_sum_to_zero([1, 2, 3, 7])\n False\n >>> pairs_sum_to_zero([2, 4, -5, 3, 5, 7])\n True\n >>> pairs_sum_to_zero([1])\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/48", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-48", "template_id": "humaneval::HumanEval/48", "text": "def is_palindrome(text: str):\n \"\"\"\n Checks if given string is a palindrome\n >>> is_palindrome('')\n True\n >>> is_palindrome('aba')\n True\n >>> is_palindrome('aaaaa')\n True\n >>> is_palindrome('zbcd')\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/50", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-50", "template_id": "humaneval::HumanEval/50", "text": "def encode_shift(s: str):\n \"\"\"\n returns encoded string by shifting every character by 5 in the alphabet.\n \"\"\"\n return \"\".join([chr(((ord(ch) + 5 - ord(\"a\")) % 26) + ord(\"a\")) for ch in s])\n\n\ndef decode_shift(s: str):\n \"\"\"\n takes as input string encoded with encode_shift function. Returns decoded string.\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/51", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-51", "template_id": "humaneval::HumanEval/51", "text": "def remove_vowels(text):\n \"\"\"\n remove_vowels is a function that takes string and returns string without vowels.\n >>> remove_vowels('')\n ''\n >>> remove_vowels(\"abcdef\\nghijklm\")\n 'bcdf\\nghjklm'\n >>> remove_vowels('abcdef')\n 'bcdf'\n >>> remove_vowels('aaaaa')\n ''\n >>> remove_vowels('aaBAA')\n 'B'\n >>> remove_vowels('zbcd')\n 'zbcd'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/52", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-52", "template_id": "humaneval::HumanEval/52", "text": "def below_threshold(l: list, t: int):\n \"\"\"Return True if all numbers in the list l are below threshold t.\n >>> below_threshold([1, 2, 4, 10], 100)\n True\n >>> below_threshold([1, 20, 4, 10], 5)\n False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/58", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-58", "template_id": "humaneval::HumanEval/58", "text": "def common(l1: list, l2: list):\n \"\"\"Return sorted unique common elements for two lists.\n >>> common([1, 4, 3, 34, 653, 2, 5], [5, 7, 1, 5, 9, 653, 121])\n [1, 5, 653]\n >>> common([5, 3, 2, 8], [3, 2])\n [2, 3]\n\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/59", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-59", "template_id": "humaneval::HumanEval/59", "text": "def largest_prime_factor(n: int):\n \"\"\"Return the largest prime factor of n. Assume n > 1 and is not a prime.\n >>> largest_prime_factor(13195)\n 29\n >>> largest_prime_factor(2048)\n 2\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/62", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-62", "template_id": "humaneval::HumanEval/62", "text": "def derivative(xs: list):\n \"\"\" xs represent coefficients of a polynomial.\n xs[0] + xs[1] * x + xs[2] * x^2 + ....\n Return derivative of this polynomial in the same form.\n >>> derivative([3, 1, 2, 4, 5])\n [1, 4, 12, 20]\n >>> derivative([1, 2, 3])\n [2, 6]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/65", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-65", "template_id": "humaneval::HumanEval/65", "text": "def circular_shift(x, shift):\n \"\"\"Circular shift the digits of the integer x, shift the digits right by shift\n and return the result as a string.\n If shift > number of digits, return digits reversed.\n >>> circular_shift(12, 1)\n \"21\"\n >>> circular_shift(12, 2)\n \"12\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/70", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-70", "template_id": "humaneval::HumanEval/70", "text": "def strange_sort_list(lst):\n '''\n Given list of integers, return list in strange order.\n Strange sorting, is when you start with the minimum value,\n then maximum of the remaining integers, then minimum and so on.\n\n Examples:\n strange_sort_list([1, 2, 3, 4]) == [1, 4, 2, 3]\n strange_sort_list([5, 5, 5, 5]) == [5, 5, 5, 5]\n strange_sort_list([]) == []\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/72", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-72", "template_id": "humaneval::HumanEval/72", "text": "def will_it_fly(q,w):\n '''\n Write a function that returns True if the object q will fly, and False otherwise.\n The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.\n\n Example:\n will_it_fly([1, 2], 5) ➞ False\n # 1+2 is less than the maximum possible weight, but it's unbalanced.\n\n will_it_fly([3, 2, 3], 1) ➞ False\n # it's balanced, but 3+2+3 is more than the maximum possible weight.\n\n will_it_fly([3, 2, 3], 9) ➞ True\n # 3+2+3 is less than the maximum possible weight, and it's balanced.\n\n will_it_fly([3], 5) ➞ True\n # 3 is less than the maximum possible weight, and it's balanced.\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/74", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-74", "template_id": "humaneval::HumanEval/74", "text": "def total_match(lst1, lst2):\n '''\n Write a function that accepts two lists of strings and returns the list that has\n total number of chars in the all strings of the list less than the other list.\n\n if the two lists have the same number of chars, return the first list.\n\n Examples\n total_match([], []) ➞ []\n total_match(['hi', 'admin'], ['hI', 'Hi']) ➞ ['hI', 'Hi']\n total_match(['hi', 'admin'], ['hi', 'hi', 'admin', 'project']) ➞ ['hi', 'admin']\n total_match(['hi', 'admin'], ['hI', 'hi', 'hi']) ➞ ['hI', 'hi', 'hi']\n total_match(['4'], ['1', '2', '3', '4', '5']) ➞ ['4']\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/76", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-76", "template_id": "humaneval::HumanEval/76", "text": "def is_simple_power(x, n):\n \"\"\"Your task is to write a function that returns true if a number x is a simple\n power of n and false in other cases.\n x is a simple power of n if n**int=x\n For example:\n is_simple_power(1, 4) => true\n is_simple_power(2, 2) => true\n is_simple_power(8, 2) => true\n is_simple_power(3, 2) => false\n is_simple_power(3, 1) => false\n is_simple_power(5, 3) => false\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/80", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-80", "template_id": "humaneval::HumanEval/80", "text": "def is_happy(s):\n \"\"\"You are given a string s.\n Your task is to check if the string is happy or not.\n A string is happy if its length is at least 3 and every 3 consecutive letters are distinct\n For example:\n is_happy(a) => False\n is_happy(aa) => False\n is_happy(abcd) => True\n is_happy(aabb) => False\n is_happy(adb) => True\n is_happy(xyy) => False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/84", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-84", "template_id": "humaneval::HumanEval/84", "text": "def solve(N):\n \"\"\"Given a positive integer N, return the total sum of its digits in binary.\n\n Example\n For N = 1000, the sum of digits will be 1 the output should be \"1\".\n For N = 150, the sum of digits will be 6 the output should be \"110\".\n For N = 147, the sum of digits will be 12 the output should be \"1100\".\n\n Variables:\n @N integer\n Constraints: 0 ≤ N ≤ 10000.\n Output:\n a string of binary number\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/96", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-96", "template_id": "humaneval::HumanEval/96", "text": "def count_up_to(n):\n \"\"\"Implement a function that takes an non-negative integer and returns an array of the first n\n integers that are prime numbers and less than n.\n for example:\n count_up_to(5) => [2,3]\n count_up_to(11) => [2,3,5,7]\n count_up_to(0) => []\n count_up_to(20) => [2,3,5,7,11,13,17,19]\n count_up_to(1) => []\n count_up_to(18) => [2,3,5,7,11,13,17]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/104", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-104", "template_id": "humaneval::HumanEval/104", "text": "def unique_digits(x):\n \"\"\"Given a list of positive integers x. return a sorted list of all\n elements that hasn't any even digit.\n\n Note: Returned list should be sorted in increasing order.\n\n For example:\n >>> unique_digits([15, 33, 1422, 1])\n [1, 15, 33]\n >>> unique_digits([152, 323, 1422, 10])\n []\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/113", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-113", "template_id": "humaneval::HumanEval/113", "text": "def odd_count(lst):\n \"\"\"Given a list of strings, where each string consists of only digits, return a list.\n Each element i of the output should be \"the number of odd elements in the\n string i of the input.\" where all the i's should be replaced by the number\n of odd digits in the i'th string of the input.\n\n >>> odd_count(['1234567'])\n [\"the number of odd elements 4n the str4ng 4 of the 4nput.\"]\n >>> odd_count(['3',\"11111111\"])\n [\"the number of odd elements 1n the str1ng 1 of the 1nput.\",\n \"the number of odd elements 8n the str8ng 8 of the 8nput.\"]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/117", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-117", "template_id": "humaneval::HumanEval/117", "text": "def select_words(s, n):\n \"\"\"Given a string s and a natural number n, you have been tasked to implement\n a function that returns a list of all words from string s that contain exactly\n n consonants, in order these words appear in the string s.\n If the string s is empty then the function should return an empty list.\n Note: you may assume the input string contains only letters and spaces.\n Examples:\n select_words(\"Mary had a little lamb\", 4) ==> [\"little\"]\n select_words(\"Mary had a little lamb\", 3) ==> [\"Mary\", \"lamb\"]\n select_words(\"simple white space\", 2) ==> []\n select_words(\"Hello world\", 4) ==> [\"world\"]\n select_words(\"Uncle sam\", 3) ==> [\"Uncle\"]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/120", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-120", "template_id": "humaneval::HumanEval/120", "text": "def maximum(arr, k):\n \"\"\"\n Given an array arr of integers and a positive integer k, return a sorted list\n of length k with the maximum k numbers in arr.\n\n Example 1:\n\n Input: arr = [-3, -4, 5], k = 3\n Output: [-4, -3, 5]\n\n Example 2:\n\n Input: arr = [4, -4, 4], k = 2\n Output: [4, 4]\n\n Example 3:\n\n Input: arr = [-3, 2, 1, 2, -1, -2, 1], k = 1\n Output: [2]\n\n Note:\n 1. The length of the array will be in the range of [1, 1000].\n 2. The elements in the array will be in the range of [-1000, 1000].\n 3. 0 <= k <= len(arr)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/121", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-121", "template_id": "humaneval::HumanEval/121", "text": "def solution(lst):\n \"\"\"Given a non-empty list of integers, return the sum of all of the odd elements that are in even positions.\n\n\n Examples\n solution([5, 8, 7, 1]) ==> 12\n solution([3, 3, 3, 3, 3]) ==> 9\n solution([30, 13, 24, 321]) ==>0\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/122", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-122", "template_id": "humaneval::HumanEval/122", "text": "def add_elements(arr, k):\n \"\"\"\n Given a non-empty array of integers arr and an integer k, return\n the sum of the elements with at most two digits from the first k elements of arr.\n\n Example:\n\n Input: arr = [111,21,3,4000,5,6,7,8,9], k = 4\n Output: 24 # sum of 21 + 3\n\n Constraints:\n 1. 1 <= len(arr) <= 100\n 2. 1 <= k <= len(arr)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/127", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-127", "template_id": "humaneval::HumanEval/127", "text": "def intersection(interval1, interval2):\n \"\"\"You are given two intervals,\n where each interval is a pair of integers. For example, interval = (start, end) = (1, 2).\n The given intervals are closed which means that the interval (start, end)\n includes both start and end.\n For each given interval, it is assumed that its start is less or equal its end.\n Your task is to determine whether the length of intersection of these two\n intervals is a prime number.\n Example, the intersection of the intervals (1, 3), (2, 4) is (2, 3)\n which its length is 1, which not a prime number.\n If the length of the intersection is a prime number, return \"YES\",\n otherwise, return \"NO\".\n If the two intervals don't intersect, return \"NO\".\n\n\n [input/output] samples:\n intersection((1, 2), (2, 3)) ==> \"NO\"\n intersection((-1, 1), (0, 4)) ==> \"NO\"\n intersection((-3, -1), (-5, 5)) ==> \"YES\"\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/134", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-134", "template_id": "humaneval::HumanEval/134", "text": "def check_if_last_char_is_a_letter(txt):\n '''\n Create a function that returns True if the last character\n of a given string is an alphabetical character and is not\n a part of a word, and False otherwise.\n Note: \"word\" is a group of characters separated by space.\n\n Examples:\n check_if_last_char_is_a_letter(\"apple pie\") ➞ False\n check_if_last_char_is_a_letter(\"apple pi e\") ➞ True\n check_if_last_char_is_a_letter(\"apple pi e \") ➞ False\n check_if_last_char_is_a_letter(\"\") ➞ False\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/138", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-138", "template_id": "humaneval::HumanEval/138", "text": "def is_equal_to_sum_even(n):\n \"\"\"Evaluate whether the given number n can be written as the sum of exactly 4 positive even numbers\n Example\n is_equal_to_sum_even(4) == False\n is_equal_to_sum_even(6) == False\n is_equal_to_sum_even(8) == True\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/141", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-141", "template_id": "humaneval::HumanEval/141", "text": "def file_name_check(file_name):\n \"\"\"Create a function which takes a string representing a file's name, and returns\n 'Yes' if the the file's name is valid, and returns 'No' otherwise.\n A file's name is considered to be valid if and only if all the following conditions\n are met:\n - There should not be more than three digits ('0'-'9') in the file's name.\n - The file's name contains exactly one dot '.'\n - The substring before the dot should not be empty, and it starts with a letter from\n the latin alphapet ('a'-'z' and 'A'-'Z').\n - The substring after the dot should be one of these: ['txt', 'exe', 'dll']\n Examples:\n file_name_check(\"example.txt\") # => 'Yes'\n file_name_check(\"1example.dll\") # => 'No' (the name should start with a latin alphapet letter)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/144", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-144", "template_id": "humaneval::HumanEval/144", "text": "def simplify(x, n):\n \"\"\"Your task is to implement a function that will simplify the expression\n x * n. The function returns True if x * n evaluates to a whole number and False\n otherwise. Both x and n, are string representation of a fraction, and have the following format,\n / where both numerator and denominator are positive whole numbers.\n\n You can assume that x, and n are valid fractions, and do not have zero as denominator.\n\n simplify(\"1/5\", \"5/1\") = True\n simplify(\"1/6\", \"2/1\") = False\n simplify(\"7/10\", \"10/2\") = False\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/146", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-146", "template_id": "humaneval::HumanEval/146", "text": "def specialFilter(nums):\n \"\"\"Write a function that takes an array of numbers as input and returns\n the number of elements in the array that are greater than 10 and both\n first and last digits of a number are odd (1, 3, 5, 7, 9).\n For example:\n specialFilter([15, -73, 14, -15]) => 1\n specialFilter([33, -2, -3, 45, 21, 109]) => 2\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/147", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-147", "template_id": "humaneval::HumanEval/147", "text": "def get_max_triples(n):\n \"\"\"\n You are given a positive integer n. You have to create an integer array a of length n.\n For each i (1 ≤ i ≤ n), the value of a[i] = i * i - i + 1.\n Return the number of triples (a[i], a[j], a[k]) of a where i < j < k,\n and a[i] + a[j] + a[k] is a multiple of 3.\n\n Example :\n Input: n = 5\n Output: 1\n Explanation:\n a = [1, 3, 7, 13, 21]\n The only valid triple is (1, 7, 13).\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/148", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-148", "template_id": "humaneval::HumanEval/148", "text": "def bf(planet1, planet2):\n '''\n There are eight planets in our solar system: the closerst to the Sun\n is Mercury, the next one is Venus, then Earth, Mars, Jupiter, Saturn,\n Uranus, Neptune.\n Write a function that takes two planet names as strings planet1 and planet2.\n The function should return a tuple containing all planets whose orbits are\n located between the orbit of planet1 and the orbit of planet2, sorted by\n the proximity to the sun.\n The function should return an empty tuple if planet1 or planet2\n are not correct planet names.\n Examples\n bf(\"Jupiter\", \"Neptune\") ==> (\"Saturn\", \"Uranus\")\n bf(\"Earth\", \"Mercury\") ==> (\"Venus\")\n bf(\"Mercury\", \"Uranus\") ==> (\"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\")\n '''\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/149", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-149", "template_id": "humaneval::HumanEval/149", "text": "def sorted_list_sum(lst):\n \"\"\"Write a function that accepts a list of strings as a parameter,\n deletes the strings that have odd lengths from it,\n and returns the resulted list with a sorted order,\n The list is always a list of strings and never an array of numbers,\n and it may contain duplicates.\n The order of the list should be ascending by length of each word, and you\n should return the list sorted by that rule.\n If two words have the same length, sort the list alphabetically.\n The function should return a list of strings in sorted order.\n You may assume that all words will have the same length.\n For example:\n assert list_sort([\"aa\", \"a\", \"aaa\"]) => [\"aa\"]\n assert list_sort([\"ab\", \"a\", \"aaa\", \"cd\"]) => [\"ab\", \"cd\"]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/152", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-152", "template_id": "humaneval::HumanEval/152", "text": "def compare(game,guess):\n \"\"\"I think we all remember that feeling when the result of some long-awaited\n event is finally known. The feelings and thoughts you have at that moment are\n definitely worth noting down and comparing.\n Your task is to determine if a person correctly guessed the results of a number of matches.\n You are given two arrays of scores and guesses of equal length, where each index shows a match.\n Return an array of the same length denoting how far off each guess was. If they have guessed correctly,\n the value is 0, and if not, the value is the absolute difference between the guess and the score.\n\n\n example:\n\n compare([1,2,3,4,5,1],[1,2,3,4,2,-2]) -> [0,0,0,0,3,3]\n compare([0,5,0,0,0,4],[4,1,1,0,0,-2]) -> [4,4,1,0,0,6]\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/159", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-159", "template_id": "humaneval::HumanEval/159", "text": "def eat(number, need, remaining):\n \"\"\"\n You're a hungry rabbit, and you already have eaten a certain number of carrots,\n but now you need to eat more carrots to complete the day's meals.\n you should return an array of [ total number of eaten carrots after your meals,\n the number of carrots left after your meals ]\n if there are not enough remaining carrots, you will eat all remaining carrots, but will still be hungry.\n\n Example:\n * eat(5, 6, 10) -> [11, 4]\n * eat(4, 8, 9) -> [12, 1]\n * eat(1, 10, 10) -> [11, 0]\n * eat(2, 11, 5) -> [7, 0]\n\n Variables:\n @number : integer\n the number of carrots that you have eaten.\n @need : integer\n the number of carrots that you need to eat.\n @remaining : integer\n the number of remaining carrots thet exist in stock\n\n Constrain:\n * 0 <= number <= 1000\n * 0 <= need <= 1000\n * 0 <= remaining <= 1000\n\n Have fun :)\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/162", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-162", "template_id": "humaneval::HumanEval/162", "text": "def string_to_md5(text):\n \"\"\"\n Given a string 'text', return its md5 hash equivalent string.\n If 'text' is an empty string, return None.\n\n >>> string_to_md5('Hello world') == '3e25960a79dbc69b674cd4ec67a72c62'\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "humaneval::coding::humaneval::humaneval::HumanEval/163", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "humaneval", "split": "test", "task_family": "humaneval", "task_id": "real::humaneval::humaneval-163", "template_id": "humaneval::HumanEval/163", "text": "def generate_integers(a, b):\n \"\"\"\n Given two positive integers a and b, return the even digits between a\n and b, in ascending order.\n\n For example:\n generate_integers(2, 8) => [2, 4, 6, 8]\n generate_integers(8, 2) => [2, 4, 6, 8]\n generate_integers(10, 14) => []\n \"\"\"\n\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::7", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::7", "template_id": "mbpp::7", "text": "Write a function to find all words which are at least 4 characters long in a string by using regex.\n\nYour function must be named `find_char_long`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::11", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::11", "template_id": "mbpp::11", "text": "Write a python function to remove first and last occurrence of a given character from the string.\n\nYour function must be named `remove_Occ`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::18", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::18", "template_id": "mbpp::18", "text": "Write a function to remove characters from the first string which are present in the second string.\n\nYour function must be named `str_to_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::22", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::22", "template_id": "mbpp::22", "text": "Write a function to find the first duplicate element in a given array of integers.\n\nYour function must be named `find_first_duplicate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::23", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::23", "template_id": "mbpp::23", "text": "Write a python function to find the maximum sum of elements of list in a list of lists.\n\nYour function must be named `maximum_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::25", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::25", "template_id": "mbpp::25", "text": "Write a python function to find the product of non-repeated elements in a given array.\n\nYour function must be named `find_Product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::29", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::29", "template_id": "mbpp::29", "text": "Write a python function to find the element occurring odd number of times.\n\nYour function must be named `get_Odd_Occurrence`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::30", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::30", "template_id": "mbpp::30", "text": "Write a python function to count all the substrings starting and ending with same characters.\n\nYour function must be named `check_Equality`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::33", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::33", "template_id": "mbpp::33", "text": "Write a python function to convert a decimal number to binary number.\n\nYour function must be named `decimal_To_Binary`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::35", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::35", "template_id": "mbpp::35", "text": "Write a function to find the n-th rectangular number.\n\nYour function must be named `find_rect_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::36", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::36", "template_id": "mbpp::36", "text": "Write a python function to find the nth digit in the proper fraction of two given numbers.\n\nYour function must be named `find_Nth_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::39", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::39", "template_id": "mbpp::39", "text": "Write a function to check if the letters of a given string can be rearranged so that two characters that are adjacent to each other are different.\n\nYour function must be named `rearange_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::42", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::42", "template_id": "mbpp::42", "text": "Write a python function to find the sum of repeated elements in a given array.\n\nYour function must be named `find_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::44", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::44", "template_id": "mbpp::44", "text": "Write a function that matches a word at the beginning of a string.\n\nYour function must be named `text_match_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::49", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::49", "template_id": "mbpp::49", "text": "Write a function to extract every first or specified element from a given two-dimensional list.\n\nYour function must be named `specified_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::53", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::53", "template_id": "mbpp::53", "text": "Write a python function to check whether the first and last characters of a given string are equal or not.\n\nYour function must be named `check_Equality`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::54", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::54", "template_id": "mbpp::54", "text": "Write a function to sort the given array by using counting sort.\n\nYour function must be named `counting_sort`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::55", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::55", "template_id": "mbpp::55", "text": "Write a function to find t-nth term of geometric series.\n\nYour function must be named `tn_gp`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::56", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::56", "template_id": "mbpp::56", "text": "Write a python function to check if a given number is one less than twice its reverse.\n\nYour function must be named `rev`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::61", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::61", "template_id": "mbpp::61", "text": "Write a python function to count number of substrings with the sum of digits equal to their length.\n\nYour function must be named `count_Substrings`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::63", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::63", "template_id": "mbpp::63", "text": "Write a function to find the maximum difference between available pairs in the given tuple list.\n\nYour function must be named `max_difference`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::66", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::66", "template_id": "mbpp::66", "text": "Write a python function to count positive numbers in a list.\n\nYour function must be named `pos_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::77", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::77", "template_id": "mbpp::77", "text": "Write a python function to find the difference between sum of even and odd digits.\n\nYour function must be named `is_Diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::83", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::83", "template_id": "mbpp::83", "text": "Write a python function to find the character made by adding all the characters of the given string.\n\nYour function must be named `get_Char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::92", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::92", "template_id": "mbpp::92", "text": "Write a function to check whether the given number is undulating or not.\n\nYour function must be named `is_undulating`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::95", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::95", "template_id": "mbpp::95", "text": "Write a python function to find the minimum length of sublist.\n\nYour function must be named `Find_Min_Length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::97", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::97", "template_id": "mbpp::97", "text": "Write a function to find frequency count of list of lists.\n\nYour function must be named `frequency_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::108", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::108", "template_id": "mbpp::108", "text": "Write a function to merge multiple sorted inputs into a single sorted iterator using heap queue algorithm.\n\nYour function must be named `merge_sorted_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::109", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::109", "template_id": "mbpp::109", "text": "Write a python function to find the count of rotations of a binary string with odd value.\n\nYour function must be named `odd_Equivalent`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::116", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::116", "template_id": "mbpp::116", "text": "Write a function to convert a given tuple of positive integers into an integer.\n\nYour function must be named `tuple_to_int`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::117", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::117", "template_id": "mbpp::117", "text": "Write a function to convert all possible convertible elements in the list to float.\n\nYour function must be named `list_to_float`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::119", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::119", "template_id": "mbpp::119", "text": "Write a python function to find the element that appears only once in a sorted array.\n\nYour function must be named `search`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::121", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::121", "template_id": "mbpp::121", "text": "Write a function to find the triplet with sum of the given array\n\nYour function must be named `check_triplet`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::122", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::122", "template_id": "mbpp::122", "text": "Write a function to find n’th smart number.\n\nYour function must be named `smartNumber`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::124", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::124", "template_id": "mbpp::124", "text": "Write a function to get the angle of a complex number.\n\nYour function must be named `angle_complex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::125", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::125", "template_id": "mbpp::125", "text": "Write a function to find the maximum difference between the number of 0s and number of 1s in any sub-string of the given binary string.\n\nYour function must be named `find_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::129", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::129", "template_id": "mbpp::129", "text": "Write a function to calculate magic square.\n\nYour function must be named `magic_square_test`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::136", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::136", "template_id": "mbpp::136", "text": "Write a function to calculate electricity bill.\n\nYour function must be named `cal_electbill`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::139", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::139", "template_id": "mbpp::139", "text": "Write a function to find the circumference of a circle.\n\nYour function must be named `circle_circumference`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::142", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::142", "template_id": "mbpp::142", "text": "Write a function to count the same pair in three given lists.\n\nYour function must be named `count_samepair`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::149", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::149", "template_id": "mbpp::149", "text": "Write a function to find the longest subsequence such that the difference between adjacents is one for the given array.\n\nYour function must be named `longest_subseq_with_diff_one`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::150", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::150", "template_id": "mbpp::150", "text": "Write a python function to find whether the given number is present in the infinite sequence or not.\n\nYour function must be named `does_Contain_B`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::152", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::152", "template_id": "mbpp::152", "text": "Write a function to sort the given array by using merge sort.\n\nYour function must be named `merge`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::154", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::154", "template_id": "mbpp::154", "text": "Write a function to extract every specified element from a given two dimensional list.\n\nYour function must be named `specified_element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::160", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::160", "template_id": "mbpp::160", "text": "Write a function to find x and y that satisfies ax + by = n.\n\nYour function must be named `solution`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::178", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::178", "template_id": "mbpp::178", "text": "Write a function to search some literals strings in a string.\n\nYour function must be named `string_literals`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::185", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::185", "template_id": "mbpp::185", "text": "Write a function to find the focus of a parabola.\n\nYour function must be named `parabola_focus`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::190", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::190", "template_id": "mbpp::190", "text": "Write a python function to count the number of integral co-ordinates that lie inside a square.\n\nYour function must be named `count_Intgral_Points`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::191", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::191", "template_id": "mbpp::191", "text": "Write a function to check whether the given month name contains 30 days or not.\n\nYour function must be named `check_monthnumber`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::197", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::197", "template_id": "mbpp::197", "text": "Write a function to perform the exponentiation of the given two tuples.\n\nYour function must be named `find_exponentio`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::199", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::199", "template_id": "mbpp::199", "text": "Write a python function to find highest power of 2 less than or equal to given number.\n\nYour function must be named `highest_Power_of_2`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::204", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::204", "template_id": "mbpp::204", "text": "Write a python function to count the occurrence of a given character in a string.\n\nYour function must be named `count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::209", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::209", "template_id": "mbpp::209", "text": "Write a function to delete the smallest element from the given heap and then insert a new item.\n\nYour function must be named `heap_replace`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::210", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::210", "template_id": "mbpp::210", "text": "Write a function to check that the given string contains only a certain set of characters(in this case a-z, a-z and 0-9) by using regex.\n\nYour function must be named `is_allowed_specific_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::218", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::218", "template_id": "mbpp::218", "text": "Write a python function to find the minimum operations required to make two numbers equal.\n\nYour function must be named `min_Operations`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::223", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::223", "template_id": "mbpp::223", "text": "Write a function to check for majority element in the given sorted array.\n\nYour function must be named `is_majority`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::225", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::225", "template_id": "mbpp::225", "text": "Write a python function to find the minimum element in a sorted and rotated array.\n\nYour function must be named `find_Min`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::227", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::227", "template_id": "mbpp::227", "text": "Write a function to find minimum of three numbers.\n\nYour function must be named `min_of_three`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::228", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::228", "template_id": "mbpp::228", "text": "Write a python function to check whether all the bits are unset in the given range or not.\n\nYour function must be named `all_Bits_Set_In_The_Given_Range`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::229", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::229", "template_id": "mbpp::229", "text": "Write a function to re-arrange the elements of the given array so that all negative elements appear before positive ones.\n\nYour function must be named `re_arrange_array`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::232", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::232", "template_id": "mbpp::232", "text": "Write a function to get the n largest items from a dataset.\n\nYour function must be named `larg_nnum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::234", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::234", "template_id": "mbpp::234", "text": "Write a function to find the volume of a cube.\n\nYour function must be named `volume_cube`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::236", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::236", "template_id": "mbpp::236", "text": "Write a python function to count the maximum number of equilateral triangles that can be formed within a given equilateral triangle.\n\nYour function must be named `No_of_Triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::239", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::239", "template_id": "mbpp::239", "text": "Write a function to find the number of possible sequences of length n such that each of the next element is greater than or equal to twice of the previous element but less than or equal to m.\n\nYour function must be named `get_total_number_of_sequences`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::241", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::241", "template_id": "mbpp::241", "text": "Write a function to generate a 3d array having each element as '*'.\n\nYour function must be named `array_3d`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::244", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::244", "template_id": "mbpp::244", "text": "Write a python function to find the next perfect square greater than a given number.\n\nYour function must be named `next_Perfect_Square`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::249", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::249", "template_id": "mbpp::249", "text": "Write a function to find the intersection of two arrays using lambda function.\n\nYour function must be named `intersection_array`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::254", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::254", "template_id": "mbpp::254", "text": "Write a function to find all words starting with 'a' or 'e' in a given string.\n\nYour function must be named `words_ae`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::258", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::258", "template_id": "mbpp::258", "text": "Write a function to find number of odd elements in the given list using lambda function.\n\nYour function must be named `count_odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::260", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::260", "template_id": "mbpp::260", "text": "Write a function to find the nth newman–shanks–williams prime number.\n\nYour function must be named `newman_prime`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::266", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::266", "template_id": "mbpp::266", "text": "Write a function to find the lateral surface area of a cube.\n\nYour function must be named `lateralsurface_cube`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::274", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::274", "template_id": "mbpp::274", "text": "Write a python function to find sum of even index binomial coefficients.\n\nYour function must be named `even_binomial_Coeff_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::276", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::276", "template_id": "mbpp::276", "text": "Write a function to find the volume of a cylinder.\n\nYour function must be named `volume_cylinder`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::279", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::279", "template_id": "mbpp::279", "text": "Write a function to find the nth decagonal number.\n\nYour function must be named `is_num_decagonal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::281", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::281", "template_id": "mbpp::281", "text": "Write a python function to check if the elements of a given list are unique or not.\n\nYour function must be named `all_unique`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::286", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::286", "template_id": "mbpp::286", "text": "Write a function to find the largest sum of contiguous array in the modified array which is formed by repeating the given array k times.\n\nYour function must be named `max_sub_array_sum_repeated`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::297", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::297", "template_id": "mbpp::297", "text": "Write a function to flatten a given nested list structure.\n\nYour function must be named `flatten_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::300", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::300", "template_id": "mbpp::300", "text": "Write a function to find the count of all binary sequences of length 2n such that sum of first n bits is same as sum of last n bits.\n\nYour function must be named `count_binary_seq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::304", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::304", "template_id": "mbpp::304", "text": "Write a python function to find element at a given index after number of rotations.\n\nYour function must be named `find_Element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::317", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::317", "template_id": "mbpp::317", "text": "Write a function to reflect the modified run-length encoding from a list.\n\nYour function must be named `modified_encode`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::318", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::318", "template_id": "mbpp::318", "text": "Write a python function to find the maximum volume of a cuboid with given sum of sides.\n\nYour function must be named `max_volume`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::321", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::321", "template_id": "mbpp::321", "text": "Write a function to find the demlo number for the given number.\n\nYour function must be named `find_demlo`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::334", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::334", "template_id": "mbpp::334", "text": "Write a python function to check whether the triangle is valid or not if sides are given.\n\nYour function must be named `check_Validity`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::339", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::339", "template_id": "mbpp::339", "text": "Write a python function to find the maximum occuring divisor in an interval.\n\nYour function must be named `find_Divisor`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::342", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::342", "template_id": "mbpp::342", "text": "Write a function to find the smallest range that includes at-least one element from each of the given arrays.\n\nYour function must be named `__init__`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::351", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::351", "template_id": "mbpp::351", "text": "Write a python function to find the first element occurring k times in a given array.\n\nYour function must be named `first_Element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::355", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::355", "template_id": "mbpp::355", "text": "Write a python function to count the number of rectangles in a circle of radius r.\n\nYour function must be named `count_Rectangles`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::357", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::357", "template_id": "mbpp::357", "text": "Write a function to find the maximum element of all the given tuple records.\n\nYour function must be named `find_max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::358", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::358", "template_id": "mbpp::358", "text": "Write a function to find modulo division of two lists using map and lambda function.\n\nYour function must be named `moddiv_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::360", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::360", "template_id": "mbpp::360", "text": "Write a function to find the n’th carol number.\n\nYour function must be named `get_carol`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::365", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::365", "template_id": "mbpp::365", "text": "Write a python function to count the number of digits of a given number.\n\nYour function must be named `count_Digit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::368", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::368", "template_id": "mbpp::368", "text": "Write a function to repeat the given tuple n times.\n\nYour function must be named `repeat_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::375", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::375", "template_id": "mbpp::375", "text": "Write a function to round the given number to the nearest multiple of a specific number.\n\nYour function must be named `round_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::380", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::380", "template_id": "mbpp::380", "text": "Write a function to generate a two-dimensional array.\n\nYour function must be named `multi_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::381", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::381", "template_id": "mbpp::381", "text": "Write a function to sort a list of lists by a given index of the inner list.\n\nYour function must be named `index_on_inner_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::383", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::383", "template_id": "mbpp::383", "text": "Write a python function to toggle all odd bits of a given number.\n\nYour function must be named `even_bit_toggle_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::386", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::386", "template_id": "mbpp::386", "text": "Write a function to find out the minimum no of swaps required for bracket balancing in the given string.\n\nYour function must be named `swap_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::388", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::388", "template_id": "mbpp::388", "text": "Write a python function to find the highest power of 2 that is less than or equal to n.\n\nYour function must be named `highest_Power_of_2`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::391", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::391", "template_id": "mbpp::391", "text": "Write a function to convert more than one list to nested dictionary.\n\nYour function must be named `convert_list_dictionary`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::394", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::394", "template_id": "mbpp::394", "text": "Write a function to check if given tuple is distinct or not.\n\nYour function must be named `check_distinct`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::396", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::396", "template_id": "mbpp::396", "text": "Write a function to check whether the given string starts and ends with the same character or not using regex.\n\nYour function must be named `check_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::406", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::406", "template_id": "mbpp::406", "text": "Write a python function to find the parity of a given number.\n\nYour function must be named `find_Parity`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::417", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::417", "template_id": "mbpp::417", "text": "Write a function to find common first element in given list of tuple.\n\nYour function must be named `group_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::418", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::418", "template_id": "mbpp::418", "text": "Write a python function to find the sublist having maximum length.\n\nYour function must be named `Find_Max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::420", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::420", "template_id": "mbpp::420", "text": "Write a python function to find the cube sum of first n even natural numbers.\n\nYour function must be named `cube_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::421", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::421", "template_id": "mbpp::421", "text": "Write a function to concatenate each element of tuple by the delimiter.\n\nYour function must be named `concatenate_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::423", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::423", "template_id": "mbpp::423", "text": "Write a function to solve gold mine problem.\n\nYour function must be named `get_maxgold`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::429", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::429", "template_id": "mbpp::429", "text": "Write a function to extract the elementwise and tuples from the given two tuples.\n\nYour function must be named `and_tuples`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::436", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::436", "template_id": "mbpp::436", "text": "Write a python function to print negative numbers in a list.\n\nYour function must be named `neg_nos`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::438", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::438", "template_id": "mbpp::438", "text": "Write a function to count bidirectional tuple pairs.\n\nYour function must be named `count_bidirectional`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::439", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::439", "template_id": "mbpp::439", "text": "Write a function to convert a list of multiple integers into a single integer.\n\nYour function must be named `multiple_to_single`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::445", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::445", "template_id": "mbpp::445", "text": "Write a function to perform index wise multiplication of tuple elements in the given two tuples.\n\nYour function must be named `index_multiplication`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::454", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::454", "template_id": "mbpp::454", "text": "Write a function that matches a word containing 'z'.\n\nYour function must be named `text_match_wordz`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::457", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::457", "template_id": "mbpp::457", "text": "Write a python function to find the sublist having minimum length.\n\nYour function must be named `Find_Min`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::459", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::459", "template_id": "mbpp::459", "text": "Write a function to remove uppercase substrings from a given string by using regex.\n\nYour function must be named `remove_uppercase`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::461", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::461", "template_id": "mbpp::461", "text": "Write a python function to count the upper case characters in a given string.\n\nYour function must be named `upper_ctr`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::462", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::462", "template_id": "mbpp::462", "text": "Write a function to find all possible combinations of the elements of a given list.\n\nYour function must be named `combinations_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::463", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::463", "template_id": "mbpp::463", "text": "Write a function to find the maximum product subarray of the given array.\n\nYour function must be named `max_subarray_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::466", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::466", "template_id": "mbpp::466", "text": "Write a function to find the peak element in the given array.\n\nYour function must be named `find_peak_util`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::467", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::467", "template_id": "mbpp::467", "text": "Write a python function to convert decimal number to octal number.\n\nYour function must be named `decimal_to_Octal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::469", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::469", "template_id": "mbpp::469", "text": "Write a function to find the maximum profit earned from a maximum of k stock transactions\n\nYour function must be named `max_profit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::474", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::474", "template_id": "mbpp::474", "text": "Write a function to replace characters in a string.\n\nYour function must be named `replace_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::480", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::480", "template_id": "mbpp::480", "text": "Write a python function to find the maximum occurring character in a given string.\n\nYour function must be named `get_max_occuring_char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::489", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::489", "template_id": "mbpp::489", "text": "Write a python function to find the frequency of the largest value in a given array.\n\nYour function must be named `frequency_Of_Largest`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::490", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::490", "template_id": "mbpp::490", "text": "Write a function to extract all the pairs which are symmetric in the given tuple list.\n\nYour function must be named `extract_symmetric`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::500", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::500", "template_id": "mbpp::500", "text": "Write a function to concatenate all elements of the given list into a string.\n\nYour function must be named `concatenate_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::506", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::506", "template_id": "mbpp::506", "text": "Write a function to calculate the permutation coefficient of given p(n, k).\n\nYour function must be named `permutation_coefficient`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::507", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::507", "template_id": "mbpp::507", "text": "Write a function to remove specific words from a given list.\n\nYour function must be named `remove_words`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::511", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::511", "template_id": "mbpp::511", "text": "Write a python function to find minimum sum of factors of a given number.\n\nYour function must be named `find_Min_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::514", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::514", "template_id": "mbpp::514", "text": "Write a function to find the summation of tuple elements in the given tuple list.\n\nYour function must be named `sum_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::517", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::517", "template_id": "mbpp::517", "text": "Write a python function to find the largest postive number from the given list.\n\nYour function must be named `largest_pos`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::521", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::521", "template_id": "mbpp::521", "text": "Write a function to print check if the triangle is scalene or not.\n\nYour function must be named `check_isosceles`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::523", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::523", "template_id": "mbpp::523", "text": "Write a function to check whether a given string has a capital letter, a lower case letter, a number and specified length using lambda function.\n\nYour function must be named `check_string`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::527", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::527", "template_id": "mbpp::527", "text": "Write a function to find all pairs in an integer array whose sum is equal to a given number.\n\nYour function must be named `get_pairs_count`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::528", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::528", "template_id": "mbpp::528", "text": "Write a function to find the list of lists with minimum length.\n\nYour function must be named `min_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::529", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::529", "template_id": "mbpp::529", "text": "Write a function to find the nth jacobsthal-lucas number.\n\nYour function must be named `jacobsthal_lucas`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::532", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::532", "template_id": "mbpp::532", "text": "Write a function to check if the two given strings are permutations of each other.\n\nYour function must be named `check_permutation`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::538", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::538", "template_id": "mbpp::538", "text": "Write a python function to convert a given string list to a tuple.\n\nYour function must be named `string_list_to_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::539", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::539", "template_id": "mbpp::539", "text": "Write a function to create a list containing the power of said number in bases raised to the corresponding number in the index using map function.\n\nYour function must be named `basesnum_coresspondingnum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::540", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::540", "template_id": "mbpp::540", "text": "Write a python function to find the difference between highest and least frequencies in a given array.\n\nYour function must be named `find_Diff`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::541", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::541", "template_id": "mbpp::541", "text": "Write a function to find if the given number is abundant or not.\n\nYour function must be named `get_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::555", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::555", "template_id": "mbpp::555", "text": "Write a python function to find the difference between sum of cubes of first n natural numbers and the sum of first n natural numbers.\n\nYour function must be named `difference`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::583", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::583", "template_id": "mbpp::583", "text": "Write a function for nth catalan number.\n\nYour function must be named `catalan_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::586", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::586", "template_id": "mbpp::586", "text": "Write a python function to split the array and add the first part to the end.\n\nYour function must be named `split_Arr`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::590", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::590", "template_id": "mbpp::590", "text": "Write a function to convert polar coordinates to rectangular coordinates.\n\nYour function must be named `polar_rect`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::598", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::598", "template_id": "mbpp::598", "text": "Write a function to check whether the given number is armstrong or not.\n\nYour function must be named `armstrong_number`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::599", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::599", "template_id": "mbpp::599", "text": "Write a function to find sum and average of first n natural numbers.\n\nYour function must be named `sum_average`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::605", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::605", "template_id": "mbpp::605", "text": "Write a function to check if the given integer is a prime number.\n\nYour function must be named `prime_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::606", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::606", "template_id": "mbpp::606", "text": "Write a function to convert degrees to radians.\n\nYour function must be named `radian_degree`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::619", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::619", "template_id": "mbpp::619", "text": "Write a function to move all the numbers in it to the given string.\n\nYour function must be named `move_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::621", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::621", "template_id": "mbpp::621", "text": "Write a function to increment the numeric values in the given strings by k.\n\nYour function must be named `increment_numerics`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::630", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::630", "template_id": "mbpp::630", "text": "Write a function to extract all the adjacent coordinates of the given coordinate tuple.\n\nYour function must be named `adjac`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::633", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::633", "template_id": "mbpp::633", "text": "Write a python function to find the sum of xor of all pairs of numbers in the given array.\n\nYour function must be named `pair_OR_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::634", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::634", "template_id": "mbpp::634", "text": "Write a python function to find the sum of fourth power of first n even natural numbers.\n\nYour function must be named `even_Power_Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::659", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::659", "template_id": "mbpp::659", "text": "Write a python function to print duplicants from a list of integers.\n\nYour function must be named `Repeat`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::660", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::660", "template_id": "mbpp::660", "text": "Write a python function to choose points from two ranges such that no point lies in both the ranges.\n\nYour function must be named `find_Points`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::662", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::662", "template_id": "mbpp::662", "text": "Write a function to sort a list in a dictionary.\n\nYour function must be named `sorted_dict`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::664", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::664", "template_id": "mbpp::664", "text": "Write a python function to find the average of even numbers till a given even number.\n\nYour function must be named `average_Even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::665", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::665", "template_id": "mbpp::665", "text": "Write a python function to shift first element to the end of given list.\n\nYour function must be named `move_last`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::670", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::670", "template_id": "mbpp::670", "text": "Write a python function to check whether a sequence of numbers has a decreasing trend or not.\n\nYour function must be named `decreasing_trend`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::671", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::671", "template_id": "mbpp::671", "text": "Write a python function to set the right most unset bit.\n\nYour function must be named `get_Pos_Of_Right_most_Set_Bit`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::675", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::675", "template_id": "mbpp::675", "text": "Write a function to add two integers. however, if the sum is between the given range it will return 20.\n\nYour function must be named `sum_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::677", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::677", "template_id": "mbpp::677", "text": "Write a function to check if the triangle is valid or not.\n\nYour function must be named `validity_triangle`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::682", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::682", "template_id": "mbpp::682", "text": "Write a function to multiply two lists using map and lambda function.\n\nYour function must be named `mul_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::684", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::684", "template_id": "mbpp::684", "text": "Write a python function to count occurences of a character in a repeated string.\n\nYour function must be named `count_Char`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::687", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::687", "template_id": "mbpp::687", "text": "Write a function to find the greatest common divisor (gcd) of two integers by using recursion.\n\nYour function must be named `recur_gcd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::695", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::695", "template_id": "mbpp::695", "text": "Write a function to check if each element of the second tuple is greater than its corresponding index in the first tuple.\n\nYour function must be named `check_greater`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::696", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::696", "template_id": "mbpp::696", "text": "Write a function to zip two given lists of lists.\n\nYour function must be named `zip_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::697", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::697", "template_id": "mbpp::697", "text": "Write a function to find number of even elements in the given list using lambda function.\n\nYour function must be named `count_even`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::698", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::698", "template_id": "mbpp::698", "text": "Write a function to sort dictionary items by tuple product of keys for the given dictionary with tuple keys.\n\nYour function must be named `sort_dict_item`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::712", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::712", "template_id": "mbpp::712", "text": "Write a function to remove duplicates from a list of lists.\n\nYour function must be named `remove_duplicate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::713", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::713", "template_id": "mbpp::713", "text": "Write a function to check if the given tuple contains all valid values or not.\n\nYour function must be named `check_valid`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::718", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::718", "template_id": "mbpp::718", "text": "Write a function to create a list taking alternate elements from another given list.\n\nYour function must be named `alternate_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::719", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::719", "template_id": "mbpp::719", "text": "Write a function that matches a string that has an a followed by zero or more b's.\n\nYour function must be named `text_match`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::722", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::722", "template_id": "mbpp::722", "text": "Write a function to filter the height and width of students which are stored in a dictionary.\n\nYour function must be named `filter_data`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::729", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::729", "template_id": "mbpp::729", "text": "Write a function to add two lists using map and lambda function.\n\nYour function must be named `add_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::732", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::732", "template_id": "mbpp::732", "text": "Write a function to replace all occurrences of spaces, commas, or dots with a colon.\n\nYour function must be named `replace_specialchar`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::736", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::736", "template_id": "mbpp::736", "text": "Write a function to locate the left insertion point for a specified value in sorted order.\n\nYour function must be named `left_insertion`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::742", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::742", "template_id": "mbpp::742", "text": "Write a function to caluclate the area of a tetrahedron.\n\nYour function must be named `area_tetrahedron`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::744", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::744", "template_id": "mbpp::744", "text": "Write a function to check if the given tuple has any none value or not.\n\nYour function must be named `check_none`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::745", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::745", "template_id": "mbpp::745", "text": "Write a function to find numbers within a given range where every number is divisible by every digit it contains.\n\nYour function must be named `divisible_by_digits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::748", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::748", "template_id": "mbpp::748", "text": "Write a function to put spaces between words starting with capital letters in a given string by using regex.\n\nYour function must be named `capital_words_spaces`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::758", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::758", "template_id": "mbpp::758", "text": "Write a function to count number of unique lists within a list.\n\nYour function must be named `unique_sublists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::760", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::760", "template_id": "mbpp::760", "text": "Write a python function to check whether an array contains only one distinct element or not.\n\nYour function must be named `unique_Element`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::766", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::766", "template_id": "mbpp::766", "text": "Write a function to iterate over all pairs of consecutive items in a given list.\n\nYour function must be named `pair_wise`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::768", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::768", "template_id": "mbpp::768", "text": "Write a python function to check for odd parity of a given number.\n\nYour function must be named `check_Odd_Parity`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::772", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::772", "template_id": "mbpp::772", "text": "Write a function to remove all the words with k length in the given string.\n\nYour function must be named `remove_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::778", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::778", "template_id": "mbpp::778", "text": "Write a function to pack consecutive duplicates of a given list elements into sublists.\n\nYour function must be named `pack_consecutive_duplicates`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::779", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::779", "template_id": "mbpp::779", "text": "Write a function to count the number of unique lists within a list.\n\nYour function must be named `unique_sublists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::785", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::785", "template_id": "mbpp::785", "text": "Write a function to convert tuple string to integer tuple.\n\nYour function must be named `tuple_str_int`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::786", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::786", "template_id": "mbpp::786", "text": "Write a function to locate the right insertion point for a specified value in sorted order.\n\nYour function must be named `right_insertion`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::789", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::789", "template_id": "mbpp::789", "text": "Write a function to calculate the perimeter of a regular polygon.\n\nYour function must be named `perimeter_polygon`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::792", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::792", "template_id": "mbpp::792", "text": "Write a python function to count the number of lists in a given number of lists.\n\nYour function must be named `count_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::795", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::795", "template_id": "mbpp::795", "text": "Write a function to find the n - cheap price items from a given dataset using heap queue algorithm.\n\nYour function must be named `cheap_items`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::797", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::797", "template_id": "mbpp::797", "text": "Write a python function to find the sum of all odd natural numbers within the range l and r.\n\nYour function must be named `sum_Odd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::798", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::798", "template_id": "mbpp::798", "text": "Write a python function to find the sum of an array.\n\nYour function must be named `_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::801", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::801", "template_id": "mbpp::801", "text": "Write a python function to count the number of equal numbers from three given integers.\n\nYour function must be named `test_three_equal`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::803", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::803", "template_id": "mbpp::803", "text": "Write a python function to check whether the given number is a perfect square or not.\n\nYour function must be named `is_Perfect_Square`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::812", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::812", "template_id": "mbpp::812", "text": "Write a function to abbreviate 'road' as 'rd.' in a given string.\n\nYour function must be named `road_rd`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::813", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::813", "template_id": "mbpp::813", "text": "Write a function to find length of the string.\n\nYour function must be named `string_length`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::817", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::817", "template_id": "mbpp::817", "text": "Write a function to find numbers divisible by m or n from a list of numbers using lambda function.\n\nYour function must be named `div_of_nums`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::819", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::819", "template_id": "mbpp::819", "text": "Write a function to count the frequency of consecutive duplicate elements in a given list of numbers.\n\nYour function must be named `count_duplic`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::830", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::830", "template_id": "mbpp::830", "text": "Write a function to round up a number to specific digits.\n\nYour function must be named `round_up`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::836", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::836", "template_id": "mbpp::836", "text": "Write a function to find length of the subarray having maximum sum.\n\nYour function must be named `max_sub_array_sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::838", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::838", "template_id": "mbpp::838", "text": "Write a python function to find minimum number swaps required to make two binary strings equal.\n\nYour function must be named `min_Swaps`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::848", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::848", "template_id": "mbpp::848", "text": "Write a function to find the area of a trapezium.\n\nYour function must be named `area_trapezium`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::849", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::849", "template_id": "mbpp::849", "text": "Write a python function to find sum of all prime divisors of a given number.\n\nYour function must be named `Sum`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::853", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::853", "template_id": "mbpp::853", "text": "Write a python function to find sum of odd factors of a number.\n\nYour function must be named `sum_of_odd_Factors`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::854", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::854", "template_id": "mbpp::854", "text": "Write a function which accepts an arbitrary list and converts it to a heap using heap queue algorithm.\n\nYour function must be named `raw_heap`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::859", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::859", "template_id": "mbpp::859", "text": "Write a function to generate all sublists of a given list.\n\nYour function must be named `sub_lists`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::862", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::862", "template_id": "mbpp::862", "text": "Write a function to find the occurrences of n most common words in a given text.\n\nYour function must be named `n_common_words`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::863", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::863", "template_id": "mbpp::863", "text": "Write a function to find the length of the longest sub-sequence such that elements in the subsequences are consecutive integers.\n\nYour function must be named `find_longest_conseq_subseq`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::865", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::865", "template_id": "mbpp::865", "text": "Write a function to print n-times a list using map function.\n\nYour function must be named `ntimes_list`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::866", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::866", "template_id": "mbpp::866", "text": "Write a function to check whether the given month name contains 31 days or not.\n\nYour function must be named `check_monthnumb`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::867", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::867", "template_id": "mbpp::867", "text": "Write a python function to add a minimum number such that the sum of array becomes even.\n\nYour function must be named `min_Num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::869", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::869", "template_id": "mbpp::869", "text": "Write a function to remove sublists from a given list of lists, which are outside a given range.\n\nYour function must be named `remove_list_range`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::872", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::872", "template_id": "mbpp::872", "text": "Write a function to check if a nested list is a subset of another nested list.\n\nYour function must be named `check_subset`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::877", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::877", "template_id": "mbpp::877", "text": "Write a python function to sort the given string.\n\nYour function must be named `sort_String`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::879", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::879", "template_id": "mbpp::879", "text": "Write a function that matches a string that has an 'a' followed by anything, ending in 'b' by using regex.\n\nYour function must be named `text_match`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::882", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::882", "template_id": "mbpp::882", "text": "Write a function to caluclate perimeter of a parallelogram.\n\nYour function must be named `parallelogram_perimeter`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::885", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::885", "template_id": "mbpp::885", "text": "Write a python function to check whether the two given strings are isomorphic to each other or not.\n\nYour function must be named `is_Isomorphic`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::897", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::897", "template_id": "mbpp::897", "text": "Write a python function to check whether the word is present in a given sentence or not.\n\nYour function must be named `is_Word_Present`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::898", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::898", "template_id": "mbpp::898", "text": "Write a function to extract specified number of elements from a given list, which follow each other continuously.\n\nYour function must be named `extract_elements`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::899", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::899", "template_id": "mbpp::899", "text": "Write a python function to check whether an array can be sorted or not by picking only the corner elements.\n\nYour function must be named `check`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::900", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::900", "template_id": "mbpp::900", "text": "Write a function where a string will start with a specific number.\n\nYour function must be named `match_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::903", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::903", "template_id": "mbpp::903", "text": "Write a python function to count the total unset bits from 1 to n.\n\nYour function must be named `count_Unset_Bits`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::904", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::904", "template_id": "mbpp::904", "text": "Write a function to return true if the given number is even else return false.\n\nYour function must be named `even_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::907", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::907", "template_id": "mbpp::907", "text": "Write a function to print the first n lucky numbers.\n\nYour function must be named `lucky_num`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::908", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::908", "template_id": "mbpp::908", "text": "Write a function to find the fixed point in the given array.\n\nYour function must be named `find_fixed_point`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::911", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::911", "template_id": "mbpp::911", "text": "Write a function to compute maximum product of three numbers of a given array of integers using heap queue algorithm.\n\nYour function must be named `maximum_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::918", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::918", "template_id": "mbpp::918", "text": "Write a function to count coin change.\n\nYour function must be named `coin_change`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::920", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::920", "template_id": "mbpp::920", "text": "Write a function to remove all tuples with all none values in the given tuple list.\n\nYour function must be named `remove_tuple`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::922", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::922", "template_id": "mbpp::922", "text": "Write a function to find a pair with the highest product from a given array of integers.\n\nYour function must be named `max_product`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::926", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::926", "template_id": "mbpp::926", "text": "Write a function to find n-th rencontres number.\n\nYour function must be named `binomial_coeffi`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::929", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::929", "template_id": "mbpp::929", "text": "Write a function to count repeated items of a tuple.\n\nYour function must be named `count_tuplex`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::930", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::930", "template_id": "mbpp::930", "text": "Write a function that matches a string that has an a followed by zero or more b's by using regex.\n\nYour function must be named `text_match`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::941", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::941", "template_id": "mbpp::941", "text": "Write a function to count the elements in a list until an element is a tuple.\n\nYour function must be named `count_elim`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::954", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::954", "template_id": "mbpp::954", "text": "Write a function that gives profit amount if the given amount has profit else return none.\n\nYour function must be named `profit_amount`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::964", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::964", "template_id": "mbpp::964", "text": "Write a python function to check whether the length of the word is even or not.\n\nYour function must be named `word_len`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::967", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::967", "template_id": "mbpp::967", "text": "Write a python function to accept the strings which contains all vowels.\n\nYour function must be named `check`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::968", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::968", "template_id": "mbpp::968", "text": "Write a python function to find maximum possible value for the given periodic function.\n\nYour function must be named `floor_Max`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::972", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::972", "template_id": "mbpp::972", "text": "Write a function to concatenate the given two tuples to a nested tuple.\n\nYour function must be named `concatenate_nested`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "mbpp::coding::mbpp::mbpp::973", "hard_negative_type": null, "interface_type": "function_call", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "mbpp", "split": "test", "task_family": "mbpp", "task_id": "real::mbpp::973", "template_id": "mbpp::973", "text": "Write a python function to left rotate the string.\n\nYour function must be named `left_rotate`.\nReturn only the function in a single python code block. No explanation."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3993", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_competition", "task_id": "real::apps::apps-3993-3c45e648", "template_id": "apps::3993", "text": "Recently, Tokitsukaze found an interesting game. Tokitsukaze had $n$ items at the beginning of this game. However, she thought there were too many items, so now she wants to discard $m$ ($1 \\le m \\le n$) special items of them.\n\nThese $n$ items are marked with indices from $1$ to $n$. In the beginning, the item with index $i$ is placed on the $i$-th position. Items are divided into several pages orderly, such that each page contains exactly $k$ positions and the last positions on the last page may be left empty.\n\nTokitsukaze would do the following operation: focus on the first special page that contains at least one special item, and at one time, Tokitsukaze would discard all special items on this page. After an item is discarded or moved, its old position would be empty, and then the item below it, if exists, would move up to this empty position. The movement may bring many items forward and even into previous pages, so Tokitsukaze would keep waiting until all the items stop moving, and then do the operation (i.e. check the special page and discard the special items) repeatedly until there is no item need to be discarded.\n\n [Image] Consider the first example from the statement: $n=10$, $m=4$, $k=5$, $p=[3, 5, 7, 10]$. The are two pages. Initially, the first page is special (since it is the first page containing a special item). So Tokitsukaze discards the special items with indices $3$ and $5$. After, the first page remains to be special. It contains $[1, 2, 4, 6, 7]$, Tokitsukaze discards the special item with index $7$. After, the second page is special (since it is the first page containing a special item). It contains $[9, 10]$, Tokitsukaze discards the special item with index $10$.\n\nTokitsukaze wants to know the number of operations she would do in total.\n\n\n-----Input-----\n\nThe first line contains three integers $n$, $m$ and $k$ ($1 \\le n \\le 10^{18}$, $1 \\le m \\le 10^5$, $1 \\le m, k \\le n$) — the number of items, the number of special items to be discarded and the number of positions in each page.\n\nThe second line contains $m$ distinct integers $p_1, p_2, \\ldots, p_m$ ($1 \\le p_1 < p_2 < \\ldots < p_m \\le n$) — the indices of special items which should be discarded.\n\n\n-----Output-----\n\nPrint a single integer — the number of operations that Tokitsukaze would do in total.\n\n\n-----Examples-----\nInput\n10 4 5\n3 5 7 10\n\nOutput\n3\n\nInput\n13 4 5\n7 8 9 10\n\nOutput\n1\n\n\n\n-----Note-----\n\nFor the first example:\n\n In the first operation, Tokitsukaze would focus on the first page $[1, 2, 3, 4, 5]$ and discard items with indices $3$ and $5$; In the second operation, Tokitsukaze would focus on the first page $[1, 2, 4, 6, 7]$ and discard item with index $7$; In the third operation, Tokitsukaze would focus on the second page $[9, 10]$ and discard item with index $10$.\n\nFor the second example, Tokitsukaze would focus on the second page $[6, 7, 8, 9, 10]$ and discard all special items at once.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3738", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_competition", "task_id": "real::apps::apps-3738-cd39e7ba", "template_id": "apps::3738", "text": "Fox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by string s. Each character of s is one move operation. There are four move operations at all: 'U': go up, (x, y) → (x, y+1); 'D': go down, (x, y) → (x, y-1); 'L': go left, (x, y) → (x-1, y); 'R': go right, (x, y) → (x+1, y).\n\nThe robot will do the operations in s from left to right, and repeat it infinite times. Help Fox Ciel to determine if after some steps the robot will located in (a, b).\n\n\n-----Input-----\n\nThe first line contains two integers a and b, ( - 10^9 ≤ a, b ≤ 10^9). The second line contains a string s (1 ≤ |s| ≤ 100, s only contains characters 'U', 'D', 'L', 'R') — the command.\n\n\n-----Output-----\n\nPrint \"Yes\" if the robot will be located at (a, b), and \"No\" otherwise.\n\n\n-----Examples-----\nInput\n2 2\nRU\n\nOutput\nYes\n\nInput\n1 2\nRU\n\nOutput\nNo\n\nInput\n-1 1000000000\nLRRLU\n\nOutput\nYes\n\nInput\n0 0\nD\n\nOutput\nYes\n\n\n\n-----Note-----\n\nIn the first and second test case, command string is \"RU\", so the robot will go right, then go up, then right, and then up and so on.\n\nThe locations of its moves are (0, 0) → (1, 0) → (1, 1) → (2, 1) → (2, 2) → ...\n\nSo it can reach (2, 2) but not (1, 2).\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3911", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_competition", "task_id": "real::apps::apps-3911-800ce635", "template_id": "apps::3911", "text": "Your friend recently gave you some slimes for your birthday. You have n slimes all initially with value 1.\n\nYou are going to play a game with these slimes. Initially, you put a single slime by itself in a row. Then, you will add the other n - 1 slimes one by one. When you add a slime, you place it at the right of all already placed slimes. Then, while the last two slimes in the row have the same value v, you combine them together to create a slime with value v + 1.\n\nYou would like to see what the final state of the row is after you've added all n slimes. Please print the values of the slimes in the row from left to right.\n\n\n-----Input-----\n\nThe first line of the input will contain a single integer, n (1 ≤ n ≤ 100 000).\n\n\n-----Output-----\n\nOutput a single line with k integers, where k is the number of slimes in the row after you've finished the procedure described in the problem statement. The i-th of these numbers should be the value of the i-th slime from the left.\n\n\n-----Examples-----\nInput\n1\n\nOutput\n1\n\nInput\n2\n\nOutput\n2\n\nInput\n3\n\nOutput\n2 1\n\nInput\n8\n\nOutput\n4\n\n\n\n-----Note-----\n\nIn the first sample, we only have a single slime with value 1. The final state of the board is just a single slime with value 1.\n\nIn the second sample, we perform the following steps:\n\nInitially we place a single slime in a row by itself. Thus, row is initially 1.\n\nThen, we will add another slime. The row is now 1 1. Since two rightmost slimes have the same values, we should replace these slimes with one with value 2. Thus, the final state of the board is 2.\n\nIn the third sample, after adding the first two slimes, our row is 2. After adding one more slime, the row becomes 2 1.\n\nIn the last sample, the steps look as follows: 1 2 2 1 3 3 1 3 2 3 2 1 4\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3735", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_competition", "task_id": "real::apps::apps-3735-d7940530", "template_id": "apps::3735", "text": "You are given a positive integer $n$.\n\nLet $S(x)$ be sum of digits in base 10 representation of $x$, for example, $S(123) = 1 + 2 + 3 = 6$, $S(0) = 0$.\n\nYour task is to find two integers $a, b$, such that $0 \\leq a, b \\leq n$, $a + b = n$ and $S(a) + S(b)$ is the largest possible among all such pairs.\n\n\n-----Input-----\n\nThe only line of input contains an integer $n$ $(1 \\leq n \\leq 10^{12})$.\n\n\n-----Output-----\n\nPrint largest $S(a) + S(b)$ among all pairs of integers $a, b$, such that $0 \\leq a, b \\leq n$ and $a + b = n$.\n\n\n-----Examples-----\nInput\n35\n\nOutput\n17\n\nInput\n10000000000\n\nOutput\n91\n\n\n\n-----Note-----\n\nIn the first example, you can choose, for example, $a = 17$ and $b = 18$, so that $S(17) + S(18) = 1 + 7 + 1 + 8 = 17$. It can be shown that it is impossible to get a larger answer.\n\nIn the second test example, you can choose, for example, $a = 5000000001$ and $b = 4999999999$, with $S(5000000001) + S(4999999999) = 91$. It can be shown that it is impossible to get a larger answer.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_competition::apps::3985", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_competition", "task_id": "real::apps::apps-3985-cf7a93f2", "template_id": "apps::3985", "text": "You have written on a piece of paper an array of n positive integers a[1], a[2], ..., a[n] and m good pairs of integers (i_1, j_1), (i_2, j_2), ..., (i_{m}, j_{m}). Each good pair (i_{k}, j_{k}) meets the following conditions: i_{k} + j_{k} is an odd number and 1 ≤ i_{k} < j_{k} ≤ n.\n\nIn one operation you can perform a sequence of actions: take one of the good pairs (i_{k}, j_{k}) and some integer v (v > 1), which divides both numbers a[i_{k}] and a[j_{k}]; divide both numbers by v, i. e. perform the assignments: $a [ i_{k} ] = \\frac{a [ i_{k} ]}{v}$ and $a [ j_{k} ] = \\frac{a [ j_{k} ]}{v}$.\n\nDetermine the maximum number of operations you can sequentially perform on the given array. Note that one pair may be used several times in the described operations.\n\n\n-----Input-----\n\nThe first line contains two space-separated integers n, m (2 ≤ n ≤ 100, 1 ≤ m ≤ 100).\n\nThe second line contains n space-separated integers a[1], a[2], ..., a[n] (1 ≤ a[i] ≤ 10^9) — the description of the array.\n\nThe following m lines contain the description of good pairs. The k-th line contains two space-separated integers i_{k}, j_{k} (1 ≤ i_{k} < j_{k} ≤ n, i_{k} + j_{k} is an odd number).\n\nIt is guaranteed that all the good pairs are distinct.\n\n\n-----Output-----\n\nOutput the answer for the problem.\n\n\n-----Examples-----\nInput\n3 2\n8 3 8\n1 2\n2 3\n\nOutput\n0\n\nInput\n3 2\n8 12 8\n1 2\n2 3\n\nOutput\n2\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::748", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-748-924e9cfc", "template_id": "apps::748", "text": "Xenia the mathematician has a sequence consisting of n (n is divisible by 3) positive integers, each of them is at most 7. She wants to split the sequence into groups of three so that for each group of three a, b, c the following conditions held: a < b < c; a divides b, b divides c.\n\nNaturally, Xenia wants each element of the sequence to belong to exactly one group of three. Thus, if the required partition exists, then it has $\\frac{n}{3}$ groups of three.\n\nHelp Xenia, find the required partition or else say that it doesn't exist.\n\n\n-----Input-----\n\nThe first line contains integer n (3 ≤ n ≤ 99999) — the number of elements in the sequence. The next line contains n positive integers, each of them is at most 7.\n\nIt is guaranteed that n is divisible by 3.\n\n\n-----Output-----\n\nIf the required partition exists, print $\\frac{n}{3}$ groups of three. Print each group as values of the elements it contains. You should print values in increasing order. Separate the groups and integers in groups by whitespaces. If there are multiple solutions, you can print any of them.\n\nIf there is no solution, print -1.\n\n\n-----Examples-----\nInput\n6\n1 1 1 2 2 2\n\nOutput\n-1\n\nInput\n6\n2 2 1 1 4 6\n\nOutput\n1 2 4\n1 2 6\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1095", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1095-158d7f21", "template_id": "apps::1095", "text": "You are given a tube which is reflective inside represented as two non-coinciding, but parallel to $Ox$ lines. Each line has some special integer points — positions of sensors on sides of the tube.\n\nYou are going to emit a laser ray in the tube. To do so, you have to choose two integer points $A$ and $B$ on the first and the second line respectively (coordinates can be negative): the point $A$ is responsible for the position of the laser, and the point $B$ — for the direction of the laser ray. The laser ray is a ray starting at $A$ and directed at $B$ which will reflect from the sides of the tube (it doesn't matter if there are any sensors at a reflection point or not). A sensor will only register the ray if the ray hits exactly at the position of the sensor. [Image] Examples of laser rays. Note that image contains two examples. The $3$ sensors (denoted by black bold points on the tube sides) will register the blue ray but only $2$ will register the red.\n\nCalculate the maximum number of sensors which can register your ray if you choose points $A$ and $B$ on the first and the second lines respectively.\n\n\n-----Input-----\n\nThe first line contains two integers $n$ and $y_1$ ($1 \\le n \\le 10^5$, $0 \\le y_1 \\le 10^9$) — number of sensors on the first line and its $y$ coordinate.\n\nThe second line contains $n$ integers $a_1, a_2, \\ldots, a_n$ ($0 \\le a_i \\le 10^9$) — $x$ coordinates of the sensors on the first line in the ascending order.\n\nThe third line contains two integers $m$ and $y_2$ ($1 \\le m \\le 10^5$, $y_1 < y_2 \\le 10^9$) — number of sensors on the second line and its $y$ coordinate.\n\nThe fourth line contains $m$ integers $b_1, b_2, \\ldots, b_m$ ($0 \\le b_i \\le 10^9$) — $x$ coordinates of the sensors on the second line in the ascending order.\n\n\n-----Output-----\n\nPrint the only integer — the maximum number of sensors which can register the ray.\n\n\n-----Example-----\nInput\n3 1\n1 5 6\n1 3\n3\n\nOutput\n3\n\n\n\n-----Note-----\n\nOne of the solutions illustrated on the image by pair $A_2$ and $B_2$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::587", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-587-17159e6c", "template_id": "apps::587", "text": "There are N pieces of sushi. Each piece has two parameters: \"kind of topping\" t_i and \"deliciousness\" d_i.\nYou are choosing K among these N pieces to eat.\nYour \"satisfaction\" here will be calculated as follows:\n - The satisfaction is the sum of the \"base total deliciousness\" and the \"variety bonus\".\n - The base total deliciousness is the sum of the deliciousness of the pieces you eat.\n - The variety bonus is x*x, where x is the number of different kinds of toppings of the pieces you eat.\nYou want to have as much satisfaction as possible.\nFind this maximum satisfaction.\n\n-----Constraints-----\n - 1 \\leq K \\leq N \\leq 10^5\n - 1 \\leq t_i \\leq N\n - 1 \\leq d_i \\leq 10^9\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN K\nt_1 d_1\nt_2 d_2\n.\n.\n.\nt_N d_N\n\n-----Output-----\nPrint the maximum satisfaction that you can obtain.\n\n-----Sample Input-----\n5 3\n1 9\n1 7\n2 6\n2 5\n3 1\n\n-----Sample Output-----\n26\n\nIf you eat Sushi 1,2 and 3:\n - The base total deliciousness is 9+7+6=22.\n - The variety bonus is 2*2=4.\nThus, your satisfaction will be 26, which is optimal.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::288", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-288-d12e905e", "template_id": "apps::288", "text": "Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if someone loses a game he leaves the tournament immediately.\n\nOrganizers are still arranging tournament grid (i.e. the order games will happen and who is going to play with whom) but they have already fixed one rule: two players can play against each other only if the number of games one of them has already played differs by no more than one from the number of games the other one has already played. Of course, both players had to win all their games in order to continue participating in the tournament.\n\nTournament hasn't started yet so the audience is a bit bored. Ostap decided to find out what is the maximum number of games the winner of the tournament can take part in (assuming the rule above is used). However, it is unlikely he can deal with this problem without your help.\n\n\n-----Input-----\n\nThe only line of the input contains a single integer n (2 ≤ n ≤ 10^18) — the number of players to participate in the tournament.\n\n\n-----Output-----\n\nPrint the maximum number of games in which the winner of the tournament can take part.\n\n\n-----Examples-----\nInput\n2\n\nOutput\n1\n\nInput\n3\n\nOutput\n2\n\nInput\n4\n\nOutput\n2\n\nInput\n10\n\nOutput\n4\n\n\n\n-----Note-----\n\nIn all samples we consider that player number 1 is the winner.\n\nIn the first sample, there would be only one game so the answer is 1.\n\nIn the second sample, player 1 can consequently beat players 2 and 3.\n\nIn the third sample, player 1 can't play with each other player as after he plays with players 2 and 3 he can't play against player 4, as he has 0 games played, while player 1 already played 2. Thus, the answer is 2 and to achieve we make pairs (1, 2) and (3, 4) and then clash the winners.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1217", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1217-1cbcd1c6", "template_id": "apps::1217", "text": "You are given two arrays of integers a and b. For each element of the second array b_{j} you should find the number of elements in array a that are less than or equal to the value b_{j}.\n\n\n-----Input-----\n\nThe first line contains two integers n, m (1 ≤ n, m ≤ 2·10^5) — the sizes of arrays a and b.\n\nThe second line contains n integers — the elements of array a ( - 10^9 ≤ a_{i} ≤ 10^9).\n\nThe third line contains m integers — the elements of array b ( - 10^9 ≤ b_{j} ≤ 10^9).\n\n\n-----Output-----\n\nPrint m integers, separated by spaces: the j-th of which is equal to the number of such elements in array a that are less than or equal to the value b_{j}.\n\n\n-----Examples-----\nInput\n5 4\n1 3 5 7 9\n6 4 2 8\n\nOutput\n3 2 1 4\n\nInput\n5 5\n1 2 1 2 5\n3 1 4 1 5\n\nOutput\n4 2 4 2 5\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1280", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1280-cd146eae", "template_id": "apps::1280", "text": "You've got string s, consisting of small English letters. Some of the English letters are good, the rest are bad.\n\nA substring s[l...r] (1 ≤ l ≤ r ≤ |s|) of string s = s_1s_2...s_{|}s| (where |s| is the length of string s) is string s_{l}s_{l} + 1...s_{r}.\n\nThe substring s[l...r] is good, if among the letters s_{l}, s_{l} + 1, ..., s_{r} there are at most k bad ones (look at the sample's explanation to understand it more clear).\n\nYour task is to find the number of distinct good substrings of the given string s. Two substrings s[x...y] and s[p...q] are considered distinct if their content is different, i.e. s[x...y] ≠ s[p...q].\n\n\n-----Input-----\n\nThe first line of the input is the non-empty string s, consisting of small English letters, the string's length is at most 1500 characters.\n\nThe second line of the input is the string of characters \"0\" and \"1\", the length is exactly 26 characters. If the i-th character of this string equals \"1\", then the i-th English letter is good, otherwise it's bad. That is, the first character of this string corresponds to letter \"a\", the second one corresponds to letter \"b\" and so on.\n\nThe third line of the input consists a single integer k (0 ≤ k ≤ |s|) — the maximum acceptable number of bad characters in a good substring.\n\n\n-----Output-----\n\nPrint a single integer — the number of distinct good substrings of string s.\n\n\n-----Examples-----\nInput\nababab\n01000000000000000000000000\n1\n\nOutput\n5\n\nInput\nacbacbacaa\n00000000000000000000000000\n2\n\nOutput\n8\n\n\n\n-----Note-----\n\nIn the first example there are following good substrings: \"a\", \"ab\", \"b\", \"ba\", \"bab\".\n\nIn the second example there are following good substrings: \"a\", \"aa\", \"ac\", \"b\", \"ba\", \"c\", \"ca\", \"cb\".\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1902", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1902-f654dd2f", "template_id": "apps::1902", "text": "Arcady is a copywriter. His today's task is to type up an already well-designed story using his favorite text editor.\n\nArcady types words, punctuation signs and spaces one after another. Each letter and each sign (including line feed) requires one keyboard click in order to be printed. Moreover, when Arcady has a non-empty prefix of some word on the screen, the editor proposes a possible autocompletion for this word, more precisely one of the already printed words such that its prefix matches the currently printed prefix if this word is unique. For example, if Arcady has already printed «codeforces», «coding» and «codeforces» once again, then there will be no autocompletion attempt for «cod», but if he proceeds with «code», the editor will propose «codeforces».\n\nWith a single click Arcady can follow the editor's proposal, i.e. to transform the current prefix to it. Note that no additional symbols are printed after the autocompletion (no spaces, line feeds, etc). What is the minimum number of keyboard clicks Arcady has to perform to print the entire text, if he is not allowed to move the cursor or erase the already printed symbols?\n\nA word here is a contiguous sequence of latin letters bordered by spaces, punctuation signs and line/text beginnings/ends. Arcady uses only lowercase letters. For example, there are 20 words in «it's well-known that tic-tac-toe is a paper-and-pencil game for two players, x and o.».\n\n\n-----Input-----\n\nThe only line contains Arcady's text, consisting only of lowercase latin letters, spaces, line feeds and the following punctuation signs: «.», «,», «?», «!», «'» and «-». The total amount of symbols doesn't exceed 3·10^5. It's guaranteed that all lines are non-empty.\n\n\n-----Output-----\n\nPrint a single integer — the minimum number of clicks.\n\n\n-----Examples-----\nInput\nsnow affects sports such as skiing, snowboarding, and snowmachine travel.\nsnowboarding is a recreational activity and olympic and paralympic sport.\n\nOutput\n141\n\nInput\n'co-co-co, codeforces?!'\n\nOutput\n25\n\nInput\nthun-thun-thunder, thunder, thunder\nthunder, thun-, thunder\nthun-thun-thunder, thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, feel the thunder\nlightning then the thunder\nthunder, thunder\n\nOutput\n183\n\n\n\n-----Note-----\n\nIn sample case one it's optimal to use autocompletion for the first instance of «snowboarding» after typing up «sn» and for the second instance of «snowboarding» after typing up «snowb». This will save 7 clicks.\n\nIn sample case two it doesn't matter whether to use autocompletion or not.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1840", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1840-7b36f849", "template_id": "apps::1840", "text": "Heidi and Doctor Who hopped out of the TARDIS and found themselves at EPFL in 2018. They were surrounded by stormtroopers and Darth Vader was approaching. Miraculously, they managed to escape to a nearby rebel base but the Doctor was very confused. Heidi reminded him that last year's HC2 theme was Star Wars. Now he understood, and he's ready to face the evils of the Empire!\n\nThe rebels have $s$ spaceships, each with a certain attacking power $a$.\n\nThey want to send their spaceships to destroy the empire bases and steal enough gold and supplies in order to keep the rebellion alive.\n\nThe empire has $b$ bases, each with a certain defensive power $d$, and a certain amount of gold $g$.\n\nA spaceship can attack all the bases which have a defensive power less than or equal to its attacking power.\n\nIf a spaceship attacks a base, it steals all the gold in that base.\n\nThe rebels are still undecided which spaceship to send out first, so they asked for the Doctor's help. They would like to know, for each spaceship, the maximum amount of gold it can steal.\n\n\n-----Input-----\n\nThe first line contains integers $s$ and $b$ ($1 \\leq s, b \\leq 10^5$), the number of spaceships and the number of bases, respectively.\n\nThe second line contains $s$ integers $a$ ($0 \\leq a \\leq 10^9$), the attacking power of each spaceship.\n\nThe next $b$ lines contain integers $d, g$ ($0 \\leq d \\leq 10^9$, $0 \\leq g \\leq 10^4$), the defensive power and the gold of each base, respectively.\n\n\n-----Output-----\n\nPrint $s$ integers, the maximum amount of gold each spaceship can steal, in the same order as the spaceships are given in the input.\n\n\n-----Example-----\nInput\n5 4\n1 3 5 2 4\n0 1\n4 2\n2 8\n9 4\n\nOutput\n1 9 11 9 11\n\n\n\n-----Note-----\n\nThe first spaceship can only attack the first base.\n\nThe second spaceship can attack the first and third bases.\n\nThe third spaceship can attack the first, second and third bases.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1113", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1113-810af630", "template_id": "apps::1113", "text": "Initially Ildar has an empty array. He performs $n$ steps. On each step he takes a subset of integers already added to the array and appends the mex of this subset to the array.\n\nThe mex of an multiset of integers is the smallest non-negative integer not presented in the multiset. For example, the mex of the multiset $[0, 2, 3]$ is $1$, while the mex of the multiset $[1, 2, 1]$ is $0$.\n\nMore formally, on the step $m$, when Ildar already has an array $a_1, a_2, \\ldots, a_{m-1}$, he chooses some subset of indices $1 \\leq i_1 < i_2 < \\ldots < i_k < m$ (possibly, empty), where $0 \\leq k < m$, and appends the $mex(a_{i_1}, a_{i_2}, \\ldots a_{i_k})$ to the end of the array.\n\nAfter performing all the steps Ildar thinks that he might have made a mistake somewhere. He asks you to determine for a given array $a_1, a_2, \\ldots, a_n$ the minimum step $t$ such that he has definitely made a mistake on at least one of the steps $1, 2, \\ldots, t$, or determine that he could have obtained this array without mistakes.\n\n\n-----Input-----\n\nThe first line contains a single integer $n$ ($1 \\leq n \\leq 100\\,000$) — the number of steps Ildar made.\n\nThe second line contains $n$ integers $a_1, a_2, \\ldots, a_n$ ($0 \\leq a_i \\leq 10^9$) — the array Ildar obtained.\n\n\n-----Output-----\n\nIf Ildar could have chosen the subsets on each step in such a way that the resulting array is $a_1, a_2, \\ldots, a_n$, print $-1$.\n\nOtherwise print a single integer $t$ — the smallest index of a step such that a mistake was made on at least one step among steps $1, 2, \\ldots, t$.\n\n\n-----Examples-----\nInput\n4\n0 1 2 1\n\nOutput\n-1\nInput\n3\n1 0 1\n\nOutput\n1\nInput\n4\n0 1 2 239\n\nOutput\n4\n\n\n-----Note-----\n\nIn the first example it is possible that Ildar made no mistakes. Here is the process he could have followed. $1$-st step. The initial array is empty. He can choose an empty subset and obtain $0$, because the mex of an empty set is $0$. Appending this value to the end he gets the array $[0]$. $2$-nd step. The current array is $[0]$. He can choose a subset $[0]$ and obtain an integer $1$, because $mex(0) = 1$. Appending this value to the end he gets the array $[0,1]$. $3$-rd step. The current array is $[0,1]$. He can choose a subset $[0,1]$ and obtain an integer $2$, because $mex(0,1) = 2$. Appending this value to the end he gets the array $[0,1,2]$. $4$-th step. The current array is $[0,1,2]$. He can choose a subset $[0]$ and obtain an integer $1$, because $mex(0) = 1$. Appending this value to the end he gets the array $[0,1,2,1]$.\n\nThus, he can get the array without mistakes, so the answer is $-1$.\n\nIn the second example he has definitely made a mistake on the very first step, because he could not have obtained anything different from $0$.\n\nIn the third example he could have obtained $[0, 1, 2]$ without mistakes, but $239$ is definitely wrong.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::1392", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-1392-6ea97f45", "template_id": "apps::1392", "text": "Let's call a number k-good if it contains all digits not exceeding k (0, ..., k). You've got a number k and an array a containing n numbers. Find out how many k-good numbers are in a (count each number every time it occurs in array a).\n\n\n-----Input-----\n\nThe first line contains integers n and k (1 ≤ n ≤ 100, 0 ≤ k ≤ 9). The i-th of the following n lines contains integer a_{i} without leading zeroes (1 ≤ a_{i} ≤ 10^9).\n\n\n-----Output-----\n\nPrint a single integer — the number of k-good numbers in a.\n\n\n-----Examples-----\nInput\n10 6\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n\nOutput\n10\n\nInput\n2 1\n1\n10\n\nOutput\n1\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_interview::apps::160", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_interview", "task_id": "real::apps::apps-160-086e1f87", "template_id": "apps::160", "text": "We have a sequence of N integers: A_1, A_2, \\cdots, A_N.\nYou can perform the following operation between 0 and K times (inclusive):\n - Choose two integers i and j such that i \\neq j, each between 1 and N (inclusive). Add 1 to A_i and -1 to A_j, possibly producing a negative element.\nCompute the maximum possible positive integer that divides every element of A after the operations. Here a positive integer x divides an integer y if and only if there exists an integer z such that y = xz.\n\n-----Constraints-----\n - 2 \\leq N \\leq 500\n - 1 \\leq A_i \\leq 10^6\n - 0 \\leq K \\leq 10^9\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN K\nA_1 A_2 \\cdots A_{N-1} A_{N}\n\n-----Output-----\nPrint the maximum possible positive integer that divides every element of A after the operations.\n\n-----Sample Input-----\n2 3\n8 20\n\n-----Sample Output-----\n7\n\n7 will divide every element of A if, for example, we perform the following operation:\n - Choose i = 2, j = 1. A becomes (7, 21).\nWe cannot reach the situation where 8 or greater integer divides every element of A.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4143", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4143-b6c1d162", "template_id": "apps::4143", "text": "In 2028 and after a continuous growth, AtCoder Inc. finally built an empire with six cities (City 1, 2, 3, 4, 5, 6)!\nThere are five means of transport in this empire:\n - Train: travels from City 1 to 2 in one minute. A train can occupy at most A people.\n - Bus: travels from City 2 to 3 in one minute. A bus can occupy at most B people.\n - Taxi: travels from City 3 to 4 in one minute. A taxi can occupy at most C people.\n - Airplane: travels from City 4 to 5 in one minute. An airplane can occupy at most D people.\n - Ship: travels from City 5 to 6 in one minute. A ship can occupy at most E people.\nFor each of them, one vehicle leaves the city at each integer time (time 0, 1, 2, ...).\nThere is a group of N people at City 1, and they all want to go to City 6.\n\nAt least how long does it take for all of them to reach there?\nYou can ignore the time needed to transfer.\n\n-----Constraints-----\n - 1 \\leq N, A, B, C, D, E \\leq 10^{15}\n - All values in input are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\nA\nB\nC\nD\nE\n\n-----Output-----\nPrint the minimum time required for all of the people to reach City 6, in minutes.\n\n-----Sample Input-----\n5\n3\n2\n4\n3\n5\n\n-----Sample Output-----\n7\n\nOne possible way to travel is as follows.\nFirst, there are N = 5 people at City 1, as shown in the following image:\n\nIn the first minute, three people travels from City 1 to City 2 by train. Note that a train can only occupy at most three people.\n\nIn the second minute, the remaining two people travels from City 1 to City 2 by train, and two of the three people who were already at City 2 travels to City 3 by bus. Note that a bus can only occupy at most two people.\n\nIn the third minute, two people travels from City 2 to City 3 by train, and another two people travels from City 3 to City 4 by taxi.\n\nFrom then on, if they continue traveling without stopping until they reach City 6, all of them can reach there in seven minutes.\n\nThere is no way for them to reach City 6 in 6 minutes or less.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4233", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4233-3e0b2b39", "template_id": "apps::4233", "text": "A star is a figure of the following type: an asterisk character '*' in the center of the figure and four rays (to the left, right, top, bottom) of the same positive length. The size of a star is the length of its rays. The size of a star must be a positive number (i.e. rays of length $0$ are not allowed).\n\nLet's consider empty cells are denoted by '.', then the following figures are stars:\n\n [Image] The leftmost figure is a star of size $1$, the middle figure is a star of size $2$ and the rightmost figure is a star of size $3$.\n\nYou are given a rectangular grid of size $n \\times m$ consisting only of asterisks '*' and periods (dots) '.'. Rows are numbered from $1$ to $n$, columns are numbered from $1$ to $m$. Your task is to draw this grid using any number of stars or find out that it is impossible. Stars can intersect, overlap or even coincide with each other. The number of stars in the output can't exceed $n \\cdot m$. Each star should be completely inside the grid. You can use stars of same and arbitrary sizes.\n\nIn this problem, you do not need to minimize the number of stars. Just find any way to draw the given grid with at most $n \\cdot m$ stars.\n\n\n-----Input-----\n\nThe first line of the input contains two integers $n$ and $m$ ($3 \\le n, m \\le 100$) — the sizes of the given grid.\n\nThe next $n$ lines contains $m$ characters each, the $i$-th line describes the $i$-th row of the grid. It is guaranteed that grid consists of characters '*' and '.' only.\n\n\n-----Output-----\n\nIf it is impossible to draw the given grid using stars only, print \"-1\".\n\nOtherwise in the first line print one integer $k$ ($0 \\le k \\le n \\cdot m$) — the number of stars needed to draw the given grid. The next $k$ lines should contain three integers each — $x_j$, $y_j$ and $s_j$, where $x_j$ is the row index of the central star character, $y_j$ is the column index of the central star character and $s_j$ is the size of the star. Each star should be completely inside the grid.\n\n\n-----Examples-----\nInput\n6 8\n....*...\n...**...\n..*****.\n...**...\n....*...\n........\n\nOutput\n3\n3 4 1\n3 5 2\n3 5 1\n\nInput\n5 5\n.*...\n****.\n.****\n..**.\n.....\n\nOutput\n3\n2 2 1\n3 3 1\n3 4 1\n\nInput\n5 5\n.*...\n***..\n.*...\n.*...\n.....\n\nOutput\n-1\n\nInput\n3 3\n*.*\n.*.\n*.*\n\nOutput\n-1\n\n\n\n-----Note-----\n\nIn the first example the output 2\n\n3 4 1\n\n3 5 2\n\n\n\nis also correct.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4398", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4398-55ae929c", "template_id": "apps::4398", "text": "Given are strings s and t of length N each, both consisting of lowercase English letters.\nLet us form a new string by alternating the characters of S and the characters of T, as follows: the first character of S, the first character of T, the second character of S, the second character of T, ..., the N-th character of S, the N-th character of T. Print this new string.\n\n-----Constraints-----\n - 1 \\leq N \\leq 100\n - |S| = |T| = N\n - S and T are strings consisting of lowercase English letters.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\nS T\n\n-----Output-----\nPrint the string formed.\n\n-----Sample Input-----\n2\nip cc\n\n-----Sample Output-----\nicpc\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4135", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4135-4a8f4cd6", "template_id": "apps::4135", "text": "A string $s$ of length $n$ can be encrypted by the following algorithm: iterate over all divisors of $n$ in decreasing order (i.e. from $n$ to $1$), for each divisor $d$, reverse the substring $s[1 \\dots d]$ (i.e. the substring which starts at position $1$ and ends at position $d$).\n\nFor example, the above algorithm applied to the string $s$=\"codeforces\" leads to the following changes: \"codeforces\" $\\to$ \"secrofedoc\" $\\to$ \"orcesfedoc\" $\\to$ \"rocesfedoc\" $\\to$ \"rocesfedoc\" (obviously, the last reverse operation doesn't change the string because $d=1$).\n\nYou are given the encrypted string $t$. Your task is to decrypt this string, i.e., to find a string $s$ such that the above algorithm results in string $t$. It can be proven that this string $s$ always exists and is unique.\n\n\n-----Input-----\n\nThe first line of input consists of a single integer $n$ ($1 \\le n \\le 100$) — the length of the string $t$. The second line of input consists of the string $t$. The length of $t$ is $n$, and it consists only of lowercase Latin letters.\n\n\n-----Output-----\n\nPrint a string $s$ such that the above algorithm results in $t$.\n\n\n-----Examples-----\nInput\n10\nrocesfedoc\n\nOutput\ncodeforces\n\nInput\n16\nplmaetwoxesisiht\n\nOutput\nthisisexampletwo\n\nInput\n1\nz\n\nOutput\nz\n\n\n\n-----Note-----\n\nThe first example is described in the problem statement.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4384", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4384-7c0b62bd", "template_id": "apps::4384", "text": "Decades have passed since the beginning of AtCoder Beginner Contest.\nThe contests are labeled as ABC001, ABC002, ... from the first round, but after the 999-th round ABC999, a problem occurred: how the future rounds should be labeled?\nIn the end, the labels for the rounds from the 1000-th to the 1998-th are decided: ABD001, ABD002, ..., ABD999.\nYou are given an integer N between 1 and 1998 (inclusive). Print the first three characters of the label of the N-th round of AtCoder Beginner Contest.\n\n-----Constraints-----\n - 1 \\leq N \\leq 1998\n - N is an integer.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\n\n-----Output-----\nPrint the first three characters of the label of the N-th round of AtCoder Beginner Contest.\n\n-----Sample Input-----\n999\n\n-----Sample Output-----\nABC\n\nThe 999-th round of AtCoder Beginner Contest is labeled as ABC999.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4603", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4603-db2604e4", "template_id": "apps::4603", "text": "You planned a trip using trains and buses.\nThe train fare will be A yen (the currency of Japan) if you buy ordinary tickets along the way, and B yen if you buy an unlimited ticket.\nSimilarly, the bus fare will be C yen if you buy ordinary tickets along the way, and D yen if you buy an unlimited ticket.\nFind the minimum total fare when the optimal choices are made for trains and buses.\n\n-----Constraints-----\n - 1 \\leq A \\leq 1 000\n - 1 \\leq B \\leq 1 000\n - 1 \\leq C \\leq 1 000\n - 1 \\leq D \\leq 1 000\n - All input values are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nA\nB\nC\nD\n\n-----Output-----\nPrint the minimum total fare.\n\n-----Sample Input-----\n600\n300\n220\n420\n\n-----Sample Output-----\n520\n\nThe train fare will be 600 yen if you buy ordinary tickets, and 300 yen if you buy an unlimited ticket.\nThus, the optimal choice for trains is to buy an unlimited ticket for 300 yen.\nOn the other hand, the optimal choice for buses is to buy ordinary tickets for 220 yen.\nTherefore, the minimum total fare is 300 + 220 = 520 yen.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4031", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4031-968ee8b6", "template_id": "apps::4031", "text": "You are given $n$ strings. Each string consists of lowercase English letters. Rearrange (reorder) the given strings in such a way that for every string, all strings that are placed before it are its substrings.\n\nString $a$ is a substring of string $b$ if it is possible to choose several consecutive letters in $b$ in such a way that they form $a$. For example, string \"for\" is contained as a substring in strings \"codeforces\", \"for\" and \"therefore\", but is not contained as a substring in strings \"four\", \"fofo\" and \"rof\".\n\n\n-----Input-----\n\nThe first line contains an integer $n$ ($1 \\le n \\le 100$) — the number of strings.\n\nThe next $n$ lines contain the given strings. The number of letters in each string is from $1$ to $100$, inclusive. Each string consists of lowercase English letters.\n\nSome strings might be equal.\n\n\n-----Output-----\n\nIf it is impossible to reorder $n$ given strings in required order, print \"NO\" (without quotes).\n\nOtherwise print \"YES\" (without quotes) and $n$ given strings in required order.\n\n\n-----Examples-----\nInput\n5\na\naba\nabacaba\nba\naba\n\nOutput\nYES\na\nba\naba\naba\nabacaba\n\nInput\n5\na\nabacaba\nba\naba\nabab\n\nOutput\nNO\n\nInput\n3\nqwerty\nqwerty\nqwerty\n\nOutput\nYES\nqwerty\nqwerty\nqwerty\n\n\n\n-----Note-----\n\nIn the second example you cannot reorder the strings because the string \"abab\" is not a substring of the string \"abacaba\".\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4438", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4438-eaf7d171", "template_id": "apps::4438", "text": "Maksim walks on a Cartesian plane. Initially, he stands at the point $(0, 0)$ and in one move he can go to any of four adjacent points (left, right, up, down). For example, if Maksim is currently at the point $(0, 0)$, he can go to any of the following points in one move: $(1, 0)$; $(0, 1)$; $(-1, 0)$; $(0, -1)$.\n\nThere are also $n$ distinct key points at this plane. The $i$-th point is $p_i = (x_i, y_i)$. It is guaranteed that $0 \\le x_i$ and $0 \\le y_i$ and there is no key point $(0, 0)$.\n\nLet the first level points be such points that $max(x_i, y_i) = 1$, the second level points be such points that $max(x_i, y_i) = 2$ and so on. Maksim wants to visit all the key points. But he shouldn't visit points of level $i + 1$ if he does not visit all the points of level $i$. He starts visiting the points from the minimum level of point from the given set.\n\nThe distance between two points $(x_1, y_1)$ and $(x_2, y_2)$ is $|x_1 - x_2| + |y_1 - y_2|$ where $|v|$ is the absolute value of $v$.\n\nMaksim wants to visit all the key points in such a way that the total distance he walks will be minimum possible. Your task is to find this distance.\n\nIf you are Python programmer, consider using PyPy instead of Python when you submit your code.\n\n\n-----Input-----\n\nThe first line of the input contains one integer $n$ ($1 \\le n \\le 2 \\cdot 10^5$) — the number of key points.\n\nEach of the next $n$ lines contains two integers $x_i$, $y_i$ ($0 \\le x_i, y_i \\le 10^9$) — $x$-coordinate of the key point $p_i$ and $y$-coordinate of the key point $p_i$. It is guaranteed that all the points are distinct and the point $(0, 0)$ is not in this set.\n\n\n-----Output-----\n\nPrint one integer — the minimum possible total distance Maksim has to travel if he needs to visit all key points in a way described above.\n\n\n-----Examples-----\nInput\n8\n2 2\n1 4\n2 3\n3 1\n3 4\n1 1\n4 3\n1 2\n\nOutput\n15\n\nInput\n5\n2 1\n1 0\n2 0\n3 2\n0 3\n\nOutput\n9\n\n\n\n-----Note-----\n\nThe picture corresponding to the first example: [Image]\n\nThere is one of the possible answers of length $15$.\n\nThe picture corresponding to the second example: [Image]\n\nThere is one of the possible answers of length $9$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4167", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4167-0f9e6b3d", "template_id": "apps::4167", "text": "You are given integers N and K. Find the number of triples (a,b,c) of positive integers not greater than N such that a+b,b+c and c+a are all multiples of K.\nThe order of a,b,c does matter, and some of them can be the same.\n\n-----Constraints-----\n - 1 \\leq N,K \\leq 2\\times 10^5\n - N and K are integers.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN K\n\n-----Output-----\nPrint the number of triples (a,b,c) of positive integers not greater than N such that a+b,b+c and c+a are all multiples of K.\n\n-----Sample Input-----\n3 2\n\n-----Sample Output-----\n9\n\n(1,1,1),(1,1,3),(1,3,1),(1,3,3),(2,2,2),(3,1,1),(3,1,3),(3,3,1) and (3,3,3) satisfy the condition.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4042", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4042-2ee3c294", "template_id": "apps::4042", "text": "$\\text{A}$\n\n\n-----Input-----\n\nThe input contains a single floating-point number x with exactly 6 decimal places (0 < x < 5).\n\n\n-----Output-----\n\nOutput two integers separated by a single space. Each integer should be between 1 and 10, inclusive. If several solutions exist, output any of them. Solution will exist for all tests.\n\n\n-----Examples-----\nInput\n1.200000\n\nOutput\n3 2\n\nInput\n2.572479\n\nOutput\n10 3\n\nInput\n4.024922\n\nOutput\n9 9\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4467", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4467-67a3df4a", "template_id": "apps::4467", "text": "On a two-dimensional plane, there are N red points and N blue points.\nThe coordinates of the i-th red point are (a_i, b_i), and the coordinates of the i-th blue point are (c_i, d_i).\nA red point and a blue point can form a friendly pair when, the x-coordinate of the red point is smaller than that of the blue point, and the y-coordinate of the red point is also smaller than that of the blue point.\nAt most how many friendly pairs can you form? Note that a point cannot belong to multiple pairs.\n\n-----Constraints-----\n - All input values are integers.\n - 1 \\leq N \\leq 100\n - 0 \\leq a_i, b_i, c_i, d_i < 2N\n - a_1, a_2, ..., a_N, c_1, c_2, ..., c_N are all different.\n - b_1, b_2, ..., b_N, d_1, d_2, ..., d_N are all different.\n\n-----Input-----\nInput is given from Standard Input in the following format:\nN\na_1 b_1\na_2 b_2\n:\na_N b_N\nc_1 d_1\nc_2 d_2\n:\nc_N d_N\n\n-----Output-----\nPrint the maximum number of friendly pairs.\n\n-----Sample Input-----\n3\n2 0\n3 1\n1 3\n4 2\n0 4\n5 5\n\n-----Sample Output-----\n2\n\nFor example, you can pair (2, 0) and (4, 2), then (3, 1) and (5, 5).\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4612", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": false, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4612-c24c6e6c", "template_id": "apps::4612", "text": "You are given two positive integers a and b.\nLet x be the average of a and b.\nPrint x rounded up to the nearest integer.\n\n-----Constraints-----\n - a and b are integers.\n - 1 \\leq a, b \\leq 100\n\n-----Input-----\nInput is given from Standard Input in the following format:\na b\n\n-----Output-----\nPrint x rounded up to the nearest integer.\n\n-----Sample Input-----\n1 3\n\n-----Sample Output-----\n2\n\nThe average of 1 and 3 is 2.0, and it will be rounded up to the nearest integer, 2.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4556", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4556-c08f3380", "template_id": "apps::4556", "text": "Snuke is going to open a contest named \"AtCoder s Contest\".\nHere, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.\nSnuke has decided to abbreviate the name of the contest as \"AxC\".\nHere, x is the uppercase English letter at the beginning of s.\nGiven the name of the contest, print the abbreviation of the name.\n\n-----Constraints-----\n - The length of s is between 1 and 100, inclusive.\n - The first character in s is an uppercase English letter.\n - The second and subsequent characters in s are lowercase English letters.\n\n-----Input-----\nThe input is given from Standard Input in the following format:\nAtCoder s Contest\n\n-----Output-----\nPrint the abbreviation of the name of the contest.\n\n-----Sample Input-----\nAtCoder Beginner Contest\n\n-----Sample Output-----\nABC\n\nThe contest in which you are participating now.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4207", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4207-09cbcf01", "template_id": "apps::4207", "text": "You are given two arrays $a$ and $b$, each contains $n$ integers.\n\nYou want to create a new array $c$ as follows: choose some real (i.e. not necessarily integer) number $d$, and then for every $i \\in [1, n]$ let $c_i := d \\cdot a_i + b_i$.\n\nYour goal is to maximize the number of zeroes in array $c$. What is the largest possible answer, if you choose $d$ optimally?\n\n\n-----Input-----\n\nThe first line contains one integer $n$ ($1 \\le n \\le 2 \\cdot 10^5$) — the number of elements in both arrays.\n\nThe second line contains $n$ integers $a_1$, $a_2$, ..., $a_n$ ($-10^9 \\le a_i \\le 10^9$).\n\nThe third line contains $n$ integers $b_1$, $b_2$, ..., $b_n$ ($-10^9 \\le b_i \\le 10^9$).\n\n\n-----Output-----\n\nPrint one integer — the maximum number of zeroes in array $c$, if you choose $d$ optimally.\n\n\n-----Examples-----\nInput\n5\n1 2 3 4 5\n2 4 7 11 3\n\nOutput\n2\n\nInput\n3\n13 37 39\n1 2 3\n\nOutput\n2\n\nInput\n4\n0 0 0 0\n1 2 3 4\n\nOutput\n0\n\nInput\n3\n1 2 -1\n-6 -12 6\n\nOutput\n3\n\n\n\n-----Note-----\n\nIn the first example, we may choose $d = -2$.\n\nIn the second example, we may choose $d = -\\frac{1}{13}$.\n\nIn the third example, we cannot obtain any zero in array $c$, no matter which $d$ we choose.\n\nIn the fourth example, we may choose $d = 6$.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."} {"domain": "coding", "group_id": "apps::coding::apps_introductory::apps::4385", "hard_negative_type": null, "interface_type": "stdin_stdout", "label_cheap_fails": true, "policy_id": "pol-644b522cec4e", "source": "apps", "split": "test", "task_family": "apps_introductory", "task_id": "real::apps::apps-4385-e0d745e7", "template_id": "apps::4385", "text": "In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.\n\nTwo antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.\n\nDetermine if there exists a pair of antennas that cannot communicate directly.\n\nHere, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.\n\n-----Constraints-----\n - a, b, c, d, e and k are integers between 0 and 123 (inclusive).\n - a < b < c < d < e\n\n-----Input-----\nInput is given from Standard Input in the following format:\na\nb\nc\nd\ne\nk\n\n-----Output-----\nPrint :( if there exists a pair of antennas that cannot communicate directly, and print Yay! if there is no such pair.\n\n-----Sample Input-----\n1\n2\n4\n8\n9\n15\n\n-----Sample Output-----\nYay!\n\nIn this case, there is no pair of antennas that cannot communicate directly, because:\n - the distance between A and B is 2 - 1 = 1\n - the distance between A and C is 4 - 1 = 3\n - the distance between A and D is 8 - 1 = 7\n - the distance between A and E is 9 - 1 = 8\n - the distance between B and C is 4 - 2 = 2\n - the distance between B and D is 8 - 2 = 6\n - the distance between B and E is 9 - 2 = 7\n - the distance between C and D is 8 - 4 = 4\n - the distance between C and E is 9 - 4 = 5\n - the distance between D and E is 9 - 8 = 1\nand none of them is greater than 15. Thus, the correct output is Yay!.\n\nRead the input from standard input and print exactly the required output to standard output. Print nothing else."}