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\nFor some reason in many American... | [{"type": "stdin_stdout", "input": "90\n1 1\n2 1\n3 1\n4 1\n5 1\n6 1\n7 1\n8 1\n9 1\n1 2\n2 2\n3 2\n4 2\n5 2\n6 2\n7 2\n8 2\n9 2\n1 3\n2 3\n3 3\n4 3\n5 3\n6 3\n7 3\n8 3\n9 3\n1 4\n2 4\n3 4\n4 4\n5 4\n6 4\n7 4\n8 4\n9 4\n1 5\n2 5\n3 5\n4 5\n5 5\n6 5\n7 5\n8 5\n9 5\n1 6\n2 6\n3 6\n4 6\n5 6\n6 6\n7 6\n8 6\n9 6\n1 7\n2 7\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a_1, a_2... | [{"type": "stdin_stdout", "input": "50\n1 1 1 1 1 2 1 1 2 1 2 1 1 1 2 1 1 1 2 2 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 1 1 1 1 2 2 2 2 2 1 2 2 2 1\n", "output": "19\n"}, {"type": "stdin_stdout", "input": "50\n1 1 1 1 1 2 1 1 2 1 2 1 1 1 2 1 1 1 2 2 2 1 1 2 2 1 2 1 1 2 2 1 1 2 2 1 1 1 1 1 2 2 2 2 2 1 2 2 2 1\n", "output": "19\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery day Ruslan tried to count ... | [{"type": "stdin_stdout", "input": "50\n48 45 42\n32 45 8\n15 41 47\n32 29 38\n7 16 48\n19 9 21\n18 40 5\n39 40 7\n37 0 6\n42 15 37\n9 33 37\n40 41 33\n25 43 2\n23 21 38\n30 20 32\n28 15 5\n47 9 19\n47 22 26\n26 9 18\n24 23 24\n11 29 5\n38 44 9\n49 22 42\n1 15 32\n18 25 21\n8 48 39\n48 7 26\n3 30 26\n34 21 47\n34 14 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\nImplement a function called make... | [{"input": "\"How much wood would a woodchuck chuck if a woodchuck could chuck wood\"", "output": "[\"HMWWAWCIAWCCW\"]", "fn_name": "make_acronym"}, {"input": "\"Please excuse my dear aunt Sally\"", "output": "[\"PEMDAS\"]", "fn_name": "make_acronym"}, {"input": "\"Unique New York\"", "output": "[\"UNY\"]", "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\nWhen little Petya grew up and en... | [{"type": "stdin_stdout", "input": "16 25\nbBZ\nEr\nZ\nrYJmfZLgmx\nPaJNrF\naHtRqSxOO\nD\nhsagsG\nMDuBOXrmWH\nSgjMQZ\nYXgWq\nxDwpppG\nSDY\nJwZWx\ncOzrgrBaE\nFJYX\nYXgWq SgjMQZ\nSDY PaJNrF\nFJYX rYJmfZLgmx\nhsagsG Er\nxDwpppG rYJmfZLgmx\naHtRqSxOO rYJmfZLgmx\nhsagsG bBZ\nJwZWx hsagsG\nFJYX cOzrgrBaE\nSDY YXgWq\nFJYX Z\nJ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 an a... | [{"input": "[-1, -1, -10, 42, 92, 1, 23, 6, -3]", "output": "[9248]", "fn_name": "total"}, {"input": "[4, 4, 52, 23, 32, 1, -1]", "output": "[1753]", "fn_name": "total"}, {"input": "[1, 2, 3, 4, 5]", "output": "[48]", "fn_name": "total"}, {"input": "[4, 4, 5, -1]", "output": "[30]", "fn_name": "total"}, {"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 faro shuffle of a deck of play... | [{"input": "1250", "output": "[156]", "fn_name": "faro_cycles"}, {"input": "542", "output": "[540]", "fn_name": "faro_cycles"}, {"input": "1954", "output": "[30]", "fn_name": "faro_cycles"}, {"input": "52", "output": "[8]", "fn_name": "faro_cycles"}, {"input": "2", "output": "[1]", "fn_name": "faro_cycles"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider sequences \\{A_1,...,A_... | [{"type": "stdin_stdout", "input": "100000 100000\n", "output": "742202979\n"}, {"type": "stdin_stdout", "input": "101000 100000", "output": "817082185\n"}, {"type": "stdin_stdout", "input": "101010 100000", "output": "781111243\n"}, {"type": "stdin_stdout", "input": "99991 99989\n", "output": "215961669\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\nWe have a tree with N vertices n... | [{"type": "stdin_stdout", "input": "8\n1 3\n2 3\n3 4\n3 5\n3 6\n6 7\n6 8", "output": "240\n240\n1680\n240\n240\n1008\n144\n144\n"}, {"type": "stdin_stdout", "input": "8\n1 3\n2 3\n5 4\n3 5\n3 6\n3 7\n3 8", "output": "360\n360\n2520\n120\n840\n360\n360\n360\n"}, {"type": "stdin_stdout", "input": "8\n1 2\n2 3\n2 4\n3 5\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\nEvery summer Vitya comes to visi... | [{"type": "stdin_stdout", "input": "92\n13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 13 12\n", "output": "DOWN\n"}, {"type": "stdin_stdout", "input": "9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ of le... | [{"type": "stdin_stdout", "input": "6\n4\n4\n2\n26\n2\n10\n", "output": "3 1 2 4\n3 1 2 4\n1 2\n11 16 7 12 17 3 13 18 4 19 8 20 1 14 21 5 22 9 23 2 15 24 6 25 10 26\n1 2\n7 3 4 8 1 5 9 2 6 10\n"}, {"type": "stdin_stdout", "input": "6\n2\n2\n2\n16\n3\n21\n", "output": "1 2\n1 2\n1 2\n9 5 10 3 11 6 12 1 13 7 14 2 15 4 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\nWe all love the future president... | [{"input": "\"listen migrants: IIII KIIIDD YOOOUUU NOOOOOOTTT\"", "output": "[1.56]", "fn_name": "trump_detector"}, {"input": "\"America NUUUUUKEEEE Oooobaaaamaaaaa\"", "output": "[1.89]", "fn_name": "trump_detector"}, {"input": "\"MEXICAAAAAAAANS GOOOO HOOOMEEEE\"", "output": "[2.5]", "fn_name": "trump_detector"}, {"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\nYou probably know the \"like\" s... | [{"input": "[\"Alex\", \"Jacob\", \"Mark\", \"Max\"]", "output": "[\"Alex, Jacob and 2 others like this\"]", "fn_name": "likes"}, {"input": "[\"Max\", \"John\", \"Mark\"]", "output": "[\"Max, John and Mark like this\"]", "fn_name": "likes"}, {"input": "[\"Jacob\", \"Alex\"]", "output": "[\"Jacob and Alex like this\"]",... | 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 Cybermen and the Daleks have... | [{"type": "stdin_stdout", "input": "10\n11 11\n11 12\n11 15\n11 17\n11 18\n11 19\n11 28\n11 33\n11 38\n11 40\n12 11\n15 46\n17 11\n17 46\n18 46\n19 11\n19 46\n20 11\n20 46\n24 46\n25 46\n26 11\n32 11\n32 46\n33 11\n34 46\n36 11\n39 11\n40 46\n43 11\n44 0\n46 14\n46 15\n46 17\n46 22\n46 26\n46 28\n46 32\n46 43\n46 45\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\nCasimir has a string $s$ which c... | [{"type": "stdin_stdout", "input": "6\nABABAB\nABBA\nBC\nABC\nCABBCB\nBBCBCBCBCBCCCBCB\n", "output": "YES\nYES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "6\nBBAACB\nABBA\nBC\nABA\nACBCBB\nCBCBCBCBCBCBCBCB\n", "output": "YES\nYES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "6\nABACAB\nABBA\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 found a random number gene... | [{"type": "stdin_stdout", "input": "4\n337 780 799 18 796 875 331 223 1804 67 268 483 390 565 116 355", "output": "0\n870892872\n738673049\n866136893\n809360917\n134965576\n496873404\n200938352\n392063026\n225113281\n769068776\n945265000\n612087551\n845908556\n726467732\n606029955\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\nMole is hungry again. He found o... | [{"type": "stdin_stdout", "input": "5\n1 5 2 4 2\n4\n1 5\n2 5\n3 5\n4 5\n", "output": "4\n4\n1\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 3 4 4 2\n4\n1 5\n2 5\n3 5\n4 5\n", "output": "4\n4\n2\n1\n"}, {"type": "stdin_stdout", "input": "5\n1 3 4 4 2\n4\n1 5\n2 5\n3 5\n2 5\n", "output": "4\n4\n2\n4\n"}, {"type": "std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Elephant is playing a gam... | [{"type": "stdin_stdout", "input": "5\n4 1 2 3 4\n4\n3\n4\n6\n1\n\n\n", "output": "2\n2\n0\n8\n"}, {"type": "stdin_stdout", "input": "5\n4 1 1 6 4\n4\n1\n0\n1\n-1", "output": "11\n0\n11\n0\n"}, {"type": "stdin_stdout", "input": "5\n4 1 1 6 4\n4\n0\n5\n1\n-1", "output": "0\n0\n11\n0\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\nVasya’s elder brother Petya love... | [{"type": "stdin_stdout", "input": "70 1000 1\n91 2\n43 1\n100 1\n79 2\n26 1\n68 2\n4 2\n64 1\n100 1\n80 2\n20 2\n70 1\n25 1\n99 1\n64 1\n35 2\n60 1\n63 2\n93 1\n40 2\n100 1\n54 1\n100 1\n15 2\n72 1\n28 1\n5 1\n93 1\n100 2\n39 2\n54 2\n100 1\n55 1\n43 1\n20 1\n28 2\n21 1\n100 2\n98 1\n35 1\n12 2\n50 2\n7 2\n7 2\n12 2\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\nConsider the following well know... | [{"input": "45939401", "output": "[\"11484850-altsum\"]", "fn_name": "solve"}, {"input": "24701723", "output": "[\"12350861-sum\"]", "fn_name": "solve"}, {"input": "376049", "output": "[\"47006-altsum\"]", "fn_name": "solve"}, {"input": "999883", "output": "[\"499941-sum\"]", "fn_name": "solve"}, {"input": "47", "outpu... | 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\nBorn a misinterpretation of [thi... | [{"input": "[1, 2, 3, 4, 5]\n6", "output": "[[1, 2, 3, 4, 5, 0]]", "fn_name": "beggars"}, {"input": "[1, 2, 3, 4, 5]\n3", "output": "[[5, 7, 3]]", "fn_name": "beggars"}, {"input": "[1, 2, 3, 4, 5]\n2", "output": "[[9, 6]]", "fn_name": "beggars"}, {"input": "[1, 2, 3, 4, 5]\n1", "output": "[[15]]", "fn_name": "beggars"}... | 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 sequence A, wher... | [{"type": "stdin_stdout", "input": "15\n+ 2101039\n-\n+ 4567886\n+ 113371486\n-\n+ 578943\n-\n-\n+ 62356680\n-\n+ 711111\n-\n+ 797735011\n-\n-\n", "output": "431927902\n"}, {"type": "stdin_stdout", "input": "15\n+ 2168539\n-\n+ 4567886\n+ 113371486\n-\n+ 578943\n-\n-\n+ 62356680\n-\n+ 711111\n-\n+ 797735011\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\nRoger is a robot. He has an arm ... | [{"type": "stdin_stdout", "input": "50 50\n1 41 261\n2 47 324\n1 41 256\n1 31 339\n2 23 116\n2 44 184\n2 32 115\n1 40 301\n2 40 303\n1 29 309\n2 49 348\n2 47 356\n1 41 263\n2 42 276\n1 45 135\n1 33 226\n2 31 166\n1 50 171\n2 47 166\n2 50 146\n2 25 324\n2 48 307\n2 41 176\n1 50 353\n1 45 323\n2 50 343\n1 47 200\n2 48 26... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nC: Skewering\n\nproblem\n\nOne d... | [{"type": "stdin_stdout", "input": "28 11 20", "output": "Tem\n"}, {"type": "stdin_stdout", "input": "28 11 17", "output": "Hom\n"}, {"type": "stdin_stdout", "input": "54 11 17", "output": "Hom\n"}, {"type": "stdin_stdout", "input": "12 6 20", "output": "Tem\n"}, {"type": "stdin_stdout", "input": "24 6 20", "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## Your story\nYou've always lov... | [{"input": "\"00:00\"", "output": "[\"Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo\"]", "fn_name": "fizz_buzz_cuckoo_clock"}, {"input": "\"12:00\"", "output": "[\"Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo Cuckoo\"]", "fn_name": "fizz_buzz_cuckoo_... | 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 end of last year, Santa C... | [{"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n3 4\n18 6", "output": "31\n3 4\n"}, {"type": "stdin_stdout", "input": "1 4\n3\n1 -1\n0 6\n2 -1", "output": "10\n1 -1\n"}, {"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n3 4\n18 5", "output": "30\n3 4\n"}, {"type": "stdin_stdout", "input": "12 8\n3\n-1 1\n5 4\n10 5",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA [Power Law](https://en.wikiped... | [{"input": "[1, 120]\n[1, 120]\n1", "output": "[120]", "fn_name": "power_law"}, {"input": "[1, 120]\n[3, 60]\n27", "output": "[15]", "fn_name": "power_law"}, {"input": "[1, 120]\n[9, 30]\n27", "output": "[15]", "fn_name": "power_law"}, {"input": "[1, 120]\n[2, 60]\n4", "output": "[30]", "fn_name": "power_law"}, {"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\nAs we all know, F.C. Barcelona i... | [{"type": "stdin_stdout", "input": "2\n28 3\n8 2", "output": "198073708\n86\n"}, {"type": "stdin_stdout", "input": "2\n28 3\n8 1", "output": "198073708\n1\n"}, {"type": "stdin_stdout", "input": "2\n28 3\n8 0", "output": "198073708\n0\n"}, {"type": "stdin_stdout", "input": "2\n16 3\n8 2", "output": "10761681\n86\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\nLimak is a little polar bear. He... | [{"type": "stdin_stdout", "input": "50\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000\n", "output": "NO\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are two towers consisting ... | [{"type": "stdin_stdout", "input": "23\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n1 1\nR\nB\n", "output": "YES\nYES\nYES... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 string beautiful ... | [{"type": "stdin_stdout", "input": "10 3\naaabababaa\n1 1\n2 10\n1 2\n", "output": "0\n6\n1\n"}, {"type": "stdin_stdout", "input": "10 3\naaabababaa\n1 1\n3 10\n1 2\n", "output": "0\n5\n1\n"}, {"type": "stdin_stdout", "input": "10 3\naaabababaa\n1 1\n2 10\n1 4\n", "output": "0\n6\n2\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\nPetya studies at university. The... | [{"type": "stdin_stdout", "input": "100 43\n76 77 1\n24 25 1\n2 3 1\n85 86 1\n49 50 1\n15 16 1\n30 31 1\n78 79 1\n54 55 1\n58 59 1\n17 18 1\n67 68 1\n21 22 1\n80 81 1\n35 36 1\n8 9 1\n83 84 1\n44 45 1\n62 63 1\n64 65 1\n72 73 1\n27 28 1\n56 57 1\n12 13 1\n40 41 1\n32 33 1\n52 53 1\n70 71 1\n97 98 1\n37 38 1\n87 88 1\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\nA core idea of several left-wing... | [{"input": "[24, 48, 22, 19, 37]\n30", "output": "[[30, 30, 30, 30, 30]]", "fn_name": "socialist_distribution"}, {"input": "[2, 3, 5, 15, 75]\n20", "output": "[[20, 20, 20, 20, 20]]", "fn_name": "socialist_distribution"}, {"input": "[2, 3, 5, 15, 75]\n5", "output": "[[5, 5, 5, 15, 70]]", "fn_name": "socialist_distribut... | 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 only difference between the ... | [{"type": "stdin_stdout", "input": "1\n100 123\n398 282 403 364 468 174 143 360 217 340 354 195 84 253 114 421 494 370 104 214 149 469 446 362 108 106 115 402 253 461 483 59 365 94 281 84 248 321 228 196 96 360 321 357 151 250 496 207 425 397 114 345 252 489 30 345 182 310 440 392 111 361 49 307 328 84 201 339 351 459 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSince I got tired to write long ... | [{"type": "stdin_stdout", "input": "12\n7\n24\n0", "output": "8\n2\n11\n"}, {"type": "stdin_stdout", "input": "12\n11\n2\n0", "output": "8\n2\n2\n"}, {"type": "stdin_stdout", "input": "12\n15\n2\n0", "output": "8\n5\n2\n"}, {"type": "stdin_stdout", "input": "12\n11\n4\n0", "output": "8\n2\n3\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\nMin Element\n\nGiven the sequenc... | [{"type": "stdin_stdout", "input": "6\n10 17 3 2 6 -1", "output": "6\n"}, {"type": "stdin_stdout", "input": "6\n3 33 0 2 10 -1", "output": "6\n"}, {"type": "stdin_stdout", "input": "6\n3 55 0 2 10 -1", "output": "6\n"}, {"type": "stdin_stdout", "input": "6\n3 55 0 4 10 -1", "output": "6\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\nSoon after the Chunga-Changa isl... | [{"type": "stdin_stdout", "input": "500000000000000000 500000000000000000 1000000000000000000\n", "output": "1 500000000000000000\n"}, {"type": "stdin_stdout", "input": "500000000000000000 500000000000000000 1000000000000000000\n", "output": "1 500000000000000000\n"}, {"type": "stdin_stdout", "input": "3509193081606779... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImplement function which will re... | [{"input": "1\n-1.6666666666666667\n-26", "output": "[1.67]", "fn_name": "roots"}, {"input": "8\n47\n41", "output": "[-5.88]", "fn_name": "roots"}, {"input": "1\n-35\n-23", "output": "[35]", "fn_name": "roots"}, {"input": "3\n11\n6", "output": "[-3.67]", "fn_name": "roots"}, {"input": "7\n-2\n-5", "output": "[0.29]", "... | 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 sequence of a jo... | [{"input": "[\"Northern\", \"Central\", \"Circle\"]", "output": "[\"\\u00a37.20\"]", "fn_name": "london_city_hacker"}, {"input": "[12, \"Central\", \"Circle\", 21]", "output": "[\"\\u00a37.80\"]", "fn_name": "london_city_hacker"}, {"input": "[\"Piccidilly\", 56, 93, 243]", "output": "[\"\\u00a35.40\"]", "fn_name": "lon... | 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 the advanced algorithm class,... | [{"type": "stdin_stdout", "input": "3\n1 2 5\n11 3 6\n12 5 9\n3\n1 11 3\n13 11 14\n4 8 6\n0", "output": "5\n11\n"}, {"type": "stdin_stdout", "input": "3\n2 1 3\n4 2 11\n7 0 4\n3\n1 4 12\n14 10 18\n4 8 10\n0", "output": "2\n10\n"}, {"type": "stdin_stdout", "input": "3\n1 2 10\n11 3 6\n12 9 15\n3\n1 11 3\n13 11 9\n7 8 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 program that reads the c... | [{"type": "stdin_stdout", "input": "0.0,0.0\n0.0,1.0\n1.0,1.0\n2.0,0.0\n1.0,-1.0", "output": "2.500000"}, {"type": "stdin_stdout", "input": "0.0,0.0\n0.0,1.0\n0.0,.11\n2.1,0.0\n1.1,-1.0", "output": "1.1655\n"}, {"type": "stdin_stdout", "input": "0.1,0.0\n0.0,1.0\n1.01,.0\n2.0,0.0\n1.0,-0.0", "output": "0.455\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\nYou are given $n$ positive integ... | [{"type": "stdin_stdout", "input": "100 3\n94 94 149 27 80 73 61 38 34 139 72 96 59 36 113 15 83 78 39 22 21 57 54 20 9 32 81 64 55 90 67 41 18 57 93 76 44 62 77 66 31 70 39 73 81 57 43 31 20 104 62 26 44 26 23 23 66 53 3 14 10 170 53 19 43 81 98 12 91 15 122 90 89 86 58 30 67 73 46 69 68 47 30 7 89 35 17 93 45 6 4 23 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a regular polygon ... | [{"type": "stdin_stdout", "input": "500\n", "output": "41666498\n"}, {"type": "stdin_stdout", "input": "497\n", "output": "40920990\n"}, {"type": "stdin_stdout", "input": "494\n", "output": "40184428\n"}, {"type": "stdin_stdout", "input": "491\n", "output": "39456758\n"}, {"type": "stdin_stdout", "input": "488\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\nA binary string is a string that... | [{"type": "stdin_stdout", "input": "4\n7\n0001000\n1101100\n5\n01001\n10110\n2\n01\n01\n6\n010000\n011111\n", "output": "10\n10\n2\n10\n"}, {"type": "stdin_stdout", "input": "4\n7\n0101000\n1100100\n5\n01100\n10101\n2\n01\n01\n6\n000100\n111111\n", "output": "10\n8\n2\n10\n"}, {"type": "stdin_stdout", "input": "4\n7\n0... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 grid is a perfect starting poi... | [{"input": "6\n6", "output": "[[[\"O\", \"X\", \"O\", \"X\", \"O\", \"X\"], [\"X\", \"O\", \"X\", \"O\", \"X\", \"O\"], [\"O\", \"X\", \"O\", \"X\", \"O\", \"X\"], [\"X\", \"O\", \"X\", \"O\", \"X\", \"O\"], [\"O\", \"X\", \"O\", \"X\", \"O\", \"X\"], [\"X\", \"O\", \"X\", \"O\", \"X\", \"O\"]]]", "fn_name": "chess_boa... | 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 tutorial for this problem is n... | [{"type": "stdin_stdout", "input": "4\n1\n2\n4\n57", "output": "1\n2\n24\n40526919504877216755680601905432322134980384796226602145184481280000000000000\n"}, {"type": "stdin_stdout", "input": "4\n5\n3\n10\n29", "output": "120\n6\n3628800\n8841761993739701954543616000000\n"}, {"type": "stdin_stdout", "input": "4\n5\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\nThe police department of your ci... | [{"type": "stdin_stdout", "input": "146\n4 -1 -1 -1 -1 -1 -1 -1 -1 -1 4 -1 3 -1 3 -1 -1 1 4 -1 2 -1 -1 3 -1 -1 -1 4 1 -1 -1 -1 4 -1 -1 -1 -1 -1 -1 3 2 -1 3 2 4 5 2 4 1 5 -1 -1 2 -1 -1 1 -1 5 3 -1 1 2 2 3 5 3 -1 -1 3 -1 -1 3 5 5 -1 -1 5 -1 4 4 1 -1 -1 -1 2 1 -1 -1 -1 2 5 3 -1 -1 -1 3 -1 5 4 -1 1 -1 -1 3 -1 -1 3 1 1 2 -1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDuring a voyage of the starship ... | [{"type": "stdin_stdout", "input": "4\n10.431258066320945 10.00000 10.963374203026609\n21.297630146026126 10.00000 10.00000\n20.00000 20.997700286656844 10.00000\n11.414338431837134 20.00000 10.00000\n4\n11.03531062521475 12.469639655902677 10.968703737628516\n10.00000 51.12714506944212 50.70404839090845\n51.1844286530... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVasya has a pile, that consists ... | [{"type": "stdin_stdout", "input": "100\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", "output":... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is known that each weight of ... | [{"type": "stdin_stdout", "input": "1204", "output": "+--00--+\n"}, {"type": "stdin_stdout", "input": "1942", "output": "+0-000-+\n"}, {"type": "stdin_stdout", "input": "384", "output": "+---+-0\n"}, {"type": "stdin_stdout", "input": "567", "output": "+-+0000\n"}, {"type": "stdin_stdout", "input": "397", "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\nToday Pari and Arya are playing ... | [{"type": "stdin_stdout", "input": "61 531012\n698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 963349 698043 698043 698043 698043 966694 698043 698043 698043 698043 698043 698043 636247 698043 963349 698043 698043 698043 698043 697838 698043 989253 698043 698043 966694 698043 698043 698043 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Flatland will organi... | [{"type": "stdin_stdout", "input": "847094637 -152905363 -1000000000 -1000000000\n", "output": "FIRST\n-152905363\n"}, {"type": "stdin_stdout", "input": "-1000000000 1000000000 1230987 17135570\n", "output": "FIRST\n-983588156\n"}, {"type": "stdin_stdout", "input": "547686188 61562151 -496372503 -115242932\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\nYou are given n numbers a_1, a_2... | [{"type": "stdin_stdout", "input": "5 10 8\n1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1073741825000000000\n"}, {"type": "stdin_stdout", "input": "5 10 8\n1000000000 1000000000 1000000000 1000000000 1000000000\n", "output": "1073741825000000000\n"}, {"type": "stdin_stdout", "input": "5 10 8\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\nSpace Coconut Crab\n\nSpace coco... | [{"type": "stdin_stdout", "input": "1\n2\n4\n48\n266\n1236\n0", "output": "1\n2\n2\n12\n14\n36\n"}, {"type": "stdin_stdout", "input": "1\n2\n4\n48\n266\n1300\n0", "output": "1\n2\n2\n12\n14\n38\n"}, {"type": "stdin_stdout", "input": "1\n2\n4\n27\n557\n1250\n0", "output": "1\n2\n2\n3\n23\n44\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\nAlex doesn't like boredom. That'... | [{"type": "stdin_stdout", "input": "100\n4 8 10 1 8 8 8 1 10 3 1 8 6 8 6 1 10 3 3 3 3 7 2 1 1 6 10 1 7 9 8 10 3 8 6 2 1 6 5 6 10 8 9 7 4 3 10 5 3 9 10 5 10 8 8 5 7 8 9 5 3 18 9 2 7 8 2 10 4 9 2 8 10 10 5 8 5 1 7 3 4 5 2 2 9 3 2 5 6 2 3 10 1 5 9 6 10 4 10 8\n", "output": "392\n"}, {"type": "stdin_stdout", "input": "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\nMany computer strategy games req... | [{"type": "stdin_stdout", "input": "10\n-260530833 169589238\n-681955770 -35391010\n223450511 24504262\n479795061 -26191863\n-291344265 21153856\n714700263 -328447419\n-858655942 161086142\n-270884153 462537328\n-501424901 977460517\n115284904 -151626824\n", "output": "2475449747812002025\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\nYou have an array $a$ of length ... | [{"type": "stdin_stdout", "input": "6\n3\n1000000000 -1 -1000000000\n1\n6\n2\n-1000000000 1000000000\n2\n1000000000 -1000000000\n2\n1000000000 1000000000\n2\n-1000000000 -1000000000\n", "output": "31\n0\n0\n31\n0\n0\n"}, {"type": "stdin_stdout", "input": "6\n3\n1000000000 0 -1000000000\n1\n6\n2\n-1000000000 1000000000\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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```if-not:ruby\nCreate a functio... | [{"input": "[null]\n[null, null]\n[null, null, null]", "output": "[[null, null, null, null, null, null, null, null, null]]", "fn_name": "interleave"}, {"input": "[1, 2, 3]\n[4, 5, 6]\n[7, 8, 9]", "output": "[[1, 4, 7, 2, 5, 8, 3, 6, 9]]", "fn_name": "interleave"}, {"input": "[1, 2, 3]\n[\"c\", \"d\", \"e\"]", "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\nIn 2937, DISCO creates a new uni... | [{"type": "stdin_stdout", "input": "1486 120 1001", "output": "960152848\n"}, {"type": "stdin_stdout", "input": "328 102 1011", "output": "261361566\n"}, {"type": "stdin_stdout", "input": "328 102 1111", "output": "647647330\n"}, {"type": "stdin_stdout", "input": "328 117 1011", "output": "407646568\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\nRoma is programmer and he likes ... | [{"input": "\"This could be chemistry meme but our gey word boom is too late\"", "output": "[\"Roma\"]", "fn_name": "memesorting"}, {"input": "\"This is also programbur meme gecause it has needed key word\"", "output": "[\"Roma\"]", "fn_name": "memesorting"}, {"input": "\"This is edsigner meme cause it has key word\"",... | 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\nKamil likes streaming the compet... | [{"type": "stdin_stdout", "input": "32\n402528994560 0 0 0 0 0 0 932646223872 893192888700 0 813583026900 0 0 0 0 143521875000 0 177570054144 186624000000 0 517655600000 202145625000 341007975000 0 116252718750 0 148561875000 0 304819200000 248474688000 0 103125000000\n29 25\n20 24\n8 21\n23 3\n32 14\n29 30\n31 24\n28 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPasha got a very beautiful strin... | [{"type": "stdin_stdout", "input": "xwcxggxvfqbdklewbxkjzibmufnaywuxsqvwakefxbbkfandvigasbhbatsxyqxicrosatfsfybedklsaztyyiuurfbrzmwumujy\n100\n14 43 30 13 8 19 33 7 16 14 15 35 5 18 44 1 35 1 18 7 50 47 9 49 28 29 39 37 27 17 19 12 5 24 37 42 37 23 35 31 10 26 5 38 40 34 42 47 2 40 43 32 16 25 14 45 35 38 46 48 49 27 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\nFizzBuzz is a game in which inte... | [{"type": "stdin_stdout", "input": "10010000000", "output": "990079BuzzFizz141999\n"}, {"type": "stdin_stdout", "input": "10010000001", "output": "90079BuzzFizz1419990\n"}, {"type": "stdin_stdout", "input": "10000000001", "output": "3FizzBuzz1418650796F\n"}, {"type": "stdin_stdout", "input": "10000001001", "output": "4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSometimes some words like \"loca... | [{"type": "stdin_stdout", "input": "20\nlkpmx\nkovxmxorlgwaomlswjxlpnbvltfv\nhykasjxqyjrmybejnmeumzha\ntuevlumpqbbhbww\nqgqsphvrmupxxc\ntrissbaf\nqfgrlinkzvzqdryckaizutd\nzzqtoaxkvwoscyx\noswytrlnhpjvvnwookx\nlpuzqgec\ngyzqfwxggtvpjhzmzmdw\nrlxjgmvdftvrmvbdwudra\nvsntnjpepnvdaxiporggmglhagv\nxlvcqkqgcrbgtgglj\nlyxwxbis... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIahub and Sorin are the best com... | [{"type": "stdin_stdout", "input": "100\n-57 -64 83 76 80 27 60 76 -80 -56 52 72 -17 92 -96 87 41 -88 94 89 12 42 36 34 -100 -43 -42 62 3 87 -69 -6 -27 -59 -7 5 -90 -23 63 -87 -60 -92 -40 54 -16 -47 67 -64 10 33 -19 53 -7 -62 16 -74 -36 4 -75 -55 92 3 -22 43 -30 48 -27 88 -58 41 36 8 -40 -30 -18 16 22 -66 -91 -46 48 -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\nTaro had his own personal comput... | [{"type": "stdin_stdout", "input": "KUSATSU\nLSATSU", "output": "No\n"}, {"type": "stdin_stdout", "input": "RUPCUAOC\n__PC", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "KUSATSU\nLSATRU", "output": "No\n"}, {"type": "stdin_stdout", "input": "RUPCUAOC\n__OC", "output": "Yes\n"}, {"type": "stdin_stdout", "input... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is one card each with the ... | [{"type": "stdin_stdout", "input": "1 2 3\n4 1 10\n5 1 10", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1 2 3\n5 6 10\n4 9 10", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1 2 3\n7 1 10\n5 1 10", "output": "YES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1 4 3\n5 6 10\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\nThe map of Bertown can be repres... | [{"type": "stdin_stdout", "input": "20 50\n20 3\n5 16\n1 3\n10 11\n10 15\n15 9\n20 9\n14 6\n16 5\n13 4\n11 5\n3 20\n13 17\n11 8\n11 6\n12 14\n16 18\n17 13\n18 7\n3 1\n8 10\n17 15\n7 2\n9 13\n5 11\n6 1\n2 16\n8 18\n10 8\n4 13\n9 15\n14 12\n1 6\n9 20\n7 18\n6 14\n7 6\n18 16\n2 7\n3 11\n15 17\n3 12\n14 10\n4 14\n19 4\n11 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFor a given array $a_1, a_2, a_3... | [{"type": "stdin_stdout", "input": "6 5\n1 2 3 2 7 6\n12 12 12 21 15", "output": "14\n14\n14\n21\n18\n"}, {"type": "stdin_stdout", "input": "6 5\n1 4 3 2 12 6\n10 1 22 25 23", "output": "11\n1\n18\n19\n19\n"}, {"type": "stdin_stdout", "input": "6 5\n1 4 3 2 12 1\n10 1 22 25 23", "output": "11\n2\n20\n21\n21\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\nCurrently, XXOC's rap is a strin... | [{"type": "stdin_stdout", "input": "?00?0?0??00100?00?001111?11???1010110100?00?0?1?1?1001??001010?011???0000???????1111?1?101100110?001\n801448 0\n", "output": "819079856\n"}, {"type": "stdin_stdout", "input": "10001?0011?0??1?1001??001?001?0100??00???0???011?00111???1?1?0?0?0??1?1?1?1?1010?1101?0000?1??11?101\n0 1\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPasha has many hamsters and he m... | [{"type": "stdin_stdout", "input": "200\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n", "output": "100\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 quarantine, Sicromoft... | [{"type": "stdin_stdout", "input": "1\n118730819 699217111 1229905591 978426672\n", "output": "310250620284395093\n"}, {"type": "stdin_stdout", "input": "1\n118730819 699217111 995255402 1762535216\n", "output": "932024458581475216\n"}, {"type": "stdin_stdout", "input": "1\n118730819 699217111 1571293294 978426672\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\nGildong is experimenting with an... | [{"type": "stdin_stdout", "input": "4\n4 -9 -1 -1\n2\n2 3\n1\n2\n3\n2 4 1\n4\n3 1 2 1\n6\n1 -1\n3 -1\n3 -1\n4 -4\n2 1\n1 5\n", "output": "1\n1\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "4\n4 -9 -1 -1\n2\n2 3\n1\n2\n3\n2 4 1\n4\n3 1 2 1\n6\n1 -1\n3 0\n3 -1\n4 -4\n2 1\n1 5\n", "output": "1\n1\n1\n1\n1\n1\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\nImagine there's a big cube consi... | [{"input": "10002", "output": "[1000000000000]", "fn_name": "not_visible_cubes"}, {"input": "12", "output": "[1000]", "fn_name": "not_visible_cubes"}, {"input": "18", "output": "[4096]", "fn_name": "not_visible_cubes"}, {"input": "7", "output": "[125]", "fn_name": "not_visible_cubes"}, {"input": "5", "output": "[27]", ... | 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 been almost a week since Po... | [{"type": "stdin_stdout", "input": "10 5\n1384 1129 1780 1960 1567 1928 12 1523 1165 344\n", "output": "6931.333333333333030"}, {"type": "stdin_stdout", "input": "10 4\n127 1459 718 1183 880 1044 1857 1340 725 1496\n", "output": "4574.428571428571558"}, {"type": "stdin_stdout", "input": "10 5\n1384 1129 1780 1960 1567 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 all the events in Orlando ... | [{"type": "stdin_stdout", "input": "15 10 15\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n", "output": ".X.X.X.X.XXXXXX\n"}, {"type": "stdin_stdout", "input": "15 10 15\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n1\n14\n15\n", "output": ".X.X.X.X.XXX.XX"}, {"type": "stdin_stdout", "input": "15 10 15\n1\n2\n3\n3\n5\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTom gives a number N to Roy and ... | [{"type": "stdin_stdout", "input": "100\n221614680\n613118744\n825161854\n393619966\n433416647\n918290125\n875590062\n364287285\n540653024\n282896407\n834916465\n819950927\n260491958\n606161260\n616177142\n575204996\n709562762\n710833433\n425478909\n578641871\n461777994\n818969932\n542538037\n994852175\n474901231\n3567... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFolding a Ribbon\n\nThink of rep... | [{"type": "stdin_stdout", "input": "4 3 2\n30 578 1954\n59 471605241352156968 431565444592236940\n0 0 0", "output": "LRRR\nLLLLLRLLRLLLLLLLLLLRRRRLRLLLLL\nLRRRLRRLLRRRRLLLLRLLRRRLRRLLRLLLLLLRLRLLRLRLLLRLRLLRLLRRRLL\n"}, {"type": "stdin_stdout", "input": "4 3 2\n20 578 1954\n59 471605241352156968 431565444592236940\n0 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\nEhab has an array $a$ of length ... | [{"type": "stdin_stdout", "input": "4\n7\n6 6 12 8 6 6 6\n1\n2\n5\n4 5 9 2 7\n7\n1 2 7 1 6 20 2\n", "output": "3\n1\n5\n5\n"}, {"type": "stdin_stdout", "input": "4\n7\n6 6 12 8 6 5 6\n1\n2\n5\n4 5 9 2 7\n7\n1 2 7 1 6 20 2\n", "output": "4\n1\n5\n5\n"}, {"type": "stdin_stdout", "input": "4\n7\n6 6 8 8 6 6 6\n1\n2\n5\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\nNot so long ago company R2 bough... | [{"type": "stdin_stdout", "input": "100 99 1 2\n2 1 1 1 2 2 1 1 1 2 2 2 1 2 1 1 2 1 1 2 1 2 2 1 2 1 2 1 2 1 2 2 2 2 1 1 1 1 1 2 1 2 2 1 2 2 2 1 1 1 1 1 2 2 2 2 1 2 2 1 1 1 2 1 1 2 1 1 2 1 2 1 2 1 1 1 1 2 1 1 0 1 1 2 2 2 1 1 1 1 2 2 2 2 1 1 2 2 2\n", "output": "Incorrect\n"}, {"type": "stdin_stdout", "input": "100 99 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\nZane the wizard had never loved ... | [{"type": "stdin_stdout", "input": "100 1 100\n0 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 110 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\nIn BerSoft $n$ programmers work,... | [{"type": "stdin_stdout", "input": "10 35\n322022227 751269818 629795150 369443545 344607287 250044294 476897672 184054549 986884572 917181121\n6 3\n7 3\n1 9\n7 9\n10 7\n3 4\n8 6\n7 4\n6 10\n7 2\n3 5\n6 9\n3 10\n8 7\n6 5\n8 1\n8 5\n1 7\n8 10\n8 2\n1 5\n10 4\n6 7\n4 6\n2 6\n5 4\n9 10\n9 2\n4 8\n5 9\n4 1\n3 2\n2 1\n4 2\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 cities in Bearland, ... | [{"type": "stdin_stdout", "input": "100 100\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\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "100 100\n1 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\nYurii is sure he can do everythi... | [{"type": "stdin_stdout", "input": "10\n997230370 58052053 240970544 715275815 250707702 156801523 44100666 64791577 43523002 480196854\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "10\n997230370 58052053 240970544 715275815 250707702 156801523 44100666 64791577 43523002 480196854\n", "output": "2"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou just got done with your set ... | [{"input": "135\n20", "output": "[282]", "fn_name": "calculate_1RM"}, {"input": "200\n8", "output": "[253]", "fn_name": "calculate_1RM"}, {"input": "270\n2", "output": "[289]", "fn_name": "calculate_1RM"}, {"input": "360\n1", "output": "[360]", "fn_name": "calculate_1RM"}, {"input": "400\n0", "output": "[0]", "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\nThe tram in Berland goes along a... | [{"type": "stdin_stdout", "input": "1000 812 976\n230 1000\n1006 -1\n", "output": "164000\n"}, {"type": "stdin_stdout", "input": "1000 394 798\n155 1242\n954 -1\n", "output": "271560\n"}, {"type": "stdin_stdout", "input": "1000 812 976\n230 1000\n696 -1\n", "output": "164000\n"}, {"type": "stdin_stdout", "input": "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\nN tiles are arranged in a row fr... | [{"type": "stdin_stdout", "input": "01010000100110111100010011111100001010101111001100001010101000100101100011110011111110100011000001111011010011100010010111011001011000010110011100111010111111010100010111100100110000100010010011101001001110000100110101011001100000010111101101100100010011110010110010101100100011001010... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a sequence of N positi... | [{"type": "stdin_stdout", "input": "10 3\n14 26 111 65 35 89 184 32 38 46", "output": "4\n"}, {"type": "stdin_stdout", "input": "10 11\n14 26 111 0 35 27 95 13 38 63", "output": "12\n"}, {"type": "stdin_stdout", "input": "10 13\n14 15 101 65 35 89 95 32 38 46", "output": "6\n"}, {"type": "stdin_stdout", "input": "10 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\nThere are $n$ slimes in a row. E... | [{"type": "stdin_stdout", "input": "10\n-20 1 3 -5 -27 18 -3 -9 -7 9\n", "output": "102\n"}, {"type": "stdin_stdout", "input": "10\n-20 0 3 -5 -18 15 -3 -9 -7 9\n", "output": "89\n"}, {"type": "stdin_stdout", "input": "10\n-20 0 3 -5 -27 15 -3 -9 -7 9\n", "output": "98\n"}, {"type": "stdin_stdout", "input": "10\n-20 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 sequence of $m$ integers is ... | [{"type": "stdin_stdout", "input": "6\n5\n1 4 3 2 1\n6\n2 4 1 3 3 1\n4\n2 1 1 2\n4\n1 3 3 1\n12\n2 1 3 5 5 6 7 8 9 1 10 2\n3\n1 2 1\n", "output": "2\n1 4\n4 1\n0\n1\n2 2\n0\n0\n2\n1 2\n2 1\n"}, {"type": "stdin_stdout", "input": "6\n5\n1 4 3 2 1\n6\n2 4 1 3 2 1\n4\n2 1 1 3\n4\n1 3 3 1\n12\n2 1 3 4 5 6 7 8 9 1 10 2\n3\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\nYou are going to be given a word... | [{"input": "\"testing\"", "output": "[\"t\"]", "fn_name": "get_middle"}, {"input": "\"middle\"", "output": "[\"dd\"]", "fn_name": "get_middle"}, {"input": "\"test\"", "output": "[\"es\"]", "fn_name": "get_middle"}, {"input": "\"of\"", "output": "[\"of\"]", "fn_name": "get_middle"}, {"input": "\"A\"", "output": "[\"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\nWrite a program which reads a se... | [{"type": "stdin_stdout", "input": "5\n114 0 -15 -1 2", "output": "-15 114 100\n"}, {"type": "stdin_stdout", "input": "5\n114 -1 -15 -1 2", "output": "-15 114 99\n"}, {"type": "stdin_stdout", "input": "5\n112 -1 -15 -1 2", "output": "-15 112 97\n"}, {"type": "stdin_stdout", "input": "5\n112 1 -14 -1 2", "output": "-14 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMadoka wants to enter to \"Novos... | [{"type": "stdin_stdout", "input": "100000\n", "output": "454535891\n"}, {"type": "stdin_stdout", "input": "69228\n", "output": "778304278\n"}, {"type": "stdin_stdout", "input": "94874\n", "output": "584783437\n"}, {"type": "stdin_stdout", "input": "99413\n", "output": "461761995\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\nThe Quarkgo Empire Expeditionary... | [{"type": "stdin_stdout", "input": "1204648530", "output": "20\n"}, {"type": "stdin_stdout", "input": "3727082973", "output": "21\n"}, {"type": "stdin_stdout", "input": "1369610954", "output": "20\n"}, {"type": "stdin_stdout", "input": "2281056559", "output": "20\n"}, {"type": "stdin_stdout", "input": "104442668", "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\nAlice and Bob decided to eat som... | [{"type": "stdin_stdout", "input": "420196140727489673 679891637638612258\n", "output": "1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B1A1B"}, {"type": "stdin_stdout", "input": "498454011879264 806515... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYes, that's another problem with... | [{"type": "stdin_stdout", "input": "60\n799032\n1880\n489633\n167604\n641858\n521214\n951107\n121088\n952294\n514428\n890184\n883033\n317778\n456130\n373364\n404297\n757369\n815335\n317046\n148887\n834163\n990592\n721319\n402371\n458279\n570263\n887791\n365893\n433095\n463049\n457336\n669570\n803506\n178817\n214599\n21... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 likes taking part in Codef... | [{"type": "stdin_stdout", "input": "100 10\n3 114 77 78 105 87 6 122 141 100 75 118 64 18 88 37 109 72 31 101 36 10 62 18 52 17 149 115 22 150 138 48 46 42 104 8 63 21 117 58 87 80 7 131 125 118 67 13 144 43 59 67 74 13 124 77 86 148 107 11 51 9 87 52 147 22 7 22 143 12 121 123 17 35 33 87 91 140 92 38 106 10 66 26 40 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKontti language is a finnish wor... | [{"input": "\"lamppu sofia\"", "output": "[\"komppu-lantti kofia-sontti\"]", "fn_name": "kontti"}, {"input": "\"silly game\"", "output": "[\"kolly-sintti kome-gantti\"]", "fn_name": "kontti"}, {"input": "\"xyz lamppu\"", "output": "[\"koz-xyntti komppu-lantti\"]", "fn_name": "kontti"}, {"input": "\"silly grrr\"", "outp... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe year 2015 is almost over.\n\... | [{"type": "stdin_stdout", "input": "1000000000000000000 1000000000000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "500000000000000000 1000000000000000000\n", "output": "58\n"}, {"type": "stdin_stdout", "input": "500000000000000000 1000000000000000000\n", "output": "58\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\nIn this Kata we focus on finding... | [{"input": "9999999999999", "output": "[300880375389561]", "fn_name": "count_divisors"}, {"input": "9999999999998", "output": "[300880375389537]", "fn_name": "count_divisors"}, {"input": "9999999999995", "output": "[300880375389493]", "fn_name": "count_divisors"}, {"input": "9999999949950", "output": "[300880373832097]... | code_functional |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.