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\nGiven a string, remove any chara...
[{"input": "\"foundersandcoders\"", "output": "[\"ondersndoders\"]", "fn_name": "only_duplicates"}, {"input": "\"12314256aaeff\"", "output": "[\"1212aaff\"]", "fn_name": "only_duplicates"}, {"input": "\"colloquial\"", "output": "[\"ollol\"]", "fn_name": "only_duplicates"}, {"input": "\"abccdefee\"", "output": "[\"cceee...
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\nDanil decided to earn some money...
[{"type": "stdin_stdout", "input": "10\n1 1 3 1 3 1 4 6 3\n0 1 1 1 1 1 1 1 0 0\n10\nget 9\nget 10\nget 4\nget 5\nget 5\nget 5\nget 10\nget 7\nget 5\nget 2\n", "output": "0\n0\n2\n1\n1\n1\n0\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "10\n1 1 3 1 3 1 4 6 3\n0 1 1 1 1 1 1 1 1 0\n10\nget 9\nget 10\nget 4\nget 5\nget ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCheck if it is a vowel(a, e, i, ...
[{"input": "\"Amanda\"\n-2", "output": "[false]", "fn_name": "check_vowel"}, {"input": "\"Amanda\"\n0", "output": "[true]", "fn_name": "check_vowel"}, {"input": "\"Amanda\"\n2", "output": "[true]", "fn_name": "check_vowel"}, {"input": "\"cat\"\n0", "output": "[false]", "fn_name": "check_vowel"}, {"input": "\"cat\"\n4",...
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\nRead problems statements in Mand...
[{"type": "stdin_stdout", "input": "2\n2\n3 -1\n3\n10 5 2", "output": "-1 3\n2 10 5\n"}, {"type": "stdin_stdout", "input": "2\n2\n1 -1\n3\n10 5 2", "output": "-1 1\n2 10 5\n"}, {"type": "stdin_stdout", "input": "2\n2\n4 5\n3\n15 9 -1", "output": "4 5\n-1 15 9\n"}, {"type": "stdin_stdout", "input": "2\n2\n1 -1\n3\n10 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\nРодители Васи хотят, чтобы он ка...
[{"type": "stdin_stdout", "input": "250\n4 4 2 5 1 5 5 4 5 4 4 4 4 4 4 5 5 4 4 5 4 5 1 5 5 4 1 5 5 4 5 5 4 4 4 4 5 4 4 5 5 5 5 5 4 5 4 5 5 4 5 4 4 4 4 4 4 5 5 4 5 5 1 4 4 4 5 1 5 3 4 5 4 4 4 4 4 5 5 4 4 4 4 4 5 4 5 5 5 4 4 5 4 4 4 5 5 5 5 4 5 4 5 4 5 5 5 5 4 4 4 4 5 5 5 5 5 5 4 4 3 4 4 5 5 3 5 4 4 4 4 4 4 5 5 5 4 5 4 4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given string S and T con...
[{"type": "stdin_stdout", "input": "pgykichjtpukfnlxfcevkjezqsmeycanjlbessrfazdprcomdpjimsfbuslksyveergcgmonctcsvypolplcgsqyfkilrixodiwq\nfnlxfcevkjezqsmeycanjlbessrfazdprcomdpjimsfbuslksyveergcgmonctcsvypolplcgsqyfkilrixodiwqpgykichjtpuk\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "aaaaaaaaaaaaaaaaaaaaaa...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 palindromic number `595` is ...
[{"input": "10000000", "output": "[110]", "fn_name": "values"}, {"input": "1000000", "output": "[59]", "fn_name": "values"}, {"input": "5000000", "output": "[78]", "fn_name": "values"}, {"input": "9000000", "output": "[98]", "fn_name": "values"}, {"input": "100000", "output": "[30]", "fn_name": "values"}, {"input": "10...
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 goes to visit his classmat...
[{"type": "stdin_stdout", "input": "7\n7 3\n1 3\n18 6\n1865 4\n12 2\n2 10\n22 5\n", "output": "3\n1\n4\n467\n6\n1\n5\n"}, {"type": "stdin_stdout", "input": "7\n7 3\n1 3\n18 6\n987 4\n12 2\n2 10\n22 12\n", "output": "3\n1\n4\n248\n6\n1\n3\n"}, {"type": "stdin_stdout", "input": "7\n7 3\n1 3\n18 6\n1865 4\n12 2\n4 10\n22 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 two strings s and t a...
[{"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 1\n2 4\n2 2\n1 9\n5 7\n3 5\n", "output": "YES\nYES\nYES\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 1\n2 4\n2 2\n1 9\n5 7\n3 8\n", "output": "YES\nYES\nYES\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "aabbbbbbc\n6\n1 1\n2 7\n2 2\n1 9\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\nWhile walking down the street Va...
[{"type": "stdin_stdout", "input": "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_0123456789ABCDEFGHIJKLMNOPQR...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLately, a national version of a ...
[{"type": "stdin_stdout", "input": "40\n2 12 19\n4 10 7 1 3\n2 15 17\n1 6\n3 17 8 20\n4 8 16 11 18\n2 2 7\n4 12 13 8 7\n3 6 1 15\n3 19 11 13\n1 2\n2 16 14\n5 1 17 8 9 5\n1 2\n3 15 17 12\n4 20 4 19 18\n1 10\n4 12 1 17 16\n4 5 10 8 11\n1 10\n1 13\n1 17\n2 19 18\n1 3\n2 6 20\n1 8\n2 3 14\n3 17 3 1\n2 4 3\n1 12\n1 15\n1 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\nInitially, you have the array $a...
[{"type": "stdin_stdout", "input": "5\n1\n13\n42\n2538\n1000000000\n", "output": "0\n6\n11\n99\n63244\n"}, {"type": "stdin_stdout", "input": "5\n1\n10\n143\n255\n1000000000\n", "output": "0\n5\n22\n30\n63244\n"}, {"type": "stdin_stdout", "input": "5\n1\n13\n143\n751\n1000001000\n", "output": "0\n6\n22\n53\n63244\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\nDaisy is a senior software engin...
[{"type": "stdin_stdout", "input": "16\n1 1 1\n1 1 0\n1 1 0\n1 1 0\n1 1 0\n1 0 1\n1 0 1\n1 0 1\n1 0 1\n0 1 1\n0 1 1\n0 1 1\n0 1 1\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n0 0 0\n1 0 0\n0 1 0\n1 1 0\n0 0 0\n1 0 0\n0 0 1\n1 0 1\n0 0 0\n0 1 0\n0 0 1\n0 1 1\n1 0 0\n0 1 0\n0 0 1\n", "output": "Possible\n1 0 1 1 1 0 1 1 1 0 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\nLolek and Bolek are about to tra...
[{"type": "stdin_stdout", "input": "510 132\n50 76 77 69 94 30 47 65 14 62 18 121 26 35 49 17 105 93 47 16 78 3 7 74 7 37 30 36 30 83 121 113 7 58 86 10 65 57 34 102 55 44 43 47 106 44 115 75 109 70 47 45 16 57 62 55 20 88 74 40 45 84 41 1 9 53 65 25 67 31 115 2 63 51 123 70 65 65 18 14 75 14 103 26 117 105 36 104 81 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\nAmugae is in a very large round ...
[{"type": "stdin_stdout", "input": "1 1 10\n1 1 1 1\n1 1 1 1\n1 1 2 1\n1 1 1 1\n2 1 2 1\n2 1 1 1\n1 1 2 1\n1 1 2 1\n2 1 1 1\n2 1 1 1\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1 1 10\n1 1 1 1\n1 1 1 1\n1 1 2 1\n1 1 1 1\n2 1 2 1\n2 1 1 1\n1 1 2 1\n1 1 2 1\n2 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIvan has number $b$. He is sorti...
[{"type": "stdin_stdout", "input": "2793510720\n", "output": "1792\n"}, {"type": "stdin_stdout", "input": "1102701600\n", "output": "1440\n"}, {"type": "stdin_stdout", "input": "2327925600\n", "output": "1728\n"}, {"type": "stdin_stdout", "input": "2095133040\n", "output": "1600\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\nJack is working on his jumping s...
[{"type": "stdin_stdout", "input": "-1000000000\n", "output": "44723\n"}, {"type": "stdin_stdout", "input": "-1028109475\n", "output": "45346\n"}, {"type": "stdin_stdout", "input": "-1050321888\n", "output": "45835\n"}, {"type": "stdin_stdout", "input": "-245245154\n", "output": "22147\n"}, {"type": "stdin_stdout", "in...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTax Rate Changed\n\nVAT (value-a...
[{"type": "stdin_stdout", "input": "5 8 105\n8 5 105\n1 2 24\n99 98 24\n12 13 26\n1 22 23\n1 19 201\n13 16 112\n2 24 50\n1 82 61\n1 84 125\n1 99 999\n99 1 3106\n98 99 999\n1 99 11\n99 2 12\n0 0 0", "output": "109\n103\n24\n24\n26\n27\n237\n116\n62\n111\n230\n1972\n1576\n1004\n20\n7\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\nFor all x in the range of intege...
[{"input": "4", "output": "[120]", "fn_name": "sum_them"}, {"input": "3", "output": "[28]", "fn_name": "sum_them"}, {"input": "0", "output": "[0]", "fn_name": "sum_them"}, {"input": "1", "output": "[1]", "fn_name": "sum_them"}, {"input": "2", "output": "[6]", "fn_name": "sum_them"}]
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\nDuring the breaks between compet...
[{"type": "stdin_stdout", "input": "2 6 3 3 5 5 2 6 1 1 12 4 4 4 2 4 6 5 3 1 2 5 3 1\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "5 2 6 1 5 3 5 3 1 1 3 6 6 2 4 2 5 4 4 2 1 3 4 10\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "2 6 3 3 5 5 2 6 2 1 12 4 4 4 2 4 6 5 3 1 2 5 3 1\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\nOm Nom really likes candies and ...
[{"type": "stdin_stdout", "input": "2 100 59\n....................................................................................................\n.DR.D..DLLR.LDRR..L.LDRRRDLD.LDRR.LLR.R...DRLD.RRLL.L.D..R.LD.DL....LR.LR.DRLD.....L.D..RD...D.LL.R.\n", "output": "0 0 0 1 0 0 0 1 1 0 0 2 0 0 0 1 1 1 0 1 0 0 0 1 1 2 0 0 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have recently discovered tha...
[{"input": "100000000\n21\n5\n14", "output": "[1130769276]", "fn_name": "travel"}, {"input": "35869784\n90\n100\n5", "output": "[84954920]", "fn_name": "travel"}, {"input": "1234567\n4\n3\n11", "output": "[7760148]", "fn_name": "travel"}, {"input": "1000\n10\n127\n14", "output": "[1120]", "fn_name": "travel"}, {"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\nproblem\n\nGiven the sequence $ ...
[{"type": "stdin_stdout", "input": "4\n14 15 0 10", "output": "29\n"}, {"type": "stdin_stdout", "input": "4\n17 19 0 20", "output": "56\n"}, {"type": "stdin_stdout", "input": "4\n12 23 0 10", "output": "35\n"}, {"type": "stdin_stdout", "input": "4\n14 8 0 10", "output": "18\n"}, {"type": "stdin_stdout", "input": "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\nWe have a set S of N points in a...
[{"type": "stdin_stdout", "input": "10\n19 -11\n-3 -12\n5 3\n3 -15\n8 -14\n-9 -20\n10 -9\n0 2\n-7 17\n6 -6\n", "output": "7222\n"}, {"type": "stdin_stdout", "input": "10\n19 -11\n-3 -12\n5 3\n3 -15\n13 -14\n-9 -20\n10 -9\n0 2\n-7 17\n6 -6", "output": "7246"}, {"type": "stdin_stdout", "input": "10\n19 -11\n-3 -12\n5 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\nA bitstring is a string consisti...
[{"type": "stdin_stdout", "input": "9\n6 4\n100110\n3 2\n1?1\n3 2\n1?0\n4 4\n????\n7 4\n1?0??1?\n10 10\n11??11??11\n4 4\n1??1\n4 4\n?0?0\n6 2\n????00\n", "output": "YES\nYES\nNO\nYES\nYES\nNO\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "9\n6 4\n100110\n3 2\n1?1\n3 2\n0?1\n4 4\n????\n7 4\n1?0??1?\n10 10\n11???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\nWrite a function that gets a seq...
[{"input": "[\"a\", \"b\", [\"c\", \"d\", [\"e\", [\"a\", \"b\", [\"c\", \"d\", [\"e\", [\"a\", \"b\", [\"c\", \"d\", [\"e4\", [\"a\", \"b\", [\"c\", \"d\", [\"e\", [\"a\", \"b\", [\"c\", \"d\", [\"e\", [\"a\", \"b\", [\"c\", \"d\", [\"e14\"]]]]]]]]]]]]]]]]]]\n\"e\"", "output": "[true]", "fn_name": "locate"}, {"input":...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe little girl loves the proble...
[{"type": "stdin_stdout", "input": "31 48\n45 19 16 42 38 18 50 7 28 40 39 25 45 14 36 18 27 30 16 4 22 6 1 23 16 47 14 35 27 47 2\n6 16\n11 28\n4 30\n25 26\n11 30\n5 9\n4 17\n15 17\n10 25\n15 26\n1 3\n9 26\n8 29\n16 30\n3 24\n27 30\n9 10\n22 29\n2 6\n15 24\n6 21\n19 21\n4 28\n1 7\n18 21\n10 22\n6 15\n14 28\n4 19\n12 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\nWe have a sequence of N integers...
[{"type": "stdin_stdout", "input": "500 1000000000\n1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe prison of your city has n pr...
[{"type": "stdin_stdout", "input": "57 3 9\n4 5 2 7 12 1 1 3 2 9 4 9 0 6 12 5 -1 6 11 1 0 0 -1 3 1 0 5 1 0 31 8 8 0 1 7 3 1 13 4 4 5 1 4 -2 1 7 1 1 1 4 5 1 24 5 1 9 6\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "57 3 9\n4 5 2 7 12 1 1 0 2 9 4 9 0 6 12 5 -1 6 11 1 0 0 -1 3 1 0 5 1 0 31 8 8 0 1 7 3 1 13 4 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\nIn \"Takahashi-ya\", a ramen res...
[{"type": "stdin_stdout", "input": "ooo\n", "output": "1000\n"}, {"type": "stdin_stdout", "input": "oxo\n", "output": "900\n"}, {"type": "stdin_stdout", "input": "xxx\n", "output": "700\n"}, {"type": "stdin_stdout", "input": "pxo", "output": "800\n"}, {"type": "stdin_stdout", "input": "yxx", "output": "700\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\nI decided to plant vegetables in...
[{"type": "stdin_stdout", "input": "5\n1 2 3 11 4 5\n6\n1 3 6 9 12 15 18\n4\n5 7 9 11 12\n0", "output": "11\n1\n12\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 14 4 5\n6\n1 3 6 9 12 15 18\n4\n5 7 9 11 12\n0", "output": "14\n1\n12\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 25 4 5\n6\n1 3 6 9 12 15 18\n4\n5 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\nThe main city magazine offers it...
[{"type": "stdin_stdout", "input": "2\nWjrWBWqKIeSndDHeiVmfChQNsoUiRQHVplnIWkwBtxAJhOdTigAAzKtbNEqcgvbWHOopfCNgWHfwXyzSCfNqGMLnmlIdKQonLsmGSJlPBcYfHNJJDGlKNnOGtrWUhaTWuilHWMUlFEzbJYbeAWvgnSOOOPLxX-eJEKRsKqSnMjrPbFDprCqgbTfwAnPjFapVKiTjCcWEzhahwPRHScfcLnUixnxckQJzuHzshyBFKPwVGzHeJWniiRKynDFQdaazmTZtDGnFVTmTUZCRCpUHFmUHA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider a table consistin...
[{"type": "stdin_stdout", "input": "100000 1000000000\n", "output": "16\n"}, {"type": "stdin_stdout", "input": "100000 183783600\n", "output": "438\n"}, {"type": "stdin_stdout", "input": "100000 551350800\n", "output": "392\n"}, {"type": "stdin_stdout", "input": "100000 479001600\n", "output": "254\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\nVasily has a deck of cards consi...
[{"type": "stdin_stdout", "input": "100\n12 9 97 55 14 8 55 34 35 67 3 18 73 92 41 49 15 60 18 66 9 26 97 47 43 88 71 97 19 63 48 96 79 53 8 47 69 49 21 23 77 12 21 176 66 9 29 13 61 69 54 77 10 13 4 68 37 74 7 6 29 76 55 72 89 4 78 27 29 82 18 83 12 4 32 69 89 85 66 13 92 54 38 5 26 56 17 55 29 4 17 39 29 94 3 67 85 7...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Do you ever wish you could tal...
[{"input": "5\n\"And another thing Mr Smart, I want no more trouble!\"", "output": "[\"Und unozer zink Mr Schmart, I vunt no mor trubl!\"]", "fn_name": "siegfried"}, {"input": "5\n\"You ought to behave yourself Smart!\"", "output": "[\"Yu ught to behav yurself Schmart!\"]", "fn_name": "siegfried"}, {"input": "5\n\"Smar...
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\nRecall that MEX of an array is a...
[{"type": "stdin_stdout", "input": "7 3\n0\n1\n2\n2\n0\n0\n10\n", "output": "1\n2\n3\n3\n4\n4\n7\n"}, {"type": "stdin_stdout", "input": "7 5\n0\n1\n2\n2\n0\n0\n10\n", "output": "1\n2\n3\n3\n3\n3\n3\n"}, {"type": "stdin_stdout", "input": "7 3\n0\n1\n2\n2\n0\n0\n10\n", "output": "1\n2\n3\n3\n4\n4\n7\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\nWrite a function \n\n`titleToNum...
[{"input": "\"UNFORGIVABLE\"", "output": "[79089429845931757]", "fn_name": "title_to_number"}, {"input": "\"LONELINESS\"", "output": "[68400586976949]", "fn_name": "title_to_number"}, {"input": "\"CODEWARS\"", "output": "[28779382963]", "fn_name": "title_to_number"}, {"input": "\"ZZZTOP\"", "output": "[321268054]", "fn...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFriends are going to play consol...
[{"type": "stdin_stdout", "input": "100 100\n", "output": "197\n"}, {"type": "stdin_stdout", "input": "100 100\n", "output": "197\n"}, {"type": "stdin_stdout", "input": "100 25\n", "output": "122\n"}, {"type": "stdin_stdout", "input": "100 25\n", "output": "122\n"}, {"type": "stdin_stdout", "input": "100 26\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\nRecently Polycarpus has learned ...
[{"type": "stdin_stdout", "input": "7\n-1 1000000000 999999488 999999488 1000000000 1000000000 999999488\n1000000000 -1 999999488 999999488 1000000000 1000000000 999999488\n999999488 999999488 -1 999999999 999999488 999999488 999999999\n999999488 999999488 999999999 -1 999999488 999999488 999999999\n1000000000 10000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven are two strings S and T co...
[{"type": "stdin_stdout", "input": "oekdkfjdjgjknbfkwnfnhaoekdkfjdjgjknbfkwnfnhahjekkengkfoekdkfjdjgjknbfkwnfnhaoekdkfjdjgjknbfkwnfnhahj yowkymbmhkkgjjeokdlakbndkkworqotkfnblgpnkkrogjrfnvmbjisnbkzvmbnrrrigeoibgpefjobvmovpqosqoqrgrkengrlk\n", "output": "yowkymbmhkkgjjeokdlakbndkkworqotkfnblgpnkkrogjrfnvmbjisnbkzvmbnrrri...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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## Debugging sayHello function\n...
[{"input": "\"Liutenant Uhura\"", "output": "[\"Hello, Liutenant Uhura\"]", "fn_name": "say_hello"}, {"input": "\"Captain Kirk\"", "output": "[\"Hello, Captain Kirk\"]", "fn_name": "say_hello"}, {"input": "\"Mr. Spock\"", "output": "[\"Hello, Mr. Spock\"]", "fn_name": "say_hello"}, {"input": "\"Dr. McCoy\"", "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\nGiven an array containing only i...
[{"input": "[1, 10, 100, 1000]", "output": "[\"10001010111\"]", "fn_name": "arr2bin"}, {"input": "[1, 2, 3, 4, 5]", "output": "[\"1111\"]", "fn_name": "arr2bin"}, {"input": "[1, 2, -1, -2, 1]", "output": "[\"1\"]", "fn_name": "arr2bin"}, {"input": "[1, 2, -1, -2]", "output": "[\"0\"]", "fn_name": "arr2bin"}, {"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\nCreatnx has $n$ mirrors, numbere...
[{"type": "stdin_stdout", "input": "100\n60 79 48 35 18 24 87 1 44 65 60 78 11 43 71 79 90 6 94 49 22 91 58 93 55 21 22 31 7 15 17 65 76 9 100 89 50 96 14 38 27 87 29 93 54 12 99 35 27 51 36 44 6 26 91 1 53 8 49 63 18 4 31 55 95 15 77 1 16 98 75 26 26 43 2 11 18 70 3 65 11 74 64 69 26 54 9 51 25 82 98 12 90 75 19 23 78...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 your city is an inf...
[{"type": "stdin_stdout", "input": "44 37298\n-100 -100 -98 -93 -92 -91 -91 -89 -87 -86 -84 -80 -79 -76 -71 -70 -58 -53 -52 -52 -49 -48 -45 -45 -40 -39 -37 -35 -31 -30 -30 -29 -29 -28 -22 -22 -21 -11 -8 -7 -7 -6 -1 0\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "45 45\n-95 -94 -92 -83 -83 -76 -75 -74 -71 -...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, the Grasshopper was jum...
[{"type": "stdin_stdout", "input": "VRPHBNWNWVWBWMFJJDCTJQJDJBKSJRZLVQRVVFLTZFSGCGDXCWQVWWWMFVCQHPKXXVRKTGWGPSMQTPKNDQJHNSKLXPCXDJDQDZZD\n", "output": "101\n"}, {"type": "stdin_stdout", "input": "DZZDQDJDXCPXLKSNHJQDNKPTQMSPGWGTKRVXXKPHQCVFMWWWVQWCXDGCGSFZTLFVVRQVLZRJSKBJDJQJTCDJJFMWBWVWNWNBHPRV\n", "output": "101\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\nSnuke has one biscuit and zero J...
[{"type": "stdin_stdout", "input": "314159265 35897932 384626433", "output": "48518828981938099"}, {"type": "stdin_stdout", "input": "407766107 9307229 14836778", "output": "1101648954500241\n"}, {"type": "stdin_stdout", "input": "407766107 9307229 25447105", "output": "3215538450316794\n"}, {"type": "stdin_stdout", "i...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a sequence of length N, ...
[{"type": "stdin_stdout", "input": "6\n2 7 1 8 2 8\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n4 7 0 -1 6 4", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n2 7 2 12 2 8", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "6\n4 7 2 8 2 10", "output": "Yes\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\nWrite a function called that tak...
[{"input": "\"(c(b(a)))(d)\"", "output": "[true]", "fn_name": "valid_parentheses"}, {"input": "\"((())()())\"", "output": "[true]", "fn_name": "valid_parentheses"}, {"input": "\"hi(hi))(\"", "output": "[false]", "fn_name": "valid_parentheses"}, {"input": "\"hi(hi)(\"", "output": "[false]", "fn_name": "valid_parentheses...
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\nFind the number of integers betw...
[{"type": "stdin_stdout", "input": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\n3\n", "output": "117879300\n"}, {"type": "stdin_stdout", "input": "9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\n3", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nπ (spelled pi in English) is a m...
[{"type": "stdin_stdout", "input": "1.1386381399168386\n0.08430864816896695\n0.0", "output": "3/1\n16/5\n"}, {"type": "stdin_stdout", "input": "0.5656950408067312\n0.06616503278329884\n0.0", "output": "3/1\n16/5\n"}, {"type": "stdin_stdout", "input": "0.9300839575225542\n0.09342351193849237\n0.0", "output": "3/1\n16/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\nJack has become a soldier now. U...
[{"type": "stdin_stdout", "input": "RXLLRXXLLRLRLLXXXXRXXRLLRRRRXLLRRLXXLRXXLXLRLLLLLRXLRXLXRXLXLRRXXRRLXLXLRLRXRXLXXXLRXLLXLRRRRXRLLXRRLLRRXRRRLRLLRLRXXXRLXLXLLLRXXLLXLRXXLLLRLXRRXRLXLXXXXXXLXRXXRXXXRXLXXRRXLLXRRXLXXRRXLXXRLXLXXLXRXXRLRLLXLXLXLRXLXLXLLLRLXXLXLLRLLLLRLRRRRXRRLLRLXLXXRLRRLXRRXXXRLLXRRRXXRRRXXLRXRLLXRRRX...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 takes as i...
[{"input": "56894.04839\n843975.4839\n4.08437403489", "output": "[\"We have this much circle: 561977165367\"]", "fn_name": "sum_circles"}, {"input": "5\n6\n7\n8\n9\n10\n105083\n48839\n4853\n28\n483", "output": "[\"We have this much circle: 10564760498\"]", "fn_name": "sum_circles"}, {"input": "4.5456\n746.5\n98.34\n344...
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\nGreg the Dwarf has been really b...
[{"type": "stdin_stdout", "input": "1000 1000\n-20.534295190826231 133.273184243935670 865.154166109953510\n-711.474516721095600 -638.507879949720520 44.024947657417599\n", "output": "1355.67674395639642\n"}, {"type": "stdin_stdout", "input": "1000 1000\n-865.729850457726000 -306.217565767793640 81.709538567284440\n891...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are the \"computer expert\" ...
[{"input": "\"11|15|59, 10|16|16, 12|17|20, 9|22|34, 13|19|34, 11|15|17, 11|22|00, 10|26|37, 12|17|48, 9|16|30, 12|20|14, 11|25|11\"", "output": "[\"Range: 04|03|04 Average: 11|14|36 Median: 11|18|59\"]", "fn_name": "stat"}, {"input": "\"1|15|59, 1|16|16, 1|17|20, 1|22|34, 1|19|34, 1|15|17, 1|22|00, 1|26|37, 1|17|48, 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\nA sequence $a_1, a_2, \\dots, a_...
[{"type": "stdin_stdout", "input": "10\n3 10 14 1 10 12 5 16 5 2\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n3 10 14 1 10 8 5 16 5 2\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10\n3 10 9 1 10 8 5 16 5 2\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10\n2 10 9 1 10 4 7 8 5 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 mayor of Amida, the City of ...
[{"type": "stdin_stdout", "input": "4 3 1\n3 1 2\n0 1 3\n4 3 4\n1 0 1\n0 0 0", "output": "2\n1\n"}, {"type": "stdin_stdout", "input": "4 3 1\n3 1 1\n0 1 3\n4 3 4\n1 0 1\n0 0 0", "output": "3\n1\n"}, {"type": "stdin_stdout", "input": "6 4 1\n3 -1 2\n2 2 3\n3 3 4\n0 2 4\n0 0 0", "output": "1\n"}, {"type": "stdin_stdout",...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGerald plays the following game....
[{"type": "stdin_stdout", "input": "14 5\n4 2\n5 4\n3 3\n2 3\n1 2\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n3 8\n3 3\n2 3\n1 2\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n5 4\n3 3\n2 3\n1 1\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "14 5\n4 2\n9 4\n3 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\nDr. Asimov, a robotics researche...
[{"type": "stdin_stdout", "input": "34 1\n1 6\n2 6\n0 0", "output": "..................................\n.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.\n.E..............................E.\n.E.EEEEEEEEEEEEEEEEEEEEEEEEEEEE.E.\n.E.E..........................E.E.\n.E.E.EEEEEEEEEEEEEEEEEEEEEEEE.E.E.\n.E.E.E......................E.E.E.\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 website is divided vertical...
[{"input": "1600\n[300, 200, 400, 600, 100]", "output": "[-1]", "fn_name": "get_section_id"}, {"input": "1599\n[300, 200, 400, 600, 100]", "output": "[4]", "fn_name": "get_section_id"}, {"input": "299\n[300, 200, 400, 600, 100]", "output": "[0]", "fn_name": "get_section_id"}, {"input": "300\n[300, 200, 400, 600, 100]",...
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 is writing an operating sy...
[{"type": "stdin_stdout", "input": "11\npwd\ncd /home/vasya\npwd\ncd ..\npwd\ncd vasya/../../petya\npwd\ncd /a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a\npwd\ncd ..\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# Task\n\nWrite a function `deNi...
[{"input": "\"crazy\"\n\"cseerntiofarmit on \"", "output": "[\"secretinformation\"]", "fn_name": "de_nico"}, {"input": "\"crazy\"\n\"cseerntiofarmit on\"", "output": "[\"secretinformation\"]", "fn_name": "de_nico"}, {"input": "\"ba\"\n\"2143658709\"", "output": "[\"1234567890\"]", "fn_name": "de_nico"}, {"input": "\"a...
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 undirected conn...
[{"type": "stdin_stdout", "input": "100 1000\n1 2 1\n1 3 1\n1 4 1\n1 5 1\n1 6 1\n1 7 1\n1 8 1\n1 9 1\n1 10 1\n1 11 1\n1 12 1\n1 13 1\n1 14 1\n1 15 1\n1 16 1\n1 17 1\n1 18 1\n1 19 1\n1 20 1\n1 21 1\n1 22 1\n1 23 1\n1 24 1\n1 25 1\n1 26 1\n1 27 1\n1 28 1\n1 29 1\n1 30 1\n1 31 1\n1 32 1\n1 33 1\n1 34 1\n1 35 1\n1 36 1\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\nIvan is collecting coins. There ...
[{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000 1000010000000000000 1000000000000000000\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "10000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nCreate a function tha...
[{"input": "[\"Tokyo\", \"London\", \"Rome\", \"Donlon\", \"Kyoto\", \"Paris\", \"Okyot\"]", "output": "[[[\"Kyoto\", \"Okyot\", \"Tokyo\"], [\"Donlon\", \"London\"], [\"Paris\"], [\"Rome\"]]]", "fn_name": "group_cities"}, {"input": "[\"Tokyo\", \"London\", \"Rome\", \"Donlon\"]", "output": "[[[\"Donlon\", \"London\"],...
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 film festival is coming up in ...
[{"type": "stdin_stdout", "input": "129 37\n15 22 28 15 30 16 11 20 4 26 14 37 29 17 15 15 14 18 1 9 16 22 13 32 5 18 25 11 6 33 33 22 17 9 1 5 27 27 37 4 6 1 3 18 17 33 6 17 2 24 23 1 1 37 35 21 21 17 18 6 31 17 29 18 10 10 30 31 8 3 25 20 34 11 12 12 24 13 5 27 20 31 28 1 36 2 4 13 14 9 33 25 4 26 36 6 2 7 15 9 20 33...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKefa wants to celebrate his firs...
[{"type": "stdin_stdout", "input": "15 1234\n2738 322313356\n1160 970909702\n2594 902749351\n3126 324754476\n3151 177963947\n3424 396145897\n5578 737768323\n3423 687640543\n381 848813098\n1058 197211286\n936 650181776\n1025 776492538\n3598 142176544\n3595 680519527\n1191 32199940\n", "output": "3634263641\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\nBuild a function `sumNestedNumbe...
[{"input": "[6, [5], [[4]], [[[3]]], [[[[2]]]], [[[[[1]]]]]]", "output": "[209]", "fn_name": "sum_nested_numbers"}, {"input": "[1, [-1], [[1]], [[[-1]]], [[[[1]]]]]", "output": "[5]", "fn_name": "sum_nested_numbers"}, {"input": "[1, [2], 3, [4, [5]]]", "output": "[149]", "fn_name": "sum_nested_numbers"}, {"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\nA little boy Laurenty has been p...
[{"type": "stdin_stdout", "input": "50\n31 80 40 85 12 38 30 97 51 18 45 81 56 82 91 94 95 13 26 93 98 35 44 69 98 39 83 77 38 68 13 71 80 41 21 80 81 17 88 46 61 67 65 49 29 55 37 74 88\n71 8 42 74 14 70 100 96 25 56 95 38 41 88 45 43 46 16 55 77 100 68 51 30 73 51 25 88 64 26 22 50 4 57 88 85 45 32 11 96 94 19 9 12 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe [Sharkovsky's Theorem](https...
[{"input": "32\n1024", "output": "[false]", "fn_name": "sharkovsky"}, {"input": "17\n17", "output": "[false]", "fn_name": "sharkovsky"}, {"input": "18\n12", "output": "[true]", "fn_name": "sharkovsky"}, {"input": "10\n16", "output": "[true]", "fn_name": "sharkovsky"}, {"input": "1\n22", "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\nMaria is the most active old lad...
[{"type": "stdin_stdout", "input": "4\n5\n1 1 0 2 1\n6\n2 3 4 4 12 7\n6\n2 5 4 5 0 11\n5\n1 2 1 5 6\n", "output": "6\n5\n6\n4\n"}, {"type": "stdin_stdout", "input": "4\n5\n1 1 2 2 1\n6\n2 3 4 4 6 7\n6\n2 5 4 5 0 11\n5\n1 2 1 5 6\n", "output": "6\n5\n6\n4\n"}, {"type": "stdin_stdout", "input": "4\n5\n2 0 2 2 -1\n6\n2 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\nYou like the card board game \"S...
[{"type": "stdin_stdout", "input": "37 5\n0 2 0 1 0\n2 2 0 2 2\n2 0 2 0 0\n2 2 2 2 2\n1 2 0 0 2\n0 1 1 1 2\n0 2 0 2 2\n0 0 1 2 2\n2 0 0 1 0\n0 2 2 2 1\n0 2 2 2 0\n2 0 2 2 1\n0 0 2 0 1\n2 1 1 1 2\n1 2 0 1 0\n1 0 1 0 1\n1 2 1 0 0\n1 2 2 2 2\n2 2 1 2 1\n1 0 2 1 2\n2 1 1 2 1\n0 1 0 2 2\n1 0 1 1 1\n0 0 1 0 2\n0 1 0 0 1\n2 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\nMake a function that receives a ...
[{"input": "9999999999", "output": "[\"There is no possible number that fulfills those requirements\"]", "fn_name": "next_numb"}, {"input": "999999", "output": "[1023459]", "fn_name": "next_numb"}, {"input": "99", "output": "[105]", "fn_name": "next_numb"}, {"input": "12", "output": "[15]", "fn_name": "next_numb"}, {"i...
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\nThis Christmas Santa gave Masha ...
[{"type": "stdin_stdout", "input": "100 50\n66 3\n92 79\n9 44\n84 45\n30 63\n30 20\n33 86\n8 83\n40 75\n7 36\n91 4\n76 88\n77 76\n28 27\n6 52\n41 57\n8 23\n34 75\n50 15\n86 68\n36 98\n30 84\n37 62\n22 4\n6 45\n72 80\n98 74\n78 84\n1 54\n99 27\n84 91\n78 7\n80 61\n67 48\n51 52\n36 72\n97 87\n25 17\n20 80\n20 39\n72 5\n2...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this simple assignment you ar...
[{"input": "42", "output": "[-42]", "fn_name": "make_negative"}, {"input": "-9", "output": "[-9]", "fn_name": "make_negative"}, {"input": "-1", "output": "[-1]", "fn_name": "make_negative"}, {"input": "1", "output": "[-1]", "fn_name": "make_negative"}, {"input": "0", "output": "[0]", "fn_name": "make_negative"}]
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 positive integ...
[{"type": "stdin_stdout", "input": "8\n1 1\n1 10\n3 5\n2 2\n14 33\n4 23\n1 1010001000\n1000100000 1\n", "output": "1\n10\n2\n1\n4\n7\n1010001000\n0\n"}, {"type": "stdin_stdout", "input": "8\n1 1\n1 10\n3 5\n2 1\n14 33\n4 23\n1 1010001000\n1000100000 1\n", "output": "1\n10\n2\n0\n4\n7\n1010001000\n0\n"}, {"type": "stdin...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAn n × n square matrix is specia...
[{"type": "stdin_stdout", "input": "7 4 100501\n0100010\n0000101\n0100100\n0000011\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "7 4 100501\n0100010\n0000101\n0100100\n0000011\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "6 4 100501\n100010\n100100\n010100\n000011\n", "output": "2\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\nTwo integer sequences existed in...
[{"type": "stdin_stdout", "input": "12\n12 8 1 3 7 5 9 6 4 10 11 2\n", "output": "YES\n1 1 0 0 1 0 0 1 1 0 0 1 \n"}, {"type": "stdin_stdout", "input": "12\n12 8 1 3 7 5 9 6 4 10 11 2\n", "output": "YES\n1 1 0 0 1 0 0 1 1 0 0 1 \n"}, {"type": "stdin_stdout", "input": "12\n12 10 1 3 7 5 9 6 4 10 11 2\n", "output": "YES\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMaxim always goes to the superma...
[{"type": "stdin_stdout", "input": "48\n14 2 5 3 10 10 5 6 14 8 19 13 4 4 3 13 18 19 9 16 3 1 14 9 13 10 13 4 12 11 8 2 18 20 14 11 3 11 18 11 4 2 7 2 18 19 2 8\n70\n9497 5103 1001 2399 5701 4053 3557 8481 1736 4139 5829 1107 6461 4089 5936 7961 6017 1416 1191 4635 4288 5605 8857 1822 71 1435 2837 5523 6993 2404 2840 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou're given an integer N. Write...
[{"type": "stdin_stdout", "input": "3 \n36926\n147301\n1688", "output": "26\n16\n23\n"}, {"type": "stdin_stdout", "input": "3 \n36926\n168223\n1688", "output": "26\n22\n23\n"}, {"type": "stdin_stdout", "input": "3 \n36926\n168223\n2811", "output": "26\n22\n12\n"}, {"type": "stdin_stdout", "input": "3 \n17364\n141737\n8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 knights sitting at t...
[{"type": "stdin_stdout", "input": "113\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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "YES\n"}, {"type": "stdin_stdout", "inp...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNash designed an interesting yet...
[{"type": "stdin_stdout", "input": "10\n-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1\n-1 -1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 -1 -1\n-1 -1 -1 -1 3 3 3 4 3 5 3 6 3 7 3 8 -1 -1 -1 -1\n-1 -1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 -1 -1 -1 -1\n-1 -1 5 2 5 3 5 3 5 5 5 6 5 7 5 9 5 9 -1 -1\n-1 -1 6 2 6 3 6 5 6 5 6 6 6 7 6 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a string $s$ of le...
[{"type": "stdin_stdout", "input": "500\nbbababaabaabaabbbbbbaabbabbabbaabababababbbbabaaabbbbaaabbbbbbbabababaaaaabbbbabaababbababbaaaaaabbaaabbaabaaababbbbbabbaabaabaabbbaaabaabbaaabbaabababbaaabaaabaaaaabbbababaabbbbabbbbbababbbaabaabbabaabbabbababbbbbaababbaabbbbbbbbaabbabbbabababaaaaaaaaaabababaaabbaabbbabbabbbbab...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Greg and his friends wer...
[{"type": "stdin_stdout", "input": "50 207\n50 100 100 100 100 50 100 100 100 50 100 100 100 50 100 100 50 100 50 100 50 100 100 100 50 100 50 50 100 50 100 100 50 100 100 100 100 50 100 100 100 100 50 50 50 100 100 50 100 100\n", "output": "55\n833060250"}, {"type": "stdin_stdout", "input": "50 125\n50 50 50 100 100 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\nYour job is to return the volume...
[{"input": "1000\n1000\n1000", "output": "[785398163.4]", "fn_name": "cup_volume"}, {"input": "13.123\n123.12\n1", "output": "[4436.57]", "fn_name": "cup_volume"}, {"input": "5\n12\n31", "output": "[1858.51]", "fn_name": "cup_volume"}, {"input": "10\n8\n10", "output": "[638.79]", "fn_name": "cup_volume"}, {"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\nYou are given a rooted tree of $...
[{"type": "stdin_stdout", "input": "8\nABBBAAABBBAABABAAAABAABAABBABABBABABBBBBAABBAABBBAABBBBAAABBABAABBBBBAAABBABAABAABBBBBAABBBABAAAAAAABBAAABBAABBABABABABBAABBAAABBBBBAAAABBBBAAAABAABABAABBBAABBBAABBAAABBABAABAAABBBAAAABBAAABABBBABAAAAABBABBABAABBBBBAAABBBBBBAABABBAAABBABBABABAAABBABBABABA\n", "output": "479173089\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nJohnny has just found the new, g...
[{"type": "stdin_stdout", "input": "1\n71 4\n100 99 98 97 96 95 94 93 92 91 90 87 86 82 79 78 76 71 70 69 68 66 64 63 62 56 55 53 52 51 50 46 43 42 39 38 37 35 33 31 30 29 22 20 19 18 11 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\n", "output": "862166308\n"}, {"type": "stdin_stdout", "input": "1\n71 2\n100 99 98 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nScientists working international...
[{"input": "9000000000000000.0", "output": "[\"9Pm\"]", "fn_name": "meters"}, {"input": "9000000000000.0", "output": "[\"9Tm\"]", "fn_name": "meters"}, {"input": "123456", "output": "[\"123.456km\"]", "fn_name": "meters"}, {"input": "9000000000.0", "output": "[\"9Gm\"]", "fn_name": "meters"}, {"input": "12300000", "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\n<image>\n\n\nAt the request of a...
[{"type": "stdin_stdout", "input": "2006\n1101", "output": "**** \n *\n=====\n * *\n**** \n* ***\n*****\n*****\n\n*****\n \n=====\n ** *\n* * \n*****\n*****\n*****\n"}, {"type": "stdin_stdout", "input": "2006\n0101", "output": "**** \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\nWelcome to CODE FESTIVAL 2016! I...
[{"type": "stdin_stdout", "input": "1441", "output": "FESTIVALLLLLLLFESTIVAFESTIVALLFESTIVALLFESTIVALFESTIVALFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAFESTIVAF...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 you divide the successive p...
[{"input": "1111111111", "output": "[71]", "fn_name": "thirt"}, {"input": "987654321", "output": "[30]", "fn_name": "thirt"}, {"input": "85299258", "output": "[31]", "fn_name": "thirt"}, {"input": "8529", "output": "[79]", "fn_name": "thirt"}, {"input": "5634", "output": "[57]", "fn_name": "thirt"}]
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 visiting a large electro...
[{"type": "stdin_stdout", "input": "5 5 0\n-10 0\n12 10 -2\n-1 2 1", "output": "-12\n"}, {"type": "stdin_stdout", "input": "2 10 0\n-5 -1\n13 10 -1\n0 2 7", "output": "-6\n"}, {"type": "stdin_stdout", "input": "3 10 -1\n-5 0\n11 10 -2\n0 2 1", "output": "-7\n"}, {"type": "stdin_stdout", "input": "5 10 0\n-6 0\n12 10 -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 a string, s, return a new ...
[{"input": "\"Four score and seven years ago\"", "output": "[\" eeeeorsorasarsaonnFucdvyg\"]", "fn_name": "most_common"}, {"input": "\"wubz dermatoglyphics\"", "output": "[\"wubz dermatoglyphics\"]", "fn_name": "most_common"}, {"input": "\"Hello He worldwrd\"", "output": "[\"lllHeo He wordwrd\"]", "fn_name": "most_...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Japan, temperature is usually...
[{"type": "stdin_stdout", "input": "22485", "output": "11227\n"}, {"type": "stdin_stdout", "input": "37535", "output": "18752\n"}, {"type": "stdin_stdout", "input": "54760", "output": "27365\n"}, {"type": "stdin_stdout", "input": "10347", "output": "5158\n"}, {"type": "stdin_stdout", "input": "10699", "output": "5334\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 planned a trip using trains ...
[{"type": "stdin_stdout", "input": "549\n817\n715\n603\n", "output": "1152\n"}, {"type": "stdin_stdout", "input": "600\n300\n220\n420\n", "output": "520\n"}, {"type": "stdin_stdout", "input": "555\n555\n400\n200\n", "output": "755\n"}, {"type": "stdin_stdout", "input": "549\n838\n715\n603", "output": "1152\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\nThis time no story, no theory. T...
[{"input": "\"ZpglnRxqenU\"", "output": "[\"Z-Pp-Ggg-Llll-Nnnnn-Rrrrrr-Xxxxxxx-Qqqqqqqq-Eeeeeeeee-Nnnnnnnnnn-Uuuuuuuuuuu\"]", "fn_name": "accum"}, {"input": "\"NyffsGeyylB\"", "output": "[\"N-Yy-Fff-Ffff-Sssss-Gggggg-Eeeeeee-Yyyyyyyy-Yyyyyyyyy-Llllllllll-Bbbbbbbbbbb\"]", "fn_name": "accum"}, {"input": "\"MjtkuBovqrU\""...
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\nLimak is a little polar bear. He...
[{"type": "stdin_stdout", "input": "100 1000\n-62 57 -27 -67 49 -10 66 -64 -36 -78 62 -75 -39 75 -47 -36 41 -88 62 -43 22 29 -20 58 40 16 71 -2 -87 12 86 -90 -92 67 -12 -48 -10 -26 78 68 22 -3 66 -95 -81 34 14 -76 -27 76 -60 87 -84 3 35 -60 46 -65 29 -29 2 -44 -55 18 -75 91 36 34 -86 53 59 -54 -29 33 -95 66 9 72 67 -44...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou've came to visit your grandm...
[{"input": "5\n0", "output": "[\"Grandma, we will have to buy a Christmas tree first!\"]", "fn_name": "baubles_on_tree"}, {"input": "0\n10", "output": "[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]", "fn_name": "baubles_on_tree"}, {"input": "50\n9", "output": "[[6, 6, 6, 6, 6, 5, 5, 5, 5]]", "fn_name": "baubles_on_tree"}, {"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 is winter now, and Max decide...
[{"type": "stdin_stdout", "input": "1\n177 99\n1 4 7 10 11 13 14 15 16 17 19 21 22 24 25 26 27 28 32 34 35 38 39 40 42 45 46 52 54 55 57 58 59 60 62 64 65 67 70 71 74 77 78 79 80 81 83 84 88 92 93 94 95 100 101 102 104 106 107 108 109 110 112 113 114 115 116 118 122 123 124 125 127 128 129 130 134 135 137 138 139 140 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA tetromino is a figure formed b...
[{"type": "stdin_stdout", "input": "10 1 2 0 0 -1 0", "output": "11\n"}, {"type": "stdin_stdout", "input": "1 13 1 0 1 -1 2", "output": "13\n"}, {"type": "stdin_stdout", "input": "10 2 0 0 4 -1 0", "output": "16\n"}, {"type": "stdin_stdout", "input": "1 26 1 0 1 -1 2", "output": "26\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\nYouKn0wWho has an integer sequen...
[{"type": "stdin_stdout", "input": "4\n7\n1 12 3 0 1 1 5\n3\n2 2 5\n5\n1 3 2 4 4\n4\n4 5 -1 1\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n7\n1 11 3 2 1 1 5\n3\n2 2 5\n5\n1 3 2 4 4\n4\n4 5 -2 1\n", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n7\n1 4 3 2 -1 1 -...
code_stdio