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\nFind \\displaystyle{\\sum_{a=1}^...
[{"type": "stdin_stdout", "input": "200\n", "output": "10813692\n"}, {"type": "stdin_stdout", "input": "199\n", "output": "10611772\n"}, {"type": "stdin_stdout", "input": "198\n", "output": "10493367\n"}, {"type": "stdin_stdout", "input": "197\n", "output": "10290813\n"}, {"type": "stdin_stdout", "input": "196\n", "out...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a small restaurant there are ...
[{"type": "stdin_stdout", "input": "30 10 10\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "30 10 10\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2\n", "output": "20\n"}, {"type": "stdin_stdout", "input": "20 4 3\n2 2 2 2 2 2 2 2 1 2 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven an array (or list) of scor...
[{"input": "[5, 2, 3, 5, 5, 4, 9, 8, 0]", "output": "[[3, 8, 7, 3, 3, 6, 1, 2, 9]]", "fn_name": "ranks"}, {"input": "[-1, 3, 3, 3, 5, 5]", "output": "[[6, 3, 3, 3, 1, 1]]", "fn_name": "ranks"}, {"input": "[-5, -10, 3, 1]", "output": "[[3, 4, 1, 2]]", "fn_name": "ranks"}, {"input": "[1, 10, 4]", "output": "[[3, 1, 2]]",...
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\nSometimes it is hard to prepare ...
[{"type": "stdin_stdout", "input": "rdtevvmiqmfgvafkdypxjthzhfsbavmhgkavkfonscaokdxoscenpxrc\nijbvueenzsmgkmkrskjspvfchwkqdglkxnrdtevvmiqmfgvafkdypxjthz\nkqdglkxnrdtevvmiqmfgvafkdypxjthzhfsbavmhgkavkfonscaokdxoscenpxrcivydtkrxjy\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "iefouqzxoyuieqdzalfktehtvdbvjmeu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNauuo is a girl who loves playin...
[{"type": "stdin_stdout", "input": "20\n0 0 0 0 5 6 7 8 0 0 11 12 13 14 15 16 17 18 0 0\n20 9 19 0 0 0 0 0 0 10 0 0 0 0 0 0 1 2 3 4\n", "output": "37\n"}, {"type": "stdin_stdout", "input": "20\n15 10 6 0 0 11 19 17 0 0 0 0 0 1 14 0 3 4 0 12\n20 7 0 0 0 0 0 0 5 8 2 16 18 0 0 13 9 0 0 0\n", "output": "30\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\nWrite a function that accepts tw...
[{"input": "[1, 1, 5, 6, 9, 16, 27]\n4", "output": "[3]", "fn_name": "int_diff"}, {"input": "[4, 8, 12, 12, 3, 6, 2]\n6", "output": "[3]", "fn_name": "int_diff"}, {"input": "[1, 2, 3, 4, 5, 6, 7]\n7", "output": "[0]", "fn_name": "int_diff"}, {"input": "[1, 6, 2, 3, 7, 8, 7]\n0", "output": "[1]", "fn_name": "int_diff"},...
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\nAt the start of each season, eve...
[{"input": "[1, 2, 3, 4, 6, 9, 10, 11, 15, 18, 27, 29, 34, 36, 38, 45, 47, 54, 56, 63, 65, 69, 72, 74, 81, 83, 90, 92]\n9", "output": "[null]", "fn_name": "generate_number"}, {"input": "[1, 2, 3, 4, 6, 9, 10, 11, 15, 18, 27, 29, 34, 36, 38, 45, 47, 54, 56, 63, 65, 69, 72, 74, 81, 83, 92]\n9", "output": "[null]", "fn_na...
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\nAncient Egyptians are known to h...
[{"type": "stdin_stdout", "input": "((((4?6)?9)?((5?(7?1))?(6?(4?(((((((7?3)?7)?(((((8?(6?7))?((1?2)?(5?8)))?8)?7)?4))?6)?7)?1)?((7?(2?((1?(((8?(((((2?7)?(((((3?6)?3)?(((((9?5)?7)?(1?(5?5)))?(8?((3?(1?2))?((8?5)?(7?((9?((9?8)?7))?1))))))?1))?1)?(9?2)))?((7?5)?((9?(4?(9?6)))?(8?(((5?7)?2)?(6?(3?8)))))))?(((4?(2?2))?(7?9...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIto joined the Kyudo club after ...
[{"type": "stdin_stdout", "input": "20\n1\n11\n1\n-1\n0\n8\n-2\n1\n0", "output": "12\n-1\n"}, {"type": "stdin_stdout", "input": "20\n1\n10\n1\n-1\n0\n8\n-2\n1\n0", "output": "11\n-1\n"}, {"type": "stdin_stdout", "input": "20\n3\n2\n0\n1\n12\n8\n-1\n-1\n0", "output": "18\n-2\n"}, {"type": "stdin_stdout", "input": "20\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\nYou are given n Γ— m table. Each ...
[{"type": "stdin_stdout", "input": "5 50\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOne day in the IT lesson Anna an...
[{"type": "stdin_stdout", "input": "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "izoiweukqszkkhwapzxyotbaarpqxbybsjxilhylbbjbvoedrezyluaabsfzvtxxvncdwxrlfdtfvbfoqwlzqwneimwzpoygfdcldmxdhoxzensxlspituzocvzzrfomhggrwurdccgfoorvhyzsdkpjhwakuoxwdjhzaalanyzwuuqwlrtmvmdraleyusjqdyxuztvc\nizoiweukqszkkhwapzxyotbaarpqxbybsjxilhylbbjbvoedrezyluaabsfzvtxxvncdwxrlfdtfvbfoqw...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNathan O. Davis is challenging a...
[{"type": "stdin_stdout", "input": "100 100 1 1\n78 1 50 100 21\n640 295 1 2\n1 -1 640 480 100\n0 0 0 0", "output": "Yes\nYes\n"}, {"type": "stdin_stdout", "input": "100 100 1 0\n78 1 50 100 21\n640 295 1 2\n1 -1 640 480 100\n0 0 0 0", "output": "Yes\nYes\n"}, {"type": "stdin_stdout", "input": "100 100 1 0\n78 1 50 100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nproblem\n\nPrepare the Othello b...
[{"type": "stdin_stdout", "input": "3\n1 1 10 1\n2 4 6 8\n6 3 8 8", "output": "10\n19\n15\n"}, {"type": "stdin_stdout", "input": "3\n1 1 10 1\n2 4 6 8\n8 3 8 8", "output": "10\n19\n6\n"}, {"type": "stdin_stdout", "input": "3\n1 1 10 1\n2 4 6 8\n8 3 8 4", "output": "10\n19\n2\n"}, {"type": "stdin_stdout", "input": "3\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\nPolycarp has just invented a new...
[{"type": "stdin_stdout", "input": "89\n11111111101111111110111111111011111111101111111110111111111011111111101111111110111111111\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "89\n11111111101111111110111111111011111111101111111110111111111011111111101111111110111111111\n", "output": "999999999\n"}, {...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n stones arranged on a...
[{"type": "stdin_stdout", "input": "20\n53 86 76 100 16 12 13 97 79 23 28 64 42 10 23 56 59 76 48 12\n48 49 49 49 48 49 48 49 49 49 48 48 48 49 49 49 49 49 49 48\n", "output": "YES\n19\n14 1 4\n14 16 7\n14 17 10\n14 12 15\n14 3 2\n6 3 25\n6 18 11\n20 18 16\n20 9 20\n7 9 10\n7 2 25\n5 2 12\n5 8 20\n10 8 25\n15 8 3\n15 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\nYou and your best friend Stripes...
[{"input": "499", "output": "[48.06]", "fn_name": "cheapest_quote"}, {"input": "10", "output": "[0.97]", "fn_name": "cheapest_quote"}, {"input": "20", "output": "[1.93]", "fn_name": "cheapest_quote"}, {"input": "40", "output": "[3.85]", "fn_name": "cheapest_quote"}, {"input": "41", "output": "[3.95]", "fn_name": "cheap...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call the set of positive i...
[{"type": "stdin_stdout", "input": "1000000000 22 22\n", "output": "500000006\n"}, {"type": "stdin_stdout", "input": "1000000000 21 22\n", "output": "488372094\n"}, {"type": "stdin_stdout", "input": "1000000000 20 22\n", "output": "476190480\n"}, {"type": "stdin_stdout", "input": "455678451 22 17\n", "output": "2219971...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 trains to compose crosswor...
[{"type": "stdin_stdout", "input": "ABBAAAABBBB\nBBABAAAABAABAB\nBAABABBBABBBBBAAA\nBABABAAABBAAABBAAAAB\nABAAAABBBBBABAABABBAAAAABBBBBB\nBBBBAABBAABBBBABAAABAABBAABBAA\n", "output": "BAABABBBABBBBBAAA.............\nA...............B.............\nB...............A.............\nA...............A.............\nB..........
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 unrest in the Galactic ...
[{"type": "stdin_stdout", "input": "100 100\n52 93 36 69 49 37 48 42 63 27 16 60 16 63 80 37 69 24 86 38 73 15 43 65 49 35 39 98 91 24 20 35 12 40 75 32 54 4 76 22 23 7 50 86 41 9 9 91 23 18 41 61 47 66 1 79 49 21 99 29 87 94 42 55 87 21 60 67 36 89 40 71 6 63 65 88 17 12 89 32 79 99 34 30 63 33 53 56 10 11 66 80 73 50...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 walruses standing in...
[{"type": "stdin_stdout", "input": "15\n18 6 33 21 14 20 13 9 18 20 28 13 19 25 21\n", "output": "10 -1 11 8 6 6 0 -1 2 2 3 -1 -1 0 -1 "}, {"type": "stdin_stdout", "input": "15\n18 6 33 21 14 20 20 9 18 20 28 13 19 25 21\n", "output": "10 -1 11 8 6 6 5 -1 2 2 3 -1 -1 0 -1 "}, {"type": "stdin_stdout", "input": "15\n18 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\nTraining is indispensable for ac...
[{"type": "stdin_stdout", "input": "3\n0\n0\n1000000010", "output": "1000000010\n0\n0\n"}, {"type": "stdin_stdout", "input": "3\n0\n0\n1000000000", "output": "1000000000\n0\n0"}, {"type": "stdin_stdout", "input": "4\n11\n5\n10\n10", "output": "5\n10\n10\n11\n"}, {"type": "stdin_stdout", "input": "4\n11\n5\n19\n10", "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\nTwo tortoises named ***A*** and ...
[{"input": "720\n850\n370", "output": "[[2, 50, 46]]", "fn_name": "race"}, {"input": "820\n850\n550", "output": "[[18, 20, 0]]", "fn_name": "race"}, {"input": "720\n850\n70", "output": "[[0, 32, 18]]", "fn_name": "race"}, {"input": "720\n850\n37", "output": "[[0, 17, 4]]", "fn_name": "race"}, {"input": "80\n91\n37", "o...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a non-negative integer N, de...
[{"type": "stdin_stdout", "input": "3\n0 10\n34 453\n517800 1591348", "output": "46\n1890\n4830969\n"}, {"type": "stdin_stdout", "input": "3\n0 10\n16 252\n314159 1591348", "output": "46\n1065\n5747356\n"}, {"type": "stdin_stdout", "input": "3\n1 10\n28 297\n314159 559966", "output": "46\n1207\n1106130\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\nIt is a holiday season, and Koal...
[{"type": "stdin_stdout", "input": "70\n0010011111011101101111000111101011010101000011000000010100010101010001\n3 1\n1 5\n3 1\n4 1\n3 3\n2 4\n2 1\n5 1\n2 4\n5 2\n5 2\n4 1\n2 5\n2 2\n4 2\n5 1\n1 2\n2 4\n3 1\n1 1\n5 3\n5 2\n3 5\n4 4\n2 1\n3 2\n1 3\n5 1\n3 4\n2 3\n1 5\n4 1\n2 2\n5 1\n3 3\n4 2\n1 4\n5 2\n1 2\n4 1\n1 4\n5 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\nTakahashi has many red balls and...
[{"type": "stdin_stdout", "input": "984159202374430527 552558592232591693 265756112319848958\n", "output": "718403090054581569\n"}, {"type": "stdin_stdout", "input": "994914121424164663 818665214162491101 129546857230076861\n", "output": "865367264194087802\n"}, {"type": "stdin_stdout", "input": "501719768609305159 370...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ski base is planned to be buil...
[{"type": "stdin_stdout", "input": "2 40\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n1 2\n", "output": "0\n1\n3\n7\n15\n31\n63\n127\n255\n511\n1023\n2047\n4095\n8191\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\nFor a pole vaulter, it is very i...
[{"input": "1.83", "output": "[10.67]", "fn_name": "starting_mark"}, {"input": "2.13", "output": "[11.85]", "fn_name": "starting_mark"}, {"input": "1.75", "output": "[10.36]", "fn_name": "starting_mark"}, {"input": "1.52", "output": "[9.45]", "fn_name": "starting_mark"}, {"input": "1.22", "output": "[8.27]", "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\nWrite a program which reverses a...
[{"type": "stdin_stdout", "input": "w32njmda", "output": "admjn23w\n"}, {"type": "stdin_stdout", "input": "admjn23w", "output": "w32njmda\n"}, {"type": "stdin_stdout", "input": "acmjn23w", "output": "w32njmca\n"}, {"type": "stdin_stdout", "input": "3cmjn2aw", "output": "wa2njmc3\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\nJoe has been hurt on the Interne...
[{"type": "stdin_stdout", "input": "20 20\n..+#+.+++.+++#+..#++\n..####+++#..++#+.+.+\n+.+..+++..#.++++++++\n+##++..+.##..#+++.++\n++.+.+.+.++++.+++.++\n.+++++.+#+++++...+#+\n.++.#+++++++++.++.++\n...+.++++++.++#...++\n+++.+++.+....#....+.\n.++++++.+.+..++.++##\n.+..+..++#.+..++++++\n+..#+++++..+##+#++.+\n+.+#+#....+.#...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIntroduction\n\nIt's been more t...
[{"input": "1735", "output": "[1398915]", "fn_name": "toothpick"}, {"input": "1757", "output": "[1443119]", "fn_name": "toothpick"}, {"input": "1974", "output": "[2038207]", "fn_name": "toothpick"}, {"input": "2048", "output": "[2796203]", "fn_name": "toothpick"}, {"input": "1038", "output": "[699451]", "fn_name": "too...
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\nAt the beginning of the new seme...
[{"type": "stdin_stdout", "input": "16\n203671 381501\n58867 59732\n817520 962123\n125391 163027\n601766 617692\n381501 444610\n761937 817520\n16 10551\n21096 38291\n718073 761937\n583868 601766\n554859 731755\n678098 718073\n962123 992003\n163027 203671\n87917 96397\n", "output": "1\n12 "}, {"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\nImagine that you are in a buildi...
[{"type": "stdin_stdout", "input": "5000 2081 3619 5000\n", "output": "557114846\n"}, {"type": "stdin_stdout", "input": "5000 2314 1234 5000\n", "output": "546628648\n"}, {"type": "stdin_stdout", "input": "5000 1031 4782 5000\n", "output": "981271392\n"}, {"type": "stdin_stdout", "input": "5000 4998 5000 5000\n", "outp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings x and ...
[{"type": "stdin_stdout", "input": "justamassivetesttocheck\nhowwellyouhandlemodulooperations\n", "output": "\n667387032\n"}, {"type": "stdin_stdout", "input": "justamassivetestsocheck\nhowwellyouhandlemodulooperations\n", "output": "732028571\n"}, {"type": "stdin_stdout", "input": "kcehcostsetevissamatsuj\nhowwellyouh...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 educational program (AHK Edu...
[{"type": "stdin_stdout", "input": "0 1 1 4 11 16 3 2 0 0 5 13", "output": "no\n"}, {"type": "stdin_stdout", "input": "0 1 1 4 11 16 6 2 0 0 5 13", "output": "no\n"}, {"type": "stdin_stdout", "input": "0 1 1 4 11 16 6 2 1 0 5 13", "output": "no\n"}, {"type": "stdin_stdout", "input": "0 1 1 4 2 20 6 2 2 0 13 13", "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\n# Definition \n\nA number is a *...
[{"input": "11350224", "output": "[\"Special!!\"]", "fn_name": "special_number"}, {"input": "23", "output": "[\"Special!!\"]", "fn_name": "special_number"}, {"input": "32", "output": "[\"Special!!\"]", "fn_name": "special_number"}, {"input": "55", "output": "[\"Special!!\"]", "fn_name": "special_number"}, {"input": "2"...
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 queen is the strongest chess p...
[{"type": "stdin_stdout", "input": "10 20\n6 10\n3 10\n10 4\n5 3\n9 4\n10 1\n10 3\n10 7\n8 5\n7 2\n4 7\n5 1\n2 9\n5 5\n6 6\n9 8\n2 10\n9 10\n1 4\n7 4\n", "output": "0 0 4 9 4 1 2 0 0\n"}, {"type": "stdin_stdout", "input": "100 10\n97 5\n53 35\n92 86\n54 95\n98 13\n36 23\n55 56\n96 94\n25 96\n49 31\n", "output": "6 4 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\nWhen new students come to the Sp...
[{"type": "stdin_stdout", "input": "|||||||||||||||||||||||||||||||||||||||||||||||||||+|||||||||||||||||||||||||||||||||||||||||||||||||||=||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\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\nPrint all the integers that sati...
[{"type": "stdin_stdout", "input": "0 32 110", "output": "0\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\n"}, {"type": "stdin_stdout", "input": "8 35 011", "output": "8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n25\n26\n27\n28\n29\n30\n31\n32\n33\n3...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an embassy of a well-known ki...
[{"type": "stdin_stdout", "input": "2 7 1\n10 3 10\n100\n3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 5\n2 6\n3 5\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 1 3 1 2 3\n1 5\n2 6\n3 5\n", "output": "110\n"}, {"type": "stdin_stdout", "input": "3 6 3\n2 1 3\n1 2 3 1 2 3\n1 5\n3 6\n3 5\n", "output": "100\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\nFalling Block Puzzle\n\nBlock dr...
[{"type": "stdin_stdout", "input": "1 1\n##\n#.\n..\n..\n#.\n..\n1 1\n.#\n#.\n#.\n..\n..\n.#\n2 2\n##\n#.\n##\n#.\n..\n.#\n##\n#.\n.#\n..\n#.\n..\n1 3\n#.\n..\n##\n##\n##\n##\n##\n##\n##\n##\n##\n##\n##\n##\n10 3\n##\n#.\n##\n#.\n##\n.#\n##\n.#\n#.\n##\n#.\n##\n.#\n##\n.#\n##\n.#\n#.\n.#\n#.\n#.\n.#\n#.\n.#\n#.\n..\n#....
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis kata is part of the collect...
[{"input": "\"abcdefghijklmnopqrstuvwxyz\"\n\"zyxwvutsrqponmlkjihgfedcba\"", "output": "[[0, 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]]", "fn_name": "spot_diff"}, {"input": "\"Congratulations! You did it!\"\n\"Conglaturations! U did this!\"", "output": "[[4, 8, 17, 18, 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\nHeidi and Doctor Who hopped out ...
[{"type": "stdin_stdout", "input": "1 2\n1156621358\n561572949 6885\n312543334 3629\n", "output": "10514\n"}, {"type": "stdin_stdout", "input": "1 2\n458828651\n209599643 7592\n208642144 8751\n", "output": "16343\n"}, {"type": "stdin_stdout", "input": "1 2\n754725914\n561572949 6885\n312543334 3629\n", "output": "10514...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Summation Of Primes\n\nThe sum...
[{"input": "25000", "output": "[32405717]", "fn_name": "summationOfPrimes"}, {"input": "4000", "output": "[1013507]", "fn_name": "summationOfPrimes"}, {"input": "5000", "output": "[1548136]", "fn_name": "summationOfPrimes"}, {"input": "2000", "output": "[277050]", "fn_name": "summationOfPrimes"}, {"input": "3000", "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\nWrite a program which judges whe...
[{"type": "stdin_stdout", "input": "3\n-1 -2 0\n0 1 -1\n-2 0 2", "output": "NO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "3\n-1 -2 -1\n0 1 0\n-2 0 2", "output": "NO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "3\n1 1 0\n29 1 -1\n0 1 -1", "output": "YES\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "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\n# Task\n Mr.Nam has `n` candies,...
[{"input": "15\n3\n3\n18", "output": "[[-1, -1, -1]]", "fn_name": "get_candy_position"}, {"input": "6\n2\n2\n7", "output": "[[-1, -1, -1]]", "fn_name": "get_candy_position"}, {"input": "15\n3\n3\n14", "output": "[[2, 1, 1]]", "fn_name": "get_candy_position"}, {"input": "15\n3\n3\n1", "output": "[[1, 2, 2]]", "fn_name":...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call a positive integer ex...
[{"type": "stdin_stdout", "input": "5\n9\n42\n13\n100\n111\n", "output": "9\n13\n10\n19\n19\n"}, {"type": "stdin_stdout", "input": "1\n707951\n", "output": "52\n"}, {"type": "stdin_stdout", "input": "1\n99889\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "1\n9123\n", "output": "36\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\nSeen from above, there is a grid...
[{"type": "stdin_stdout", "input": "1111\n00001\n0110\n11111\n1010\n00011\n1010\n01011\n1111", "output": "RRRRDDDDLLLLRULRDRRULRULULDLUDRURRDDDRUUUULLLL\n"}, {"type": "stdin_stdout", "input": "1111\n01001\n0010\n11101\n1110\n00111\n1110\n10001\n1110", "output": "RRRRDDDDUUUULLLDDRURLDRDLLLDRRRLLLURRULLUDRUUL\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\nAfter a long party Petya decided...
[{"type": "stdin_stdout", "input": "5\n3 1 1\nBC\n1 0 0\nAB\n4 1 11\nAABBBBAABB\n1 3 1\nBBBBB\n6 1 1\nABABAB\n", "output": "1\n2\n1\n5\n6\n"}, {"type": "stdin_stdout", "input": "5\n2 1 1\nBB\n1 1 1\nAB\n3 2 0\nAABBBBAABB\n5 3 4\nBBBBB\n2 1 1\nABABAB\n", "output": "1\n1\n10\n1\n6\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\nHighway 201 is the most busy str...
[{"type": "stdin_stdout", "input": "3\n3\n1 2 3\n4\n0 1 1 0\n10\n10 3 1 11 5 2 1 7 19 4\n", "output": "0\n4\n21\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 2 3\n4\n0 1 1 0\n10\n10 3 1 11 5 2 1 7 10 4\n", "output": "0\n4\n24\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 1 3\n4\n1 1 1 0\n10\n16 3 6 11 0 2 1 3 10 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\nPetya loves lucky numbers very m...
[{"type": "stdin_stdout", "input": "44447774444474477747774774477777474774744744477444447777477477744747477774744444744777777777747777477447744774744444747477744744\n77777474477477747774777777474474477444474777477747747777477747747744474474747774747747444777474444744744444477477777747744747477\n", "output": "37\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 Little Elephant loves number...
[{"type": "stdin_stdout", "input": "1010000000\n", "output": "117\n"}, {"type": "stdin_stdout", "input": "1011000000\n", "output": "171\n"}, {"type": "stdin_stdout", "input": "654885000\n", "output": "698\n"}, {"type": "stdin_stdout", "input": "1000000000\n", "output": "91\n"}, {"type": "stdin_stdout", "input": "101871...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, you found a bot to pla...
[{"type": "stdin_stdout", "input": "3\nRRRR\nRSP\nS\n", "output": "PPPP\nPPP\nR\n"}, {"type": "stdin_stdout", "input": "3\nRRRR\nRSP\nS\n", "output": "PPPP\nPPP\nR\n"}, {"type": "stdin_stdout", "input": "3\nRRRR\nSSP\nS\n", "output": "PPPP\nRRR\nR\n"}, {"type": "stdin_stdout", "input": "3\nQRRR\nRSP\nS\n", "output": "P...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 in Divanovo, a huge riv...
[{"type": "stdin_stdout", "input": "50\n3 60 52 60 60 84 63 40 50 21 39 59 40 15 59 54 5 84 63 23 11 69 27 65 64 8 39 4 89 19 10 45 51 66 69 60 82 25 82 66 86 35 24 64 43 67 35 25 39 82\n50\n57\n46\n44\n70\n74\n98\n36\n48\n76\n52\n86\n40\n28\n56\n73\n64\n78\n21\n37\n54\n33\n93\n16\n18\n66\n75\n62\n77\n81\n96\n31\n41\n6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N items.\n\nThe va...
[{"type": "stdin_stdout", "input": "50 15 47\n795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 795366679311762 473967724102502 795366679311762 766773867637913 795366679311762 795366679311762 795366679311762 79...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPak Chanek plans to build a gara...
[{"type": "stdin_stdout", "input": "1000000000\n", "output": "1333333336\n"}, {"type": "stdin_stdout", "input": "999999999\n", "output": "1333333335\n"}, {"type": "stdin_stdout", "input": "999999998\n", "output": "1333333333\n"}, {"type": "stdin_stdout", "input": "999999997\n", "output": "1333333332\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\nThe Super Duper Secret Meeting o...
[{"type": "stdin_stdout", "input": "-565 -444 -419 -421\n30\n363 -249 790\n704 57 999\n-316 -305 119\n-778 -543 373\n-589 466 190\n516 -174 893\n-742 -662 390\n-382 825 1000\n520 -732 909\n-220 -985 555\n-49 -697 396\n-701 -882 520\n-105 227 691\n-113 -470 231\n-503 98 1088\n236 69 759\n150 393 951\n414 381 1000\n1096 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPeople in the Tomskaya region li...
[{"type": "stdin_stdout", "input": "25\n39226529 640445129 936289624 364461191 1096077769 573427707 1919403410 950067229 1217479531 455229458 1574949468 397268319 1267289585 995220637 1920919164 501015483 1815262670 1197059269 86947741 1137410885 667368575 733666398 1536581408 611239452 947487746\n", "output": "2596546...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nToday, Wet Shark is given n bish...
[{"type": "stdin_stdout", "input": "10\n646 171\n816 449\n375 934\n950 299\n702 232\n657 81\n885 306\n660 304\n369 371\n798 657\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n646 171\n816 449\n375 934\n950 299\n702 232\n657 81\n885 306\n660 304\n369 371\n798 657\n", "output": "0\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\nVasya has recently found out wha...
[{"type": "stdin_stdout", "input": "4898 3\n", "output": "3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "5\n19\n1 1 -1 -1 -1 0 -1 -1 1 -1 -1 1 0 1 0 -1 0 -1 -1\n11\n1 0 1 0 -1 1 -1 -1 -1 1 0\n58\n1 0 0 -1 -1 0 1 0 1 0 1 -1 1 1 0 0 1 -1 -1 1 -1 1 -1 -1 1 -1 0 1 0 0 0 0 -1 -1 0 0 0 1 0 0 1 -1 0 0 0 -1 0 0 1 -1 0 -1 1 1 -1 0 0 1\n2\n0 0\n10\n0 -1 1 -1 1 -1 0 0 1 0\n", "output": "NO\nNO\nNO...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDeveloping tools for creation of...
[{"type": "stdin_stdout", "input": "-1000000000 -1000000000 1000000000 1000000000\n", "output": "2000000002000000001"}, {"type": "stdin_stdout", "input": "-1000000000 -1000000000 1000000000 1000000000\n", "output": "2000000002000000001"}, {"type": "stdin_stdout", "input": "-1000000000 -999999999 1000000000 999999999\n"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n1\n210", "output": "0\n2628\n"}, {"type": "stdin_stdout", "input": "2\n1\n198", "output": "0\n2484\n"}, {"type": "stdin_stdout", "input": "2\n1\n175", "output": "0\n2288\n"}, {"type": "stdin_stdout", "input": "2\n2\n175", "output": "2\n2288\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\nComplete the code which should r...
[{"input": "\"a\\n\"", "output": "[false]", "fn_name": "is_letter"}, {"input": "\"ab\"", "output": "[false]", "fn_name": "is_letter"}, {"input": "\"7\"", "output": "[false]", "fn_name": "is_letter"}, {"input": "\"_\"", "output": "[false]", "fn_name": "is_letter"}, {"input": "\"\"", "output": "[false]", "fn_name": "is_l...
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 pretty straightforward. You...
[{"input": "\"eloquent\"", "output": "[\"loquen\"]", "fn_name": "remove_char"}, {"input": "\"country\"", "output": "[\"ountr\"]", "fn_name": "remove_char"}, {"input": "\"ooopsss\"", "output": "[\"oopss\"]", "fn_name": "remove_char"}, {"input": "\"person\"", "output": "[\"erso\"]", "fn_name": "remove_char"}, {"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\nIT City company developing compu...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "228571428571428571\n"}, {"type": "stdin_stdout", "input": "1000000010000000000\n", "output": "228571430857142858\n"}, {"type": "stdin_stdout", "input": "1334196189585702396\n", "output": "304959129048160547\n"}, {"type": "stdin_stdout", "input": "13...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 ancient Berlanders believed ...
[{"type": "stdin_stdout", "input": "50\nagecd\ncghafi\nfiide\niecc\njbdcfjhgd\ndiee\nhfeg\nehc\ngfijgjh\ngacaifebg\ndicbbddc\nhjgciaei\njjcdh\ng\ngc\ncf\nhfdjhd\nc\nicidbec\nji\neeh\ncgeejggc\nacfd\njjg\najefdj\neghhebiic\nbih\ngbb\njjaa\nidc\ngafi\necg\ndbigbjiehj\ncedif\nahidfaaajg\nhfhhiccbgb\ndgegjgieif\nhgjebhfdc\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has an exam period which...
[{"type": "stdin_stdout", "input": "100 10\n1 1 6 6 6 2 5 7 6 5 3 7 10 10 8 9 7 6 9 2 6 7 8 6 7 5 2 5 10 1 10 1 8 10 2 9 7 1 6 8 3 10 9 4 4 8 8 6 6 1 5 5 6 5 6 6 6 9 4 7 5 4 6 6 1 1 2 1 8 10 6 2 1 7 2 1 8 10 9 2 7 3 1 5 10 2 8 10 10 10 8 9 5 4 6 10 8 9 6 6\n2 4 10 11 5 2 6 7 2 15\n", "output": "74\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\nOld timers of Summer Informatics...
[{"type": "stdin_stdout", "input": "20 4\n1\n1\n1\n1\n1\n2\n2\n2\n2\n2\n3\n3\n3\n3\n3\n4\n4\n4\n4\n4\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "20 4\n1\n1\n1\n1\n1\n2\n2\n2\n2\n2\n3\n3\n3\n3\n3\n4\n4\n4\n4\n4\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "16 12\n1\n1\n1\n2\n2\n4\n3\n3\n3\n4\n4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, a junior high school stude...
[{"type": "stdin_stdout", "input": "6\nonetwo2\n-\nonetwo1\nonetwo2\n-\nonetwo1\n7\nv\ntopbottom2\nonetwo2\n-\nonetwo1\ntopbottom1\n-\n6\nbaz2\nfoo2\nbaz1v\nbar1\nfoo1\nbar1\n0", "output": "2\n3\n1\n5\n6\n4\n4\n5\n3\n6\n2\n1\n7\n4\n3\n1\n5\n2\n6\n"}, {"type": "stdin_stdout", "input": "6\nonetwo2\n-\nonetwo1\nonetwo1\n-...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a staircase with N step...
[{"type": "stdin_stdout", "input": "16090 15931\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\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is a harder version of the ...
[{"type": "stdin_stdout", "input": "8\n-100000000 -100000000 -100000000\n100000000 100000000 100000000\n-100000000 100000000 100000000\n-100000000 -100000000 100000000\n100000000 100000000 -100000000\n100000000 -100000000 -100000000\n-100000000 100000000 -100000000\n100000000 -100000000 100000000\n", "output": "1 4\n7 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nReading books is one of Sasha's ...
[{"type": "stdin_stdout", "input": "tttdddssstttssstttdddddddddttttttdddsssdddtttsssdddsssssstttddddddtttdddssstttsssttttttdddtttsssssstttssssssssstttsssssstttssstttdddddddddsssdddssssssdddssstttsssdddssstttdddttttttdddddddddsssssstttdddtttssssssdddddddddttttttdddtttsssdddssstttsssdddssssssdddsssdddddddddtttssstttsssss...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 not good at hide-and-see...
[{"type": "stdin_stdout", "input": "3\n6 6 3\n19 19 6\n42 10 1\n6\n5 2 2 11\n12 7 2 11\n11 9 1 11\n14 2 22 5\n17 9 20 5\n20 10 20 5\n0", "output": "Safe\nDanger\nDanger\nDanger\nDanger\nDanger\n"}, {"type": "stdin_stdout", "input": "3\n6 2 16\n40 7 8\n42 8 1\n6\n5 3 4 11\n12 4 2 15\n16 2 0 11\n28 2 31 5\n17 9 41 5\n24 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnton has the integer x. He is i...
[{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "999999999999999999\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "999999999999999999\n"}, {"type": "stdin_stdout", "input": "978916546899999999\n", "output": "899999999999999999\n"}, {"type": "stdin_stdout", "input": "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\nThere are n schoolchildren, boys...
[{"type": "stdin_stdout", "input": "MFFFMMFMFMFMFFFMMMFFMMMMMMFMMFFMMMFMMFMFFFMMFMMMFFMMFFFFFMFMFFFMMMFFFMFMFMFMFFFMMMMFMMFMMFFMMMMMMFFM\n", "output": "54\n"}, {"type": "stdin_stdout", "input": "MMMMMFFMFMFMFMMFMMFFMMFMFFFFFFFMFFFMMMMMMFFMMMFMFMMFMFFMMFMMMFFFFFMMMMMFMMMMFMMMFFMFFMFFFMFFMFFMMFFM\n", "output": "58\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\nA sequence $(b_1, b_2, \\ldots, ...
[{"type": "stdin_stdout", "input": "6\n4\n-1 -2 -1 1\n7\n-3 2 -2 0 -4 7 1\n5\n0 5 -3 2 -5\n3\n2 0 1\n4\n-3 -1 2 0\n6\n-3 -2 -1 1 1 1\n", "output": "3\n5\n4\n2\n3\n4\n"}, {"type": "stdin_stdout", "input": "6\n4\n-1 -2 -1 1\n7\n-3 2 -2 0 -4 7 1\n5\n0 5 -3 1 -5\n3\n2 0 1\n4\n-3 -1 2 0\n6\n-3 -2 -2 1 1 1\n", "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\nYou are given three integers A, ...
[{"type": "stdin_stdout", "input": "-1 -1 -1", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "-2 -1 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-2 -1 -2", "output": "No\n"}, {"type": "stdin_stdout", "input": "-3 10 -1", "output": "No\n"}, {"type": "stdin_stdout", "input": "-3 1 -11", "output": "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\nInna loves digit 9 very much. Th...
[{"type": "stdin_stdout", "input": "44444444444444544444444445444444444444444444444444554444444444444444444444444444444444444444455444444444444444444444444444444444444444545444444444444444444444444444444444444445444444444444444444444444444444444444544444444444444444444444444444444444444444444544444444444444444444444444...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 bought food at the store to ma...
[{"type": "stdin_stdout", "input": "4\nsandwich 30 120\nelppa 50 200\ncheese 20 40\ncake 100 100\n9\nonigiri 80 300\nonigiri 80 300\nanpan 70 280\nmikan 50 80\nkanzume 101 500\nchocolate 50 350\niookce 30 132\npurin 40 400\ncracker 40 154\n0", "output": "cake\nelppa\nsandwich\ncheese\nkanzume\npurin\nchocolate\nonigiri...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nFor the integer n (1 ...
[{"type": "stdin_stdout", "input": "1\n119\nOOJOIOIOIIOII\n1\n14\nKIOIIOIOIOJOO\n0", "output": "3\n3\n"}, {"type": "stdin_stdout", "input": "1\n13\nOIIOIOIOIIOIO\n2\n13\nOOIOIOIOIIOII\n0", "output": "4\n2\n"}, {"type": "stdin_stdout", "input": "1\n13\nOOIOIOIOIIOII\n3\n13\nOOIOIOIOIIOII\n0", "output": "4\n1\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\nGottfried learned about binary n...
[{"type": "stdin_stdout", "input": "37\n1048575 327657 1046479 686078 513773 589787 387035 736754 1038077 1048056 59263 753353 784318 647131 519679 294910 185560 604141 456668 849789 521404 782287 6137 1047551 849874 523933 521721 278491 1042415 581468 1013705 439526 1011709 917469 655311 327646 917499\n", "output": "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 goal of the matrix-chain mul...
[{"type": "stdin_stdout", "input": "6\n30 35\n35 15\n15 5\n5 10\n10 20\n20 29", "output": "16125\n"}, {"type": "stdin_stdout", "input": "6\n30 35\n35 15\n15 5\n5 10\n10 20\n20 27", "output": "15625\n"}, {"type": "stdin_stdout", "input": "6\n30 35\n35 15\n15 5\n5 10\n10 20\n20 47", "output": "20625\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\nPrint all subsets of a set $S$, ...
[{"type": "stdin_stdout", "input": "8", "output": "0:\n1: 0\n2: 1\n3: 0 1\n4: 2\n5: 0 2\n6: 1 2\n7: 0 1 2\n8: 3\n9: 0 3\n10: 1 3\n11: 0 1 3\n12: 2 3\n13: 0 2 3\n14: 1 2 3\n15: 0 1 2 3\n16: 4\n17: 0 4\n18: 1 4\n19: 0 1 4\n20: 2 4\n21: 0 2 4\n22: 1 2 4\n23: 0 1 2 4\n24: 3 4\n25: 0 3 4\n26: 1 3 4\n27: 0 1 3 4\n28: 2 3 4\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# A History Lesson\n\nThe Pony E...
[{"input": "[6, 24, 6, 8, 28, 8, 23, 47, 17, 29, 37, 18, 40, 49]\n2", "output": "[5]", "fn_name": "riders"}, {"input": "[33, 8, 16, 47, 30, 30, 46]\n5", "output": "[5]", "fn_name": "riders"}, {"input": "[50, 100, 25, 50, 26]\n3", "output": "[6]", "fn_name": "riders"}, {"input": "[50, 50, 25, 50, 24]\n3", "output": "[3]...
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 security guard friend recen...
[{"type": "stdin_stdout", "input": "1000000\n", "output": "4000\n"}, {"type": "stdin_stdout", "input": "1000000\n", "output": "4000\n"}, {"type": "stdin_stdout", "input": "999000\n", "output": "3998\n"}, {"type": "stdin_stdout", "input": "999001\n", "output": "4000\n"}, {"type": "stdin_stdout", "input": "999999\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\nMany countries have such a New Y...
[{"type": "stdin_stdout", "input": "8 704 99 110\n", "output": "ACACACACACACACACACACBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA\nACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACACBBBBBBBBBBBBBA\n"}, {"type": "stdin_stdout", "input": "8 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\nLogical quantifiers are very use...
[{"type": "stdin_stdout", "input": "100 50\n55 13\n84 2\n22 63\n100 91\n2 18\n98 64\n1 86\n93 11\n17 6\n24 97\n14 35\n24 74\n22 3\n42 5\n63 79\n31 89\n81 22\n86 88\n77 51\n81 34\n19 55\n41 54\n34 57\n45 9\n55 72\n67 61\n41 84\n39 32\n51 89\n58 74\n32 79\n65 6\n86 64\n63 42\n100 57\n46 39\n100 9\n23 58\n26 81\n61 49\n71...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKawashiro Nitori is a girl who l...
[{"type": "stdin_stdout", "input": "7\n5 2\nrwrwq\n2 0\nac\n3 1\nioi\n4 0\nibdp\n22 0\ndokidoktliteraiureclub\n19 0\necilbiahgaahsmnetmi\n6 2\naaaaaa\n", "output": "NO\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "7\n5 1\nqwqwq\n2 0\nab\n3 1\nioi\n4 2\nipcc\n22 0\ncokidokiliteratureclub\n19 11\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nStudents in a class are making t...
[{"type": "stdin_stdout", "input": "1000000 1000000\n", "output": "3000000\n"}, {"type": "stdin_stdout", "input": "1000000 1000000\n", "output": "3000000\n"}, {"type": "stdin_stdout", "input": "1000000 999999\n", "output": "2999998\n"}, {"type": "stdin_stdout", "input": "999999 1000000\n", "output": "3000000\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\nThis contest, AtCoder Beginner C...
[{"type": "stdin_stdout", "input": "1530", "output": "ABC1530\n"}, {"type": "stdin_stdout", "input": "2825", "output": "ABC2825\n"}, {"type": "stdin_stdout", "input": "5621", "output": "ABC5621\n"}, {"type": "stdin_stdout", "input": "-105", "output": "ABC-105\n"}, {"type": "stdin_stdout", "input": "-136", "output": "AB...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 solution so that it...
[{"input": "\"a\"\n\"b\"\n\"c\"\n\"d\"\n\"e\"\n\"f\"\n\"f\"\n\"b\"", "output": "[true]", "fn_name": "solution"}, {"input": "\"a\"\n\"b\"\n\"c\"\n\"d\"", "output": "[false]", "fn_name": "solution"}, {"input": "1\n2\n42\n3\n4\n5\n42", "output": "[true]", "fn_name": "solution"}, {"input": "\"a\"\n\"b\"\n\"c\"\n\"c\"", "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\n## Description\n\nGiven an array...
[{"input": "[71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71]", "output": "[923]", "fn_name": "solution"}, {"input": "[60, 12, 96, 48, 60, 24, 72, 36, 72, 72, 48]", "output": "[132]", "fn_name": "solution"}, {"input": "[3, 13, 23, 7, 83]", "output": "[5]", "fn_name": "solution"}, {"input": "[4, 16, 24]", "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\nGenos recently installed the gam...
[{"type": "stdin_stdout", "input": "50\n22 19 14 22 20 11 16 28 23 15 3 23 6 16 30 15 15 10 43 28 19 19 22 30 28 1 27 12 12 14 17 30 17 26 21 26 27 1 11 23 9 30 18 19 17 29 11 20 29 24\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "50\n22 19 14 22 20 11 16 28 38 15 3 23 6 16 30 15 15 10 43 28 19 19 22 30 28 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Chris is bored during his...
[{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe want to know the index of the...
[{"input": "\"supercalifragilisticexpialidocious\"", "output": "[[2, 4, 7, 9, 12, 14, 16, 19, 21, 24, 25, 27, 29, 31, 32, 33]]", "fn_name": "vowel_indices"}, {"input": "\"narboonnee\"", "output": "[[2, 5, 6, 9, 10]]", "fn_name": "vowel_indices"}, {"input": "\"UNDISARMED\"", "output": "[[1, 4, 6, 9]]", "fn_name": "vowel...
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\nKoa the Koala and her best frien...
[{"type": "stdin_stdout", "input": "4\n5\n4 1 5 1 4\n4\n1 0 0 12\n1\n0\n2\n5 4\n", "output": "LOSE\nWIN\nDRAW\nWIN\n"}, {"type": "stdin_stdout", "input": "4\n5\n2 1 3 1 0\n4\n1 0 1 6\n1\n0\n2\n5 4\n", "output": "LOSE\nWIN\nDRAW\nWIN\n"}, {"type": "stdin_stdout", "input": "4\n5\n4 1 5 1 4\n4\n1 0 1 12\n1\n1\n2\n5 4\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 King of a little Kingdom on ...
[{"type": "stdin_stdout", "input": "5\nAJMP\naB33d\nE\n86AE\nAM\n-1\nMPJE\nWaEaETC302Q\nCP\nrTurnAGumdam1isdefferentf", "output": "33Bad\nAE86\n2-\nEC302QTWaEa\nTurnAGumdam0isdefferentfr\n"}, {"type": "stdin_stdout", "input": "5\nAJMP\naB33d\nE\n86AE\nMA\n-1\nMPJE\nWaEaETC302Q\nCP\nftnereffedsi1madmuGAnruTr", "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\nOne day, little Vasya found hims...
[{"type": "stdin_stdout", "input": "129\n1 1 3 3 1 4 7 4 3 5 8 11 3 9 15 4 11 17 1 6 18 9 11 13 17 22 8 18 26 13 16 20 3 16 35 26 23 28 27 30 39 29 43 8 14 6 17 32 26 31 2 18 3 47 52 21 57 1 35 35 53 47 16 26 30 65 48 2 32 11 10 5 4 1 4 53 71 21 53 8 58 49 17 6 19 80 1 49 43 60 12 60 35 25 86 45 47 97 52 74 10 91 93 31...
code_stdio