data_source
stringclasses
1 value
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\nn\\n\", \"1\\nm\\n\", \"1\\nl\\n\", \"1\\nk\\n\", \"1\\no\\n\", \"1\\np\\n\", \"2\\nu\\nu\\n\", \"2\\nv\\nu\\n\"], \"outputs\": [\"OK\\n\", \"OK\\n\", \"OK\\n\", \"OK\\n\", \"OK\\n\", \"OK\\n\", \"OK\\nu1\\n\", \"OK\\nOK\\n\"]}" }
{ "split": "train", "index": 1538, "prompt": "Solve the programming task below in a Python markdown code block.\nA new e-mail service \"Berlandesk\" is going to be opened in Berland in the near future. The site administration wants to launch their project as soon as possible, that's why they ask you to help. You'...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2 2\\n\", \"1 2\\n\", \"1 1\\n\", \"7 9\\n\", \"4 6\\n\", \"8 2\\n\", \"1 0\\n\", \"9 7\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"0\\n\", \"240\\n\", \"36\\n\", \"16\", \"0\", \"240\"]}" }
{ "split": "train", "index": 10446, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nYou have two positive integers w and h. Your ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [[1], [2], [3], [4], [5], [6], [10], [10000000]]\\n_outputs = [[4], [10], [20], [35], [56], [83], [244], [489999753]]\\nimport math\\ndef _deep_eq(a, b, tol=1e-5):\\n if isinstance(a, float) or isinstance(b, float):\\n return math.isclose(a,...
{ "split": "train", "index": 8766, "prompt": "Solve the programming task below in a Python markdown code block.\nMany years ago, Roman numbers were defined by only `4` digits: `I, V, X, L`, which represented `1, 5, 10, 50`. These were the only digits used. The value of a sequence was simply the sum of digits in i...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"0 4 3 1\\n0 7 8 0\\n5 10 2 12\\n9 13 14 0\", \"0 4 3 1\\n6 7 8 0\\n5 12 0 0\\n9 13 14 15\", \"0 4 3 0\\n6 7 8 0\\n5 1 11 12\\n9 13 14 0\", \"2 3 0 0\\n6 0 8 0\\n5 10 11 0\\n9 13 0 15\", \"0 4 3 0\\n0 7 8 0\\n5 10 2 12\\n9 13 14 0\", \"0 4 3 1\\n6 7 8 0\\n5 10 0 0\...
{ "split": "train", "index": 7184, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThe goal of the 15 puzzle problem is to comple...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"z\\n\", \"a\\n\", \"P\\n\", \"A\\n\", \"y\\n\", \"O\\n\", \"x\\n\", \"N\\n\"], \"outputs\": [\"Z\\n\", \"A\\n\", \"P\\n\", \"A\\n\", \"Y\", \"O\", \"X\", \"N\"]}" }
{ "split": "train", "index": 5349, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nCapitalization is writing a word with its firs...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 2\\n1 2\\n2 3\"], \"outputs\": [\"YES\"]}" }
{ "split": "train", "index": 4005, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given an unweighted, undirected graph. Write a program to check if it's a tree topology.\n\n-----Input-----\n\nThe first line of the input file contains two integers N and M --- number of nodes...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4 2 6 4\\n\", \"3 3 2 4\\n\", \"4 2 4 3\\n\", \"3 3 2 6\\n\", \"1 1 1 1\\n\", \"5 5 1 1\\n\", \"3 6 2 4\\n\", \"3 3 3 4\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"0\\n\", \"1\\n\", \"1\\n\", \"5\\n\", \"3\\n\", \"0\\n\"]}" }
{ "split": "train", "index": 4696, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nMonocarp has decided to buy a new TV set and h...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n1000000000\\n\", \"1\\n1000100000\\n\", \"1\\n1010100000\\n\", \"1\\n0010100000\\n\", \"1\\n0010110000\\n\", \"1\\n0010100010\\n\", \"1\\n1010100010\\n\", \"1\\n0010100110\\n\"], \"outputs\": [\"1\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", ...
{ "split": "train", "index": 8338, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThere are n cities in the Kingdom of Autumn, n...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1\", \"1 1\\n0\", \"1 2\\n0\", \"1 2\\n1\", \"1 3\\n1\", \"1 4\\n1\", \"5 1\\n00010\", \"5 1\\n00000\"], \"outputs\": [\"1\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"4\", \"5\\n\"]}" }
{ "split": "train", "index": 8515, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nN people are arranged in a row from left to ri...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 1 5\\n1 2 5\\n4\\n\", \"3 1 5\\n1 2 3\\n4\\n\", \"5 2 7\\n0 0 1 2 4\\n3 5\\n\", \"5 2 7\\n0 0 1 2 4\\n3 0\\n\", \"4 3 2\\n1 1 1 1\\n1 1 2\\n\", \"4 3 2\\n1 1 1 1\\n0 1 2\\n\", \"4 3 2\\n1 2 1 1\\n0 1 2\\n\", \"4 3 2\\n1 1 1 1\\n0 1 1\\n\"], \"outputs\": [\"0 1 4...
{ "split": "train", "index": 4695, "prompt": "Solve the programming task below in a Python markdown code block.\nThe Smart Beaver from ABBYY invented a new message encryption method and now wants to check its performance. Checking it manually is long and tiresome, so he decided to ask the ABBYY Cup contestants fo...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n1\\n10\\n101\"], \"outputs\": [\"1\\n5\\n44\"]}" }
{ "split": "train", "index": 6562, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nLittle Chef is learning differentiation and is...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n0\\n0\\n\", \"1 1\\n1\\n1\\n\", \"1 1\\n0\\n1\\n\", \"1 1\\n5\\n5\\n\", \"1 1\\n0\\n-1\\n\", \"2 2\\n0 2\\n0 1\\n\", \"1 5\\n1\\n1 2 3 4 5\\n\", \"3 3\\n0 0 0\\n0 0 0\\n\"], \"outputs\": [\"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"2\\n\", \"4\\n\", \"3\\n\", ...
{ "split": "train", "index": 3293, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are two small spaceship, surrounded by two groups of enemy larger spaceships. The space is a two-dimensional plane, and one group of the enemy spaceships is positioned in such a way that they all...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n37 3 13\\n35 37 7\\n\\nEMPMAS\", \"2\\n46 3 13\\n35 66 7\\n\\nEMPMAS\", \"2\\n24 10 57\\n50 8 1\\n\\nEMPMAS\", \"2\\n46 3 13\\n25 66 7\\n\\nEMPMAS\", \"2\\n37 3 33\\n30 37 10\\n\\nSAMPME\", \"2\\n37 3 33\\n42 37 18\\n\\nSAMPME\", \"2\\n41 0 57\\n48 74 18\\n\\n...
{ "split": "train", "index": 11002, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThis question is straight-forward.\n\nGiven l...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5\\n1 0 1\\n1 0\\n1 1 1\\n0 0\\n3 0 0\\n1 3\\n4 3 1\\n2 2\\n5 4 3\\n3 1\\n\", \"5\\n1 0 1\\n1 0\\n1 1 1\\n0 0\\n3 0 0\\n1 3\\n4 3 1\\n4 2\\n5 4 3\\n3 1\\n\", \"5\\n1 0 1\\n0 0\\n1 1 1\\n0 0\\n3 0 0\\n1 3\\n4 6 1\\n4 2\\n5 4 3\\n3 1\\n\", \"5\\n1 0 1\\n1 0\\n1 1 1\...
{ "split": "train", "index": 10754, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nYou have a board represented as a grid with 2...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"7\\n3\\n0\\n3\\n5\\n1\\n0\\n6\\n1\\n3\\n4\", \"7\\n3\\n0 3 5\\n1 0 6\\n1 3 4\\n\\nSAMPLE\"], \"outputs\": [\"3\\n2\\n\", \"3\\n2\"]}" }
{ "split": "train", "index": 6008, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nRamesh and Suresh's previous attempt to decide...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n3\\n2 2 2\\n3 5 5\\n2\\n3 2\\n2 1 1\"], \"outputs\": [\"4.000000000\\n3.000000000\"]}" }
{ "split": "train", "index": 11947, "prompt": "Solve the programming task below in a Python markdown code block.\nRead problems statements in Mandarin chinese, Russian and Vietnamese as well. \n\nThere is a straight road that passes through N short tunnels. At the entrance to the first tunnel, there are C cars li...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5 4\\n1 2\\n2 3\\n3 4\\n3 5\", \"5 4\\n1 2\\n2 3\\n1 4\\n3 5\", \"5 5\\n1 2\\n2 3\\n3 4\\n3 5\", \"9 5\\n1 3\\n2 3\\n3 4\\n3 5\", \"9 5\\n1 2\\n2 3\\n3 4\\n3 5\", \"5 5\\n1 2\\n2 3\\n3 4\\n2 5\", \"10 4\\n1 2\\n2 3\\n3 4\\n3 5\", \"10 4\\n1 2\\n2 4\\n3 4\\n4 5\"],...
{ "split": "train", "index": 11449, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nCompany trip\n\nProblem Statement\n\nYour com...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5\\n3 2 4 1 2\\n\", \"7\\n1 2 3 1000000000 4 5 6\\n\", \"10\\n10 71 84 33 6 47 23 25 52 64\\n\", \"4\\n877914575 602436426 24979445 861648772\\n\", \"190\\n36 78 456830918 3 629 107032 61198 76 162882927 83332903 540 6366 444168 421 5 729599821 27591 6423528 5 893...
{ "split": "train", "index": 8847, "prompt": "Solve the programming task below in a Python markdown code block.\nSnuke has an integer sequence A of length N.\nHe will make three cuts in A and divide it into four (non-empty) contiguous subsequences B, C, D and E.\nThe positions of the cuts can be freely chosen.\nL...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 1\\nabc\\na\\nab\\n\", \"3 1\\nabc\\na\\nba\\n\", \"3 1\\nabb\\na\\nba\\n\", \"10 10\\np\\ne\\nh\\ni\\ni\\na\\na\\nc\\nb\\nb\\n\", \"7 4\\nrubik\\nfurik\\nabab\\nbaba\\naaabbbababa\\nabababababa\\nzero\\n\", \"10 1\\nxl\\nv\\nwga\\nhbjb\\njysiehz\\nptntiwa\\nikn...
{ "split": "train", "index": 11489, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThe Little Elephant loves strings very much. ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n2000 1139 818658270\\n\", \"1\\n2000 2000 1000000006\\n\", \"2\\n1398 1034 726329524\\n602 156 640769482\\n\", \"7\\n3 3 2\\n2 1 10\\n6 3 10\\n6 4 10\\n100 1 1\\n4 4 0\\n69 4 20\\n\", \"3\\n763 499 769431935\\n827 50 784148915\\n410 241 11071818\\n\", \"4\\n18...
{ "split": "train", "index": 5235, "prompt": "Solve the programming task below in a Python markdown code block.\nThis is the easy version of the problem. The difference is the constraints on $n$, $m$ and $t$. You can make hacks only if all versions of the problem are solved.\n\nAlice and Bob are given the numbers...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n2 2 3 5\\n1 2013 3 31\"], \"outputs\": [\"4\\n1\"]}" }
{ "split": "train", "index": 3544, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nLittle Chief loves math. Most of all, he loves...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"7 3 4\\n2 3 3\\n656 3\\n\", \"0 5 0\\n5 5 5\\n327 9\\n\", \"1 2 2\\n3 2 6\\n20 15\\n\", \"1 1 1\\n2 2 2\\n10 10\\n\", \"1 4 15\\n2 2 2\\n13 7\\n\", \"7 3 4\\n2 1 3\\n656 3\\n\", \"4 6 10\\n4 3 2\\n9 920\\n\", \"10 7 3\\n3 4 4\\n331 2\\n\"], \"outputs\": [\"64697.0...
{ "split": "train", "index": 4096, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nVasya plays the Power Defence. \n\nHe must pas...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5\", \"2\", \"7\", \"1\", \"4\", \"8\", \"3\", \"6\"], \"outputs\": [\"0\\n\", \"1\\n\", \"0\\n\", \"0\\n\", \"1\\n\", \"1\\n\", \"0\\n\", \"1\\n\"]}" }
{ "split": "train", "index": 12872, "prompt": "Solve the programming task below in a Python markdown code block.\nWhen Mr. Kay was browsing a certain SNS as usual, the problem that \"there are people who can solve IQ150 or more\" came to the timeline. Mr. Kay has an IQ of over 150, so he solved the problem in an ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n3\\n5\\n\\nSAMPLE\", \"2\\n1\\n5\\n\\nSAMPLE\", \"2\\n1\\n9\\n\\nSBMQLE\", \"2\\n3\\n1\\n\\nSAMPLE\", \"2\\n1\\n3\\n\\nRAMQLE\", \"2\\n3\\n5\\n\\nSAMPME\", \"2\\n1\\n1\\n\\nSAMPLD\", \"2\\n1\\n7\\n\\nELQMBR\"], \"outputs\": [\"3 5\\n20 30\\n\", \"0 0\\n20 30\\...
{ "split": "train", "index": 11636, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nKing Tle4Ever of Time Limit Exceeded is reall...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4\\n3\\n1 0 1\\n1\\n0\\n2\\n1 1\\n4\\n1 1 0 1\\n\"], \"outputs\": [\"16\\n0\\n6\\n120\\n\"]}" }
{ "split": "train", "index": 10894, "prompt": "Solve the programming task below in a Python markdown code block.\nFor an array A of length N, let F(A) denote the sum of the product of all the subarrays of A. Formally,\n\nF(A) = \\sum_{L=1}^N \\sum_{R=L}^N (\\prod_{i=L}^R A_{i}\\right )\n\nFor example, let A = [1...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 0 1\\n4 1 2\\n1 0 1\", \"1 8 6\\n2 9 7\\n1 7 7\", \"0 8 8\\n0 8 8\\n0 0 8\", \"2 2 2\\n2 1 0\\n2 2 2\", \"1 0 1\\n4 1 2\\n0 0 1\", \"1 8 6\\n4 9 7\\n1 7 7\", \"0 8 2\\n0 8 8\\n0 0 8\", \"1 0 1\\n4 1 4\\n0 0 1\"], \"outputs\": [\"No\\n\", \"No\\n\", \"No\\n\", \"...
{ "split": "train", "index": 3103, "prompt": "Solve the programming task below in a Python markdown code block.\nWe have a 3 \\times 3 grid. A number c_{i, j} is written in the square (i, j), where (i, j) denotes the square at the i-th row from the top and the j-th column from the left.\n\nAccording to Takahashi,...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1 772\\n\", \"1 1\\n1 629\\n\", \"2 1\\n3 2\\n4 0\\n\", \"1 1\\n1 200000\\n\", \"1 1\\n200000 0\\n\", \"1 2\\n1 100000\\n\", \"1 1\\n1 179419\\n\", \"3 2\\n1 1\\n1 4\\n3 2\\n\"], \"outputs\": [\"772\\n\", \"629\\n\", \"-1\", \"200000\", \"-1\", \"0\", \"1794...
{ "split": "train", "index": 10233, "prompt": "Solve the programming task below in a Python markdown code block.\nThis problem consists of three subproblems: for solving subproblem C1 you will receive 4 points, for solving subproblem C2 you will receive 4 points, and for solving subproblem C3 you will receive 8 p...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 0\\n0\\n/.\", \"2 2\\n..\\n..\", \"1 2\\n..\\n..\", \"1 0\\n..\\n..\", \"1 1\\n..\\n..\", \"1 0\\n-.\\n..\", \"1 0\\n-/\\n..\", \"1 0\\n-/\\n./\"], \"outputs\": [\"Second\\n\", \"Second\", \"First\\n\", \"Second\\n\", \"First\\n\", \"Second\\n\", \"Second\\n\", ...
{ "split": "train", "index": 828, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nExample\n\nInput\n\n2 2\n..\n..\n\n\nOutput\n\n...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"6\\n8\\n1 1 2 6 3 2 1 1\\n3\\n2 1 3\\n4\\n2 10 9 1\\n1\\n26\\n2\\n1 1\\n3\\n1 1 1\\n\", \"6\\n8\\n1 1 2 6 3 2 1 1\\n3\\n2 3 3\\n4\\n2 10 9 1\\n1\\n26\\n2\\n1 1\\n3\\n2 1 1\\n\", \"6\\n8\\n1 1 2 6 3 2 1 1\\n3\\n2 1 3\\n4\\n2 10 9 1\\n1\\n26\\n2\\n1 1\\n3\\n2 1 1\\n...
{ "split": "train", "index": 7571, "prompt": "Solve the programming task below in a Python markdown code block.\nThe only difference between easy and hard versions is constraints.\n\nYou are given a sequence $a$ consisting of $n$ positive integers.\n\nLet's define a three blocks palindrome as the sequence, consis...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2 1\\n1 2 0\\n\", \"2 1\\n1 2 1\\n\", \"2 1\\n1 2 0\\n\", \"4 4\\n1 2 1\\n1 3 0\\n2 3 1\\n3 4 1\\n\", \"4 4\\n1 2 1\\n1 3 0\\n2 3 1\\n3 4 1\\n\", \"5 6\\n1 2 0\\n3 2 0\\n5 1 1\\n1 3 1\\n5 3 0\\n4 3 1\\n\", \"6 6\\n1 2 1\\n2 3 1\\n3 4 1\\n3 5 1\\n4 6 1\\n4 5 1\\n\"...
{ "split": "train", "index": 10811, "prompt": "Solve the programming task below in a Python markdown code block.\nBreaking Good is a new video game which a lot of gamers want to have. There is a certain level in the game that is really difficult even for experienced gamers.\n\nWalter William, the main character o...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n5\\n1 1 1 1 1\\n1\\n10\"], \"outputs\": [\"10\\n0\"]}" }
{ "split": "train", "index": 12373, "prompt": "Solve the programming task below in a Python markdown code block.\nPriya loves bitwise AND, but she hates programming. Help her solve this problem.\n\nGiven an array $A$ of size $N$, let $B_{ij}$ denote the [bitwise AND] of $A[i]$ and $A[j]$. You have to find the nu...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [[3], [4], [100], [97], [101], [120], [130]]\\n_outputs = [[[2, 5]], [[3, 5]], [[97, 101]], [[89, 101]], [[97, 103]], [[113, 127]], [[127, 131]]]\\nimport math\\ndef _deep_eq(a, b, tol=1e-5):\\n if isinstance(a, float) or isinstance(b, float):\\n ...
{ "split": "train", "index": 10379, "prompt": "Solve the programming task below in a Python markdown code block.\nWe need a function ```prime_bef_aft()``` that gives the largest prime below a certain given value ```n```, \n\n```befPrime or bef_prime``` (depending on the language), \n\nand the smallest prime large...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [['anna'], ['walter'], [12321], [123456]]\\n_outputs = [[True], [False], [True], [False]]\\nimport math\\ndef _deep_eq(a, b, tol=1e-5):\\n if isinstance(a, float) or isinstance(b, float):\\n return math.isclose(a, b, rel_tol=tol, abs_tol=tol...
{ "split": "train", "index": 12160, "prompt": "Solve the programming task below in a Python markdown code block.\n# Palindrome strings\n\nA palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. This includes capital letters, punctuation, and word dividers....
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\ne -1\\n\", \"1 2\\nyy 1\\n\", \"1 2\\nyy 1\\n\", \"1 1\\ne -1\\n\", \"1 2\\nzy 1\\n\", \"1 1\\nf -1\\n\", \"0 1\\nf -1\\n\", \"0 1\\ne -1\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"1\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "split": "train", "index": 11915, "prompt": "Solve the programming task below in a Python markdown code block.\nSanta Claus likes palindromes very much. There was his birthday recently. k of his friends came to him to congratulate him, and each of them presented to him a string s_{i} having the same length n. W...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4 6\\n0 1 2\\n1 2 1\\n2 3 1\\n3 0 1\\n0 2 3\\n1 3 5\", \"4 6\\n0 1 2\\n1 2 1\\n2 3 1\\n3 0 1\\n0 2 1\\n1 3 5\", \"4 6\\n0 1 2\\n1 2 1\\n0 3 0\\n3 0 1\\n0 2 1\\n1 3 5\", \"4 6\\n0 1 2\\n1 2 1\\n2 3 1\\n3 0 1\\n0 2 1\\n1 1 5\", \"4 6\\n0 1 2\\n1 2 1\\n0 3 1\\n3 0 1\...
{ "split": "train", "index": 4272, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nFind the sum of weights of edges of the Minimu...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [['gg0gg3gg0gg'], ['gog'], ['ggg ggg g ggg'], ['A half of a half is a quarter.'], ['good grief'], ['bigger is ggooder'], ['gggggggggg']]\\n_outputs = [[True], [False], [False], [True], [False], [True], [True]]\\nimport math\\ndef _deep_eq(a, b, tol=1e...
{ "split": "train", "index": 4167, "prompt": "Solve the programming task below in a Python markdown code block.\n# Task\n Let's say that `\"g\" is happy` in the given string, if there is another \"g\" immediately to the right or to the left of it.\n \n Find out if all \"g\"s in the given string are happy.\n\n# Ex...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 4\\n\", \"4 4\\n\", \"1 1\\n\", \"3 3\\n\", \"4 1\\n\", \"3 4\\n\", \"4 4\\n\", \"1 1\\n\"], \"outputs\": [\"4\\n\", \"1\\n\", \"0\\n\", \"1\", \"0\", \"4\\n\", \"1\\n\", \"0\\n\"]}" }
{ "split": "train", "index": 4018, "prompt": "Solve the programming task below in a Python markdown code block.\nCalculate the value of the sum: n mod 1 + n mod 2 + n mod 3 + ... + n mod m. As the result can be very large, you should print the value modulo 10^9 + 7 (the remainder when divided by 10^9 + 7).\n\nThe...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5 6\\n1 2 3\\n1 3 4\\n4 2 6\\n5 2 2\\n2 3 5\\n3 5 7\\n1\\n\"], \"outputs\": [\"15\\n\"]}" }
{ "split": "train", "index": 9232, "prompt": "Solve the programming task below in a Python markdown code block.\nGiven a graph which consists of several edges connecting its nodes, find a subgraph of the given graph with the following properties: \n\nThe subgraph contains all the nodes present in the original gr...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n2\\n\", \"1\\n4\\n\", \"1\\n6\\n\", \"1\\n9\\n\", \"1\\n11\\n\", \"1\\n98932919\\n\", \"1\\n32968143\\n\"], \"outputs\": [\"1\\n\", \"2\\n\", \"4\\n\", \"6\\n\", \"9\\n\", \"11\\n\", \"98932919\\n\", \"32968143\\n\"]}" }
{ "split": "train", "index": 9828, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nA nearby pie shop is having a special sale. Fo...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n6 3\\n\", \"2\\n6 2\\n\", \"2\\n7 2\\n\", \"2\\n4 2\\n\", \"2\\n4 3\\n\", \"2\\n2 3\\n\", \"2\\n1 3\\n\", \"4\\n1 4 3 2\\n\"], \"outputs\": [\"13\\n\", \"10\\n\", \"11\\n\", \"7\\n\", \"9\\n\", \"5\\n\", \"3\\n\", \"15\\n\"]}" }
{ "split": "train", "index": 7325, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThe Little Elephant loves the LCM (least commo...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"142\\n0\\n\", \"142\\n5\\n\", \"142\\n76\\n\", \"638\\n33\\n\", \"142\\n41\\n\", \"638\\n29\\n\", \"142\\n69\\n\", \"638\\n93\\n\"], \"outputs\": [\"71 71\\n\", \"-1\\n\", \"33 109\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\"]}" }
{ "split": "train", "index": 6723, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nBitwise exclusive OR (or bitwise addition modu...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n1 1\\n\", \"2\\n5 6\\n\", \"2\\n1 5\\n\", \"2\\n1 2\\n\", \"2\\n7 6\\n\", \"2\\n2 2\\n\", \"2\\n2 4\\n\", \"2\\n1 6\\n\"], \"outputs\": [\"Yes\", \"No\", \"No\", \"YES\\n\", \"NO\\n\", \"YES\\n\", \"YES\\n\", \"YES\\n\"]}" }
{ "split": "train", "index": 9107, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nLimak is an old brown bear. He often plays pok...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4 4 1 0 1\\n1\\n\\n1\\n1 2 1 4\\n\", \"2 5 1 0 1\\n2\\n\\n1\\n1 4 1 5\\n\", \"2 2 0 1 1\\n\\n1\\n1\\n1 2 2 2\\n\", \"8 4 1 0 1\\n1\\n\\n1\\n1 2 1 4\\n\", \"2 5 1 0 1\\n4\\n\\n1\\n1 4 1 5\\n\", \"4 4 1 0 1\\n2\\n\\n1\\n1 2 1 4\\n\", \"8 4 1 0 2\\n1\\n\\n1\\n1 2 1 4...
{ "split": "train", "index": 1316, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nIn the year of 30XX participants of some world...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2 1\", \"2 2\", \"4 1\", \"2 0\", \"9 1\", \"1 1\", \"4 2\", \"4 2\\n\"], \"outputs\": [\"2\\n\", \"1\\n\", \"4\\n\", \"3\\n\", \"9\\n\", \"1\", \"3\", \"3\\n\"]}" }
{ "split": "train", "index": 1889, "prompt": "Solve the programming task below in a Python markdown code block.\nThere is an N-car train.\nYou are given an integer i. Find the value of j such that the following statement is true: \"the i-th car from the front of the train is the j-th car from the back.\"\n\n-----...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n3 2\\n1 2 1\\n2 3 1\\n5 7\\n3 2 7\\n3 4 9\\n1 5 5\\n1 2 5\\n4 1 5\\n4 2 7\\n3 1 5\\n4 4\\n1 2 5\\n3 2 2\\n4 1 3\\n3 4 4\\n\"], \"outputs\": [\"\\nYES\\n1 1 1\\nYES\\n5 7 9 9 5\\nNO\\n\"]}" }
{ "split": "train", "index": 11790, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nPolycarp is developing an RPG game where the ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n5 7\\n1 3\\n1 4\\n1 5\\n2 3\\n2 4\\n2 5\\n3 4\"], \"outputs\": [\"1\\n11000\"]}" }
{ "split": "train", "index": 65, "prompt": "Solve the programming task below in a Python markdown code block.\nRead problem statements in [Bengali], [Mandarin Chinese], [Russian], and [Vietnamese] as well.\n\nYou are given a graph $G$ with $N$ vertices (numbered $1$ through $N$) and $M$ edges. You should partitio...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2 0\\n\", \"3 0\\n\", \"4 0\\n\", \"2 0\\n\", \"4 0\\n\", \"3 0\\n\", \"7 0\\n\", \"5 0\\n\"], \"outputs\": [\"1\\n\", \"2\\n\", \"3\\n\", \"1\\n\", \"3\\n\", \"2\\n\", \"6\\n\", \"4\\n\"]}" }
{ "split": "train", "index": 3466, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m pairs of simil...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\", \"8\", \"7\", \"4\", \"5\", \"3\", \"6\", \"9\"], \"outputs\": [\"1 1\\n\", \"1 3\\n\", \"1 1\\n\", \"1 2\\n\", \"1 1\\n\", \"1 1\\n\", \"2 3\\n\", \"1 2\\n\"]}" }
{ "split": "train", "index": 3418, "prompt": "Solve the programming task below in a Python markdown code block.\nC: Divisor Game\n\nproblem\n\ntsutaj is trying to play about a few games.\n\nIn a divisor game, a natural number N of 2 or more is given first, and then the game progresses according to the following p...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4 0 12 0 22\", \"6 -1 15 1 5\", \"6 -2 15 1 5\", \"6 -2 16 1 5\", \"6 -1 16 1 5\", \"6 -1 16 1 0\", \"6 -1 27 1 0\", \"6 -1 51 1 0\"], \"outputs\": [\"458\\n\", \"537\\n\", \"538\\n\", \"598\\n\", \"597\\n\", \"602\\n\", \"1262\\n\", \"2702\\n\"]}" }
{ "split": "train", "index": 6327, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nIn this problem, we use the 24-hour clock.\n\n...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"10\\n\", \"97\\n\"], \"outputs\": [\"7 11\\n\", \"97 97\\n\"]}" }
{ "split": "train", "index": 8486, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nPositive integer number x is called prime, if ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n3 3\\n1 3 1\\n4 6 2\\n7 10 3\\n4 2\\n10 100 1\\n100 200 2\\n150 500 2\\n200 300 2\"], \"outputs\": [\"3\\n3\"]}" }
{ "split": "train", "index": 11193, "prompt": "Solve the programming task below in a Python markdown code block.\nOur chef has recently opened a new restaurant with a unique style. The restaurant is divided into K compartments (numbered from 1 to K) and each compartment can be occupied by at most one customer. \n...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 3\\n\", \"8 2\\n\", \"9 6\\n\", \"8 7\\n\", \"2 1\\n\", \"6 9\\n\", \"4 4\\n\", \"0 1\\n\"], \"outputs\": [\"1\\n3 \\n2\\n2 1 \\n\", \"3\\n4 3 1 \\n1\\n2 \\n\", \"2\\n5 4 \\n3\\n3 2 1 \\n\", \"2\\n5 3 \\n3\\n4 2 1 \\n\", \"1\\n2 \\n1\\n1 \", \"2\\n5 1 \\n3\\n4 3...
{ "split": "train", "index": 8339, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nIn a galaxy far, far away Lesha the student ha...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 2 3 0\", \"3 4 5 1\", \"1 2 3 1\", \"2 2 3 1\", \"2 2 6 1\", \"1 2 0 1\", \"2 1 4 1\", \"3 5 7 100\"], \"outputs\": [\"4\", \"54\", \"6\\n\", \"12\\n\", \"24\\n\", \"0\\n\", \"8\\n\", \"105\"]}" }
{ "split": "train", "index": 1546, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nWe constructed a rectangular parallelepiped of...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 5\\n\", \"4 4\\n\", \"1 2\\n\", \"2 2\\n\", \"1 1\\n\", \"5 5\\n\", \"3 3\\n\", \"4 2\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"1\\n\", \"1\\n\", \"0\\n\", \"1\\n\", \"0\\n\", \"0\\n\"]}" }
{ "split": "train", "index": 4909, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nOn the math lesson a teacher asked each pupil ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n121\\n\", \"3\\n111\\n\", \"3\\n002\\n\", \"3\\n000\\n\", \"3\\n001\\n\", \"3\\n022\\n\", \"3\\n211\\n\", \"3\\n020\\n\"], \"outputs\": [\"021\\n\", \"012\\n\", \"012\\n\", \"012\\n\", \"021\\n\", \"012\\n\", \"201\\n\", \"021\\n\"]}" }
{ "split": "train", "index": 1922, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given a string $s$ consisting of exactly $n$ characters, and each character is either '0', '1' or '2'. Such strings are called ternary strings.\n\nYour task is to replace minimum number of char...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 2\\n000000000000000000000000000000000000000000000000000000\\n000000000000000000000000000000000000000000000000000000\", \"3 2\\n000000000000000001000000000000000000000000000000000000\\n000000000000000000000000000000000000000000000000000000\", \"4 2\\n000000000000...
{ "split": "train", "index": 8123, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nA daily train consists of N cars. Let's consid...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n2 42951\\n100000 132704\\n\", \"1\\n2 8\\n600349032 507824960\\n\", \"1\\n2 50000\\n90000 205032704\\n\", \"1\\n2 70000\\n70000 605032704\\n\", \"1\\n2 800000\\n800000 49872896\\n\", \"1\\n2 5\\n705032704 1000000000\\n\", \"1\\n2 444\\n902178848 98765432\\n\",...
{ "split": "train", "index": 5139, "prompt": "Solve the programming task below in a Python markdown code block.\nA sequence of positive integers is called great for a positive integer $x$, if we can split it into pairs in such a way that in each pair the first number multiplied by $x$ is equal to the second numbe...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n10\\n1 2 3 2 1 5 1 2 8 2\"], \"outputs\": [\"7\"]}" }
{ "split": "train", "index": 2047, "prompt": "Solve the programming task below in a Python markdown code block.\nGiven an array $A$ of length $N$.\nWe have to find the $maximum$ sum of elements of the subarray between $two$ nearest occurrences of $same$ elements (excluding both).\nIf both the elements are $even$ ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n0 a(c(f(.h(..))b(g(..).))e(.d(..)))\\n3 b(c(..)a(..))\\n\\nELPMAS\", \"2\\n0 a(c(f(.h(..))b(g(..).))e(.d(..)))\\n1 b(c(..)a(..))\\n\\nEMPASL\", \"2\\n1 a(c(f(.h(..))b(g(..).))e(.d(..)))\\n3 b(c(..)a(..))\\n\\nEAPMLS\", \"2\\n0 a(c(f(.h(..))b(g(..).))e(.d(..)))...
{ "split": "train", "index": 5383, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nGandhijee is interested in building human tree...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n1\\n\", \"1 1\\n1\\n\", \"3 3\\n1 3 1\\n\", \"3 3\\n1 3 1\\n\", \"5 5\\n1 1 4 2 2\\n\", \"5 5\\n1 1 0 2 2\\n\", \"5 5\\n1 1 0 3 2\\n\", \"5 5\\n2 1 0 3 2\\n\"], \"outputs\": [\"0\\n\", \"0\\n\", \"9\\n\", \"9\\n\", \"1000\\n\", \"1000\\n\", \"1075\\n\", \"10...
{ "split": "train", "index": 2402, "prompt": "Solve the programming task below in a Python markdown code block.\nYour program fails again. This time it gets \"Wrong answer on test 233\".\n\nThis is the easier version of the problem. In this version $1 \\le n \\le 2000$. You can hack this problem only if you solve...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"F\\n1\\n\", \"F\\n0\\n\", \"TF\\n1\\n\", \"FT\\n1\\n\", \"TTFFF\\n49\\n\", \"FFFTFFF\\n2\\n\", \"FTTTFTFF\\n8\\n\", \"FFFFTFTF\\n1\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"2\\n\", \"2\\n\", \"4\\n\", \"6\\n\", \"8\\n\", \"5\\n\"]}" }
{ "split": "train", "index": 4445, "prompt": "Solve the programming task below in a Python markdown code block.\nA lot of people associate Logo programming language with turtle graphics. In this case the turtle moves along the straight line and accepts commands \"T\" (\"turn around\") and \"F\" (\"move 1 unit for...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 0\\n1 1\\n\", \"2 1\\n1 2 1\\n1 2\\n\", \"2 1\\n1 2 1\\n1 1\\n\", \"3 2\\n1 2 1\\n2 3 0\\n3 1\\n\", \"3 2\\n1 2 1\\n2 3 0\\n2 3\\n\", \"3 2\\n1 2 1\\n2 3 0\\n2 2\\n\", \"3 3\\n1 2 0\\n2 3 0\\n3 1 1\\n2 2\\n\", \"5 4\\n1 2 0\\n2 3 0\\n3 4 0\\n2 5 1\\n1 4\\n\"], \...
{ "split": "train", "index": 5782, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nJohnny is playing a well-known computer game. ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 3\\n1 2 1 2\\n2 3 1 2\\n1 3 1 3\", \"3 3\\n1 2 1 2\\n2 3 1 2\\n1 3 1 1\", \"3 3\\n1 2 1 2\\n2 3 0 2\\n1 3 1 1\", \"3 3\\n1 2 1 2\\n2 3 0 2\\n1 3 1 0\", \"3 3\\n1 2 1 2\\n2 3 0 2\\n1 3 0 0\", \"3 3\\n1 2 2 2\\n2 3 0 1\\n1 3 1 2\", \"3 2\\n1 2 2 0\\n2 3 0 2\\n1 3 ...
{ "split": "train", "index": 1655, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nYou will participate in the ski competition he...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "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\": [...
{ "split": "train", "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 were happy sad to ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n5\\n\", \"2 2\\n1 2\\n\", \"2 1\\n1 2\\n\", \"1 1000\\n42\\n\", \"1 1100\\n42\\n\", \"2 1000\\n1 2\\n\", \"2 1000\\n1 1\\n\", \"2 1000\\n2 1\\n\"], \"outputs\": [\"1\", \"3\", \"2\", \"1000\", \"1100\\n\", \"1001\", \"2000\\n\", \"1000\\n\"]}" }
{ "split": "train", "index": 4885, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given an array of positive integers a1, a2, ..., an × T of length n × T. We know that for any i > n it is true that ai = ai - n. Find the length of the longest non-decreasing sequence of the gi...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1 0 0\\n.\\n1 1 1\\n\", \"1 1 0 1\\n.\\n1 1 1\\n1 1 1\\n\", \"1 1 1 0\\n.\\n1 1 1\\n1 1 1\\n\", \"1 1 0 1\\n.\\n1 1 1\\n1 1 2\\n\", \"1 1 1 1\\n.\\n1 1 1\\n1 1 1\\n1 1 1\\n\", \"1 1 1 1\\n.\\n1 1 1\\n1 1 1\\n1 1 0\\n\", \"1 7 0 1\\n.#...#.\\n1 7 2\\n1 5 38\\n\",...
{ "split": "train", "index": 13270, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nCthulhu decided to catch Scaygerboss. Scayger...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"8\\n0 0\\n0 2\\n0 3\\n2\\n0 4\\n1 0\\n1 1\\n1 2\", \"8\\n0 0\\n0 2\\n0 3\\n2\\n0 4\\n1 0\\n1 1\\n1 1\", \"8\\n0 0\\n0 2\\n0 3\\n2\\n1 0\\n1 0\\n1 1\\n1 1\", \"8\\n0 1\\n0 2\\n0 4\\n2\\n0 4\\n1 0\\n1 1\\n1 2\", \"8\\n0 0\\n0 2\\n0 3\\n2\\n0 4\\n1 0\\n1 1\\n0 2\", \...
{ "split": "train", "index": 9292, "prompt": "Solve the programming task below in a Python markdown code block.\nFor a dynamic array $A = \\\\{a_0, a_1, ...\\\\}$ of integers, perform a sequence of the following operations:\n\n* pushBack($x$): add element $x$ at the end of $A$\n* randomAccess($p$):print element $...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n0.510\", \"1\\n0.708840981965978\", \"1\\n0.832443418598948\", \"1\\n0.934192312178067\", \"1\\n0.778678921157505\", \"1\\n0.948837643950836\", \"1\\n0.996066960865974\", \"1\\n0.897040839081726\"], \"outputs\": [\"10098.000000\\n\", \"11216.118705\\n\", \"111...
{ "split": "train", "index": 11876, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nChef Datta likes betting in Indian Premier Le...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 3\\n...\\n...\\n...\", \"3 3\\n...\\n../\\n...\", \"3 5\\n...#.\\n.#.#.\\n.#...\", \"0 5\\n...#.\\n.#.#.\\n.#...\", \"0 5\\n.#...\\n.#.#.\\n.#...\", \"0 5\\n.#...\\n.#.#.\\n.$...\", \"0 5\\n.#..-\\n.#.#.\\n.$...\", \"0 5\\n.#..-\\n.#.#.\\n.$..-\"], \"outputs\": ...
{ "split": "train", "index": 1331, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nTakahashi has a maze, which is a grid of H \\t...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n1\\n1 -1\\n\", \"2\\n1\\n0 -1\\n\", \"2\\n1\\n6 -1\\n\", \"2\\n1\\n2 -1\\n\", \"2\\n1\\n4 -1\\n\", \"2\\n1\\n7 -1\\n\", \"2\\n1\\n3 -1\\n\", \"2\\n1\\n12 -1\\n\"], \"outputs\": [\"1\\n\", \"0\\n\", \"6\\n\", \"2\\n\", \"4\\n\", \"7\\n\", \"3\\n\", \"12\\n\"]}"...
{ "split": "train", "index": 5427, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nMitya has a rooted tree with n vertices indexe...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"a\\nz\\n\", \"r\\nr\\n\", \"r\\nq\\n\", \"r\\np\\n\", \"q\\np\\n\", \"q\\nq\\n\", \"p\\nq\\n\", \"p\\nr\\n\"], \"outputs\": [\"-1\\n\", \"1\\n\", \"-1\\n\", \"-1\\n\", \"-1\\n\", \"1\\n\", \"-1\\n\", \"-1\\n\"]}" }
{ "split": "train", "index": 7539, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nOnce little Vasya read an article in a magazin...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n.\\n\", \"1\\n.\\n\", \"1\\n/\\n\", \"1\\n0\\n\", \"1\\n-\\n\", \"1\\n,\\n\", \"1\\n+\\n\", \"1\\n*\\n\"], \"outputs\": [\"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\", \"0\\n\"]}" }
{ "split": "train", "index": 1689, "prompt": "Solve the programming task below in a Python markdown code block.\nDoor's family is going celebrate Famil Doors's birthday party. They love Famil Door so they are planning to make his birthday cake weird!\n\nThe cake is a n × n square consisting of equal squares with ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n0 2\\n4 0\\n0 0\", \"3\\n0 0\\n-2 0\\n2 0\", \"3\\n1 0\\n-2 0\\n2 0\", \"3\\n1 0\\n-2 0\\n2 1\", \"3\\n1 0\\n-2 0\\n0 1\", \"3\\n1 0\\n-2 0\\n0 2\", \"3\\n1 0\\n-1 0\\n0 1\", \"3\\n1 4\\n-1 1\\n2 -1\"], \"outputs\": [\"3\\n\", \"4\\n\", \"7\\n\", \"7\\n\", \"4...
{ "split": "train", "index": 4784, "prompt": "Solve the programming task below in a Python markdown code block.\nWe have caught N sardines. The deliciousness and fragrantness of the i-th sardine is A_i and B_i, respectively.\nWe will choose one or more of these sardines and put them into a cooler. However, two sa...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [[[12, 34]], [[55, 63]], [[357, 579]], [[1000000, 9999999]], [[1000000, 'hello']], [['pippi', 9999999]], [['pippi', 'hello']], [[1, 1]], [[1, 0]], [[0, 1]]]\\n_outputs = [[18], [12], [178], [7000001], ['invalid array'], ['invalid array'], ['invalid ar...
{ "split": "train", "index": 9113, "prompt": "Solve the programming task below in a Python markdown code block.\nSpoonerize... with numbers... numberize?... numboonerize?... noonerize? ...anyway! If you don't yet know what a spoonerism is and haven't yet tried my spoonerism kata, please do [check it out](http://...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5\\n2 2\\n10\\n11\\n3 3\\n011\\n101\\n110\\n4 4\\n1111\\n0110\\n0110\\n1111\\n5 5\\n01011\\n11001\\n00010\\n11011\\n10000\\n2 3\\n011\\n101\\n\", \"5\\n2 2\\n10\\n11\\n3 3\\n011\\n101\\n110\\n4 4\\n1111\\n0110\\n0110\\n1111\\n5 5\\n01011\\n11001\\n00010\\n11011\\n...
{ "split": "train", "index": 13042, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThis is the hard version of the problem. The ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 2\", \"6 3\", \"1 3\", \"6 6\", \"2 3\", \"2 6\", \"4 6\", \"8 6\"], \"outputs\": [\"500000004\\n250000002\\n250000002\\n\", \"500000004\\n500000004\\n500000004\\n62500001\\n906250007\\n750000006\\n882812507\\n449218754\\n449218754\\n\", \"500000004\\n250000002\...
{ "split": "train", "index": 5916, "prompt": "Solve the programming task below in a Python markdown code block.\nToday, Snuke will eat B pieces of black chocolate and W pieces of white chocolate for an afternoon snack.\n\nHe will repeat the following procedure until there is no piece left:\n\n* Choose black or wh...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n2\\n3 4\\n5\\n1 4 5 8 2\\n1\\n7\", \"3\\n2\\n3 4\\n5\\n1 4 0 8 2\\n1\\n7\", \"3\\n2\\n3 4\\n5\\n1 4 0 8 2\\n1\\n3\", \"3\\n2\\n3 4\\n5\\n1 4 1 8 2\\n1\\n3\", \"3\\n2\\n3 4\\n5\\n1 4 2 8 2\\n1\\n3\", \"3\\n2\\n3 6\\n5\\n1 4 5 8 2\\n1\\n7\", \"3\\n2\\n0 4\\n5\\n...
{ "split": "train", "index": 3234, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nGiven an input sequence. You have to write a p...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"6 1 2 3 4 7\", \"6 2 2 3 4 7\", \"6 3 1 3 4 8\", \"9 4 2 3 8 7\", \"6 1 2 3 6 5\", \"6 1 2 4 6 5\", \"6 2 1 3 4 7\", \"1 1 2 3 5 7\"], \"outputs\": [\"1\\n\", \"2\\n\", \"3\\n\", \"4\\n\", \"1\\n\", \"1\\n\", \"2\\n\", \"1\\n\"]}" }
{ "split": "train", "index": 4462, "prompt": "Solve the programming task below in a Python markdown code block.\nI have n tickets for a train with a rabbit. Each ticket is numbered from 0 to n − 1, and you can use the k ticket to go to p⋅ak + q⋅bk station.\n\nRabbit wants to go to the all-you-can-eat carrot shop ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n0\\n1 5\\n\", \"3 2\\n0 1 1\\n2 1\\n3 1\\n\", \"3 2\\n0 1 2\\n2 1\\n3 1\\n\", \"1 3\\n0\\n1 5\\n1 6\\n1 1000000000\\n\", \"1 3\\n0\\n1 5\\n1 6\\n1 1001000000\\n\", \"1 3\\n0\\n1 5\\n1 6\\n0 1001000000\\n\", \"1 3\\n0\\n1 5\\n0 6\\n1 1000000000\\n\", \"1 3\\n...
{ "split": "train", "index": 12239, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nAlice and Bob are well-known for sending mess...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"10\\n9\\niloveslim\\n1 s\\n7\\njoobeel\\n2 o e\\n7\\nbasiozi\\n2 s i\\n6\\nkhater\\n1 r\\n7\\nabobeih\\n6 a b e h i o\\n5\\nzondl\\n5 a b c e f\\n6\\nshoman\\n2 a h\\n7\\nshetwey\\n2 h y\\n5\\nsamez\\n1 m\\n6\\nmouraz\\n1 m\\n\"], \"outputs\": [\"5\\n2\\n3\\n5\\n1...
{ "split": "train", "index": 12342, "prompt": "Solve the programming task below in a Python markdown code block.\nHosssam decided to sneak into Hemose's room while he is sleeping and change his laptop's password. He already knows the password, which is a string $s$ of length $n$. He also knows that there are $k$ ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3\\n1 2 3\", \"3\\n1 2 5\", \"3\\n1 3 5\", \"3\\n1 3 3\", \"3\\n1 0 3\", \"3\\n1 2 10\", \"3\\n1 3 10\", \"3\\n0 2 10\"], \"outputs\": [\"5\", \"11\\n\", \"10\\n\", \"4\\n\", \"7\\n\", \"26\\n\", \"25\\n\", \"28\\n\"]}" }
{ "split": "train", "index": 495, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThere are N slimes standing on a number line. T...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"3 3 1\\n\", \"5 5 4\\n\", \"4 2 1\\n\", \"3 2 4\\n\", \"9 6 4\\n\", \"4 1 2\\n\", \"4 2 4\\n\", \"4 4 2\\n\"], \"outputs\": [\"4\", \"120\", \"9\", \"6\", \"24390\", \"4\", \"12\", \"18\"]}" }
{ "split": "train", "index": 6366, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThis problem is same as the previous one, but ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [[['X', 'O', 'X']], [['O', 'X', 'X', 'X', 'X']], [['X', 'X', 'O', 'X', 'X']], [['X']]]\\n_outputs = [[1], [0], [2], ['None available!']]\\nimport math\\ndef _deep_eq(a, b, tol=1e-5):\\n if isinstance(a, float) or isinstance(b, float):\\n ret...
{ "split": "train", "index": 8164, "prompt": "Solve the programming task below in a Python markdown code block.\nYour job at E-Corp is both boring and difficult. It isn't made any easier by the fact that everyone constantly wants to have a meeting with you, and that the meeting rooms are always taken!\n\nIn this ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2 7 5\", \"2 7 3\", \"2 4 3\", \"2 4 1\", \"2 4 0\", \"3 4 0\", \"4 4 0\", \"1 0 1\"], \"outputs\": [\"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\", \"NO\\n\"]}" }
{ "split": "train", "index": 2530, "prompt": "Solve the programming task below in a Python markdown code block.\nIroha loves Haiku. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.\nTo create a Haiku, Iroha has come up with three different phras...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5 4 2\\nto tail\\n1\\n\", \"2 2 1\\nto tail\\n1\\n\", \"2 1 2\\nto head\\n1\\n\", \"2 2 1\\nto tail\\n01\\n\", \"2 1 2\\nto head\\n01\\n\", \"10 3 8\\nto head\\n01\\n\", \"11 3 8\\nto head\\n01\\n\", \"3 2 1\\nto tail\\n0001\\n\"], \"outputs\": [\"Stowaway\\n\", \...
{ "split": "train", "index": 5473, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nA stowaway and a controller play the following...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n3\\ncodcode\\ncod\\na\\n\", \"5\\n1\\na\\n1\\na\\n1\\na\\n1\\na\\n1\\na\\n\", \"3\\n5\\nabab\\nab\\nabc\\nabacb\\nc\\n3\\nx\\nxx\\nxxx\\n8\\ncodeforc\\nes\\ncodes\\ncod\\nforc\\nforces\\ne\\ncode\\n\"], \"outputs\": [\"000\\n\", \"0\\n0\\n0\\n0\\n0\\n\", \"101...
{ "split": "train", "index": 3560, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given $n$ strings $s_1, s_2, \\dots, s_n$ of length at most $\\mathbf{8}$.\n\nFor each string $s_i$, determine if there exist two strings $s_j$ and $s_k$ such that $s_i = s_j + s_k$. That is, $...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n10 3 1 2\\n2 4 1 3\\n2 2 1 1\", \"2\\n10 3 1 2\\n2 4 1 3\\n1 2 1 1\", \"2\\n10 3 1 2\\n2 4 1 3\\n1 3 1 1\", \"2\\n10 3 1 2\\n3 4 1 3\\n1 3 1 1\", \"2\\n10 3 2 2\\n3 4 1 3\\n1 3 1 1\", \"2\\n10 3 2 2\\n3 8 1 3\\n1 3 1 1\", \"2\\n10 3 2 2\\n3 8 1 3\\n1 6 1 1\", ...
{ "split": "train", "index": 304, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nA rabbit is playing a role-playing game. Just b...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n5\\n\\nSAMPLE\", \"1\\n1\\n\\nSAMPLE\", \"1\\n0\\n\\nSALOME\", \"1\\n2\\n\\nSALPME\", \"1\\n4\\n\\nMNPDTC\", \"1\\n5\\n\\nMNPDSC\", \"1\\n-1\\n\\nSALPME\", \"1\\n-2\\n\\nPBCMNT\"], \"outputs\": [\"5\\n\", \"1\\n\", \"0\\n\", \"2\\n\", \"4\\n\", \"5\\n\", \"-1\...
{ "split": "train", "index": 804, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nSpecial Sum of number N is defined as follows:\...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4 2 5\\n1 2 5 7\", \"4 2 5\\n1 2 8 7\", \"4 2 5\\n1 1 5 7\", \"7 2 101\\n18 8 32 1 146 3 37\", \"7 2 101\\n13 8 32 1 146 3 37\", \"7 2 101\\n13 8 32 1 182 3 37\", \"7 2 101\\n20 14 32 1 72 3 37\", \"7 2 100\\n13 8 32 1 182 3 37\"], \"outputs\": [\"11\", \"5\\n\", ...
{ "split": "train", "index": 10083, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThere are N towns on a line running east-west...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"8\", \"2\", \"16\", \"1000000000000\", \"1000010000000\", \"1000011000000\", \"1100011000000\", \"1110011000000\"], \"outputs\": [\"10\", \"0\\n\", \"22\\n\", \"2499686339916\", \"2716922731275\\n\", \"3307289212967\\n\", \"2999416055122\\n\", \"3146654438234\\n\"...
{ "split": "train", "index": 8202, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nSnuke received a positive integer N from Takah...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"2\\n2 0\\n3 2\\n\", \"2\\n2 0\\n5 2\\n\", \"2\\n2 0\\n1 2\\n\", \"2\\n2 0\\n2 2\\n\", \"2\\n2 0\\n4 2\\n\", \"2\\n3 0\\n4 2\\n\", \"2\\n2 1\\n3 2\\n\", \"4\\n1 1\\n1 1\\n1 1\\n1 1\\n\"], \"outputs\": [\"tolik\\n\", \"tolik\\n\", \"tolik\\n\", \"tolik\\n\", \"tolik...
{ "split": "train", "index": 11924, "prompt": "Solve the programming task below in a Python markdown code block.\nThere are n stone quarries in Petrograd.\n\nEach quarry owns mi dumpers (1 ≤ i ≤ n). It is known that the first dumper of the i-th quarry has xi stones in it, the second dumper has xi + 1 stones in it...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"7 5\\n3 1 4 1 5 9 3\", \"7 5\\n3 1 4 1 5 8 3\", \"7 8\\n4 2 5 1 5 9 3\", \"7 5\\n3 1 4 1 5 4 3\", \"7 1\\n3 1 4 1 5 4 3\", \"7 1\\n4 1 4 1 5 4 3\", \"7 1\\n6 1 4 1 5 4 3\", \"7 1\\n6 0 4 1 5 4 3\"], \"outputs\": [\"3\\n\", \"2\\n\", \"1\\n\", \"3\\n\", \"3\\n\", \...
{ "split": "train", "index": 4126, "prompt": "Solve the programming task below in a Python markdown code block.\nTakahashi is playing with N cards.\n\nThe i-th card has an integer X_i on it.\n\nTakahashi is trying to create as many pairs of cards as possible satisfying one of the following conditions:\n\n* The in...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"CODEFESTIVAM\", \"CPDEFESTIVAM\", \"BPDEFDSTIVBM\", \"MBVITSDFEDPB\", \"MBWITSDFEDPB\", \"BPCEFDSTIWBM\", \"CPCEFDSTJWBM\", \"WPCEFDSTJCAM\"], \"outputs\": [\"CODE\\n\", \"CPDE\\n\", \"BPDE\\n\", \"MBVI\\n\", \"MBWI\\n\", \"BPCE\\n\", \"CPCE\\n\", \"WPCE\\n\"]}" }
{ "split": "train", "index": 11391, "prompt": "Solve the programming task below in a Python markdown code block.\nRng is going to a festival.\n\nThe name of the festival is given to you as a string S, which ends with `FESTIVAL`, from input. Answer the question: \"Rng is going to a festival of what?\" Output the a...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n1\\n\", \"1\\n3\\n\", \"1\\n2\\n\", \"2\\n3 2\\n\", \"2\\n2 1\\n\", \"2\\n3 1\\n\", \"2\\n1 2\\n\", \"2\\n2 3\\n\"], \"outputs\": [\"0\\n\", \"0\\n\", \"0\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\"]}" }
{ "split": "train", "index": 11085, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nThere is a given sequence of integers a1, a2,...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\n5 2\\n1 1 3 3 5\"], \"outputs\": [\"4\"]}" }
{ "split": "train", "index": 8284, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given a sequence of N$N$ powers of an integer k$k$; let's denote the i$i$-th of these powers by kAi$k^{A_i}$. You should partition this sequence into two non-empty contiguous subsequences; each...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1\\nCDBA\\n\", \"1\\nABCD\\n\", \"1\\nBCAD\\n\", \"1\\nABDC\\n\", \"1\\nCBDA\\n\", \"1\\nCABD\\n\", \"1\\nACBD\\n\", \"1\\nBCDA\\n\"], \"outputs\": [\"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\\n\", \"1\", \"1\", \"1\"]}" }
{ "split": "train", "index": 5253, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nAppleman and Toastman like games. Today they p...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"functional\": \"_inputs = [['Your girlscout cookies are ready to ship. Your total comes to tree fiddy'], [\\\"Howdy Pardner. Name's Pete Lexington. I reckon you're the kinda stiff who carries about tree fiddy?\\\"], [\\\"I'm from Scottland. I moved here to be with my family si...
{ "split": "train", "index": 965, "prompt": "Solve the programming task below in a Python markdown code block.\nYou're on your way to the market when you hear beautiful music coming from a nearby street performer. The notes come together like you wouln't believe as the musician puts together patterns of tunes. As...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"1 1\\n2 1\\n\", \"1 2\\n2 1\\n\", \"1 2\\n3 1\\n\", \"1 2\\n3 2\\n\", \"1 2\\n2 10\\n\", \"1 29\\n2 8\\n\", \"1 1\\n1 10\\n\", \"1 13\\n2 8\\n\"], \"outputs\": [\"0\\n\", \"1\\n\", \"0\\n\", \"0\\n\", \"10\\n\", \"8\\n\", \"10\\n\", \"8\\n\"]}" }
{ "split": "train", "index": 997, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nAfter several latest reforms many tourists are ...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"5\\n5 0 1 10 3\\n0\\n2 1 8 5 11\\n0\\n3 34 83 47 97 39 4\\n0\", \"5\\n8 17 1 10 14\\n5\\n1 5 8 9 8\\n7\\n4 33 83 84 59 29 54\\n0\", \"5\\n11 0 1 10 8\\n5\\n0 1 8 5 11\\n0\\n0 34 83 44 97 18 2\\n-1\", \"5\\n6 0 1 10 17\\n5\\n1 4 8 9 11\\n7\\n11 8 83 47 59 29 70\\n0...
{ "split": "train", "index": 2804, "prompt": "Solve the programming task below in a Python markdown code block. Each time, given inputs through STDIN (like those in the Input section), the program produces outputs through STDOUT (like those in the Output section).\n\nSelection of Participants of an Experiment\n\n...
code
[ { "role": "system", "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 with...
coding
{ "style": "rule", "ground_truth": "{\"inputs\": [\"4\\n4\\n1 6 31 14\\n2\\n4 2\\n5\\n2 9 6 7 10\\n3\\n6 6 6\\n\"], \"outputs\": [\"Yes\\nNo\\nNo\\nYes\\n\"]}" }
{ "split": "train", "index": 5913, "prompt": "Solve the programming task below in a Python markdown code block.\nYou are given an array $a_1, a_2, \\dots, a_n$. You can perform operations on the array. In each operation you can choose an integer $i$ ($1 \\le i < n$), and swap elements $a_i$ and $a_{i+1}$ of the a...