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\nHeading ##There are two integers...
[{"type": "stdin_stdout", "input": "124\n1476395008 1493172223\n1275068416 1291845631\n4009754624 4026531839\n2516582400 2533359615\n50331648 67108863\n2566914048 2583691263\n2952790016 2969567231\n3892314112 3909091327\n3489660928 3506438143\n33554432 50331647\n1694498816 1711276031\n3623878656 3640655871\n1308622848 ...
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\nJ: City\n\nSanta decides to deli...
[{"type": "stdin_stdout", "input": "2 -2 11 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "0 -1 12 1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-1 2 0 14", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "0 -1 1 11", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "1 -2 11 0", "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\nVasya plays the LionAge II. He w...
[{"type": "stdin_stdout", "input": "emrvvhupytoxzhqxmuop 1\n49\ng g -558\nd g 845\nd k -745\nb g -773\nf f -733\nb s -491\na s -894\ng d -565\ns k -756\nb a 373\nb d 398\nk f 250\na b 531\nf g -27\nf b 125\na g -555\ns f 540\ng b 194\nk s -636\ns b -955\nd a -520\ng f -97\nf s -204\ns a 171\nb k -304\ns g -160\na a -56...
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\nFind the smallest possible sum o...
[{"type": "stdin_stdout", "input": "79992\n", "output": "36\n"}, {"type": "stdin_stdout", "input": "10989", "output": "27\n"}, {"type": "stdin_stdout", "input": "37450", "output": "3\n"}, {"type": "stdin_stdout", "input": "70620", "output": "6\n"}, {"type": "stdin_stdout", "input": "11849", "output": "5\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\nThere are N positive integers wr...
[{"type": "stdin_stdout", "input": "6\n382253568 723152896 37802240 379425024 404894720 471526144\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "6\n348324507 1154626501 32183854 379425024 590201381 471526144", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n586050932 1154626501 32183854 379425024 5902...
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 integers b_1, b_2, ....
[{"type": "stdin_stdout", "input": "10\n-38980 0001000000 -1000000000 1000000000 -1000000000 1000010010 -1000000000 1010000010 -1556535198 1000000000\n", "output": "961020 -999000000 0 0 10010 10010 10000010 -546535188 -556535198 1000000000\n"}, {"type": "stdin_stdout", "input": "10\n-38980 0001000000 -1000000000 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\nLet's call (yet again) a string ...
[{"type": "stdin_stdout", "input": "100\nababbaaabaaabaabbabbaaabbabaaabbbabbbbbbbbababbbbbabbaaaabbbabbaababaabaababbbabababbbababbbbaabbbba\n", "output": "34\nababbaabababbabaabbabaabbababababaabbabaabababababbabababababaabba\n"}, {"type": "stdin_stdout", "input": "100\nabbbbaabbbbababbbabababbbabaabaababaabbabbbaaaa...
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 directed graph $...
[{"type": "stdin_stdout", "input": "1\n\n000110 0\n", "output": "1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n"}, {"type": "stdin_stdout", "inpu...
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 Collatz Conjecture states th...
[{"input": "73567465519280238573", "output": "[362]", "fn_name": "collatz"}, {"input": "1000000000000000", "output": "[276]", "fn_name": "collatz"}, {"input": "1000000000", "output": "[101]", "fn_name": "collatz"}, {"input": "500", "output": "[111]", "fn_name": "collatz"}, {"input": "100", "output": "[26]", "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\nHow many ways are there to place...
[{"type": "stdin_stdout", "input": "3\n29 5\n2 2\n16 7", "output": "20112\n12\n11796\n"}, {"type": "stdin_stdout", "input": "3\n16 3\n4 3\n12 4", "output": "2084\n104\n2048\n"}, {"type": "stdin_stdout", "input": "3\n29 3\n2 2\n16 7", "output": "7154\n12\n11796\n"}, {"type": "stdin_stdout", "input": "3\n16 2\n4 3\n12 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\nAfter learning a lot about space...
[{"type": "stdin_stdout", "input": "20\niw\nix\nudb\nbg\noi\nuo\njsm\num\ns\nquy\nqo\nbxct\nng\nrmr\nnu\nps\nio\nkh\nw\nk\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "20\niw\nix\nudb\nbg\noi\nuo\njsm\nmu\ns\nquy\nqo\nbxct\nng\nrmr\nnu\nps\nio\nkh\nw\nk\n", "output": "5\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\nGiven a String(only lower case l...
[{"type": "stdin_stdout", "input": "100\nhqghumeaylnlfdxfircvscxggbwkfnqduxwfnfozvs\ntkjprepggxrpnrvystmwcysyycqpevikeffmznimkkasvwsrenzkycxfxtlsgypsfadpooefxzbcoejuvpvaboygpoeylfpbnpljvrvipyamyehwqnqrqpmxujjloovaowuxwhmsncbxcoksfzkvatxdknlyjyhfixjswnkkufnuxxzrzbmnmgqooketlyhnkoaugzqrcddiuteiojwayyzpvscmpsajlfvgubfaaov...
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 fish, numbered from 1 to n, li...
[{"type": "stdin_stdout", "input": "8\n0.000 0.147 0.783 0.224 0.220 0.651 0.453 0.209\n0.853 0.000 0.246 0.076 0.018 0.349 0.896 0.315\n0.217 0.754 0.000 0.307 0.968 0.400 0.531 0.086\n0.776 0.924 0.693 0.000 0.707 0.842 0.116 0.949\n0.780 0.982 0.032 0.293 0.000 0.908 0.307 0.266\n0.349 0.651 0.600 0.158 0.092 0.000 ...
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 binary string $s...
[{"type": "stdin_stdout", "input": "4\n4\n0011\n6\n111111\n5\n10101\n8\n01010000\n", "output": "2\n1 2 2 1 \n6\n1 2 3 4 5 6 \n1\n1 1 1 1 1 \n4\n1 1 1 1 1 2 3 4 \n"}, {"type": "stdin_stdout", "input": "4\n4\n0011\n6\n111111\n5\n10101\n8\n01010000\n", "output": "2\n1 2 2 1 \n6\n1 2 3 4 5 6 \n1\n1 1 1 1 1 \n4\n1 1 1 1 1 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 Little Elephant from the Zoo o...
[{"type": "stdin_stdout", "input": "2 4\n2\n752\n25003\n1329\n10896\n39952297003683893618248919566249112695937429123", "output": "Good\nGood\nBad\nGood\n"}, {"type": "stdin_stdout", "input": "2 4\n1\n752\n28466\n1329\n10896\n95142413585696281004906476796906063037090967865", "output": "Bad\nGood\nGood\nGood\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\n\"Search\" is an operation to ob...
[{"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n1\n2\n3\n10\n-1\n0", "output": "3\n2\n"}, {"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n1\n2\n3\n10\n-2\n0", "output": "3\n2\n"}, {"type": "stdin_stdout", "input": "7\n11\n15\n-2\n53\n51\n17\n109\n42\n4\n2\n2\n3\n10\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 is a string S. Each charac...
[{"type": "stdin_stdout", "input": "???????????????2?????????????8???????????6????????5?6?5????1???8????1???????????????????????????????????3??????9????????????3??6???????????6???????????????????3???????????9???????3????6?5?????????????????2???????????5418??????????8????????9????????????0????????????????????????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\nVitya has just started learning ...
[{"type": "stdin_stdout", "input": "auuaoonntanonnuewannnnpuuinniwoonennyolonnnvienonpoujinndinunnenannmuveoiuuhikucuziuhunnnmunzancenen\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "auuaoonntanonnuewannnnpuuinniwoonennyolonnnvienonpoujinndinunnenannmuveoiuuhikucuziuhunnnmunzancenen\n", "output": "YES\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\nBob is about to take a hot bath....
[{"type": "stdin_stdout", "input": "1000000 1000000 1000000 1000000 1000000\n", "output": "1000000 1000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000 999999 999998 1000000\n", "output": "999999 999998\n"}, {"type": "stdin_stdout", "input": "129630 805489 631548 761110 577559\n", "output": "227930 447929\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 four integers $a$,...
[{"type": "stdin_stdout", "input": "7\n10 10 8 5 3\n12 8 8 7 2\n12343 43 4543 39 123212\n1000000000 1000000000 1 1 1\n1000000000 1000000000 1 1 1000000000\n10 11 2 1 5\n10 11 9 1 10\n", "output": "70\n77\n177177\n999999999000000000\n999999999\n55\n10\n"}, {"type": "stdin_stdout", "input": "7\n10 10 8 5 3\n12 8 0 7 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\nThe grasshopper is located on th...
[{"type": "stdin_stdout", "input": "9\n0 1\n0 2\n10 10\n10 197\n177 25\n10000000000 1895528572\n-433494437 87178291199\n1 0\n-1 1\n", "output": "-1\n1\n11\n-187\n202\n10000000000\n-87611785637\n1\n0\n"}, {"type": "stdin_stdout", "input": "9\n0 1\n0 2\n10 11\n10 197\n177 25\n10000000000 1895528572\n-433494437 8717829119...
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 Artem likes electronics. ...
[{"type": "stdin_stdout", "input": "13 21 1\n2 11\n", "output": "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\n0 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\n0 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 ...
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 is a string S of length N-...
[{"type": "stdin_stdout", "input": "<>>><<<<<><<>>><", "output": "29\n"}, {"type": "stdin_stdout", "input": "<>>>><<<<><<<>><", "output": "28\n"}, {"type": "stdin_stdout", "input": "<>><<<><<<<>>>><", "output": "26\n"}, {"type": "stdin_stdout", "input": "<<>><<><<<<>>>><", "output": "24\n"}, {"type": "stdin_stdout", "i...
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 non-empty string is called pal...
[{"type": "stdin_stdout", "input": "21\narozaupalanalapuazora\n", "output": "aaaaaaaallnoopprruuzz\n"}, {"type": "stdin_stdout", "input": "16\ngagadbcgghhchbdf\n", "output": "aabbccddfgggghhh\n"}, {"type": "stdin_stdout", "input": "15\nabacabadabacaba\n", "output": "aaaaaaaabbbbccd\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\nNezzar's favorite digit among $1...
[{"type": "stdin_stdout", "input": "2\n3 3\n24 21 27\n10 4\n74 13 26 95 102 51 34 58 42 60\n", "output": "YES\nYES\nYES\nYES\nNO\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "2\n3 3\n27 21 27\n10 4\n74 13 26 95 102 51 34 58 42 60\n", "output": "YES\nYES\nYES\nYES\nNO\nYES\nYES\nYES\nYE...
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\nThanos wants to destroy the aven...
[{"type": "stdin_stdout", "input": "5 3 10000 3241\n5 12 2\n", "output": "58892\n"}, {"type": "stdin_stdout", "input": "5 3 3521 10000\n5 12 2\n", "output": "58168\n"}, {"type": "stdin_stdout", "input": "5 3 10000 2737\n5 12 2\n", "output": "52844\n"}, {"type": "stdin_stdout", "input": "5 3 3521 10010\n5 12 2\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\nAlan decided to get in shape for...
[{"type": "stdin_stdout", "input": "5 00000\n10000 30000 30000 40000 19505\n27261\n14 2 8 5 6\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "5 00000\n10000 30000 30000 40000 19505\n27261\n14 0 8 5 6\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "5 10000\n10000 40000 30000 30000 20000\n10000\n5 2 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\nThe dragon and the princess are ...
[{"type": "stdin_stdout", "input": "267 111\n", "output": "0.7727518243505415\n"}, {"type": "stdin_stdout", "input": "768 487\n", "output": "0.7203654732552364\n"}, {"type": "stdin_stdout", "input": "377 205\n", "output": "0.7393583121158366\n"}, {"type": "stdin_stdout", "input": "815 180\n", "output": "0.8467179193191...
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\nDescription:\n\nThe mean (or ave...
[{"input": "[10, 29, 23, 94, 76, 96, 5, 85, 4, 33, 47, 41, 87]", "output": "[41]", "fn_name": "median"}, {"input": "[3, 4, 1, 2, 5]", "output": "[3]", "fn_name": "median"}, {"input": "[1, 2, 3, 4]", "output": "[2.5]", "fn_name": "median"}, {"input": "[1, -1]", "output": "[0]", "fn_name": "median"}, {"input": "[1]", "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\nProfessor Dumbledore is helping ...
[{"type": "stdin_stdout", "input": "43 959134961 -868367850 142426380\n921743429 63959718 -797293233 122041422 -407576197 700139744 299598010 168207043 362252658 591926075 941946099 812263640 -76679927 -824267725 89529990 -73303355 83596189 -982699817 -235197848 654773327 125211479 -497091570 -2301804 203486596 -126652...
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 got n candies and...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 "}, {"type": "stdin_stdout", "input": "100 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\n# Task\n Timed Reading is an edu...
[{"input": "5\n\"Now and then, however, he is horribly thoughtless, and seems to take a real delight in giving me pain.\"", "output": "[14]", "fn_name": "timed_reading"}, {"input": "6\n\"Zebras evolved among the Old World horses within the last four million years.\"", "output": "[11]", "fn_name": "timed_reading"}, {"in...
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 Byteland they have a very str...
[{"type": "stdin_stdout", "input": "12\n10", "output": "13\n10\n"}, {"type": "stdin_stdout", "input": "12\n19", "output": "13\n19\n"}, {"type": "stdin_stdout", "input": "12\n11", "output": "13\n11\n"}, {"type": "stdin_stdout", "input": "12\n21", "output": "13\n22\n"}, {"type": "stdin_stdout", "input": "12\n27", "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\nSherlock Holmes and Dr. Watson p...
[{"type": "stdin_stdout", "input": "12\n8 42 23 20 39 5 23 86 26 65 93 82\n48 35 12 4 59 19 19 28 38 81 97 99\n93 24 31 44 97 50 44 99 50 7 10 64\n79 43 65 29 84 43 46 41 89 16 6 1\n34 90 33 1 7 12 46 84 67 30 1 58\n58 21 100 66 56 22 7 24 72 73 86 37\n2 17 85 6 2 73 85 44 43 79 34 65\n3 53 29 76 87 2 27 19 11 42 71 38...
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\nTheory\n This section does not n...
[{"input": "[-11, -9, -7, -6, -4, -2, 0, 1, 3, 6, 8, 10, 12, 13, 15]", "output": "[true]", "fn_name": "is_tune"}, {"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]", "output": "[false]", "fn_name": "is_tune"}, {"input": "[-4, -2, 0, 1, 3, 6, 8, 10, 12, 13, 15]", "output": "[true]", "fn_name": "is_tune"}, {"input": "[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\nBackground\n\nThe kindergarten a...
[{"type": "stdin_stdout", "input": "4 3 4 2\n3 1\n0 1\n3 3\n1 5\n4 2\n2 0\n5 0\n4 0\n3 2\n3 3\n4 3\n6 0\n6 10\n4 1\n3 4\n4 4\n5 10\n2 9", "output": "0.7490695671\n"}, {"type": "stdin_stdout", "input": "4 3 4 2\n3 1\n0 1\n3 3\n1 5\n4 2\n3 0\n5 0\n4 0\n3 2\n3 0\n4 3\n6 0\n6 10\n4 1\n3 4\n4 4\n5 10\n2 9", "output": "0.400...
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 $2n$ integers $1, 2, \\...
[{"type": "stdin_stdout", "input": "3\n1\n1\n5\n1 4 5 9 10\n2\n3 4\n", "output": "\n1\n3\n1\n"}, {"type": "stdin_stdout", "input": "3\n1\n1\n5\n1 4 5 9 10\n2\n3 4\n", "output": "1\n3\n1\n"}, {"type": "stdin_stdout", "input": "3\n1\n1\n5\n1 4 5 9 10\n2\n1 4\n", "output": "1\n3\n1\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\nOn a two-dimensional plane, ther...
[{"type": "stdin_stdout", "input": "5\n0 0\n4 1\n5 5\n6 6\n13 11\n2 2\n6 3\n-1 4\n8 4\n14 17", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n0 0\n4 1\n5 5\n6 6\n13 11\n2 2\n6 3\n-1 4\n8 4\n9 17", "output": "3\n"}, {"type": "stdin_stdout", "input": "5\n0 0\n4 1\n5 5\n6 6\n13 11\n2 2\n8 3\n-1 4\n14 4\n9 4", "ou...
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 the curtains are opened, a ...
[{"type": "stdin_stdout", "input": ".CAACCBBA.CBB.AC..BABCCBCCB..B.BC..CBC.CA.CC.C.CC.B.A.CC.BBCCBB..ACAACAC.CBCCB.AABAAC.CBCC.BA..CCBC.\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "CC.AAAC.BA.BBB.AABABBCCAA.A.CBCCB.B.BC.ABCBCBBAA.CACA.CCCA.CB.CCB.A.BCCCB...C.A.BCCBC..B.ABABB.C.BCB\n", "output": "Yes\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\nFind the maximum possible sum of...
[{"type": "stdin_stdout", "input": "1265641936938969", "output": "135\n"}, {"type": "stdin_stdout", "input": "2005985506723837", "output": "136\n"}, {"type": "stdin_stdout", "input": "5193523582167964", "output": "139\n"}, {"type": "stdin_stdout", "input": "4944180382968715", "output": "138\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\nAttention: we lost all the test ...
[{"type": "stdin_stdout", "input": "100000\n", "output": "199998 2\n1 2\n"}, {"type": "stdin_stdout", "input": "99991\n", "output": "199980 2\n1 2\n"}, {"type": "stdin_stdout", "input": "99992\n", "output": "199982 2\n1 2\n"}, {"type": "stdin_stdout", "input": "99971\n", "output": "199940 2\n1 2\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\nBerland has n cities, the capita...
[{"type": "stdin_stdout", "input": "2 9 1 2\n1 2 1000000\n1 2 1000000\n1 2 1100000\n1 2 1000000\n1 2 2\n1 2 1000000\n1 2 1000000\n1 2 1000000\n1 2 1000000\n", "output": "CAN 999999\nCAN 999999\nCAN 1099999\nCAN 999999\nYES\nCAN 999999\nCAN 999999\nCAN 999999\nCAN 999999\n"}, {"type": "stdin_stdout", "input": "2 9 1 2\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 are N rabbits, numbered 1,...
[{"type": "stdin_stdout", "input": "16\n0 5 -4 -5 -8 -4 7 2 -4 0 7 0 2 -3 7 7\n5 0 8 -9 3 5 2 -7 2 -7 0 -1 -4 1 -1 9\n-4 8 0 -9 8 9 3 1 4 9 6 6 -6 1 8 9\n-5 -9 -9 0 -7 6 4 -1 9 -3 -5 0 1 2 -4 1\n-8 3 8 -7 0 -5 -9 9 1 -9 -6 -3 -8 3 4 3\n-4 5 9 6 -5 0 -6 1 -2 2 0 -5 -2 3 1 2\n7 2 3 4 -9 -6 0 -2 -2 -9 -3 9 -2 9 2 -5\n2 -7...
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 managed to intercept an...
[{"input": "\"qzezxirkg rh z srts ovevo wbmznrx fmgbkvw zmw rmgvikivgvw kiltiznnrmt ozmtfztv rg szh yvvm hgzmwziwravw rm gsv vxnzxirkg ozmtfztv hkvxrurxzgrlm zolmthrwv sgno zmw xhh rg rh lmv lu gsv gsivv vhhvmgrzo gvxsmloltrvh lu dliow drwv dvy xlmgvmg kilwfxgrlm gsv nzqlirgb lu dvyhrgvh vnkolb rg zmw rg rh hfkkligvw y...
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\nWrite a program that will take a...
[{"input": "\"01234\"\n3", "output": "[[[0, 1, 2], [1, 2, 3], [2, 3, 4]]]", "fn_name": "series_slices"}, {"input": "\"01234\"\n2", "output": "[[[0, 1], [1, 2], [2, 3], [3, 4]]]", "fn_name": "series_slices"}, {"input": "\"01234\"\n4", "output": "[[[0, 1, 2, 3], [1, 2, 3, 4]]]", "fn_name": "series_slices"}, {"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\nIn this Kata, you will be given ...
[{"input": "\"900001900002900004900005900006\"", "output": "[900003]", "fn_name": "missing"}, {"input": "\"998999100010011003\"", "output": "[1002]", "fn_name": "missing"}, {"input": "\"99991000110002\"", "output": "[10000]", "fn_name": "missing"}, {"input": "\"979899100101102\"", "output": "[-1]", "fn_name": "missing"...
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\nWhen working with color values i...
[{"input": "\"#beaded\"", "output": "[{\"r\": 190, \"g\": 173, \"b\": 237}]", "fn_name": "hex_string_to_RGB"}, {"input": "\"#FF9933\"", "output": "[{\"r\": 255, \"g\": 153, \"b\": 51}]", "fn_name": "hex_string_to_RGB"}, {"input": "\"#Fa3456\"", "output": "[{\"r\": 250, \"g\": 52, \"b\": 86}]", "fn_name": "hex_string_to...
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\nSasha and Kolya decided to get d...
[{"type": "stdin_stdout", "input": "971 108\n706 706 991 706 988 997 996 997 991 996 706 706 996 706 996 984 1000 991 996 1000 724 724 997 991 997 984 997 1000 984 996 996 997 724 997 997 1000 997 724 984 997 996 988 997 706 706 997 1000 991 706 988 997 724 988 706 996 706 724 997 988 996 991 1000 1000 724 988 996 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\nGenos needs your help. He was as...
[{"type": "stdin_stdout", "input": "1001101001101110101101000\n01111000010011111111110010001101000100011110101111\n", "output": "321\n"}, {"type": "stdin_stdout", "input": "1110010001000101001011111\n00011011000000100001010000010100110011010001111010\n", "output": "316\n"}, {"type": "stdin_stdout", "input": "1001101001...
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\nAfter a probationary period in t...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "3000000003000000001\n"}, {"type": "stdin_stdout", "input": "1147564610\n", "output": "3950713605816050131\n"}, {"type": "stdin_stdout", "input": "1000010000\n", "output": "3000060003300030001\n"}, {"type": "stdin_stdout", "input": "1065935402\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\nLittle Chris is participating in...
[{"type": "stdin_stdout", "input": "8 30\n10 4\n3 8\n3 2\n10 1\n3 5\n3 4\n5 1\n8 2\n8 4\n3 10\n7 9\n3 6\n9 5\n5 10\n7 6\n7 5\n9 1\n2 7\n9 10\n1 4\n9 8\n6 2\n2 1\n7 1\n6 4\n4 5\n2 14\n10 8\n7 8\n5 2\n", "output": "3 5 1\n10 5 7\n4 5 2\n5 9 1\n10 9 8\n3 6 2\n4 6 7\n9 7 1\n8 7 2\n3 2 1\n14 2 8\n4 8 10\n8 3 10\n3 4 1\n4 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 bracket sequence is a string, ...
[{"type": "stdin_stdout", "input": "[()][([[]])][[[]()]][()[]]()()([[][]][[]][](()))[[[(())]]][]()(([([])(([[[]]()])(()))]((())))([()]([()[[[]([][[[[][(())([[]()])]]][[(())]([])]()][[](())]()[])]()[][]]([[]])[]])[(()[()((()[][()]))][])[]()()([]())](()[][][])()()[]()))[]()[]\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\nAllen and Bessie are playing a s...
[{"type": "stdin_stdout", "input": "2 2\n0 1 2 3\n2 5\n0 4\n", "output": "1.5000000000\n2.2500000000\n3.2500000000\n"}, {"type": "stdin_stdout", "input": "2 2\n0 2 0 3\n2 0\n0 13\n", "output": "1.25\n1.25\n4.5\n"}, {"type": "stdin_stdout", "input": "2 2\n0 1 2 2\n2 2\n0 2\n", "output": "1.25\n1.25\n1.75\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\nproblem\n\nThere are the followi...
[{"type": "stdin_stdout", "input": "12\n3\n2\n1\n1\n1\n3\n2\n1\n2\n1\n1\n5\n2\n3\n2\n1\n2\n2\n5\n0\n0\n3\n2\n-1\n0\n0", "output": "8\n2\n1\n2\n"}, {"type": "stdin_stdout", "input": "12\n3\n2\n1\n1\n1\n3\n2\n2\n2\n2\n1\n5\n2\n3\n2\n1\n2\n2\n5\n1\n0\n3\n2\n-1\n0\n0", "output": "3\n2\n1\n2\n"}, {"type": "stdin_stdout", "i...
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 sheets of square pap...
[{"type": "stdin_stdout", "input": "5\n29\n0", "output": "5\n4 1\n3 2\n3 1 1\n2 2 1\n2 1 1 1\n1 1 1 1 1\n29\n28 1\n27 2\n27 1 1\n26 3\n26 2 1\n26 1 1 1\n25 4\n25 3 1\n25 2 2\n25 2 1 1\n25 1 1 1 1\n24 5\n24 4 1\n24 3 2\n24 3 1 1\n24 2 2 1\n24 2 1 1 1\n24 1 1 1 1 1\n23 6\n23 5 1\n23 4 2\n23 4 1 1\n23 3 3\n23 3 2 1\n23 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\n# Definition\n\nAn **_element is...
[{"input": "[0, -1, -29, 3, 2]", "output": "[[0, -1, 3, 2]]", "fn_name": "array_leaders"}, {"input": "[16, 17, 4, 3, 5, 2]", "output": "[[17, 5, 2]]", "fn_name": "array_leaders"}, {"input": "[-36, -12, -27]", "output": "[[-36, -12]]", "fn_name": "array_leaders"}, {"input": "[-1, -29, -26, -2]", "output": "[[-1]]", "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\nFor given two circles $c1$ and $...
[{"type": "stdin_stdout", "input": "-26 -2 -2\n15 2 -1", "output": "4\n"}, {"type": "stdin_stdout", "input": "-26 -2 -2\n15 2 -2", "output": "4\n"}, {"type": "stdin_stdout", "input": "-26 -2 -1\n15 2 -2", "output": "4\n"}, {"type": "stdin_stdout", "input": "-26 -2 -1\n21 2 -2", "output": "4\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\nIahub recently has learned Bubbl...
[{"type": "stdin_stdout", "input": "100\n36 48 92 87 28 85 42 10 44 41 39 3 79 9 14 56 1 16 46 35 93 8 82 26 100 59 60 2 96 52 13 98 70 81 71 94 54 91 17 88 33 30 19 50 18 73 65 29 78 21 61 7 99 97 45 89 57 27 76 11 49 72 84 69 43 62 4 22 75 6 66 83 38 34 86 15 40 51 37 74 67 31 20 63 77 80 12 53 5 25 58 90 68 24 64 23...
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 an immigration officer i...
[{"type": "stdin_stdout", "input": "5\n-1 -1 1 1 321", "output": "APPROVED\n"}, {"type": "stdin_stdout", "input": "5\n-1 -1 1 1 337", "output": "APPROVED\n"}, {"type": "stdin_stdout", "input": "5\n-1 -1 1 1 200", "output": "APPROVED\n"}, {"type": "stdin_stdout", "input": "5\n-1 -1 1 1 385", "output": "APPROVED\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\nIn mathematics, the Pythagorean ...
[{"type": "stdin_stdout", "input": "10000\n", "output": "12471\n"}, {"type": "stdin_stdout", "input": "9999\n", "output": "12467\n"}, {"type": "stdin_stdout", "input": "10000\n", "output": "12471"}, {"type": "stdin_stdout", "input": "9999\n", "output": "12467"}, {"type": "stdin_stdout", "input": "1000\n", "output": "88...
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 the Jumbo will practic...
[{"type": "stdin_stdout", "input": "1000\n2 1000\n", "output": "OK\n"}, {"type": "stdin_stdout", "input": "279\n691 872\n", "output": "OK\n"}, {"type": "stdin_stdout", "input": "379\n400 757\n", "output": "NG\n"}, {"type": "stdin_stdout", "input": "1000\n1 999\n", "output": "NG\n"}, {"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\nAs you probably know, Anton goes...
[{"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\nYou are given $n$ integers $a_1,...
[{"type": "stdin_stdout", "input": "4\n3\n2 3 3\n4\n3 0 10 1\n2\n359 139\n6\n229275 372495 402638 1125346 388084 422281\n", "output": "9\n10\n49901\n453107062748\n"}, {"type": "stdin_stdout", "input": "4\n3\n2 5 3\n4\n3 0 12 1\n2\n359 80\n6\n229275 718820 272407 1125346 388084 775159\n", "output": "15\n12\n28720\n43672...
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\nConsider 2n rows of the seats in...
[{"type": "stdin_stdout", "input": "100 400\n", "output": "201 1 202 2 203 3 204 4 205 5 206 6 207 7 208 8 209 9 210 10 211 11 212 12 213 13 214 14 215 15 216 16 217 17 218 18 219 19 220 20 221 21 222 22 223 23 224 24 225 25 226 26 227 27 228 28 229 29 230 30 231 31 232 32 233 33 234 34 235 35 236 36 237 37 238 38 239 ...
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\nJulia is going to cook a chicken...
[{"type": "stdin_stdout", "input": "1000000000000000000 1001000000000000000 1000000000000000000\n", "output": "1000000000000000000.000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "1000000000000000000.000000000000000"}, {"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\nRegex Failure - Bug Fixing #2\nO...
[{"input": "\"You're HiDeOuS!! timmy!\"", "output": "[\"You're awesome!! timmy!\"]", "fn_name": "filter_words"}, {"input": "\"You're horrible! timmy!\"", "output": "[\"You're awesome! timmy!\"]", "fn_name": "filter_words"}, {"input": "\"You're UGLY!! timmy!\"", "output": "[\"You're awesome!! timmy!\"]", "fn_name": "fil...
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\nOne day Vasya was going home whe...
[{"type": "stdin_stdout", "input": "-827584 -680412 -103147\n897186 313672 388429\n892050 717946 505625 200144 311983 606037\n", "output": "1709658\n"}, {"type": "stdin_stdout", "input": "-827584 -680412 -103147\n897186 313672 388429\n892050 717946 505625 278931 311983 606037\n", "output": "1709658\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\nPolycarpus has n markers and m m...
[{"type": "stdin_stdout", "input": "6 7\n2 1\n1 1\n2 2\n1 2\n1 1\n1 2\n2 1\n1 1\n1 1\n1 1\n1 2\n2 2\n1 1\n", "output": "5 5\n"}, {"type": "stdin_stdout", "input": "6 7\n1 1\n1 1\n1 2\n1 2\n2 2\n1 2\n2 1\n2 1\n2 1\n2 1\n1 1\n1 1\n1 2\n", "output": "3 3\n"}, {"type": "stdin_stdout", "input": "6 7\n2 1\n2 2\n2 1\n1 1\n2 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\nThis is the easier version of th...
[{"type": "stdin_stdout", "input": "5\n3 1 4 1 2\n15\n5 5\n5 4\n5 3\n5 2\n5 1\n4 4\n4 3\n4 2\n4 1\n3 3\n3 2\n3 1\n2 2\n2 1\n1 1\n", "output": "2\n1\n4\n1\n3\n2\n4\n1\n3\n2\n4\n3\n4\n3\n4\n"}, {"type": "stdin_stdout", "input": "5\n3 1 4 2 2\n15\n5 5\n5 4\n5 3\n5 2\n5 1\n4 4\n4 3\n4 2\n4 1\n3 3\n3 2\n3 1\n2 2\n2 1\n1 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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n1 1 10 32\n11 11 20 20\n1 1 20 20\n11 11 30 76", "output": "360\n1515\n"}, {"type": "stdin_stdout", "input": "2\n1 1 10 10\n11 7 20 20\n1 1 20 20\n11 11 30 55", "output": "198\n1116\n"}, {"type": "stdin_stdout", "input": "2\n1 1 10 20\n11 7 20 20\n1 1 20 20\n11 11 30 55", "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 problem we consider a ve...
[{"type": "stdin_stdout", "input": "912738218 530309782 -939253776\n592805323 -930297022 -567581994 -829432319\n", "output": "1218437463.3854325\n"}, {"type": "stdin_stdout", "input": "137446306 341377513 -633738092\n244004352 -854692242 60795776 822516783\n", "output": "1800945736.2511592\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\nA country called Berland consist...
[{"type": "stdin_stdout", "input": "10 45 9\n2 1 428\n3 1 610\n3 2 357\n4 1 855\n4 2 528\n4 3 508\n5 1 425\n5 2 185\n5 3 349\n5 4 845\n6 1 206\n6 2 969\n6 3 153\n6 4 854\n6 5 640\n7 1 87\n7 2 250\n7 3 953\n7 4 456\n7 5 742\n7 6 588\n8 1 641\n8 2 898\n8 3 396\n8 4 960\n8 5 654\n8 6 410\n8 7 640\n9 1 707\n9 2 707\n9 3 70...
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 $n$ elements numbe...
[{"type": "stdin_stdout", "input": "13\n1 2 3 2 1 3 3 4 5 5 5 4 7\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "7\n1 2 1 2 7 4 7\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "3\n1 1 2\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "3\n1 1 1\n", "output": "1\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\nYou are given n points on the pl...
[{"type": "stdin_stdout", "input": "20\n-2967010 48581504\n-2967318 48581765\n-2967443 48581988\n-2967541 48582265\n-2967443 48582542\n-2967318 48582765\n-2967010 48583026\n-2966691 48583154\n-2966252 48583234\n-2965813 48583154\n-2965494 48583026\n-2965186 48582765\n-2965061 48582542\n-2964963 48582265\n-2965061 48581...
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 the hard version of the pr...
[{"type": "stdin_stdout", "input": "5\n9\n31 yellow\n30 green\n26 yellow\n13 red\n2 red\n22 white\n12 red\n6 orange\n29 blue\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n9\n31 yellow\n30 green\n26 yellow\n13 red\n2 red\n22 white\n12 red\n6 orange\n29 blue\n", "output": "0\n"}, {"type": "stdin_stdout", "i...
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 has N dogs and M monkeys. ...
[{"type": "stdin_stdout", "input": "001010 001011", "output": "931093537\n"}, {"type": "stdin_stdout", "input": "000101 000101", "output": "414723868\n"}, {"type": "stdin_stdout", "input": "000110 000111", "output": "399920258\n"}, {"type": "stdin_stdout", "input": "001111 001110", "output": "292820538\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\n# Introduction\n\nThere is a war...
[{"input": "\"z*dq*mw*pb*s\"", "output": "[\"Let's fight again!\"]", "fn_name": "alphabet_war"}, {"input": "\"zdqmwpbs\"", "output": "[\"Let's fight again!\"]", "fn_name": "alphabet_war"}, {"input": "\"*wwwwww*z*\"", "output": "[\"Left side wins!\"]", "fn_name": "alphabet_war"}, {"input": "\"sz**z**zs\"", "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\nOn a chessboard with a width of ...
[{"type": "stdin_stdout", "input": "0 5\n-1 96762320 34608098\n243235878 312125306 50510976\n326016273 498514053 50510976\n614560077 445224816 25950222\n1077021507 901150398 37242747\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "0 5\n-1 96762320 34608098\n243235878 312125306 50510976\n326016273 498514053 907...
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\nThis function should take two st...
[{"input": "\"Darrell\"\n\"What the heck is this thing?\"", "output": "[\"Darrell said: \\\"What the heck is this thing?\\\"\"]", "fn_name": "quotable"}, {"input": "\"Bethany\"\n\"Yes, way more fun than R\"", "output": "[\"Bethany said: \\\"Yes, way more fun than R\\\"\"]", "fn_name": "quotable"}, {"input": "\"Grae\"\n...
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\nPolycarp, Arkady's friend, prepa...
[{"type": "stdin_stdout", "input": "2\n4\n1.9585346052548882 31.000\n12 0\n11 6\n30 1\n5 1\n3\n1.360280845492949 30.337801087585063\n0 10\n10 8\n20 8\n", "output": "7\n18\n"}, {"type": "stdin_stdout", "input": "2\n4\n1.557488533293537 31.000\n12 0\n11 6\n30 1\n5 1\n3\n1.360280845492949 30.337801087585063\n0 10\n10 8\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\nProfessor Ibrahim has prepared t...
[{"type": "stdin_stdout", "input": "100 10\n39 242 238 155 95 30 129 132 72 59 22 91 203 113 99 81 253 204 160 109 92 187 11 227 145 211 100 42 78 14 113 91 140 197 123 182 4 185 208 27 182 207 63 146 102 39 159 195 26 100 72 127 157 159 152 53 0 117 101 125 19 188 179 145 240 50 205 207 113 246 42 56 161 13 188 244 15...
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 city of Ultima Thule job ...
[{"type": "stdin_stdout", "input": "####\n.#..\n####\n....\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "....\n....\n....\n....\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "#..#\n.##.\n####\n####\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "#.#.\n.###\n#.#.\n.###\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\nThe hobbits Frodo and Sam are ca...
[{"type": "stdin_stdout", "input": "5 9990\n300000 909\n366685 9999\n370849 9998\n379178 9996\n400000 1\n", "output": "25178.6601865589\n"}, {"type": "stdin_stdout", "input": "4 90\n362174 10000\n365957 13123\n373522 9997\n400000 3804\n", "output": "35378.024406478464\n"}, {"type": "stdin_stdout", "input": "4 90\n36217...
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\nNobody knows, but $N$ frogs live...
[{"type": "stdin_stdout", "input": "5 3 3\n0 3 8 5 12\n1 2\n1 3\n2 5\n", "output": "Yes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "5 6 3\n0 3 8 8 12\n1 2\n1 3\n2 5", "output": "Yes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "5 3 3\n0 3 15 8 12\n1 2\n1 3\n3 5", "output": "Yes\nNo\nYes\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\n[0, 0]\n[0, 1] [1, 1]\n[0, 2] ...
[{"type": "stdin_stdout", "input": "6\n16 23 16 16 15 25\n10\n00 01 11 02 12 22 03 13 13 33", "output": "Yes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n13 23 14 16 15 25\n10\n00 01 11 02 12 30 03 13 36 33", "output": "Yes\nYes\n"}, {"type": "stdin_stdout", "input": "6\n11 23 16 16 15 25\n10\n00 01 11 02 12 22 03 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\nThe squirrel Chokudai has N acor...
[{"type": "stdin_stdout", "input": "23\n1 2 1\n20 1 10", "output": "920\n"}, {"type": "stdin_stdout", "input": "23\n1 2 4\n10 1 4", "output": "460\n"}, {"type": "stdin_stdout", "input": "23\n1 12 1\n1 1 1", "output": "276\n"}, {"type": "stdin_stdout", "input": "23\n2 11 1\n2 1 2", "output": "506\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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n10 16\n14 18", "output": "10\n14\n"}, {"type": "stdin_stdout", "input": "2\n130 45\n4 17", "output": "42\n4\n"}, {"type": "stdin_stdout", "input": "2\n10 4\n21 19", "output": "2\n10\n"}, {"type": "stdin_stdout", "input": "2\n44 45\n2 17", "output": "44\n2\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\nPaul hates palindromes. He assum...
[{"type": "stdin_stdout", "input": "333 9\nedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedcedce...
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 some other world, today is Ch...
[{"type": "stdin_stdout", "input": "50 4321098765432109\n", "output": "2160549382716056\n"}, {"type": "stdin_stdout", "input": "50 2251799813685246\n", "output": "1125899906842623\n"}, {"type": "stdin_stdout", "input": "50 2251799813685247\n", "output": "1125899906842624\n"}, {"type": "stdin_stdout", "input": "50 22517...
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 table consisting...
[{"type": "stdin_stdout", "input": "10 10\n0000000000\n0000001000\n0000000100\n0101000100\n0000000000\n0000000000\n1000110000\n1011010010\n0000110000\n0000001001\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10 10\n0000000000\n0000001000\n0000000100\n0101000100\n0000000000\n0000000000\n1000110000\n101101001...
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\nLearn, learn and learn again — V...
[{"type": "stdin_stdout", "input": "100\n-88 -5 -96 -45 -11 -81 -68 -58 -73 -91 -27 -23 -89 -34 -51 -46 -70 -95 -9 -77 -99 -61 -74 -98 -88 -44 -61 -88 -35 -71 -43 -23 -25 -98 -23 0 -1 -80 -52 -47 -26 -92 -82 -73 -45 -37 -15 -49 -9 -7 -47 0 -6 -76 -91 -20 -58 -46 -74 -57 -54 -39 -61 -18 -65 -61 -19 -64 -93 -29 -82 -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\nFormat any integer provided into...
[{"input": "5678545", "output": "[\"5,678,545\"]", "fn_name": "number_format"}, {"input": "-420902", "output": "[\"-420,902\"]", "fn_name": "number_format"}, {"input": "100000", "output": "[\"100,000\"]", "fn_name": "number_format"}, {"input": "-1003", "output": "[\"-1,003\"]", "fn_name": "number_format"}, {"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\nIn Berland it is the holiday of ...
[{"type": "stdin_stdout", "input": "70\n644488 5444 150441 714420 602059 335330 510670 196555 546346 740011 509449 850947 692874 524857 750434 952985 223744 533151 896124 609694 367352 679050 560202 172728 569291 778616 332116 286927 843598 372698 244906 498046 900681 709791 420904 724593 864493 813094 791377 39998 296...
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\nHongcow likes solving puzzles.\n...
[{"type": "stdin_stdout", "input": "1 500\n.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
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 wants to watch $n$ vide...
[{"type": "stdin_stdout", "input": "6 1000000000\n999999995 999999996 999999997 999999998 999999999 1000000000\n", "output": "5999999991\n"}, {"type": "stdin_stdout", "input": "5 1000000000\n500000000 500000000 500000000 500000000 500000000\n", "output": "2500000001\n"}, {"type": "stdin_stdout", "input": "5 999999999\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\nPablo Squarson is a well-known c...
[{"type": "stdin_stdout", "input": "1\n5\n0 0\n0 -1\n0 2\n0 3\n12\n0 0\n0 0\n2 0\n3 0\n4 1\n5 1\n6 2\n3 2\n8 2\n9 3\n10 3\n10\n0 2\n1 3\n2 2\n3 2\n2 1\n5 1\n6 1\n7 1\n3 0\n0", "output": "1 1\n3 2\n4 5\n4 5\n"}, {"type": "stdin_stdout", "input": "1\n5\n0 -1\n0 1\n0 2\n0 3\n12\n0 0\n1 0\n2 0\n3 1\n4 1\n5 1\n6 2\n7 1\n8 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 appointed director of a ...
[{"type": "stdin_stdout", "input": "4\n1 2 10\n2 3 10\n3 3 10\n1 3 10\n6\n1 20 1000\n5 25 10000\n2 30 8781\n22 300 5500\n10 117 9000\n7 7 2175\n8\n32 251 2396\n132 281 1659\n222 235 5641\n162 217 1883\n22 158 7195\n194 198 9190\n119 274 1469\n122 334 13708\n0", "output": "30\n21175\n35734\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 is a train going from Stat...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "150\n"}, {"type": "stdin_stdout", "input": "81 58\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "100 2\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "76 48\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "-1 -17", "output": "-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\nSig has built his own keyboard. ...
[{"type": "stdin_stdout", "input": "5000\n01000001011101000100001101101111011001000110010101110010000\n", "output": "500886057\n"}, {"type": "stdin_stdout", "input": "5000\n01000001011101010100001101101111011001000110010101110010000", "output": "500886057\n"}, {"type": "stdin_stdout", "input": "5000\n010000010110010101...
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 is playing a math game wi...
[{"type": "stdin_stdout", "input": "15\n989898989898989\n", "output": "777777777777777333333333333333322222222222222222222222222222\n"}, {"type": "stdin_stdout", "input": "15\n999999999999990\n", "output": "77777777777777333333333333333333333333333322222222222222\n"}, {"type": "stdin_stdout", "input": "15\n997953296764...
code_stdio