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\nYou are playing euchre and you w...
[{"input": "[4, 0]\n1\nfalse\n[2, 2, 2, 2, 2]", "output": "[[4, 2]]", "fn_name": "update_score"}, {"input": "[4, 4]\n2\nfalse\n[2, 2, 2, 2, 2]", "output": "[[4, 6]]", "fn_name": "update_score"}, {"input": "[4, 6]\n2\ntrue\n[2, 2, 2, 2, 2]", "output": "[[4, 10]]", "fn_name": "update_score"}, {"input": "[7, 2]\n1\nfalse\...
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 Miss X has only two com...
[{"input": "\"*..*.*\"\n\"*.***\"", "output": "[9]", "fn_name": "combs"}, {"input": "\"*...*\"\n\"*.*\"", "output": "[5]", "fn_name": "combs"}, {"input": "\"*..*\"\n\"*.*\"", "output": "[5]", "fn_name": "combs"}, {"input": "\"*.**\"\n\"*.*\"", "output": "[5]", "fn_name": "combs"}, {"input": "\"*.*\"\n\"*.*\"", "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\nThere are N students and M check...
[{"type": "stdin_stdout", "input": "50 50\n-87868672 9773500\n38180447 36636308\n-93470873 38029088\n49678522 -87311634\n62792334 -82584220\n50941177 2445768\n-21746015 -16856077\n-69539173 -40150977\n-82915111 -60619217\n-42155179 93071641\n-3205477 16657057\n26789545 -1410866\n-32360553 -38239433\n-69707837 59109468\...
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\nAtCoDeer the deer has found two ...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "000 001", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "010 000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "000 000", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "000 100", "output": "Ye...
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 a strategic computer game \"S...
[{"type": "stdin_stdout", "input": "100 100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100...
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\nRecently, Duff has been practici...
[{"type": "stdin_stdout", "input": "100\n196 1681 196 0 61 93 196 196 196 196 196 0 0 96 18 1576 0 93 666463 18 93 1 1278 8939 93 196 196 1278 3 0 67416 869956 10 56489 196 745 39 783 196 8939 196 81 69634 4552 39 3 14 20 25 8 10 4 7302 0 19579 20 1140 15990 7302 0 19579 4142 11 1354 75252 93 311 1278 0 79475 10 75252 ...
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 was an electronic store he...
[{"type": "stdin_stdout", "input": "40\n194 121 110 134 172 142 195 135 186 187 128 161 185 132 117 175 178 131 143 151 170 181 188 140 133 145 119 129 179 149 109 123 124 106 100 199 197 155 141 183\n", "output": "60\n"}, {"type": "stdin_stdout", "input": "40\n194 121 110 134 172 142 195 135 186 187 128 161 185 132 11...
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\nOnce Bob took a paper stripe of ...
[{"type": "stdin_stdout", "input": "100\n3 0 -5 2 -3 -1 -1 0 -2 -5 -4 2 1 2 -2 -1 -1 -4 3 -1 -3 -1 5 0 -4 -4 -1 0 -2 -2 0 1 -1 -2 -1 -5 -4 -2 3 1 -3 0 -1 1 0 -1 2 0 -2 -1 -3 1 -2 2 3 2 -3 -5 2 2 -2 -2 1 2 -2 -1 3 0 -4 7 -2 2 1 4 -9 -1 -2 -1 0 -1 0 -2 -2 -1 1 1 -4 2 -3 -3 7 1 1 -3 -7 0 -2 0 5 -2\n", "output": "5\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\nFor this problem you must create...
[{"input": "1.98528462", "output": "[\"Who ate the last cookie? It was Monica!\"]", "fn_name": "cookie"}, {"input": "false", "output": "[\"Who ate the last cookie? It was the dog!\"]", "fn_name": "cookie"}, {"input": "true", "output": "[\"Who ate the last cookie? It was the dog!\"]", "fn_name": "cookie"}, {"input": "\"...
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\nLet x be an array of integers x ...
[{"type": "stdin_stdout", "input": "5\n1 1 1 1 1\n1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "530612279\n"}, {"type": "stdin_stdout", "input": "10\n10 1 9 3 9 4 10 3 8 5\n10 1 10 14 12 4 10 4 10 7\n", "output": "875000103\n"}, {"type": "stdin_stdout", "input": "10\n10 1 9 3 9 4 10 3 8 5\n10 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\nYou are going out for a walk, wh...
[{"type": "stdin_stdout", "input": "5 2 1\n900000000\n900000000\n1000000000\n1000000000\n1000000000\n", "output": "800000000\n"}, {"type": "stdin_stdout", "input": "5 2 1\n105611412\n1737860309\n1010000000\n1000000101\n1100000000", "output": "969572082\n"}, {"type": "stdin_stdout", "input": "5 3 1\n105611412\n115148729...
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 is an experienced player in...
[{"type": "stdin_stdout", "input": "xx..\n.oo.\nx...\noox.\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "x..x\n..oo\no...\nx.xo\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": ".xox\no.x.\nx.o.\n..o.\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "o.oo\n.x.o\nx.x.\n.x..\n", "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\nSehr Sus is an infinite hexagona...
[{"type": "stdin_stdout", "input": "10\n45996\n1494\n17871\n87082\n59317\n76537\n37514\n56796\n60195\n80410\n", "output": "263\n48\n164\n362\n299\n339\n238\n292\n301\n348\n"}, {"type": "stdin_stdout", "input": "5\n66\n6666\n666666\n66666666\n666666666\n", "output": "10\n100\n1000\n10000\n31623\n"}, {"type": "stdin_stdo...
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 N integers A_1, ..., A_N, ...
[{"type": "stdin_stdout", "input": "31\n4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 3 2 7 9 5 0\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\n4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 4 6 2 6 4 3 3 8 0 2 7 9 5 0", "output": "0\n"}, {"type": "stdin_stdout", "input": "31\n4 1 5 9 2 6 5 3 5 8 9 7 9 3 2 3 8 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\nThere are n workers in a company...
[{"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 0 1 1 1 0\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 0 1 0 1 0\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 0 1 1 0 1 0\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10 10\n3 0 0 0 1 1 1 0 1 0\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\nOnce upon a time, Oolimry saw a ...
[{"type": "stdin_stdout", "input": "73 95\n4 53 37 9 45 54 16 34 12 10 13 24 2 36 33 48 50 43 15 11 47 42 46 30 27 52 67 72 66 19 56 61 69 21 68 1 70 49 64 62 3 51 44 65 29 25 38 28 8 5 39 59 17 6 26 20 63 7 41 23 22 32 40 14 57 60 55 31 35 58 18 0 71\n", "output": "423380456"}, {"type": "stdin_stdout", "input": "73 95...
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 N squares assigned the n...
[{"type": "stdin_stdout", "input": "15\n1 10 145 15 87 138 51 194 1 18 77 20 9 17 93", "output": "8\n"}, {"type": "stdin_stdout", "input": "15\n15 11 46 15 50 98 93 129 31 43 44 11 6 24 14", "output": "3\n"}, {"type": "stdin_stdout", "input": "15\n15 11 46 15 50 98 93 129 41 43 44 11 6 24 14", "output": "3\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\nFirecrackers scare Nian the mons...
[{"type": "stdin_stdout", "input": "3\n-10 4 10\n10 4 10\n0 -7 10\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "3\n-10 4 10\n10 4 10\n0 -7 10\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "3\n-3 -2 3\n-4 -12 3\n-6 -4 9\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "3\n1 -7 10\n-7 9 10\n-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\nDima the hamster enjoys nibbling...
[{"type": "stdin_stdout", "input": "36\n3 41 82 123 174 216 432 864 1080 1228 2149 4298 8596 11052 22104 33156 35919 71838 179595 359190 431028 862056 994680 1315440 1753920 3507840 7015680 10523520 21047040 26500200 53000400 106000800 132501000 176668000 353336000 530004000\n", "output": "Yes\n"}, {"type": "stdin_stdo...
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-----Problem Statement-----\nWri...
[{"type": "stdin_stdout", "input": "1047", "output": "1047\n"}, {"type": "stdin_stdout", "input": "1652", "output": "1652\n"}, {"type": "stdin_stdout", "input": "3133", "output": "3133\n"}, {"type": "stdin_stdout", "input": "1313", "output": "1313\n"}, {"type": "stdin_stdout", "input": "1107", "output": "1107\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\nAs the students are back in host...
[{"type": "stdin_stdout", "input": "2 2200\nvinay 1\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000000\nvinay -1000...
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\nDrazil likes heap very much. So ...
[{"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n7 4 5 1 3 2 1\n", "output": "1\n1 1 1 1 1 1\n4\n1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n7 6 5 1 3 2 1\n", "output": "1\n1 1 1 1 1 1\n4\n1 1 1 1\n"}, {"type": "stdin_stdout", "input": "2\n3 1\n14 6 3 5 4 2 1\n3 2\n9 6 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\nYou have $n$ sticks of the given...
[{"type": "stdin_stdout", "input": "10\n20\n10 14 10 14 10 7 10 10 14 10 7 9 10 8 14 10 10 8 14 15\n12\n7 2 2 2 2 16 16 7 18 17 17 18\n5\n7 13 17 13 7\n6\n10 10 9 9 10 10\n6\n17 19 17 19 14 14\n10\n10 13 5 18 13 13 13 10 18 5\n11\n3 4 16 4 4 3 4 13 4 16 13\n7\n17 19 1 17 17 1 19\n5\n17 17 19 17 19\n9\n13 15 13 18 13 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\nInitially Ildar has an empty arr...
[{"type": "stdin_stdout", "input": "3\n0 1 1000000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n1 0 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n1 0 0000000000\n", "output": "1\n"}, {"type": "stdin_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\nGiven are a positive integer N a...
[{"type": "stdin_stdout", "input": "100\ntttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "100\nyyxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\n", "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\nIn this task you need to process...
[{"type": "stdin_stdout", "input": "3 3\nB 16671 5044\nS 23924 4895\nS 76276 1905\n", "output": "S 76276 1905\nS 23924 4895\nB 16671 5044\n"}, {"type": "stdin_stdout", "input": "3 3\nB 16671 5006\nS 23924 4895\nS 76276 1905\n", "output": "S 76276 1905\nS 23924 4895\nB 16671 5006\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\nProblem C Medical Checkup\n\nStu...
[{"type": "stdin_stdout", "input": "3 102\n1\n3\n0", "output": "103\n34\n34\n"}, {"type": "stdin_stdout", "input": "3 35\n1\n3\n3", "output": "36\n12\n11\n"}, {"type": "stdin_stdout", "input": "3 55\n1\n3\n4", "output": "56\n19\n13\n"}, {"type": "stdin_stdout", "input": "3 55\n1\n3\n0", "output": "56\n19\n19\n"}, {"typ...
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 found a piece of paper...
[{"type": "stdin_stdout", "input": "48\n4 7 12 16 23 43 61 112 134 141 243 267 484 890 1427 1558 1653 2263 2889 3313 3730 5991 10176 18243 18685 36555 40006 62099 70557 106602 122641 125854 213236 309698 379653 713328 999577 1021356 2007207 2886237 4994645 5812125 11576387 14215887 26060277 35989707 36964781 57933366\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\nGenerate and return **all** poss...
[{"input": "1000\n4000", "output": "[[[1013, 1193, 1373, 1553, 1733, 1913], [1039, 1249, 1459, 1669, 1879, 2089], [1039, 1609, 2179, 2749, 3319, 3889], [1091, 1301, 1511, 1721, 1931, 2141], [1201, 1471, 1741, 2011, 2281, 2551], [1289, 1709, 2129, 2549, 2969, 3389], [1301, 1511, 1721, 1931, 2141, 2351], [1307, 1487, 166...
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В самолёте есть n рядов мест. Ес...
[{"type": "stdin_stdout", "input": "30 1\nPPP-PPP.-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP\nPPP-PPPP-PPP...
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 Petya went to school, he go...
[{"type": "stdin_stdout", "input": "2147483647\n2147483647\n", "output": "YES\n0\n"}, {"type": "stdin_stdout", "input": "2147483646\n2147483647\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1094841453\n1656354409\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2147483647\n2147483646\n", "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\nVasya is studying in the last cl...
[{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1001000000000000000 1000000000000000000 1000000000...
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\nKa ka ka cyph...
[{"input": "\"Incomprehensibilities\"", "output": "[\"kaIkancokamprekahekansikabikalikatiekas\"]", "fn_name": "ka_co_ka_de_ka_me"}, {"input": "\"maintenance\"", "output": "[\"kamaikantekanakance\"]", "fn_name": "ka_co_ka_de_ka_me"}, {"input": "\"Woodie\"", "output": "[\"kaWookadie\"]", "fn_name": "ka_co_ka_de_ka_me"}, ...
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\nThis function should test if the...
[{"input": "24617\n3", "output": "[false]", "fn_name": "check_for_factor"}, {"input": "24612\n3", "output": "[true]", "fn_name": "check_for_factor"}, {"input": "2453\n5", "output": "[false]", "fn_name": "check_for_factor"}, {"input": "2450\n5", "output": "[true]", "fn_name": "check_for_factor"}, {"input": "653\n7", "ou...
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\nShaass has decided to hunt some ...
[{"type": "stdin_stdout", "input": "100\n54 15 25 18 64 62 23 59 70 137 50 26 87 35 75 86 0 22 6 60 70 41 21 9 75 50 25 3 69 14 39 68 64 46 59 99 2 0 21 76 90 12 61 42 12 91 36 39 47 41 93 81 66 57 70 36 68 89 52 1 19 93 67 22 76 20 8 81 123 18 100 73 61 93 75 80 53 72 40 20 2 86 33 70 27 16 11 26 55 44 47 55 94 58 2 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\nAn atom of element X can exist i...
[{"type": "stdin_stdout", "input": "50 64\n257 258 350 375 1014 1017 1051 1097 1169 1177 1223 1836 1942 1983 2111 2131 2341 2418 2593 2902 2948 3157 3243 3523 3566 4079 4499 4754 5060 5624 6279 6976 7011 7071 7278 7366 7408 7466 7526 7837 7934 8532 8577 8680 9221 9271 9327 9411 9590 9794\n", "output": "0.91891891891891...
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 are strings S and T. Consi...
[{"type": "stdin_stdout", "input": "sjpvbzildfxlaukqtfznjjyryrdawsycubdpieejlzsexyhuajiqqigetwdyjeignkuuedzguvqhyrubpdfsenayqahbaqnyhavlaptlqtrotfzvbqbtpkuddnopjzoteuubxgkthzdyepesqgozkdvkcakraxeulhhqtnpolbtcsgxgskjjzdimcyhclnnwfbxwmznpvjaqjqqogwgwmzzpcvhywpcocmsxxmgsodckxvipzobspvwjezxugjlivdhefgdfkzzidktxjcnayjubmsqm...
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 side length `n`, traveli...
[{"input": "165", "output": "[95995892383488599901870820732368671856306475542669347911637204757217297906428740013991568571288240]", "fn_name": "routes"}, {"input": "156", "output": "[376594020312425061595746241557406711201605603899894320577733841460621358204120168599683135056]", "fn_name": "routes"}, {"input": "126", "...
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 two rectangles on ...
[{"type": "stdin_stdout", "input": "988480 1151420 106\n", "output": "981327901099.81217265129089355"}, {"type": "stdin_stdout", "input": "1503946 527535 69\n", "output": "298092342476.75622430443763733"}, {"type": "stdin_stdout", "input": "988480 819219 106\n", "output": "684860009476.82913672924041748"}, {"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\nLet's assume that \n\n * v(n) i...
[{"type": "stdin_stdout", "input": "6\n999\n1095\n821\n635\n63\n480\n", "output": "1003961/2011946\n1196833/2398042\n674039/1351366\n403199/808942\n3959/8174\n232303/466546\n"}, {"type": "stdin_stdout", "input": "6\n999\n588\n821\n635\n63\n480\n", "output": "1003961/2011946\n346909/696182\n674039/1351366\n403199/808942...
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\nCaracal is fighting with a monst...
[{"type": "stdin_stdout", "input": "1000000000000\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "999999999999\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "549755813888\n", "output": "1099511627775\n"}, {"type": "stdin_stdout", "input": "707813884927\n", "output": "109951162...
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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n-3 3 -2 -2\n2 2 126 3", "output": "6\n-609\n"}, {"type": "stdin_stdout", "input": "2\n-3 3 -2 -2\n2 2 126 0", "output": "6\n-621\n"}, {"type": "stdin_stdout", "input": "2\n-1 6 -2 -2\n2 2 92 -1", "output": "8\n-461\n"}, {"type": "stdin_stdout", "input": "2\n-2 6 -2 -2\n2 2 92 -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\nAlice and Borys are playing tenn...
[{"type": "stdin_stdout", "input": "2\n134843 8\n2 6957\n", "output": "18\n67417 67418 67419 67420 67421 67422 67423 67424 67425 67426 67427 67428 67429 67430 67431 67432 67433 67434\n6\n3477 3478 3479 3480 3481 3482\n"}, {"type": "stdin_stdout", "input": "2\n35737 8\n0 960\n", "output": "18\n17864 17865 17866 17867 17...
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\nPolycarpus has a ribbon, its len...
[{"type": "stdin_stdout", "input": "3043 317 1141 2438\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "3399 2035 2 3334\n", "output": "683\n"}, {"type": "stdin_stdout", "input": "4000 500 1000 2000\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "4000 500 1000 1671\n", "output": "8\n"}, {"type": "stdin...
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 are $n$ bags with candies,...
[{"type": "stdin_stdout", "input": "100\n100\n2\n3\n4\n5\n6\n7\n8\n9\n15\n14\n12\n13\n14\n15\n16\n17\n6\n19\n17\n21\n32\n23\n24\n6\n26\n27\n28\n29\n0\n31\n32\n52\n34\n35\n72\n37\n38\n11\n5\n20\n35\n43\n44\n15\n46\n47\n26\n49\n50\n51\n54\n53\n54\n55\n72\n73\n69\n103\n60\n61\n62\n49\n58\n6\n40\n67\n121\n69\n48\n71\n127\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 function xMasTree(heigh...
[{"input": "7", "output": "[[\"______#______\", \"_____###_____\", \"____#####____\", \"___#######___\", \"__#########__\", \"_###########_\", \"#############\", \"______#______\", \"______#______\"]]", "fn_name": "xMasTree"}, {"input": "6", "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\nIn the year of 30XX participants...
[{"type": "stdin_stdout", "input": "10 10 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n1 1 9 1\n7 1 4 1\n10 1 7 1\n2 1 7 1\n3 1 2 1\n5 1 2 1\n10 1 5 1\n6 1 9 1\n", "output": "3\n4\n4\n3\n3\n4\n3\n3\n4\n3\n"}, {"type": "stdin_stdout", "input": "10 18 1 8 4\n10\n2 3 4 5 6 7 8 9\n10\n1 1 3 1\n2 1 7 1\n1 1 9 1\n7 1 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\nproblem\n\nChairman K is a regul...
[{"type": "stdin_stdout", "input": "3\n16 2\n358\n87\n1601\n010", "output": "108\n"}, {"type": "stdin_stdout", "input": "3\n16 2\n696\n77\n1150\n010", "output": "102\n"}, {"type": "stdin_stdout", "input": "3\n12 2\n200\n87\n1514\n010", "output": "122\n"}, {"type": "stdin_stdout", "input": "3\n12 2\n491\n77\n1150\n010",...
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 an array $a_1, a_2, \\d...
[{"type": "stdin_stdout", "input": "57\n241 444 553 126 612 550 441 420 742 879 520 664 590 198 910 731 308 740 791 680 904 629 324 606 621 75 350 253 57 164 440 970 876 648 581 258 989 851 186 117 700 537 837 284 654 130 728 955 859 988 820 345 901 294 244 125 512\n", "output": "48"}, {"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\nA: Isono, let's do that! --Senda...
[{"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nkougekida\ntameru", "output": "Nakajima-kun\n"}, {"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nadikeguok\ntameru", "output": "Hikiwake-kun\n"}, {"type": "stdin_stdout", "input": "3\ntameru\ntameru\nuremat\ntameru\nadikeguok\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\nPolycarp is going to participate...
[{"type": "stdin_stdout", "input": "10:00\n11:00\n", "output": "10:30\n"}, {"type": "stdin_stdout", "input": "11:10\n11:12\n", "output": "11:11\n"}, {"type": "stdin_stdout", "input": "01:02\n03:02\n", "output": "02:02\n"}, {"type": "stdin_stdout", "input": "00:00\n23:58\n", "output": "11:59\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\nThere are n problems prepared fo...
[{"type": "stdin_stdout", "input": "100000 10\n99562 484\n1099 99684\n593 99867\n99529 175\n99738 616\n99523 766\n99503 121\n99784 158\n199 99199\n15 99849\n", "output": "98100\n"}, {"type": "stdin_stdout", "input": "100000 10\n99562 484\n1099 99684\n593 99867\n99529 175\n99738 616\n99523 766\n42925 121\n99784 158\n199...
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\nRecently a serious bug has been ...
[{"type": "stdin_stdout", "input": "10 3\n6 3\n6 10\n2 5\n5 7\n6 2\n9 2\n8 1\n10 5\n5 10\n7 6\n", "output": "34\n"}, {"type": "stdin_stdout", "input": "10 2\n10 2\n9 3\n9 4\n7 2\n4 6\n10 1\n9 2\n3 10\n7 1\n5 1\n", "output": "43\n"}, {"type": "stdin_stdout", "input": "10 3\n6 3\n6 10\n2 5\n5 7\n6 2\n9 2\n8 1\n10 5\n5 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\nTakahashi has N days of summer v...
[{"type": "stdin_stdout", "input": "1000000 10000\n10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000 10000...
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— This is not playing but duty a...
[{"type": "stdin_stdout", "input": "5000 5000 5000\n", "output": "986778560\n"}, {"type": "stdin_stdout", "input": "1171 2989 2853\n", "output": "234725427\n"}, {"type": "stdin_stdout", "input": "3238 2923 4661\n", "output": "636587126\n"}, {"type": "stdin_stdout", "input": "4539 2805 2702\n", "output": "356944655\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\nStepan likes to repeat vowel let...
[{"type": "stdin_stdout", "input": "200\nmmffggzvuuzzlkafduueqocuybiiaaeeoiioouaaurccuqoouuooooooyjjtyyxxiipnoeufyuuoyxxhhkaaeoooxapauuoppzabuuoiiuuggcciissuugejjiirruummsiifaauyypauwoofiemzaeeeeeeiioozzttyyidaaaiggizzerkooooeeepueeauupathhb\n", "output": "mmffggzvuzzlkafdueqocuybiaeeoioouaurccuqoouoyjjtyxxipnoeufyuoyx...
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\n500-yen Saving\n\n\"500-yen Savi...
[{"type": "stdin_stdout", "input": "4\n800\n700\n1600\n600\n4\n300\n1205\n1600\n30\n4\n300\n700\n1600\n650\n3\n1001\n2000\n638\n3\n250\n250\n1000\n4\n1251\n1466\n698\n299\n0", "output": "2 2900\n4 3135\n3 3250\n2 1639\n3 1500\n4 3714\n"}, {"type": "stdin_stdout", "input": "4\n800\n700\n1600\n600\n4\n300\n1205\n1600\n30...
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\nHolidays have finished. Thanks t...
[{"type": "stdin_stdout", "input": "12 1000000000\n", "output": "479001600\n"}, {"type": "stdin_stdout", "input": "1000000000 12\n", "output": "479001600\n"}, {"type": "stdin_stdout", "input": "1000000000 12\n", "output": "479001600\n"}, {"type": "stdin_stdout", "input": "12 1000000000\n", "output": "479001600\n"}, {"t...
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 an infinite board of sq...
[{"type": "stdin_stdout", "input": "99999999999973 99999999999971\n", "output": "199999999999948\n"}, {"type": "stdin_stdout", "input": "99999999999962 99999999999973\n", "output": "133333333333296\n"}, {"type": "stdin_stdout", "input": "99999999999973 99999999999930\n", "output": "399999999999808\n"}, {"type": "stdin_...
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\nCQXYM is counting permutations l...
[{"type": "stdin_stdout", "input": "20\n597\n2791\n71\n1\n6\n14\n196\n1\n4335\n14\n5133\n6\n17\n3620\n5111\n1\n119\n992\n76848\n127\n", "output": "924058387\n309126958\n25034588\n1\n239500800\n517878947\n323758520\n1\n41675960\n517878947\n479930293\n239500800\n971636156\n715097853\n974503605\n1\n796779807\n613317322\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\nWrite a function that takes a si...
[{"input": "[[1, 23, 456, 78910], [\"abcdef\", \"ghijklmno\", \"pqrstuvwxy\"], [[1, 23, 456, 78910, [\"abcdef\", \"ghijklmno\", \"pqrstuvwxy\"]], 1234]]", "output": "[\"Decreasing\"]", "fn_name": "order_type"}, {"input": "[[\"ab\", \"cdef\", \"g\"], [\"hi\", \"jk\", \"lmnopq\"], [\"rst\", \"uv\", \"wx\"], [\"yz\"]]", "...
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 a mayor of Berlyatov. Th...
[{"type": "stdin_stdout", "input": "5 5 4\n1 2 5\n4 3 4\n1 4 3\n4 3 10\n3 5 2\n1 5\n1 3\n3 3\n1 5\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "5 5 4\n1 2 5\n4 3 4\n1 4 3\n4 3 10\n3 5 2\n1 2\n1 3\n3 3\n1 5\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "5 5 4\n1 2 5\n2 3 4\n1 4 3\n4 3 7\n3 5 2\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\nSuppose $a_1, a_2, \\dots, a_n$ ...
[{"type": "stdin_stdout", "input": "10\n2 1\n1000000000\n3 2\n-100000000 -150000003\n3 2\n-100000000 -150000004\n3 2\n-100000000 -150000001\n3 2\n-100000000 -150000002\n3 2\n-100000000 -150000000\n3 2\n-100000000 -149999999\n3 2\n-100000000 -149999999\n3 2\n-100000000 -149999998\n3 2\n-100000000 -149999997\n", "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 number is called almost prime ...
[{"type": "stdin_stdout", "input": "2998\n", "output": "1375\n"}, {"type": "stdin_stdout", "input": "2999\n", "output": "1375\n"}, {"type": "stdin_stdout", "input": "2997\n", "output": "1374\n"}, {"type": "stdin_stdout", "input": "3000\n", "output": "1375\n"}, {"type": "stdin_stdout", "input": "2990\n", "output": "1370...
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 had a strictly increasing ...
[{"type": "stdin_stdout", "input": "100\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n6\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\n18\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\n#Permutation position\nIn this ...
[{"input": "\"foo\"", "output": "[3759]", "fn_name": "permutation_position"}, {"input": "\"aaab\"", "output": "[2]", "fn_name": "permutation_position"}, {"input": "\"aaa\"", "output": "[1]", "fn_name": "permutation_position"}, {"input": "\"z\"", "output": "[26]", "fn_name": "permutation_position"}, {"input": "\"a\"", "...
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\nDNA is a biomolecule that carrie...
[{"input": "\"TGCTACGTACGATCGACGATCCACGAC\"\n\"GTCGTGGATCGTCGATCGTACGTAGCA\"", "output": "[true]", "fn_name": "check_DNA"}, {"input": "\"CGACATCGAGGGGGCTCAGAAGTACTGA\"\n\"CATGGCGTCAGTACTTCTGAGCC\"", "output": "[false]", "fn_name": "check_DNA"}, {"input": "\"ATGCCTACGGCCATATATATTTAG\"\n\"CTAAATATGTATGGCCGTAGGCAT\"", "ou...
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 little sister came back home ...
[{"input": "7654322", "output": "[[1, 4, 11, 69, 3912, 7654321]]", "fn_name": "decompose"}, {"input": "7654321", "output": "[[6, 10, 69, 3912, 7654320]]", "fn_name": "decompose"}, {"input": "123456", "output": "[[1, 2, 7, 29, 496, 123455]]", "fn_name": "decompose"}, {"input": "1234567", "output": "[[2, 8, 32, 1571, 123...
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 Smart Beaver from ABBYY deci...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "1998535156\n"}, {"type": "stdin_stdout", "input": "1000001000\n", "output": "1906011808\n"}, {"type": "stdin_stdout", "input": "1549355491\n", "output": "1559780582\n"}, {"type": "stdin_stdout", "input": "1292236879\n", "output": "1292236880\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\nLet's assume that we are given a...
[{"type": "stdin_stdout", "input": "8 20\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 1 1 0\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 1 1\n1 0 1 0 1 0 0 0 0 1 0 1 0 1 1 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 are given undirected weighte...
[{"type": "stdin_stdout", "input": "15 32\n15 9 8860\n12 4 9045\n12 12 8221\n9 6 8306\n11 14 9052\n13 14 8176\n14 5 8857\n6 8 8835\n3 9 8382\n10 14 8212\n13 13 9061\n2 14 8765\n4 13 9143\n13 13 8276\n13 11 8723\n7 10 8775\n8 15 8965\n15 5 8800\n4 5 9317\n5 13 9178\n1 7 9031\n4 10 9114\n10 4 8628\n9 1 8584\n5 7 8701\n6 ...
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 came...
[{"type": "stdin_stdout", "input": "2000\nJAPAN FEBRUARY MONEY SUPPLY RISES 8.8 PCT\nTOKYO, March 17 - Japan's broadly defined money supply\naverage of M-2 plus certificate of deposits (CDs) rose a\npreliminary 8.8 pct in February from a year earlier, compared\nwith an 8.6 pct rise ni January, the Bank of Japan said.\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 describeList whic...
[{"input": "[\"one\", \"two\"]", "output": "[\"longer\"]", "fn_name": "describeList"}, {"input": "[1, 2, 5, 4]", "output": "[\"longer\"]", "fn_name": "describeList"}, {"input": "[[1, 2]]", "output": "[\"singleton\"]", "fn_name": "describeList"}, {"input": "[\"one\"]", "output": "[\"singleton\"]", "fn_name": "describeLi...
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\nGiven a string of words and numb...
[{"input": "\"Fred has 110 bananas and loses 50\"", "output": "[60]", "fn_name": "calculate"}, {"input": "\"Panda has 48 apples and loses 4\"", "output": "[44]", "fn_name": "calculate"}, {"input": "\"Jerry has 34 apples and gains 6\"", "output": "[40]", "fn_name": "calculate"}, {"input": "\"Tom has 20 apples and gains ...
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\nIvan plays an old action game ca...
[{"type": "stdin_stdout", "input": "2\n3 2\n1 3 5\n4 1\n5 2 3 5\n", "output": "2\n2\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n1 3 5\n4 1\n5 4 3 5\n", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n1 1 5\n4 1\n5 4 3 5\n", "output": "1\n3\n"}, {"type": "stdin_stdout", "input": "2\n3 2\n0 1 5\n4 1\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\nThere is an integer sequence A o...
[{"type": "stdin_stdout", "input": "100\n100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000...
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\nAt the big break Nastya came to ...
[{"type": "stdin_stdout", "input": "20 47\n4 6 11 15 9 17 3 1 19 14 12 8 2 5 7 20 16 18 13 10\n18 10\n6 3\n15 17\n18 7\n4 5\n19 10\n6 7\n11 3\n1 10\n17 3\n6 14\n7 10\n19 5\n12 10\n1 8\n6 11\n18 5\n6 8\n12 12\n1 5\n20 11\n16 8\n3 10\n20 19\n17 8\n19 10\n2 5\n19 8\n6 9\n16 3\n16 10\n19 7\n17 16\n10 13\n8 9\n12 5\n17 10\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\nTakahashi participated in a cont...
[{"type": "stdin_stdout", "input": "100000 3\n7777 AC\n7777 AC\n7777 AC\n", "output": "1 0\n"}, {"type": "stdin_stdout", "input": "100000 3\n12676 AC\n7777 AC\n7777 CA", "output": "2 0\n"}, {"type": "stdin_stdout", "input": "100000 3\n7777 AC\n7777 AC\n7777 CA", "output": "1 0\n"}, {"type": "stdin_stdout", "input": "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\nA series or sequence of numbers ...
[{"input": "[3, 5, 8, 9, 14, 23]", "output": "[1]", "fn_name": "sequence_classifier"}, {"input": "[3, 5, 8, 8, 14, 14]", "output": "[2]", "fn_name": "sequence_classifier"}, {"input": "[14, 14, 8, 8, 5, 3]", "output": "[4]", "fn_name": "sequence_classifier"}, {"input": "[3, 5, 8, 1, 14, 3]", "output": "[0]", "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\nLet S(n) denote the sum of the d...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "873041724\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "689670774\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5064791...
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\nGrandma Laura came to the market...
[{"type": "stdin_stdout", "input": "40 562\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalf\nhalf\nhalf\nhalfplus\nhalf\nhalf\nhalfplus\nhalf\nhalfplus\nhalf\nhalfplus\nhalf\nhalfplus\nhalf\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalfplus\nhalf\nhalf\nhalfplus\nhalf\nhalfplus\nhalf...
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\nLet's say you are standing on th...
[{"type": "stdin_stdout", "input": "3\n2\n13 100\n3\n4 3 1\n5\n13 4 1 1 5\n", "output": "226\n15\n25\n"}, {"type": "stdin_stdout", "input": "3\n2\n13 100\n3\n2 3 0\n5\n4 3 2 1 5\n", "output": "226\n11\n19\n"}, {"type": "stdin_stdout", "input": "3\n2\n13 100\n3\n2 3 0\n5\n4 3 1 1 5\n", "output": "226\n11\n15\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\nMr. F has n positive integers, a...
[{"type": "stdin_stdout", "input": "100\n95 94 31 65 35 95 70 78 81 36 69 97 39 28 89 62 36 23 35 21 36 11 65 39 13 34 79 87 91 70 43 82 24 97 6 87 49 81 60 92 63 9 16 6 31 90 6 5 70 48 27 86 65 66 45 8 67 17 24 44 34 93 26 32 82 54 72 83 94 81 79 79 9 9 4 59 42 83 80 67 28 62 56 58 87 67 34 3 61 14 62 19 94 31 74 97 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\nYou've got a rectangular paralle...
[{"type": "stdin_stdout", "input": "10000 10000 10000\n", "output": "1200"}, {"type": "stdin_stdout", "input": "10000 1 10000\n", "output": "40008"}, {"type": "stdin_stdout", "input": "9801 9801 9801\n", "output": "1188"}, {"type": "stdin_stdout", "input": "1 10000 10000\n", "output": "40008"}, {"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\nAlice and Bob are playing a game...
[{"type": "stdin_stdout", "input": "50 75\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "50 75\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\nShe loves e-mail so much! She se...
[{"type": "stdin_stdout", "input": "666660666\n134424306396481246895756\n12784174432754272468162", "output": "No\n'dhagdmdwmgt'agmtwjpjm\n'aptg'phdapjgapagmt'ma\n"}, {"type": "stdin_stdout", "input": "666660666\n113124756735251440964347\n33891614279093528467517", "output": "No\n,d'agpjmpdjaj'hwmgdgp\netw'm'gapwwdjatgmp...
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\nCharacter recognition software i...
[{"input": "\"J. K. R0WL1NG - HARRY P0TTER AND THE PH1L050PHER'5 5T0NE\"", "output": "[\"J. K. ROWLING - HARRY POTTER AND THE PHILOSOPHER'S STONE\"]", "fn_name": "correct"}, {"input": "\"J. K. R0WL1NG - HARRY P0TTER AND THE PR150NER 0F Azkaban\"", "output": "[\"J. K. ROWLING - HARRY POTTER AND THE PRISONER OF Azkaban\"...
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\nYour job is to write a function ...
[{"input": "\"foobar00999\"", "output": "[\"foobar01000\"]", "fn_name": "increment_string"}, {"input": "\"foobar999\"", "output": "[\"foobar1000\"]", "fn_name": "increment_string"}, {"input": "\"foobar001\"", "output": "[\"foobar002\"]", "fn_name": "increment_string"}, {"input": "\"foobar000\"", "output": "[\"foobar001...
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\nAlice and Bob begin their day wi...
[{"type": "stdin_stdout", "input": "1000000\n", "output": "998677\n"}, {"type": "stdin_stdout", "input": "959806\n", "output": "239958\n"}, {"type": "stdin_stdout", "input": "166320\n", "output": "110879\n"}, {"type": "stdin_stdout", "input": "221760\n", "output": "110880\n"}, {"type": "stdin_stdout", "input": "277200\...
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\nPetya loves lucky numbers very m...
[{"type": "stdin_stdout", "input": "86451 754 85 84\n", "output": "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...
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\nWhat joy! Petya's parents went o...
[{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100\n100 100 100 100 110 100 100 100 100 100 100 100\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100\n100 100 100 100 110 100 100 100 100 100 101 100\n", "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\nValerian was captured by Shapur....
[{"type": "stdin_stdout", "input": "15\n12 1 52\n6 2 10\n4 1 55\n11 7 20\n10 3 54\n13 9 44\n15 2 6\n14 5 55\n9 3 32\n2 1 32\n8 4 14\n6 5 24\n5 3 74\n7 6 157\n", "output": "1039\n"}, {"type": "stdin_stdout", "input": "15\n12 1 52\n3 2 10\n4 1 45\n11 7 20\n10 3 54\n13 9 44\n15 2 6\n14 5 55\n9 3 32\n2 1 32\n8 4 14\n6 5 24...
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 cricket team consists of 11 pl...
[{"type": "stdin_stdout", "input": "2\n1 2 3 4 5 11 14 11 11 6 11\n3\n0 5 1 2 4 1 4 5 1 2 1\n11", "output": "6\n1\n"}, {"type": "stdin_stdout", "input": "2\n2 1 3 4 5 11 14 11 12 6 12\n3\n0 5 1 2 4 1 4 5 1 2 1\n11", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "2\n2 1 3 4 5 11 14 11 9 6 11\n3\n-1 5 1 2 4 1 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\nAlice and Bob are playing a game...
[{"type": "stdin_stdout", "input": "50 75\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "50 75\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\nВася купил стол, у которого n но...
[{"type": "stdin_stdout", "input": "100\n8 7 7 5 2 7 7 5 1 8 6 3 6 7 2 4 4 2 6 8 5 6 5 2 6 1 3 9 5 8 7 6 5 4 8 6 5 5 3 2 6 5 4 9 7 1 5 7 9 5 7 4 1 6 5 8 2 6 6 1 4 2 3 2 3 9 3 8 7 1 2 4 5 7 3 5 5 6 3 8 3 6 1 5 5 3 3 3 8 8 1 4 3 6 7 1 1 2 4 4 7 3 7 7 8 9 5 8 6 6 4 7 4 9 3 4 7 5 2 8 4 1 9 7 9 7 9 6 7 7 9 6 1 1 1 9 9 4 4 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\nSoroush and Keshi each have a la...
[{"type": "stdin_stdout", "input": "4\n4\n1 2 3\n1 2 3\n5\n1 2 3 4\n1 1 1 1\n6\n1 1 1 1 2\n1 2 1 2 2\n7\n1 1 3 4 4 5\n1 2 1 4 2 5\n", "output": "\n1\n4\n1\n3\n"}, {"type": "stdin_stdout", "input": "4\n4\n1 2 3\n1 2 3\n5\n1 2 3 4\n1 1 1 1\n6\n1 2 1 1 2\n1 2 1 2 2\n7\n1 1 3 4 4 5\n1 2 1 4 2 5\n", "output": "1\n4\n1\n3\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\nPeople do many crazy things to s...
[{"type": "stdin_stdout", "input": "133 51\n", "output": "1613157\n1 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 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 66...
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 bracket sequence is a string c...
[{"type": "stdin_stdout", "input": "50\n0\n2\n3\n0\n5\n6\n7\n8\n14\n10\n11\n1\n13\n31\n15\n22\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n54\n13\n29\n30\n31\n32\n39\n60\n9\n37\n37\n38\n39\n40\n1\n42\n43\n44\n45\n46\n22\n48\n60\n50\n", "output": "()()\n(())\n()()()\n(())()\n((()))\n()()()()()\n(())()()()\n((()))()()\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\nMonocarp has drawn a tree (an un...
[{"type": "stdin_stdout", "input": "15\n10 15\n12 15\n6 15\n8 15\n2 15\n3 15\n10 15\n13 15\n5 15\n7 15\n11 15\n4 14\n1 15\n14 15\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "15\n10 15\n12 15\n6 15\n8 15\n2 15\n3 15\n10 15\n13 15\n5 15\n7 15\n11 15\n4 14\n1 15\n14 15\n", "output": "NO\n"}, {"type": "stdin_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\nCrazy Town is a plane on which t...
[{"type": "stdin_stdout", "input": "841746 527518\n595261 331297\n10\n-946901 129987 670374\n-140388 -684770 309555\n-302589 415564 -387435\n-565799 -72069 -395358\n-523453 -511446 854898\n-846967 -749453 -341866\n-622388 434663 264157\n-638453 625357 344195\n-255265 -676356 -772398\n-824723 -319141 33585\n", "output":...
code_stdio