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: \nAn array is considered special if every pair of its adjacent elements con... | [] | code_livecodebenchv6 | 501 |
[
{
"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 where all int... | [] | code_livecodebenchv6 | 502 |
[
{
"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 non-negative integer k. There exists a staircase with an ... | [] | code_livecodebenchv6 | 503 |
[
{
"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 2 integer arrays nums1 and nums2 of lengths n and m respect... | [] | code_livecodebenchv6 | 504 |
[
{
"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 string word, compress it using the following algorithm:\n\nBegin ... | [] | code_livecodebenchv6 | 505 |
[
{
"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 integers. You are also given a ... | [] | code_livecodebenchv6 | 506 |
[
{
"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 string s, you need to partition it into one or more balanced subs... | [] | code_livecodebenchv6 | 507 |
[
{
"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 powerful array for an integer x is the shortest sorted array of powers ... | [] | code_livecodebenchv6 | 508 |
[
{
"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, where each number in the array appears eithe... | [] | code_livecodebenchv6 | 509 |
[
{
"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, an integer array queries, and an int... | [] | code_livecodebenchv6 | 510 |
[
{
"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, L, and R.\r\nFor a sequence A = (1, 2,... | [
{
"input": "5 2 3\n",
"output": "1 3 2 4 5\n"
},
{
"input": "7 1 1\n",
"output": "1 2 3 4 5 6 7\n"
},
{
"input": "10 1 10\n",
"output": "10 9 8 7 6 5 4 3 2 1\n"
}
] | code_livecodebenchv6 | 511 |
[
{
"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 integers N and M, compute the sum \\displaystyle \\sum_{k=0}^{N} \\... | [
{
"input": "4 3\n",
"output": "4\n"
},
{
"input": "0 0\n",
"output": "0\n"
},
{
"input": "1152921504606846975 1152921504606846975\n",
"output": "499791890\n"
}
] | code_livecodebenchv6 | 512 |
[
{
"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 sequence A=(A_1,\\ldots,A_N) of length N.\nFind \\display... | [
{
"input": "3\n3 1 4\n",
"output": "8\n"
},
{
"input": "6\n2 7 1 8 2 8\n",
"output": "53\n"
},
{
"input": "12\n3 31 314 3141 31415 314159 2 27 271 2718 27182 271828\n",
"output": "592622\n"
}
] | code_livecodebenchv6 | 513 |
[
{
"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 keys numbered 1, 2, \\dots, N.\r\nSome of these are real keys,... | [
{
"input": "3 2 2\n3 1 2 3 o\n2 2 3 x\n",
"output": "2\n"
},
{
"input": "4 5 3\n3 1 2 3 o\n3 2 3 4 o\n3 3 4 1 o\n3 4 1 2 o\n4 1 2 3 4 x\n",
"output": "0\n"
},
{
"input": "11 4 9\n10 1 2 3 4 5 6 7 8 9 10 o\n11 1 2 3 4 5 6 7 8 9 10 11 o\n10 11 10 9 8 7 6 5 4 3 2 x\n10 11 9 1 4 3 7 5 6 2 10... | code_livecodebenchv6 | 514 |
[
{
"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 is health-conscious and concerned about whether he is getting e... | [
{
"input": "2 3\n10 20 30\n20 0 10\n0 100 100\n",
"output": "Yes\n"
},
{
"input": "2 4\n10 20 30 40\n20 0 10 30\n0 100 100 0\n",
"output": "No\n"
}
] | code_livecodebenchv6 | 515 |
[
{
"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: \nFor a non-negative integer K, we define a level-K carpet as follows:\n\n-... | [
{
"input": "1\n",
"output": "###\n#.#\n###\n"
},
{
"input": "2\n",
"output": "#########\n#.##.##.#\n#########\n###...###\n#.#...#.#\n###...###\n#########\n#.##.##.#\n#########\n"
}
] | code_livecodebenchv6 | 516 |
[
{
"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 bottle of disinfectant that can disinfect exactly M hands.\nN ... | [
{
"input": "5 10\n2 3 2 5 3\n",
"output": "3\n"
},
{
"input": "5 10\n2 3 2 3 5\n",
"output": "4\n"
},
{
"input": "1 5\n1\n",
"output": "1\n"
}
] | code_livecodebenchv6 | 517 |
[
{
"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: \nFor a positive integer N, let V_N be the integer formed by concatenating ... | [
{
"input": "5\n",
"output": "55555\n"
},
{
"input": "9\n",
"output": "1755646\n"
},
{
"input": "10000000000\n",
"output": "468086693\n"
}
] | code_livecodebenchv6 | 518 |
[
{
"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 consisting of lowercase and uppercase English le... | [
{
"input": "AtCoder\n",
"output": "atcoder\n"
},
{
"input": "SunTORY\n",
"output": "SUNTORY\n"
},
{
"input": "a\n",
"output": "a\n"
}
] | code_livecodebenchv6 | 519 |
[
{
"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 directed graph with N vertices numbered 1 to N and N edges.\r\... | [
{
"input": "4\n2 1 1 4\n",
"output": "8\n"
},
{
"input": "5\n2 4 3 1 2\n",
"output": "14\n"
},
{
"input": "10\n6 10 4 1 5 9 8 6 5 1\n",
"output": "41\n"
}
] | code_livecodebenchv6 | 520 |
[
{
"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: \nAtCoder Land sells tiles with English letters written on them. Takahashi ... | [
{
"input": "2\n2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
"output": "10\n"
},
{
"input": "358\n1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n",
"output": "64\n"
},
{
"input": "1000\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1... | code_livecodebenchv6 | 521 |
[
{
"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: \nIn AtCoder Land, there are N popcorn stands numbered 1 to N. They have M ... | [
{
"input": "3 5\noooxx\nxooox\nxxooo\n",
"output": "2\n"
},
{
"input": "3 2\noo\nox\nxo\n",
"output": "1\n"
},
{
"input": "8 6\nxxoxxo\nxxoxxx\nxoxxxx\nxxxoxx\nxxoooo\nxxxxox\nxoxxox\noxoxxo\n",
"output": "3\n"
}
] | code_livecodebenchv6 | 522 |
[
{
"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: \nAt the entrance of AtCoder Land, there is a single ticket booth where vis... | [
{
"input": "3 4\n0 2 10\n",
"output": "4\n8\n14\n"
},
{
"input": "3 3\n1 4 7\n",
"output": "4\n7\n10\n"
},
{
"input": "10 50000\n120190 165111 196897 456895 540000 552614 561627 743796 757613 991216\n",
"output": "170190\n220190\n270190\n506895\n590000\n640000\n690000\n793796\n843796... | code_livecodebenchv6 | 523 |
[
{
"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 souvenir shop at AtCoder Land sells N boxes.\nThe boxes are numbered 1 ... | [
{
"input": "4 2\n3 4 5 4\n1 4\n",
"output": "7\n"
},
{
"input": "3 3\n1 1 1\n1000000000 1000000000 1000000000\n",
"output": "-1\n"
},
{
"input": "7 3\n2 6 8 9 5 1 11\n3 5 7\n",
"output": "19\n"
}
] | code_livecodebenchv6 | 524 |
[
{
"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 is heading to AtCoder Land.\r\nThere is a signboard in front of... | [
{
"input": "AtCoder Land\n",
"output": "Yes\n"
},
{
"input": "CodeQUEEN Land\n",
"output": "No\n"
},
{
"input": "aTcodeR lANd\n",
"output": "No\n"
}
] | code_livecodebenchv6 | 525 |
[
{
"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: \nThe coordinate plane is covered with 2\\times1 tiles. The tiles are laid ... | [
{
"input": "5 0\n2 5\n",
"output": "5\n"
},
{
"input": "3 1\n4 1\n",
"output": "0\n"
},
{
"input": "2552608206527595 5411232866732612\n771856005518028 7206210729152763\n",
"output": "1794977862420151\n"
}
] | code_livecodebenchv6 | 526 |
[
{
"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 2N people standing in a row, and the person at the i-th positio... | [
{
"input": "3\n1 2 1 3 2 3\n",
"output": "2\n"
},
{
"input": "2\n1 1 2 2\n",
"output": "0\n"
},
{
"input": "4\n4 3 2 3 2 1 4 1\n",
"output": "3\n"
}
] | code_livecodebenchv6 | 527 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.