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\nWrite a function that takes two ... | [{"input": "[\"tartar\", \"blanket\", \"domino\"]\n[\"blanket\"]", "output": "[[\"tartar\", \"domino\"]]", "fn_name": "hot_singles"}, {"input": "[10, 200, 30]\n[10, 20, 3, 4, 5, 5, 5, 200]", "output": "[[30, 20, 3, 4, 5]]", "fn_name": "hot_singles"}, {"input": "[77, \"basketweave\"]\n[78, 42, \"basketweave\"]", "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\n# Summation\n\nWrite a program t... | [{"input": "213", "output": "[22791]", "fn_name": "summation"}, {"input": "100", "output": "[5050]", "fn_name": "summation"}, {"input": "22", "output": "[253]", "fn_name": "summation"}, {"input": "8", "output": "[36]", "fn_name": "summation"}, {"input": "1", "output": "[1]", "fn_name": "summation"}] | 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\nHofstadter sequences are a famil... | [{"input": "1000", "output": "[502]", "fn_name": "hofstadter_Q"}, {"input": "100", "output": "[56]", "fn_name": "hofstadter_Q"}, {"input": "10", "output": "[6]", "fn_name": "hofstadter_Q"}, {"input": "1", "output": "[1]", "fn_name": "hofstadter_Q"}, {"input": "3", "output": "[2]", "fn_name": "hofstadter_Q"}, {"input": ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe city of Kyoto is well-known ... | [{"type": "stdin_stdout", "input": "7\nShijo-Kawaramachi\nKarasuma-Imadegawa\nKawaramachi-Imadegawa\nNishioji-Shijo\nKarasuma-Gojo\nTorimaru-Rokujo\nRokujo-Karasuma\n6\nShijo-Karasuma\nImadegawa-Nishioji\nNishioji-Gojo\nShijo-Torimaru\nTorimaru-Gojo\nShijo-Kawabata\n4\n1jo-Midosuji\nMidosuji-2jo\n2jo-Omotesando\nOmotes... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 time polar bears Menshykov ... | [{"type": "stdin_stdout", "input": "19\n895 1302 724 952 340 952 939 1302 724 952 939 340 340 1844 770 976 435 1302 1302\n", "output": "YES\n5 12 13 17 3 9 15 1 7 11 4 6 10 16 2 8 18 19 14\n12 5 13 17 3 9 15 1 7 11 4 6 10 16 2 8 18 19 14\n12 13 5 17 3 9 15 1 7 11 4 6 10 16 2 8 18 19 14\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\nWe have N cards. A number a_i is... | [{"type": "stdin_stdout", "input": "4\n20 18 2 18\n", "output": "18\n"}, {"type": "stdin_stdout", "input": "4\n20 18 2 12", "output": "12\n"}, {"type": "stdin_stdout", "input": "4\n139 4 2 5", "output": "136\n"}, {"type": "stdin_stdout", "input": "4\n139 1 2 5", "output": "135\n"}, {"type": "stdin_stdout", "input": "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\nIn this Kata, you will be given ... | [{"input": "1284569\n1", "output": "[\"124569\"]", "fn_name": "solve"}, {"input": "1284569\n2", "output": "[\"12456\"]", "fn_name": "solve"}, {"input": "123056\n1", "output": "[\"12056\"]", "fn_name": "solve"}, {"input": "1284569\n3", "output": "[\"1245\"]", "fn_name": "solve"}, {"input": "123056\n2", "output": "[\"105... | 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\nEach employee of the \"Blake Tec... | [{"type": "stdin_stdout", "input": "28 7\n1-a 1-b 1-c 1-d 1-e 1-f 1-t 1-a 1-b 1-c 1-d 1-e 1-f 1-j 1-a 1-b 1-c 1-d 1-e 1-f 1-g 1-a 1-b 1-c 1-d 1-e 1-f 2-g\n1-a 1-b 1-c 1-d 1-e 1-f 1-g\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "28 7\n1-a 1-b 1-c 1-d 1-e 1-f 1-t 1-a 1-b 1-c 1-d 1-e 1-f 1-j 1-a 1-b 1-c 1-d 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\nYou will be given a fruit which ... | [{"input": "[[\"orange\", \"apple\"], [\"pear\", \"orange\"], [\"apple\", \"pear\"]]\n\"apple\"", "output": "[[\"sell\", \"sell\", \"sell\"]]", "fn_name": "buy_or_sell"}, {"input": "[[\"apple\", \"orange\"], [\"pear\", \"orange\"], [\"apple\", \"pear\"]]\n\"apple\"", "output": "[[\"buy\", \"sell\", \"sell\"]]", "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\nSergey attends lessons of the N-... | [{"type": "stdin_stdout", "input": "ttspivgoupgupvgpusvppogsseueusuglpiugssviuutlvgvugtpovuvspvpipggooplgvgugpogvesppulovugsvuougveiivgvslllviogpvtolepglguuellotpvgevspvoiiggiiplppgosuguvtstttpielteuglspgeoeeuivtptggltoltpgliviotsospvitupiopisoetupvvspooilsopslpoloptigstspoiuutiuvvuvlpplvioitsuvlpvtleveslslovolloogsgpv... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nAs shown in the fig... | [{"type": "stdin_stdout", "input": "4\n-2 1\n9 2\n3 5\n0 1\n2\n1 1 1 9\n-1 15 -1 0", "output": "0.257575758\n15.545454545\n"}, {"type": "stdin_stdout", "input": "4\n-1 1\n9 1\n2 5\n0 3\n2\n1 1 1 9\n0 15 -1 0", "output": "3.500000000\n20.994871795\n"}, {"type": "stdin_stdout", "input": "4\n-1 1\n9 1\n2 5\n0 3\n2\n1 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\nThere is a string s of length 3 ... | [{"type": "stdin_stdout", "input": "bceab", "output": "Second\n"}, {"type": "stdin_stdout", "input": "bacba", "output": "First\n"}, {"type": "stdin_stdout", "input": "badba", "output": "First\n"}, {"type": "stdin_stdout", "input": "cadba", "output": "First\n"}, {"type": "stdin_stdout", "input": "dadba", "output": "Firs... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 received a positive intege... | [{"type": "stdin_stdout", "input": "1000010000000", "output": "2716922731275\n"}, {"type": "stdin_stdout", "input": "1000011000000", "output": "3307289212967\n"}, {"type": "stdin_stdout", "input": "1100011000000", "output": "2999416055122\n"}, {"type": "stdin_stdout", "input": "1110011000000", "output": "3146654438234\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 shop sells N kinds of fruits, ... | [{"type": "stdin_stdout", "input": "1000 1000\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 1000 1000 1000 1000 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe need to write some code to re... | [{"input": "458.2\n17.13", "output": "[552.91]", "fn_name": "discover_original_price"}, {"input": "373.85\n11.2", "output": "[421]", "fn_name": "discover_original_price"}, {"input": "75.75\n25", "output": "[101]", "fn_name": "discover_original_price"}, {"input": "75\n25", "output": "[100]", "fn_name": "discover_origina... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven few numbers, you need to p... | [{"input": "1\n11\n111\n1111\n11111", "output": "[\"023456789\"]", "fn_name": "unused_digits"}, {"input": "364\n500\n715\n730", "output": "[\"289\"]", "fn_name": "unused_digits"}, {"input": "864\n896\n744", "output": "[\"01235\"]", "fn_name": "unused_digits"}, {"input": "93\n10\n11\n40", "output": "[\"25678\"]", "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\nEach year in the castle of Dwarv... | [{"type": "stdin_stdout", "input": "10 6 1 48\n239 632\n976 315\n797 112\n1 835\n938 862\n531 884\n422 607\n152 331\n413 677\n622 978\n", "output": "5 3788.56\n10 3673.36\n2 3360.12\n6 3289.08\n4 2606.20\n3 2598.64\n9 2525.24\n7 2315.84\n1 2210.84\n8 1184.72\n"}, {"type": "stdin_stdout", "input": "10 6 1 41\n239 632\n9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImagine that you have a twin bro... | [{"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\nThis kata is blatantly copied f... | [{"input": "\"String for test: incommensurability\"\n1", "output": "[\"ySttirliinbga rfuosrn etmemsotc:n i\"]", "fn_name": "string_func"}, {"input": "\"This is a string exemplification!\"\n0", "output": "[\"This is a string exemplification!\"]", "fn_name": "string_func"}, {"input": "\"this_test_will_hurt_you\"\n1234567... | 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 quite ordinary day Valera we... | [{"type": "stdin_stdout", "input": "1000000000 2000000000 2\n", "output": "500000001\n"}, {"type": "stdin_stdout", "input": "200000000 2000000000 1800000011\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "1500000000 2000000000 11\n", "output": "10389612\n"}, {"type": "stdin_stdout", "input": "1100000000 200000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nServal is fighting with a monste... | [{"type": "stdin_stdout", "input": "10000 1\n", "output": "10000\n"}, {"type": "stdin_stdout", "input": "10000 10000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "11000 1", "output": "11000\n"}, {"type": "stdin_stdout", "input": "10010 1", "output": "10010\n"}, {"type": "stdin_stdout", "input": "10001 1", "o... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA **pandigital number** is one t... | [{"input": "1750\n3\n5", "output": "[[[13, 2197], [17, 4913], [18, 5832], [19, 6859], [21, 9261]]]", "fn_name": "pow_root_pandigit"}, {"input": "1728\n3\n4", "output": "[[[13, 2197], [17, 4913], [18, 5832], [19, 6859]]]", "fn_name": "pow_root_pandigit"}, {"input": "388\n2\n3", "output": "[[[23, 529], [24, 576], [25, 62... | 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 of n inte... | [{"type": "stdin_stdout", "input": "85\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 72 67 68 69 70 71 72 73 74 119 76 77 78 79 80 81 82 83 84 1\n", "output": "84\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\nAlice and Bob play ping-pong wit... | [{"type": "stdin_stdout", "input": "12\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n", "output": "0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n0 1\n1 1\n0 7\n"}, {"type": "stdin_stdout", "input": "12\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n1 1\n2 1\n1 7\n", "output": "0 1\n1 1\n0 7\n0 1\n1 1\n0 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\nProgrammer Vasya is studying a n... | [{"type": "stdin_stdout", "input": "10\ntypedef &void**** youdyfpinzk\ntypeof &youdyfpinzk***\ntypedef &&&&youdyfpinzk****** nfbsgpjzhxzskmxc\ntypeof nfbsgpjzhxzskmxc***\ntypedef &&&void*** puerqioirikxej\ntypeof &puerqioirikxej********\ntypedef &puerqioirikxej******** xzgzsamjdufuyxz\ntypeof &xzgzsamjdufuyxz******\nty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 cats. We number them... | [{"type": "stdin_stdout", "input": "5\n3 4 3 4 3", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "5\n3 4 3 3 3", "output": "No\n"}, {"type": "stdin_stdout", "input": "4\n1 0 -1 2", "output": "No\n"}, {"type": "stdin_stdout", "input": "4\n1 0 -1 3", "output": "No\n"}, {"type": "stdin_stdout", "input": "4\n1 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\nOur friendly friend Pete is real... | [{"input": "\"What the hell am I doing here? And where is my wallet? PETE SMASH!\"", "output": "[\"W**t t*e h**l am i d***g h**e? A*d w***e is my w****t? P**e s***h!\"]", "fn_name": "pete_talk"}, {"input": "\"I want to punch someone in the face\"\n[\"drink\", \"job\", \"girls\"]", "output": "[\"I w**t to p***h s*****e ... | 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\nStepan had a favorite string s w... | [{"type": "stdin_stdout", "input": "200\n200 180 160 140 122 106 92 79 69 60 52 45 38 32 26 20 14 8 4 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is the easy version of the ... | [{"type": "stdin_stdout", "input": "100\n92 42 58 62 24 59 62 100 92 62 54 100 62 82 91 62 100 100 62 100 100 62 92 92 92 62 92 92 62 92 62 92 88 100 100 36 62 92 16 92 62 100 62 92 35 62 100 92 92 62 93 100 100 62 76 100 62 62 92 62 92 50 100 8 7 62 100 18 92 62 92 92 100 62 32 92 92 62 37 76 100 39 62 92 62 41 62 62 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 consist... | [{"type": "stdin_stdout", "input": "12\n12 3\nzazasqzqsasq\n1 2\ny\n1 1\na\n15 5\nabccbaabccbazaa\n16 8\ncadjfdsljfdkljds\n6 2\nbaazaa\n6 3\nbosszb\n6 1\nqwerty\n7 7\ndaaaaaa\n14 2\nacabcbdeffewzc\n18 6\nzzzzzzzzzzzzyyyyyz\n9 4\naabaabbbc\n", "output": "zazasqzqsasq\n-1\na\nabccbaabccbbaac\ncbbbbbbbbccccccc\nbaazbz\nbp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 the easy version of the ... | [{"type": "stdin_stdout", "input": "100\n45 21 34 56 15 0 46 59 40 39 78 83 29 77 19 30 60 39 90 64 11 47 10 47 35 79 30 13 21 31 26 68 0 67 52 43 29 94 100 76 16 61 74 34 62 63 4 41 78 31 77 21 90 2 43 70 53 15 53 29 47 87 33 20 23 30 55 57 13 25 19 89 10 17 92 24 47 6 4 91 52 9 11 25 81 14 82 75 46 49 66 62 28 84 88 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 must pay exactly $n$ bu... | [{"type": "stdin_stdout", "input": "6\n1001\n42\n0\n131\n1000101010\n12\n", "output": "333 334\n14 14\n0 0\n43 44\n333367004 333367003\n4 4\n"}, {"type": "stdin_stdout", "input": "6\n1001\n42\n0\n131\n1000101010\n0\n", "output": "333 334\n14 14\n0 0\n43 44\n333367004 333367003\n0 0\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\nConsider integer coordinates x, ... | [{"input": "4000", "output": "[21341334000]", "fn_name": "sumin"}, {"input": "730", "output": "[129938905]", "fn_name": "sumin"}, {"input": "365", "output": "[16275715]", "fn_name": "sumin"}, {"input": "100", "output": "[338350]", "fn_name": "sumin"}, {"input": "15", "output": "[1240]", "fn_name": "sumin"}, {"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\nThere is a rectangular grid of n... | [{"type": "stdin_stdout", "input": "50 8\n.....#..\n........\n........\n.....#..\n.....#..\n........\n........\n........\n........\n...#....\n...#....\n........\n...#....\n#.#.#...\n...#....\n...#....\n........\n...#....\n...#....\n...#....\n........\n#.#.#...\n.....#..\n........\n#.#.#...\n#.#.#...\n#.#.#...\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\nVova decided to clean his room. ... | [{"type": "stdin_stdout", "input": "5 8\n5 1 2 4 3\n0 1\n0 2\n0 3\n0 4\n0 5\n1 1000000000\n1 1\n1 500000000\n", "output": "3\n2\n1\n0\n0\n0\n0\n0\n499999999\n"}, {"type": "stdin_stdout", "input": "5 8\n5 1 2 4 3\n0 1\n0 2\n0 3\n0 4\n0 5\n1 1000000000\n1 1\n1 500000000\n", "output": "3\n2\n1\n0\n0\n0\n0\n0\n499999999\n"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an easier version of the... | [{"type": "stdin_stdout", "input": "100 0\n6 7 100 8 5 61 5 75 59 65 51 47 83 37 34 54 87 46 4 26 21 87 12 97 86 68 60 11 62 76 14 83 29 31 91 62 57 80 47 75 85 97 62 77 91 86 14 25 48 77 83 65 39 61 78 77 45 46 90 74 100 91 86 98 55 5 84 42 91 69 100 4 74 98 60 37 75 44 41 12 15 34 36 1 99 16 7 87 36 26 79 42 41 84 17... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nThe game of Berland poker is pla... | [{"type": "stdin_stdout", "input": "4\n8 3 2\n4 2 4\n12 6 3\n42 0 7\n", "output": "3\n0\n3\n0\n"}, {"type": "stdin_stdout", "input": "4\n12 3 2\n4 2 4\n9 6 3\n42 0 7\n", "output": "3\n0\n1\n0\n"}, {"type": "stdin_stdout", "input": "4\n8 1 2\n4 2 4\n12 6 3\n66 0 7\n", "output": "1\n0\n3\n0\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\nGiven an array of integer $a_1, ... | [{"type": "stdin_stdout", "input": "5\n3\n1 2 5\n1 2 5\n2\n2 2\n1 3\n4\n3 4 1 2\n6 4 2 5\n3\n2 4 1\n4 5 3\n5\n1 2 3 4 5\n6 5 6 7 6\n", "output": "YES\nNO\nNO\nNO\nYES\n"}, {"type": "stdin_stdout", "input": "1\n4\n1 1 1 1\n40000000 40000000 40000000 40000000\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "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\nOne day, Chef prepared D brand n... | [{"type": "stdin_stdout", "input": "3\naba\nabac\nabcd\n", "output": "YES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "3\ncdd\n_a_a\n_ed[", "output": "YES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "3\naba\nabac\naacd", "output": "YES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "3\nfda\n`a`a\nb`Ze", "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\nA sequence of square brackets is... | [{"type": "stdin_stdout", "input": "100\n[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]\n", "output": "+- -+\n|+- ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$, cons... | [{"type": "stdin_stdout", "input": "5\n3\n1 3 2\n0 0 0\n4\n2 -3 4 -1\n1 1 1 1\n7\n-8 4 -2 -6 4 7 1\n1 0 0 0 1 1 0\n5\n0 1 -4 6 3\n0 0 0 1 1\n6\n-1 7 10 4 -8 -1\n1 0 0 0 0 1\n", "output": "3 2 1 \n2 -3 4 -1 \n-8 4 1 -2 4 7 -6 \n1 0 -4 6 3 \n-1 10 7 4 -8 -1 \n"}, {"type": "stdin_stdout", "input": "5\n3\n1 3 2\n0 0 0\n4\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\nGiven is a string S consisting o... | [{"type": "stdin_stdout", "input": "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn a building where Polycarp liv... | [{"type": "stdin_stdout", "input": "50 70\n3 3\n80 80\n23 23\n11 11\n87 87\n7 7\n63 63\n61 61\n67 67\n53 53\n9 9\n43 43\n55 55\n27 27\n5 5\n1 1\n99 99\n65 65\n37 37\n60 60\n32 32\n38 38\n81 81\n2 2\n34 34\n17 17\n82 82\n26 26\n71 71\n4 4\n16 16\n19 19\n39 39\n51 51\n6 6\n49 49\n64 64\n83 83\n10 10\n56 56\n30 30\n76 76\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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**This Kata is intended as a sma... | [{"input": "\"scholarstem\"", "output": "[\"schlrstm\"]", "fn_name": "remove_vowels"}, {"input": "\"high fives!\"", "output": "[\"hgh fvs!\"]", "fn_name": "remove_vowels"}, {"input": "\"codewars\"", "output": "[\"cdwrs\"]", "fn_name": "remove_vowels"}, {"input": "\"drake\"", "output": "[\"drk\"]", "fn_name": "remove_vo... | 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\nAn isogram is a word that has no... | [{"input": "\"abcdefghijklmnopqrstuwwxyz\"", "output": "[false]", "fn_name": "is_isogram"}, {"input": "\"abcdefghijklmnopqrstuvwxyz\"", "output": "[true]", "fn_name": "is_isogram"}, {"input": "\"thumbscrewjapingly\"", "output": "[true]", "fn_name": "is_isogram"}, {"input": "\"Dermatoglyphics\"", "output": "[true]", "fn... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA correct expression of the form... | [{"type": "stdin_stdout", "input": "100277221476489181970323375139380435110027722147648918197032337513938043511002772214764891819703233751393804351100277221476489181970323375139380435120055444295297836394064675027876087022005544429529783639406467502787608702\n", "output": "1002772214764891819703233751393804351100277221... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Olympic Games in Bercouver a... | [{"type": "stdin_stdout", "input": "614 163 13\n613 -1796 18\n-749 679 12\n", "output": "-481.72161 -447.61301\n"}, {"type": "stdin_stdout", "input": "614 163 21\n613 -468 18\n-749 679 25\n", "output": "-214.30328 -350.95260\n"}, {"type": "stdin_stdout", "input": "614 163 13\n613 -1029 18\n-749 679 25\n", "output": "10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a coordinate l... | [{"type": "stdin_stdout", "input": "100 50 1\n1 2\n3 4\n5 6\n7 8\n9 10\n11 12\n13 14\n15 16\n17 18\n19 20\n21 22\n23 24\n25 26\n27 28\n29 30\n31 32\n33 34\n35 36\n37 38\n39 40\n41 42\n43 44\n45 46\n47 48\n49 50\n51 52\n53 54\n55 56\n57 58\n59 60\n61 62\n63 64\n65 66\n67 68\n69 70\n71 72\n73 74\n75 76\n77 78\n79 80\n81 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMethodius received an email from... | [{"type": "stdin_stdout", "input": "10\naaaa\naaaab\naaaa\nbaaaa\na\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\na\nb\naaaaa\naaaa\nabcdefghijklmnopqrstuvwxyz\nzabcdefghijklmnopqrstuvwxyz\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaba\naaaaaaaaaaaaaaaaaaa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 often go to supermarkets to b... | [{"type": "stdin_stdout", "input": "50 37\n78 49\n96 4\n86 118\n28 4\n19 2\n79 43\n79 92\n95 35\n33 60\n54 84\n90 25\n2 19\n53 21\n86 52\n72 25\n6 8\n41 46\n3 68\n42 89\n33 48\n57 43\n99 45\n1 126\n38 62\n11 50\n55 84\n1 97\n12 67\n51 96\n51 7\n1 100\n79 61\n66 54\n97 93\n52 75\n80 41\n98 73\n29 28\n73 108\n24 73\n3 25... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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##Background - the Collatz Conje... | [{"input": "[75, 226, 113, 340]", "output": "[75]", "fn_name": "longest_collatz"}, {"input": "[340, 113, 226, 75]", "output": "[75]", "fn_name": "longest_collatz"}, {"input": "[75, 113, 226, 75]", "output": "[75]", "fn_name": "longest_collatz"}, {"input": "[64, 64, 27, 64]", "output": "[27]", "fn_name": "longest_collat... | 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\nSunuke received a d-dimensional ... | [{"type": "stdin_stdout", "input": "5\n12\n27\n15\n17\n149\n123", "output": "867510000\n"}, {"type": "stdin_stdout", "input": "5\n12\n34\n15\n17\n149\n119", "output": "998784000\n"}, {"type": "stdin_stdout", "input": "5\n12\n34\n15\n23\n149\n119", "output": "300622393\n"}, {"type": "stdin_stdout", "input": "5\n12\n27\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\nAs you have noticed, there are l... | [{"type": "stdin_stdout", "input": "100\n84 94 72 32 61 90 61 2 76 42 35 82 90 29 51 27 65 99 38 41 44 73 100 58 56 64 54 31 14 58 57 64 90 49 73 80 74 19 31 86 73 44 39 43 28 95 23 5 85 5 74 81 34 44 86 30 50 57 94 56 53 42 53 87 92 78 53 49 78 60 37 63 41 19 15 68 25 77 87 48 23 100 54 27 68 84 43 92 76 55 2 94 100 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\nYuki made a sugoroku so that eve... | [{"type": "stdin_stdout", "input": "8\n2 -1 3 -1 1 4 -1 0", "output": "5\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 1 4 -1 0", "output": "6\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 2 4 -1 0", "output": "6\n"}, {"type": "stdin_stdout", "input": "8\n3 -1 3 -1 0 4 -1 0", "output": "7\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\nAnatoly lives in the university ... | [{"type": "stdin_stdout", "input": "166\nrbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb\n", "output": "70\n"}, {"type": "stdin_stdout", "input": "166\nrbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbb... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 can print your name on a bil... | [{"input": "\"Jeong-Ho Aristotelis\"", "output": "[600]", "fn_name": "billboard"}, {"input": "\"Abishai Charalampos\"", "output": "[570]", "fn_name": "billboard"}, {"input": "\"Zoroaster Donnchadh\"", "output": "[570]", "fn_name": "billboard"}, {"input": "\"Hjalmar Liupold\"\n40", "output": "[600]", "fn_name": "billboa... | 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# Task\n John is new to spreadsh... | [{"input": "\"AA48\"", "output": "[\"R48C27\"]", "fn_name": "spreadsheet"}, {"input": "\"BK12\"", "output": "[\"R12C63\"]", "fn_name": "spreadsheet"}, {"input": "\"R12C63\"", "output": "[\"BK12\"]", "fn_name": "spreadsheet"}, {"input": "\"R31C78\"", "output": "[\"BZ31\"]", "fn_name": "spreadsheet"}, {"input": "\"BZ31\"... | 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 north country is conquered b... | [{"type": "stdin_stdout", "input": "1 2\n10 8\n0 0\n0 1\n3 3\n1 3 5\n2 13 1\n1 0 2\n0 0\n0 2\n3 3\n1 2 4\n4 8 10\n1 1 2\n0 0\n1 2\n2 2\n1 2\n5 4\n1 0\n0 1\n2 3\n1 2 3\n5 5 6\n0 0\n1 2\n0 0", "output": "24\n14\n30\n11\n21\n"}, {"type": "stdin_stdout", "input": "1 2\n10 8\n0 0\n0 1\n3 3\n1 3 5\n2 13 1\n1 0 2\n0 0\n0 2\n3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour program fails again. This t... | [{"type": "stdin_stdout", "input": "100 100\n82 51 14 14 37 17 78 92 64 15 8 86 89 8 87 77 30 15 15 12 100 25 161 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 148 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 118 52 74 31 92 43 70 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 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\nBad news came to Mike's village,... | [{"type": "stdin_stdout", "input": "1000000000000000\n", "output": "4949100894494448\n"}, {"type": "stdin_stdout", "input": "1000000000000000\n", "output": "4949100894494448\n"}, {"type": "stdin_stdout", "input": "999999999999997\n", "output": "4949100894494440\n"}, {"type": "stdin_stdout", "input": "999999999999996\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 le... | [{"type": "stdin_stdout", "input": "4\n3\n-1 0 1\n5\n1 -2 -2 1 -3\n6\n0 0 0 0 0 0\n4\n-1 2 -3 4\n", "output": "YES\nNO\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "1\n3\n0 65536 65536\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "1\n4\n-3 -1 1 1\n", "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\nMr. Kitayuta has kindly given yo... | [{"type": "stdin_stdout", "input": "ccxsecrxosqsrsoolxzcoolqllexxssxqoqeqkocerchlxckqschxxczlxscoxhszsoxzxrzohsccsclocxxzshrhzoexxhrohqrrqhorhxxeozhrhszxxcolcsccshozrxzxoszshxocsxlzcxxhcsqkcxlhcrecokqeqoqxssxxellqlooczxloosrsqsoxrcesxcc\n536870712\n", "output": "ccxsecrxosqsrsoolxzcoolqllexxssxqoqeqkocerchlxckqschxxczl... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has N integers. Among them... | [{"type": "stdin_stdout", "input": "13 -10 2", "output": "133\n"}, {"type": "stdin_stdout", "input": "125 -2 0", "output": "247\n"}, {"type": "stdin_stdout", "input": "109 0 1", "output": "108\n"}, {"type": "stdin_stdout", "input": "109 0 2", "output": "215\n"}, {"type": "stdin_stdout", "input": "19 -7 -2", "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\nDr. Asimov, a robotics researche... | [{"type": "stdin_stdout", "input": "1\nC A C\n1\nE C A\n10\nF A B\n0", "output": "0.00000000\n0.00000000\n0.07220459\n"}, {"type": "stdin_stdout", "input": "1\nC A C\n2\nE C A\n10\nF A B\n0", "output": "0.00000000\n0.12500000\n0.07220459\n"}, {"type": "stdin_stdout", "input": "1\nC A C\n1\nF C A\n10\nF A B\n0", "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\nPolo, the Penguin, likes numbers... | [{"type": "stdin_stdout", "input": "1\n13 393", "output": "227157\n"}, {"type": "stdin_stdout", "input": "1\n15 149", "output": "28365\n"}, {"type": "stdin_stdout", "input": "1\n15 260", "output": "96630\n"}, {"type": "stdin_stdout", "input": "1\n13 260", "output": "96684\n"}, {"type": "stdin_stdout", "input": "1\n13 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\nThere are $n$ people sitting in ... | [{"type": "stdin_stdout", "input": "735134400\n", "output": "1 367567202 735134403 1102701604 1470268805 1837836006 2205403207 2572970408 2940537609 3308104810 3675672011 4043239212 4410806413 4778373614 5145940815 5513508016 5881075217 6248642418 6983776820 7351344021 7718911222 8454045624 8821612825 9189180026 955674... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. Santa asks all the great pro... | [{"type": "stdin_stdout", "input": "43857\n", "output": "5 \n 175440 175441 175442 175443 175444\n"}, {"type": "stdin_stdout", "input": "27438\n", "output": "5 \n 109760 109761 109762 109763 109764\n"}, {"type": "stdin_stdout", "input": "31693\n", "output": "5 \n 126785 126786 126787 126788 126789\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\nLittle Tanya decided to present ... | [{"type": "stdin_stdout", "input": "DpiNBmCRFWxpdbfGOzvvOcemjructoAdEwegTvbVbfWWRPGyEAxGdDRWVlqNyGWMWHMrHAIZpyxvgaflrsVZhhZRouvpxrKXFZam\nwwPLFtNfPtJXvMLuHjKfYyaRhreNSWSzOvDpqHCGcqllACNPGHxReeFUCmAqIKXYytsSQwIxJzNiiUtgebVuwRmWpRALLyKAzyDPvgIGxALSaeeTIqm\n", "output": "66 12\n"}, {"type": "stdin_stdout", "input": "DpiNB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 related to my other Kata... | [{"input": "56\n64", "output": "[[10, 10]]", "fn_name": "owned_cat_and_dog"}, {"input": "15\n15", "output": "[[1, 1]]", "fn_name": "owned_cat_and_dog"}, {"input": "18\n21", "output": "[[1, 1]]", "fn_name": "owned_cat_and_dog"}, {"input": "19\n17", "output": "[[1, 1]]", "fn_name": "owned_cat_and_dog"}, {"input": "24\n24... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is Borya's eleventh birthday,... | [{"type": "stdin_stdout", "input": "4\n2\n1 1\n3\n2 31 12\n3\n21646 67 98\n9\n1 2 3 14 4 11 7 8 9\n", "output": "2\n0\n1\n36288\n"}, {"type": "stdin_stdout", "input": "4\n2\n1 1\n3\n1 31 12\n3\n12345 67 84\n9\n1 2 3 4 5 1 7 8 16\n", "output": "2\n2\n2\n36288\n"}, {"type": "stdin_stdout", "input": "4\n2\n1 1\n3\n1 20 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\nRoma works in a company that sel... | [{"type": "stdin_stdout", "input": "78 13\n-9961 -9922 -9817 -9813 -9521 -9368 -9361 -9207 -9153 -9124 -9008 -8981 -8951 -8911 -8551 -8479 -8245 -8216 -7988 -7841 -7748 -7741 -7734 -7101 -6846 -6804 -6651 -6526 -6519 -6463 -6297 -6148 -6090 -5845 -5209 -5201 -5161 -5061 -4537 -4529 -4433 -4370 -4266 -4189 -4125 -3945 -... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 1-digit positive integ... | [{"type": "stdin_stdout", "input": "96 1", "output": "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\n"}, {"type": "stdin_stdout", "input": "10 40", "output": "10101010101010101010101010101010101010101010101010101010101010101010101010101010\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\nIt's now 260 AD. Shapur, being e... | [{"type": "stdin_stdout", "input": "17 17\n00000000000000000000000000000000000000000000000000000000000000000000000000000\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "34 17\n00000000000000000000000000000000000000000000000000000000000000000000000000000\n", "output": "0\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\nWe have a board with H horizonta... | [{"type": "stdin_stdout", "input": "1001000000 1000000000", "output": "500500000000000000\n"}, {"type": "stdin_stdout", "input": "1001000000 1100000000", "output": "550550000000000000\n"}, {"type": "stdin_stdout", "input": "1001000010 1100000000", "output": "550550005500000000\n"}, {"type": "stdin_stdout", "input": "10... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke has N integers: 1,2,\\ldot... | [{"type": "stdin_stdout", "input": "1 -159", "output": "161\n"}, {"type": "stdin_stdout", "input": "119 -1", "output": "121\n"}, {"type": "stdin_stdout", "input": "2 -107", "output": "110\n"}, {"type": "stdin_stdout", "input": "0 -159", "output": "160\n"}, {"type": "stdin_stdout", "input": "112 -1", "output": "114\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\nSasha grew up and went to first ... | [{"type": "stdin_stdout", "input": "10\n0 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000\n1000000000 0 1 1 1 1 1 1 1 1\n1000000000 1 0 1 1 1 1 1 1 1\n1000000000 1 1 0 1 1 1 1 1 1\n1000000000 1 1 1 0 1 1 1 1 1\n1000000000 1 1 1 1 0 1 1 1 1\n1000000000 1 1 1 1 1 0 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\nYou are given a program that con... | [{"type": "stdin_stdout", "input": "2\n8 4\n-+--+--+\n1 8\n2 8\n2 5\n1 1\n4 10\n+-++\n1 1\n1 2\n2 2\n1 3\n2 3\n3 3\n1 4\n2 4\n3 4\n4 4\n", "output": "\n1\n2\n4\n4\n3\n3\n4\n2\n3\n2\n1\n2\n2\n2\n"}, {"type": "stdin_stdout", "input": "2\n8 4\n-+--+--+\n1 8\n2 8\n2 5\n1 1\n4 10\n+-++\n1 1\n1 2\n2 2\n1 3\n2 3\n3 3\n1 4\n2 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDevelopers often face with regul... | [{"type": "stdin_stdout", "input": "100\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\n?b\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\nb?\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFedya studies in a gymnasium. Fe... | [{"type": "stdin_stdout", "input": "124356983594583453458888889\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "124356983594583453458888889\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1134974\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "1236642\n", "output": "0\n"}, {"type": "stdin_std... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKuroni is very angry at the othe... | [{"type": "stdin_stdout", "input": "10\n648137704891 648137704891 648137704891 648137704891 648137704891 648137704891 648137704891 648137704891 648137704891 724560300002\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "5\n169999847 169999847 169999847 300469729580 169999847\n", "output": "3\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\nSonya decided to organize an exh... | [{"type": "stdin_stdout", "input": "1582 10\n587 646\n1148 843\n326 875\n439 485\n465 521\n330 387\n405 480\n477 115\n572 376\n715 771\n", "output": "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLong ago, when Petya was a schoo... | [{"type": "stdin_stdout", "input": "bgphoaomnjcjhgkgbflfclbjmkbfonpbmkdomjmkahaoclcbijdjlllnpfkbilgiiidbabgojbbfmliemhicaanadbaahagmfdldbbklelkihlcbkhchlikhefeeafbhkabfdlhnnjnlimbhneafcfeapcbeifgcnaijdnkjpikedmdbhahhgcijddfmamdiaapaeimdhfblpkedamifbbdndmmljmdcffcpmanndeeclnpnkdoieiahchdnkdmfnbocnimclgckdcbp\npcbeifgcna... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Aizuwakamatsu City, there is ... | [{"type": "stdin_stdout", "input": "1593 4311\n4321 2155\n1256 11201\n5310 1455\n2152 5421\n1928 3386\n4528 1578\n1234 4321\n3330 3109\n2739 2199\n0 0", "output": "C 12457\nD 6439\n"}, {"type": "stdin_stdout", "input": "1593 4311\n4321 2155\n1256 12219\n5310 1455\n2152 5421\n1549 3288\n4528 3719\n1234 4321\n3330 2166\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\nLittle Vasya loves orange juice ... | [{"type": "stdin_stdout", "input": "100\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPatrick has just finished writin... | [{"type": "stdin_stdout", "input": "MMVESdOCALHJCTBTUWWQRGUUVTTTABKKAAdIINAdKLRLLVLODHDXDPMcQfUhPNHFBJSDRGsHZNORSCPNvKOOIuZnZAmTPUCoPNlR\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "MMbJIBhgFXPVpdQHLkWJkAHFIfJSpITTCRzRCzvRPRYECCheOknfINZWuKATDBOrEVKTcWXiYPjtzQMGUSGPNTMCUrvYCSWQHqAi\n", "output": "27\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are N people (with differe... | [{"type": "stdin_stdout", "input": "119107271329329921", "output": "-1\n"}, {"type": "stdin_stdout", "input": "33213408621377322", "output": "-1\n"}, {"type": "stdin_stdout", "input": "26939847318901699", "output": "-1\n"}, {"type": "stdin_stdout", "input": "12809773843701327", "output": "-1\n"}, {"type": "stdin_stdout... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMike received an array $a$ of le... | [{"type": "stdin_stdout", "input": "2\n5 5\n1 2 3 4 5\n1\n5\n9\n12\n6\n5 5\n6 1 3 2 3\n1\n2\n3\n15\n11\n", "output": "Yes\nYes\nYes\nNo\nYes\nYes\nYes\nYes\nYes\nNo\n"}, {"type": "stdin_stdout", "input": "2\n5 5\n1 2 3 4 5\n1\n5\n3\n12\n6\n5 5\n6 1 3 2 3\n1\n2\n3\n15\n11\n", "output": "Yes\nYes\nYes\nNo\nYes\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\n# Task\n Your task is to find th... | [{"input": "[0, 1, 3, 4, 5, 6, 9, 14, 15, 16, 17, 18, 19]\n[1, 4, 10, 12, 13, 14, 15, 16]", "output": "[0.3125]", "fn_name": "similarity"}, {"input": "[1, 2, 6, 8, 9]\n[0, 1, 4, 5, 6, 8, 9]", "output": "[0.5]", "fn_name": "similarity"}, {"input": "[1, 2, 4, 6, 7]\n[2, 3, 4, 7]", "output": "[0.5]", "fn_name": "similarit... | 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\nDolphin resides in two-dimension... | [{"type": "stdin_stdout", "input": "-49 -32 -1 -4", "output": "UUUUUUUUUUUUUUUUUUUUUUUUUUUURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLUUUUUUUUUUUUUUUUUUUUUUUUUUUUURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRDRDDDDDDDDDDDDDDDDDDDDDDDD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou like playing chess tournamen... | [{"type": "stdin_stdout", "input": "8\n5 2\nWLWLL\n6 5\nLLLWWL\n7 4\nLWLWLWL\n15 5\nWWWLLLWWWLLLWWW\n40 38\nLLWLWLWWWLWLLWLWWWLWLLWLLWLLLLWLLWWWLWWL\n1 0\nL\n1 0\nL\n6 0\nWLLWLW\n", "output": "7\n11\n13\n26\n79\n0\n0\n3\n"}, {"type": "stdin_stdout", "input": "8\n5 2\nWLWLL\n6 5\nLLLWWL\n7 4\nLWLWLWL\n15 2\nWWWLLLWWWLLL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 commutes by train every da... | [{"type": "stdin_stdout", "input": "10\n2 10 8 7 8 8 10 9 10\n", "output": "63\n"}, {"type": "stdin_stdout", "input": "10\n2 10 8 7 8 8 10 9 10\n", "output": "63\n"}, {"type": "stdin_stdout", "input": "10\n2 10 8 7 8 9 10 9 10\n", "output": "62\n"}, {"type": "stdin_stdout", "input": "10\n3 10 8 7 8 9 10 9 10\n", "outpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter many years of research, Ik... | [{"type": "stdin_stdout", "input": "3 3 10\n18 1 13\n15 3 3\n5 10 0", "output": "100\n"}, {"type": "stdin_stdout", "input": "3 3 10\n10 14 13\n14 2 6\n5 4 1", "output": "28\n"}, {"type": "stdin_stdout", "input": "3 3 10\n18 4 13\n15 3 3\n5 11 1", "output": "34\n"}, {"type": "stdin_stdout", "input": "3 3 10\n18 4 13\n15... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProgrammer Vasya is studying a n... | [{"type": "stdin_stdout", "input": "10\ntypedef &void**** youdyfpinzk\ntypeof &youdyfpinzk***\ntypedef &&&&youdyfpinzk****** nfbsgpjzhxzskmxc\ntypeof nfbsgpjzhxzskmxc***\ntypedef &&&void*** puerqioirikxej\ntypeof &puerqioirikxej********\ntypedef &puerqioirikxej******** xzgzsamjdufuyxz\ntypeof &xzgzsamjdufuyxz******\nty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 army, it isn't easy to fo... | [{"type": "stdin_stdout", "input": "50 2\nYES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES\n", "output": "Ab Ac Ad Ae Af Ag Ah Ai Aj Ak Al Am An Ao Ap Aq Ar As At Au Av Aw 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\nAtCoDeer the deer found two rect... | [{"type": "stdin_stdout", "input": "-1 -1 100", "output": "102\n"}, {"type": "stdin_stdout", "input": "-1 -1 101", "output": "103\n"}, {"type": "stdin_stdout", "input": "-1 -1 111", "output": "113\n"}, {"type": "stdin_stdout", "input": "0 -116 -1", "output": "115\n"}, {"type": "stdin_stdout", "input": "-2 -1 111", "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\nStudent Valera is an undergradua... | [{"type": "stdin_stdout", "input": "1\n1001000000 999999999\n", "output": "999999999\n"}, {"type": "stdin_stdout", "input": "1\n1101010000 523461264\n", "output": "523461264\n"}, {"type": "stdin_stdout", "input": "1\n1101000000 193606579\n", "output": "193606579\n"}, {"type": "stdin_stdout", "input": "1\n1101000000 142... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 football tournament w... | [{"type": "stdin_stdout", "input": "30\n25 8\n25 4\n21 9\n25 1\n7 16\n23 21\n22 17\n27 29\n7 29\n20 3\n13 23\n7 13\n16 18\n25 14\n13 17\n28 15\n10 23\n25 18\n2 3\n23 13\n30 8\n13 15\n20 15\n11 29\n10 23\n5 16\n4 14\n4 30\n7 20\n11 1\n", "output": "29 29\n31 27\n29 29\n29 29\n30 28\n30 28\n29 29\n29 29\n29 29\n29 29\n31... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nПрошло много лет, и на вечеринке... | [{"type": "stdin_stdout", "input": "42\n13 62\n114 242\n265 839\n756 349\n298 476\n533 704\n348 277\n554 573\n654 112\n429 836\n574 766\n909 415\n163 891\n532 983\n873 457\n719 117\n1 302\n170 634\n166 585\n721 231\n208 609\n128 246\n845 726\n604 119\n859 110\n568 515\n656 913\n113 166\n794 566\n834 860\n983 596\n545 8... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given n segments on a nu... | [{"type": "stdin_stdout", "input": "45 100\n86 90 344\n67 71 63\n84 87 423\n96 98 297\n85 86 144\n75 80 489\n24 25 17\n75 78 363\n1 3 349\n17 19 146\n35 38 39\n90 93 236\n34 35 463\n59 64 259\n97 100 185\n71 75 214\n80 84 124\n63 67 324\n85 88 204\n47 51 420\n22 24 38\n30 34 41\n94 96 42\n3 6 312\n51 56 440\n84 85 337\... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.