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\nThere are N points in a two-dime... | [{"type": "stdin_stdout", "input": "20\n8 -10 R\n-4 -9 U\n9 6 D\n-3 -2 R\n0 12 D\n4 5 D\n10 -10 U\n-1 -8 U\n10 -6 D\n8 -5 U\n6 4 D\n-1 3 D\n19 9 R\n9 -4 R\n3 10 D\n1 9 U\n1 -6 U\n9 -8 R\n9 6 D\n7 -3 D", "output": "502.250000000000\n"}, {"type": "stdin_stdout", "input": "20\n8 -10 R\n-4 -9 U\n9 5 D\n-3 -2 R\n0 7 D\n4 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\nYou are given a sequence of posi... | [{"type": "stdin_stdout", "input": "8\n2 7 1 8 2 8 1 8\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "6\n1 2 2 3 3 3\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1\n1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n2 4 1 4 2\n", "output": "2\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHey CodeWarrior,\n\nwe've got a ... | [{"input": "\"uid12 ab, uid#, uidMiXeDcHaRs\"", "output": "[[\"12 ab\", \"\", \"mixedchars\"]]", "fn_name": "get_users_ids"}, {"input": "\" uidin name whitespace\"", "output": "[[\"in name whitespace\"]]", "fn_name": "get_users_ids"}, {"input": "\"uid##doublehashtag\"", "output": "[[\"doublehashtag\"]]", "fn_name": "g... | 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# One is the loneliest number\n\... | [{"input": "65432165432", "output": "[false]", "fn_name": "loneliest"}, {"input": "8854778", "output": "[false]", "fn_name": "loneliest"}, {"input": "123456", "output": "[true]", "fn_name": "loneliest"}, {"input": "34315", "output": "[true]", "fn_name": "loneliest"}, {"input": "11111", "output": "[true]", "fn_name": "l... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExtended Euclid Algorithm\n\n\n\... | [{"type": "stdin_stdout", "input": "810 11", "output": "-3 221\n"}, {"type": "stdin_stdout", "input": "277 5", "output": "-2 111\n"}, {"type": "stdin_stdout", "input": "195 10", "output": "1 -19\n"}, {"type": "stdin_stdout", "input": "174 10", "output": "-2 35\n"}, {"type": "stdin_stdout", "input": "41 52", "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\nLucifer and Crowley being two mo... | [{"type": "stdin_stdout", "input": "1000 300000003\n100000000 100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 10000002... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nZiota found a video game called ... | [{"type": "stdin_stdout", "input": "100 4 8 9 2\n1 8 0 8 7 8 1 8 7 4 0 9 4 2 1 7 3 7 3 7 1 8 7 14 4 10 11 7 3 5 9 7 4 9 6 10 4 5 5 2 5 2 8 4 5 3 1 6 8 8 10 6 7 2 1 6 2 8 3 9 7 4 18 6 7 8 5 2 5 16 3 8 4 11 0 3 5 10 6 1 4 8 14 17 2 2 9 3 7 3 3 3 10 19 3 5 3 1 3 3\n", "output": "1584\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\nComputer graphics uses polygon m... | [{"type": "stdin_stdout", "input": "6\n3 3 1\n1 2 4\n1 4 3\n-1 3 4\n5 -1 1\n2 3 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n3 3 1\n1 2 4\n1 4 3\n-1 4 4\n10 0 1\n2 3 1", "output": "0\n"}, {"type": "stdin_stdout", "input": "6\n3 1 1\n2 0 4\n0 4 1\n-1 4 4\n9 -1 2\n2 3 1", "output": "0\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\nF: Miko Mi String-\n\nstory\n\nM... | [{"type": "stdin_stdout", "input": "iNobiNociN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "iNoaiNociN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "iNoaiNochN", "output": "mitomerarenaiWA\n"}, {"type": "stdin_stdout", "input": "NhcoNiaoNi", "output": "mitomerarenaiWA\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": "69 1701\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzy\n", "output": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaax\n"}, {"type": "stdin_stdout", "input": "69 1701\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzy\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[Image] \n\n\n-----Input-----\n\... | [{"type": "stdin_stdout", "input": "MDJivQRiOIVRcCdkSuUlNbMEOkIVJRMTAnHbkVaOmOblLfignh\n25\n", "output": "MDJIVQRIOIVRCCDKSUULNBMEOKIVJRMTANHBKVAOMOBLLFIGNH\n"}, {"type": "stdin_stdout", "input": "aaaaaaAAAaaaaAaaAaaAaaaaAAaAAAaaAAaaaAAaaaaaAaaAAa\n2\n", "output": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\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### Introduction and Warm-up (Hi... | [{"input": "[13, 12, -27, -302, 25, 37, 133, 155, -1]\n5", "output": "[247895375]", "fn_name": "max_product"}, {"input": "[14, 29, -28, 39, -16, -48]\n4", "output": "[-253344]", "fn_name": "max_product"}, {"input": "[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n5", "output": "[0]", "fn_name": "max_product"}, {"input": "[10, 2, 3, 8,... | 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\nOn his free time, Chouti likes d... | [{"type": "stdin_stdout", "input": "1411 1081 1082\n", "output": "238077838\n"}, {"type": "stdin_stdout", "input": "1841 1185 1765\n", "output": "773828348\n"}, {"type": "stdin_stdout", "input": "2000 1234 1800\n", "output": "550745740\n"}, {"type": "stdin_stdout", "input": "2000 2000 1999\n", "output": "694730459\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$ pillars aligned in... | [{"type": "stdin_stdout", "input": "100\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call a set of positive int... | [{"type": "stdin_stdout", "input": "17027\n", "output": "17024\n1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 In ChessLand there is a... | [{"input": "[17, 19]\n[16, 18]\n[1, 1]\n239239239", "output": "[[10, 2]]", "fn_name": "chess_bishop_dream"}, {"input": "[1, 1]\n[0, 0]\n[1, -1]\n1000000000", "output": "[[0, 0]]", "fn_name": "chess_bishop_dream"}, {"input": "[17, 19]\n[14, 8]\n[1, -1]\n239239", "output": "[[4, 17]]", "fn_name": "chess_bishop_dream"}, {... | 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\nPolycarp was dismantling his att... | [{"type": "stdin_stdout", "input": "3\n3 3\n0 -5 4\n1 5 4\n2 2\n-4 0\n1 2\n2 2\n0 0\n1 2\n", "output": "-1 -1 -1\n-1 -1\n-1 -1\n"}, {"type": "stdin_stdout", "input": "3\n3 3\n0 -3 4\n1 5 2\n2 2\n-4 -1\n1 1\n2 2\n0 0\n1 2\n", "output": "2 14 5\n-1 -1\n-1 -1\n"}, {"type": "stdin_stdout", "input": "3\n3 3\n0 -3 4\n1 5 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\nDevu is a dumb guy, his learning... | [{"type": "stdin_stdout", "input": "20 8\n6 16 0 2 6 10 1 4 1 5 3 5 9 2 2 8 0 2 3 3\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "20 8\n6 16 0 2 6 13 1 4 6 5 3 5 9 2 2 8 0 2 3 3\n", "output": "121\n"}, {"type": "stdin_stdout", "input": "20 8\n6 16 0 2 6 10 1 4 6 5 3 5 9 2 2 8 0 2 3 3\n", "output": "118\n"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "18 6 1\n0 3\n-1 7 \n3 2 \n4 1\n6 3\n7 2", "output": "5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n5\n"}, {"type": "stdin_stdout", "input": "15 2 6\n3 0\n3 4 \n5 0 \n4 1\n4 0\n7 3", "output": "1\n1\n1\n0\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n1\n"}, {"type": "stdin_stdout", "input": "13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Dima has two sequences of... | [{"type": "stdin_stdout", "input": "100\n2 2 10 3 5 6 4 7 9 8 2 7 5 5 1 7 5 9 2 2 10 3 6 10 9 9 10 7 3 9 7 8 8 3 9 3 9 3 3 6 3 7 9 9 7 10 9 1 1 3 6 2 9 5 9 9 6 2 6 5 6 8 2 10 1 1 6 8 8 4 5 2 6 8 8 5 9 2 3 3 7 7 10 5 4 2 10 6 7 6 5 4 10 6 10 3 9 9 1 5\n3 5 6 4 2 3 2 9 3 8 3 1 10 7 4 3 6 9 3 5 9 5 3 10 4 7 9 7 4 3 3 6 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\nIn the year 2168, AtCoder Inc., ... | [{"type": "stdin_stdout", "input": "10\n64 55 27 35 76 119 7 18 49 100\n29 19 31 39 27 48 41 87 55 70\n", "output": "20291.000000000000\n"}, {"type": "stdin_stdout", "input": "10\n64 55 27 35 76 119 7 18 49 100\n29 19 31 39 27 48 41 87 55 70", "output": "20291.000000000000"}, {"type": "stdin_stdout", "input": "10\n64 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\nTheofanis really likes sequences... | [{"type": "stdin_stdout", "input": "3\n6 10\n4 20\n105 276\n", "output": "222\n272\n456030397\n"}, {"type": "stdin_stdout", "input": "3\n6 11\n2 17\n105 194\n", "output": "223\n17\n136912005\n"}, {"type": "stdin_stdout", "input": "3\n6 7\n4 20\n105 276\n", "output": "43\n272\n456030397\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\nEvery positive integer number, ... | [{"input": "10\n200", "output": "[[21, 25, 63, 105, 125, 147, 189]]", "fn_name": "sflpf_data"}, {"input": "501\n5000", "output": "[[998, 1996, 2994, 3992, 4990]]", "fn_name": "sflpf_data"}, {"input": "15\n150", "output": "[[26, 52, 78, 104, 130]]", "fn_name": "sflpf_data"}, {"input": "10\n100", "output": "[[21, 25, 63]... | 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 breakthrough among computer ga... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "1209197264797\n"}, {"type": "stdin_stdout", "input": "1010000\n", "output": "1233502153639\n"}, {"type": "stdin_stdout", "input": "1010100\n", "output": "1233746427001\n"}, {"type": "stdin_stdout", "input": "999811\n", "output": "1208740231393\n"}, {"type": "st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nTwilight Sparkle was playing Lud... | [{"type": "stdin_stdout", "input": "100000 100000\n", "output": "99999.418033254507\n"}, {"type": "stdin_stdout", "input": "100001 100000\n", "output": "100000.41802404786\n"}, {"type": "stdin_stdout", "input": "50000 100000\n", "output": "49999.843487110789\n"}, {"type": "stdin_stdout", "input": "99999 100000\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\nIt's bonus time in the big city!... | [{"input": "10000\ntrue", "output": "[\"$100000\"]", "fn_name": "bonus_time"}, {"input": "25000\ntrue", "output": "[\"$250000\"]", "fn_name": "bonus_time"}, {"input": "10000\nfalse", "output": "[\"$10000\"]", "fn_name": "bonus_time"}, {"input": "60000\nfalse", "output": "[\"$60000\"]", "fn_name": "bonus_time"}, {"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\nPolycarp lives on the coordinate... | [{"type": "stdin_stdout", "input": "9\n4 17 0 0\n0 6 0 0\n5 0 7 3\n52 2 20 010\n-11 20 -40 0\n2 2 0 0\n-2 0 1 4\n-1 4 0 2\n0 4 -10 0\n", "output": "13\n6\n4\n30\n31\n0\n0\n2\n4\n"}, {"type": "stdin_stdout", "input": "9\n1 10 7 1\n3 3 1 0\n8 2 10 4\n10 2 10 100\n-10 20 -17 2\n-3 1 0 0\n-3 1 2 0\n2 3 0 3\n-1 1 -2 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\nYou are given a string $s$ consi... | [{"type": "stdin_stdout", "input": "dfcbbcfeeedbaea\n15\n1 1 e\n1 4 b\n2 10 15\n1 7 b\n1 12 c\n2 6 8\n2 1 6\n1 7 c\n1 2 f\n1 10 a\n2 7 11\n1 10 a\n1 14 b\n1 1 f\n2 1 11\n", "output": "4\n3\n4\n4\n6\n"}, {"type": "stdin_stdout", "input": "decbbcfeeedbafa\n15\n1 1 e\n1 4 b\n2 10 15\n1 7 b\n1 12 c\n2 6 8\n2 1 6\n1 7 c\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\nTaro Aizu's company has a boss w... | [{"type": "stdin_stdout", "input": "4 15000\n520\n41\n129\n500\n3 1047\n6\n20\n25\n3 359208\n5\n14\n17\n0 0", "output": "14983\n1039\n359207\n"}, {"type": "stdin_stdout", "input": "4 15000\n305\n260\n136\n500\n3 400\n10\n23\n30\n3 599838\n5\n1\n12\n0 0", "output": "14983\n397\n599831\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 great king of a certain countr... | [{"type": "stdin_stdout", "input": "2\n1 2\nadd\n3\n12 4 0\nDDDA\n5\n3 1 3 5 2\ndcdkIlkP\n0", "output": "Zbc\nrzDo\nabafGijM\n"}, {"type": "stdin_stdout", "input": "2\n1 2\nadd\n3\n12 4 1\nDDDA\n5\n3 1 3 5 2\ndcdkIlkP\n0", "output": "Zbc\nrzCo\nabafGijM\n"}, {"type": "stdin_stdout", "input": "2\n1 0\nadd\n3\n12 4 1\nDD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 of numbers, retur... | [{"input": "[82, 98, 72, 71, 71, 72, 62, 67, 68, 115, 117, 112, 122, 121, 93]", "output": "[\"Rby]->Cyz-zyC>->Cyz\"]", "fn_name": "sort_transform"}, {"input": "[111, 121, 122, 124, 125, 126, 117, 118, 119, 121, 122, 73]", "output": "[\"oyzI-Io}~-~}oI-Io}~\"]", "fn_name": "sort_transform"}, {"input": "[78, 117, 110, 99,... | 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 is a follow up from my kata... | [{"input": "1012356895", "output": "[\"10123-56*89-5\"]", "fn_name": "insert_dash2"}, {"input": "40546793", "output": "[\"4054*67-9-3\"]", "fn_name": "insert_dash2"}, {"input": "454793", "output": "[\"4547-9-3\"]", "fn_name": "insert_dash2"}, {"input": "123456", "output": "[\"123456\"]", "fn_name": "insert_dash2"}, {"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\nOne day Nikita found the string ... | [{"type": "stdin_stdout", "input": "bbabbbbbaaba\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "bbbbbbabaaaa\n", "output": "11\n"}, {"type": "stdin_stdout", "input": "bbabbbbabbbb\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "baabbbbbaaba\n", "output": "10\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\nHacker Zhorik wants to decipher ... | [{"type": "stdin_stdout", "input": "50 50\n5733 740 547 3647 5382 5109 6842 7102 5879 1502 3574 1628 7905 4357 8569 9564 8268 3542 2487 8532 425 7713 2585 925 6458 2697 2844 69 324 9030 495 4428 6724 3524 3304 4874 1303 2098 1136 1048 2464 7316 274 9586 534 2450 2368 8060 7795 70692\n1918 4122 6806 4914 6517 6278 9842 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFirst-rate specialists graduate ... | [{"type": "stdin_stdout", "input": "prntaxhysjfcfmrjngdsitlguahtpnwgbaxptubgpwcfxqehrulbxfcjssgocqncscduvyvarvwxzvmjoatnqfsvsilubexmwugedtzavyamqjqtkxzuslielibjnvkpvyrbndehsqcaqzcrmomqqwskwcypgqoawxdutnxmeivnfpzwvxiyscbfnloqjhjacsfnkfmbhgzpujrqdbaemjsqphokkiplblbflvadcyykcqrdohfasstobwrobslaofbasylwiizrpozvhtwyxtzl\n",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array a of leng... | [{"type": "stdin_stdout", "input": "125\n1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0\n", "output": "YES\n23\n120 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\nAn ant moves on the real line wi... | [{"type": "stdin_stdout", "input": "5\n370534603 100000000 1\n600000000 400000000 0\n800000000 300000000 0\n900000000 700000000 1\n1000000000 500000000 0\n", "output": "444580501\n"}, {"type": "stdin_stdout", "input": "5\n370534603 100000000 1\n600000000 400000000 0\n800000000 300000000 0\n900000000 700000000 1\n101000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 full exploration sister is a... | [{"type": "stdin_stdout", "input": "-2 1 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n2 5", "output": "-1\n"}, {"type": "stdin_stdout", "input": "-2 1 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n3 5", "output": "-1\n"}, {"type": "stdin_stdout", "input": "-2 0 -1 2\n6\n-1 2\n2 0\n1 -2\n1 1\n-1 -1\n-1 -1\n3 5", "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\nKsusha is a beginner coder. Toda... | [{"type": "stdin_stdout", "input": "5\n506904227 214303304 136194869 838256937 183952885\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5\n506904227 214303304 136194869 838256937 183952885\n", "output": "-1\n"}, {"type": "stdin_stdout", "input": "5\n238711016 214303304 136194869 838256937 183952885\n", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata your task will be t... | [{"input": "[21, 20, 22, 40, 39, -56, 30, -55, 95, 94]", "output": "[2]", "fn_name": "pairs"}, {"input": "[81, 44, 80, 26, 12, 27, -34, 37, -35]", "output": "[0]", "fn_name": "pairs"}, {"input": "[-55, -56, -7, -6, 56, 55, 63, 62]", "output": "[4]", "fn_name": "pairs"}, {"input": "[1, 2, 5, 8, -4, -3, 7, 6, 5]", "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\nSomeone gave Alyona an array con... | [{"type": "stdin_stdout", "input": "10\n1 1 1 10000000 10000000 10000000 10000000 10000000 10000000 10000000\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "10\n1 1 1 10000000 10000000 10000000 10000000 10000000 10000000 10000000\n", "output": "9\n"}, {"type": "stdin_stdout", "input": "10\n1 1 1 10000000 10000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 positive integer number n is w... | [{"type": "stdin_stdout", "input": "53684795681792590016697187295561462737810600000146840941336328677293748561247888801665863139922929397968535048060292988802347668853531069156825523164438370977880256909710958836918627008217572514193873141535365258436916984535972865113877338591947508645026570682995314540038481160747606... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChuck has lost count of how many... | [{"input": "\" 76 B2L4D0A8C6.-T%8.90. lkd\"", "output": "[true]", "fn_name": "body_count"}, {"input": "\"ffr65A C8K4D9U7V5.-Y%8.00.\"", "output": "[true]", "fn_name": "body_count"}, {"input": "\"PP P6A6T5F5S3.-Z%1.11.hgr\"", "output": "[true]", "fn_name": "body_count"}, {"input": "\"d G8H1E2O9N3.-W%8.56. f\""... | 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\nWhile playing with geometric fig... | [{"type": "stdin_stdout", "input": "100\n", "output": "19801\n"}, {"type": "stdin_stdout", "input": "100\n", "output": "19801"}, {"type": "stdin_stdout", "input": "72\n", "output": "10225\n"}, {"type": "stdin_stdout", "input": "94\n", "output": "17485\n"}, {"type": "stdin_stdout", "input": "77\n", "output": "11705\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\nTired of boring office work, Den... | [{"type": "stdin_stdout", "input": "7\n1 4 1\n0 0 0\n16 0 1\n2 2 2\n2 3 2\n3 2 2\n0 4 4\n", "output": "3\n0\n2\n4\n5\n5\n3\n"}, {"type": "stdin_stdout", "input": "7\n0 1 1\n0 0 0\n11 1 1\n2 2 4\n3 3 3\n4 2 3\n0 6 1\n", "output": "2\n0\n3\n5\n6\n5\n2\n"}, {"type": "stdin_stdout", "input": "7\n1 2 1\n0 0 0\n16 1 1\n2 2 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nM-kun is a brilliant air traffic... | [{"type": "stdin_stdout", "input": "8\n285 224 U\n130 175 R\n111 322 D\n121 188 L\n201 116 U\n112 121 R\n145 239 D\n185 107 L", "output": "SAFE\n"}, {"type": "stdin_stdout", "input": "8\n285 224 U\n130 175 R\n101 322 D\n121 188 L\n201 116 U\n112 121 R\n145 239 D\n185 107 L", "output": "SAFE\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\nShell Sort\n\nShell Sort is a ge... | [{"type": "stdin_stdout", "input": "5\n10\n1\n5\n9\n1", "output": "2\n4 1\n1\n1\n1\n5\n9\n10\n"}, {"type": "stdin_stdout", "input": "5\n10\n1\n5\n7\n1", "output": "2\n4 1\n1\n1\n1\n5\n7\n10\n"}, {"type": "stdin_stdout", "input": "5\n6\n1\n10\n7\n1", "output": "2\n4 1\n4\n1\n1\n6\n7\n10\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\nMonocarp is playing a computer g... | [{"type": "stdin_stdout", "input": "2\n1000000000000000 1\n1000000000000000 200000\n0 1 1\n1000000000000000 200000\n1000000000000000 1\n0 1 1\n", "output": "NO\nYES\n"}, {"type": "stdin_stdout", "input": "2\n1000000000000000 1\n1000000000000000 1000000000\n1000 10000 10000000000\n9 2\n16 4\n0 10 10\n", "output": "NO\nN... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Queen of England has n trees... | [{"type": "stdin_stdout", "input": "50 5\n232 6 17 6 21 26 27 36 41 88 665 56 61 66 71 76 602 86 28 712 101 106 111 116 121 126 131 136 141 146 151 156 161 166 755 176 181 186 191 196 201 206 211 216 5 226 172 236 241 246\n", "output": "12\n- 1 231\n- 3 6\n+ 4 10\n+ 7 4\n- 10 42\n- 11 614\n- 17 521\n+ 19 63\n- 20 616\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\nVK news recommendation system da... | [{"type": "stdin_stdout", "input": "40\n19 20 8 13 13 17 1 14 15 20 14 17 2 9 9 10 19 16 6 12 9 7 20 5 12 6 4 4 12 5 4 11 8 1 2 8 11 19 18 4\n52258 5648 46847 9200 101064 79328 64407 54479 1788 60107 8234 64215 15419 84411 50307 78075 92548 17867 43456 7970 1390 99373 97297 90662 82950 678 79356 51351 2794 82477 16508 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given three strings A, B... | [{"type": "stdin_stdout", "input": "aaaaaaaaab aaaaaaaaaa aaaaaaaaab\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "baaaa`aaaa aabaaaaaaa aaaaa`aaab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "baaaaaaa`` `aaaaaabaa aaaaa`aaab", "output": "YES\n"}, {"type": "stdin_stdout", "input": "baaabaaa`` `a... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHarry Potter and He-Who-Must-Not... | [{"type": "stdin_stdout", "input": "1000\n148\n500\n", "output": "228.39506172839506\n"}, {"type": "stdin_stdout", "input": "425\n458\n118\n", "output": "337.93402777777777\n"}, {"type": "stdin_stdout", "input": "496\n326\n429\n", "output": "214.16688741721853\n"}, {"type": "stdin_stdout", "input": "745\n152\n417\n", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nI assume most of you are familia... | [{"input": "0", "output": "[0]", "fn_name": "squares_needed"}, {"input": "1", "output": "[1]", "fn_name": "squares_needed"}, {"input": "2", "output": "[2]", "fn_name": "squares_needed"}, {"input": "3", "output": "[2]", "fn_name": "squares_needed"}, {"input": "4", "output": "[3]", "fn_name": "squares_needed"}] | 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 problem consists of three s... | [{"type": "stdin_stdout", "input": "40 3\n1 62395\n5 40319\n4 165445\n10 137479\n10 47829\n8 9741\n5 148106\n10 25494\n18 162856\n2 106581\n0 194523\n9 148086\n1 100862\n6 147600\n6 107486\n6 166873\n7 16721\n4 22192\n0 8827\n1 197146\n10 8949\n0 150443\n9 148348\n3 143935\n1 139371\n7 128821\n10 107760\n4 141821\n1 35... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nElections are in progr... | [{"input": "[1, 3, 3, 1, 1]\n0", "output": "[0]", "fn_name": "elections_winners"}, {"input": "[5, 1, 3, 4, 1]\n0", "output": "[1]", "fn_name": "elections_winners"}, {"input": "[3, 1, 1, 3, 1]\n2", "output": "[2]", "fn_name": "elections_winners"}, {"input": "[2, 3, 5, 2]\n3", "output": "[2]", "fn_name": "elections_winne... | 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**Getting Familiar:**\nLEET: (so... | [{"input": "\"Do you also think these quotes are conflicting each other?\"", "output": "[\"\\u03b4\\u03b8 \\u03b3\\u03b8\\u03bc \\u03b1ls\\u03b8 \\u03c4h\\u03b9\\u03b7\\u03ba \\u03c4h\\u03b5s\\u03b5 q\\u03bc\\u03b8\\u03c4\\u03b5s \\u03b1\\u03c0\\u03b5 c\\u03b8\\u03b7fl\\u03b9c\\u03c4\\u03b9\\u03b7g \\u03b5\\u03b1ch \\u... | 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\nOur Chef is catering for a big c... | [{"type": "stdin_stdout", "input": "4\n38\n13\n31\n2", "output": "17\n12\n30\n1\n"}, {"type": "stdin_stdout", "input": "4\n38\n13\n16\n2", "output": "17\n12\n0\n1\n"}, {"type": "stdin_stdout", "input": "4\n131\n14\n1\n4", "output": "130\n5\n0\n0\n"}, {"type": "stdin_stdout", "input": "4\n19\n13\n16\n2", "output": "18\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\nPetya loves lucky numbers. We al... | [{"type": "stdin_stdout", "input": "10\n4 7 480392999\n3 4 32525297\n9 7 417904789\n6 2 836294777\n5 3 616099185\n1 7 1310915575\n8 10 838073755\n5 10 547050646\n2 1 12607780\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10\n4 7 480392999\n3 4 32525297\n9 7 417904789\n6 2 836294777\n5 3 616099185\n1 7 131091... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nThe island where JOI ... | [{"type": "stdin_stdout", "input": "13 21 1 1\n1001 6000\n11\n4 2\n3 7\n2 4\n8 8\n8 4\n2 10\n3 4\n6 7\n7 10\n10 11\n5 9\n11 10\n3 6\n4 5\n1 6\n13 12\n6 7\n8 11\n6 13\n7 8\n2 12", "output": "1001\n"}, {"type": "stdin_stdout", "input": "13 21 1 1\n1010 10247\n7\n1 2\n3 7\n2 4\n5 8\n8 9\n2 5\n3 4\n4 7\n9 10\n10 11\n9 9\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\nVasya decided to go to the groce... | [{"type": "stdin_stdout", "input": "7\n1 1\n4 0\n0 2\n0 0\n2314 2374\n0 0\n1 1\n", "output": "4\n5\n1\n1\n7063\n1\n4\n"}, {"type": "stdin_stdout", "input": "5\n1 1\n4 0\n0 2\n0 0\n2314 2374\n", "output": "4\n5\n1\n1\n7063\n"}, {"type": "stdin_stdout", "input": "1\n1123112 1221133\n", "output": "3565379\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\nYou have a digit sequence S of l... | [{"type": "stdin_stdout", "input": "0112\n", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "0101\n", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "1211", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "1204", "output": "AMBIGUOUS\n"}, {"type": "stdin_stdout", "input": "0112", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 program tests the life of a... | [{"input": "10\n10\n10", "output": "[22]", "fn_name": "evaporator"}, {"input": "47.5\n8\n8", "output": "[31]", "fn_name": "evaporator"}, {"input": "100\n1\n1", "output": "[459]", "fn_name": "evaporator"}, {"input": "100\n1\n5", "output": "[299]", "fn_name": "evaporator"}, {"input": "10\n10\n5", "output": "[29]", "fn_na... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\n-1\n3 111\n-1\n9", "output": "113\n2\n"}, {"type": "stdin_stdout", "input": "2\n-1\n3 101\n-1\n9", "output": "103\n2\n"}, {"type": "stdin_stdout", "input": "2\n-2\n2 25\n-2\n16", "output": "27\n2\n"}, {"type": "stdin_stdout", "input": "2\n-1\n3 12\n-1\n9", "output": "14\n2\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\nAccording to a new ISO standard,... | [{"type": "stdin_stdout", "input": "20 19\n1111111111111111111\n8247715032316286876\n0000001000000000000\n4784876473600342372\n1111111111111111111\n2222222222222222222\n4444444444444444444\n5555555555555555555\n0000000000000000010\n4444444444444444444\n0000000000000000000\n5555555555555555555\n11500026576261848309\n999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 play the game of throne... | [{"type": "stdin_stdout", "input": "20 53\n1 2\n1 4\n1 5\n1 6\n1 7\n1 8\n1 20\n2 3\n2 6\n2 16\n2 17\n3 6\n3 18\n3 20\n4 6\n4 7\n4 8\n4 18\n4 14\n4 18\n5 11\n5 16\n5 17\n2 18\n5 19\n6 8\n6 13\n7 8\n7 10\n7 15\n7 17\n14 18\n8 15\n8 16\n4 10\n17 15\n10 11\n10 17\n10 20\n11 15\n11 17\n12 14\n12 15\n12 16\n16 19\n14 16\n14 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 strings $S$ and $T... | [{"type": "stdin_stdout", "input": "7\nabacaba\nabc\ncccba\nacb\ndbsic\nbac\nabracadabra\nabc\ndddddddddddd\ncba\nbbc\nabc\nac\nabc\n", "output": "aaaacbb\nabccc\nbcdis\naaaaacbbdrr\ndddddddddddd\nbbc\nac\n"}, {"type": "stdin_stdout", "input": "7\nabacaba\nabc\ncccba\nacb\ndbsic\nbac\nabracadabra\nabc\ndddddddddddd\ncb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a program that calculates... | [{"type": "stdin_stdout", "input": "35.997652258458864 139.77 51.15 361.449066466584\n1.6512558665331527 105.35573273382599 41.78 272.61282853754\n51.62303215206055 360.59086045680647 -34.03891385785915 302.61951676416413\n-1 -1 -1 -1", "output": "9516\n15035\n11082\n"}, {"type": "stdin_stdout", "input": "36.4199056430... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVova promised himself that he wo... | [{"type": "stdin_stdout", "input": "10 5\n1 6 2 11 3 8 4 9 5 10\n1 2\n3 5\n5 6\n7 10\n9 10\n", "output": "27\n"}, {"type": "stdin_stdout", "input": "10 3\n1 6 2 27 1 8 1 9 5 1\n1 2\n3 1\n10 6\n7 8\n17 10\n", "output": "45\n"}, {"type": "stdin_stdout", "input": "10 3\n1 6 2 17 1 8 1 9 5 1\n1 2\n3 1\n10 6\n7 8\n17 10\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\nIvan recently bought a detective... | [{"type": "stdin_stdout", "input": "17\n15 4 3 6 5 11 8 8 9 10 15 12 13 14 17 16 17\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "17\n16 4 3 6 7 6 10 8 9 10 11 12 13 14 15 16 17\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "17\n9 4 3 6 7 6 10 8 9 10 11 12 13 14 15 16 17\n", "output": "8\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\nIn this kata, the number 0 is in... | [{"input": "[0, 1, 1, 1, 0]", "output": "[2]", "fn_name": "infected_zeroes"}, {"input": "[1, 1, 0, 1, 1]", "output": "[2]", "fn_name": "infected_zeroes"}, {"input": "[0, 1, 1, 0]", "output": "[1]", "fn_name": "infected_zeroes"}, {"input": "[0, 1, 1, 1]", "output": "[3]", "fn_name": "infected_zeroes"}, {"input": "[1, 1,... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet x be a string of length at l... | [{"type": "stdin_stdout", "input": "bcbc\n", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "aab\n", "output": "1\n1\n"}, {"type": "stdin_stdout", "input": "ddd\n", "output": "3\n1\n"}, {"type": "stdin_stdout", "input": "adad", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "bbcc", "output": "1\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\nKolya got an integer array $a_1,... | [{"type": "stdin_stdout", "input": "100\n-6 2 8 -9 -9 3 -3 -2 7 3 2 -2 -9 -7 -10 -9 10 4 5 -9 8 -5 7 -2 6 -2 4 4 -2 -5 6 4 8 -8 9 7 -4 2 -3 7 4 -10 -7 -4 8 2 10 -8 -3 -8 -5 -5 -10 -6 -8 -5 7 -1 7 -5 9 10 3 5 10 -7 -3 -7 1 -5 -8 5 1 -1 4 10 2 6 -4 9 3 10 -5 -10 -10 -2 1 9 10 1 10 2 8 -3 -3 -1 7 -5 8 -4\n", "output": "11... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGargari got bored to play with t... | [{"type": "stdin_stdout", "input": "41 4\n24 15 17 35 13 41 4 14 23 5 8 16 21 18 30 36 6 22 11 29 26 1 40 31 7 3 32 10 28 38 12 20 39 37 34 19 33 27 2 25 9\n22 13 25 24 38 35 29 12 15 8 11 37 3 19 4 23 18 32 30 40 36 21 16 34 27 9 5 41 39 2 14 17 31 33 26 7 1 10 20 6 28\n31 27 39 16 22 12 13 32 6 10 19 29 37 7 18 33 24... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAll cinema halls in Berland are ... | [{"type": "stdin_stdout", "input": "100 67\n66 12 2 49 62 63 59 14 13 26 15 25 22 16 33 17 15 14 13 33 9 10 53 28 17 27 18 39 35 64 1 59 33 24 66 64 4 2 4 5 22 9 52 36 44 57 62 3 52 21 62 55 25 2 65 18 20 40 8 30 27 28 47 19 67 67 42 6 53 17 36 38 57 37 45 13 58 12 31 24 15 67 9 18 56 20 34 8 20 31 13 19 42 12 16 15 54... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 palindrome is a string that re... | [{"type": "stdin_stdout", "input": "6\ncbabc\nab\nzza\nba\na\nnutforajaroftuna\n", "output": "\nYES\ncbabac\nYES\naab\nYES\nzaza\nYES\nbaa\nNO\nYES\nnutforajarofatuna\n"}, {"type": "stdin_stdout", "input": "6\ncbabc\nab\nzza\nba\na\nnutforajaroftuna\n", "output": "YES\ncbabca\nYES\naab\nYES\nzzaa\nYES\nbaa\nNO\nYES\nnu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 hard times now. Today Petya... | [{"type": "stdin_stdout", "input": "k\n*\n89\nb\ncbbbc\ncabac\nbccbb\nccc\ncabaa\nabbaa\nccbaa\nccccb\ncabbb\nbbcbc\nbac\naaac\nabb\nbcbb\ncb\nbacc\nbbaba\nb\nacc\nbaac\naaba\nbcbba\nbaa\nbc\naaccb\nb\nab\nc\nbbbb\nabbcb\nacbb\ncba\nc\nbac\nc\nac\ncc\nb\nbbc\nbaab\nc\nbbc\nab\nb\nc\naa\naab\nab\naccbc\nacbaa\na\nccc\nc... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFailed Filter - Bug Fixing #3\nO... | [{"input": "\"aa1bb2cc3dd\"", "output": "[\"aabbccdd\"]", "fn_name": "filter_numbers"}, {"input": "\"CodeWars\"", "output": "[\"CodeWars\"]", "fn_name": "filter_numbers"}, {"input": "\"test123\"", "output": "[\"test\"]", "fn_name": "filter_numbers"}, {"input": "\"a1b2c3\"", "output": "[\"abc\"]", "fn_name": "filter_num... | 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\nFrom \"ftying rats\" to urban sa... | [{"type": "stdin_stdout", "input": "10\n9 16 19 23 7 14 21 15 14 6\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "10\n5 20 18 1 12 17 22 20 26 4\n", "output": "21\n"}, {"type": "stdin_stdout", "input": "10\n9 16 19 23 7 14 21 15 14 6\n", "output": "23\n"}, {"type": "stdin_stdout", "input": "10\n5 20 18 1 12 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is an integer sequence of ... | [{"type": "stdin_stdout", "input": "6\n680824625 680824626 680824626 680824624 680824626 680824624\n", "output": "655804632\n"}, {"type": "stdin_stdout", "input": "6\n612348318 612348320 612348320 612348319 612348318 612348317\n", "output": "110656261\n"}, {"type": "stdin_stdout", "input": "6\n101617840 101617840 10161... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "50 25\n199970 199997 199998 199988 199999 199981 200000 199990 199974 199985 199932 200000 199966 199999 199999 199951 199983 199975 199974 199996 199974 199992 199979 199995 199955 199989 199960 199975 199983 199990 199950 199952 199999 199999 199962 199939 199979 199977 199962 1999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 courier charges for a courie... | [{"type": "stdin_stdout", "input": "2\n86 25 5 5\n135 60 10 30\n3\n10 8 25 24\n5 16 13 9\n30 30 30 14\n0", "output": "1200\n3800\n"}, {"type": "stdin_stdout", "input": "2\n51 0 5 15\n107 60 3 30\n3\n10 15 25 47\n2 12 12 3\n30 30 11 11\n0", "output": "1200\n2000\n"}, {"type": "stdin_stdout", "input": "2\n50 34 5 5\n80 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\nIn this Kata, we are going to de... | [{"input": "\"aabbccddd\"", "output": "[true]", "fn_name": "solve"}, {"input": "\"aaabcde\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"aabbcc\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"aaaabb\"", "output": "[false]", "fn_name": "solve"}, {"input": "\"abbccc\"", "output": "[false]", "fn_nam... | 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\nVlad likes to eat in cafes very ... | [{"type": "stdin_stdout", "input": "8\n200000 1 200000 1 200000 1 200000 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "8\n200000 1 200000 1 200000 1 200000 2\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "5\n100 1000 1000 1000 1000\n", "output": "100\n"}, {"type": "stdin_stdout", "input": "5\n100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAquaMoon has $n$ friends. They s... | [{"type": "stdin_stdout", "input": "10\n10\n6 2 1 1 1 10 10 2 10 5\n8\n1 3 1 1 4 5 4 4\n9\n14 6 9 9 2 8 7 2 2\n10\n9 4 3 3 5 4 3 10 4 5\n9\n7 5 1 7 5 5 5 5 6\n8\n8 8 4 4 7 6 2 8\n10\n6 8 1 6 8 8 5 6 8 4\n10\n5 5 5 8 3 4 3 3 10 10\n8\n1 1 3 6 6 7 1 2\n8\n4 1 3 5 3 1 3 3\n", "output": "NO\nYES\nYES\nYES\nYES\nYES\nYES\nY... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Two-dimensional kingdom is g... | [{"type": "stdin_stdout", "input": "33 23 17 2\n1 1 2 2 2 3 3 3 3 3 3 4 4 4 4 4 5 5 5 6 6 7 7 7 8 8 8 8 8 9 9 10 10\n1 1 3 3 4 4 4 5 5 6 6 6 7 8 8 8 8 8 8 9 9 10 10\n", "output": "23\n1 1\n2 2\n3 3\n4 4\n5 5\n6 6\n7 7\n8 8\n9 9\n12 10\n13 11\n14 12\n17 13\n20 14\n21 15\n22 16\n23 17\n24 18\n25 19\n26 20\n27 21\n28 22\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn some other world, today is th... | [{"type": "stdin_stdout", "input": "10\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n", "output": "95000\n"}, {"type": "stdin_stdout", "input": "10\n8830\n106\n9248\n6388\n3562\n7160\n8452\n3486\n5802\n9228\n", "output": "57638\n"}, {"type": "stdin_stdout", "input": "9\n6126\n5482\n9198\n9274\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# Scenario \n\nWith **_Cereal cr... | [{"input": "[-16, 44, -7, -31, 9, -43, -44, -18, 50, 39, -46, -24, 3, -34, -27]", "output": "[[-16, -27, -7, -31, -34, -43, -44, -18, -24, -46, 39, 50, 3, 9, 44]]", "fn_name": "wheat_from_chaff"}, {"input": "[-17, 7, -12, 10, 4, -8, -19, -24, 40, 31, -29, 21, -45, 1]", "output": "[[-17, -45, -12, -29, -24, -8, -19, 4, ... | 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\nWelcome young Jedi! In this Kata... | [{"input": "100", "output": "[{\"Nickels\": 0, \"Pennies\": 0, \"Dimes\": 0, \"Quarters\": 4}]", "fn_name": "loose_change"}, {"input": "7.9", "output": "[{\"Nickels\": 1, \"Pennies\": 2, \"Dimes\": 0, \"Quarters\": 0}]", "fn_name": "loose_change"}, {"input": "56", "output": "[{\"Nickels\": 1, \"Pennies\": 1, \"Dimes\":... | 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\nMahmoud has an array a consistin... | [{"type": "stdin_stdout", "input": "10\n5 3 2 2 3 3 3 4 2 5\n", "output": "5 3 2 7 11 13 17 19 23 29 "}, {"type": "stdin_stdout", "input": "10\n5 3 2 2 3 3 3 4 2 5\n", "output": "5 3 2 7 11 13 17 19 23 29 "}, {"type": "stdin_stdout", "input": "10\n5 3 4 2 3 3 3 4 2 5\n", "output": "5 3 4 7 11 13 17 19 23 29\n"}, {"type... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two positive integ... | [{"input": "4\n16", "output": "[2]", "fn_name": "operation"}, {"input": "1\n1", "output": "[0]", "fn_name": "operation"}, {"input": "2\n4", "output": "[1]", "fn_name": "operation"}, {"input": "3\n8", "output": "[4]", "fn_name": "operation"}, {"input": "4\n1", "output": "[2]", "fn_name": "operation"}, {"input": "1\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\nDreamoon likes sequences very mu... | [{"type": "stdin_stdout", "input": "10\n1 1100000000\n2 1587398050\n4 99999998\n4 9999997\n5 999996\n10 99995\n9 9994\n8 1104\n12 92\n19 1\n", "output": "1\n3\n11\n11\n17\n119\n89\n59\n87\n0\n"}, {"type": "stdin_stdout", "input": "10\n1 1100000000\n2 1587398050\n3 99999998\n4 9999997\n5 999996\n18 99995\n9 9994\n8 1104... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 PC Koshien, players. ... | [{"type": "stdin_stdout", "input": "30 20\n55 0\n32 18\n2 23\n43 21\n34 10\n20 -13", "output": "10\n55\n14\n-21\n22\n24\n33\n"}, {"type": "stdin_stdout", "input": "30 19\n39 20\n19 18\n4 20\n22 21\n23 10\n10 -10", "output": "11\n19\n1\n-16\n1\n13\n20\n"}, {"type": "stdin_stdout", "input": "30 19\n39 20\n19 18\n4 20\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\nLittle Chris is a huge fan of li... | [{"type": "stdin_stdout", "input": "5\n1 0 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n0 1 0 1 0\n1 0 1 0 1\n7\n3\n2 4\n1 3\n3\n2 5\n1 2\n3\n", "output": "111\n"}, {"type": "stdin_stdout", "input": "5\n1 0 1 1 1\n0 1 0 1 0\n1 0 1 1 1\n0 1 0 1 0\n1 0 1 0 0\n7\n3\n2 4\n1 3\n3\n2 5\n1 1\n3\n", "output": "000\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 are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "10\npaxghjnihn\nhn\nhdmevxvn\nn\nazdfhfxem\nxem\neowhldode\ndode\nwlclsnht\nct\nbpflheocamv\nv\nflejfh\nhixqqbnikthccagc\ndugt\neebmbpykcsmi\noivgrzwppny\nzhfyiuu\nebkqjcbcwviqkojnzyruwygtbvwws\nbofzr\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_st... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nConsider a sequence generation t... | [{"input": "10000", "output": "[4721110]", "fn_name": "solve"}, {"input": "1000", "output": "[63589]", "fn_name": "solve"}, {"input": "100", "output": "[993]", "fn_name": "solve"}, {"input": "25", "output": "[107]", "fn_name": "solve"}, {"input": "50", "output": "[304]", "fn_name": "solve"}, {"input": "7", "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\nThe only difference between easy... | [{"type": "stdin_stdout", "input": "50 25\n199970 199997 199998 199988 199999 199981 200000 199990 199974 199985 199932 200000 199966 199999 199999 199951 199983 199975 199974 199996 199974 199992 199979 199995 199955 199989 199960 199975 199983 199990 199950 199952 199999 199999 199962 199939 199979 199977 199962 1999... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 people choose to obfuscate ... | [{"input": "\"Hmm, this would be better with input validation...!\"", "output": "[\"Hmm, this would be better with input validation [dot] [dot] [dot] !\"]", "fn_name": "obfuscate"}, {"input": "\"jim.kuback@ennerman-hatano.com\"", "output": "[\"jim [dot] kuback [at] ennerman-hatano [dot] com\"]", "fn_name": "obfuscate... | 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\nSquirrel Liss is interested in s... | [{"type": "stdin_stdout", "input": "49\n10 34 58 72 126 166 176 180 198 200 208 228 238 248 302 332 340 344 350 354 380 406 418 428 438 442 482 532 536 544 546 554 596 626 642 682 684 704 714 792 804 820 862 880 906 946 954 966 970\n", "output": "49\n"}, {"type": "stdin_stdout", "input": "49\n10 34 58 72 126 166 176 18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 your arrows\nYou have a qu... | [{"input": "[{\"range\": 5}, {\"range\": 10, \"damaged\": true}, {\"damaged\": true}]", "output": "[true]", "fn_name": "any_arrows"}, {"input": "[{\"range\": 5, \"damaged\": false}, {\"range\": 15, \"damaged\": true}]", "output": "[true]", "fn_name": "any_arrows"}, {"input": "[{\"range\": 10, \"damaged\": true}, {\"dam... | 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 array $a_1, a_2... | [{"type": "stdin_stdout", "input": "3\n7\n4 6 11 11 15 18 20\n4\n10 10 10 11\n3\n1 1 1000000000\n", "output": "1 2 7\n-1\n1 2 3\n"}, {"type": "stdin_stdout", "input": "3\n7\n4 6 11 11 15 18 20\n4\n10 10 10 11\n3\n1 1 1000000000\n", "output": "1 2 7\n-1\n1 2 3\n"}, {"type": "stdin_stdout", "input": "3\n7\n4 6 11 11 15 1... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.