messages listlengths 1 1 | ground_truth listlengths 0 6 | dataset stringclasses 1 value | question_id int64 0 527 |
|---|---|---|---|
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string num representing a non-negative integer.... | [] | code_livecodebenchv6 | 100 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 1-indexed array nums of n integers.\nA set of numbers is ... | [] | code_livecodebenchv6 | 101 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a binary string s that contains at least one '1'.\nYou have... | [] | code_livecodebenchv6 | 102 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array nums consisting of non-negative integers.\nWe defi... | [] | code_livecodebenchv6 | 103 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed sorted array of integers nums.\nYou can perform... | [] | code_livecodebenchv6 | 104 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums of non-negative integers, and two in... | [] | code_livecodebenchv6 | 105 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums and an integer k.\nReturn an... | [] | code_livecodebenchv6 | 106 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums consisting of positive integers.\nTh... | [] | code_livecodebenchv6 | 107 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums of length n where n is the t... | [] | code_livecodebenchv6 | 108 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of integers nums, and an integer target.\... | [] | code_livecodebenchv6 | 109 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array maxHeights of n integers.\nYou are tasked... | [] | code_livecodebenchv6 | 110 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums and an integer target.\nA 0-indexed ... | [] | code_livecodebenchv6 | 111 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a binary string s and a positive integer k.\nA substring of... | [] | code_livecodebenchv6 | 112 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou have n processors each having 4 cores and n * 4 tasks that need to be... | [] | code_livecodebenchv6 | 113 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums and a positive integer k.\nY... | [] | code_livecodebenchv6 | 114 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums.\nReturn the maximum value o... | [] | code_livecodebenchv6 | 115 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums.\nThe distinct count of a su... | [] | code_livecodebenchv6 | 116 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nGiven a 0-indexed array of strings words where words[i] is either a posit... | [] | code_livecodebenchv6 | 117 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums of length n.\nWe want to gro... | [] | code_livecodebenchv6 | 118 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two arrays nums1 and nums2 consisting of positive integers.... | [] | code_livecodebenchv6 | 119 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given positive integers n and m.\nDefine two integers, num1 and n... | [] | code_livecodebenchv6 | 120 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed binary string s having an even length.\nA strin... | [] | code_livecodebenchv6 | 121 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums of integers.\nA triplet of indices (... | [] | code_livecodebenchv6 | 122 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums, and an integer k.\nThe K-or... | [] | code_livecodebenchv6 | 123 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums.\nA subsequence of nums havi... | [] | code_livecodebenchv6 | 124 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nThere are n teams numbered from 0 to n - 1 in a tournament.\nGiven a 0-in... | [] | code_livecodebenchv6 | 125 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two 0-indexed integer arrays, nums1 and nums2, both having ... | [] | code_livecodebenchv6 | 126 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nGiven three integers a, b, and n, return the maximum value of (a XOR x) *... | [] | code_livecodebenchv6 | 127 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums. A pair of integers x and y ... | [] | code_livecodebenchv6 | 128 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of strings words and a character x.\nRetu... | [] | code_livecodebenchv6 | 129 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nThere are n balls on a table, each ball has a color black or white.\nYou ... | [] | code_livecodebenchv6 | 130 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums and an integer k.\nYou can p... | [] | code_livecodebenchv6 | 131 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two positive integers n and limit.\nReturn the total number... | [] | code_livecodebenchv6 | 132 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer n.\nA string s is called good if it contains onl... | [] | code_livecodebenchv6 | 133 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string s having an even length n.\nYou are also... | [] | code_livecodebenchv6 | 134 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two 0-indexed integer arrays nums1 and nums2 of sizes n and... | [] | code_livecodebenchv6 | 135 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given three strings s1, s2, and s3. You have to perform the follo... | [] | code_livecodebenchv6 | 136 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are at a fruit market with different types of exotic fruits on displa... | [] | code_livecodebenchv6 | 137 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a string s and a positive integer k.\nLet vowels and conson... | [] | code_livecodebenchv6 | 138 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums.\nYou can perform any number... | [] | code_livecodebenchv6 | 139 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums consisting of positive integers.\nA ... | [] | code_livecodebenchv6 | 140 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer array nums and a positive integer k.\nReturn the... | [] | code_livecodebenchv6 | 141 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of positive integers nums and a positive ... | [] | code_livecodebenchv6 | 142 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array batteryPercentages having length ... | [] | code_livecodebenchv6 | 143 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array mountain. Your task is to find all the pe... | [] | code_livecodebenchv6 | 144 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a string word and an integer k.\nA substring s of word is c... | [] | code_livecodebenchv6 | 145 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer n and a 0-indexed integer array sick which is so... | [] | code_livecodebenchv6 | 146 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer array nums and an integer k.\nThe frequency of a... | [] | code_livecodebenchv6 | 147 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums of even length and there is ... | [] | code_livecodebenchv6 | 148 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed 2D integer matrix grid of size n * n with value... | [] | code_livecodebenchv6 | 149 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two 0-indexed integer arrays nums1 and nums2 of even length... | [] | code_livecodebenchv6 | 150 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums having length n.\nYou are al... | [] | code_livecodebenchv6 | 151 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string word.\nIn one operation, you can pick an... | [] | code_livecodebenchv6 | 152 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array coins, representing the values of... | [] | code_livecodebenchv6 | 153 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string s and an integer k.\nYou are to perform ... | [] | code_livecodebenchv6 | 154 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed 2D array variables where variables[i] = [a_i, b... | [] | code_livecodebenchv6 | 155 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two 0-indexed strings source and target, both of length n a... | [] | code_livecodebenchv6 | 156 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of integers nums.\nA prefix nums[0..i] is... | [] | code_livecodebenchv6 | 157 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two positive integers x and y.\nIn one operation, you can d... | [] | code_livecodebenchv6 | 158 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer k and an integer x.\nConsider s is the 1-indexed... | [] | code_livecodebenchv6 | 159 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array nums consisting of positive integers.\nReturn the ... | [] | code_livecodebenchv6 | 160 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given three integers start, finish, and limit. You are also given... | [] | code_livecodebenchv6 | 161 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums containing positive integers... | [] | code_livecodebenchv6 | 162 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string s, a string a, a string b, and an intege... | [] | code_livecodebenchv6 | 163 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array of positive integers nums.\nYou have to check if i... | [] | code_livecodebenchv6 | 164 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums and a positive integer k.\nY... | [] | code_livecodebenchv6 | 165 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 2D 0-indexed integer array dimensions.\nFor all indices i... | [] | code_livecodebenchv6 | 166 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of positive integers nums.\nA subarray of... | [] | code_livecodebenchv6 | 167 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums and an integer k.\nIn one op... | [] | code_livecodebenchv6 | 168 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array of positive integers nums of length n.\nA polygon ... | [] | code_livecodebenchv6 | 169 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array of integers nums of length n.\nThe cost of an arra... | [] | code_livecodebenchv6 | 170 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array nums of length n and a positive integer k.\nA suba... | [] | code_livecodebenchv6 | 171 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a string s that consists of lowercase English letters.\nA s... | [] | code_livecodebenchv6 | 172 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums of size n, and a 0-indexed i... | [] | code_livecodebenchv6 | 173 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nAlice and Bob are playing a turn-based game on a circular field surrounde... | [] | code_livecodebenchv6 | 174 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array of positive integers nums.\nIn one operat... | [] | code_livecodebenchv6 | 175 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two 1-indexed integer arrays, nums and, changeIndices, havi... | [] | code_livecodebenchv6 | 176 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string word and an integer k.\nAt every second,... | [] | code_livecodebenchv6 | 177 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed array nums consisting of positive integers.\nIn... | [] | code_livecodebenchv6 | 178 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an array of positive integers nums.\nYou need to select a s... | [] | code_livecodebenchv6 | 179 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a string s.\nConsider performing the following operation un... | [] | code_livecodebenchv6 | 180 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string array words.\nLet's define a boolean fun... | [] | code_livecodebenchv6 | 181 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nAn ant is on a boundary. It sometimes goes left and sometimes right.\nYou... | [] | code_livecodebenchv6 | 182 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string s typed by a user. Changing a key is def... | [] | code_livecodebenchv6 | 183 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed string array words having length n and containi... | [] | code_livecodebenchv6 | 184 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nGiven an array of integers called nums, you can perform the following ope... | [] | code_livecodebenchv6 | 185 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer array nums of even length. You have to split the... | [] | code_livecodebenchv6 | 186 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given two arrays with positive integers arr1 and arr2.\nA prefix ... | [] | code_livecodebenchv6 | 187 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 0-indexed integer array nums, and an integer k.\nIn one o... | [] | code_livecodebenchv6 | 188 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given a 1-indexed array of distinct integers nums of length n.\nY... | [] | code_livecodebenchv6 | 189 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nTakahashi and Aoki played N games.\r\nYou are given a string S of length ... | [
{
"input": "5\nTTAAT\n",
"output": "T\n"
},
{
"input": "6\nATTATA\n",
"output": "T\n"
},
{
"input": "1\nA\n",
"output": "A\n"
}
] | code_livecodebenchv6 | 190 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nWe have a sequence of length N consisting of positive integers: A=(A_1,\\... | [
{
"input": "4\n2 5 1 2\n",
"output": "2 3 4 5 4 3 2 1 2\n"
},
{
"input": "6\n3 4 5 6 5 4\n",
"output": "3 4 5 6 5 4\n"
}
] | code_livecodebenchv6 | 191 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nA single-player card game is popular in AtCoder Inc.\r\nEach card in the ... | [
{
"input": "ch@ku@ai\nchoku@@i\n",
"output": "Yes\n"
},
{
"input": "ch@kud@i\nakidu@ho\n",
"output": "Yes\n"
},
{
"input": "aoki\n@ok@\n",
"output": "No\n"
},
{
"input": "aa\nbb\n",
"output": "No\n"
}
] | code_livecodebenchv6 | 192 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given an integer N and a string S consisting of 0, 1, and ?.\nLet... | [
{
"input": "?0?\n2\n",
"output": "1\n"
},
{
"input": "101\n4\n",
"output": "-1\n"
},
{
"input": "?0?\n1000000000000000000\n",
"output": "5\n"
}
] | code_livecodebenchv6 | 193 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nWe have a grid with H rows and W columns.\r\nLet (i,j) denote the square ... | [
{
"input": "3 3 5\nS.G\no#o\n.#.\n",
"output": "1\n"
},
{
"input": "3 3 1\nS.G\n.#o\no#.\n",
"output": "-1\n"
},
{
"input": "5 10 2000000\nS.o..ooo..\n..o..o.o..\n..o..ooo..\n..o..o.o..\n..o..ooo.G\n",
"output": "18\n"
}
] | code_livecodebenchv6 | 194 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nA DDoS-type string is a string of length 4 consisting of uppercase and lo... | [
{
"input": "DD??S\n",
"output": "676\n"
},
{
"input": "????????????????????????????????????????\n",
"output": "858572093\n"
},
{
"input": "?D??S\n",
"output": "136604\n"
}
] | code_livecodebenchv6 | 195 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nThere is an enemy with stamina A. Every time you attack the enemy, its s... | [
{
"input": "7 3\n",
"output": "3\n"
},
{
"input": "123456789123456789 987654321\n",
"output": "124999999\n"
},
{
"input": "999999999999999998 2\n",
"output": "499999999999999999\n"
}
] | code_livecodebenchv6 | 196 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nThere is a grid with H horizontal rows and W vertical columns. Each cell... | [
{
"input": "6 6\nvgxgpu\namkxks\nzhkbpp\nhykink\nesnuke\nzplvfj\n",
"output": "5 2\n5 3\n5 4\n5 5\n5 6\n"
},
{
"input": "5 5\nezzzz\nzkzzz\nezuzs\nzzznz\nzzzzs\n",
"output": "5 5\n4 4\n3 3\n2 2\n1 1\n"
},
{
"input": "10 10\nkseeusenuk\nusesenesnn\nkskekeeses\nnesnusnkkn\nsnenuuenke\nkukk... | code_livecodebenchv6 | 197 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nYou are given N strings S_1,S_2,\\dots,S_N, each of length M, consisting ... | [
{
"input": "4 4\nbbed\nabcd\nabed\nfbed\n",
"output": "Yes\n"
},
{
"input": "2 5\nabcde\nabced\n",
"output": "No\n"
},
{
"input": "8 4\nfast\nface\ncast\nrace\nfact\nrice\nnice\ncase\n",
"output": "Yes\n"
}
] | code_livecodebenchv6 | 198 |
[
{
"role": "user",
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n### Question: \nTakahashi has decided to give one gift to Aoki and one gift to Snuke.\r\n... | [
{
"input": "2 3 2\n3 10\n2 5 15\n",
"output": "8\n"
},
{
"input": "3 3 0\n1 3 3\n6 2 7\n",
"output": "-1\n"
},
{
"input": "1 1 1000000000000000000\n1000000000000000000\n1000000000000000000\n",
"output": "2000000000000000000\n"
},
{
"input": "8 6 1\n2 5 6 5 2 1 7 9\n7 2 5 5 2 ... | code_livecodebenchv6 | 199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.