messages
listlengths
1
1
ground_truth
stringlengths
88
726k
dataset
stringclasses
2 values
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnother programming contest is o...
[{"type": "stdin_stdout", "input": "50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 50\n50 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string consisting of onl...
[{"type": "stdin_stdout", "input": "5\n28\n14\n1\n0", "output": "11131221121113122118\n311311222113111231131112132112311321322112111312211312111322212311322113212221\n"}, {"type": "stdin_stdout", "input": "5\n23\n14\n1\n0", "output": "11131221121113122113\n311311222113111231131112132112311321322112111312211312111322212...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSuppose you have two points $p =...
[{"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n6 9 1 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n6 9 2 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"type": "stdin_stdout", "input": "3\n4\n2 4 1 3\n5\n0 9 2 18 12\n2\n13 37\n", "output": "10\n13\n3\n"}, {"ty...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery superhero has been given a...
[{"type": "stdin_stdout", "input": "9 48096 5475634\n28248 27808 75072 58867 37890 95515 26685 68307 40390\n", "output": "143611.00000000000000000000\n"}, {"type": "stdin_stdout", "input": "9 29221 2106895\n82089 18673 2890 99009 89855 30685 39232 82330 30021\n", "output": "128230.00000000000000000000\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGag\n\nSegtree has $ N $ of \"ga...
[{"type": "stdin_stdout", "input": "1\n114525", "output": "114524\n"}, {"type": "stdin_stdout", "input": "1\n105905", "output": "105904\n"}, {"type": "stdin_stdout", "input": "1\n196252", "output": "196251\n"}, {"type": "stdin_stdout", "input": "1\n127413", "output": "127412\n"}, {"type": "stdin_stdout", "input": "1\n3...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour task is to write a program ...
[{"type": "stdin_stdout", "input": "5\n11\n3\n5\n8\n10\n11\n8\n29\n1\n3\n2", "output": "3\n5\n8\n11\n"}, {"type": "stdin_stdout", "input": "5\n11\n4\n10\n4\n-1\n20\n8\n20\n2\n8\n0", "output": "4\n8\n20\n"}, {"type": "stdin_stdout", "input": "5\n11\n2\n11\n1\n-2\n20\n8\n22\n2\n6\n1", "output": "1\n2\n11\n"}, {"type": "s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function `consonantCount...
[{"input": "\"h^$&^#$&^elLo world\"", "output": "[7]", "fn_name": "consonant_count"}, {"input": "\"helLo world\"", "output": "[7]", "fn_name": "consonant_count"}, {"input": "\"0123456789\"", "output": "[0]", "fn_name": "consonant_count"}, {"input": "\"012345_Cb\"", "output": "[2]", "fn_name": "consonant_count"}, {"inpu...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya's house is situated in a f...
[{"type": "stdin_stdout", "input": "6\n4 1 11 9 3 11\n12 32 19 12 19 11\n", "output": "1035\n"}, {"type": "stdin_stdout", "input": "6\n4 1 11 6 3 11\n12 32 19 12 19 11\n", "output": "1026\n"}, {"type": "stdin_stdout", "input": "6\n4 1 11 6 3 18\n12 32 19 12 19 11\n", "output": "1061\n"}, {"type": "stdin_stdout", "input...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n An `amazon` (also known...
[{"input": "\"e5\"\n\"f6\"", "output": "[[12, 10, 0, 33]]", "fn_name": "amazon_check_mate"}, {"input": "\"a1\"\n\"g5\"", "output": "[[0, 29, 1, 29]]", "fn_name": "amazon_check_mate"}, {"input": "\"a3\"\n\"e4\"", "output": "[[1, 32, 1, 23]]", "fn_name": "amazon_check_mate"}, {"input": "\"f3\"\n\"f2\"", "output": "[[6, 1...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPerhaps many have heard that the...
[{"type": "stdin_stdout", "input": "15\n17 5\n-19 5\n-8 3\n27 2\n45 3\n36 2\n-32 2\n49 1\n-3 2\n-41 2\n-35 1\n-46 1\n-29 1\n33 1\n0 1\n50\n24 -4\n41 3\n37 3\n9 2\n38 -4\n-30 2\n-41 -5\n-9 -5\n-33 3\n0 2\n-20 -3\n-49 -4\n34 1\n-38 -2\n17 -1\n-33 3\n-17 4\n16 3\n-49 2\n-3 -4\n-9 2\n35 3\n37 -5\n0 0\n-46 -5\n48 1\n-22 -4\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke is going to open a contest...
[{"type": "stdin_stdout", "input": "AtCoder Beginner Contest\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "AtCoder Befinner Contest", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "AtCoder sennifeB Cpntest", "output": "AsC\n"}, {"type": "stdin_stdout", "input": "AtCoder rennigeB Contest", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSimple enough this one - you wil...
[{"input": "[\"Hackathon\", \"Katathon\", \"Code\", \"CodeWars\", \"Laptop\", \"Macbook\", \"JavaScript\", 1, 5, 2]", "output": "[[1, 2, 5, \"Code\", \"CodeWars\", \"Hackathon\", \"JavaScript\", \"Katathon\", \"Laptop\", \"Macbook\"]]", "fn_name": "db_sort"}, {"input": "[82, 18, 72, 1, 11, 12, 12, 12, 12, 115, 667, 12,...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe new Β£5 notes have been recen...
[{"input": "5300\n[1190, 1010, 1045, 55, 10, 19, 55]", "output": "[383]", "fn_name": "get_new_notes"}, {"input": "10000\n[1800, 500, 1200, 655, 150]", "output": "[1139]", "fn_name": "get_new_notes"}, {"input": "3600\n[1800, 350, 460, 500, 15]", "output": "[95]", "fn_name": "get_new_notes"}, {"input": "2300\n[590, 1500,...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPermutation p is an ordered set ...
[{"type": "stdin_stdout", "input": "18247 939\n", "output": "1 940 2 939 3 938 4 937 5 936 6 935 7 934 8 933 9 932 10 931 11 930 12 929 13 928 14 927 15 926 16 925 17 924 18 923 19 922 20 921 21 920 22 919 23 918 24 917 25 916 26 915 27 914 28 913 29 912 30 911 31 910 32 909 33 908 34 907 35 906 36 905 37 904 38 903 39...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "78 36\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 1 0 0 0 0 0 0 0 0 0 0\n1 52\n2 6\n9 43\n10 52\n4 63\n9 35\n10 67\n9 17\n3 43\n4 38\n1 27\n9 44\n6 74\n7 3\n8 18\n1 52\n1 68\n5 51\n5 2\n11 50\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string, you progressivel...
[{"input": "\"CodeWars Rocks\"", "output": "[\"Cs1ok2dc3eo4WR5a 6rs7\"]", "fn_name": "char_concat"}, {"input": "\"$'D8KB)%PO@s\"", "output": "[\"$s1'@2DO38P4K%5B)6\"]", "fn_name": "char_concat"}, {"input": "\"1234567890\"", "output": "[\"101292383474565\"]", "fn_name": "char_concat"}, {"input": "\"CodeWars\"", "output"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n Vanya gets bored one da...
[{"input": "36123011", "output": "[277872985]", "fn_name": "rocks"}, {"input": "100", "output": "[192]", "fn_name": "rocks"}, {"input": "10", "output": "[11]", "fn_name": "rocks"}, {"input": "13", "output": "[17]", "fn_name": "rocks"}, {"input": "1", "output": "[1]", "fn_name": "rocks"}]
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an expression of t...
[{"type": "stdin_stdout", "input": "100\n0+0\n0+1\n0+2\n0+3\n0+4\n0+5\n0+6\n0+7\n0+8\n0+9\n1+0\n1+1\n1+2\n1+3\n1+4\n1+5\n1+6\n1+7\n1+8\n1+9\n2+0\n2+1\n2+2\n2+3\n2+4\n2+5\n2+6\n2+7\n2+8\n2+9\n3+0\n3+1\n3+2\n3+3\n3+4\n3+5\n3+6\n3+7\n3+8\n3+9\n4+0\n4+1\n4+2\n4+3\n4+4\n4+5\n4+6\n4+7\n4+8\n4+9\n5+0\n5+1\n5+2\n5+3\n5+4\n5+5\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA marine themed rival site to Co...
[{"input": "\"https://this.is.an.unneccesarily.long.subdomain.codewars.com/katas.are.really.fun.codwars.com/\"", "output": "[false]", "fn_name": "find_codwars"}, {"input": "\"https://this.is.an.unneccesarily.long.subdomain.codwars.comp/katas.are.really.fun.codwars.com/\"", "output": "[false]", "fn_name": "find_codwars"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs we all know Barney's job is \...
[{"type": "stdin_stdout", "input": "12\n254904759290707697 475737283258450340 533306428548398547 442127134828578937 779740159015946254 272877594683860919 93000149670491971 632184275887310175 498293278222136720 551099726729989816 149940343283925029 989425634209891686\n", "output": "461895893/385687671\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNauuo is a girl who loves writin...
[{"type": "stdin_stdout", "input": "000 100 100\n", "output": "?\n"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "?"}, {"type": "stdin_stdout", "input": "100 100 100\n", "output": "?"}, {"type": "stdin_stdout", "input": "101 0 100\n", "output": "+\n"}, {"type": "stdin_stdout", "input": "25 24 100\n", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven two arrays, the purpose of...
[{"input": "[[2, 5], [3, 5], [6, 2]]\n[[2, 6], [5, 3], [2, 5]]", "output": "[true]", "fn_name": "same"}, {"input": "[[2, 5], [3, 5], [6, 2]]\n[[3, 5], [6, 2], [5, 2]]", "output": "[true]", "fn_name": "same"}, {"input": "[[2, 3], [3, 4]]\n[[4, 3], [2, 4]]", "output": "[false]", "fn_name": "same"}, {"input": "[[2, 5], [3...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe construction of subway in Be...
[{"type": "stdin_stdout", "input": "100\n98 52 63 2 18 96 31 58 84 40 41 45 66 100 46 71 26 48 81 20 73 91 68 76 13 93 17 29 64 95 79 21 55 75 19 85 54 51 89 78 15 87 43 59 36 1 90 35 65 56 62 28 86 5 82 49 3 99 33 9 92 32 74 69 27 22 77 16 44 94 34 6 57 70 23 12 61 25 8 11 67 47 83 88 10 14 30 7 97 60 42 37 24 38 53 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour users passwords were all st...
[{"input": "\"P1@pP1@pP1@pP1@pP1@pP1@p\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"password\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"P1@p\"", "output": "[\"not valid\"]", "fn_name": "check_password"}, {"input": "\"P1@pP1@p\"", "output": "[\"valid\"]", "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBessie is out grazing on the far...
[{"type": "stdin_stdout", "input": "42 41 20\n8 34 12 13 38 3 9 10 18 16 2 26 24 17 32 21 4 27 15 39\n1 35\n35 8\n1 31\n31 34\n1 40\n40 12\n1 30\n30 13\n1 33\n33 38\n1 37\n37 3\n1 22\n22 9\n1 20\n20 10\n1 25\n25 18\n1 14\n14 16\n1 42\n42 7\n7 2\n42 11\n11 26\n42 29\n29 24\n42 36\n36 17\n42 41\n41 32\n42 23\n23 21\n42 2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a game that uses number...
[{"type": "stdin_stdout", "input": "5 7\n1\n-1\nFizz\n2\nzuzB\n5\n2\n16 5\n1\n4\n5\n7\n8\n0 0", "output": "3\n1 6 7 8 9 10 11 12 13 14 15 16\n"}, {"type": "stdin_stdout", "input": "14 7\n1\n0\nzzFi\n4\nBuzz\n11\n1\n3 5\n-1\n3\n8\n4\n3\n0 0", "output": "1 4 5 8 9 10 11 12 13 14\n3\n"}, {"type": "stdin_stdout", "input": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChouti was doing a competitive p...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1236540828\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1102703100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1266106036\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is said that a legendary trea...
[{"type": "stdin_stdout", "input": "4\n1 1\n2 0 -1\n2 4 2\n3 2 16 10\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 0 0\n2 4 2\n3 2 16 10\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 0 -1\n2 4 2\n3 2 16 2\n0", "output": "-1\n"}, {"type": "stdin_stdout", "input": "4\n1 1\n2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence $b_1, b...
[{"type": "stdin_stdout", "input": "1\n100\n49 47 115 100 84 71 77 67 1 39 34 92 72 44 68 124 20 102 187 58 78 41 3 15 14 48 134 11 29 117 45 24 23 19 66 27 7 22 123 55 135 10 149 185 8 9 62 61 137 52 171 2 5 28 43 42 155 6 111 127 17 59 25 126 53 125 103 26 75 12 56 96 148 60 114 13 4 131 101 16 104 51 132 158 18 168 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have an integer sequence of l...
[{"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 610703 888250 259161 609120 592348 713644", "output": "963903348\n"}, {"type": "stdin_stdout", "input": "10\n356822 296174 484500 710640 231537 888250 259161 609120 592348 713644", "output": "669101188\n"}, {"type": "stdin_stdout", "input": "10\n356822...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou're given a string of lower-c...
[{"type": "stdin_stdout", "input": "ipsrjylhpkjvlzncfixipstwcicxqygqcfrawpzzvckoveyqhathglblhpkjvlzncfixipfajaqobtzvthmhgbuawowoknirclxg\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbffffffffffffffffffffffgffffffffffffff\n", "output": "61\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite function bmi that calculat...
[{"input": "50\n1.8", "output": "[\"Underweight\"]", "fn_name": "bmi"}, {"input": "90\n1.8", "output": "[\"Overweight\"]", "fn_name": "bmi"}, {"input": "80\n1.8", "output": "[\"Normal\"]", "fn_name": "bmi"}, {"input": "110\n1.8", "output": "[\"Obese\"]", "fn_name": "bmi"}, {"input": "50\n1.5", "output": "[\"Normal\"]",...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate an OR function, without u...
[{"input": "[false, false, false, false, false, false]", "output": "[false]", "fn_name": "alt_or"}, {"input": "[false, false, false, false, false, true]", "output": "[true]", "fn_name": "alt_or"}, {"input": "[false, false, false, false, true, false]", "output": "[true]", "fn_name": "alt_or"}, {"input": "[false, false, ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has four cookies with deli...
[{"type": "stdin_stdout", "input": "45445415 46908390 31865171 30402196\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "93407609 30427494 56229544 81174201\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "76041209 81456309 25817729 23366690\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "9...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAs Will is stuck in the Upside D...
[{"type": "stdin_stdout", "input": ")?(??((???????()?(?????????)??(????????((?)?????)????)??????(?????)?)?????)??????(??()??????)????????)?)()??????????????())????????(???)??)????????????????????(?????)??)???)??(???????????????)???)??)?\n", "output": "8314\n"}, {"type": "stdin_stdout", "input": "?)??)???)??????????????...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIlya plays a card game by the fo...
[{"type": "stdin_stdout", "input": "100\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 0\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIgor is in 11th grade. Tomorrow ...
[{"type": "stdin_stdout", "input": "18\n2 3\n2 3\n2 3\n3 4\n1 4\n3 4\n160570 255604\n3 4\n3 5\n4 5\n1 5\n1 3\n1 2\n1 2\n113836 489816\n1 4\n2 4\n233746 254500\n", "output": "1\n1\n1\n1\n2\n1\n3271\n1\n2\n1\n1\n1\n1\n1\n17237\n2\n2\n3823\n"}, {"type": "stdin_stdout", "input": "14\n1 2\n51649 234369\n3 5\n2 4\n4 5\n2 3\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem\n\nThere are n vertices ...
[{"type": "stdin_stdout", "input": "-11 14", "output": "287\n"}, {"type": "stdin_stdout", "input": "-14 17", "output": "449\n"}, {"type": "stdin_stdout", "input": "-11 18", "output": "393\n"}, {"type": "stdin_stdout", "input": "-1 20", "output": "207\n"}, {"type": "stdin_stdout", "input": "-6 11", "output": "128\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "ziurxtzxixmsmewfuffsqdkpphssdcgybwtmzavkosqtmcntspzvftqybaldjllvgttblectspqinfdhhnpvkcbwjlqlquajueqsgymyekuswjctumsbnvvaiinxjlzcnyixfaykolkeogufvzvhnatqtelgjkqfvexghiznwubwihjkznkhepjzrnyzftmimqtlihpn\nzurzximmewfuffskppsdcybwmzavkosqtmctspvftybaljlgtltsqinfdhhpvkcwjlqlqymykusctumsbn...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Smart Beaver from ABBYY plan...
[{"type": "stdin_stdout", "input": "26 919241245\n302193 763904252\n302152 990010704\n453347 786598325\n302156 614790744\n151113 552970041\n151053 935503943\n453339 788648514\n453340 819457698\n604398 992471599\n453342 141598754\n302166 998869126\n151098 158907792\n453293 724150038\n604414 436248800\n604434 447578562\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a program that outputs al...
[{"type": "stdin_stdout", "input": "265 2171\n1686 3636\n2001 2275\n0 0", "output": "268\n272\n276\n280\n284\n288\n292\n296\n304\n308\n312\n316\n320\n324\n328\n332\n336\n340\n344\n348\n352\n356\n360\n364\n368\n372\n376\n380\n384\n388\n392\n396\n400\n404\n408\n412\n416\n420\n424\n428\n432\n436\n440\n444\n448\n452\n456\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRikhail Mubinchik believes that ...
[{"type": "stdin_stdout", "input": "10000 239\n", "output": "1168638\n"}, {"type": "stdin_stdout", "input": "10000 1538\n", "output": "11620"}, {"type": "stdin_stdout", "input": "11275 615\n", "output": "263862"}, {"type": "stdin_stdout", "input": "10100 1538\n", "output": "11940"}, {"type": "stdin_stdout", "input": "1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSimon has a rectangular table co...
[{"type": "stdin_stdout", "input": "5 50\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\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\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 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have invented a time-machine...
[{"input": "\"This is a message\"\n0", "output": "[\"THIS IS A MESSAGE\"]", "fn_name": "caeser"}, {"input": "\"who are you?\"\n18", "output": "[\"OZG SJW QGM?\"]", "fn_name": "caeser"}, {"input": "\"final one\"\n9", "output": "[\"ORWJU XWN\"]", "fn_name": "caeser"}, {"input": "\"..5tyu..\"\n25", "output": "[\"..5SXT..\...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have a set of $n$ discs, the...
[{"type": "stdin_stdout", "input": "10 10\n2 10 8 7 9 3 4 6 5 1\n10 4\n10 1\n10 6\n10 8\n10 2\n10 9\n10 7\n10 3\n10 5\n", "output": "9\n9\n9\n8\n7\n6\n6\n4\n2\n0\n"}, {"type": "stdin_stdout", "input": "10 10\n2 10 8 7 9 3 4 6 5 1\n10 4\n10 1\n10 6\n10 8\n10 2\n10 9\n10 7\n10 3\n10 5\n", "output": "9\n9\n9\n8\n7\n6\n6\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have an N \\times N square gr...
[{"type": "stdin_stdout", "input": "19\n100\n", "output": "261\n"}, {"type": "stdin_stdout", "input": "10\n202", "output": "-102\n"}, {"type": "stdin_stdout", "input": "19\n110", "output": "251\n"}, {"type": "stdin_stdout", "input": "10\n-13", "output": "113\n"}, {"type": "stdin_stdout", "input": "10\n-16", "output": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA new pack of n t-shirts came to...
[{"type": "stdin_stdout", "input": "20\n414468312 20329584 106106409 584924603 666547477 670032002 726095027 276840253 368277336 940941705 531635095 213813062 440421387 959075599 240727854 495316522 838268432 786936631 586382273 806443734\n3 1 2 3 3 2 2 1 3 2 3 2 3 3 3 2 1 3 1 2\n3 1 2 2 2 2 3 1 2 3 2 1 1 2 3 1 2 3 3 2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA Garden with Ponds\n\nMr. Gardi...
[{"type": "stdin_stdout", "input": "3 3\n0 0 2\n0 1 2\n2 3 1\n3 5\n0 3 7 3 3\n4 1 0 2 3\n3 3 4 0 2\n7 7\n2 1 1 1 1 0 0\n1 0 0 0 1 0 0\n1 0 1 1 1 1 1\n1 0 0 0 2 0 1\n1 1 1 1 1 0 1\n0 0 2 1 0 1 1\n0 0 1 1 1 2 -1\n6 6\n1 1 1 1 2 2\n1 0 0 2 0 2\n1 0 -1 2 1 2\n3 3 3 15 13 9\n3 0 0 18 -1 9\n2 6 3 9 9 2\n0 0", "output": "0\n0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n*Inspired by the [Fold an Array]...
[{"input": "[3, 234, 25, 345, 45, 34, 234, 235, 345, 34, 534, 45, 645, 645, 645, 4656, 45, 3]\n4", "output": "[[1040, 7712]]", "fn_name": "split_and_add"}, {"input": "[23, 345, 345, 345, 34536, 567, 568, 6, 34536, 54, 7546, 456]\n20", "output": "[[79327]]", "fn_name": "split_and_add"}, {"input": "[32, 45, 43, 23, 54, 2...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA binary matrix is called good i...
[{"type": "stdin_stdout", "input": "2 58\n1100001110010010100001000000000110110001101001100010101110\n1110110010101111001110010001100010001010100011111110110100\n", "output": "27\n"}, {"type": "stdin_stdout", "input": "2 58\n1100001110010010100001000000000110110001101001100010101110\n11101100101011110011100100011000100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have two integers: A and B.\n...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "-96 -16\n", "output": "1536\n"}, {"type": "stdin_stdout", "input": "36 80\n", "output": "2880\n"}, {"type": "stdin_stdout", "input": "-76 39\n", "output": "-37\n"}, {"type": "stdin_stdout", "input": "-13 3\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA tourist is visiting Byteland. ...
[{"type": "stdin_stdout", "input": "5 qwertyuiopasdfghjklzxcvbnm\nPh\nisscP\nBpke_kdc_epclc_jcijsc_mihyo?\nEpcf_kdc_liswhyo_EIED_hy_Vimcvpcn_Zkdvp_siyo_viyecle.\nIpp!", "output": "Hi\nolleH\nWhat are these people doing?\nThey are solving TOTR in Codechef March long contest.\nOhh!\n"}, {"type": "stdin_stdout", "input": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Introduction \n\nA grille ciph...
[{"input": "\"tcddoadepwweasresd\"\n77098", "output": "[\"codewars\"]", "fn_name": "grille"}, {"input": "\"abcdef\"\n5", "output": "[\"df\"]", "fn_name": "grille"}, {"input": "\"ab\"\n255", "output": "[\"ab\"]", "fn_name": "grille"}, {"input": "\"abcde\"\n32", "output": "[\"\"]", "fn_name": "grille"}, {"input": "\"abcd...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a non-empty string...
[{"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\ntwo\none\ntwooooo\nttttwo\nttwwoo\nooone\nonnne\noneeeee\noneeeeeeetwooooo\n", "output": "6\n2 6 10 13 18 21 \n1\n2 \n1\n2 \n1\n2 \n1\n5 \n0\n\n1\n4 \n0\n\n1\n2 \n2\n2 11 \n"}, {"type": "stdin_stdout", "input": "10\nonetwonetwooneooonetwooo\ntwo\none\ntw...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe postal system in the area wh...
[{"type": "stdin_stdout", "input": "4 5\n1 2 10\n1 3 15\n2 3 5\n2 4 3\n3 4 10\n2\n1 4 10 LoveLetter\n2 3 13 Greetings\n3 3\n1 2 1\n2 3 1\n3 1 1\n3\n1 2 1 BusinessMailC\n2 3 1 BusinessMailB\n3 1 1 BusinessMailA\n0 0", "output": "Greetings 18\nLoveLetter 26\n\nBusinessMailA 2\nBusinessMailB 2\nBusinessMailC 2\n"}, {"type...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have been speeding on a moto...
[{"input": "[\"72\", \"7\", \"7\", \"78\", \"79\", \"709\", \"94\"]", "output": "[\"7097277787994\"]", "fn_name": "penalty"}, {"input": "[\"71\", \"82\", \"42\", \"34\", \"90\"]", "output": "[\"3442718290\"]", "fn_name": "penalty"}, {"input": "[\"45\", \"30\", \"50\", \"1\"]", "output": "[\"1304550\"]", "fn_name": "pen...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nComplete the square sum function...
[{"input": "[0, 3, 4, 5]", "output": "[50]", "fn_name": "square_sum"}, {"input": "[-1, 0, 1]", "output": "[2]", "fn_name": "square_sum"}, {"input": "[-1, -2]", "output": "[5]", "fn_name": "square_sum"}, {"input": "[1, 2]", "output": "[5]", "fn_name": "square_sum"}, {"input": "[]", "output": "[0]", "fn_name": "square_su...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## Enough is enough!\n\nAlice an...
[{"input": "[1, 2, 3, 1, 1, 2, 1, 2, 3, 3, 2, 4, 5, 3, 1]\n3", "output": "[[1, 2, 3, 1, 1, 2, 2, 3, 3, 4, 5]]", "fn_name": "delete_nth"}, {"input": "[1, 1, 3, 3, 7, 2, 2, 2, 2]\n3", "output": "[[1, 1, 3, 3, 7, 2, 2, 2]]", "fn_name": "delete_nth"}, {"input": "[1, 1, 1, 1, 1]\n5", "output": "[[1, 1, 1, 1, 1]]", "fn_name"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShuseki Kingdom is the world's l...
[{"type": "stdin_stdout", "input": "7 13\n6 1\n7 2\n3 7\n6 5\n3 6\n7 4\n3 5\n4 1\n3 1\n1 5\n1 6\n6 2\n2 4\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "8 12\n6 1\n7 5\n2 5\n4 1\n6 3\n4 3\n5 7\n1 3\n5 2\n2 7\n4 6\n7 2\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "8 12\n6 1\n7 5\n2 5\n4 1\n6 3\n4 3\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHaving stayed home alone, Petya ...
[{"type": "stdin_stdout", "input": "000:0010\n", "output": "2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 "}, {"type": "stdin_stdout", "input": "001:010\n", "output": "2 3 4 5 6 7 8 9 10 11 12 13 14 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPig Latin is an English language...
[{"input": "\"yaYAya\"", "output": "[\"ayayayay\"]", "fn_name": "pig_latin"}, {"input": "\"YayayA\"", "output": "[\"ayayayay\"]", "fn_name": "pig_latin"}, {"input": "\"Hello\"", "output": "[\"ellohay\"]", "fn_name": "pig_latin"}, {"input": "\"CCCC\"", "output": "[\"ccccay\"]", "fn_name": "pig_latin"}, {"input": "\"tes3...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMy arm is stuck and I can't pull...
[{"type": "stdin_stdout", "input": "1\n11\n111111\n111111111111\n12345\n11111111119999999999\n11111111113333333333\n11111111118888888888\n11111111112222222222111111111\n11111111110000000000444444444\n11224111122411\n888888888888999999999999888888888888999999999999999999\n666666666666666777333333333338888888888\n1111114...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nDuring this time of w...
[{"type": "stdin_stdout", "input": "3 4\n31\n27\n35\n20 25 30\n23 29 90\n21 35 60\n28 48 40", "output": "100\n"}, {"type": "stdin_stdout", "input": "3 4\n31\n27\n35\n20 25 30\n23 29 90\n21 35 60\n28 48 25", "output": "130\n"}, {"type": "stdin_stdout", "input": "3 4\n34\n40\n44\n38 25 30\n24 29 11\n21 69 99\n28 43 40", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStudent Vladislav came to his pr...
[{"type": "stdin_stdout", "input": "10 15\n900000001 1\n900000001 1\n900000002 1\n1737646700 1\n900000001 0\n900000001 1\n900000001 0\n900000001 0\n900000001 0\n900000001 1\n900000001 0\n900000001 0\n900000004 1\n900000000 1\n900000001 1\n", "output": "1 3\n1 4\n1 8\n1 10\n2 3\n1 5\n2 4\n3 4\n2 5\n1 6\n3 5\n4 5\n1 9\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYura has been walking for some t...
[{"type": "stdin_stdout", "input": "995078784 16\n623812784 347467913 233267735 582455459\n355611107 277980472\n78770458 786182235\n815219022 611815511\n786044046 363376661\n290398527 1777289213\n846155104 388600335\n143085949 155695413\n287078777 918827034\n432395923 126620751\n52941102 329010981\n237509699 571287936\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUser ainta is making a web site....
[{"type": "stdin_stdout", "input": "100 10 100\n", "output": "1 2 3 4 5 6 7 8 9 (10) 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Alyona is celebrating Hap...
[{"type": "stdin_stdout", "input": "86 30\n16 -12 11 16 8 14 7 -29 18 30 -32 -10 20 29 -14 -21 23 -19 -15 17 -2 25 -22 2 26 15 -7 -12 -4 -28 21 -4 -2 22 28 -32 9 -20 23 38 -21 21 37 -13 -30 25 31 6 18 29 29 29 27 38 -15 -32 32 -7 -8 -33 -11 24 23 -19 -36 -36 -18 9 -1 32 -34 -26 1 -1 -16 -14 17 -17 15 -24 38 5 -27 -12 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Background\n\n\nMy TV remote c...
[{"input": "\"The Quick Brown Fox Jumps Over A Lazy Dog.\"", "output": "[254]", "fn_name": "tv_remote"}, {"input": "\"Pack My Box With Five Dozen Liquor Jugs.\"", "output": "[242]", "fn_name": "tv_remote"}, {"input": "\" x X \"", "output": "[30]", "fn_name": "tv_remote"}, {"input": "\"MISSISSIPPI\"", "output": ...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMainak has an array $a_1, a_2, \...
[{"type": "stdin_stdout", "input": "50\n1\n999\n1\n998\n1\n997\n1\n996\n1\n995\n1\n994\n1\n993\n1\n992\n1\n991\n1\n990\n1\n989\n1\n988\n1\n987\n1\n986\n1\n985\n1\n984\n1\n983\n1\n982\n1\n981\n1\n980\n1\n979\n1\n978\n1\n977\n1\n976\n1\n975\n1\n974\n1\n973\n1\n972\n1\n971\n1\n970\n1\n969\n1\n968\n1\n967\n1\n966\n1\n965\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has n items lying in a lin...
[{"type": "stdin_stdout", "input": "2 100 100 10000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 100 10000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 100 00000 10000\n100 100\n", "output": "20000\n"}, {"type": "stdin_stdout", "input": "2 100 10...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn the spirit of the holidays, S...
[{"type": "stdin_stdout", "input": "200\nNESENEESEESWWWNWWSWSWNWNNWNNESWSWNNWNWNENESENNESSWSESWWSSSEEEESSENNNESSWWSSSSESWSWWNNEESSWWNNWSWSSWWNWNNEENNENWWNESSSENWNESWNESWNESEESSWNESSSSSESESSWNNENENESSWWNNWWSWWNESEENWWWWNWWNWWNENESESSWWSWWSES\nNWNESESSENNNESWNWWSWWWNWSESSSWWNWWNNWSENWSWNENNNWWSWWSWNNNESWWWSSESSWWWSSENWSE...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBeroffice text editor has a wide...
[{"type": "stdin_stdout", "input": "bddabcdfaccdabcdfadddabcdfabbdabcdfacddabcdfacdbabcdfacbbabcdfacbcabcdfacbdabcdfadbbabcdfabdbabcdfabdcabcdfabbcabcdfabccabcdfabbbabcdfaddcabcdfaccbabcdfadbdabcdfacccabcdfadcdabcdfadcbabcdfabcbabcdfadbcabcdfacdcabcdfabcdabcdfadccabcdfaddb\n", "output": "bd dabc dfacc dabc dfadddabc df...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn ordered sequence of numbers f...
[{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n[5, 7, 6, 9, 4, 8, 1, 2, 3]", "output": "[0]", "fn_name": "find_deleted_number"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n[5, 7, 9, 4, 8, 1, 2, 3]", "output": "[6]", "fn_name": "find_deleted_number"}, {"input": "[1, 2, 3, 4, 5, 6, 7]\n[2, 3, 6, 1, 5, 4, 7]", "output": "[0]", "fn...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA string a of length m is called...
[{"type": "stdin_stdout", "input": "100\nadebebcdacabaadcbcdebcccdaadaeeedecdbcbdeddcbcaeedbecaeeabaabbdccaebdebabbabdcebbbdaabdbddcadaddadad\n52 62 28 18 100 84 16 53 43 52 49 92 10 64 50 95 90 52 21 14 60 3 94 63 31 70 74 62 93 75 100 96 58 36 76 40 62 74 91 77 92 78 65 11 50 18 79 29 10 25 4 24 44 39 4 91 81 63 97 6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou will be given an array of nu...
[{"input": "[107, 99, 110, 107, 118, 106, 112, 102]", "output": "[[{\"107\": \"k\"}, {\"99\": \"c\"}, {\"110\": \"n\"}, {\"107\": \"k\"}, {\"118\": \"v\"}, {\"106\": \"j\"}, {\"112\": \"p\"}, {\"102\": \"f\"}]]", "fn_name": "num_obj"}, {"input": "[101, 121, 110, 113, 113, 103]", "output": "[[{\"101\": \"e\"}, {\"121\":...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPermutation p is an ordered set ...
[{"type": "stdin_stdout", "input": "100\n-77 57 -95 -23 53 -29 82 -83 38 -73 85 28 25 6 -16 4 -10 -30 -9 -92 14 34 -93 61 36 -100 90 -68 28 16 100 -4 49 23 36 -87 62 -62 53 74 -50 -2 102 8 22 -30 -19 83 7 84 43 90 -65 -75 -15 97 90 15 66 2 13 -91 91 -44 62 51 51 -58 95 77 20 45 76 79 91 60 76 2 82 42 -130 94 -70 122 65...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA permutation is a sequence of i...
[{"type": "stdin_stdout", "input": "102\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 52 51 54 53 56 55 58 57 60 59 62 61 64 63 66 65 68 67 70 69 72 71 74 73 76 75 78 77 80 79 82 81 84 83 86 85 88 87 90 89 92 9...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nN friends of Takahashi has come ...
[{"type": "stdin_stdout", "input": "81 358\n59 53 2 54 462 325 435 279 464 327 49 332 95 200 220 158 139 492 130 467 489 458 81 100 466 473 429 275 81 270 455 218 128 307 335 398 52 30 311 69 148 384 454 413 114 315 186 334 382 392 326 8 53 462 457 350 231 61 185 88 305 480 64 390 52 247 443 240 93 469 370 16 443 7 25 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya is choosing a laptop. The ...
[{"type": "stdin_stdout", "input": "27\n1689 1927 40 270\n3833 2570 167 134\n2580 3589 390 300\n1898 2587 407 316\n1841 2772 411 187\n1296 288 407 506\n1215 263 236 307\n2737 1427 84 992\n1107 1879 284 866\n3311 2507 475 147\n2951 2214 209 375\n1352 2582 110 324\n2082 747 289 521\n2226 1617 209 108\n2253 1993 109 835\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA programming competition site A...
[{"type": "stdin_stdout", "input": "1199\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "1200\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "4208\n", "output": "AGC\n"}, {"type": "stdin_stdout", "input": "1234\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "2799\n", "output": "ARC\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given integers N and K. ...
[{"type": "stdin_stdout", "input": "150607 162", "output": "1606122089\n"}, {"type": "stdin_stdout", "input": "101525 92", "output": "2687492591\n"}, {"type": "stdin_stdout", "input": "101525 162", "output": "491806259\n"}, {"type": "stdin_stdout", "input": "35897 92", "output": "118638000\n"}, {"type": "stdin_stdout",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSquare1001 has seen an electric ...
[{"type": "stdin_stdout", "input": "10\n-32", "output": "-16128\n"}, {"type": "stdin_stdout", "input": "10\n-23", "output": "-11520\n"}, {"type": "stdin_stdout", "input": "10\n-37", "output": "-18688\n"}, {"type": "stdin_stdout", "input": "10\n-42", "output": "-21248\n"}, {"type": "stdin_stdout", "input": "10\n-33", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDZY loves Physics, and he enjoys...
[{"type": "stdin_stdout", "input": "20 20\n265918 744212 196368 74731 293587 679367 460805 632939 453630 565881 835276 606327 181087 721045 219431 849838 370939 582350 335676 32244\n2 16 989\n14 19 628\n1 9 483\n5 8 733\n13 19 556\n10 17 911\n1 7 599\n13 17 390\n10 20 965\n17 11 449\n3 15 310\n3 6 557\n14 18 225\n1 18 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a non-empty string...
[{"type": "stdin_stdout", "input": "abbbbbbbabbbbbbbbbbbbbbbbbbbbbbbabbabbbbbabbbbbbbbbbbabbbbbbbbabbabbbbbbbbbbbbbbabbabbbaababbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbabbbbbbbbbbbbbbbbabbbbabbbbbbbbbbbbbbbabbbbbbbbbaababbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbabbabbbbbbbbbbbbbbbbabbbabbbbbaabbabbbbbbbbb...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday, Chef woke up to find that...
[{"type": "stdin_stdout", "input": "1 2 3\n\n\n", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "-1 4 14", "output": "Unlucky Chef\n"}, {"type": "stdin_stdout", "input": "1 2 6\n\n\n", "output": "Lucky Chef\n"}, {"type": "stdin_stdout", "input": "1 2 11", "output": "Unlucky Chef\n"}, {"type": "stdin_st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Petya often travels to hi...
[{"type": "stdin_stdout", "input": "100\n1 2 3 7 5 6 10 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 30 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 1 82 83 84 85 86 87 88 89 90 91 92 93 94 100 5 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNastya just made a huge mistake ...
[{"type": "stdin_stdout", "input": "5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "Yes\nNo\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "5\n7 20 3 101 18\n11 11 10 234 2\n8 9 7 250 122\n19 41 21 321 10\n3 10 8 6 1\n", "output": "Yes\nNo\nYes\nNo\nYes\n"}, {"type": "s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function that accepts a ...
[{"input": "\"abc(123) 456-7890abc\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"abc(123)456-7890abc\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"abc(123) 456-7890\"", "output": "[false]", "fn_name": "validPhoneNumber"}, {"input": "\"(123) 456-7890abc\"", "output": "[fal...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Happy Farm 5 creators decide...
[{"type": "stdin_stdout", "input": "60\n-20 179\n-68 0\n-110 68\n-22 177\n47 140\n-49 -4\n-106 38\n-23 22\n20 193\n47 173\n-23 22\n-100 32\n-97 29\n47 124\n-49 -4\n20 193\n-20 179\n-50 149\n-59 -7\n4 193\n-23 22\n-97 29\n-23 22\n-66 133\n47 167\n-61 138\n-49 -4\n-91 108\n-110 84\n47 166\n-110 77\n-99 100\n-23 22\n-59 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAtCoder Inc. holds a contest eve...
[{"type": "stdin_stdout", "input": "ABC\n", "output": "ARC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ARC\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "ABC", "output": "ARC"}]
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen you asked some guy in your ...
[{"type": "stdin_stdout", "input": "sakahashi", "output": "sak\n"}, {"type": "stdin_stdout", "input": "sbkahashi", "output": "sbk\n"}, {"type": "stdin_stdout", "input": "ihsahakbs", "output": "ihs\n"}, {"type": "stdin_stdout", "input": "hhsaiakbr", "output": "hhs\n"}, {"type": "stdin_stdout", "input": "rbkaiashh", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string as input, move al...
[{"input": "\"programming\"", "output": "[\"prgrmmngoai\"]", "fn_name": "move_vowels"}, {"input": "\"javascript\"", "output": "[\"jvscrptaai\"]", "fn_name": "move_vowels"}, {"input": "\"haskell\"", "output": "[\"hskllae\"]", "fn_name": "move_vowels"}, {"input": "\"clojure\"", "output": "[\"cljroue\"]", "fn_name": "move...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Fair Nut found a string $s$....
[{"type": "stdin_stdout", "input": "babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab\n", "output": "813881762\n"}, {"type": "stdin_stdout", "input": "babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabbaaabaaaaababaaaabaaab\n", "output": "45...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n$N$ persons visited a restaurant...
[{"type": "stdin_stdout", "input": "0 12\n1 -1\n1 4\n0 8\n0 11\n6 19\n7 21", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 12\n0 -1\n1 4\n0 8\n0 11\n6 19\n7 21", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 12\n1 0\n1 14\n0 0\n0 11\n6 19\n7 32", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Darth Vader gets bored, he ...
[{"type": "stdin_stdout", "input": "97 78153\n2 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2\n", "output": "620983468\n"}, {"type": "stdin_stdout", "input": "97 78153\n2 2 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a permutation of 1...
[{"type": "stdin_stdout", "input": "7\n3\n2\n1\n6\n5\n4\n7\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n6\n5\n4\n14", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n11\n5\n4\n7", "output": "No\n"}, {"type": "stdin_stdout", "input": "7\n4\n2\n1\n6\n5\n4\n7", "output": "No\n"}...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice and Bob are playing a fun ...
[{"type": "stdin_stdout", "input": "10\n10 9 10 6 6\n6 1\n7 6\n4 2\n6 10\n5 1\n9 5\n6 8\n3 4\n4 10\n2 1 2 1 1\n2 1\n9 7 4 2 3\n5 1\n2 4\n4 8\n8 6\n8 9\n7 8\n1 8\n1 3\n11 1 11 6 8\n1 10\n6 11\n8 2\n11 3\n1 7\n11 4\n5 8\n11 7\n1 9\n1 8\n5 3 2 1 1\n3 1\n2 1\n4 5\n1 5\n2 1 2 1 1\n2 1\n2 2 1 1 1\n2 1\n2 2 1 1 1\n1 2\n2 2 1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPlease write a function that sum...
[{"input": "[6, 7, 6, 6, 8, 0, 2, 0, 3, 2, 3, 0, 9, 10, 4, 8, 5, 1, 6, 3, 4, 3, 3, 4, 6, 8, 7, 6, 2, 2, 6, 9, 1, 9, 2, 1, 1, 0, 9, 9, 9, 4, 3, 6, 1, 2, 1, 9, 9, 9, 7, 4, 6, 6, 0, 8, 10, 9, 0, 7, 0, 7, 2, 4, 7, 9, 0, 4, 9, 3, 5, 7, 4, 6, 9, 1, 10, 10, 5, 0, 2, 3, 10, 10, 10, 2, 8, 7, 4, 8, 5, 10, 4, 9, 4, 5, 3, 9, 3, 5,...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBizon the Champion is called the...
[{"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 100\n100 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 100\n101 100 100\n100\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "100 100 000\n101 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwo foxes Jiro and Saburo are pl...
[{"type": "stdin_stdout", "input": "WBWBWBWBWB\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "WBWBWBBBWW", "output": "6\n"}, {"type": "stdin_stdout", "input": "WWBBCWBWBV", "output": "7\n"}, {"type": "stdin_stdout", "input": "XWBBCWBWBV", "output": "8\n"}, {"type": "stdin_stdout", "input": "XWVBCWBWCB", "outp...
code_stdio