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\n# Right in the Center\n\n_This i...
[{"input": "\"abcabcabcabc\"", "output": "[false]", "fn_name": "is_in_middle"}, {"input": "\"AAabcabcBB\"", "output": "[false]", "fn_name": "is_in_middle"}, {"input": "\"AAAAabcBB\"", "output": "[false]", "fn_name": "is_in_middle"}, {"input": "\"abcabcabc\"", "output": "[true]", "fn_name": "is_in_middle"}, {"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\nTwo chess pieces, a rook and a k...
[{"type": "stdin_stdout", "input": "c1\nd2\n", "output": "42\n"}, {"type": "stdin_stdout", "input": "g1\ne6\n", "output": "39\n"}, {"type": "stdin_stdout", "input": "h8\ng2\n", "output": "43\n"}, {"type": "stdin_stdout", "input": "a8\nf1\n", "output": "42\n"}, {"type": "stdin_stdout", "input": "e4\nc1\n", "output": "37...
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\nExample\n\nInput\n\n1\n\n\nOutpu...
[{"type": "stdin_stdout", "input": "321", "output": ")))))))))))))))))))))())))((((((((((((((((((((((((\n"}, {"type": "stdin_stdout", "input": "222", "output": "))))))))))))()))))))))((((((((((((((((((((\n"}, {"type": "stdin_stdout", "input": "193", "output": ")))()))))))))))))))))(((((((((((((((((((\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnd where the are the phone numb...
[{"type": "stdin_stdout", "input": "3 99948\nttt\n", "output": "tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt...
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 given an array $a$ of l...
[{"type": "stdin_stdout", "input": "1\n20 9\n288 279 252 279 288 207 261 270 297 288 276 265 209 217 214 300 227 221 215 271\n", "output": "7833\n"}, {"type": "stdin_stdout", "input": "1\n20 9\n288 279 252 279 288 207 261 270 297 288 276 265 209 217 214 300 227 221 215 271\n", "output": "7833\n"}, {"type": "stdin_stdou...
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\nIkshu's love for binary numbers\...
[{"type": "stdin_stdout", "input": "32 7\n", "output": "288230376151711743/288230376151711744\n"}, {"type": "stdin_stdout", "input": "27 10\n", "output": "1541494189855/140737488355328\n"}, {"type": "stdin_stdout", "input": "54 11\n", "output": "37241906121/1099511627776\n"}, {"type": "stdin_stdout", "input": "5 3\n", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a program which performs t...
[{"type": "stdin_stdout", "input": "18\ninsert 13\ninsert 2\ninsert 3\ninsert 7\ninsert 22\ninsert 1\nfind 1\nfind 2\nfind 3\nfind 13\nfind 5\nfind 6\nfind 4\nfind 7\nprint\ndelete 3\ndelete 7\nprint", "output": "yes\nyes\nyes\nyes\nno\nno\nno\nyes\n 1 2 3 7 13 22\n 13 2 1 3 7 22\n 1 2 13 22\n 13 2 1 22\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\nAt the school where Vasya is stu...
[{"type": "stdin_stdout", "input": "3\n12 6 4\n2 1 2 4\n1 1 2 3\n2 1 1\n1\n1\n3 15 4\n1 1 2 2\n1 2 1 2\n", "output": "4\n0\n2\n"}, {"type": "stdin_stdout", "input": "3\n12 6 4\n2 1 2 4\n1 1 3 3\n2 1 1\n1\n1\n3 15 4\n1 1 2 2\n1 2 1 2\n", "output": "3\n0\n2\n"}, {"type": "stdin_stdout", "input": "3\n12 6 4\n2 1 2 7\n1 1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi...
[{"type": "stdin_stdout", "input": "5\n2\n0 3\n4\n2 0 13 1\n3\n3 3 3\n4\n5 10 5 4\n4\n2 1 1 2\n", "output": "YES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n0 3\n4\n2 0 25 1\n3\n3 3 3\n4\n5 10 5 4\n4\n2 1 1 2\n", "output": "YES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n0 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\nNiwango-kun, an employee of Dwan...
[{"type": "stdin_stdout", "input": "17 2\n0 5\n2 3\n1 0\n1 2\n3 1\n3 1\n3 5\n5 1\n5 4\n7 4\n8 4\n6 1\n1 2\n6 1\n8 1\n11 0\n11 0\n11 -1\n7 0", "output": "5\n"}, {"type": "stdin_stdout", "input": "17 3\n0 5\n2 3\n1 0\n1 2\n3 1\n3 1\n3 5\n5 1\n5 4\n7 4\n8 4\n6 1\n1 2\n6 1\n8 1\n11 1\n11 0\n11 -1\n7 1", "output": "6\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\nComplete the function, which cal...
[{"input": "20\n\"great!\"", "output": "[\"Rating not recognised\"]", "fn_name": "calculate_tip"}, {"input": "20\n\"hi\"", "output": "[\"Rating not recognised\"]", "fn_name": "calculate_tip"}, {"input": "107.65\n\"GReat\"", "output": "[17]", "fn_name": "calculate_tip"}, {"input": "20\n\"Excellent\"", "output": "[4]", "...
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 introduce the designation ...
[{"type": "stdin_stdout", "input": "10000000 1\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "10000000\n"}, {"type": "stdin_stdout", "input": "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 a and b be some non-negative...
[{"type": "stdin_stdout", "input": "2 3\n14\n2 4\n2 1\n1 1\n", "output": "15\n12\n12\n"}, {"type": "stdin_stdout", "input": "2 3\n14\n2 4\n2 1\n2 0\n", "output": "15\n12\n11\n"}, {"type": "stdin_stdout", "input": "2 3\n11\n2 8\n2 2\n2 0\n", "output": "19\n13\n11\n"}, {"type": "stdin_stdout", "input": "2 3\n11\n2 8\n2 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\nGiven are three integers A_1, A_...
[{"type": "stdin_stdout", "input": "13 13 13\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "1 10 11\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "6 13 10\n", "output": "bust\n"}, {"type": "stdin_stdout", "input": "115 -5 1", "output": "bust\n"}, {"type": "stdin_stdout", "input": "-2 -10 -1", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N points in the xy...
[{"type": "stdin_stdout", "input": "3\n6.834942604239939 7.69628\n6.04723928846506 4.859878448884584\n7.439438773048666 6.914350092484497\n6\n7.260024632937995 4.220572316804344\n7.2301779956102665 2.69466\n5.977411451010016 4.7893139817742\n5.771323891387089 5.033018424848772\n7.097650770216692 5.940611762552271\n8.51...
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 process of mammoth's genome ...
[{"type": "stdin_stdout", "input": "252\n???????GCG??T??TT?????T?C???C?CCG???GA???????AC??A???AAC?C?CC??CCC??A??TA?CCC??T???C??CA???CA??G????C?C?C????C??C??A???C?T????C??ACGC??CC?A?????A??CC?C??C?CCG?C??C??A??CG?A?????A?CT???CC????CCC?CATC?G??????????A???????????????TCCCC?C?CA??AC??GC????????\n", "output": "AAAAAAAGCGA...
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\nCompare two strings by comparing...
[{"input": "\"ZzZz\"\n\"ffPFF\"", "output": "[true]", "fn_name": "compare"}, {"input": "\"!!\"\n\"7476\"", "output": "[true]", "fn_name": "compare"}, {"input": "\"##\"\n\"1176\"", "output": "[true]", "fn_name": "compare"}, {"input": "\"AD\"\n\"DD\"", "output": "[false]", "fn_name": "compare"}, {"input": "\"Ad\"\n\"DD\"...
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\nWe consider a positive integer p...
[{"type": "stdin_stdout", "input": "10000\n", "output": "10800100\n"}, {"type": "stdin_stdout", "input": "9999\n", "output": "10800010\n"}, {"type": "stdin_stdout", "input": "9139\n", "output": "10134010\n"}, {"type": "stdin_stdout", "input": "9859\n", "output": "10422001\n"}, {"type": "stdin_stdout", "input": "8888\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\nPasha decided to invite his frie...
[{"type": "stdin_stdout", "input": "4 1000000000\n1 1 1 1 2 2 2 2\n", "output": "12.0000000000\n"}, {"type": "stdin_stdout", "input": "4 1000000000\n1 1 1 1 1 1 1 1\n", "output": "6.0000000000\n"}, {"type": "stdin_stdout", "input": "5 15\n2 3 4 1 2 4 5 3 5 10\n", "output": "15.0000000000\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\nConvenience store Deven Eleven i...
[{"type": "stdin_stdout", "input": "10 12\n6\n2 1\n6 1\n6 2\n1 5\n0 6\n5 6\n2\n1 3\n5 3\n11 6\n6\n3 3\n3 4\n6 1\n1 1\n1 6\n5 6\n2\n0 3\n6 4\n0 0", "output": "6\n18\n"}, {"type": "stdin_stdout", "input": "10 12\n6\n1 1\n6 1\n6 2\n1 5\n0 6\n5 6\n2\n1 3\n5 3\n11 6\n6\n3 3\n3 4\n6 2\n1 1\n1 5\n1 6\n2\n0 3\n6 4\n0 0", "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\nYou play a computer game. In thi...
[{"type": "stdin_stdout", "input": "2\n6\n2 3 11 14 1 8\n2\n3 2\n000 1\n5\n3 5 100 2 3\n2\n30 5\n90 1\n", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "2\n6\n1 3 11 14 1 10\n2\n3 2\n100 1\n5\n3 5 100 2 3\n2\n30 5\n11 1\n", "output": "5\n-1\n"}, {"type": "stdin_stdout", "input": "2\n6\n1 3 11 16 1 10\n2\n3 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\nIn this problem MEX of a certain...
[{"type": "stdin_stdout", "input": "100\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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ...
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 a New Year's gift, Dolphin re...
[{"type": "stdin_stdout", "input": "gaiku,atcoder,tasks", "output": "gaiku atcoder tasks\n"}, {"type": "stdin_stdout", "input": "abgde,fchihgf,edcba", "output": "abgde fchihgf edcba\n"}, {"type": "stdin_stdout", "input": "ha,pypnewyear,enjoy", "output": "ha pypnewyear enjoy\n"}, {"type": "stdin_stdout", "input": "gaiku...
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\nSeiji Maki doesn't only like to ...
[{"type": "stdin_stdout", "input": "1\n264 695448956957126051\n", "output": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 ...
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\nVanya is managed to enter his fa...
[{"type": "stdin_stdout", "input": "20 5\nvSyC787KlIL8kZ2Uv5sw\nWKWOP\n7i8J3E8EByIq\nNW2VyGweL\nmyR2sRNu\nmXusPP0\nf4jgGxra\n4wHRzRhOCpEt\npPz9kybGb\nOtSpePCRoG5nkjZ2VxRy\nwHYsSttWbJkg\nKBOP9\nQfiOiFyHPPsw3GHo8J8\nxB8\nqCpehZEeEhdq\niOLjICK6\nQ91\nHmCsfMGTFKoFFnv238c\nJKjhg\ngkEUh\nKBOP9\n", "output": "3 11\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\nIn Berland a bus travels along t...
[{"type": "stdin_stdout", "input": "6\n2 3 5 7 9 11\n11\n1 2 2 3 3 4 4 5 5 5 6\n", "output": " 18\n"}, {"type": "stdin_stdout", "input": "6\n2 3 5 7 11 13\n9\n1 2 2 3 3 4 5 5 6\n", "output": " 16\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\nThis week Arkady wanted to cook ...
[{"type": "stdin_stdout", "input": "3\n6\n0 3 0 0 1 3\n10\n0 0 0 1 0 5 0 0 0 2\n3\n0 0 0\n", "output": "\n1 1 0 1 1 1 \n0 1 1 1 1 1 0 0 1 1 \n0 0 0 \n"}, {"type": "stdin_stdout", "input": "3\n6\n0 3 0 0 1 3\n10\n0 0 0 1 0 5 0 0 0 2\n3\n0 0 0\n", "output": "1 1 0 1 1 1 \n0 1 1 1 1 1 0 0 1 1 \n0 0 0 \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\nMs. Iyo Kiffa-Australis has a ba...
[{"type": "stdin_stdout", "input": "700 300 200\n993 200 300\n244 200 500\n275 111 330\n275 010 385\n694 375 1747\n3 1 10010\n0 0 0", "output": "1 3\n100 495\n25 28\n21 55\n1 11\n163 297\n3336 2\n"}, {"type": "stdin_stdout", "input": "700 300 200\n500 283 300\n349 200 500\n275 110 330\n275 010 385\n1067 344 4002\n3 1 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\nThere are n TV shows you want to...
[{"type": "stdin_stdout", "input": "10 798547896 459313948\n40312491 40315265\n40299842 40315264\n40296035 40315263\n40282844 40315262\n40304824 40315261\n40280414 40315260\n40299203 40315259\n40301967 40315258\n40276169 40315257\n40286575 40315256\n", "output": "236433977\n"}, {"type": "stdin_stdout", "input": "4 2882...
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\nPrint the K-th element of the fo...
[{"type": "stdin_stdout", "input": "16", "output": "14\n"}, {"type": "stdin_stdout", "input": "24", "output": "15\n"}, {"type": "stdin_stdout", "input": "32", "output": "51\n"}, {"type": "stdin_stdout", "input": "-22", "output": "2\n"}, {"type": "stdin_stdout", "input": "-27", "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\nIn the spring of 2014, a student...
[{"type": "stdin_stdout", "input": "3 1 -10\n-19\n-10\n-10", "output": "-27\n"}, {"type": "stdin_stdout", "input": "2 1 -10\n-19\n-10\n-10", "output": "-19\n"}, {"type": "stdin_stdout", "input": "3 1 -19\n-19\n-10\n-10", "output": "-39\n"}, {"type": "stdin_stdout", "input": "3 1 -19\n-19\n-10\n-18", "output": "-47\n"},...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe name of one small but proud ...
[{"type": "stdin_stdout", "input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne e\n", "output": "lellelleel\n"}, {"type": "stdin_stdout", "input": "10 10\nlellelleel\ne l\ne l\ne l\ne l\ne l\ne e\nl l\nl e\nl l\ne e\n", "output": "lellelleel\n"}, {"type": "stdin_stdout", "input": "10 10\nlellellee...
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\nVictor and Peter are playing hid...
[{"type": "stdin_stdout", "input": "-7366 1446\n-7727 -1428\n-2680 -3822 -5191 -5553\n-7304 -6313 -9229 1377\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "-4752 -3262\n-4582 6436\n-8997 -6490 -4630 1426\n-9865 -6697 -2371 -5622\n", "output": "YES"}, {"type": "stdin_stdout", "input": "-4752 -3262\n-4582 643...
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\nLimak is a little bear who loves...
[{"type": "stdin_stdout", "input": "170\n1 2 1 2 1 1 1 1 2 3 2 1 1 2 2 1 2 1 2 1 1 2 3 3 2 1 1 1 1 1 1 1 1 2 1 2 3 3 2 1 2 2 1 2 3 2 1 1 2 3 2 1 2 1 1 1 2 3 3 2 1 2 1 2 1 1 1 2 1 2 1 1 2 2 1 1 2 1 2 2 1 2 1 2 2 1 2 1 2 3 2 1 1 2 3 4 4 3 2 1 2 1 2 1 2 3 3 2 1 2 1 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 2 1 1 2 3 2 1 2 2 1 2 1 1 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\nOK, my warriors! Now that you be...
[{"input": "[1, 2, 3, 4, 5]\n[1, 2]\n[3, 4]\n[2, 3]", "output": "[[1, 3, 5, 2, 4]]", "fn_name": "shuffle_it"}, {"input": "[1, 2, 3, 4, 5]\n[1, 2]\n[3, 4]", "output": "[[1, 3, 2, 5, 4]]", "fn_name": "shuffle_it"}, {"input": "[1, 2, 3, 4, 5]\n[1, 2]", "output": "[[1, 3, 2, 4, 5]]", "fn_name": "shuffle_it"}, {"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\nGiven a string $s$ of length $n$...
[{"type": "stdin_stdout", "input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "92 5\nwwwwwwwwwwwwwwwwwgggggggggggggggbbbbyyyyyyyyyyyyyyjjjjjjjjjjjuuuuuuuuaaaaaaaaaaaafooooooooig\n", "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\nYou are the planning manager of ...
[{"type": "stdin_stdout", "input": "4\nakzakr 2 1 8\nfnmyi 5 2 3 4 6 9\ntsnukk 5 2 3 4 7 9\nyskwcnt 6 3 4 7 8 9 10\n4\nakzakr 1 2\nfnmyi 3 10 11 12\ntsnukk 2 1 8\nyskwcnt 2 1 8\n5\nknmmdk 2 13 19\nakmhmr 4 13 15 19 22\nmksyk 6 3 7 12 13 15 19\nskrkyk 3 1 4 8\ntmemm 3 1 17 24\n5\nknmmdk 5 5 6 16 18 26\nakmhmr 9 3 4 7 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\nRyouko is an extremely forgetful...
[{"type": "stdin_stdout", "input": "100 100\n28 28 28 34 28 28 28 40 28 28 28 28 28 28 28 28 28 28 28 28 28 28 47 28 28 28 28 28 28 28 28 28 28 28 28 28 19 28 28 28 28 28 28 28 28 28 28 28 28 28 46 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 49 28 28 28 28 28 28 28 31 28 28 28 28 28 28 28 28 28 28 28 28 28...
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 the programmer lives in th...
[{"type": "stdin_stdout", "input": "999999 1000000\n", "output": "Equal\n"}, {"type": "stdin_stdout", "input": "1000000 999993\n", "output": "Masha\n"}, {"type": "stdin_stdout", "input": "999997 1000000\n", "output": "Dasha\n"}, {"type": "stdin_stdout", "input": "459973 1000000\n", "output": "Dasha\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\nThe flag of Berland is such rect...
[{"type": "stdin_stdout", "input": "15 28\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBBBBBBBBB\nBBBBBBB...
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 consider equation:x^2 + s(...
[{"type": "stdin_stdout", "input": "160000001600000000\n", "output": "400000000\n"}, {"type": "stdin_stdout", "input": "250000002500000000\n", "output": "500000000\n"}, {"type": "stdin_stdout", "input": "360000003600000000\n", "output": "600000000\n"}, {"type": "stdin_stdout", "input": "490000004900000000\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\nThere are N boxes arranged in a ...
[{"type": "stdin_stdout", "input": "5\n12 26 12 10 8", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n6 11 12 10 8", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n6 16 12 10 8", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5\n6 26 12 10 8", "output": "NO\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 $\\text{$gcdSum$}$ of a posi...
[{"type": "stdin_stdout", "input": "3\n17\n110\n182\n", "output": "18\n110\n183\n"}, {"type": "stdin_stdout", "input": "3\n17\n110\n359\n", "output": "18\n110\n360\n"}, {"type": "stdin_stdout", "input": "3\n17\n100\n359\n", "output": "18\n102\n360\n"}, {"type": "stdin_stdout", "input": "3\n33\n100\n359\n", "output": "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\nAs shown in the following figure...
[{"type": "stdin_stdout", "input": "2,5,3\n3,6,1\n3,4,2\n4,5,2\n3,6,3\n1,4,1", "output": "75\n5\n"}, {"type": "stdin_stdout", "input": "2,5,3\n1,6,3\n3,4,2\n4,5,2\n3,6,3\n2,4,1", "output": "73\n5\n"}, {"type": "stdin_stdout", "input": "2,5,3\n3,6,1\n2,4,2\n4,5,2\n3,6,3\n1,4,1", "output": "76\n5\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\nMr. A wants to get to the destin...
[{"type": "stdin_stdout", "input": "196 2 133", "output": "133\n"}, {"type": "stdin_stdout", "input": "128 12 16", "output": "16\n"}, {"type": "stdin_stdout", "input": "134 22 13", "output": "13\n"}, {"type": "stdin_stdout", "input": "134 22 21", "output": "21\n"}, {"type": "stdin_stdout", "input": "50 40 68", "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\nDreamoon likes to play with sets...
[{"type": "stdin_stdout", "input": "3081 11\n", "output": "203335\n11 22 33 55\n77 88 99 121\n143 154 165 187\n209 220 231 253\n275 286 297 319\n341 352 363 385\n407 418 429 451\n473 484 495 517\n539 550 561 583\n605 616 627 649\n671 682 693 715\n737 748 759 781\n803 814 825 847\n869 880 891 913\n935 946 957 979\n1001 ...
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's telephone contains n pho...
[{"type": "stdin_stdout", "input": "100 20 100 10202\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwhwhhwhwwhhwhwhwwwhwwwwhwhwwwwhwhhhwhwhwww\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 20 100 19121\nwwwwhhwhhwhhwhhhhhwwwhhhwwwhwwhwhhwwhhwwwhwwhwwwhwhwhwwhhhwhwhhwhwwhhwhwhwwwhwwwwhwhwwww...
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 weighted undirec...
[{"type": "stdin_stdout", "input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n3 7 17\n3 8 226\n3 10 132\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 3 10\n"}, {"type": "stdin_stdout", "input": "10 10\n1 5 12\n2 4 140\n2 10 149\n3 6 154\n2 7 17\n3 8 226\n3 10 136\n4 10 55\n5 8 33\n7 8 173\n", "output": "1 5 8 7 2 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA set of four prime numbers arra...
[{"type": "stdin_stdout", "input": "13\n14\n15\n16\n17\n18\n19\n20\n10010\n0", "output": "13\n13\n13\n13\n13\n13\n19\n19\n9439\n"}, {"type": "stdin_stdout", "input": "13\n14\n15\n16\n17\n36\n19\n20\n10000\n0", "output": "13\n13\n13\n13\n13\n19\n19\n19\n9439\n"}, {"type": "stdin_stdout", "input": "13\n14\n15\n16\n27\n36...
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 list of unique words. Fi...
[{"input": "[\"abcd\", \"dcba\", \"lls\", \"s\", \"sssll\"]", "output": "[[[0, 1], [1, 0], [2, 4], [3, 2]]]", "fn_name": "palindrome_pairs"}, {"input": "[\"dog\", \"cow\", \"tap\", \"god\", \"pat\"]", "output": "[[[0, 3], [2, 4], [3, 0], [4, 2]]]", "fn_name": "palindrome_pairs"}, {"input": "[5777, \"dog\", \"god\", tru...
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 $n$ be a positive integer. L...
[{"type": "stdin_stdout", "input": "7\n2\n1 1 0\nRR\n2\n2 0 0\nSS\n2\n2 0 0\nRR\n3\n1 2 0\nRRR\n3\n2 1 0\nRRR\n1\n1 0 0\nP\n1\n1 0 0\nS\n", "output": "YES\nPR\nYES\nRR\nNO\nYES\nPPR\nNO\nNO\nYES\nR\n"}, {"type": "stdin_stdout", "input": "7\n2\n1 1 0\nRR\n2\n2 0 0\nSS\n2\n2 0 0\nRR\n3\n1 2 0\nRRR\n3\n2 1 0\nRRR\n1\n1 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\nIf I give you a date, can you te...
[{"input": "\"19000228\"", "output": "[\"Wednesday\"]", "fn_name": "day"}, {"input": "\"19000301\"", "output": "[\"Thursday\"]", "fn_name": "day"}, {"input": "\"20151208\"", "output": "[\"Tuesday\"]", "fn_name": "day"}, {"input": "\"20160301\"", "output": "[\"Tuesday\"]", "fn_name": "day"}, {"input": "\"20140728\"", "o...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke loves \"paper cutting\": h...
[{"type": "stdin_stdout", "input": "3\ncbaa\ndaacc\nacacac\n", "output": "aac\n"}, {"type": "stdin_stdout", "input": "3\ncacb\nccabe\n`cacbc", "output": "abcc\n"}, {"type": "stdin_stdout", "input": "3\ncaaa\ndaacc\nacacac", "output": "aac\n"}, {"type": "stdin_stdout", "input": "3\ncaca\ncca`d\nacacac", "output": "acc\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 the gym teacher in the s...
[{"type": "stdin_stdout", "input": "22\n100 100 100 1\n100 100 1 100\n100 0 100 1\n100 0 1 100\n2 0 1 2\n2 100 1 2\n2 0 2 1\n2 100 2 1\n100 0 1 2\n100 98 1 2\n100 97 1 2\n100 0 2 1\n100 98 2 1\n100 97 2 1\n100 0 99 100\n100 98 99 100\n100 97 99 100\n100 0 100 99\n100 98 100 99\n100 97 100 99\n100 0 13 37\n100 0 66 11\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\nMake the 2D list by the sequenti...
[{"input": "10000000000\n2\n2", "output": "[[[10000000000, 10000000001], [10000000002, 10000000003]]]", "fn_name": "make_2d_list"}, {"input": "2\n3\n4", "output": "[[[2, 3, 4, 5], [6, 7, 8, 9], [10, 11, 12, 13]]]", "fn_name": "make_2d_list"}, {"input": "5\n6\n1", "output": "[[[5], [6], [7], [8], [9], [10]]]", "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\nProfessor Abacus has just built ...
[{"type": "stdin_stdout", "input": "2\n1.0\n4.0\n14.21446074361601\n16.0\n25.0\n1\n-30.5893962764\n6.055835197262627\n39.3853798058\n74.3727663177\n0\n42.56611822314588\n79.5420238202\n28.0282396675\n-30.3627807522\n-49.34987576252381\n-25.34819013612247\n7.58575761381\n0\n-21.42163030108298\n-47.94509062430888\n-23.35...
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\nWith your birthday coming up soo...
[{"input": "\"happy birthday\"\n\"hhhappyyyy biirrrrrthddaaaayyyyyyy to youuuu\"", "output": "[7680]", "fn_name": "count_subsequences"}, {"input": "\"happy birthday\"\n\"hhaappyy bbiirrtthhddaayy\"", "output": "[2048]", "fn_name": "count_subsequences"}, {"input": "\"happy birthday\"\n\"appyh appy birth day\"", "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\nXenia is a girl being born a nob...
[{"type": "stdin_stdout", "input": "5\n2 2 3\n7 8\n6 3\n3 1 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\n6 7\n2 2 2\n1 2\n3 4\n6 7\n3 4 1\n3 2 1\n7 3 3 4\n12\n", "output": "14\n1999999996000000002\n24\n24\n122\n"}, {"type": "stdin_stdout", "input": "5\n2 2 3\n7 8\n6 3\n3 0 4\n1 1 1\n1\n1\n1000000000\n2 2 2\n0 2\n5 4\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\nN people are waiting in a single...
[{"type": "stdin_stdout", "input": "15\n4\n1\n4\n1\n3\n18\n4\n12\n5\n3\n6\n8\n15\n12\n9", "output": "43\n"}, {"type": "stdin_stdout", "input": "15\n4\n1\n4\n1\n3\n18\n4\n12\n5\n3\n3\n8\n15\n12\n9", "output": "42\n"}, {"type": "stdin_stdout", "input": "15\n4\n1\n4\n1\n3\n31\n4\n8\n5\n3\n6\n8\n15\n7\n9", "output": "46\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\nYour program fails again. This t...
[{"type": "stdin_stdout", "input": "100 100\n82 51 81 14 37 17 78 123 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 75 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 16 3 55 37 85 46 22 159 52 98 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\nAmugae has a sentence consisting...
[{"type": "stdin_stdout", "input": "9\nL M5 M5D M5DAYBl0r6gmttCTR M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAc M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVgg0xe M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re M5DAYBl0r6gmttCTRoKdM9EFrX22qBZpAczv7fKrVhg0xe09re\n", "output": "LM5D...
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 incoming messages fo...
[{"type": "stdin_stdout", "input": "108 576 610 844 573\n242 134 45 515 430 354 405 179 174 366 155 4 300 176 96 36 508 70 75 316 118 563 55 340 128 214 138 511 507 437 454 478 341 443 421 573 270 362 208 107 256 471 436 378 336 507 383 352 450 411 297 34 179 551 119 524 141 288 387 9 283 241 304 214 503 559 416 447 49...
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 plan view consisting ...
[{"type": "stdin_stdout", "input": "111100001111\n111000001111\n110000001110\n100000001111\n000100010000\n010000111010\n000001111100\n100011111110\n010101111100\n111000111000\n111100010000\n000000100000\n\n110001111100\n110010001010\n010010000001\n010000000001\n010000000110\n010000111000\n010000000000\n010000010010\n01...
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\nFlatland is inhabited by pixels ...
[{"type": "stdin_stdout", "input": "2147483630 2147483642 2147483610\n", "output": " 2147483630\n"}, {"type": "stdin_stdout", "input": "1944219055 454183506 1369298327\n", "output": " 1944219055\n"}, {"type": "stdi...
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\nMasa Kita, who entered the Unive...
[{"type": "stdin_stdout", "input": "3\n......\n......\n......\n......\n......\n......\n......\n......\n.RGB..\nRGOP..\nRGBPB.\nRGBPP.\nGBRGYP\nGBRRYP\nBGGRBB\nBPRGYY\nGGPRRY\nBYPPRB\nYGGGPB\nGYYYPR\nYRBRBR\nYBRBRB\nBRBRBR\nBRBRBR\n......\n......\n......\n......\n......\n......\n......\n......\n.....-\n......\n..OO..\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> [Run-length encoding](https://...
[{"input": "\"hello world!\"", "output": "[[[1, \"h\"], [1, \"e\"], [2, \"l\"], [1, \"o\"], [1, \" \"], [1, \"w\"], [1, \"o\"], [1, \"r\"], [1, \"l\"], [1, \"d\"], [1, \"!\"]]]", "fn_name": "run_length_encoding"}, {"input": "\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb\"", "output": "[[[34, \"a\"], [3, \"b\"]]]", "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\nConsider the following game:\n\n...
[{"type": "stdin_stdout", "input": "36 17", "output": "644469316\n"}, {"type": "stdin_stdout", "input": "36 18", "output": "653755501\n"}, {"type": "stdin_stdout", "input": "36 22", "output": "667405665\n"}, {"type": "stdin_stdout", "input": "59 22", "output": "723249007\n"}, {"type": "stdin_stdout", "input": "49 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\n**This Kata is intended as a sma...
[{"input": "\"Hello !Nhoj Want to have lunch?\"", "output": "[\"olleH johN! tnaW ot evah ?hcnul\"]", "fn_name": "reverse_sentence"}, {"input": "\"CodeWars rules!\"", "output": "[\"sraWedoC !selur\"]", "fn_name": "reverse_sentence"}, {"input": "\"1 2 3 4 5\"", "output": "[\"1 2 3 4 5\"]", "fn_name": "reverse_sentence"},...
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\nAsk a small girl - \"How old are...
[{"input": "\"2 years old\"", "output": "[2]", "fn_name": "get_age"}, {"input": "\"3 years old\"", "output": "[3]", "fn_name": "get_age"}, {"input": "\"4 years old\"", "output": "[4]", "fn_name": "get_age"}, {"input": "\"5 years old\"", "output": "[5]", "fn_name": "get_age"}, {"input": "\"6 years old\"", "output": "[6]...
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\nAmr loves Chemistry, and special...
[{"type": "stdin_stdout", "input": "20\n1 2 3 4 6 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 100000\n", "output": "113\n"}, {"type": "stdin_stdout", "input": "20\n1 2 3 4 6 8 16 32 64 128 256 512 1024 2048 3647 8192 16384 32768 65536 100000\n", "output": "124\n"}, {"type": "stdin_stdout", "input": "20...
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 an integer N.\nTakahash...
[{"type": "stdin_stdout", "input": "-1297", "output": "0.499614494988\n"}, {"type": "stdin_stdout", "input": "-1739", "output": "0.499712478436\n"}, {"type": "stdin_stdout", "input": "-2609", "output": "0.499808355692\n"}, {"type": "stdin_stdout", "input": "-4637", "output": "0.499892171663\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\nWe have N integers. The i-th num...
[{"type": "stdin_stdout", "input": "3\n6 10 15\n", "output": "setwise coprime\n"}, {"type": "stdin_stdout", "input": "3\n17 10 15", "output": "setwise coprime\n"}, {"type": "stdin_stdout", "input": "3\n26 10 15", "output": "setwise coprime\n"}, {"type": "stdin_stdout", "input": "3\n7 10 31", "output": "pairwise coprime...
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 define the sum of two perm...
[{"type": "stdin_stdout", "input": "84\n83 4 68 34 24 2 48 38 22 51 5 62 31 67 66 53 49 70 9 71 46 41 30 8 50 17 28 79 15 80 32 43 14 74 29 42 81 60 56 65 23 0 77 76 58 78 1 11 37 27 75 35 18 73 54 20 57 33 36 6 61 69 64 55 39 10 3 45 13 26 59 82 21 25 63 52 16 44 47 72 19 12 7 40\n63 41 80 52 36 45 17 69 22 66 37 21 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\nPolycarp loves geometric progres...
[{"type": "stdin_stdout", "input": "18 10\n10000000 100000000 1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 -10000000 -100000000 -1000000000 10000000 100000000 1000000000 10000000 100000000 1000000000\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "18 10\n10000000 100000000 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\nAlice and Bob are fighting over ...
[{"type": "stdin_stdout", "input": "10\nkdeuqunsa vylhazxgf filexjohs dxretqfqh ohbcgirwp cwayrtksq wqnfyvohb ymnjjkowo aqhlwnahs vlyjekfjs bbrqrvfmc ymlsmjoyl vjwpaipqo uzohwcqqb bgjkfkbkj esqcfdgkr crweugucm tfncjlbpo rnoadvokf xpzksknrl hqmxnzuof hlggnuusu lzvdzzalu jjsnrslhf tkhfpahcl gmgshdaia eczdyngqz ftumhnais ...
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 the great island of Baltia, t...
[{"type": "stdin_stdout", "input": "20 57\n13 14\n12 20\n18 3\n17 20\n15 9\n18 13\n12 19\n2 4\n9 2\n12 11\n14 1\n16 11\n11 14\n16 4\n16 15\n11 19\n15 4\n10 15\n12 5\n9 3\n10 2\n10 4\n20 19\n14 7\n19 2\n5 8\n6 14\n4 17\n2 17\n17 9\n13 9\n19 9\n18 8\n12 16\n18 5\n7 1\n8 3\n11 20\n6 13\n20 5\n13 8\n17 19\n7 6\n9 11\n18 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\nYou might have heard about the n...
[{"type": "stdin_stdout", "input": "636553724 546535019 115079316355948443\n", "output": "425992073 546535018\n"}, {"type": "stdin_stdout", "input": "548492800 434105920 179638683192075937\n", "output": "134679777 434105920\n"}, {"type": "stdin_stdout", "input": "595261150 794915864 332353903994901365\n", "output": "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\nTyndex is again well ahead of th...
[{"type": "stdin_stdout", "input": "20 10\niwbiucrjoj\nqvjewvdrgwgc\newwqyhtdzakryafqaacimthycyasyb\ncuoscayekvbsqokyfdmjnojkjennf\nhkuv\njtdgbespjdtbc\ngeulitsrlqihoujvwuobnfospq\nzphnlqxacchxhyeehnpfwdjnwvj\nxicsaoyfgtdbwqfrdgaiyn\natgshewfkuxaipizcdev\nvp\nyblkfmqsj\nyevxolvycyrrooosberqzrabefdckg\nrytykrlgttc\nafph...
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\nReturn a new array consisting of...
[{"input": "[-56, -85, 72, -26, -14, 76, -27, 72, 35, -21, -67, 87, 0, 21, 59, 27, -92, 68]", "output": "[[-85, 72, 0, 68]]", "fn_name": "multiple_of_index"}, {"input": "[28, 38, -44, -99, -13, -54, 77, -51]", "output": "[[38, -44, -99]]", "fn_name": "multiple_of_index"}, {"input": "[-1, -49, -1, 67, 8, -60, 39, 35]", ...
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 three integers n, ...
[{"type": "stdin_stdout", "input": "20 10 20\n6 8 384\n6 7 385\n6 10 128\n13 14 182\n15 19 0\n19 20 468\n20 20 477\n6 8 384\n17 20 16\n2 4 205\n6 6 899\n16 20 0\n20 20 477\n12 15 6\n9 11 513\n11 11 873\n16 19 0\n15 16 15\n7 9 180\n10 10 727\n", "output": "298754800\n"}, {"type": "stdin_stdout", "input": "20 10 20\n6 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\nPetya was late for the lesson to...
[{"type": "stdin_stdout", "input": "20\n20 34 51 40 70 64 14 30 24 20 6 1 70 28 38 43 9 60 31 69\n", "output": "2047\n"}, {"type": "stdin_stdout", "input": "20\n20 34 51 40 70 64 14 30 24 20 6 1 70 28 38 43 9 60 31 69\n", "output": "2047\n"}, {"type": "stdin_stdout", "input": "18\n22 41 40 8 36 48 23 5 58 12 26 44 53 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\nLet's call a number k-good if it...
[{"type": "stdin_stdout", "input": "10 6\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "10 6\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n1234560\n", "output": "10\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn case you might be unlucky eno...
[{"input": "[\"spirits of the dead attacking Gatsu and getting clanged for good\", \"but the wheel spirits where really made with bad CG\", \"Isidoro trying to steal the dragon Slayer and getting a sort of clang on his face\", \"Gatsu vs. the possessed horse: clang!\", \"Farnese whining again...\", \"a shame the episod...
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\nIt's tricky keeping track of who...
[{"input": "{\"A\": 20348, \"B\": 493045, \"C\": 2948, \"D\": 139847, \"E\": 48937534, \"F\": 1938724, \"G\": 4, \"H\": 2084}", "output": "[{\"A\": -6421468.75, \"B\": -5948771.75, \"C\": -6438868.75, \"D\": -6301969.75, \"E\": 42495717.25, \"F\": -4503092.75, \"G\": -6441812.75, \"H\": -6439732.75}]", "fn_name": "spli...
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\nZhinü was a child of the Emperor...
[{"type": "stdin_stdout", "input": "5\n0 4 0 2 9 3 4 8 2 -1\n3 8 -1 0 0 3 1 2 17 54\n1 2 1 2 41 2 17 21 11 0\n-2 2 14 24 0 21 1 14 20 4\n7 6 30 0 10 1 22 -2 8 -1", "output": "NG\nNG\nNG\nOK\nNG\n"}, {"type": "stdin_stdout", "input": "5\n0 4 -1 2 7 3 4 8 2 -1\n3 5 -1 0 0 3 0 6 8 62\n1 4 1 0 76 4 17 2 11 0\n-2 2 14 24 -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\nGiven an array of arguments, rep...
[{"input": "[[\"foo\"], \"bar\", [\"baz\", \"qux\"], [\"xyzzy\", \"a\"], \"a\", [\"a\"], [\"a\", \"plugh\"]]", "output": "[\"foo bar --baz qux --xyzzy a a a -a plugh\"]", "fn_name": "args_to_string"}, {"input": "[[\"---\"], \"---\", [\"---\", \"---\"], [\"-----\", \"-\"], \"-\", [\"-\"], [\"-\", \"-----\"]]", "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\nAtaru Oafoot of Aizu Gakuen Univ...
[{"type": "stdin_stdout", "input": "3 2 30 3 41 226\n9 0 18 4 20 118\n5 5 12 0 15 203\n13 4 19 2 22 197\n7 4 24 4 17 209\n0 0 0 0 0 0", "output": "172\n795\n410\n1199\n617\n"}, {"type": "stdin_stdout", "input": "3 2 30 3 41 226\n9 0 36 4 20 118\n5 5 12 0 18 203\n13 4 19 2 22 197\n1 4 42 4 17 209\n0 0 0 0 0 0", "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\nCreate a function that takes a s...
[{"input": "\"Hello World\"", "output": "[\"Ifmmp xpsmE\"]", "fn_name": "changer"}, {"input": "\"sponge1\"", "output": "[\"tqpOhf1\"]", "fn_name": "changer"}, {"input": "\"Cat30\"", "output": "[\"dbU30\"]", "fn_name": "changer"}, {"input": "\"Alice\"", "output": "[\"bmjdf\"]", "fn_name": "changer"}, {"input": "\"dogs\"...
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\nSanta Claus has n candies, he dr...
[{"type": "stdin_stdout", "input": "1000\n", "output": "44\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 54 \n"}, {"type": "stdin_stdout", "input": "990\n", "output": "44\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 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\nAfter battling Shikamaru, Tayuya...
[{"type": "stdin_stdout", "input": "58260522 32004256 2436426 24979445 61648772 23690081\n10\n582107247 906728404 411434947 673536177 411497300 488012525 1035611341 800305059 992325267 138720156\n", "output": "837678839\n"}, {"type": "stdin_stdout", "input": "58260522 32004256 2436426 24979445 12477970 11891566\n10\n58...
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 an array $a_1, a_2...
[{"type": "stdin_stdout", "input": "44 2 531595322\n926215961 -385821837 -278841122 -422772006 -509196878 -81824369 -101501043 -33095577 -520514931 402836017 48602657 881104200 -110528684 52550046 -208588735 -814534121 -548420443 410430115 -636402169 -848516069 -70639158 775203498 -679440929 -427359667 33598904 6568726...
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 an n × m matrix. The ...
[{"type": "stdin_stdout", "input": "10 10\n20 53 6 97 74 12 92 48 13 97\n157 47 32 75 21 69 75 95 54 1\n97 36 1 41 87 1 23 39 44 27\n97 73 1 1 26 6 3 48 69 5\n70 93 42 35 5 12 22 33 29 13\n96 8 13 69 40 91 5 19 16 33\n61 92 54 82 60 24 63 64 59 65\n76 44 60 37 29 16 50 74 59 59\n77 58 95 30 52 25 34 2 49 92\n37 65 12 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\nVasya is developing his own prog...
[{"type": "stdin_stdout", "input": "21\n try \n try \n try \n try \n try \n try \n try \n try \n try \n try \n throw( qtSMze) \ncatch(LY,\"x3 j\")\ncatch(hgSAFgbMGx,\"moByu\")\ncatch(LmydVQgv,\"hbZl\")\ncatch(oK,\"B6OZx qy\")\ncatch(rrtnRQB,\"7VFkQMv\")\ncatch(CASqQXaz,\"d9oci1Kx\")\ncatch(CTCzs...
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 $ M $ type ...
[{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1001", "output": "824796085\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 0001", "output": "276774580\n"}, {"type": "stdin_stdout", "input": "1000000000000000001 1000000000000000000 0001", "output": "314695265\...
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\nGiven an array of root...
[{"input": "[1, 2, 3, 4, 5]", "output": "[\"x^5 - 15x^4 + 85x^3 - 225x^2 + 274x - 120 = 0\"]", "fn_name": "polynomialize"}, {"input": "[0, -2, -3]", "output": "[\"x^3 + 5x^2 + 6x = 0\"]", "fn_name": "polynomialize"}, {"input": "[0, 2, 3]", "output": "[\"x^3 - 5x^2 + 6x = 0\"]", "fn_name": "polynomialize"}, {"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\nThe Rebel fleet is on the run. I...
[{"type": "stdin_stdout", "input": "30\n(89+76)/87\n(81+78)/18\n(60+97)/32\n(41+14)/48\n(55+65)/27\n(29+15)/95\n(64+13)/96\n(78+30)/75\n(43+6)/60\n(69+34)/48\n(62+2)/97\n(85+42)/3\n(4+97)/42\n(1+18)/39\n(46+55)/76\n(22+59)/24\n(62+81)/98\n(64+8)/51\n(9+59)/48\n(47+2)/80\n(33+74)/76\n(61+83)/44\n(86+4)/51\n(65+41)/49\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\nTaro is an elementary school stu...
[{"type": "stdin_stdout", "input": "2\n999999\n1000100", "output": "12\n2\n"}, {"type": "stdin_stdout", "input": "2\n999999\n1010100", "output": "12\n3\n"}, {"type": "stdin_stdout", "input": "2\n999999\n1010110", "output": "12\n5\n"}, {"type": "stdin_stdout", "input": "2\n999999\n1101100", "output": "12\n4\n"}, {"type"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string S consist...
[{"type": "stdin_stdout", "input": "resaremaerd", "output": "NO\n"}, {"type": "stdin_stdout", "input": "ersaremaerd", "output": "NO\n"}, {"type": "stdin_stdout", "input": "ersaremadrd", "output": "NO\n"}, {"type": "stdin_stdout", "input": "ersarfmadrd", "output": "NO\n"}, {"type": "stdin_stdout", "input": "errarfmadrd"...
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\nTenten runs a weapon shop for ni...
[{"type": "stdin_stdout", "input": "10\n+\n- 3\n+\n+\n+\n+\n- 1\n- 7\n- 9\n- 10\n+\n+\n+\n- 4\n- 5\n- 8\n+\n- 6\n+\n- 2\n", "output": "YES\n3 10 9 7 1 8 5 4 6 2 "}, {"type": "stdin_stdout", "input": "10\n+\n- 1\n+\n+\n+\n+\n- 1\n- 7\n- 9\n- 10\n+\n+\n+\n- 7\n- 10\n- 8\n+\n+\n- 6\n- 2\n", "output": "NO\n"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of positi...
[{"type": "stdin_stdout", "input": "34\n967614464 967614464 1000000000 1000000000 1000000000 1000000000 1000000000 1010000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
code_stdio