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\nTraining is indispensable for ac... | [{"type": "stdin_stdout", "input": "2\n1 3\n1 1\nRRRR\nRRGR\nRBRR\nRRRR", "output": "10\n"}, {"type": "stdin_stdout", "input": "2\n2 0\n1 1\nRRRR\nRRGR\nRBRR\nRRRR", "output": "16\n"}, {"type": "stdin_stdout", "input": "2\n2 0\n2 1\nRRRR\nRRGR\nRBRR\nRRRR", "output": "10\n"}, {"type": "stdin_stdout", "input": "2\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\nIn the official contest this pro... | [{"type": "stdin_stdout", "input": "20\n1306340891 192811911 592111899 609607891 585084800 601258511 223103775 164258550 858003275 230837577 971499807 312977833 344314550 397998873 558637732 216574673 913028292 1360238301 464376621 61315042\n", "output": "384683838\n"}, {"type": "stdin_stdout", "input": "20\n713900269 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 exists an island called Ar... | [{"type": "stdin_stdout", "input": "1000000000\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1902349577\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "0000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1065810635\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "1760197508\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\nVladik and Chloe decided to dete... | [{"type": "stdin_stdout", "input": "10000\n", "output": "10000 10001 100010000 "}, {"type": "stdin_stdout", "input": "17554\n", "output": "17554 17555 308160470\n"}, {"type": "stdin_stdout", "input": "10023\n", "output": "10023 10024 100470552\n"}, {"type": "stdin_stdout", "input": "19176\n", "output": "19176 19177 367... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently n students from city S ... | [{"type": "stdin_stdout", "input": "19\n1\n1 1\n1\n1 2\n1\n1 1000\n1\n1 2000\n1\n2 2\n1\n2 3\n1\n2 1000\n1\n2 2000\n1\n1999 1999\n1\n1999 2000\n1\n2000 2000\n2\n1 1\n1 1\n2\n1 1\n1 2\n2\n1 2\n1 1\n2\n1 2000\n1 1\n2\n1 1\n1 2000\n2\n1 2000\n2 2\n2\n2 2000\n2 2\n2\n2 2\n2 2000\n", "output": "1 \n1 \n1 \n1 \n2 \n2 \n2 \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\nIn this Kata, you will be given ... | [{"input": "\"v-(l+s)-(t+y)-(c+f)+(b-(n-p))\"", "output": "[\"v-l-s-t-y-c-f+b-n+p\"]", "fn_name": "solve"}, {"input": "\"x-(-((-((((-((-(-(-y)))))))))))\"", "output": "[\"x-y\"]", "fn_name": "solve"}, {"input": "\"q+(s-(x-o))-(t-(w-a))\"", "output": "[\"q+s-x+o-t+w-a\"]", "fn_name": "solve"}, {"input": "\"(((((((m-(-((... | 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\nProblem statement\n\nWe played a... | [{"type": "stdin_stdout", "input": "5\n0 1 0 3 4\n30 1 0 3 4\n90 2 0 6 8\n120 1 1 1 1\n132 2 1 2 2", "output": "5.00000000 1.00000000\n1.41421356 0.20000000"}, {"type": "stdin_stdout", "input": "5\n0 2 0 3 4\n16 1 0 1 4\n155 2 0 6 13\n103 1 1 1 1\n132 -1 1 1 2", "output": "10.295630 2.316667\n1.000000 0.483333\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\nPetya loves hockey very much. On... | [{"type": "stdin_stdout", "input": "100\nqn\nBE\nyN\nep\nPq\nXz\nLM\nEZ\ndb\nMn\nbn\nFe\nqA\nzc\nyq\npC\nyA\nWk\nYq\nrs\noD\nvD\nzW\nxZ\nbl\nur\nkf\ndf\nLS\nUW\nMy\nhR\nsh\nNh\nog\nCW\nor\nzo\nrO\nao\nXH\nDq\nKa\nlL\nYQ\nOh\nRZ\nAx\nta\nko\nDn\nNg\nNy\nDB\nYD\njO\nAp\nFT\noB\nNc\nwB\nHO\neW\nAc\nDr\nMt\nDf\nbF\nFP\nRa\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLeonid wants to become a glass c... | [{"type": "stdin_stdout", "input": "10 19 10\nV 6\nH 8\nV 4\nV 8\nH 2\nH 5\nV 9\nH 7\nH 3\nV 7\n", "output": "114\n66\n44\n44\n44\n44\n44\n44\n44\n44\n"}, {"type": "stdin_stdout", "input": "15 5 10\nV 13\nV 6\nV 3\nH 4\nV 12\nV 7\nV 2\nH 1\nV 4\nH 3\n", "output": "65\n35\n35\n28\n24\n20\n20\n15\n15\n10\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\nGiga Tower is the tallest and de... | [{"type": "stdin_stdout", "input": "-1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-1000000000\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "-1325769607\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "-1737641826\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "-4100583... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 received a notebook which is... | [{"type": "stdin_stdout", "input": "16 2\n999999999 999999999 999999999 856501885 1080831631 999999999 768581442 1196229362 999999999 999999999 1341911334 1890212075 1581621479 999999999 999999999 999999999\n", "output": "499999999 500000000 499999999 428250943 540415815 500000000 384290721 598114681 499999999 50000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEdward Leven loves multiples of ... | [{"type": "stdin_stdout", "input": "17819\n1011\n11011\n1234567891011121314151617181920\n0", "output": "1\n1\n4\n38\n"}, {"type": "stdin_stdout", "input": "17819\n1010\n11011\n1234567891011121314151617181920\n0", "output": "1\n0\n4\n38\n"}, {"type": "stdin_stdout", "input": "17819\n1011\n11011\n130083111483873165421240... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Back-Story\n\nEvery day I trav... | [{"input": "50.0\n120.0\n[[-1.0, 115.0], [-1.5, 110.0], [1.0, 130.0], [1.5, 130.0]]", "output": "[0]", "fn_name": "freeway_game"}, {"input": "50.0\n110.0\n[[-1.0, 110.0], [0.5, 110.0], [1.0, 110.0], [1.5, 110.0]]", "output": "[0]", "fn_name": "freeway_game"}, {"input": "30.0\n100.0\n[[-1.0, 110.0], [-0.7, 102.0], [-1.5... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn programming, hexadecimal nota... | [{"type": "stdin_stdout", "input": "A B\n", "output": "<\n"}, {"type": "stdin_stdout", "input": "E C\n", "output": ">\n"}, {"type": "stdin_stdout", "input": "F F\n", "output": "=\n"}, {"type": "stdin_stdout", "input": "E F", "output": "<\n"}, {"type": "stdin_stdout", "input": "A A", "output": "=\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\nSaMer has written the greatest t... | [{"type": "stdin_stdout", "input": "80\n8861 -8846 -3257 8263 -8045 4549 9626 -6582 5755 -3559 5813 -7411 9151 -1847 2441 4201 2381 4651 -6571 199 -6737 -6333 -9433 -4967 9041 -9319 6801 5813 -2731 -8599 7681 -1303 -7333 6067 -1847 -6333 6047 -7907 -7333 8677 -937 829 2441 -5702 -8045 -3037 -4882 -7703 9001 -5702 -2039... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA new e-mail service \"Berlandes... | [{"type": "stdin_stdout", "input": "10\nzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzzzzzz\nzzzzzzzzzzzzzzzzzzzzzzz... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJamie loves sleeping. One day, h... | [{"type": "stdin_stdout", "input": "42\n15 44\n", "output": "12\n"}, {"type": "stdin_stdout", "input": "26\n04 58\n", "output": "26\n"}, {"type": "stdin_stdout", "input": "35\n15 25\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "50\n01 59\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "46\n06 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\nYou are given a broken clock. Yo... | [{"type": "stdin_stdout", "input": "24\n17:30\n", "output": "17:30\n"}, {"type": "stdin_stdout", "input": "12\n17:30\n", "output": "07:30\n"}, {"type": "stdin_stdout", "input": "24\n99:99\n", "output": "09:09\n"}, {"type": "stdin_stdout", "input": "12\n05:54\n", "output": "05:54\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\nYou're given an undirected graph... | [{"type": "stdin_stdout", "input": "1460 5\n100 300\n200 735\n420 117\n559 450\n435 900\n", "output": "795\n"}, {"type": "stdin_stdout", "input": "1460 5\n101 300\n200 735\n420 117\n559 450\n435 900\n", "output": "794\n"}, {"type": "stdin_stdout", "input": "1460 5\n100 300\n200 735\n420 117\n559 450\n435 460\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 set of n points ... | [{"type": "stdin_stdout", "input": "50\n-38 -107\n-34 -75\n-200 -143\n-222 -139\n-34 55\n-102 -79\n48 -99\n2 -237\n-118 -167\n-56 -41\n10 17\n68 -89\n-32 41\n-100 -93\n84 -1\n86 -15\n46 -145\n-101 -117\n8 31\n-36 -61\n-12 21\n-116 79\n88 -205\n70 -103\n-78 -37\n106 -5\n-96 -201\n-60 -103\n-54 45\n-138 -177\n-178 -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\nTak performed the following acti... | [{"type": "stdin_stdout", "input": "100\n3 3\n1 1\n5 5\n4 4\n1 1\n3 3\n3 3\n5 5\n2 2\n3 3\n2 2\n2 2\n3 3\n3 3\n5 5\n3 3\n1 1\n3 3\n4 4\n1 1\n4 4\n3 3\n3 3\n4 4\n6 6\n5 5\n2 2\n6 6\n3 3\n1 1\n6 6\n4 4\n3 3\n3 3\n6 6\n2 2\n5 5\n5 5\n1 1\n1 1\n5 5\n6 6\n6 6\n4 4\n6 6\n6 6\n5 5\n3 3\n2 2\n1 1\n1 1\n4 4\n6 6\n5 5\n3 3\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\nVasya and Kolya play a game with... | [{"type": "stdin_stdout", "input": "cicdcdikggfdibkibjdcfgafkdbkjeddbfeacceegecdjeeaedigcjehdjekibjhfdidebkhagibgfiafejfdckcadgcacgbgbcekbcebgeccekejkdkecabakffakjhkjigbaddkbeagfkcacbebfccdgcdihgigcjchgdkfikhceaefibkagaaekj\n", "output": "0.44385026737967914\n"}, {"type": "stdin_stdout", "input": "cicdcdikggfdibkibjdcf... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n$n$ towns are arranged in a circ... | [{"type": "stdin_stdout", "input": "4\n3\n12 16 14\n1\n1\n3\n1 2 3\n6\n81 75 75 93 93 87\n", "output": "YES\n3 1 3 \nYES\n1 \nNO\nYES\n5 5 4 1 4 5 \n"}, {"type": "stdin_stdout", "input": "4\n3\n12 16 14\n1\n1\n3\n1 2 3\n6\n81 75 75 93 93 87\n", "output": "YES\n3 1 3 \nYES\n1 \nNO\nYES\n5 5 4 1 4 5 \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\nAn uppercase or lowercase Englis... | [{"type": "stdin_stdout", "input": "B\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "a\n", "output": "a\n"}, {"type": "stdin_stdout", "input": "A\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "G\n", "output": "A\n"}, {"type": "stdin_stdout", "input": "Y\n", "output": "A\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 the faculty of Computer... | [{"type": "stdin_stdout", "input": "5\n2043 2042 2041 2044 2040\n", "output": "2042\n"}, {"type": "stdin_stdout", "input": "5\n2012 2013 2014 2015 2016\n", "output": "2014\n"}, {"type": "stdin_stdout", "input": "5\n2011 2014 2012 2013 2010\n", "output": "2012\n"}, {"type": "stdin_stdout", "input": "5\n2014 2013 2011 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\nC: Short-circuit evaluation\n\np... | [{"type": "stdin_stdout", "input": "?&?&?|?|?&?", "output": "3 2\n"}, {"type": "stdin_stdout", "input": "?|?&?|?&?&?", "output": "3 1\n"}, {"type": "stdin_stdout", "input": "?&?&?|?&?|?", "output": "3 3\n"}, {"type": "stdin_stdout", "input": "?&?|?|?&?&?", "output": "3 2\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\nJATC loves Banh-mi (a Vietnamese... | [{"type": "stdin_stdout", "input": "10 8\n0110000110\n3 3\n1 10\n4 4\n1 8\n1 2\n9 10\n2 10\n3 9\n", "output": "1\n960\n0\n224\n2\n2\n480\n112\n"}, {"type": "stdin_stdout", "input": "10 8\n0110000110\n3 3\n1 10\n4 4\n1 8\n1 2\n9 10\n2 10\n3 9\n", "output": "1\n960\n0\n224\n2\n2\n480\n112\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\nOne of the simple ciphers is the... | [{"type": "stdin_stdout", "input": "1\nx eazqyp pnop pngtg ye obmpngt xmybp mr lygw", "output": "p submit that there is another point of view\n"}, {"type": "stdin_stdout", "input": "1\nx pyqzae pnop pngtg ye obmpngt xmybp mr lygw", "output": "p timbus that there is another point of view\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\nYou are given sequence a_1, a_2,... | [{"type": "stdin_stdout", "input": "10 6\n4 2 1 5 12 7 9 8 10 4\n1 3\n1 10\n2 10\n2 9\n5 5\n2 8\n", "output": "-1\n9\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "10 6\n4 2 1 5 6 7 9 8 10 4\n1 3\n1 10\n2 10\n2 9\n5 5\n2 8\n", "output": "-1\n9\n-1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "10 6\n4 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\nThis is a follow up from my kata... | [{"input": "\"this is a long string!! Please [encode] @C0RrEctly\"", "output": "[\"208919 919 1 1215147 1920189147!! 161251195 [51431545] @30181853201225\"]", "fn_name": "encode"}, {"input": "\"ZzzzZ\"", "output": "[\"2626262626\"]", "fn_name": "encode"}, {"input": "\"abc-#@5\"", "output": "[\"123-#@5\"]", "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\n`Description:`\n\nGiven an input... | [{"input": "2\n2\n4\n4\n6\n6\n9\n9\n9\n9", "output": "[[null, null, [2, 4, 6], null, [9], null, null, null, null, null, null]]", "fn_name": "bucketize"}, {"input": "16\n7\n5\n3\n6\n23", "output": "[[null, [3, 5, 6, 7, 16, 23], null, null, null, null, null]]", "fn_name": "bucketize"}, {"input": "77\n3\n40\n40\n40", "out... | 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\nAlperen is standing at the point... | [{"type": "stdin_stdout", "input": "9\n7\nUUURDDL\n2\nUR\n8\nRRRUUDDD\n3\nLLL\n4\nDUUR\n5\nRUDLL\n11\nLLLLDDRUDRD\n10\nLLLLDDRUDR\n5\nRUDLL\n", "output": "YES\nYES\nNO\nNO\nYES\nYES\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "7\n7\nUUURDDL\n2\nUR\n8\nRRRUUDDD\n3\nLLL\n4\nDUUR\n5\nRUDLL\n11\nLLLLDDRUDRD\n", "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\nWe will buy a product for N yen ... | [{"type": "stdin_stdout", "input": "1900\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "1001\n", "output": "999\n"}, {"type": "stdin_stdout", "input": "4575\n", "output": "425\n"}, {"type": "stdin_stdout", "input": "6426\n", "output": "574\n"}, {"type": "stdin_stdout", "input": "9445\n", "output": "555\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\nI: Ravage\n\nSanta Claus was cau... | [{"type": "stdin_stdout", "input": "4\n-1 2\n3 2\n-1 4\n-1 15", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 7\n-2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 2\n-2 2", "output": "3\n"}, {"type": "stdin_stdout", "input": "4\n-4 2\n0 10\n3 2\n-4 2", "output": "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\nOn a number axis directed from t... | [{"type": "stdin_stdout", "input": "15\n-241250505 -2\n-241250503 0\n-241250502 -5\n-241250501 -1\n-241250500 -3\n-241250499 2\n-241250498 -2\n-241250497 6\n-241250496 0\n-241250495 0\n-241250494 8\n-241250493 -5\n-241250492 7\n-241250491 -7\n-241250490 2\n", "output": "-20\n"}, {"type": "stdin_stdout", "input": "15\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\nIn order to put away old things ... | [{"type": "stdin_stdout", "input": "20180214 5\n", "output": "11\n 4 3 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\nWrite a program which reads a wo... | [{"type": "stdin_stdout", "input": "computer\nNurtures computer scientists and highly-skilled computer engineers\nwho will create and exploit \"knowledge\" for the enw era.\nProvides an outstanding computer environment.\nEND_OF_TEXT", "output": "3\n"}, {"type": "stdin_stdout", "input": "comquter\nNurtures computer scie... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKarlsson has visited Lillebror a... | [{"type": "stdin_stdout", "input": "O O .\n O O . .\n. . . . .\n . . . .\n . O .\n", "output": "Lillebror\n"}, {"type": "stdin_stdout", "input": ". . O\n . O O .\nO . O . O\n O O O O\n . . O\n", "output": "Lillebror\n"}, {"type": "stdin_stdout", "input": "O O O\n O . O .\nO . . O O\n O . O O\n O O O\n", "output": "L... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 solution of $ x ^ 3 = q $ is... | [{"type": "stdin_stdout", "input": "15\n153\n-1", "output": "2.466212\n5.348481\n"}, {"type": "stdin_stdout", "input": "15\n123\n-1", "output": "2.466212\n4.973190\n"}, {"type": "stdin_stdout", "input": "15\n194\n-1", "output": "2.466212\n5.788963\n"}, {"type": "stdin_stdout", "input": "15\n103\n-1", "output": "2.46621... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the given sequence with n di... | [{"type": "stdin_stdout", "input": "100 7\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71\n72... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 literally dozens of sn... | [{"type": "stdin_stdout", "input": "50\nPFH\nJFV->PFH\nBVP->PFH\nPFH->BVP\nPFH->JFV\nPFH->ETQ\nPFH->LQJ\nZTO->PFH\nPFH->BVP\nPFH->RXO\nPFH->ZTO\nHWL->PFH\nPFH->HIV\nPFH->AFP\nPFH->HWL\nOBB->PFH\nHIV->PFH\nPFH->LSR\nAFP->PFH\nLQJ->PFH\nHWL->PFH\nETQ->PFH\nPFH->HWL\nLSR->PFH\nWBR->PFH\nBNZ->PFH\nHQR->PFH\nZTO->PFH\nPFH->... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 array $a$ of lengt... | [{"type": "stdin_stdout", "input": "39 1\n4 2 1 1 3 5 1 5 1 1 3 3 4 3 1 1 4 5 1 5 2 3 3 1 5 1 2 1 1 4 1 1 5 2 2 1 1 2 4\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "39 1\n4 2 1 1 3 5 1 5 1 1 3 3 4 3 1 1 4 5 1 5 2 3 3 1 5 1 2 1 1 4 1 1 5 2 2 1 1 2 4\n", "output": "19\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\nThere are N integers X_1, X_2, \... | [{"type": "stdin_stdout", "input": "3\n111 110\n111 11100\n-2 1111011010", "output": "10990\n"}, {"type": "stdin_stdout", "input": "3\n011 110\n111 11100\n-2 1111011010", "output": "11090\n"}, {"type": "stdin_stdout", "input": "3\n010 110\n111 11100\n-2 1111011010", "output": "11091\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\nConvert integers to binary as si... | [{"input": "-999999", "output": "[\"11111111111100001011110111000001\"]", "fn_name": "to_binary"}, {"input": "-1000", "output": "[\"11111111111111111111110000011000\"]", "fn_name": "to_binary"}, {"input": "-15", "output": "[\"11111111111111111111111111110001\"]", "fn_name": "to_binary"}, {"input": "-3", "output": "[\"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\n# How many ways can you make the... | [{"input": "275", "output": "[1520980492851175]", "fn_name": "exp_sum"}, {"input": "200", "output": "[3972999029388]", "fn_name": "exp_sum"}, {"input": "90", "output": "[56634173]", "fn_name": "exp_sum"}, {"input": "70", "output": "[4087968]", "fn_name": "exp_sum"}, {"input": "60", "output": "[966467]", "fn_name": "exp... | 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 the year 4527 and the tanks... | [{"type": "stdin_stdout", "input": "6\n1000000000000000000000000000000000000 11965651543 1000000000000000000000000000000000000 1000000000000000000000000000000000000 1000000000000000000000000000000000000 1000000000000000000000000000000000000\n", "output": "1196565154300000000000000000000000000000000000000000000000000000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 piles of stones of s... | [{"type": "stdin_stdout", "input": "2\n2 9\n5\n4 10 7 3 4\n", "output": " 2 2 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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "3\n3\n1 5\n2 10\n2 15\n7\n0 1\n3 1\n1 1\n6 1\n1 1\n4 1\n4 1\n6\n2 6\n2 3\n2 15\n2 7\n4 4\n5 5\n", "output": "10\n0\n7\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 5\n2 10\n2 4\n7\n0 1\n3 1\n1 1\n6 1\n1 1\n4 1\n4 1\n6\n2 6\n2 3\n2 14\n2 1\n4 4\n5 5\n", "output": "4\n0\n4\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAtCoDeer the deer has N square t... | [{"type": "stdin_stdout", "input": "400\n196 345 527 695\n685 207 136 831\n303 497 409 762\n464 670 120 403\n867 799 702 490\n986 9 287 852\n519 89 617 973\n291 551 957 275\n329 210 75 744\n685 560 225 510\n568 429 313 112\n94 659 30 204\n51 891 791 326\n890 977 807 600\n203 468 753 791\n738 279 376 58\n377 694 954 955... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 prints the... | [{"type": "stdin_stdout", "input": "1 -2\n3 2\n-2 0", "output": "0.53907943898209422325 -0.26437392711448356856 1.18845545916395465278"}, {"type": "stdin_stdout", "input": "0 3\n4 0\n0 0", "output": "1.00000000000000000000 1.00000000000000000000 1.00000000000000000000"}, {"type": "stdin_stdout", "input": "1 6\n-1 -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\nThe academic year has just begun... | [{"type": "stdin_stdout", "input": "50\nUUUUUUUUUUUUUUUUUUUUUUUUUDDDDDDDDDDDDDDDDDDDDDDDDD\n", "output": "51 102 153 204 255 306 357 408 459 510 561 612 663 714 765 816 867 918 969 1020 1071 1122 1173 1224 1275 1275 1224 1173 1122 1071 1020 969 918 867 816 765 714 663 612 561 510 459 408 357 306 255 204 153 102 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\nMr. Bender has a digital table o... | [{"type": "stdin_stdout", "input": "1000000000 504951981 646612086 602763371\n", "output": "17360\n"}, {"type": "stdin_stdout", "input": "1000000000 999999946 999999941 715189365\n", "output": "37707\n"}, {"type": "stdin_stdout", "input": "1000000000 999999916 999999940 857945620\n", "output": "41279\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\nTakahashi is competing in a sumo... | [{"type": "stdin_stdout", "input": "xoxoxoxoxoxoxo", "output": "YES\n"}, {"type": "stdin_stdout", "input": "oxoxowoxoxoxox", "output": "YES\n"}, {"type": "stdin_stdout", "input": "oxoxowoooxoxxx", "output": "YES\n"}, {"type": "stdin_stdout", "input": "xxxoxooowoxoxo", "output": "YES\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\nJohn has just bought a new car a... | [{"type": "stdin_stdout", "input": "4\n1 2\n2 3\n3 4\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n2 3\n3 4\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n1 3\n3 4\n", "output": "24\n"}, {"type": "stdin_stdout", "input": "4\n1 2\n2 3\n2 4\n", "output": "14\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\nXenia lives in a city that has n... | [{"type": "stdin_stdout", "input": "100 100\n48 73 63 16 49 88 36 17 66 6 87 13 94 52 58 70 71 52 7 70 25 42 24 36 57 9 79 26 75 39 13 14 38 26 33 66 88 28 75 98 53 48 67 54 63 25 69 87 88 32 72 17 36 35 29 67 74 89 70 47 20 90 78 13 94 57 32 73 29 74 45 78 85 64 81 56 12 65 19 67 34 86 55 71 41 33 76 13 100 47 44 76 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\nA string is called a KEYENCE str... | [{"type": "stdin_stdout", "input": "eeyofscienck", "output": "NO\n"}, {"type": "stdin_stdout", "input": "eeyofsciencj", "output": "NO\n"}, {"type": "stdin_stdout", "input": "eeyofscienci", "output": "NO\n"}, {"type": "stdin_stdout", "input": "eeyofscjenci", "output": "NO\n"}, {"type": "stdin_stdout", "input": "icnejcsf... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 English and programming, grou... | [{"input": "\"{[{}[]()[]{}{}{}{}{}{}()()()()()()()()]{{{[[[((()))]]]}}}}(())[[]]{{}}[][][][][][][]({[]})\"", "output": "[true]", "fn_name": "group_check"}, {"input": "\"{{{{{{{{{{{((((((([])))))))}}}}}}}}}}\"", "output": "[false]", "fn_name": "group_check"}, {"input": "\"[{}{}())\"", "output": "[false]", "fn_name": "gr... | 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\nOleg's favorite subjects are His... | [{"type": "stdin_stdout", "input": "10\n238517256500070918 988176216\n363959778883784349 933416507\n631238591652944446 530795521\n557307185726829409 1481431174\n86402035814143715 513728064\n101626841876448103 26556040\n598448092106640578 746411314\n733629261048200000 361714100\n624561301519202735 38\n106258810456388771... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEdo has got a collection of n re... | [{"type": "stdin_stdout", "input": "20 5\n1 12 21 22\n9 10 15 20\n10 12 12 20\n1 1 25 29\n5 10 21 22\n4 9 16 25\n12 10 14 24\n3 3 19 27\n3 4 23 28\n12 1 11 31\n9 14 17 18\n8 12 14 20\n8 11 18 19\n12 3 14 29\n7 8 13 22\n6 4 16 30\n11 3 13 27\n9 16 15 18\n6 13 14 21\n9 12 15 22\n", "output": "4\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\nYou are given a permutation of n... | [{"type": "stdin_stdout", "input": "100\n1 65 33 97 17 81 49 11 73 41 25 89 57 5 69 39 21 85 53 13 77 45 29 93 61 3 67 60 99 19 83 51 11 75 43 27 91 59 7 71 39 23 87 55 15 79 47 31 2 95 63 66 34 98 18 82 50 10 74 42 26 90 58 6 70 38 22 86 54 14 78 46 30 94 62 4 68 36 100 20 84 52 12 76 44 28 92 60 8 72 40 24 88 56 16 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 has k matches, placed in n... | [{"type": "stdin_stdout", "input": "100\n6 3 4 5 3 4 2 4 1 2 4 1 8 5 2 2 4 4 6 8 4 10 4 4 6 8 6 5 5 4 8 4 3 3 6 5 7 2 9 7 6 5 6 3 2 6 8 10 3 6 8 7 2 3 5 4 8 6 5 6 6 8 4 1 5 6 1 8 12 5 3 3 8 2 4 2 4 5 6 6 9 5 1 2 8 8 3 7 5 3 4 5 7 6 3 9 4 6 3 6\n", "output": "867\n"}, {"type": "stdin_stdout", "input": "100\n6 3 4 5 3 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\nComplete the function/method so ... | [{"input": "\"My3CodeIs4TimesBetter\"", "output": "[\"my3_code_is4_times_better\"]", "fn_name": "to_underscore"}, {"input": "\"ThisIsBeautifulDay\"", "output": "[\"this_is_beautiful_day\"]", "fn_name": "to_underscore"}, {"input": "\"TestController\"", "output": "[\"test_controller\"]", "fn_name": "to_underscore"}, {"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\nYou are given a string S consist... | [{"type": "stdin_stdout", "input": "dreamereraserdreamererasereraseeraserdreamererasereraserdreamdreamerdreamerdreamerdreamererasedreamereraseeraserdreamereraserdreamereraseeraserdreamdreamdreamerdreamerdreamerdreamdreamerdreameraseerasedreamererasererasererasedreamereraseerasererasedreamerasereraserdreamerdreamerasedr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ houses along the r... | [{"type": "stdin_stdout", "input": "100 100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 109 47 21 78 20 63 13 49 76 36 41 79 16 87 87 69 3 76 80 60 100 62 70 59 72 8 38 71 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 9 3 55 37 85 46 22 84 52 98 41 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 X has met the following p... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000000 1999999999999999999"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000000 1999999999999999999"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000000 199... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWabbit is playing a game with $n... | [{"type": "stdin_stdout", "input": "70 2\n1 1 1 1 1 -1 -1 -1 -1 -1 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3\n", "output": "-1685\n"}, {"type": "stdin_stdout", "input": "10 3\n950 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\nRecently, a start up by two stud... | [{"type": "stdin_stdout", "input": "OVWIHIWVYXMVAAAATOXWOIUUHYXHIHHVUIOOXWHOXTUUMUUVHVWWYUTIAUAITAOMHXWMTTOIVMIVOTHOVOIOHYHAOXWAUVWAVIVM\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "QDPINBMCRFWXPDBFGOZVVOCEMJRUCTOADEWEGTVBVBFWWRPGYEEYGPRWWFBVBVTGEWEDAOTCURJMECOVVZOGFBDPXWFRCMBNIPDQ\n", "output": "NO\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string S of leng... | [{"type": "stdin_stdout", "input": "acc", "output": "cca\n"}, {"type": "stdin_stdout", "input": "acb", "output": "bca\n"}, {"type": "stdin_stdout", "input": "adb", "output": "bda\n"}, {"type": "stdin_stdout", "input": "`cb", "output": "bc`\n"}, {"type": "stdin_stdout", "input": "bc`", "output": "`cb\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\nYou are given a string, consisti... | [{"type": "stdin_stdout", "input": "100\nc\nda\na\nee\ned\ndb\nece\nab\nabe\nd\neeb\na\nbab\nbbd\nc\ncab\nc\nbda\ndb\ncca\nbcd\nbae\neb\nde\ndc\naee\nada\nba\nab\nde\ned\nae\nbc\nbec\ndae\nc\nb\ndab\nd\na\ndbd\nda\nb\ne\nde\nbe\nc\na\nb\nc\nbac\nee\nb\ncce\nc\nde\nc\ndee\ned\ncb\nb\ndc\ncc\na\neb\nec\nbcd\na\ndc\nf\nce... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays: an arr... | [{"type": "stdin_stdout", "input": "17 10\n465 868 29 633 291 357 62 929 22 124 182 995 903 75 71 924 416\n", "output": "611\n"}, {"type": "stdin_stdout", "input": "1 1\n1000000000000\n", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "7 4\n1 10000 1 1 1 1 10000\n", "output": "7500\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\nIn this problem at each moment y... | [{"type": "stdin_stdout", "input": "20\n1 1208 1583\n1 -258 729\n1 -409 1201\n1 194 1938\n1 -958 1575\n1 -1466 1752\n2 1 2\n2 1 2\n2 6 5\n1 -1870 1881\n1 -2002 2749\n1 -2002 2984\n1 -2002 3293\n2 2 4\n2 8 10\n2 9 6\n1 -2002 3572\n1 -2002 4175\n1 -2002 4452\n1 -2002 4605\n", "output": "YES\nYES\nYES\nYES\nYES\nNO\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\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\n987654329876... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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## Overview\nResistors are elect... | [{"input": "\"yellow violet brown silver\"", "output": "[\"470 ohms, 10%\"]", "fn_name": "decode_resistor_colors"}, {"input": "\"orange orange yellow gold\"", "output": "[\"330k ohms, 5%\"]", "fn_name": "decode_resistor_colors"}, {"input": "\"yellow violet orange gold\"", "output": "[\"47k ohms, 5%\"]", "fn_name": "dec... | 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\nImpliment the reverse function, ... | [{"input": "12005000", "output": "[50021]", "fn_name": "reverse"}, {"input": "1234", "output": "[4321]", "fn_name": "reverse"}, {"input": "4321", "output": "[1234]", "fn_name": "reverse"}, {"input": "1001", "output": "[1001]", "fn_name": "reverse"}, {"input": "1010", "output": "[101]", "fn_name": "reverse"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA new delivery of clothing has a... | [{"type": "stdin_stdout", "input": "100000\n100000\n100000\n100000\n1000\n1000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000\n100000\n100000\n100000\n1000\n1000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "100000\n100000\n100100\n100000\n1000\n1000\n", "output": "100000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# The museum of incredible dull ... | [{"input": "[1, 2, 3, 4, 5]", "output": "[[2, 3, 4, 5]]", "fn_name": "remove_smallest"}, {"input": "[5, 3, 2, 1, 4]", "output": "[[5, 3, 2, 4]]", "fn_name": "remove_smallest"}, {"input": "[1, 2, 3, 1, 1]", "output": "[[2, 3, 1, 1]]", "fn_name": "remove_smallest"}, {"input": "[1, 2, 3, 4]", "output": "[[2, 3, 4]]", "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\nAmong Johnny's numerous hobbies,... | [{"type": "stdin_stdout", "input": "6\n4\n1 0 2 5\n6\n10 7 14 16 0 12\n2\n0 1\n3\n1 2 6\n6\n1 4 6 10 11 20\n2\n0 1023\n", "output": "-1\n-1\n1\n-1\n-1\n1023\n"}, {"type": "stdin_stdout", "input": "6\n4\n1 0 2 6\n6\n10 7 27 16 1 12\n2\n0 1\n3\n1 2 6\n6\n0 8 6 10 11 33\n2\n0 1023\n", "output": "-1\n11\n1\n-1\n-1\n1023\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 that takes... | [{"input": "[\"Chad\", \"Morocco\", \"India\", \"Algeria\", \"Botswana\", \"Bahamas\", \"Ecuador\", \"Micronesia\"]", "output": "[\"Codewars\"]", "fn_name": "nth_char"}, {"input": "[\"yoda\", \"best\", \"has\"]", "output": "[\"yes\"]", "fn_name": "nth_char"}, {"input": "[\"No\", \"No\"]", "output": "[\"No\"]", "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\nYou are the Dungeon Master for a... | [{"input": "\"Amelia, 8165254325, Jessie, 9187162345, Marcus Kaine, 8018273245\"", "output": "[[{\"player\": \"Amelia\", \"contact\": 8165254325}, {\"player\": \"Jessie\", \"contact\": 9187162345}, {\"player\": \"Marcus Kaine\", \"contact\": 8018273245}]]", "fn_name": "player_manager"}, {"input": "\"jane, 801, dave, 12... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA group of $n$ dancers rehearses... | [{"type": "stdin_stdout", "input": "20 53 67\n1 2 1 2 0 0 0 2 2 2 1 0 0 2 0 0 0 1 1 2\n", "output": "413\n"}, {"type": "stdin_stdout", "input": "20 53 67\n1 2 1 2 0 0 0 2 2 2 1 0 0 2 0 0 0 1 1 2\n", "output": "413\n"}, {"type": "stdin_stdout", "input": "20 53 67\n1 2 1 2 0 0 0 2 2 2 1 0 0 2 0 0 1 1 1 2\n", "output": "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\n'Twas the night before Christmas... | [{"type": "stdin_stdout", "input": "4\n6 5\n1 2 -1\n1 3 1\n4 2 7\n6 3 0\n2 5 -1\n2 3 1\n2 5 0\n5 6 1\n6 1 1\n4 5 1\n5 3\n1 2 -1\n1 3 -1\n1 4 1\n4 5 -1\n2 4 0\n3 4 1\n2 3 1\n3 3\n1 2 -1\n1 3 -1\n2 2 0\n1 3 1\n2 3 0\n2 0\n1 2 1\n1 2 0\n", "output": "YES\n1 2 0\n1 3 1\n4 2 7\n6 3 0\n2 5 0\nYES\n1 2 1\n1 3 0\n1 4 1\n4 5 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\nCount the pairs of length-N sequ... | [{"type": "stdin_stdout", "input": "141421 356237\n", "output": "881613484\n"}, {"type": "stdin_stdout", "input": "500000 500000\n", "output": "869509376\n"}, {"type": "stdin_stdout", "input": "436426 479445\n", "output": "710501305\n"}, {"type": "stdin_stdout", "input": "148772 190081\n", "output": "685499830\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\nPolycarp is crazy about round nu... | [{"type": "stdin_stdout", "input": "1000000001 10\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "1234567890 14\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "1000999999 3\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "1090090090 5\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "12... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Aizu Shingakujuku, students a... | [{"type": "stdin_stdout", "input": "4\n100 217 28\n253 43 197\n18 34 24\n19 22 189\n2\n190 106 20\n66 72 171\n0", "output": "A\nA\nC\nB\nA\nA\n"}, {"type": "stdin_stdout", "input": "4\n100 137 28\n143 43 197\n18 34 24\n19 19 65\n2\n196 106 20\n66 72 171\n0", "output": "A\nA\nC\nC\nA\nA\n"}, {"type": "stdin_stdout", "in... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDoor's family is going celebrate... | [{"type": "stdin_stdout", "input": "21\n...CCC.....CC..C..C.C\n..CCC...CC...CC.CCC.C\n....C.C.C..CCC..C.C.C\n....CCC..C..C.CC.CCC.\n...CCC.C..C.C.....CCC\n.CCC.....CCC..C...C.C\nCCCC.C...CCC.C...C.CC\nC..C...C.CCC..CC..C..\nC...CC..C.C.CC..C.CC.\nCC..CCCCCCCCC..C....C\n.C..CCCC.CCCC.CCC...C\nCCC...CCC...CCC.C..C.\n.CCC... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a number ebne (even... | [{"type": "stdin_stdout", "input": "36\n6\n165310\n6\n177978\n6\n211759\n6\n212643\n6\n229540\n6\n250029\n6\n211519\n6\n256097\n6\n163478\n5\n91505\n5\n79280\n6\n260629\n6\n128051\n6\n121972\n6\n261633\n6\n172044\n6\n119055\n6\n208323\n6\n149942\n6\n161236\n6\n177150\n6\n233766\n5\n97949\n6\n230107\n6\n175822\n6\n21354... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an arcade, Takahashi is playi... | [{"type": "stdin_stdout", "input": "99901 2\n3193 1797 2772\nssrprrspsrprsrpsrprsssprrsrssrrprppprrrrrrrsprrrrsprsprsspsspprrrrpprsrprrrrpsspprrrspspsprprprprrpprppsrspprrsssssprsrrsrrsssppsprsrprpprpspppsprrspsspsppsrpspprpprsrsrssrrrrprspprpprrspssprsrrsppsrsrpssprsssprspppspspssrrpsrprpsrpprsrpppsprssssprsrrrrpsrprr... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 next \"Data Structures and A... | [{"type": "stdin_stdout", "input": "100\n102 157 177 149 138 193 19 74 127 156 128 122 6 101 154 92 24 188 51 89 18 77 112 100 65 11 113 173 79 124 102 81 11 171 114 43 60 168 44 86 87 82 177 8 12 181 139 121 140 28 108 17 173 63 18 4 148 125 117 153 193 180 188 142 46 75 163 126 128 22 32 163 164 1 161 19 162 59 190 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\nAhmed and Mostafa used to compet... | [{"type": "stdin_stdout", "input": "14 14\n6 -1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 2 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 1\n6 1 1 1 1 1 -1\n1 2 3 4 5 6 7 8 9 10 11 12 13 14\n", "output": "83\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«Bersoft» company is working on ... | [{"type": "stdin_stdout", "input": "713,572,318,890,577,657,646,146,373,783,392,229,455,871,20,593,573,336,26,381,280,916,907,732,820,713,111,840,570,446,184,711,481,399,788,647,492,15,40,530,549,506,719,782,126,20,778,996,712,761,9,74,812,418,488,175,103,585,900,3,604,521,509,513,145,708,990,361,682,827,791,22,596,780... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ rectangles, ea... | [{"type": "stdin_stdout", "input": "2\n5 20\n1 2 16 2 8\n6 12\n4 8 8 4 2 8\n", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "2\n5 13\n2 2 8 2 8\n6 23\n1 16 8 2 2 1\n", "output": "2\n2\n"}, {"type": "stdin_stdout", "input": "2\n5 16\n1 2 8 4 8\n6 10\n2 8 8 2 2 8\n", "output": "\n2\n3\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\nA social network for dogs called... | [{"type": "stdin_stdout", "input": "10 10\n999999991 1000000000\n999999992 1000000000\n999999993 1000000000\n999999994 1000000000\n999999995 1000000000\n999999996 1000000000\n999999997 1000000000\n999999998 1000000000\n999999999 1000000000\n1000000000 1000000000\n", "output": "1999999991\n1999999992\n1999999993\n199999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 very experienced problem wri... | [{"type": "stdin_stdout", "input": "255+255+255+255+255+255+255+255+255+255\n", "output": "-42450\n"}, {"type": "stdin_stdout", "input": "101+200+195+231+107+222+146+254+160+209\n", "output": "-43175\n"}, {"type": "stdin_stdout", "input": "101+200+195+231+107+222+146+254+160+209\n", "output": "-43175\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\nRecently Lynyrd and Skynyrd went... | [{"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 1 2 3\n1 6\n2 6\n3 5\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 2 2 3\n1 5\n2 6\n3 5\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n2 2 3 1 2 3\n1 6\n2 6\n3 5\n", "output": "110\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\nPetya and Vasya are tossing a co... | [{"type": "stdin_stdout", "input": "100 100 1 1\n", "output": "4950\n2 1\n3 1\n3 2\n4 1\n4 2\n4 3\n5 1\n5 2\n5 3\n5 4\n6 1\n6 2\n6 3\n6 4\n6 5\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 7\n9 1\n9 2\n9 3\n9 4\n9 5\n9 6\n9 7\n9 8\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n10 7\n10 8\n10 9\n11 1\n11 2\n11 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\nWhen Sasha was studying in the s... | [{"type": "stdin_stdout", "input": "ZUBQNDCHHKWNWRVSDSRRRTGZDDPNTVJFKTCNGWND\n", "output": "7.53208608\n"}, {"type": "stdin_stdout", "input": "DNWGNBTKNJVTNPDDZGTRRRSDSVRDFWKHHBWNQBUY\n", "output": "11.8106291\n"}, {"type": "stdin_stdout", "input": "DNWGNBTKNJVTNQDDZGTRRRSDSVRDFWKHHBWNQBUY\n", "output": "11.8106291\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\nKsusha the Squirrel is standing ... | [{"type": "stdin_stdout", "input": "10 3\n..........\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 3\n..........\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 1\n..........\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "10 4\n..........\n", "output": "YES\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\nVasya has a sequence a consistin... | [{"type": "stdin_stdout", "input": "5\n1000000000000000000 352839520853234088 165431853141398699 753467583475385837 895062156280564685\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "5\n1000000000000000000 352839520853234088 257894004782222768 753467583475385837 895062156280564685\n", "output": "4\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\nThe only difference between the ... | [{"type": "stdin_stdout", "input": "15\n3 5 2 5 3 2 2 5 5 4 5 5 1 3 1\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "11\n2 3 10 3 3 8 9 2 11 10 3\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "11\n10 5 8 8 2 7 9 3 5 1 10\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "8\n1 2 4 1 4 5 4 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\nPalindrome\n\nProblem Statement\... | [{"type": "stdin_stdout", "input": "4752", "output": "4774\n"}, {"type": "stdin_stdout", "input": "8517", "output": "8558\n"}, {"type": "stdin_stdout", "input": "3483", "output": "3443\n"}, {"type": "stdin_stdout", "input": "1868", "output": "1881\n"}, {"type": "stdin_stdout", "input": "2667", "output": "2662\n"}, {"ty... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.