context listlengths 1 1 | gen_kwargs dict | repeat_idx int64 0 2 | request_idx int64 0 510 | task_name stringclasses 1
value | metadata null |
|---|---|---|---|---|---|
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given two arrays nums and andValues of length n and m respectively.\nThe value of an array is equal to the last element of that array.\nYou have to div... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 478 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums containing positive integers. We define a function encrypt such that encrypt(x) replaces every digit in x with the largest ... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 479 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 0-indexed array nums of size n consisting of positive integers.\nYou are also given a 2D array queries of size m where queries[i] = [index_i, k... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 480 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a string s. s[i] is either a lowercase English letter or '?'.\nFor a string t having length m containing only lowercase English letters, we defin... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 481 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums of length n and a positive integer k.\nThe power of an array of integers is defined as the number of subsequences with thei... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 482 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an array nums of non-negative integers and an integer k.\nAn array is called special if the bitwise OR of all of its elements is at least k.\nRet... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 483 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a binary array possible of length n.\nAlice and Bob are playing a game that consists of n levels. Some of the levels in the game are impossible t... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 484 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums of length n, and a positive integer k.\nThe power of a subsequence is defined as the minimum absolute difference between an... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 485 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a string s. The score of a string is defined as the sum of the absolute difference between the ASCII values of adjacent characters.\nReturn the s... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 486 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an array of positive integers nums.\nReturn the number of subarrays of nums, where the first and the last elements of the subarray are equal to t... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 487 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a string word. A letter is called special if it appears both in lowercase and uppercase in word.\nReturn the number of special letters in word.\n... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 488 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given two arrays of equal length, nums1 and nums2.\nEach element in nums1 has been increased (or decreased in the case of negative) by an integer, repr... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 489 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 <= i < n - 1, nums[i + 1] is greater t... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 490 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums. The uniqueness array of nums is the sorted array that contains the number of distinct elements of all the subarrays of num... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 491 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.A word is considered valid if:\n\nIt contains a minimum of 3 characters.\nIt contains only digits (0-9), and English letters (uppercase and lowercase).\nIt inc... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 492 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a string word of size n, and an integer k such that k divides n.\nIn one operation, you can pick any two indices i and j, that are divisible by k... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 493 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a string s, which is known to be a concatenation of anagrams of some string t.\nReturn the minimum possible length of the string t.\nAn anagram i... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 494 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums and two integers cost1 and cost2. You are allowed to perform either of the following operations any number of times:\n\nCho... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 495 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 2D matrix grid of size 3 x 3 consisting only of characters 'B' and 'W'. Character 'W' represents the white color, and character 'B' represents ... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 496 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a 2D boolean matrix grid.\nReturn an integer that is the number of right triangles that can be made with the 3 elements of grid such that all of ... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 497 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given 3 positive integers zero, one, and limit.\nA binary array arr is called stable if:\n\nThe number of occurrences of 0 in arr is exactly zero.\nThe... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 498 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given two strings s and t such that every character occurs at most once in s and t is a permutation of s.\nThe permutation difference between s and t i... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 499 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.In a mystic dungeon, n magicians are standing in a line. Each magician has an attribute that gives you energy. Some magicians can give you negative energy, whi... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 500 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.An array is considered special if every pair of its adjacent elements contains two numbers with different parity.\nYou are given an array of integers nums. Ret... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 501 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an array nums consisting of positive integers where all integers have the same number of digits.\nThe digit difference between two integers is th... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 502 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given a non-negative integer k. There exists a staircase with an infinite number of stairs, with the lowest stair numbered 0.\nAlice has an integer jum... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 503 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given 2 integer arrays nums1 and nums2 of lengths n and m respectively. You are also given a positive integer k.\nA pair (i, j) is called good if nums1... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 504 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.Given a string word, compress it using the following algorithm:\n\nBegin with an empty string comp. While word is not empty, use the following operation:\n\n\t... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 505 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an array nums consisting of integers. You are also given a 2D array queries, where queries[i] = [pos_i, x_i].\nFor query i, we first set nums[pos... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 506 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.Given a string s, you need to partition it into one or more balanced substrings. For example, if s == \"ababcc\" then (\"abab\", \"c\", \"c\"), (\"ab\", \"abc\... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 507 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.A powerful array for an integer x is the shortest sorted array of powers of two that sum up to x. For example, the powerful array for 11 is [1, 2, 8].\nThe arr... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 508 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an array nums, where each number in the array appears either once or twice.\nReturn the bitwise XOR of all the numbers that appear twice in the a... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 509 | LiveCodeBench | null |
[
{
"content": "Generate an executable Python function generated from the given prompt. Return the function body without invoking it at the final solution.You are given an integer array nums, an integer array queries, and an integer x.\nFor each queries[i], you need to find the index of the queries[i]^th occurren... | {
"do_sample": false,
"max_new_tokens": 32768,
"seed": 2,
"temperature": 0.7
} | 2 | 510 | LiveCodeBench | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.