Dataset Viewer
Auto-converted to Parquet Duplicate
task_id
stringlengths
3
77
prompt
listlengths
2
2
entry_point
stringlengths
14
56
test
stringlengths
59
925
completion
stringlengths
83
3.41k
examples
listlengths
1
5
src
stringlengths
199
2.12k
meta
dict
data_source
stringclasses
1 value
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
token_count
int64
158
1.02k
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [[[[1, 2], [1, 3], [1, 4]]], [[[1, 3], [5, 3]]], [[[12, 3], [15, 3]]], [[[2, 7], [1, 3], [1, 12]]], [[[69, 130], [87, 1310], [3, 4]]], [[[77, 130], [84, 131], [60, 80]]], [[[6, 13], [187, 1310], [31, 41]]], [[[8, 15], [7, 111], [4, 25]]], [[]], [[[81345, 15786], [87546,...
{ "dataset": "likaixin/TACO-verified", "index": 4810, "prompt": "Solve the programming task below in a Python markdown code block.\nYou will have a list of rationals in the form\n\n```\nlst = [ [numer_1, denom_1] , ... , [numer_n, denom_n] ]\n```\nor\n```\nlst = [ (numer_1, denom_1) , ... , (numer_n, denom_n) ]\n...
719
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"0 0 2 4\\n1 2\\n1 2\\n\", \"0 0 2 3\\n1 1\\n1 3\\n\", \"0 0 2 4\\n1 1\\n1 2\\n\", \"0 0 2 3\\n1 1\\n1 2\\n\", \"-140 -140 2 200\\n1 0\\n0 1\\n\", \"-12 -34 5 200\\n1 0\\n2 0\\n3 1\\n10 3\\n11 4\\n\", \"0 0 5 101\\n21 38\\n43 42\\n5 29\\n69 3\\n84 52\\n\", \"0 0 5 100\\n12 105\\n15 5...
{ "dataset": "likaixin/TACO-verified", "index": 4513, "prompt": "Solve the programming task below in a Python markdown code block.\nAnton and Dasha like to play different games during breaks on checkered paper. By the 11th grade they managed to play all the games of this type and asked Vova the programmer to come...
619
reachable-nodes-with-restrictions
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
Solution().reachableNodes
def check(candidate): assert candidate(n = 7, edges = [[0,1],[1,2],[3,1],[4,0],[0,5],[5,6]], restricted = [4,5]) == 4 assert candidate(n = 7, edges = [[0,1],[0,2],[0,5],[0,4],[3,2],[6,5]], restricted = [4,2,1]) == 3
class Solution: def reachableNodes( self, n: int, edges: List[List[int]], restricted: List[int] ) -> int: def dfs(i: int) -> int: vis.add(i) return 1 + sum(j not in vis and dfs(j) for j in g[i]) g = defaultdict(list) for a, b in edges: g[a].ap...
[ { "input": "n = 7, edges = [[0,1],[1,2],[3,1],[4,0],[0,5],[5,6]], restricted = [4,5]", "output": "4" }, { "input": "n = 7, edges = [[0,1],[0,2],[0,5],[0,4],[3,2],[6,5]], restricted = [4,2,1]", "output": "3" } ]
There is an undirected tree with n nodes labeled from 0 to n - 1 and n - 1 edges. You are given a 2D integer array edges of length n - 1 where edges[i] = [ai, bi] indicates that there is an edge between nodes ai and bi in the tree. You are also given an integer array restricted which represents restricted nodes. Return...
{ "question_id": 2445, "difficulty": "Medium", "lang_code": "class Solution:\n def reachableNodes(self, n: int, edges: List[List[int]], restricted: List[int]) -> int:", "question_title": "There is an undirected tree with n nodes labeled from 0 to n - 1 and n - 1 edges.\nYou are given a 2D integer array edges...
code
coding
{ "ground_truth": "{\"functional\": \"def check(candidate):\\n assert candidate(n = 7, edges = [[0,1],[1,2],[3,1],[4,0],[0,5],[5,6]], restricted = [4,5]) == 4\\n assert candidate(n = 7, edges = [[0,1],[0,2],[0,5],[0,4],[3,2],[6,5]], restricted = [4,2,1]) == 3\\n\\n\\ncheck(Solution().reachableNodes)\"}", "sty...
{ "dataset": "LeetCodeDataset", "index": 1098, "prompt": "Please solve the programming task below using a self-contained code snippet in a markdown code block.\n\nThere is an undirected tree with n nodes labeled from 0 to n - 1 and n - 1 edges.\nYou are given a 2D integer array edges of length n - 1 where edges[i...
271
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"9 1 8 2\\n4 1 5 9\\n4 6 8 2\\n4 6 3 0\", \"9 1 8 2\\n6 1 5 9\\n4 6 8 2\\n2 6 3 0\", \"9 1 8 2\\n4 1 5 9\\n2 6 8 2\\n4 6 3 0\", \"9 1 8 2\\n6 2 5 9\\n4 6 8 2\\n4 6 3 0\", \"9 1 8 2\\n6 2 5 9\\n4 6 8 2\\n4 9 3 0\", \"9 1 8 2\\n6 0 5 9\\n4 6 5 2\\n4 6 3 0\", \"9 1 8 2\\n6 2 8 9\\n4 6 8...
{ "dataset": "likaixin/TACO-verified", "index": 12706, "prompt": "Solve the programming task below in a Python markdown code block.\nLet's play Hit and Blow game. A imagines four numbers and B guesses the numbers. After B picks out four numbers, A answers:\n\n* The number of numbers which have the same place with...
453
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"4\\n21\", \"4\\n32\", \"4\\n13\", \"4\\n21\", \"4\\n44\", \"4\\n12\", \"4\\n11\", \"4\\n22\"], \"outputs\": [\"1\\n\", \"1\\n\", \"2\\n\", \"1\\n\", \"0\\n\", \"1\\n\", \"0\\n\", \"0\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 4400, "prompt": "Solve the programming task below in a Python markdown code block.\nGiven is a sequence of N digits a_1a_2\\ldots a_N, where each element is 1, 2, or 3. Let x_{i,j} defined as follows:\n\n* x_{1,j} := a_j \\quad (1 \\leq j \\leq N)\n* x_{i,j} := | x_...
373
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"1\\n1 2\"], \"outputs\": [\"8\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 1539, "prompt": "Solve the programming task below in a Python markdown code block.\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nXenny reverse-engineered all the binaries released by the International Security Agency (ISA)\ndurin...
651
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"46 4 4 5\", \"64 4 4 5\", \"64 8 4 5\", \"5 9 3 10\", \"54 8 4 5\", \"54 8 2 5\", \"54 6 2 5\", \"54 6 0 5\"], \"outputs\": [\"Yes\\n\", \"Yes\\n\", \"Yes\\n\", \"Yes\\n\", \"Yes\\n\", \"Yes\\n\", \"Yes\\n\", \"Yes\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 117, "prompt": "Solve the programming task below in a Python markdown code block.\nTakahashi and Aoki will have a battle using their monsters.\nThe health and strength of Takahashi's monster are A and B, respectively, and those of Aoki's monster are C and D, respect...
439
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3\", \"4\", \"8\", \"1\", \"7\", \"0\", \"1\\n\", \"16\"], \"outputs\": [\"3\\n\", \"7\\n\", \"22\\n\", \"1\\n\", \"14\\n\", \"0\\n\", \"1\\n\", \"76\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 516, "prompt": "Solve the programming task below in a Python markdown code block.\nLet 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 - ...
427
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"5 2\\n6 7\\n-1 1\\n0 1\\n5 2\\n7 3\\n\"], \"outputs\": [\"13\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 7840, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are $n$ pairs of hard disk drives (HDDs) in a cluster. Each HDD is located at an integer coordinate on an infinite straight line, and each pair consists of one primary HDD and ...
853
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3\\nnxx\", \"3\\nnwx\", \"3\\nxxo\", \"3\\nxwn\", \"3\\nowx\", \"3\\npxx\", \"3\\npyx\", \"3\\npzx\"], \"outputs\": [\"2\\n\", \"3\\n\", \"1\\n\", \"3\\n\", \"3\\n\", \"2\\n\", \"3\\n\", \"3\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 5523, "prompt": "Solve the programming task below in a Python markdown code block.\nproblem\n\nAOR Ika is studying to pass the test.\n\nAOR Ika-chan solved the $ N $ question. After that, round the solved problem according to the following procedure.\n\n1. Check the...
426
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"5\\n5\\n1 2 3 4 5\\n8\\n6 6 6 6 6 6 8 8\\n8\\n1 2 2 1 2 1 1 2\\n3\\n1 3 3\\n6\\n1 1 3 4 2 2\\n\", \"5\\n5\\n1 2 3 4 5\\n8\\n6 6 6 6 6 6 8 8\\n8\\n1 2 2 1 2 1 1 2\\n3\\n1 3 3\\n6\\n1 1 3 4 2 2\\n\", \"4\\n14\\n2 6 5 9 5 8 13 14 8 5 6 14 5 2\\n36\\n15 22 27 7 23 36 1 17 33 21 18 7 3 4...
{ "dataset": "likaixin/TACO-verified", "index": 6056, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are $n$ people who want to participate in a boat competition. The weight of the $i$-th participant is $w_i$. Only teams consisting of two people can participate in this competi...
859
minimum-time-to-make-array-sum-at-most-x
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
Solution().minimumTime
def check(candidate): assert candidate(nums1 = [1,2,3], nums2 = [1,2,3], x = 4) == 3 assert candidate(nums1 = [1,2,3], nums2 = [3,3,3], x = 4) == -1
class Solution: def minimumTime(self, nums1: List[int], nums2: List[int], x: int) -> int: n = len(nums1) f = [[0] * (n + 1) for _ in range(n + 1)] for i, (a, b) in enumerate(sorted(zip(nums1, nums2), key=lambda z: z[1]), 1): for j in range(n + 1): f[i][j] = f[i - ...
[ { "input": "nums1 = [1,2,3], nums2 = [1,2,3], x = 4", "output": "3" }, { "input": "nums1 = [1,2,3], nums2 = [3,3,3], x = 4", "output": "-1" } ]
You are given two 0-indexed integer arrays nums1 and nums2 of equal length. Every second, for all indices 0 <= i < nums1.length, value of nums1[i] is incremented by nums2[i]. After this is done, you can do the following operation: Choose an index 0 <= i < nums1.length and make nums1[i] = 0. You are also given an inte...
{ "question_id": 2952, "difficulty": "Hard", "lang_code": "class Solution:\n def minimumTime(self, nums1: List[int], nums2: List[int], x: int) -> int:", "question_title": "You are given two 0-indexed integer arrays nums1 and nums2 of equal length. Every second, for all indices 0 <= i < nums1.length, value of...
code
coding
{ "ground_truth": "{\"functional\": \"def check(candidate):\\n assert candidate(nums1 = [1,2,3], nums2 = [1,2,3], x = 4) == 3\\n assert candidate(nums1 = [1,2,3], nums2 = [3,3,3], x = 4) == -1\\n\\n\\ncheck(Solution().minimumTime)\"}", "style": "rule" }
{ "dataset": "LeetCodeDataset", "index": 1232, "prompt": "Please solve the programming task below using a self-contained code snippet in a markdown code block.\n\nYou are given two 0-indexed integer arrays nums1 and nums2 of equal length. Every second, for all indices 0 <= i < nums1.length, value of nums1[i] is i...
287
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3\\n1 1\\n2 2\\n2 3\"], \"outputs\": [\"2\\n25\\n273\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 8744, "prompt": "Solve the programming task below in a Python markdown code block.\nLet's consider a rectangular table R consisting of N rows and M columns. Rows are enumerated from 1 to N from top to bottom. Columns are enumerated from 1 to M from left to right. E...
518
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"2 0\\n2 1\\n\", \"2 5\\n5 4\\n\", \"2 0\\n2 1\\n\", \"2 5\\n5 4\\n\", \"2 2\\n7 0\\n\", \"2 5\\n5 5\\n\", \"2 5\\n7 5\\n\", \"2 2\\n7 5\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"1\\n\", \"0\\n\", \"5\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 5777, "prompt": "Solve the programming task below in a Python markdown code block.\nThe bear decided to store some raspberry for the winter. He cunningly found out the price for a barrel of honey in kilos of raspberry for each of the following n days. According to t...
735
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 1], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2], [['C', 'o', 'd', 'e', 'W', 'a', 'r', 's'], 4], [['C', 0, 'd', 3, 'W', 4, 'r', 5], 4], [[1, 2, 3, 4, 5, 6, 7], 3], [[], 3], [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2...
{ "dataset": "likaixin/TACO-verified", "index": 7483, "prompt": "Solve the programming task below in a Python markdown code block.\nThis problem takes its name by arguably the most important event in the life of the ancient historian Josephus: according to his tale, he and his 40 soldiers were trapped in a cave b...
727
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [[['Small', 'frame'], '~'], [['Create', 'this', 'kata'], '+'], [['This is a very long single frame'], '-']]\\n_outputs = [['~~~~~~~~~\\\\n~ Small ~\\\\n~ frame ~\\\\n~~~~~~~~~'], ['++++++++++\\\\n+ Create +\\\\n+ this +\\\\n+ kata +\\\\n++++++++++'], ['-------------...
{ "dataset": "likaixin/TACO-verified", "index": 11611, "prompt": "Solve the programming task below in a Python markdown code block.\n```\n*************************\n* Create a frame! *\n* __ __ *\n* / \\~~~/ \\ *\n* ,----( .. ) *\n* / \\__ __/ *\n* /| ...
360
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [['key1', 'key22', 'key333'], ['coding', 'sorting', 'tryruby'], ['small keyword', 'how to coding?', 'very nice kata', 'a lot of keys', 'I like Ruby!!!'], ['pippi']]\\n_outputs = [[\\\"'key333'\\\"], [\\\"'sorting', 'tryruby'\\\"], [\\\"'I like Ruby!!!', 'how to coding?'...
{ "dataset": "likaixin/TACO-verified", "index": 11533, "prompt": "Solve the programming task below in a Python markdown code block.\nYou're a programmer in a SEO company. The SEO specialist of your company gets the list of all project keywords everyday, then he looks for the longest keys to analyze them.\n\nYou w...
282
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [[[25, 30, 35, 40, 45, 50], [78, 70, 65, 58, 48, 42]], [[56, 42, 72, 36, 63, 47, 55, 49, 38, 42, 68, 60], [147, 125, 160, 118, 149, 128, 150, 145, 115, 140, 152, 155]], [[0, 10, 20, 30, 40], [0.51, 0.55, 0.57, 0.59, 0.63]]]\\n_outputs = [[[114.381, -1.4457]], [[80.7777,...
{ "dataset": "likaixin/TACO-verified", "index": 2229, "prompt": "Solve the programming task below in a Python markdown code block.\n#### Background: \n \n\nA linear regression line has an equation in the form `$Y = a + bX$`, where `$X$` is the explanatory variable and `$Y$` is the dependent variable. The paramete...
708
assign-cookies
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
Solution().findContentChildren
def check(candidate): assert candidate(g = [1,2,3], s = [1,1]) == 1 assert candidate(g = [1,2], s = [1,2,3]) == 2
class Solution: def findContentChildren(self, g: List[int], s: List[int]) -> int: g.sort() s.sort() j = 0 for i, x in enumerate(g): while j < len(s) and s[j] < g[i]: j += 1 if j >= len(s): return i j += 1 ret...
[ { "input": "g = [1,2,3], s = [1,1]", "output": "1" }, { "input": "g = [1,2], s = [1,2,3]", "output": "2" } ]
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a greed factor g[i], which is the minimum size of a cookie that the child will be content with; and each cookie j has a size s[j]. If s[j] >= g[i], we can assign the cookie ...
{ "question_id": 455, "difficulty": "Easy", "lang_code": "class Solution:\n def findContentChildren(self, g: List[int], s: List[int]) -> int:", "question_title": "Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.\nEach child i ha...
code
coding
{ "ground_truth": "{\"functional\": \"def check(candidate):\\n assert candidate(g = [1,2,3], s = [1,1]) == 1\\n assert candidate(g = [1,2], s = [1,2,3]) == 2\\n\\n\\ncheck(Solution().findContentChildren)\"}", "style": "rule" }
{ "dataset": "LeetCodeDataset", "index": 127, "prompt": "Please solve the programming task below using a self-contained code snippet in a markdown code block.\n\nAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.\nEach child i has a gr...
263
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3\\n5\\n1 1 1 1 0\\n3\\n0 1 0\\n4\\n0 0 0 0\\n\"], \"outputs\": [\"1\\n0\\n0\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 6516, "prompt": "Solve the programming task below in a Python markdown code block.\nAlice and Bob are ready to play a new game. Both the players take alternate turns. Alice starts first. \n\nThere are N binary numbers written on a blackboard. \nAlice, in her turn,...
880
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"9 6 1\", \"3 3 1\", \"3 3 2\", \"2 1 8\", \"3 5 1\", \"3 6 2\", \"1 3 4\", \"5 1 1\"], \"outputs\": [\"6\\n\", \"1\\n\", \"2\\n\", \"16\\n\", \"15\\n\", \"4\\n\", \"12\\n\", \"5\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 4667, "prompt": "Solve the programming task below in a Python markdown code block.\nIn Aizu prefecture, we decided to create a new town to increase the population. To that end, we decided to cultivate a new rectangular land and divide this land into squares of the s...
374
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3\\n2 2 2\", \"3\\n2 2 1\", \"3\\n2 1 2\", \"3\\n2 1 2\\n\", \"4\\n1 3 1 3\", \"4\\n1 3 3 2\", \"4\\n2 3 2 2\", \"4\\n2 3 4 1\"], \"outputs\": [\"3\\n0\\n0\\n\", \"3\\n1\\n0\\n\", \"3\\n1\\n0\", \"3\\n1\\n0\\n\", \"4\\n2\\n0\\n0\\n\", \"4\\n2\\n1\\n0\\n\", \"4\\n1\\n0\\n0\\n\", \"4\...
{ "dataset": "likaixin/TACO-verified", "index": 9919, "prompt": "Solve the programming task below in a Python markdown code block.\nTakahashi has N cards. The i-th of these cards has an integer A_i written on it.\nTakahashi will choose an integer K, and then repeat the following operation some number of times:\n ...
448
first-missing-positive
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
Solution().firstMissingPositive
def check(candidate): assert candidate(nums = [1,2,0]) == 3 assert candidate(nums = [3,4,-1,1]) == 2 assert candidate(nums = [7,8,9,11,12]) == 1
class Solution: def firstMissingPositive(self, nums: List[int]) -> int: def swap(i, j): nums[i], nums[j] = nums[j], nums[i] n = len(nums) for i in range(n): while 1 <= nums[i] <= n and nums[i] != nums[nums[i] - 1]: swap(i, nums[i] - 1) for i i...
[ { "input": "nums = [1,2,0]", "output": "3" }, { "input": "nums = [3,4,-1,1]", "output": "2" }, { "input": "nums = [7,8,9,11,12]", "output": "1" } ]
Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums. You must implement an algorithm that runs in O(n) time and uses O(1) auxiliary space.   Please complete the following python code precisely: ```python class Solution: def firstMissingPositive(self, nums: List[int...
{ "question_id": 41, "difficulty": "Hard", "lang_code": "class Solution:\n def firstMissingPositive(self, nums: List[int]) -> int:", "question_title": "Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.\nYou must implement an algorithm that runs in O(n) ti...
code
coding
{ "ground_truth": "{\"functional\": \"def check(candidate):\\n assert candidate(nums = [1,2,0]) == 3\\n assert candidate(nums = [3,4,-1,1]) == 2\\n assert candidate(nums = [7,8,9,11,12]) == 1\\n\\n\\ncheck(Solution().firstMissingPositive)\"}", "style": "rule" }
{ "dataset": "LeetCodeDataset", "index": 518, "prompt": "Please solve the programming task below using a self-contained code snippet in a markdown code block.\n\nGiven an unsorted integer array nums. Return the smallest positive integer that is not present in nums.\nYou must implement an algorithm that runs in O(...
191
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"aba\\naaaab\", \"aba\\naa`ab\", \"`ba\\naa`ab\", \"`ab\\naa`ab\", \"ab`\\naa`ab\", \"ab`\\naa`ac\", \"ac`\\naa`ac\", \"`ca\\naa`ac\"], \"outputs\": [\"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 2359, "prompt": "Solve the programming task below in a Python markdown code block.\nGiven are two strings s and t consisting of lowercase English letters. Determine if the number of non-negative integers i satisfying the following condition is finite, and find the m...
586
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"1\\n0 1\\n\", \"1\\n0 1\\n\", \"1\\n1 1\\n\", \"1\\n0 2\\n\", \"1\\n1 2\\n\", \"1\\n0 4\\n\", \"1\\n1 3\\n\", \"1\\n0 3\\n\"], \"outputs\": [\"0\\n\", \"0\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 12487, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are n beacons located at distinct positions on a number line. The i-th beacon has position a_{i} and power level b_{i}. When the i-th beacon is activated, it destroys all beac...
611
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"9\\n1 2 3 4 5 6 7 8 9\\n9\\n10 1 2 3 11 21 55 6 8\\n\"], \"outputs\": [\"8\\n\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 858, "prompt": "Solve the programming task below in a Python markdown code block.\n.symmetric_difference()\n \nThe .symmetric_difference() operator returns a set with all the elements that are in the set and the iterable but not both.\n\nSometimes, a ^ operator is ...
818
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"5 3\\n1 2\\n2 3\\n3 1\", \"5 3\\n1 2\\n2 3\\n5 1\", \"3 3\\n2 2\\n2 3\\n3 1\", \"5 3\\n1 2\\n2 3\\n2 1\", \"5 3\\n1 2\\n3 3\\n5 1\", \"5 1\\n1 2\\n3 3\\n5 1\", \"3 3\\n1 2\\n2 3\\n3 1\", \"7 9\\n1 2\\n1 3\\n2 3\\n1 4\\n1 5\\n4 5\\n1 5\\n1 7\\n6 7\"], \"outputs\": [\"No\\n\", \"No\\n...
{ "dataset": "likaixin/TACO-verified", "index": 4657, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given a simple connected undirected graph consisting of N vertices and M edges. The vertices are numbered 1 to N, and the edges are numbered 1 to M.\n\nEdge i connects Vertex...
534
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"3 2 3\\n1 2 3\\n1 2\\n2 3\\n\", \"3 2 2\\n1 1 2\\n1 2\\n2 1\\n\", \"3 2 3\\n1 2 3\\n1 2\\n2 3\\n\", \"3 2 2\\n1 1 2\\n1 2\\n2 1\\n\", \"4 2 4\\n1 2 3 4\\n1 2\\n3 4\\n\", \"4 2 4\\n1 2 3 4\\n1 2\\n3 4\\n\", \"4 2 4\\n1 2 3 4\\n1 3\\n3 4\\n\", \"4 2 4\\n1 2 1 4\\n1 3\\n3 4\\n\"], \"ou...
{ "dataset": "likaixin/TACO-verified", "index": 12678, "prompt": "Solve the programming task below in a Python markdown code block.\nArseniy is already grown-up and independent. His mother decided to leave him alone for m days and left on a vacation. She have prepared a lot of food, left some money and washed all...
849
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"4\\n3\\n1 2 3\\n6\\n1 3 2 6 5 4\\n4\\n4 1 3 2\\n8\\n3 2 1 6 7 8 5 4\\n\", \"4\\n3\\n1 2 3\\n6\\n1 3 2 6 5 4\\n4\\n4 1 3 2\\n8\\n3 0 1 6 7 8 5 4\\n\", \"4\\n3\\n1 2 3\\n6\\n1 3 2 6 5 4\\n4\\n4 1 3 2\\n8\\n3 2 1 6 7 1 5 4\\n\", \"4\\n3\\n1 2 0\\n6\\n1 3 2 6 5 4\\n4\\n4 1 3 2\\n8\\n3 0...
{ "dataset": "likaixin/TACO-verified", "index": 1999, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given a permutation p consisting of n integers 1, 2, ..., n (a permutation is an array where each element from 1 to n occurs exactly once).\n\nLet's call an array a bipartite...
527
longest-subarray-of-1s-after-deleting-one-element
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
Solution().longestSubarray
def check(candidate): assert candidate(nums = [1,1,0,1]) == 3 assert candidate(nums = [0,1,1,1,0,1,1,0,1]) == 5 assert candidate(nums = [1,1,1]) == 2
class Solution: def longestSubarray(self, nums: List[int]) -> int: n = len(nums) left = [0] * (n + 1) right = [0] * (n + 1) for i, x in enumerate(nums, 1): if x: left[i] = left[i - 1] + 1 for i in range(n - 1, -1, -1): if nums[i]: ...
[ { "input": "nums = [1,1,0,1]", "output": "3" }, { "input": "nums = [0,1,1,1,0,1,1,0,1]", "output": "5" }, { "input": "nums = [1,1,1]", "output": "2" } ]
Given a binary array nums, you should delete one element from it. Return the size of the longest non-empty subarray containing only 1's in the resulting array. Return 0 if there is no such subarray.   Please complete the following python code precisely: ```python class Solution: def longestSubarray(self, nums: List...
{ "question_id": 1586, "difficulty": "Medium", "lang_code": "class Solution:\n def longestSubarray(self, nums: List[int]) -> int:", "question_title": "Given a binary array nums, you should delete one element from it.\nReturn the size of the longest non-empty subarray containing only 1's in the resulting arra...
code
coding
{ "ground_truth": "{\"functional\": \"def check(candidate):\\n assert candidate(nums = [1,1,0,1]) == 3\\n assert candidate(nums = [0,1,1,1,0,1,1,0,1]) == 5\\n assert candidate(nums = [1,1,1]) == 2\\n\\n\\ncheck(Solution().longestSubarray)\"}", "style": "rule" }
{ "dataset": "LeetCodeDataset", "index": 653, "prompt": "Please solve the programming task below using a self-contained code snippet in a markdown code block.\n\nGiven a binary array nums, you should delete one element from it.\nReturn the size of the longest non-empty subarray containing only 1's in the resultin...
195
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"1\\n7\\n3 2 15 6 8 5 10\"], \"outputs\": [\"5\"]}", "style": "rule" }
{ "dataset": "likaixin/TACO-verified", "index": 7149, "prompt": "Solve the programming task below in a Python markdown code block.\nTara was completing an Algorithms assignment and got stuck on a question. She thought of who can help her, and got reminded of Kabir who has good problem solving skills. The question...
522
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"4\\n0010 3716 520\\n14 3661 29\\n1507 2460 80\\n1101 670 2276\\n2\\n0011 100 0\\n954 1100 000\\n2\\n715 245 100\\n883 426 100\\n0\", \"4\\n0010 2000 520\\n14 3661 29\\n1507 375 1160\\n1100 670 2276\\n2\\n0011 100 0\\n954 1100 000\\n2\\n715 245 100\\n50 426 100\\n0\", \"4\\n0110 1753...
{ "dataset": "likaixin/TACO-verified", "index": 7000, "prompt": "Solve the programming task below in a Python markdown code block.\nThere is data on sales of your company. Your task is to write a program which identifies good workers.\n\nThe program should read a list of data where each item includes the employee...
504
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"1\\nZ 0 0 0 0 0 0 0\\n\", \"1\\nZ 0 0 0 0 1 0 0\\n\", \"1\\nZ 0 0 0 0 2 0 0\\n\", \"1\\nZ 0 0 0 0 2 -1 0\\n\", \"1\\nA 0 0 200 0 0 0 0\\n\", \"1\\nA 0 0 200 0 0 1 0\\n\", \"1\\nA 0 0 200 0 0 2 0\\n\", \"1\\nZ 0 0 -1 0 2 -1 0\\n\"], \"outputs\": [\"Z\\n\", \"Z\\n\", \"Z\\n\", \"Z\\n\...
{ "dataset": "likaixin/TACO-verified", "index": 11198, "prompt": "Solve the programming task below in a Python markdown code block.\nLet us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document.\n\nIn the beginning of the round the contesta...
903
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"inputs\": [\"4\\n7\\n7 3 2 -11 -13 -17 -23\\n6\\n4 10 25 47 71 96\\n6\\n71 -35 7 -4 -11 -25\\n6\\n-45 9 -48 -67 -55 7\\n\", \"8\\n2\\n-59 -9\\n1\\n11\\n3\\n-41 -26 -2\\n3\\n22 33 54\\n3\\n-56 -6 55\\n5\\n36 15 9 14 -71\\n3\\n-7 40 47\\n5\\n-19 54 -5 7 -29\\n\"], \"outputs\": [\"NO\\nYES\\nYES\\n...
{ "dataset": "likaixin/TACO-verified", "index": 6611, "prompt": "Solve the programming task below in a Python markdown code block.\nOne day Prof. Slim decided to leave the kingdom of the GUC to join the kingdom of the GIU. He was given an easy online assessment to solve before joining the GIU. Citizens of the GUC...
876
null
[ { "content": "You are a helpful programming assistant. The user will ask you a question and you as the assistant solve it. The assistant first thinks how to solve the task through reasoning and then provides the user with the final answer. The reasoning process and answer are enclosed within <think>...</think> ...
null
null
null
null
null
null
code
coding
{ "ground_truth": "{\"functional\": \"_inputs = [[[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[]], [[1337, 374, 849, 22.5, 19, 16, 0, 0, 16, 32]], [[-16, -32, 20, 21, 41, 42]], [[15397, 12422, 10495, 22729, 23921, 18326, 27955, 24073, 23690, 15002, 11615, 15682, 24346, 16725, 17252, 20467, 20493, 17807, 13041, 25861, 22471, 2...
{ "dataset": "likaixin/TACO-verified", "index": 1000, "prompt": "Solve the programming task below in a Python markdown code block.\n# Task\n\nWrite a function named `sumEvenNumbers`, taking a sequence of numbers as single parameter. Your function must return the sum of **the even values** of this sequence.\n\nOnl...
275
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5