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\nIvan wants to have a good dinner...
[{"type": "stdin_stdout", "input": "5 5 5 5\n836 776 809 618 397\n121 629 373 169 333\n589 439 410 388 446\n936 472 433 647 791\n25\n1 2\n4 5\n5 4\n4 1\n3 5\n5 2\n2 4\n3 4\n3 3\n3 2\n4 4\n4 3\n1 1\n1 4\n5 1\n2 3\n1 5\n5 5\n2 5\n3 1\n2 1\n2 2\n1 3\n5 3\n4 2\n25\n1 1\n5 4\n4 1\n1 2\n1 4\n2 3\n3 3\n4 3\n2 2\n5 3\n2 1\n1 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\nA string $b$ is a subsequence of...
[{"type": "stdin_stdout", "input": "1\n200\nrgygrbbbrrbbuuggbburgybrtuybubtrbryrtutuuutrrgtbbgtggrggtttbgtbuubyuyyugtgygytbgrgttruturbyuytyyggruttrbbgggbrbryrtuggbuuburrttyubybbyygubrbguybgybubgbrruubbggugtbyurgrtruyrguruygyybygbyytygttbrryrubg\n", "output": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbgggggggggggggggggggg...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cities numbered 1 th...
[{"type": "stdin_stdout", "input": "103 1\n6 8", "output": "101\n"}, {"type": "stdin_stdout", "input": "164 1\n6 8", "output": "162\n"}, {"type": "stdin_stdout", "input": "109 1\n5 9", "output": "107\n"}, {"type": "stdin_stdout", "input": "56 1\n12 11", "output": "54\n"}, {"type": "stdin_stdout", "input": "129 1\n4 6",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDima's got a staircase that cons...
[{"type": "stdin_stdout", "input": "5\n1 2 3 6 6\n25\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\n1 1000000000\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\nShare price\n===========\n\nYou ...
[{"input": "1000\n[0, 2, 3, 6]", "output": "[\"1113.64\"]", "fn_name": "share_price"}, {"input": "100\n[-50, 100]", "output": "[\"100.00\"]", "fn_name": "share_price"}, {"input": "100\n[-20, 30]", "output": "[\"104.00\"]", "fn_name": "share_price"}, {"input": "100\n[-50, 50]", "output": "[\"75.00\"]", "fn_name": "share...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an integer $x$ of ...
[{"type": "stdin_stdout", "input": "20 10\n21474836472147483648\n", "output": "20\n21474836482147483648\n"}, {"type": "stdin_stdout", "input": "20 19\n19999999999999999999\n", "output": "20\n20000000000000000002\n"}, {"type": "stdin_stdout", "input": "20 19\n19999999999999999999\n", "output": "20\n20000000000000000002\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 manipulate...
[{"type": "stdin_stdout", "input": "5 5\n0 0 0\n1 2 4\n1 0 0\n1 1 9\n1 1 2", "output": "2147483647\n0\n2147483647\n2147483647\n"}, {"type": "stdin_stdout", "input": "6 5\n1 0 0\n0 1 2\n1 2 3\n1 0 2\n1 2 2", "output": "2147483647\n2147483647\n2\n2147483647\n"}, {"type": "stdin_stdout", "input": "3 5\n0 0 1\n1 1 2\n1 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 last stage of Football World...
[{"type": "stdin_stdout", "input": "256 128 256\n", "output": "Final!\n"}, {"type": "stdin_stdout", "input": "256 128 129\n", "output": "Final!\n"}, {"type": "stdin_stdout", "input": "256 255 128\n", "output": "Final!\n"}, {"type": "stdin_stdout", "input": "256 107 129\n", "output": "Final!\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\nReverse every other word in a gi...
[{"input": "\"I really hope it works this time...\"", "output": "[\"I yllaer hope ti works siht time...\"]", "fn_name": "reverse_alternate"}, {"input": "\"Reverse this string, please!\"", "output": "[\"Reverse siht string, !esaelp\"]", "fn_name": "reverse_alternate"}, {"input": "\"This is not a test \"", "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\nDr .: Peter, I've finally done i...
[{"type": "stdin_stdout", "input": "10 0 82 - /\n4 5 - 31 1 5 * * *\n0 -2 1 + +", "output": "-0.121951\n-155.000000\n-1.000000\n"}, {"type": "stdin_stdout", "input": "10 0 82 - /\n4 5 - 60 1 5 * * *\n0 -2 1 + +", "output": "-0.121951\n-300.000000\n-1.000000\n"}, {"type": "stdin_stdout", "input": "10 0 82 - /\n4 0 - 60 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a string of integers, coun...
[{"input": "\"12322212223443\"", "output": "[\"111213321132132413\"]", "fn_name": "count_me"}, {"input": "\"1123\"", "output": "[\"211213\"]", "fn_name": "count_me"}, {"input": "\"1211\"", "output": "[\"111221\"]", "fn_name": "count_me"}, {"input": "\"21\"", "output": "[\"1211\"]", "fn_name": "count_me"}, {"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\nShapur was an extremely gifted s...
[{"type": "stdin_stdout", "input": "1010000011010110011101001101110001110010000111011101110010110110111111001001110100101100010101010001\n0111101000111100101100000101111010100100001000011101010100110011100011010011010101000100101011100011\n", "output": "110110101110101011000100100000101101011000111100000010011000010101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nAt the JOI pasta shop...
[{"type": "stdin_stdout", "input": "800\n1126\n900\n198\n330", "output": "948\n"}, {"type": "stdin_stdout", "input": "800\n1126\n900\n132\n330", "output": "882\n"}, {"type": "stdin_stdout", "input": "800\n1126\n206\n132\n330", "output": "288\n"}, {"type": "stdin_stdout", "input": "800\n1126\n180\n132\n330", "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\nAn array is called `centered-N` ...
[{"input": "[0, 0, 0, -1, 1, 1, -1, 0, 0, 0]\n0", "output": "[true]", "fn_name": "is_centered"}, {"input": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n0", "output": "[true]", "fn_name": "is_centered"}, {"input": "[3, 2, 10, 4, 1, 6, 9]\n15", "output": "[true]", "fn_name": "is_centered"}, {"input": "[2, 10, 4, 1, 6, 9]\n15", "outp...
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\nLittle Artem found a grasshopper...
[{"type": "stdin_stdout", "input": "10\n>>>>>>>>><\n1 1 1 1 1 1 1 1 1 6\n", "output": "INFINITE\n"}, {"type": "stdin_stdout", "input": "10\n>>>>>>>>><\n2 1 1 1 1 1 1 1 1 5\n", "output": "INFINITE\n"}, {"type": "stdin_stdout", "input": "10\n>>>>>>>>>>\n1 1 1 1 1 1 2 1 1 100\n", "output": "FINITE\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\nYou have a collection of lovely ...
[{"input": "\"There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now.\"", "output": "[\"There should be one-- and preferably only one --obvious way to do it.\\nAlth...
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\nDreamoon loves summing up someth...
[{"type": "stdin_stdout", "input": "10000000 10000000\n", "output": "425362313\n"}, {"type": "stdin_stdout", "input": "10000000 9999999\n", "output": "930564389\n"}, {"type": "stdin_stdout", "input": "3865975 13943620\n", "output": "633381536\n"}, {"type": "stdin_stdout", "input": "6407688 3000816\n", "output": "895399...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCarol is currently curling.\n\nS...
[{"type": "stdin_stdout", "input": "5 300\n939 465 129 611 532\n", "output": "300 667.8641053432639 1164.9596695962555 1522.2774553276686 2117.0538839123933\n"}, {"type": "stdin_stdout", "input": "5 300\n594 465 129 611 532\n", "output": "300 885.9684291836891 1383.0639934366804 1740.3817791680935 2335.1582077528183\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\nNinja Atsushi guards the town fr...
[{"type": "stdin_stdout", "input": "8\n0 0 0 2 3 1 0 -1\n1 2 -1 2 1 0 -1 0\n2\n1 1 2 2\n0 -1 2 2\n-1", "output": "4\n0\n"}, {"type": "stdin_stdout", "input": "8\n0 0 -1 2 2 2 0 -1\n1 1 1 1 1 1 -1 0\n2\n1 1 2 2\n0 -1 4 2\n0", "output": "1\n0\n"}, {"type": "stdin_stdout", "input": "8\n0 0 0 2 3 1 0 -1\n1 2 0 2 1 0 -1 0\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwin adventurers Rin and Len are...
[{"type": "stdin_stdout", "input": "5 5\n%#... ...#%\n.#.#. .#.#.\n.#.#. .#.#.\n.#.#. .#.#.\n...#L R#...\n3 2\n.L. .R#\n%.. .&.\n4 1\nL.%. %..R\n0 0", "output": "Yes\nNo\nNo\n"}, {"type": "stdin_stdout", "input": "5 5\n%#... ...#%\n.#.#. .#.#.\n.#.#. .#.#.\n.#.#. .#.#.\n...#L R#...\n3 2\n.L. .R#\n%.. .&.\n4 1\nL.$. %.....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHomer has two friends Alice and ...
[{"type": "stdin_stdout", "input": "5\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\nazazazazazazazazazazazazazazazazazazazazazazazazaz\nzazazazazazazazazazazazazazazazazazazazazazazazaza\nzzazzazzazzazzazzazzazzazzazzazzazzazzazzazza\n", "output": "bzbzbzbzbzbz...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 name, turn that name int...
[{"input": "\"Franklin\"", "output": "[[[\"F\", \"r\", \"a\"], [\"n\", \"k\", \"l\"], [\"i\", \"n\", \".\"]]]", "fn_name": "matrixfy"}, {"input": "\"Beyonce\"", "output": "[[[\"B\", \"e\", \"y\"], [\"o\", \"n\", \"c\"], [\"e\", \".\", \".\"]]]", "fn_name": "matrixfy"}, {"input": "\"Frank\"", "output": "[[[\"F\", \"r\",...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour dad doesn't really *get* pu...
[{"input": "\"i,, don't believe this round earth,,, show me evadence!!\"", "output": "[\"i, don't believe this round earth, show me evadence!!\"]", "fn_name": "dad_filter"}, {"input": "\"Dead or alive,,,, you're coming with me,,, \"", "output": "[\"Dead or alive, you're coming with me\"]", "fn_name": "dad_filter"}, {...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has got $n$ books, numbere...
[{"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 8 10 5 3 9 6\n", "output": "1 3 0 1 1 0 2 0 1 1 \n"}, {"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 8 10 5 3 9 6\n", "output": "1 3 0 1 1 0 2 0 1 1 "}, {"type": "stdin_stdout", "input": "10\n4 7 10 2 1 8 3 5 9 6\n4 2 7 1 8 10 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nD: The Diversity of Prime Factor...
[{"type": "stdin_stdout", "input": "3\n2 3 11", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n2 2 11", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n2 2 13", "output": "1\n"}, {"type": "stdin_stdout", "input": "3\n2 3 17", "output": "3\n"}, {"type": "stdin_stdout", "input": "3\n2 2 15", "output": "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\nWe start with a permutation $a_1...
[{"type": "stdin_stdout", "input": "6\n2 1\n2 1\n1\n3 2\n1 3 2\n1 3\n4 2\n4 1 3 2\n1 2\n5 3\n4 3 2 5 1\n1 4 5\n6 3\n2 4 5 6 1 3\n2 4 5\n7 3\n7 6 4 3 2 1 5\n1 2 6\n", "output": "1\n0\n2\n0\n0\n4\n"}, {"type": "stdin_stdout", "input": "6\n2 1\n2 1\n1\n3 2\n1 3 2\n1 3\n4 2\n4 1 3 2\n1 2\n5 3\n4 3 2 5 1\n1 4 5\n6 3\n2 4 5 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA very brave explorer Petya once...
[{"type": "stdin_stdout", "input": "100\n0 0 0 0 0 0 1 4 4 0 2 2 4 1 7 1 11 0 8 4 12 12 3 0 3 2 2 4 3 9 1 5 4 6 9 14 6 2 4 18 7 7 19 11 20 13 17 16 0 34 2 6 12 27 9 4 29 22 4 20 20 17 17 20 37 53 17 3 3 15 1 46 11 24 31 6 12 6 11 18 13 1 5 0 19 10 24 41 16 41 18 52 46 39 16 30 18 23 53 13\n", "output": "66\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\nNumber is a palindrome if it is ...
[{"input": "89", "output": "[24]", "fn_name": "palindrome_chain_length"}, {"input": "87", "output": "[4]", "fn_name": "palindrome_chain_length"}, {"input": "88", "output": "[0]", "fn_name": "palindrome_chain_length"}, {"input": "10", "output": "[1]", "fn_name": "palindrome_chain_length"}, {"input": "1", "output": "[0]"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an input string.\n...
[{"input": "\"In this string, I'll make sure the amounts of a character go over 9\"", "output": "[\"11111112221221132112411115312263237221234482193101343525441123124155131\"]", "fn_name": "numericals"}, {"input": "\"hope you 123456789 expected numbers in the string\"", "output": "[\"111111212111111111321231141412115115...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are various parking lots s...
[{"type": "stdin_stdout", "input": "5 5\n136\n68\n82\n84\n114\n2 4\n14\n30\n118\n54\n0 0", "output": "2 3 4 1 5\n1 2 4 3\n"}, {"type": "stdin_stdout", "input": "2 5\n123\n52\n195\n87\n105\n2 4\n18\n30\n80\n24\n0 0", "output": "4 2 3 1 5\n1 2 4 3\n"}, {"type": "stdin_stdout", "input": "1 5\n123\n52\n105\n87\n105\n2 4\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlexey is travelling on a train....
[{"type": "stdin_stdout", "input": "2\n2\n2 4\n10 12\n0 2\n5\n1 4\n7 8\n9 10\n13 15\n19 20\n1 2 3 4 5\n", "output": "\n12\n32\n"}, {"type": "stdin_stdout", "input": "2\n2\n2 4\n10 12\n0 2\n5\n1 4\n7 8\n9 10\n13 15\n19 20\n1 2 3 4 5\n", "output": "12\n32\n"}, {"type": "stdin_stdout", "input": "2\n2\n2 3\n10 12\n0 2\n5\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 an array $a$ of $n...
[{"type": "stdin_stdout", "input": "1\n10 195593331\n886547706 549473499 719535263 337021357 357872635 1071822623 699988186 10455 29750933 887846992\n", "output": "1760339979\n"}, {"type": "stdin_stdout", "input": "1\n10 121406599\n432485522 549473499 522487623 1009120577 698965406 845977171 252631181 1770 81120106 717...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 goal of this exercise is to ...
[{"input": "\"Supralapsarian\"", "output": "[\")()))()))))()(\"]", "fn_name": "duplicate_encode"}, {"input": "\"CodeWarrior\"", "output": "[\"()(((())())\"]", "fn_name": "duplicate_encode"}, {"input": "\"Success\"", "output": "[\")())())\"]", "fn_name": "duplicate_encode"}, {"input": "\"recede\"", "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\nYou have to restore the wall. Th...
[{"type": "stdin_stdout", "input": "100 20 149 72\n67 101 52 15 0 92 26 74 44 61 6 44 45 19 22 8 10 85 67 78 24 61 81 99 62 84 9 71 11 65 5 97 3 72 5 81 81 104 65 85 52 21 20 53 66 91 4 75 84 139 72 27 50 26 9 65 14 6 54 68 6 2 89 78 40 45 98 45 27 51 94 72 67 81 20 19 38 64 14 40 57 21 82 99 37 113 21 22 30 14 73 93 6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a rooted tree with N ve...
[{"type": "stdin_stdout", "input": "6 2\n1 2\n1 3\n2 4\n3 6\n2 5\n1 10\n1 10\n", "output": "20 20 20 20 20 20\n"}, {"type": "stdin_stdout", "input": "6 2\n1 2\n1 3\n2 4\n3 6\n2 5\n2 10\n1 10", "output": "10 20 10 20 20 10\n"}, {"type": "stdin_stdout", "input": "6 1\n1 2\n1 3\n2 4\n3 6\n2 5\n1 10\n1 10", "output": "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\nWhen naming identifiers (variabl...
[{"type": "stdin_stdout", "input": "get^user_name L\ngetTserNbme U\nemaNresUteG D\nEndOfInput X", "output": "get^userName\nGetTserNbme\nema_nres_ute_g\n"}, {"type": "stdin_stdout", "input": "get^user_name L\nembNresTteg U\nemaNresUteG D\nEndOfInput X", "output": "get^userName\nEmbNresTteg\nema_nres_ute_g\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 an array $a$ of $n...
[{"type": "stdin_stdout", "input": "23 290352079\n162011045 845692742 774584765 103906675 222286673 251540072 1067675108 30856336 71306611 790640347 835976636 327687572 387722548 48938195 769656348 341889962 393959831 928029640 320443541 248114937 798473713 159552755 814528707\n", "output": "471308140\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 helped Dima to have a great ...
[{"type": "stdin_stdout", "input": "50 10\n1 2 3 4 5 6 7 8 9 10 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "50 10\n1 2 3 4 5 4 7 8 9 10 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1\n",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n**Principal Diagonal** -- The pr...
[{"input": "[[88, 2, 2, 5, 1, 1, 2, 2, 5, 1], [4, 1, 6, 1, 1, 1, 2, 2, 7, 1], [1, 8, 1, 6, 2, 1, 2, 1, 5, 1], [1, 5, 2, 7, 2, 1, 1, 2, 5, 1], [1, 8, 2, 6, 1, 1, 2, 2, 5, 1], [1, 2, 2, 5, 1, 1, 2, 2, 5, 1], [1, 2, 2, 1, 1, 1, 1, 2, 5, 1], [1, 2, 1, 5, 1, 1, 2, 1, 5, 1], [1, 1, 2, 5, 1, 1, 2, 2, 1, 1], [88, 2, 2, 5, 1, 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\nThe Fair Nut lives in $n$ story ...
[{"type": "stdin_stdout", "input": "100\n95 81 40 82 80 78 4 86 37 94 1 46 85 6 41 87 100 69 100 87 12 61 55 81 81 32 40 54 22 32 24 73 61 68 76 16 83 76 73 77 41 37 88 46 72 63 2 37 14 49 45 81 75 56 10 101 73 85 41 17 5 2 16 75 28 53 35 77 66 53 69 82 50 95 2 12 35 62 84 46 29 95 91 49 78 14 88 75 58 52 49 31 56 43 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHaving learned the multiplicatio...
[{"type": "stdin_stdout", "input": "20 20\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "33 106", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5 10\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1 11\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "20 1\n", "output": "-1\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\n2520 is the smallest number that...
[{"input": "19", "output": "[232792560]", "fn_name": "smallest"}, {"input": "20", "output": "[232792560]", "fn_name": "smallest"}, {"input": "17", "output": "[12252240]", "fn_name": "smallest"}, {"input": "18", "output": "[12252240]", "fn_name": "smallest"}, {"input": "13", "output": "[360360]", "fn_name": "smallest"},...
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\nThree years have passes and noth...
[{"type": "stdin_stdout", "input": "250\n1 0 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nC: Prayer (Pray)\n\nSome twins a...
[{"type": "stdin_stdout", "input": "-1 -1 -3 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 -1 -3 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 -1 -4 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "0 -1 -4 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "0 -1 -3 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter seeing the \"ALL YOUR BASE...
[{"type": "stdin_stdout", "input": "10 40\n39 39 39 39 39 39 39 39 39 39\n10 39\n38 38 38 38 38 38 38 38 38 38\n", "output": ">\n"}, {"type": "stdin_stdout", "input": "10 40\n39 39 39 14 39 39 39 39 39 39\n10 39\n38 38 38 38 38 38 38 38 38 38\n", "output": ">\n"}, {"type": "stdin_stdout", "input": "10 38\n16 19 37 32 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\nX and A are integers between 0 a...
[{"type": "stdin_stdout", "input": "11 -1", "output": "10\n"}, {"type": "stdin_stdout", "input": "10 -1", "output": "10\n"}, {"type": "stdin_stdout", "input": "19 -1", "output": "10\n"}, {"type": "stdin_stdout", "input": "-1 -1", "output": "10\n"}, {"type": "stdin_stdout", "input": "10 -2", "output": "10\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## Task\n\nGiven a positive inte...
[{"input": "1000000\n3", "output": "[784]", "fn_name": "multiply"}, {"input": "36\n4", "output": "[100]", "fn_name": "multiply"}, {"input": "100\n1", "output": "[1]", "fn_name": "multiply"}, {"input": "20\n3", "output": "[18]", "fn_name": "multiply"}, {"input": "24\n2", "output": "[8]", "fn_name": "multiply"}, {"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\nPaul hates palindromes. He assum...
[{"type": "stdin_stdout", "input": "302 4\nabdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdcbdc...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 20 25\n12 10 14 24\n3 3 19 27\n3 4 23 28\n9 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_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 a sequence of N integers...
[{"type": "stdin_stdout", "input": "10 998244353\n10 10 10 9 5 12 0 4 7 0", "output": "559205848\n"}, {"type": "stdin_stdout", "input": "10 1051516890\n10 15 10 1 5 4 0 8 4 0", "output": "142815647\n"}, {"type": "stdin_stdout", "input": "10 918571889\n10 9 10 7 7 3 0 11 4 0", "output": "551061978\n"}, {"type": "stdin_s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEla likes Chess a lot. During br...
[{"type": "stdin_stdout", "input": "10\n4\n2 2 3 3 2 3\n2 3\n7\n1 1 1 2 2 1\n6 7\n9\n9 1 8 1 9 2\n5 9\n6\n2 4 3 4 2 3\n6 5\n7\n2 2 2 1 3 1\n3 5\n7\n6 1 7 2 7 1\n2 2\n7\n2 1 2 2 1 2\n7 6\n7\n3 6 3 7 4 7\n3 7\n10\n2 1 1 2 1 1\n6 3\n4\n2 3 1 3 2 4\n3 4\n", "output": "YES\nNO\nNO\nYES\nYES\nNO\nYES\nYES\nNO\nNO\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\nPetya loves lucky numbers. We al...
[{"type": "stdin_stdout", "input": "691900\n", "output": "4444477777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ water tanks in a r...
[{"type": "stdin_stdout", "input": "65\n1000000 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\n", "output": "15416.615384615392\n15416.615384615392\n15416.615384615392\n15416.61538461...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 recieved a gift of a strin...
[{"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n", "output": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"}, {"type": "stdin_stdout", "input": "bababaaababaabbbbbabbbbbbaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZane the wizard is going to perf...
[{"type": "stdin_stdout", "input": "203948 2 14\n203948 203947\n39 47\n4959 3030\n1 203947\n2929 12381\n203944 203948\n203947 203944\n203944 203922\n203922 203948\n2495 20495\n29419 5959\n12949 12\n49 29292\n1 94\n1 203\n", "output": "203947\n"}, {"type": "stdin_stdout", "input": "203948 2 14\n203948 203947\n39 38\n495...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAyoub had an array $a$ of intege...
[{"type": "stdin_stdout", "input": "101149 1300011130 1476544836\n", "output": "156648241\n"}, {"type": "stdin_stdout", "input": "101149 686320621 1476544836\n", "output": "113944181\n"}, {"type": "stdin_stdout", "input": "120881 536336525 585696606\n", "output": "915864703\n"}, {"type": "stdin_stdout", "input": "12138...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Definition\n\n**_Jumping numbe...
[{"input": "987654322", "output": "[\"Not!!\"]", "fn_name": "jumping_number"}, {"input": "23", "output": "[\"Jumping!!\"]", "fn_name": "jumping_number"}, {"input": "32", "output": "[\"Jumping!!\"]", "fn_name": "jumping_number"}, {"input": "98", "output": "[\"Jumping!!\"]", "fn_name": "jumping_number"}, {"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\nAlice received a set of Toy Trai...
[{"type": "stdin_stdout", "input": "5000 1\n4008 1126\n", "output": "6125 6124 6123 6122 6121 6120 6119 6118 6117 6116 6115 6114 6113 6112 6111 6110 6109 6108 6107 6106 6105 6104 6103 6102 6101 6100 6099 6098 6097 6096 6095 6094 6093 6092 6091 6090 6089 6088 6087 6086 6085 6084 6083 6082 6081 6080 6079 6078 6077 6076 6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nModify the `kebabize` function s...
[{"input": "\"myCamelCasedString\"", "output": "[\"my-camel-cased-string\"]", "fn_name": "kebabize"}, {"input": "\"myCamelHas3Humps\"", "output": "[\"my-camel-has-humps\"]", "fn_name": "kebabize"}, {"input": "\"CodeWars\"", "output": "[\"code-wars\"]", "fn_name": "kebabize"}, {"input": "\"SOS\"", "output": "[\"s-o-s\"]...
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\"Teishi-zushi\", a Japanese res...
[{"type": "stdin_stdout", "input": "15 10000000000\n400000000 1000000000\n800000000 1000000000\n1900000000 1000000000\n2400000000 1000000000\n2900000000 1000000000\n3300000000 1000000000\n3700000000 1000000000\n3800000000 1000000000\n4000000000 1000000000\n4100000000 1000000000\n5200000000 1000000000\n6600000000 100000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function `sumTimesTables...
[{"input": "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n1\n10", "output": "[3025]", "fn_name": "sum_times_tables"}, {"input": "[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n1\n10", "output": "[3025]", "fn_name": "sum_times_tables"}, {"input": "[5, 4, 7, 8, 9, 6, 3, 2, 10, 1]\n1\n10", "output": "[3025]", "fn_name": "sum_times_tables"}, {"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\nGiven an array $a_1, a_2, \\dots...
[{"type": "stdin_stdout", "input": "1\n8 35\n14 14 14 14 14 14 14 14\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 6 7\n1 1 8\n2 1\n2 2\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n", "output": "5\n5\n5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 celebrating the midcourse ...
[{"type": "stdin_stdout", "input": "40\n119631 119631 772776 119631 658661 119631 108862 524470 125132 700668 69196 844949 154577 108862 108862 108862 597344 940938 989698 108862 154577 69196 125132 687080 940938 125132 69196 69196 125132 566152 953083 406319 380068 119631 154577 125132 413984 69196 154577 154577\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\nVasiliy spent his vacation in a ...
[{"type": "stdin_stdout", "input": "718167999978848233 1000000000000000000 1000000000000000000\n", "output": "281832000021151766\n"}, {"type": "stdin_stdout", "input": "338654687020656675 999999999999999999 1000000000000000000\n", "output": "661345312979343324\n"}, {"type": "stdin_stdout", "input": "643704740517968615 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Martian boy is named s β€” he ha...
[{"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersaturnuranusneptune\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersatuqnuranusneptune\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "mars\nsunvenusearthmarsjupitersatuqnuranusnepttne\n", "output": "0\n"}...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVector Willman and Array Bolt ar...
[{"type": "stdin_stdout", "input": "5000000000000000000 4999999999999999837 4999999999999999963\n", "output": "1249999999999999959/1250000000000000000\n"}, {"type": "stdin_stdout", "input": "5000000000000000000 4999999999999999837 4999999999999999963\n", "output": "1249999999999999959/1250000000000000000\n"}, {"type": ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ piles of stones, w...
[{"type": "stdin_stdout", "input": "7\n3\n2 5 10\n8\n1 2 1 1 1 1 1 1\n6\n2 2 5 4 5 6\n6\n1 1 2 1 2 1\n1\n1000000000\n5\n1 4 2 1 1\n3\n1 1 1\n", "output": "First \nSecond\nFirst \nFirst \nFirst \nSecond\nFirst \n"}, {"type": "stdin_stdout", "input": "7\n3\n2 5 10\n8\n1 2 1 1 1 1 1 1\n6\n2 2 5 4 5 6\n6\n1 1 2 1 2 1\n1\n1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA biscuit making machine produce...
[{"type": "stdin_stdout", "input": "1 20 20\n", "output": "400\n"}, {"type": "stdin_stdout", "input": "1 -7 15", "output": "-105\n"}, {"type": "stdin_stdout", "input": "1 -8 13", "output": "-104\n"}, {"type": "stdin_stdout", "input": "1 -7 21", "output": "-147\n"}, {"type": "stdin_stdout", "input": "1 -8 19", "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\nYou are given an array A of leng...
[{"type": "stdin_stdout", "input": "7\n-1 -1 1 0 1 31150610 0000000101", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n1 2 3 2 1 999999999 1000000100", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n1 4 3 2 1 999999999 1000000100", "output": "3\n"}, {"type": "stdin_stdout", "input": "7\n1 4 3 4 1 999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBy 2312 there were n Large Hadro...
[{"type": "stdin_stdout", "input": "1 100\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- 1\n+ 1\n- ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nΒ«PolygonΒ» is a system which allo...
[{"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 3 8 2 4\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 4 8 2 4\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 10 10 4 8 2 8\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "10\n1 7 13 6 5 10 3 8 2 4\n", "o...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou're on your way to the market...
[{"input": "\"Did I ever tell you about my run with that paleolithic beast? He tried all sorts of ways to get at my three dolla and fitty cent? I told him 'this is MY 4 dolla!'. He just wouldn't listen.\"", "output": "[false]", "fn_name": "is_lock_ness_monster"}, {"input": "\"I'm from Scottland. I moved here to be with...
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 fighting with Zmei Goryn...
[{"type": "stdin_stdout", "input": "5\n4 807989196\n770312657 78181451\n624192034 690910298\n754831733 354913874\n519577171 400120478\n4 491297333\n546432637 76258441\n312107971 75446008\n767483254 958677299\n84044330 577526244\n2 177840791\n197738084 143071228\n23274563 597315796\n7 610054060\n858529462 646280969\n644...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 board of size $n...
[{"type": "stdin_stdout", "input": "3\n11\n11375\n5405\n", "output": "440\n490606116000\n52633933240\n"}, {"type": "stdin_stdout", "input": "3\n11\n22093\n2775\n", "output": "440\n3594535872088\n7123077200\n"}, {"type": "stdin_stdout", "input": "3\n21\n7511\n4623\n", "output": "3080\n141244655440\n32934449248\n"}, {"ty...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a set of points $x...
[{"type": "stdin_stdout", "input": "100 13\n11 28 21 7 6 23 26 31 26 32 34 17 19 1 13 1 28 30 28 8 23 36 17 20 5 37 32 23 14 1 20 23 3 39 20 14 2 12 15 3 1 27 7 25 15 39 10 6 8 37 6 22 7 29 6 17 17 9 16 3 39 23 2 34 20 12 28 29 32 2 38 27 36 27 29 18 7 14 27 25 33 18 29 40 22 9 9 6 21 7 23 35 33 26 31 31 39 36 27 27\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# Description\nWrite a function ...
[{"input": "\"8895 6238 9323 4311\"", "output": "[false]", "fn_name": "valid_card"}, {"input": "\"5457 6238 5568 4311\"", "output": "[false]", "fn_name": "valid_card"}, {"input": "\"5457 6238 9323 4311\"", "output": "[false]", "fn_name": "valid_card"}, {"input": "\"5457 1125 9323 4311\"", "output": "[false]", "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\nGiven an array a_1, a_2, ..., a_...
[{"type": "stdin_stdout", "input": "71\n908209 289 44521 240100 680625 274576 212521 91809 506944 499849 3844 15376 592900 58081 240100 984064 732736 257049 600625 180625 130321 580644 261121 75625 46225 853776 485809 700569 817216 268324 293764 528529 25921 399424 175561 99856 295936 20736 611524 13924 470596 574564 5...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWinters are just damn freezing c...
[{"type": "stdin_stdout", "input": "10\n5 eeleGlOFWbcnIPPtnll\n55-55-55\n00-00-00\n98-65-32\n76-43-10\n98-76-54\n2 DMBiqRyQJkFvHPJNJp\n28-97-50\n87-64-10\n4 bAfmtnKHohIX\n61-58-93\n77-77-77\n53-17-51\n96-43-10\n3 cDX\n22-22-22\n77-77-77\n63-30-64\n1 HCeHJ\n44-44-44\n6 HgSpfAolwoaBQ\n96-93-53\n98-53-10\n33-33-33\n66-66-...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n Round the given number ...
[{"input": "50\n100", "output": "[50]", "fn_name": "rounding"}, {"input": "123\n456", "output": "[0]", "fn_name": "rounding"}, {"input": "20\n3", "output": "[21]", "fn_name": "rounding"}, {"input": "19\n3", "output": "[18]", "fn_name": "rounding"}, {"input": "1\n10", "output": "[0]", "fn_name": "rounding"}]
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# Definition\n\n**_Extra perfect...
[{"input": "39", "output": "[[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]]", "fn_name": "extra_perfect"}, {"input": "28", "output": "[[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27]]", "fn_name": "extra_perfect"}, {"input": "7", "output": "[[1, 3, 5, 7]]", "fn_name": "extra_perfect"},...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function that solves an ...
[{"input": "\"1.333333333*1.23456789+0.003*0.002\"", "output": "[\"1.64610e+00\"]", "fn_name": "sum_prod"}, {"input": "\"0.5*1.2*56+9.6*5*81+1\"", "output": "[\"3.92260e+03\"]", "fn_name": "sum_prod"}, {"input": "\"5.4*4.0+6.2+8.0\"", "output": "[\"3.58000e+01\"]", "fn_name": "sum_prod"}, {"input": "\"5*8+6*3*2\"", "ou...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two integers $A$ a...
[{"type": "stdin_stdout", "input": "3\n1 14\n4 2\n191 102469002\n", "output": "1\n0\n1528\n"}, {"type": "stdin_stdout", "input": "3\n1 14\n4 2\n131 176163142\n", "output": "1\n0\n1048\n"}, {"type": "stdin_stdout", "input": "3\n1 14\n4 2\n142 128000654\n", "output": "1\n0\n1136\n"}, {"type": "stdin_stdout", "input": "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\nFor given two sequences $X$ and ...
[{"type": "stdin_stdout", "input": "3\nabcbdab\nbdcaba\nabc\nabc\nacb\nbc", "output": "4\n3\n1\n"}, {"type": "stdin_stdout", "input": "3\nabcbdab\nbdcaba\nabc\nabc\nbcb\nbc", "output": "4\n3\n2\n"}, {"type": "stdin_stdout", "input": "3\nabcbdab\nbdcaba\n`bc\nabc\nbcb\nbc", "output": "4\n2\n2\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 number theory, Euler's totien...
[{"input": "\"wow doge\"", "output": "[0]", "fn_name": "totient"}, {"input": "0.0435", "output": "[0]", "fn_name": "totient"}, {"input": "false", "output": "[0]", "fn_name": "totient"}, {"input": "19", "output": "[18]", "fn_name": "totient"}, {"input": "15", "output": "[8]", "fn_name": "totient"}, {"input": "18", "outp...
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\nSuppose I have two vectors: `(a1...
[{"input": "[5, 10, 1, 20, 2]\n[-2, -20, -1, 10, 5]", "output": "[false]", "fn_name": "is_orthogonal"}, {"input": "[2, 4, 5, 6, 7]\n[-14, -12, 0, 8, 4]", "output": "[true]", "fn_name": "is_orthogonal"}, {"input": "[1, -2, 3, -4]\n[-4, 3, 2, -1]", "output": "[true]", "fn_name": "is_orthogonal"}, {"input": "[3, -4, -5]\n...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan has an array consisting of ...
[{"type": "stdin_stdout", "input": "50\n48 37 47 50 46 43 42 46 36 40 45 41 40 50 35 49 37 42 44 45 49 44 31 47 45 49 48 41 45 45 48 20 34 43 43 41 47 50 41 48 38 48 43 48 46 48 32 37 47 45\n", "output": "31\n1 2 3 4 5 6 7 8 36 9 10 11 40 12 35 13 14 42 15 16 17 44 31 18 19 49 21 22 23 24 25 20 34 26 27 28 29 50 41 30 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a given array $a$ consisting...
[{"type": "stdin_stdout", "input": "5\n4 10\n5 5 5 5\n3 5\n5 5 5\n3 4\n10 1 1\n4 5\n5 5 1 5\n5 5\n5 5 5 10 5\n", "output": "NO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "5\n4 10\n5 5 5 5\n3 5\n5 5 5\n3 4\n10 1 1\n4 5\n5 5 1 5\n5 5\n5 5 5 15 5\n", "output": "NO\nNO\nNO\nNO\nNO\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\nVillages were scattered in the W...
[{"type": "stdin_stdout", "input": "7 6\n-1 2\n3 0\n2 2\n1 -1\n4 1\n2 3\n3 5\n1 3\n2 4\n2 3\n3 5\n3 7\n6 7", "output": "20.8510743960\n"}, {"type": "stdin_stdout", "input": "7 6\n-1 2\n3 0\n2 4\n1 -1\n4 1\n2 3\n3 5\n1 3\n2 4\n2 3\n3 5\n3 7\n6 7", "output": "20.0292199808\n"}, {"type": "stdin_stdout", "input": "7 6\n-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\n# Task\n\nWrite a function named...
[{"input": "[15397, 12422, 10495, 22729, 23921, 18326, 27955, 24073, 23690, 15002, 11615, 15682, 24346, 16725, 17252, 20467, 20493, 17807, 13041, 25861, 22471, 22747, 24082, 18979, 28543, 26488, 10002, 24740, 17950, 26573, 25851, 19446, 22584, 14857, 17387, 29310, 28265, 19497, 11394, 28111, 20957, 17201, 26647, 26885,...
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\nApart from having lots of holida...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "1000000000\n"}, {"type": "stdin_stdout", "input": "100000000\n", "output": "100000000\n"}, {"type": "stdin_stdout", "input": "900000000\n", "output": "100000000\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 king's birthday dinner was a...
[{"type": "stdin_stdout", "input": "100 100\n97 64 64 35 35 97 39 83 26 97 92 97 83 11 83 97 97 64 23 97 97 11 39 11 11 39 64 14 23 39 64 26 26 97 39 39 39 64 83 26 83 97 64 11 64 64 64 83 64 92 64 26 83 26 27 64 11 83 92 92 23 11 11 97 92 64 97 64 97 83 64 27 83 23 11 26 11 92 83 64 83 11 11 11 97 83 97 26 26 97 23 23...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTaro is a member of a programmin...
[{"type": "stdin_stdout", "input": "5 2\n12.765198556451168 15.39026707382745 9.233322443088145\n10.815832893726053 -1.9252139692459584 2.3339220907347795\n4.371806005587981 8.307983558511573 9.03829736864434\n3.663558291396137 5.363391652445537 7.212792777097519\n3.0699790954158255 4.913753801376337 -4.249695725207287...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 21XX, an annual programming c...
[{"type": "stdin_stdout", "input": "[[r-i]-[m-e]]\nd -1\no 0\ng -1\nl 6", "output": "No\n"}, {"type": "stdin_stdout", "input": "[[m-y]-[a-o]]\nn 0\na 1\ny 2\nm 0", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "[[r-i]-[m-e]]\nd -1\nr 1\ng 1\nm 3", "output": "No\n"}, {"type": "stdin_stdout", "input": "[[r-i]-[m-...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe new \"Die Hard\" movie has j...
[{"type": "stdin_stdout", "input": "14\n25 25 25 25 25 25 25 50 50 50 100 100 100 100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "14\n25 25 25 25 25 25 25 50 50 50 100 100 100 100\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "10\n100 100 100 100 100 100 100 100 100 100\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\nOnce upon a time Petya and Gena ...
[{"type": "stdin_stdout", "input": "110\n-256 -149 -136 -33 -253 -141 -170 -253 0 -107 -141 -236 -65 -158 -84 -180 -97 -97 -223 -44 -232 -255 -108 -25 -49 -48 -212 -3 -232 -172 -231 -158 -23 -206 -198 -55 -36 -11 -169 -94 -190 -115 -116 -231 -155 -201 -155 -103 -242 -119 -136 -8 -2 -11 -69 -250 -51 -129 -155 -216 -107 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHave you ever used the chat appl...
[{"type": "stdin_stdout", "input": "100 61 71\n11 18 0 47 33 37 91 13 8 30 73 64 50 97 62 50 2 36 68 32 64 74 32 77 81 41 23 44 40 18 45 33 21 68 57 79 107 23 21 37 99 27 30 56 75 62 75 63 1 15 79 42 18 66 21 25 2 12 89 48 75 7 57 85 80 14 82 29 66 47 29 10 1 84 79 39 33 81 135 26 80 67 52 25 38 68 57 53 38 83 83 3 86 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, like many others, likes t...
[{"type": "stdin_stdout", "input": "50\n667406402 354775600 95220950 604569294 945922983 82947113 120853697 25192357 911801905 8804755 572528228 1217518845 180664274 949243037 5283222 128577958 23627567 882714363 413386071 937062768 916521072 1051464852 328941225 17876118 770879655 928962609 331124489 236187404 8786298...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 you will meet th...
[{"type": "stdin_stdout", "input": "100\n*****************************)**********************************************************************\n", "output": "yes\n"}, {"type": "stdin_stdout", "input": "100\n*.....................*.....................*.....................*......../............*...........\n", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe all know the problem about th...
[{"type": "stdin_stdout", "input": "101\n", "output": "aaffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhllppt\nbbggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqquuyyccggkkoosswwaaeeiimmqqt\ncddhhllppttxxbbffjjnnrrvvzzddhhllppttxxbbffjjnnrrvvzzddhhll...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 god's sake, you're boxes wit...
[{"type": "stdin_stdout", "input": "5\n2\n1 1\n2\n1 1000000000\n2\n1000000000 1\n2\n1000000000 1000000000\n2\n228 1337\n", "output": "YES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n2\n1 1\n2\n1 1000000000\n2\n1000000000 1\n2\n1000000000 1000000000\n2\n228 1337\n", "output": "YES\nYES\nNO\nYES\nYES\n"...
code_stdio