data_source stringclasses 1
value | prompt listlengths 1 1 | ability stringclasses 1
value | reward_model dict | extra_info dict |
|---|---|---|---|---|
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nOn a history lesson the teacher asked Vasya to name the dates when n famous events took place. He doesn't remembers the exact dates but he remembers a segment of days [li, ri] (inclusive) on which the event could ha... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"10\\n1 1\\n8 10\\n1 7\\n6 8\\n5 7\\n1 9\\n8 8\\n6 10\\n1 4\\n3 4\\n\", \"10\\n1 4\\n1 12\\n5 7\\n5 5\\n2 5\\n1 7\\n1 10\\n7 9\\n8 9\\n9 11\\n\", \"10\\n6 7\\n5 11\\n5 10\\n9 10\\n11 12\\n6 12\\n7 11\\n1 1\\n5 9\\n2 8\\n\", \"10\\n6 9\\n1 8\\n6 12\\n8 15\\n2 5\\n1 2\\n7 15\\n12 15\\n... | {
"index": 23800,
"source": "taco",
"source_row_index": 6949,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nMr. Bill is shopping at the store. There are some coins in his wallet (10-yen coins, 50-yen coins, 100-yen coins, 500-yen coins), but he is now trying to consume as much of this coin as possible. In other words, by ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"160\\n1 1 4 0\\n160\\n1 0 2 10\\n0\", \"160\\n1 1 4 0\\n58\\n2 0 4 10\\n0\", \"160\\n1 1 4 0\\n46\\n2 0 4 10\\n0\", \"160\\n1 1 4 0\\n160\\n0 0 2 10\\n0\", \"160\\n1 1 2 0\\n160\\n1 -1 1 10\\n0\", \"160\\n1 1 4 0\\n109\\n2 0 7 10\\n0\", \"160\\n0 1 4 0\\n160\\n0 1 2 10\\n0\", \"160\... | {
"index": 23801,
"source": "taco",
"source_row_index": 6950,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe government of Berland decided to improve network coverage in his country. Berland has a unique structure: the capital in the center and $n$ cities in a circle around the capital. The capital already has a good n... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n3\\n2 3 4\\n3 3 3\\n3\\n3 3 3\\n2 3 4\\n4\\n2 3 4 5\\n3 7 2 2\\n4\\n4 5 2 3\\n2 3 2 7\\n2\\n1 1\\n10 10\\n\", \"1\\n2\\n1 1000000000\\n1000000000 1\\n\", \"3\\n10\\n3 3 2 3 2 5 1 2 6 3\\n6 5 2 5 6 2 4 2 1 2\\n20\\n9 1 10 1 17 7 5 5 8 1 1 2 7 1 4 2 3 7 6 3\\n2 6 3 2 37 1 5 5 2 5 ... | {
"index": 23802,
"source": "taco",
"source_row_index": 6951,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nRidhiman challenged Ashish to find the maximum valued subsequence of an array $a$ of size $n$ consisting of positive integers. \n\nThe value of a non-empty subsequence of $k$ elements of $a$ is defined as $\\sum 2^i... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n2 1 3\\n\", \"3\\n3 1 4\\n\", \"1\\n1\\n\", \"4\\n7 7 1 1\\n\", \"2\\n3 4\\n\", \"10\\n582366931603099761 314858607473442114 530263190370309150 871012489649491233 877068367969362781 671646356752418008 390155369686708364 958695211216189893 919124874293325142 196726357117434998\\n... | {
"index": 23803,
"source": "taco",
"source_row_index": 6952,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nWe have a string s consisting of lowercase English letters. Snuke is partitioning s into some number of non-empty substrings. Let the subtrings obtained be s_1, s_2, ..., s_N from left to right. (Here, s = s_1 + s_2... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"byeybe\", \"zyxwvutsrqponmlkjihgfedcba\", \"aabwyyzz\", \"axcabcbabcx\", \"zyxwvutsrqponmlkjihgfedbba\", \"aabwyzzz\", \"eybcxb\", \"abzwxayz\", \"ayxwvutsrqponmlkiihgfedbbz\", \"yccabbcacxa\", \"ayxwwutsrqponmlkiihgfedbbz\", \"ayxwwutsrpponmlkiihgfedbbz\", \"ayxwwutsrpponmmkiihgfed... | {
"index": 23804,
"source": "taco",
"source_row_index": 6953,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nVasya has a grid with $2$ rows and $n$ columns. He colours each cell red, green, or blue.\n\nVasya is colourblind and can't distinguish green from blue. Determine if Vasya will consider the two rows of the grid to b... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6\\n2\\nRG\\nRB\\n4\\nGRBG\\nGBGB\\n5\\nGGGGG\\nBBBBB\\n7\\nBBBBBBB\\nRRRRRRR\\n8\\nRGBRRGBR\\nRGGRRBGR\\n1\\nG\\nG\\n\", \"1\\n7\\nGGGRRBR\\nGGGRRBB\\n\", \"1\\n55\\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\\nBBBBBBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBGBGB\\n... | {
"index": 23805,
"source": "taco",
"source_row_index": 6954,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThere are N squares lining up in a row, numbered 1 through N from left to right. Initially, all squares are white. We also have N-1 painting machines, numbered 1 through N-1. When operated, Machine i paints Square i... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\", \"100010\", \"6\", \"110010\", \"9\", \"110011\", \"11\", \"110001\", \"13\", \"111001\", \"26\", \"101001\", \"12\", \"101101\", \"8\", \"101100\", \"14\", \"101000\", \"21\", \"111000\", \"10\", \"111011\", \"28\", \"011011\", \"7\", \"011111\", \"15\", \"111111\", \"111110\"... | {
"index": 23806,
"source": "taco",
"source_row_index": 6955,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given an array of $n$ integers: $a_1, a_2, \\ldots, a_n$. Your task is to find some non-zero integer $d$ ($-10^3 \\leq d \\leq 10^3$) such that, after each number in the array is divided by $d$, the number o... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n10 0 -7 2 6\\n\", \"7\\n0 0 1 -1 0 0 2\\n\", \"5\\n0 0 0 1 1\\n\", \"1\\n777\\n\", \"2\\n1 0\\n\", \"100\\n39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 3... | {
"index": 23807,
"source": "taco",
"source_row_index": 6956,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nMonocarp plays a computer game (yet again!). This game has a unique trading mechanics.\n\nTo trade with a character, Monocarp has to choose one of the items he possesses and trade it for some item the other characte... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3 4 5\\n10 30 15\\n12 31 14 18\\n0 1 2 3 4\\n\", \"1 1 1\\n1\\n1\\n1\\n\", \"1 1 1\\n1\\n1\\n1\\n\", \"3 4 5\\n10 30 15\\n12 31 14 7\\n0 1 2 3 4\\n\", \"3 4 5\\n10 30 15\\n12 31 14 7\\n0 1 2 1 4\\n\", \"3 4 5\\n10 30 15\\n12 31 27 7\\n0 1 2 1 4\\n\", \"3 4 5\\n10 30 15\\n12 31 17 7\... | {
"index": 23808,
"source": "taco",
"source_row_index": 6957,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nImplication is a function of two logical arguments, its value is false if and only if the value of the first argument is true and the value of the second argument is false. \n\nImplication is written by using charac... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n0 1 1 0\\n\", \"2\\n1 1\\n\", \"1\\n0\\n\", \"4\\n0 0 0 0\\n\", \"6\\n0 0 0 0 0 1\\n\", \"20\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\n\", \"20\\n1 1 1 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0\\n\", \"1\\n1\\n\", \"2\\n0 0\\n\", \"2\\n0 1\\n\", \"2\\n1 0\\n\", \"3\\n0 0 0\\n\", \"3\\... | {
"index": 23809,
"source": "taco",
"source_row_index": 6958,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nProblem\n\nIt seems that a magician with a smoky smell will show off his magic.\n\n\"Now, think of one favorite integer.\"\nYou decide to think of your counting years in your head.\n\nThe magician has thrown the que... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n1 2\\n2 10\\n2 8\", \"10\\n1 10\\n1 10\\n1 10\\n1 10\\n2 10\\n1 10\\n1 10\\n1 10\\n1 10\\n1 10\", \"3\\n1 2\\n1 10\\n2 8\", \"3\\n1 1\\n1 10\\n2 8\", \"3\\n1 1\\n1 10\\n2 13\", \"3\\n1 1\\n1 13\\n2 13\", \"3\\n1 1\\n1 13\\n3 13\", \"3\\n1 0\\n1 13\\n3 13\", \"3\\n1 0\\n1 7\\n1 1... | {
"index": 23810,
"source": "taco",
"source_row_index": 6959,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nKevin Sun wants to move his precious collection of n cowbells from Naperthrill to Exeter, where there is actually grass instead of corn. Before moving, he must pack his cowbells into k boxes of a fixed size. In orde... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 1\\n2 5\\n\", \"4 3\\n2 3 5 9\\n\", \"3 2\\n3 5 7\\n\", \"20 11\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\n\", \"10 10\\n3 15 31 61 63 63 68 94 98 100\\n\", \"100 97\\n340 402 415 466 559 565 649 689 727 771 774 776 789 795 973 1088 1212 1293 1429 1514 1587 1599 1929 1997 2278 25... | {
"index": 23811,
"source": "taco",
"source_row_index": 6960,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou're hanging out with your friends in a bar, when suddenly one of them is so drunk, that he can't speak, and when he wants to say something, he writes it down on a paper. However, none of the words he writes make ... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"decode\", \"inputs\": [[\"yvvi\"], [\"Blf zoivzwb szw 10 yvvih\"], [\"Ovg'h hdrn rm gsv ulfmgzrm!\"], [{\"brand\": \"Starobrno\"}], [\"Tl slnv, blf'iv wifmp\"], [\"Hfiv r xzm wzmxv lm xlk'h xzi, slow nb yvvi\"], [true], [\"Hvv? R'n mlg gszg wifmp, r xzm hgroo gzpv nb xolgsvh luu\"],... | {
"index": 23812,
"source": "taco",
"source_row_index": 6961,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nIt is so boring in the summer holiday, isn't it? So Alice and Bob have invented a new game to play. The rules are as follows. First, they get a set of n distinct integers. And then they take turns to make the follow... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n2 3\\n\", \"2\\n5 3\\n\", \"3\\n5 6 7\\n\", \"10\\n72 96 24 66 6 18 12 30 60 48\\n\", \"10\\n78 66 6 60 18 84 36 96 72 48\\n\", \"10\\n98 63 42 56 14 77 70 35 84 21\\n\", \"2\\n1 1000000000\\n\", \"2\\n1000000000 999999999\\n\", \"3\\n2 4 6\\n\", \"2\\n4 6\\n\", \"2\\n2 6\\n\", ... | {
"index": 23813,
"source": "taco",
"source_row_index": 6962,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nProblem Statement\n\nYou are given a connected undirected graph which has even numbers of nodes. A connected graph is a graph in which all nodes are connected directly or indirectly by edges.\n\nYour task is to find... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 1\\n1 2 5\\n4 6\\n2 2 1\\n1 3 2\\n1 4 3\\n2 3 4\\n2 4 5\\n3 4 6\\n8 17\\n1 4 767\\n3 1 609\\n8 3 426\\n6 5 972\\n8 1 607\\n6 4 51\\n5 1 683\\n3 6 451\\n3 4 630\\n8 7 912\\n3 7 43\\n4 7 421\\n3 5 582\\n8 4 538\\n5 7 832\\n1 6 345\\n8 2 608\\n0 0\", \"2 1\\n1 2 5\\n4 6\\n1 2 1\\n1 3... | {
"index": 23814,
"source": "taco",
"source_row_index": 6963,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou have decided to watch the best moments of some movie. There are two buttons on your player: Watch the current minute of the movie. By pressing this button, you watch the current minute of the movie and the pla... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 3\\n5 6\\n10 12\\n\", \"1 1\\n1 100000\\n\", \"10 1\\n2156 3497\\n4784 7775\\n14575 31932\\n33447 35902\\n36426 47202\\n48772 60522\\n63982 68417\\n78537 79445\\n90081 90629\\n94325 95728\\n\", \"10 3\\n2156 3497\\n4784 7775\\n14575 31932\\n33447 35902\\n36426 47202\\n48772 60522\... | {
"index": 23815,
"source": "taco",
"source_row_index": 6964,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nTo quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every employee was granted a car, and an employee can choose one of four different car makes.\n\nThe parking lo... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n\", \"4\\n\", \"5\\n\", \"6\\n\", \"7\\n\", \"12\\n\", \"15\\n\", \"28\\n\", \"29\\n\", \"30\\n\", \"6\\n\", \"5\\n\", \"30\\n\", \"28\\n\", \"12\\n\", \"29\\n\", \"15\\n\", \"7\\n\", \"4\\n\", \"11\\n\", \"9\\n\", \"26\\n\", \"14\\n\", \"16\\n\", \"19\\n\", \"13\\n\", \"8\\n\",... | {
"index": 23816,
"source": "taco",
"source_row_index": 6965,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nIn this problem you will have to help Berland army with organizing their command delivery system.\n\nThere are $n$ officers in Berland army. The first officer is the commander of the army, and he does not have any s... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"9 6\\n1 1 1 3 5 3 5 7\\n3 1\\n1 5\\n3 4\\n7 3\\n1 8\\n1 9\\n\", \"2 1\\n1\\n1 1\\n\", \"13 12\\n1 1 1 1 1 1 1 1 1 1 1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n\", \"2 1\\n1\\n1 1\\n\", \"13 12\\n1 1 1 1 1 1 1 1 1 1 1 1\\n1 1\\n1 1\\n1 1\\n1 1\\n1 1... | {
"index": 23817,
"source": "taco",
"source_row_index": 6966,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nWrite a program which reads an integer n and prints the number of prime numbers which are less than or equal to n. A prime number is a natural number which has exactly two distinct natural number divisors: 1 and its... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"10\\n3\\n5\", \"10\\n3\\n9\", \"10\\n3\\n2\", \"10\\n6\\n2\", \"10\\n6\\n11\", \"10\\n1\\n5\", \"10\\n1\\n2\", \"10\\n2\\n2\", \"10\\n3\\n4\", \"10\\n6\\n3\", \"10\\n2\\n5\", \"10\\n1\\n4\", \"10\\n2\\n4\", \"10\\n5\\n1\", \"10\\n4\\n1\", \"10\\n1\\n1\", \"10\\n2\\n1\", \"10\\n8\\n1... | {
"index": 23818,
"source": "taco",
"source_row_index": 6967,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nGiven is an integer r.\nHow many times is the area of a circle of radius r larger than the area of a circle of radius 1?\nIt can be proved that the answer is always an integer under the constraints given.\n\n-----Co... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n\", \"100\\n\", \"30\\n\", \"27\\n\", \"87\\n\", \"22\\n\", \"8\\n\", \"76\\n\", \"91\\n\", \"88\\n\", \"79\\n\", \"83\\n\", \"10\\n\", \"52\\n\", \"60\\n\", \"80\\n\", \"94\\n\", \"1\\n\"], \"outputs\": [\"4\\n\", \"10000\\n\", \"900\\n\", \"729\\n\", \"7569\\n\", \"484\\n\", \... | {
"index": 23819,
"source": "taco",
"source_row_index": 6968,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nTakahashi, Aoki and Snuke love cookies. They have A, B and C cookies, respectively. Now, they will exchange those cookies by repeating the action below:\n\n* Each person simultaneously divides his cookies in half an... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"15 14 14\", \"454 414 846\", \"454 414 1200\", \"1390 18 4202\", \"0 0 0\", \"4 12 13\", \"15 14 7\", \"4 0 13\", \"15 17 7\", \"781 414 1200\", \"3 0 13\", \"15 17 13\", \"781 94 1200\", \"6 0 13\", \"15 25 13\", \"1390 94 1200\", \"6 0 24\", \"17 25 13\", \"1390 180 1200\", \"2 25... | {
"index": 23820,
"source": "taco",
"source_row_index": 6969,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nD: Shiritori Compression\n\nproblem\n\nEbi-chan and Kana-chan did a shiritori. Ebi-chan is looking at the memo of the word that came out in Shiritori.\n\nEbi-chan wants to remove redundant continuous subsequences fr... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"7\\nbanana\\nta\\ntomb\\nbus\\nsound\\ndoes\\nsome\", \"7\\nananab\\nta\\nsomb\\nbus\\nsound\\ndoes\\nsemo\", \"7\\nbanaoa\\nta\\ntomb\\nbus\\nsound\\ndoes\\nsome\", \"7\\nbanaoa\\nta\\nuomb\\nbus\\nsound\\ndoes\\nsome\", \"7\\nbanaoa\\nua\\ntomb\\nbus\\nsound\\ndoes\\nsome\", \"7\\... | {
"index": 23821,
"source": "taco",
"source_row_index": 6970,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nEric is the teacher of graph theory class. Today, Eric teaches independent set and edge-induced subgraph.\n\nGiven a graph $G=(V,E)$, an independent set is a subset of vertices $V' \\subset V$ such that for every pa... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n2 1\\n\", \"3\\n1 2\\n3 2\\n\", \"6\\n1 5\\n3 4\\n6 1\\n3 2\\n3 1\\n\", \"4\\n4 3\\n4 1\\n4 2\\n\", \"5\\n4 1\\n4 5\\n1 2\\n1 3\\n\", \"7\\n5 7\\n2 5\\n2 1\\n1 6\\n3 6\\n4 1\\n\", \"8\\n8 6\\n7 4\\n8 5\\n2 7\\n3 2\\n5 2\\n1 2\\n\", \"9\\n3 1\\n2 7\\n9 2\\n2 1\\n6 9\\n8 9\\n9 5\\... | {
"index": 23822,
"source": "taco",
"source_row_index": 6971,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nSimilar to the [previous kata](https://www.codewars.com/kata/string-subpattern-recognition-ii/), but this time you need to operate with shuffled strings to identify if they are composed repeating a subpattern\n\nSin... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"has_subpattern\", \"inputs\": [[\"a\"], [\"aaaa\"], [\"abcd\"], [\"babababababababa\"], [\"bbabbaaabbaaaabb\"], [\"123a123a123a\"], [\"123A123a123a\"], [\"12aa13a21233\"], [\"12aa13a21233A\"], [\"abcdabcaccd\"]], \"outputs\": [[\"a\"], [\"a\"], [\"abcd\"], [\"ab\"], [\"ab\"], [\"123... | {
"index": 23823,
"source": "taco",
"source_row_index": 6972,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nRead problems statements in Mandarin Chinese here \n\n------ Problem Statement ------ \n\nLira is a little girl form Bytenicut, a small and cozy village located in the country of Byteland.\n As the village is locate... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n0 0 0 100 100 0\\n1 1 1 5 5 1\", \"2\\n0 0 0 100 100 0\\n1 2 1 5 5 1\", \"2\\n-1 0 0 010 000 0\\n1 3 0 7 14 1\", \"2\\n0 0 0 111 000 1\\n1 2 0 3 2 1\", \"2\\n0 0 0 100 100 0\\n1 2 1 5 5 2\", \"2\\n0 0 0 100 100 0\\n1 2 1 5 9 2\", \"2\\n0 0 0 100 100 0\\n1 2 1 5 9 1\", \"2\\n0 0 ... | {
"index": 23824,
"source": "taco",
"source_row_index": 6973,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLet f(A, B) be the exclusive OR of A, A+1, ..., B. Find f(A, B).\nWhat is exclusive OR?\nThe bitwise exclusive OR of integers c_1, c_2, ..., c_n (let us call it y) is defined as follows:\n - When y is written in bas... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 4\\n\", \"123 456\\n\", \"123456789012 123456789012\\n\", \"250874886258 260155437540\\n\", \"116600656878 540016401221\\n\", \"16469429916 70896110856\\n\", \"62624746276 247590631209\\n\", \"449425032568 599872999674\\n\", \"229155120092 488132106263\\n\", \"4917728545 146793804... | {
"index": 23825,
"source": "taco",
"source_row_index": 6974,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou have $n$ coins, each of the same value of $1$.\n\nDistribute them into packets such that any amount $x$ ($1 \\leq x \\leq n$) can be formed using some (possibly one or all) number of these packets.\n\nEach packe... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6\\n\", \"2\\n\", \"1\\n\", \"1000000000\\n\", \"96145460\\n\", \"47814355\\n\", \"33554430\\n\", \"33554431\\n\", \"33554432\\n\", \"33554434\\n\", \"946942894\\n\", \"40052789\\n\", \"781222222\\n\", \"723061816\\n\", \"108461089\\n\", \"517188853\\n\", \"237913214\\n\", \"9526799... | {
"index": 23826,
"source": "taco",
"source_row_index": 6975,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe smallest unit of data handled by a computer is called a bit, and the amount of information that represents multiple bits together is called a word. Currently, many computers process one word as 32 bits.\n\nFor a... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"0\", \"5\", \"1\", \"2\", \"-1\", \"8\", \"-2\", \"14\", \"6\", \"26\", \"-3\", \"46\", \"-4\", \"80\", \"-7\", \"12\", \"-11\", \"24\", \"-10\", \"40\", \"-18\", \"67\", \"-35\", \"10\", \"-19\", \"18\", \"-21\", \"-5\", \"-6\", \"15\", \"7\", \"22\", \"11\", \"16\", \"-8\", \"17\"... | {
"index": 23827,
"source": "taco",
"source_row_index": 6976,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe Chef commutes to work every day using the city's underground metro. The schedule for the trains has recently been changed and he wants to know how long it will take to travel from the station nearest to his hous... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n2\\n0 4 7\\n0 6 5\\n2\\n0 1 2\\n6 2 10\\n2\\n1 2 3\\n0 2 3\", \"3\\n2\\n0 4 7\\n0 6 5\\n2\\n0 1 2\\n6 2 10\\n2\\n1 2 5\\n0 2 3\", \"3\\n2\\n0 4 7\\n0 6 5\\n2\\n0 1 2\\n6 4 10\\n2\\n1 2 5\\n0 2 3\", \"3\\n2\\n0 3 7\\n0 6 5\\n2\\n0 1 2\\n8 4 10\\n2\\n1 1 5\\n0 2 3\", \"3\\n2\\n0 3... | {
"index": 23828,
"source": "taco",
"source_row_index": 6977,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nA tree is a connected undirected graph consisting of n vertices and n - 1 edges. Vertices are numbered 1 through n.\n\nLimak is a little polar bear and Radewoosh is his evil enemy. Limak once had a tree but Radewoos... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"11 1 1\\n\", \"4 3 2\\n\", \"2 1 1\\n\", \"3 2 2\\n\", \"47 1 1\\n\", \"15 2 1\\n\", \"5 2 2\\n\", \"100 2 1\\n\", \"4 1 1\\n\", \"5 1 1\\n\", \"9999 7 3\\n\", \"4 2 2\\n\", \"100000 99999 1\\n\", \"8 5 3\\n\", \"16 15 14\\n\", \"100000 3 1\\n\", \"7 1 1\\n\", \"8 2 2\\n\", \"20 19 ... | {
"index": 23829,
"source": "taco",
"source_row_index": 6978,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n# Task\nTwo arrays are called similar if one can be obtained from another by swapping at most one pair of elements.\n\nGiven two arrays, check whether they are similar.\n\n# Example\n\nFor `A = [1, 2, 3]` and `B = [... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"are_similar\", \"inputs\": [[[1, 2, 3], [1, 2, 3]], [[1, 2, 3], [2, 1, 3]], [[1, 2, 2], [2, 1, 1]], [[1, 2, 3], [1, 10, 2]], [[2, 3, 1], [1, 3, 2]], [[1, 1, 2], [1, 2, 2]]], \"outputs\": [[true], [true], [false], [false], [true], [false]]}",
"style": "rule"
} | {
"index": 23830,
"source": "taco",
"source_row_index": 6979,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nSet\n\nGiven the sequence a_1, a_2, .., a_N.\n\nHow many values are there in this sequence?\n\ninput\n\n\nN\na_1 a_2 ... a_N\n\n\noutput\n\nOutput the number of types of values in the sequence.\n\nConstraint\n\n... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6\\n8 5 9 1 2 1\", \"6\\n8 5 9 0 2 1\", \"6\\n1 2 9 0 2 0\", \"6\\n-1 1 1 -1 7 1\", \"6\\n-2 0 -2 0 0 0\", \"6\\n1 5 9 0 2 1\", \"6\\n1 5 9 0 2 0\", \"6\\n1 2 15 0 2 0\", \"6\\n1 2 15 0 2 -1\", \"6\\n1 2 21 0 2 -1\", \"6\\n1 2 29 0 2 -1\", \"6\\n1 2 29 0 3 -1\", \"6\\n1 2 58 0 3 -1\... | {
"index": 23831,
"source": "taco",
"source_row_index": 6980,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given an integer sequence $a_1, a_2, \\dots, a_n$.\n\nFind the number of pairs of indices $(l, r)$ ($1 \\le l \\le r \\le n$) such that the value of median of $a_l, a_{l+1}, \\dots, a_r$ is exactly the given... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5 4\\n1 4 5 60 4\\n\", \"3 1\\n1 1 1\\n\", \"15 2\\n1 2 3 1 2 3 1 2 3 1 2 3 1 2 3\\n\", \"1 1\\n1\\n\", \"2 1\\n1 2\\n\", \"2 1\\n2 1\\n\", \"2 2\\n1 2\\n\", \"2 2\\n2 1\\n\", \"3 1\\n1 2 3\\n\", \"3 1\\n1 3 2\\n\", \"3 1\\n2 1 3\\n\", \"3 1\\n2 3 1\\n\", \"3 1\\n3 1 2\\n\", \"3 1\\... | {
"index": 23832,
"source": "taco",
"source_row_index": 6981,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nMarcin is a coach in his university. There are n students who want to attend a training camp. Marcin is a smart coach, so he wants to send only the students that can work calmly with each other.\n\nLet's focus on th... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"10\\n206158430208 206162624513 68719476737 137506062337 206162624513 4194305 68719476737 206225539072 137443147777 68719476736\\n202243898 470292528 170057449 290025540 127995253 514454151 607963029 768676450 611202521 68834463\\n\", \"2\\n0 1\\n1 1\\n\", \"10\\n3 3 5 5 6 6 1 2 4 7\... | {
"index": 23833,
"source": "taco",
"source_row_index": 6982,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nSunuke-kun's dictionary contains the words s1, ..., sn, which consist of n lowercase letters. This satisfies s1 <... <sn when compared in lexicographical order. Unfortunately, some characters are faint and unreadabl... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n?rum??mer\\nc??a??mp\", \"3\\nsnuje\\n????e\\neluns\", \"2\\n?rum??mer\\nc@?a??mp\", \"3\\nsunje\\n????e\\neluns\", \"2\\n?rum??mer\\ncA?a??mp\", \"3\\nsunje\\n@???e\\neluns\", \"2\\nrem??mur?\\ncA?a??mp\", \"3\\nsunje\\n@???e\\nsnule\", \"2\\nsem??mur?\\ncA?a??mp\", \"3\\njunse... | {
"index": 23834,
"source": "taco",
"source_row_index": 6983,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nFind the sum of weights of edges of the Minimum Spanning Tree for a given weighted undirected graph G = (V, E).\n\nConstraints\n\n* 1 ≤ |V| ≤ 10,000\n* 0 ≤ |E| ≤ 100,000\n* 0 ≤ wi ≤ 10,000\n* The graph is connected\... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6 9\\n0 1 1\\n0 2 3\\n1 2 2\\n1 3 7\\n2 4 1\\n1 4 3\\n3 4 1\\n3 5 1\\n4 5 6\", \"4 6\\n0 1 2\\n1 2 1\\n2 3 1\\n3 0 1\\n0 2 1\\n1 3 5\", \"6 9\\n0 2 1\\n0 2 3\\n0 2 2\\n1 3 7\\n2 4 1\\n1 4 3\\n3 2 1\\n3 5 1\\n2 5 6\", \"6 9\\n0 1 1\\n0 2 3\\n1 2 2\\n1 3 7\\n2 4 1\\n1 4 3\\n3 4 1\\n3 ... | {
"index": 23835,
"source": "taco",
"source_row_index": 6984,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nAndryusha is an orderly boy and likes to keep things in their place.\n\nToday he faced a problem to put his socks in the wardrobe. He has n distinct pairs of socks which are initially in a bag. The pairs are numbere... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"1\\n1 1\\n\", \"3\\n2 1 1 3 2 3\\n\", \"5\\n5 1 3 2 4 3 1 2 4 5\\n\", \"10\\n4 2 6 3 4 8 7 1 1 5 2 10 6 8 3 5 10 9 9 7\\n\", \"50\\n30 47 31 38 37 50 36 43 9 23 2 2 15 31 14 49 9 16 6 44 27 14 5 6 3 47 25 26 1 35 3 15 24 19 8 46 49 41 4 26 40 28 42 11 34 35 46 18 7 28 18 40 19 42 4 ... | {
"index": 23836,
"source": "taco",
"source_row_index": 6985,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nSasha lives in a big happy family. At the Man's Day all the men of the family gather to celebrate it following their own traditions. There are n men in Sasha's family, so let's number them with integers from 1 to n.... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3 2\\n1 2\\n2 3\\n1 2 1\\n\", \"4 2\\n1 2\\n3 4\\n1 2 3 3\\n\", \"1 0\\n1\\n\", \"2 1\\n2 1\\n2 2\\n\", \"2 1\\n2 1\\n1 2\\n\", \"4 3\\n1 2\\n2 3\\n3 4\\n1 1 3 2\\n\", \"4 3\\n4 3\\n3 2\\n2 1\\n3 4 4 4\\n\", \"4 3\\n1 2\\n2 3\\n3 4\\n1 1 1 2\\n\", \"1 0\\n1\\n\", \"4 3\\n4 3\\n3 2\\... | {
"index": 23837,
"source": "taco",
"source_row_index": 6986,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nRead problems statements in Mandarin Chinese and Russian as well. \n\nThere are N+1 lights. Lights are placed at (0, 0), (1, 0), (2, 0) ... (N, 0). Initially all the lights are on. You want to turn off all of them ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n1\\n2\", \"2\\n1\\n4\", \"2\\n2\\n4\", \"2\\n2\\n1\", \"2\\n0\\n1\", \"2\\n0\\n2\", \"2\\n2\\n2\", \"2\\n4\\n2\", \"2\\n2\\n3\", \"2\\n3\\n2\", \"2\\n0\\n0\", \"2\\n-1\\n0\", \"2\\n-1\\n-1\", \"2\\n-3\\n-1\", \"2\\n-3\\n-6\", \"2\\n-4\\n0\", \"2\\n-1\\n2\", \"2\\n-1\\n1\", \"2\\... | {
"index": 23838,
"source": "taco",
"source_row_index": 6987,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nMishka got an integer array $a$ of length $n$ as a birthday present (what a surprise!).\n\nMishka doesn't like this present and wants to change it somehow. He has invented an algorithm and called it \"Mishka's Adjac... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n1 2 4 5 10\\n\", \"10\\n10000 10 50605065 1 5 89 5 999999999 60506056 1000000000\\n\", \"1\\n999999999\\n\", \"1\\n1000000000\\n\", \"1\\n210400\\n\", \"5\\n100000000 100000000 100000000 100000000 100000000\\n\", \"1\\n2441139\\n\", \"2\\n2 2\\n\", \"3\\n2 2 2\\n\", \"2\\n4 4\\n... | {
"index": 23839,
"source": "taco",
"source_row_index": 6988,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nMaxim loves to fill in a matrix in a special manner. Here is a pseudocode of filling in a matrix of size (m + 1) × (m + 1):\n\n<image>\n\nMaxim asks you to count, how many numbers m (1 ≤ m ≤ n) are there, such that ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"445762753 268435456\\n\", \"144342486 67108864\\n\", \"257655784 16384\\n\", \"341001112 155173936\\n\", \"329622201 19482151\\n\", \"987654321987 1048576\\n\", \"58797441 33554432\\n\", \"4890852 16\\n\", \"70 32\\n\", \"163985731 33554432\\n\", \"9581849 1024\\n\", \"8670529 16384... | {
"index": 23840,
"source": "taco",
"source_row_index": 6989,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nVasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of old songs and make dubstep remixes from them.\n\nLet's assume that ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"UB\\n\", \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\n\", \"AWUBBWUBCWUBD\\n\", \"WUBZVMJWUBWUBWUBFOIMJQWKNZUBOFOFYCCWUBWUB... | {
"index": 23841,
"source": "taco",
"source_row_index": 6990,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given a graph consisting of $n$ vertices and $m$ edges. It is not guaranteed that the given graph is connected. Some edges are already directed and you can't change their direction. Other edges are undirecte... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n3 1\\n0 1 3\\n5 5\\n0 2 1\\n1 1 5\\n1 5 4\\n0 5 2\\n1 3 5\\n4 5\\n1 1 2\\n0 4 3\\n1 3 1\\n0 2 3\\n1 2 4\\n4 5\\n1 4 1\\n1 1 3\\n0 1 2\\n1 2 4\\n1 3 2\\n\", \"4\\n3 1\\n0 1 3\\n5 5\\n1 2 1\\n1 1 5\\n1 5 4\\n0 5 2\\n1 3 5\\n4 5\\n1 1 2\\n0 4 3\\n1 3 1\\n0 2 3\\n1 2 4\\n4 5\\n1 4 1... | {
"index": 23842,
"source": "taco",
"source_row_index": 6991,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nWe get more and more news about DDoS-attacks of popular websites.\n\nArseny is an admin and he thinks that a website is under a DDoS-attack if the total number of requests for a some period of time exceeds $100 \\cd... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n100 200 1 1 1\\n\", \"5\\n1 2 3 4 5\\n\", \"2\\n101 99\\n\", \"1\\n41\\n\", \"2\\n1 91\\n\", \"10\\n58 10 43 61 64 6 39 199 46 29\\n\", \"10\\n33 202 11 64 5 295 34 25 89 50\\n\", \"20\\n46 291 21 20 60 47 47 43 243 78 75 44 41 54 11 79 47 93 268 3\\n\", \"30\\n67 3 99 36 53 9 1... | {
"index": 23843,
"source": "taco",
"source_row_index": 6992,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nAlmost Identical Programs\n\nThe programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs f... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"print\\\"hello\\\";print123\\nprint\\\"hello\\\";print123\\nread\\\"B1input\\\";solve;output;\\nread\\\"B2\\\";solve;output;\\nread\\\"C1\\\";solve;output\\\"C1ans\\\";\\nread\\\"C2\\\";solve;output\\\"C2ans\\\";\\n\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\\"\\n\\\"\\\"\\\"42\\\"\\\"#\\\"\\\"\\... | {
"index": 23844,
"source": "taco",
"source_row_index": 6993,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nPeter is a senior manager of Agile Change Management (ACM) Inc., where each employee is a member of one or more task groups. Since ACM is agile, task groups are often reorganized and their members frequently change,... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\ndevelopment:alice,bob,design,eve.\\ndesign:carol,alice.\\n3\\none:another.\\nanother:yetanother.\\nxetanother:dave.\\n3\\nfriends:alice,bob,bestfriends,carol,fran,badcompany.\\nbestfriends:eve,alice.\\nbadcompany:dave,carol.\\n5\\na:b,c,d,e.\\nb:c,d,e,f.\\nc:d,e,f,g.\\nd:e,f,g,h... | {
"index": 23845,
"source": "taco",
"source_row_index": 6994,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n---\n\n# Hint\n\n\nThis Kata is an extension of the earlier ones in this series. Completing those first will make this task easier.\n\n# Background\n\nMy TV remote control has arrow buttons and an `OK` button.\n\nI ... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"tv_remote\", \"inputs\": [[\"Too Easy?\"], [\"does\"], [\"your\"], [\"solution\"], [\"work\"], [\"for\"], [\"these\"], [\"words\"], [\"DOES\"], [\"YOUR\"], [\"SOLUTION\"], [\"WORK\"], [\"FOR\"], [\"THESE\"], [\"WORDS\"], [\"^does^\"], [\"$your$\"], [\"#solution#\"], [\"\\u00bfwork\\... | {
"index": 23846,
"source": "taco",
"source_row_index": 6995,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given two strings. In a single move, you can choose any of them, and delete the first (i.e. leftmost) character.\n\nFor Example:\n\n* By applying a move to the string `\"where\"`, the result is the string `\... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"shift_left\", \"inputs\": [[\"test\", \"west\"], [\"test\", \"yes\"], [\"b\", \"ab\"], [\"abacabadabacaba\", \"abacabadacaba\"], [\"aaabc\", \"bc\"], [\"dark\", \"d\"], [\"dadc\", \"dddc\"], [\"nogkvcdldfpvlbkpedsecl\", \"nogkvcdldfpvlbkpedsecl\"]], \"outputs\": [[2], [7], [1], [18]... | {
"index": 23847,
"source": "taco",
"source_row_index": 6996,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nTetris is a game in which falling blocks are lined up on the board and erased. Here, let's consider a game that arranges it a little.\n\nThe size of the board of this game is 5 frames wide, and it is high enough to ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n1 4 1\\n1 3 2\\n2 2 4\\n2 3 5\\n1\\n1 5 1\\n7\\n2 2 2\\n1 4 1\\n2 1 3\\n1 4 1\\n1 1 1\\n2 5 5\\n1 4 2\\n0\", \"4\\n1 4 1\\n1 3 2\\n1 2 4\\n2 3 5\\n1\\n1 5 1\\n7\\n2 2 2\\n1 4 1\\n2 1 3\\n1 4 1\\n1 1 1\\n2 5 5\\n1 4 2\\n0\", \"4\\n1 4 1\\n1 3 1\\n2 2 4\\n2 3 5\\n1\\n1 5 1\\n7\\n2... | {
"index": 23848,
"source": "taco",
"source_row_index": 6997,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nBash has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Professor Zulu's Lab. Since Bash is Professor Zulu's favourite student, Zulu allows him to take as many Pokem... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n2 3 4\\n\", \"5\\n2 3 4 6 7\\n\", \"3\\n5 6 4\\n\", \"8\\n41 74 4 27 85 39 100 36\\n\", \"6\\n89 20 86 81 62 23\\n\", \"71\\n23 84 98 8 14 4 42 56 83 87 28 22 32 50 5 96 90 1 59 74 77 88 71 38 62 36 85 97 99 6 81 20 49 57 66 9 45 41 29 68 35 19 27 76 78 72 55 25 46 48 26 53 39 3... | {
"index": 23849,
"source": "taco",
"source_row_index": 6998,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nOne day a well-known sponsor of a well-known contest decided to give every participant of the contest a T-shirt as a present. A natural problem occurred: on the one hand, it is not clear how many T-shirts of what si... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"1 0 2 1 1\\n4\\nS\\nXXL\\nL\\nM\\n\", \"13 0 2 4 41\\n20\\nS\\nXXL\\nXXL\\nL\\nXXL\\nM\\nL\\nM\\nXXL\\nM\\nXXL\\nL\\nXXL\\nXL\\nM\\nXL\\nXL\\nL\\nL\\nM\\n\", \"1 0 1 1 1\\n3\\nS\\nXXL\\nL\\n\", \"14 3 1 0 2\\n10\\nS\\nXL\\nM\\nXL\\nS\\nXXL\\nL\\nXXL\\nS\\nL\\n\", \"3 1 1 4 1\\n10\\n... | {
"index": 23850,
"source": "taco",
"source_row_index": 6999,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nBizon the Champion isn't just a bison. He also is a favorite of the \"Bizons\" team.\n\nAt a competition the \"Bizons\" got the following problem: \"You are given two distinct words (strings of English letters), s a... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"automaton\\ntomat\\n\", \"array\\narary\\n\", \"both\\nhot\\n\", \"need\\ntree\\n\", \"abacaba\\naaaa\\n\", \"z\\nzz\\n\", \"itwtyhhsdjjffmmoqkkhxjouypznewstyorotxhozlytndehmaxogrohccnqcgkrjrdmnuaogiwmnmsbdaizqkxnkqxxiihbwepc\\nsnixfywvcntitcefsgqxjcodwtumurcglfmnamnowzbjzmfzspbfuld... | {
"index": 23851,
"source": "taco",
"source_row_index": 7000,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nA: IP Address (Internet Protocol Address)\n\nproblem\n\nSince one number string is given, find the number of valid delimiters for IPv4 IP addresses. However, the effective delimiters for IPv4 IP addresses are as fol... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"243960381\", \"17566177\", \"2154497\", \"961829\", \"1544196\", \"373537\", \"2961\", \"7074896\", \"1117147\", \"2844628\", \"11343273\", \"62476594\", \"1581113\", \"2527273\", \"2532591\", \"164664\", \"2642\", \"3591\", \"4233\", \"561\", \"619\", \"17\", \"15\", \"14\", \"7663... | {
"index": 23852,
"source": "taco",
"source_row_index": 7001,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nKyoya Ootori has a bag with n colored balls that are colored with k different colors. The colors are labeled from 1 to k. Balls of the same color are indistinguishable. He draws balls from the bag one by one until t... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n2\\n2\\n1\\n\", \"4\\n1\\n2\\n3\\n4\\n\", \"10\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n100\\n\", \"5\\n10\\n10\\n10\\n10\\n10\\n\", \"11\\n291\\n381\\n126\\n39\\n19\\n20\\n3\\n1\\n20\\n45\\n2\\n\", \"1\\n1\\n\", \"13\\n67\\n75\\n76\\n80\\n69\\n86\\n75\\n86\\n81\\... | {
"index": 23853,
"source": "taco",
"source_row_index": 7002,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nTaro's Shopping\n\nMammy decided to give Taro his first shopping experience. Mammy tells him to choose any two items he wants from those listed in the shopping catalogue, but Taro cannot decide which two, as all the... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3 45\\n17 20 30\\n6 10\\n1 2 5 8 9 11\\n7 100\\n11 34 83 47 59 29 70\\n4 100\\n80 70 60 50\\n4 20\\n10 5 10 16\\n0 0\", \"3 45\\n17 20 30\\n6 10\\n1 2 5 8 4 11\\n7 000\\n11 34 83 47 59 29 70\\n4 100\\n80 70 62 50\\n4 20\\n10 5 10 16\\n0 0\", \"3 45\\n2 20 30\\n6 10\\n1 2 5 8 4 11\\n... | {
"index": 23854,
"source": "taco",
"source_row_index": 7003,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nOne day Vasya went out for a walk in the yard but there weren't any of his friends outside and he had no one to play touch and run. But the boy didn't lose the high spirits and decided to play touch and run with him... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"10 20\\n10 3\\n10\\n-2 -6\\n-1 0\\n-8 0\\n0 5\\n-1 3\\n16 -16\\n-1 9\\n0 -18\\n9 -1\\n-9 5\\n\", \"1 1\\n1 1\\n1\\n1 1\\n\", \"20 10\\n14 4\\n10\\n6 0\\n-7 -7\\n12 -2\\n-4 9\\n20 3\\n-1 -16\\n0 2\\n-1 1\\n20 0\\n-1 1\\n\", \"3 3\\n2 2\\n1\\n2 0\\n\", \"1000 2000\\n226 566\\n20\\n0 -... | {
"index": 23855,
"source": "taco",
"source_row_index": 7004,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nVasya has got an array consisting of $n$ integers, and two integers $k$ and $len$ in addition. All numbers in the array are either between $1$ and $k$ (inclusive), or equal to $-1$. The array is good if there is no ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5 2 3\\n1 -1 1 -1 2\\n\", \"6 3 2\\n1 1 -1 -1 -1 -1\\n\", \"10 42 7\\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1\\n\", \"1 100 1\\n-1\\n\", \"1 100 1\\n-1\\n\", \"1 100 2\\n-1\\n\", \"6 3 2\\n1 1 -1 -1 0 -1\\n\", \"5 2 3\\n2 -1 1 -1 2\\n\", \"5 2 3\\n2 -1 2 -1 2\\n\", \"6 3 4\\n1 1 -1 -1 1 -1\\n... | {
"index": 23856,
"source": "taco",
"source_row_index": 7005,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n# Bubblesort Algorithm\n\n## Overview\n\nThe Bubblesort Algorithm is one of many algorithms used to sort a list of similar items (e.g. all numbers or all letters) into either ascending order or descending order. Gi... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"bubblesort_once\", \"inputs\": [[[9, 7, 5, 3, 1, 2, 4, 6, 8]], [[1, 2]], [[2, 1]], [[1, 3]], [[3, 1]], [[24, 57]], [[89, 36]], [[1, 2, 3]], [[2, 4, 1]], [[17, 5, 11]], [[25, 16, 9]], [[103, 87, 113]], [[1032, 3192, 2864]], [[1, 2, 3, 4]], [[2, 3, 4, 1]], [[3, 4, 1, 2]], [[4, 1, 2, 3... | {
"index": 23857,
"source": "taco",
"source_row_index": 7006,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nFind the convex hull of a given set of points P. In other words, find the smallest convex polygon containing all the points of P. Here, in a convex polygon, all interior angles are less than or equal to 180 degrees.... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n1 0\\n2 2\\n0 2\\n0 1\", \"7\\n2 1\\n0 0\\n1 2\\n2 0\\n4 2\\n1 3\\n3 3\", \"4\\n1 0\\n3 2\\n0 2\\n0 1\", \"7\\n4 1\\n0 0\\n1 2\\n2 0\\n4 2\\n1 3\\n3 3\", \"7\\n4 1\\n0 0\\n1 2\\n3 0\\n4 2\\n1 3\\n3 3\", \"7\\n2 1\\n0 0\\n1 2\\n2 2\\n4 2\\n1 3\\n0 3\", \"4\\n1 0\\n2 2\\n1 2\\n0 1... | {
"index": 23858,
"source": "taco",
"source_row_index": 7007,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly useless) program... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3 2\\n2 1 2\\n0\\n3 3 4 8\\n3 2\\n4 1 5 8 9\\n3 2 5 9\\n5 2 4 5 7 9\\n3 3\\n2 1 4\\n3 2 5 9\\n2 2 4\\n3 3\\n2 1 2\\n3 1 2 9\\n2 2 4\\n0 0\", \"3 2\\n2 1 4\\n0\\n3 3 4 8\\n3 2\\n4 1 5 8 9\\n3 2 5 9\\n5 1 4 5 7 9\\n3 3\\n2 1 4\\n3 2 5 9\\n2 2 4\\n3 3\\n2 1 2\\n3 1 2 9\\n2 2 4\\n0 0\",... | {
"index": 23859,
"source": "taco",
"source_row_index": 7008,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nDivide and rule\n\nTaro, Hanako, and Jiro rule the JAG Kingdom together. There are N cities in the JAG Kingdom, some of which are connected by two-way roads. You can always reach all the other cities from any city v... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6 7\\n1 2\\n1 4\\n2 3\\n2 5\\n3 4\\n4 5\\n4 6\\n2 1\\n1 2\\n3 3\\n1 2\\n2 3\\n2 3\\n4 3\\n1 2\\n2 3\\n3 4\\n5 4\\n1 2\\n2 3\\n3 4\\n4 5\\n0 0\", \"6 7\\n1 4\\n1 4\\n2 3\\n2 5\\n3 4\\n4 5\\n4 6\\n2 1\\n1 2\\n3 3\\n1 2\\n1 3\\n2 3\\n4 3\\n1 2\\n2 3\\n3 4\\n5 4\\n1 2\\n2 3\\n3 4\\n4 5\... | {
"index": 23860,
"source": "taco",
"source_row_index": 7009,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLet’s play a stone removing game.\n\nInitially, n stones are arranged on a circle and numbered 1, ... , n clockwise (Figure 1). You are also given two numbers k and m. From this state, remove stones one by one follo... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"12 5 3\\n100 9999 98\\n10000 10000 10000\\n0 0 0\", \"12 2 3\\n100 9999 98\\n10000 10000 10000\\n0 0 0\", \"12 2 3\\n100 15522 98\\n10000 10000 10000\\n0 0 0\", \"12 2 3\\n100 15914 98\\n10000 10000 10000\\n0 0 0\", \"12 2 3\\n100 15914 98\\n10001 10000 10000\\n0 0 0\", \"12 2 3\\n1... | {
"index": 23861,
"source": "taco",
"source_row_index": 7010,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe country of Byalechinsk is running elections involving n candidates. The country consists of m cities. We know how many people in each city voted for each candidate.\n\nThe electoral system in the country is pret... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3 3\\n1 2 3\\n2 3 1\\n1 2 1\\n\", \"3 4\\n10 10 3\\n5 1 6\\n2 2 2\\n1 5 7\\n\", \"1 3\\n5\\n3\\n2\\n\", \"3 1\\n1 2 3\\n\", \"3 1\\n100 100 100\\n\", \"2 2\\n1 2\\n2 1\\n\", \"2 2\\n2 1\\n2 1\\n\", \"2 2\\n1 2\\n1 2\\n\", \"3 3\\n0 0 0\\n1 1 1\\n2 2 2\\n\", \"1 1\\n1000000000\\n\", ... | {
"index": 23862,
"source": "taco",
"source_row_index": 7011,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLet's denote d(n) as the number of divisors of a positive integer n. You are given three integers a, b and c. Your task is to calculate the following sum:\n\n$\\sum_{i = 1}^{a} \\sum_{j = 1}^{b} \\sum_{k = 1}^{c} d(... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 2 2\\n\", \"5 6 7\\n\", \"91 42 25\\n\", \"38 47 5\\n\", \"82 29 45\\n\", \"40 15 33\\n\", \"35 5 21\\n\", \"71 2 1\\n\", \"22 44 41\\n\", \"73 19 29\\n\", \"76 12 17\\n\", \"16 10 49\\n\", \"59 99 33\\n\", \"17 34 25\\n\", \"21 16 9\\n\", \"31 51 29\\n\", \"26 41 17\\n\", \"85 19... | {
"index": 23863,
"source": "taco",
"source_row_index": 7012,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThere are $n$ products in the shop. The price of the $i$-th product is $a_i$. The owner of the shop wants to equalize the prices of all products. However, he wants to change prices smoothly.\n\nIn fact, the owner of... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n5 1\\n1 1 2 3 1\\n4 2\\n6 4 8 5\\n2 2\\n1 6\\n3 5\\n5 2 5\\n\", \"1\\n2 3\\n5 15\\n\", \"1\\n1 5\\n5\\n\", \"5\\n8 19551489\\n31131899 17585660 3913937 14521321 5400652 96097161 58347480 35051437\\n1 55716143\\n15578410\\n7 19560555\\n65980880 53703939 20259503 99698023 98868060... | {
"index": 23864,
"source": "taco",
"source_row_index": 7013,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nAndrew was very excited to participate in Olympiad of Metropolises. Days flew by quickly, and Andrew is already at the airport, ready to go home. He has $n$ rubles left, and would like to exchange them to euro and d... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"100\\n60\\n70\\n\", \"410\\n55\\n70\\n\", \"600\\n60\\n70\\n\", \"50\\n60\\n70\\n\", \"420\\n70\\n65\\n\", \"1750\\n45\\n50\\n\", \"100000000\\n31\\n33\\n\", \"99\\n100\\n100\\n\", \"99999998\\n60\\n75\\n\", \"90\\n80\\n89\\n\", \"999\\n66\\n74\\n\", \"420\\n65\\n70\\n\", \"1000\\n6... | {
"index": 23865,
"source": "taco",
"source_row_index": 7014,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nDZY loves collecting special strings which only contain lowercase letters. For each lowercase letter c DZY knows its value w_{c}. For each special string s = s_1s_2... s_{|}s| (|s| is the length of the string) he re... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"abc\\n3\\n1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\n\", \"mmzhr\\n3\\n443 497 867 471 195 670 453 413 579 466 553 881 847 642 269 996 666 702 487 209 257 741 974 133 519 453\\n\", \"ajeeseerqnpaujubmajpibxrccazaawetywxmifzehojf\\n23\\n359 813 772 413 733 654 33 87 890 43... | {
"index": 23866,
"source": "taco",
"source_row_index": 7015,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nGiven the sum and gcd of two numbers, return those two numbers in ascending order. If the numbers do not exist, return `-1`, (or `NULL` in C, `tuple (-1,-1)` in C#, `pair (-1,-1)` in C++,`None` in Rust, `array {-1,-... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"solve\", \"inputs\": [[6, 3], [8, 2], [10, 3], [12, 4], [12, 5], [50, 10], [50, 4], [10, 5], [100, 5], [1000, 5]], \"outputs\": [[[3, 3]], [[2, 6]], [-1], [[4, 8]], [-1], [[10, 40]], [-1], [[5, 5]], [[5, 95]], [[5, 995]]]}",
"style": "rule"
} | {
"index": 23867,
"source": "taco",
"source_row_index": 7016,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nLeha is playing a very interesting game. The game will be played on a rectangular grid consisting of N rows and M columns. Initially ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"1\\n2 2\", \"1\\n3 2\", \"1\\n6 2\", \"1\\n3 3\", \"1\\n3 6\", \"1\\n6 6\", \"1\\n0 6\", \"1\\n-1 6\", \"1\\n0 5\", \"1\\n0 3\", \"1\\n0 0\", \"1\\n0 -1\", \"1\\n0 -2\", \"1\\n1 -1\", \"1\\n1 0\", \"1\\n-1 -1\", \"1\\n-1 3\", \"1\\n4 1\", \"1\\n5 -1\", \"1\\n5 -2\", \"1\\n5 -3\", \"... | {
"index": 23868,
"source": "taco",
"source_row_index": 7017,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe Fibonacci numbers are the numbers in the following integer sequence (Fn):\n>0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, ...\n\nsuch as \n>F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.\n\nGiven a numb... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"productFib\", \"inputs\": [[4895], [5895], [74049690], [84049690], [193864606], [447577], [602070], [602070602070], [1120149658760], [256319508074468182850], [203023208030065646654504166904697594722575], [203023208030065646654504166904697594722576], [0], [1], [2], [3], [4], [5], [6]... | {
"index": 23869,
"source": "taco",
"source_row_index": 7018,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou have recently fallen through a hole and, after several hours of unconsciousness, have realized you are in an underground city. On one of your regular, daily walks through the unknown, you have encountered two un... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"7\\nafxfxfg\\n3\\nf 3\\nx 2\\nfxf 6\\n1\\n\", \"11\\nfghdgrakmnq\\n8\\nfgh 4\\ngh 3\\nh 10\\nhdg 6\\nhdgra 7\\nakm 12\\nrakm 5\\na 15\\n3\\n\", \"6\\nabacba\\n5\\naba 6\\nba 3\\nbac 4\\ncb 3\\nc 6\\n1\\n\", \"8\\naxghcdex\\n5\\naxgh 13\\nhc 35\\ncde 17\\nxghcd 29\\nghcdex 30\\n3\\n\... | {
"index": 23870,
"source": "taco",
"source_row_index": 7019,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLong is a huge fan of CFC (Codeforces Fried Chicken). But the price of CFC is increasing, so he decides to breed the chicken on his own farm.\n\nHis farm is presented by a rectangle grid with r rows and c columns. S... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n2 6 3\\nRRRRRR\\nRRRRRR\\n1 5 3\\nRRRRR\\n2 9 3\\n.R..R..R.\\n.R..R..R.\\n7 4 10\\nR.RR\\nRRR.\\nR.R.\\nR...\\nRRRR\\nRRRR\\nR.RR\\n1 1 1\\nR\\n\", \"4\\n3 5 3\\n..R..\\n...R.\\n....R\\n6 4 6\\nR..R\\nR..R\\nRRRR\\nRRRR\\nR..R\\nR..R\\n5 5 4\\nRRR..\\nR.R..\\nRRR..\\nR..R.\\nR..... | {
"index": 23871,
"source": "taco",
"source_row_index": 7020,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n# Task\n You're standing at the top left corner of an `n × m` grid and facing towards the `right`. \n \n Then you start walking one square at a time in the direction you are facing. \n \n If you reach the border of ... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"direction_in_grid\", \"inputs\": [[1, 1], [2, 2], [2, 3], [2, 4], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5], [4, 2], [4, 3], [4, 4], [4, 5], [4, 6], [5, 4], [5, 5], [5, 6], [100, 100]], \"outputs\": [[\"R\"], [\"L\"], [\"L\"], [\"L\"], [\"D\"], [\"U\"], [\"R\"], [\"R\"], [\"R\"], [\"U\... | {
"index": 23872,
"source": "taco",
"source_row_index": 7021,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYour job is to create a calculator which evaluates expressions in [Reverse Polish notation](http://en.wikipedia.org/wiki/Reverse_Polish_notation).\n\nFor example expression `5 1 2 + 4 * + 3 -` (which is equivalent t... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"calc\", \"inputs\": [[\"\"], [\"3\"], [\"3.5\"], [\"1 3 +\"], [\"1 3 *\"], [\"1 3 -\"], [\"4 2 /\"], [\"10000 123 +\"], [\"5 1 2 + 4 * + 3 -\"]], \"outputs\": [[0], [3], [3.5], [4], [3], [-2], [2], [10123], [14]]}",
"style": "rule"
} | {
"index": 23873,
"source": "taco",
"source_row_index": 7022,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given $n$ integer numbers $a_1, a_2, \\dots, a_n$. Consider graph on $n$ nodes, in which nodes $i$, $j$ ($i\\neq j$) are connected if and only if, $a_i$ AND $a_j\\neq 0$, where AND denotes the bitwise AND op... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n3 6 28 9\\n\", \"5\\n5 12 9 16 48\\n\", \"4\\n1 2 4 8\\n\", \"1\\n1000000000000000000\\n\", \"4\\n70369817919488 281474976710657 70368744177665 281476050452480\\n\", \"5\\n292733975779082240 18014398509482240 306244774661193728 4504699138998272 1099511628032\\n\", \"30\\n5502926... | {
"index": 23874,
"source": "taco",
"source_row_index": 7023,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n### Description\nAs hex values can include letters `A` through to `F`, certain English words can be spelled out, such as `CAFE`, `BEEF`, or `FACADE`.\nThis vocabulary can be extended by using numbers to represent ot... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"hex_word_sum\", \"inputs\": [[\"DEFACE\"], [\"SAFE\"], [\"CODE\"], [\"BUGS\"], [\"\"], [\"DO YOU SEE THAT BEE DRINKING DECAF COFFEE\"], [\"ASSESS ANY BAD CODE AND TRY AGAIN\"]], \"outputs\": [[14613198], [23294], [49374], [0], [0], [13565769], [10889952]]}",
"style": "rule"
} | {
"index": 23875,
"source": "taco",
"source_row_index": 7024,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nWe define a spanning tree of a graph to be a BFS tree rooted at vertex s if and only if for every node t the shortest distance between s and t in the graph is equal to the shortest distance between s and t in the sp... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"6 7\\n1 2\\n1 3\\n2 4\\n3 4\\n3 5\\n4 6\\n5 6\\n\", \"5 6\\n1 2\\n1 4\\n2 3\\n3 4\\n2 5\\n3 5\\n\", \"1 0\\n\", \"8 9\\n1 2\\n1 3\\n2 4\\n2 7\\n3 5\\n3 6\\n4 8\\n2 3\\n3 4\\n\", \"4 4\\n1 2\\n1 3\\n3 4\\n1 4\\n\", \"6 7\\n1 2\\n1 3\\n2 3\\n3 4\\n3 5\\n4 6\\n5 6\\n\", \"6 7\\n1 2\\n1... | {
"index": 23876,
"source": "taco",
"source_row_index": 7025,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nA 3×3 grid with a integer written in each square, is called a magic square if and only if the integers in each row, the integers in each column, and the integers in each diagonal (from the top left corner to the bot... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"8\\n0\\n5\", \"1\\n0\\n1\", \"8\\n-1\\n5\", \"1\\n0\\n2\", \"1\\n-1\\n1\", \"1\\n-1\\n2\", \"1\\n-1\\n4\", \"1\\n0\\n4\", \"1\\n1\\n2\", \"1\\n-2\\n2\", \"1\\n-2\\n3\", \"1\\n-3\\n3\", \"1\\n0\\n3\", \"8\\n-1\\n4\", \"8\\n0\\n6\", \"8\\n-2\\n5\", \"1\\n-2\\n4\", \"1\\n-1\\n3\", \"1\... | {
"index": 23877,
"source": "taco",
"source_row_index": 7026,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nVasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first time, that is Vasya is the sleuth, he should investigate a \"crime\" and find out what is happening. He can... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"iehvZNQXDGCuVmJPOEysLyUryTdfaIxIuTzTadDbqRQGoCLXkxnyfWSGoLXebNnQQNTqAQJebbyYvHOfpUnXeWdjx?\\n\", \"hh?\\n\", \"j ?\\n\", \"J ?\\n\", \"o ?\\n\", \"T ?\\n\", \"G... | {
"index": 23878,
"source": "taco",
"source_row_index": 7027,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe educational program (AHK Education) of the Aiz Broadcasting Association broadcasts a handicraft program for children, \"Play with Tsukuro\". Today is the time to make a rectangle with sticks, but I would like to... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"0 1 2 2\", \"0 0 2 2\", \"0 4 4 10\", \"2 0 1 2\", \"1 1 0 4\", \"-1 1 2 2\", \"1 4 4 10\", \"2 0 2 2\", \"1 1 0 6\", \"-1 4 4 10\", \"2 0 2 4\", \"0 1 0 6\", \"-1 0 2 2\", \"-1 1 4 10\", \"2 0 3 4\", \"0 1 1 6\", \"-1 0 3 2\", \"-2 1 4 10\", \"2 0 3 2\", \"0 0 0 6\", \"-2 1 8 10\",... | {
"index": 23879,
"source": "taco",
"source_row_index": 7028,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou play your favourite game yet another time. You chose the character you didn't play before. It has $str$ points of strength and $int$ points of intelligence. Also, at start, the character has $exp$ free experienc... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n5 3 4\\n2 1 0\\n3 5 5\\n4 10 6\\n\", \"5\\n1 1 100000000\\n100000000 100000000 100000000\\n100000000 1 100000000\\n1 100000000 100000000\\n100000000 100000000 1\\n\", \"5\\n1 1 100000000\\n100000000 100000000 100000000\\n100000000 1 100000000\\n1 100000000 100000000\\n100000000 ... | {
"index": 23880,
"source": "taco",
"source_row_index": 7029,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nEach evening after the dinner the SIS's students gather together to play the game of Sport Mafia. \n\nFor the tournament, Alya puts candies into the box, which will serve as a prize for a winner. To do that, she per... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"1 1\\n\", \"9 11\\n\", \"5 0\\n\", \"3 2\\n\", \"4 1\\n\", \"7 7\\n\", \"9 26\\n\", \"11 16\\n\", \"19 35\\n\", \"102 4175\\n\", \"999999994 108004280\\n\", \"99 3728\\n\", \"100 3727\\n\", \"103 1976\\n\", \"104 2380\\n\", \"105 1910\\n\", \"106 634\\n\", \"107 3295\\n\", \"1001 10... | {
"index": 23881,
"source": "taco",
"source_row_index": 7030,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nCan the greatest common divisor and bitwise operations have anything in common? It is time to answer this question.\n\nSuppose you are given a positive integer $a$. You want to choose some integer $b$ from $1$ to $a... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n2\\n3\\n5\\n\", \"9\\n15\\n7\\n12\\n122\\n127\\n99\\n1999999\\n255\\n8388607\\n\", \"1\\n228\\n\", \"1\\n228\\n\", \"9\\n15\\n7\\n12\\n122\\n127\\n99\\n1999999\\n255\\n8388607\\n\", \"1\\n88\\n\", \"9\\n15\\n7\\n12\\n122\\n127\\n99\\n1984716\\n255\\n8388607\\n\", \"1\\n11\\n\", ... | {
"index": 23882,
"source": "taco",
"source_row_index": 7031,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nWe have N points in a two-dimensional plane.\n\nThe coordinates of the i-th point (1 \\leq i \\leq N) are (x_i,y_i).\n\nLet us consider a rectangle whose sides are parallel to the coordinate axes that contains K or ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4 4\\n1 4\\n3 3\\n6 2\\n8 1\\n\", \"4 2\\n0 0\\n1 1\\n2 2\\n3 3\\n\", \"4 3\\n-1000000000 -1000000000\\n1000000000 1000000000\\n-999999999 999999999\\n999999999 -999999999\\n\", \"4 3\\n-1000000000 -1000000000\\n1000000000 1001000000\\n-999999999 999999999\\n999999999 -999999999\", ... | {
"index": 23883,
"source": "taco",
"source_row_index": 7032,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLeonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a rectangular w mm × h mm sheet of glass, a diamond glass cutter and lots of enthusiasm. What ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4 3 4\\nH 2\\nV 2\\nV 3\\nV 1\\n\", \"7 6 5\\nH 4\\nV 3\\nV 5\\nH 2\\nV 1\\n\", \"2 2 1\\nV 1\\n\", \"2 2 1\\nH 1\\n\", \"2 2 2\\nV 1\\nH 1\\n\", \"2 2 2\\nH 1\\nV 1\\n\", \"10 10 10\\nV 6\\nH 8\\nV 4\\nV 8\\nH 2\\nH 5\\nV 9\\nH 7\\nH 3\\nV 7\\n\", \"5 15 10\\nH 8\\nH 9\\nV 1\\nH 2\... | {
"index": 23884,
"source": "taco",
"source_row_index": 7033,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nAsmany strings are strings of '0's and '1's that have as many 00 as 11. A string such as 00110001 consists of 3 \"00\" and\n1 \"11\". Of course this is not an Asmany string. 0011, 1100, 000111000111 are Asmany strin... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n3\\n4\", \"2\\n1\\n4\", \"2\\n2\\n4\", \"2\\n2\\n1\", \"2\\n1\\n1\", \"2\\n4\\n4\", \"2\\n5\\n4\", \"2\\n1\\n6\", \"2\\n-1\\n4\", \"2\\n6\\n4\", \"2\\n4\\n1\", \"2\\n-1\\n7\", \"2\\n6\\n2\", \"2\\n6\\n1\", \"2\\n-1\\n8\", \"2\\n6\\n3\", \"2\\n10\\n1\", \"2\\n4\\n3\", \"2\\n1\\n7... | {
"index": 23885,
"source": "taco",
"source_row_index": 7034,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\n[Image] \n\n\n-----Input-----\n\nThe input consists of four lines, each line containing a single digit 0 or 1.\n\n\n-----Output-----\n\nOutput a single digit, 0 or 1.\n\n\n-----Example-----\nInput\n0\n1\n1\n0\n\nOut... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"0\\n1\\n1\\n0\\n\", \"0\\n0\\n0\\n0\\n\", \"1\\n0\\n0\\n0\\n\", \"0\\n1\\n0\\n0\\n\", \"1\\n1\\n0\\n0\\n\", \"0\\n0\\n1\\n0\\n\", \"1\\n0\\n1\\n0\\n\", \"1\\n1\\n1\\n0\\n\", \"0\\n0\\n0\\n1\\n\", \"1\\n0\\n0\\n1\\n\", \"0\\n1\\n0\\n1\\n\", \"1\\n1\\n0\\n1\\n\", \"0\\n0\\n1\\n1\\n\",... | {
"index": 23886,
"source": "taco",
"source_row_index": 7035,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nproblem\n\nGiven a sequence of n integers a1, a2, ..., an and a positive integer k (1 ≤ k ≤ n), then the sum of k consecutive integers Si = ai + ai + Create a program that outputs the maximum value of 1 + ... + ai +... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5 3\\n2\\n5\\n-4\\n8\\n3\\n0 0\", \"5 3\\n2\\n5\\n-4\\n12\\n3\\n0 0\", \"5 3\\n2\\n5\\n-4\\n14\\n3\\n0 0\", \"5 3\\n2\\n9\\n-4\\n14\\n1\\n0 0\", \"5 3\\n1\\n9\\n-4\\n2\\n1\\n0 0\", \"5 3\\n2\\n8\\n-4\\n12\\n3\\n0 0\", \"5 1\\n2\\n9\\n-4\\n14\\n1\\n0 0\", \"5 3\\n1\\n9\\n-4\\n13\\n1\... | {
"index": 23887,
"source": "taco",
"source_row_index": 7036,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given the array of integer numbers a_0, a_1, ..., a_{n} - 1. For each element find the distance to the nearest zero (to the element which equals to zero). There is at least one zero element in the given arra... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"9\\n2 1 0 3 0 0 3 2 4\\n\", \"5\\n0 1 2 3 4\\n\", \"7\\n5 6 0 1 -2 3 4\\n\", \"1\\n0\\n\", \"2\\n0 0\\n\", \"2\\n0 1\\n\", \"2\\n1 0\\n\", \"5\\n0 1000000000 1000000000 1000000000 1000000000\\n\", \"5\\n-1000000000 -1000000000 0 1000000000 1000000000\\n\", \"5\\n-1000000000 10000000... | {
"index": 23888,
"source": "taco",
"source_row_index": 7037,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nEverybody knows of spaghetti sort. You decided to implement an analog sorting algorithm yourself, but as you survey your pantry you realize you're out of spaghetti! The only type of pasta you have is ravioli, but yo... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\n1 2 3\\n\", \"3\\n3 1 2\\n\", \"1\\n13\\n\", \"10\\n67 67 67 67 67 67 67 67 67 67\\n\", \"10\\n16 17 16 15 14 15 16 17 16 15\\n\", \"4\\n54 54 54 55\\n\", \"3\\n68 67 67\\n\", \"5\\n46 46 47 46 45\\n\", \"4\\n14 15 15 16\\n\", \"6\\n59 59 60 60 59 58\\n\", \"3\\n40 40 40\\n\", \... | {
"index": 23889,
"source": "taco",
"source_row_index": 7038,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nPetya loves computer games. Finally a game that he's been waiting for so long came out!\n\nThe main character of this game has n different skills, each of which is characterized by an integer a_{i} from 0 to 100. Th... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2 4\\n7 9\\n\", \"3 8\\n17 15 19\\n\", \"2 2\\n99 100\\n\", \"100 10000\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\n\", \"1... | {
"index": 23890,
"source": "taco",
"source_row_index": 7039,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given a grid with $n$ rows and $m$ columns, where each cell has a positive integer written on it. Let's call a grid good, if in each row the sequence of numbers is sorted in a non-decreasing order. It means,... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5\\n2 3\\n1 2 3\\n1 1 1\\n2 2\\n4 1\\n2 3\\n2 2\\n2 1\\n1 1\\n2 3\\n6 2 1\\n5 4 3\\n2 1\\n1\\n2\\n\", \"1\\n1 7\\n1 2 4 3 3 3 5\\n\", \"4\\n1 10\\n1 2 3 2 2 2 2 2 3 3\\n1 10\\n1 2 3 3 3 3 3 2 3 3\\n1 10\\n1 2 3 3 3 3 2 2 3 3\\n1 5\\n1 4 3 2 5\\n\", \"1\\n2 4\\n2 1 1 1\\n2 2 2 1\\n\"... | {
"index": 23891,
"source": "taco",
"source_row_index": 7040,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given a string s, consisting of lowercase English letters, and the integer m.\n\nOne should choose some symbols from the given string so that any contiguous subsegment of length m has at least one selected s... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"3\\ncbabc\\n\", \"2\\nabcab\\n\", \"3\\nbcabcbaccba\\n\", \"5\\nimmaydobun\\n\", \"5\\nwjjdqawypvtgrncmqvcsergermprauyevcegjtcrrblkwiugrcjfpjyxngyryxntauxlouvwgjzpsuxyxvhavgezwtuzknetdibv\\n\", \"10\\nefispvmzuutsrpxzfrykhabznxiyquwvhwhrksrgzodtuepfvamilfdynapzhzyhncorhzuewrrkcduvuh... | {
"index": 23892,
"source": "taco",
"source_row_index": 7041,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nYou are given a square board, consisting of $n$ rows and $n$ columns. Each tile in it should be colored either white or black.\n\nLet's call some coloring beautiful if each pair of adjacent rows are either the same ... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"1 1\\n\", \"2 3\\n\", \"49 1808\\n\", \"2 1\\n\", \"2 2\\n\", \"2 4\\n\", \"3 1\\n\", \"3 2\\n\", \"3 3\\n\", \"3 4\\n\", \"3 5\\n\", \"3 6\\n\", \"3 7\\n\", \"3 8\\n\", \"3 9\\n\", \"4 1\\n\", \"4 2\\n\", \"4 3\\n\", \"4 4\\n\", \"4 5\\n\", \"4 6\\n\", \"4 7\\n\", \"4 8\\n\", \"4 9... | {
"index": 23893,
"source": "taco",
"source_row_index": 7042,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nEnter a positive integer n of 4,000 or less, with a pair of integers a, b, c, d in the range 0-1000.\n\n\na + b + c + d = n\n\n\nCreate a program that outputs the number of combinations that satisfy the conditions.\... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"2\\n0\\n35\", \"2\\n-1\\n35\", \"2\\n-1\\n24\", \"2\\n-1\\n43\", \"2\\n-1\\n72\", \"2\\n-1\\n81\", \"2\\n-1\\n61\", \"2\\n-1\\n82\", \"2\\n0\\n82\", \"2\\n-1\\n59\", \"2\\n-1\\n100\", \"2\\n-2\\n110\", \"2\\n-2\\n111\", \"2\\n2\\n35\", \"2\\n0\\n63\", \"2\\n-1\\n21\", \"2\\n-1\\n17\... | {
"index": 23894,
"source": "taco",
"source_row_index": 7043,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nHaving learned (not without some help from the Codeforces participants) to play the card game from the previous round optimally, Shrek and Donkey (as you may remember, they too live now in the Kingdom of Far Far Awa... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"8 53 4\\n------------------------------------G-------------R--\\n-----------G--R--------------------------------------\\n----------------------------------GR-----------------\\n----------------------R------------------G-----------\\n-------------R----------------G-------------------... | {
"index": 23895,
"source": "taco",
"source_row_index": 7044,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThe prime numbers are not regularly spaced. For example from `2` to `3` the step is `1`.\nFrom `3` to `5` the step is `2`. From `7` to `11` it is `4`.\nBetween 2 and 50 we have the following pairs of 2-steps primes:... | code_mechanism | {
"ground_truth": "{\"fn_name\": \"step\", \"inputs\": [[2, 100, 110], [4, 100, 110], [6, 100, 110], [8, 300, 400], [10, 300, 400], [4, 30000, 100000], [6, 30000, 100000], [8, 30000, 100000], [11, 30000, 100000], [16, 5, 20], [2, 10000000, 11000000], [52, 1300, 15000], [10, 4900, 5000], [30, 4900, 5000], [2, 4900, 50... | {
"index": 23896,
"source": "taco",
"source_row_index": 7045,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nLet $f_{x} = c^{2x-6} \\cdot f_{x-1} \\cdot f_{x-2} \\cdot f_{x-3}$ for $x \\ge 4$.\n\nYou have given integers $n$, $f_{1}$, $f_{2}$, $f_{3}$, and $c$. Find $f_{n} \\bmod (10^{9}+7)$.\n\n\n-----Input-----\n\nThe onl... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"5 1 2 5 3\\n\", \"17 97 41 37 11\\n\", \"4 1 1 1 1\\n\", \"1000000000000000000 1000000000 1000000000 1000000000 1000000000\\n\", \"27230 83472 9488 55320 2081\\n\", \"44618 45855 80403 31174 63416\\n\", \"67025 50601 5471 94645 97571\\n\", \"89432 31159 22014 66629 31727\\n\", \"118... | {
"index": 23897,
"source": "taco",
"source_row_index": 7046,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nProblem I Starting a Scenic Railroad Service\n\nJim, working for a railroad company, is responsible for planning a new tourist train service. He is sure that the train route along a scenic valley will arise a big bo... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4\\n1 3\\n1 3\\n3 6\\n3 9\", \"4\\n1 3\\n1 6\\n3 2\\n3 9\", \"4\\n2 2\\n1 11\\n10 2\\n3 9\", \"4\\n2 1\\n1 11\\n10 2\\n3 9\", \"4\\n3 1\\n1 7\\n10 2\\n9 3\", \"4\\n6 1\\n1 10\\n10 2\\n9 3\", \"4\\n1 3\\n1 11\\n0 2\\n3 9\", \"4\\n1 3\\n1 6\\n3 1\\n5 9\", \"4\\n4 1\\n1 11\\n10 2\\n6 1... | {
"index": 23898,
"source": "taco",
"source_row_index": 7047,
"source_split": "train"
} |
deepcoder_while_sandbox | [
{
"content": "Solve the following programming problem. Provide a complete solution in Python.\n\nThere are N cards. The i-th card has an integer A_i written on it. For any two cards, the integers on those cards are different.\n\nUsing these cards, Takahashi and Aoki will play the following game:\n\n* Aoki choos... | code_mechanism | {
"ground_truth": "{\"inputs\": [\"4 3\\n10 20 30 40\\n2\\n34\\n20\", \"4 3\\n10 20 30 40\\n2\\n25\\n8\", \"4 3\\n26 20 30 55\\n2\\n25\\n8\", \"4 2\\n26 20 30 55\\n2\\n25\\n8\", \"5 5\\n3 5 7 11 13\\n1\\n7\\n9\\n10\\n13\", \"4 3\\n20 20 30 30\\n2\\n25\\n8\", \"5 5\\n3 5 7 11 13\\n1\\n14\\n9\\n10\\n13\", \"4 3\\n11 20... | {
"index": 23899,
"source": "taco",
"source_row_index": 7048,
"source_split": "train"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.