messages
listlengths
1
1
ground_truth
stringlengths
156
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\nProblem Statement\n\nNathan O. Davis is a student at the department of integrated systems.\n\nToday's agenda ...
[{"input": "5\n1 x 0 4 x\n2\nx x\n2\n1 2\n2\n3 0\n2\n1000000000 x\n4\nx 4 1 x\n0", "output": "ambiguous\nnone\nambiguous\nnone\nambiguous\nambiguous\n"}, {"input": "5\n1 x 0 4 x\n2\nx x\n2\n1 2\n2\n3 0\n2\n0000000000 x\n4\nx 4 1 x\n0", "output": "ambiguous\nnone\nambiguous\nnone\nambiguous\nambiguous\n"}, {"input": "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\nGiven are a sequence A= {a_1,a_2,......a_N} of N positive even numbers, and an integer M.\nLet a semi-common ...
[{"input": "5 1000000000\n6 6 2 6 2\n", "output": "166666667\n"}, {"input": "5 1000000000\n6 6 2 6 2", "output": "166666667"}, {"input": "3 100\n14 22 40\n", "output": "0\n"}, {"input": "3 000\n14 22 40", "output": "0\n"}, {"input": "3 000\n14 16 40", "output": "0\n"}, {"input": "3 010\n14 16 40", "output": "0\n"}, {"i...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIahub and Iahubina went to a picnic in a forest full of trees. Less than 5 minutes passed before Iahub rememb...
[{"input": "24\n3 3 3 4 5 6 7 14 9 10 11 12 13 14 15 16 17 18 19 20 21 18 23 24\n", "output": "NO\n"}, {"input": "24\n3 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 18 23 24\n", "output": "NO\n"}, {"input": "24\n1 2 3 4 5 6 7 8 9 10 11 12 23 14 15 16 17 18 19 20 21 22 23 24\n", "output": "NO\n"}, {"input": "24\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\nYour task is to write a program which reads a date (from 2004/1/1 to 2004/12/31) and prints the day of the da...
[{"input": "6 2\n12 8\n0 0", "output": "Wednesday\nWednesday\n"}, {"input": "4 1\n2 18\n0 0", "output": "Thursday\nWednesday\n"}, {"input": "6 2\n7 17\n0 0", "output": "Wednesday\nSaturday\n"}, {"input": "1 1\n5 19\n0 0", "output": "Thursday\nWednesday\n"}, {"input": "3 3\n2 14\n0 0", "output": "Wednesday\nSaturday\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\nPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representat...
[{"input": "614586850 1000000000\n", "output": "1110059271353421796\n"}, {"input": "190535551 1000000000\n", "output": "1340487604111893304\n"}, {"input": "614586850 1000001000\n", "output": "1110063715797865796\n"}, {"input": "190535551 1010000000\n", "output": "1384932048551893304\n"}, {"input": "402822109 1000001000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA: Alphabet block\n\nWakana Nakawa loves palindromes. Because my name is also a palindrome.\n\nWakana got a s...
[{"input": "gcpc", "output": "1\n"}, {"input": "bgnc", "output": "2\n"}, {"input": "gcoc", "output": "1\n"}, {"input": "gcnc", "output": "1\n"}, {"input": "cgnc", "output": "1\n"}, {"input": "bcng", "output": "2\n"}, {"input": "bcnh", "output": "2\n"}, {"input": "hncb", "output": "2\n"}, {"input": "bnch", "output": "2\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n## The story you are about to hear is true\nOur cat, Balor, sadly died of cancer in 2015.\n\nWhile he was ali...
[{"input": "[\"------------\", \"------------\", \"-L----------\", \"------------\", \"------------\", \"------------\"]\n10", "output": "[true]", "fn_name": "peaceful_yard"}, {"input": "[\"------------\", \"---M--------\", \"------------\", \"------------\", \"-------R----\", \"------------\"]\n6", "output": "[false]"...
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\nWord $s$ of length $n$ is called $k$-complete if $s$ is a palindrome, i.e. $s_i=s_{n+1-i}$ for all $1 \\le ...
[{"input": "4\n6 2\nabaaba\n6 3\nabaaba\n36 9\nhippopotomonstrosesquippedaliophobia\n21 7\nwudixiaoxingxingheclp\n", "output": "2\n0\n23\n16\n"}, {"input": "4\n6 2\nabaaba\n6 3\nabaaba\n36 9\nhippopotononstrosesquippedaliophobia\n21 7\nwudixiaoxingxingheclp\n", "output": "2\n0\n23\n16\n"}, {"input": "4\n6 2\nabaaba\n6 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese, Russian and Vietnamese as well. \n\nThere are N students living...
[{"input": "2\n3\n1 10 16\n1 27 3\n3\n19 20 30\n15 10 20", "output": "2\n1\n"}, {"input": "2\n3\n1 10 15\n1 10 3\n3\n19 20 30\n15 5 20", "output": "2\n1\n"}, {"input": "2\n3\n1 10 29\n1 10 3\n2\n17 39 30\n15 5 20", "output": "2\n2\n"}, {"input": "2\n3\n1 10 29\n2 10 3\n2\n25 39 30\n15 5 20", "output": "1\n2\n"}, {"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\nThere are N children, numbered 1, 2, ..., N.\n\nSnuke has decided to distribute x sweets among them. He needs...
[{"input": "4 1111\n-1 2 110 1000", "output": "4\n"}, {"input": "4 1111\n1 5 100 1000", "output": "3\n"}, {"input": "4 1101\n1 5 100 1000", "output": "3\n"}, {"input": "4 1101\n0 5 100 1000", "output": "3\n"}, {"input": "4 1101\n0 5 110 1000", "output": "3\n"}, {"input": "4 1101\n1 5 110 1000", "output": "3\n"}, {"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\nEach day in Berland consists of $n$ hours. Polycarp likes time management. That's why he has a fixed schedule...
[{"input": "23\n1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1\n", "output": "10\n"}, {"input": "23\n1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n", "output": "2\n"}, {"input": "23\n1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1\n", "output": "2\n"}, {"input": "23\n1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1\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\nYou are given a permutation $a$ of size $n$ and you should perform $n$ operations on it. In the $i$-th operat...
[{"input": "1\n20\n19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 20 1\n", "output": "19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 \n"}, {"input": "1\n20\n20 1 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2\n", "output": "1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 \n"}, {"input": "4\n4\n1 2 3 4\n5\n1 3 2 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\nA prime number is an integer that is greater than 1 and can only be divided by itself or 1. For example, 2 is...
[{"input": "19\n10887", "output": "17 23\n10883 10889\n"}, {"input": "19\n17073", "output": "17 23\n17053 17077\n"}, {"input": "19\n30085", "output": "17 23\n30071 30089\n"}, {"input": "19\n21592", "output": "17 23\n21589 21599\n"}, {"input": "19\n16181", "output": "17 23\n16141 16183\n"}, {"input": "19\n38456", "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\nIn this Kata you must convert integers numbers from and to a negative-base binary system.\n\nNegative-base sy...
[{"input": "2147483648", "output": "[\"110000000000000000000000000000000\"]", "fn_name": "int_to_negabinary"}, {"input": "-2147483648", "output": "[\"10000000000000000000000000000000\"]", "fn_name": "int_to_negabinary"}, {"input": "-65536", "output": "[\"110000000000000000\"]", "fn_name": "int_to_negabinary"}, {"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\nImplement a function that adds two numbers together and returns their sum in binary. The conversion can be do...
[{"input": "0\n2174483647", "output": "[\"10000001100110111111110010111111\"]", "fn_name": "add_binary"}, {"input": "4096\n1", "output": "[\"1000000000001\"]", "fn_name": "add_binary"}, {"input": "100\n100", "output": "[\"11001000\"]", "fn_name": "add_binary"}, {"input": "51\n12", "output": "[\"111111\"]", "fn_name": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA chess position can be expressed as a string using the Forsyth–Edwards Notation (FEN). Your task is to writ...
[{"input": "\"2r2rk1/pp1qbppp/3p1n2/4p1B1/4P3/2NQ1P2/PPP3PP/2KR3R w - - 1 13\"", "output": "[\"\\u2587\\uff3f\\u2656\\uff3f\\u2587\\u2656\\u2654\\uff3f\\n\\u2659\\u2659\\uff3f\\u2655\\u2657\\u2659\\u2659\\u2659\\n\\u2587\\uff3f\\u2587\\u2659\\u2587\\u2658\\u2587\\uff3f\\n\\uff3f\\u2587\\uff3f\\u2587\\u2659\\u2587\\u265...
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\nWe have a 2 \\times N grid. We will denote the square at the i-th row and j-th column (1 \\leq i \\leq 2, 1 \...
[{"input": "7\n-2 -1 0 0 1 24 0\n166 0 -1 -2 -11 -1 2", "output": "151\n"}, {"input": "7\n-1 4 -1 4 2 16 0\n136 4 -4 6 -1 -1 -1", "output": "138\n"}, {"input": "7\n-1 4 -1 4 1 24 1\n136 2 -4 6 -1 -1 -1", "output": "136\n"}, {"input": "7\n-2 -1 0 -1 1 23 1\n73 -1 0 -1 -12 -2 2", "output": "57\n"}, {"input": "7\n-2 -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\nJoisino wants to evaluate the formula \"A op B\".\nHere, A and B are integers, and the binary operator op is ...
[{"input": "-1 - 182", "output": "-183\n"}, {"input": "6 - 131", "output": "-125\n"}, {"input": "5 - 118", "output": "-113\n"}, {"input": "-1 + 112", "output": "111\n"}, {"input": "-1 - 15", "output": "-16\n"}, {"input": "-2 - 12", "output": "-14\n"}, {"input": "-2 - 48", "output": "-50\n"}, {"input": "-2 - 74", "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\nLittle Dima misbehaved during a math lesson a lot and the nasty teacher Mr. Pickles gave him the following pr...
[{"input": "1 3034 -9234\n", "output": "23\n12004 21106 24140 30208 33242 39310 42344 48412 51446 54480 57514 60548 63582 66616 69650 72684 75718 78752 81786 87854 90888 96956 99990 "}, {"input": "1 3034 -9234\n", "output": "23\n12004 21106 24140 30208 33242 39310 42344 48412 51446 54480 57514 60548 63582 66616 69650 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\nIn this problem, you should process T testcases.\n\nFor each testcase, you are given four integers N, M, A, B...
[{"input": "5\n0 26 3 24\n6 5 4 1\n1 2 0 0\n31415 92653 41909 43244\n1000000000 1000000000 1831327114 999999999", "output": "0\n11\n0\n223190696\n915663556584336442\n"}, {"input": "5\n4 8 6 0\n11 5 7 3\n2 1 0 0\n31415 92653 111964 60313\n1000000000 1000000000 999999999 1505207673", "output": "3\n79\n0\n596283347\n50000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou receive some random elements as a space-delimited string. Check if the elements are part of an ascending ...
[{"input": "\"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 91 92 93 94 95 96 97 98 99 100 101 102\"", "outp...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFangy the little walrus, as all the modern walruses, loves to communicate via text messaging. One day he face...
[{"input": "123\nOjg CVJm qfE RnHislFds nNKKt TCPLWukqNGAsVBplYbTfq? VeYKjfFGTzXWA ydpVZLIImNub yApKnAHv iXQmqv GjQvxrnAgtfTApiQyCKtg. GdmapGwvI udRqxTbnzgnOUNZx slAuEuLGCJycZJvtCczQ vommS xuuT eIK! DOJeFEaubbz HYLGlIIlNKfyaJQKVN eFNnUvKKCQLXvGhwX gjmRscMkedELUlHq? aTbyMGB EofzX wcAEjyRQpxghWvXhdJb cwIz FEUsEFicYZ.\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\nRobot Doc is located in the hall, with n computers stand in a line, numbered from left to right from 1 to n. ...
[{"input": "100\n27 20 18 78 93 38 56 2 48 75 36 88 96 57 69 10 25 74 68 86 65 85 66 14 22 12 43 80 99 34 42 63 61 71 77 15 37 54 21 59 23 94 28 30 50 84 62 76 47 16 26 64 82 92 72 53 17 11 41 91 35 83 79 95 67 13 1 7 3 4 73 90 8 19 33 58 98 32 39 45 87 52 60 46 6 44 49 70 51 9 5 29 31 24 40 97 81 0 89 55\n", "output":...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLittle Petya likes permutations a lot. Recently his mom has presented him permutation q1, q2, ..., qn of leng...
[{"input": "55 28\n35 33 46 8 11 13 14 26 42 38 1 7 34 5 2 21 17 45 54 43 4 18 27 50 25 10 29 48 6 16 22 28 55 53 49 41 39 23 40 47 51 37 36 19 9 32 52 12 24 3 20 15 30 44 31\n5 52 24 16 7 27 48 21 18 8 14 28 29 12 47 53 17 31 54 41 30 55 10 35 25 4 38 46 23 34 33 3 15 6 11 20 9 26 42 37 43 45 51 19 22 50 39 32 1 49 36...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou have a plate and you want to add some gilding to it. The plate is a rectangle that we split into $w\\time...
[{"input": "100 100 25\n", "output": "5100\n"}, {"input": "100 100 20\n", "output": "4880\n"}, {"input": "100 100 20\n", "output": "4880\n"}, {"input": "100 100 25\n", "output": "5100\n"}, {"input": "100 100 16\n", "output": "4416\n"}, {"input": "110 100 25\n", "output": "5600\n"}, {"input": "110 100 16\n", "output": "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\n# Task\n Pac-Man got lucky today! Due to minor performance issue all his enemies have frozen. Too bad Pac-Man...
[{"input": "10\n[4, 6]\n[[0, 2], [5, 2], [5, 5]]", "output": "[15]", "fn_name": "pac_man"}, {"input": "8\n[1, 1]\n[[5, 4]]", "output": "[19]", "fn_name": "pac_man"}, {"input": "8\n[1, 5]\n[[5, 4]]", "output": "[14]", "fn_name": "pac_man"}, {"input": "2\n[0, 0]\n[[1, 1]]", "output": "[0]", "fn_name": "pac_man"}, {"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\nLet's denote correct match equation (we will denote it as CME) an equation $a + b = c$ there all integers $a$...
[{"input": "100\n928\n970\n950\n921\n1007\n974\n353\n999\n964\n920\n926\n942\n934\n918\n930\n901\n977\n961\n978\n962\n951\n909\n994\n953\n946\n993\n982\n922\n1789\n932\n904\n910\n991\n937\n963\n988\n278\n903\n956\n976\n967\n958\n902\n986\n960\n965\n940\n914\n955\n987\n952\n971\n939\n966\n938\n911\n916\n954\n929\n935\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\nThis is the hard version of this problem. The only difference is the constraint on $k$ — the number of gifts ...
[{"input": "8\n5 6 2\n2 4 3 5 12\n5 5 2\n2 4 3 5 10\n3 1 1\n4 2 6\n5 2 5\n10 1 3 9 2\n2 10000 2\n10000 10000\n2 9999 2\n10000 10000\n4 6 4\n3 2 2 2\n5 5 3\n1 2 2 1 2\n", "output": "3\n2\n0\n1\n2\n0\n4\n5\n"}, {"input": "8\n5 6 2\n2 4 3 5 12\n5 5 2\n2 4 1 5 10\n3 1 1\n4 2 6\n5 2 5\n10 1 3 9 2\n2 10000 2\n10000 10000\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\nDetermine whether a text T includes a pattern P. Your program should answer for given queries consisting of P...
[{"input": "aabaaa\n4\nab\nba\nbb\nxyz", "output": "1\n1\n0\n0\n"}, {"input": "aabaaa\n4\nab\nba\nba\nxyz", "output": "1\n1\n1\n0\n"}, {"input": "aabaaa\n4\nba\nbb\nac\nzyx", "output": "1\n0\n0\n0\n"}, {"input": "aabaaa\n4\nca\nab\nba\nzyx", "output": "0\n1\n1\n0\n"}, {"input": "aacaaa\n4\nba\nb`\nac\nzyx", "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\nCreate a function that takes a string and returns that\nstring with the first half lowercased and the last ha...
[{"input": "\"jAvASCript\"", "output": "[\"javasCRIPT\"]", "fn_name": "sillycase"}, {"input": "\"jabberwock\"", "output": "[\"jabbeRWOCK\"]", "fn_name": "sillycase"}, {"input": "\"codewars\"", "output": "[\"codeWARS\"]", "fn_name": "sillycase"}, {"input": "\"SCOTland\"", "output": "[\"scotLAND\"]", "fn_name": "sillycas...
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\nThere are three positive integers A, B and C written on a blackboard. E869120 performs the following operatio...
[{"input": "-1 0 -1\n-1", "output": "-2.0\n"}, {"input": "-1 0 0\n-1", "output": "-1.0\n"}, {"input": "13 5 21\n2", "output": "102\n"}, {"input": "12 10 25\n0", "output": "47\n"}, {"input": "5 8 2\n10", "output": "8199\n"}, {"input": "42 4 21\n2", "output": "193\n"}, {"input": "3 8 2\n10", "output": "8197\n"}, {"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\nRecently, chef Ciel often hears about lucky numbers.\n\nEverybody knows that lucky numbers are positive integ...
[{"input": "6\nklin 18\nCiel's Drink 174\nThe curry 2nd edition 677505\necis omelet 85855\nunagi 1\n She firsu amd last letters can eb a space 253", "output": "0\n"}, {"input": "6\nklin 18\nCiel's Drink 133\nThe curry 2nd edition 888888\necir omelet 85855\nunagi 1\n The firsu amd last letters can be a spac...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLittle Petya likes to play very much. And most of all he likes to play the following game:\n\nHe is given a s...
[{"input": "7\n1000000000 -1000000000 1000000000 -1000000000 1000000000 -1000000000 1000000000\n", "output": "6000000000\n"}, {"input": "7\n1000000000 -447358682 1000000000 -1000000000 1000000000 -1000000000 1000000000\n", "output": "5447358682\n"}, {"input": "7\n1000000000 -447358682 1000000000 -1000000000 1100000000 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLast year Bob earned by selling memory sticks. During each of n days of his work one of the two following eve...
[{"input": "50\nwin 596\nwin 1799\nwin 1462\nsell 460\nwin 731\nwin 723\nwin 731\nwin 329\nwin 838\nsell 728\nwin 728\nwin 460\nwin 723\nwin 1462\nwin 1462\nwin 460\nwin 329\nwin 1462\nwin 460\nwin 460\nwin 723\nwin 731\nwin 723\nwin 596\nwin 731\nwin 596\nwin 329\nwin 728\nwin 715\nwin 329\nwin 1799\nwin 715\nwin 723\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are taking a computer-based examination. The examination consists of N questions, and the score allocated...
[{"input": "3\n-101\n-1\n-1", "output": "-103\n"}, {"input": "3\n-109\n-1\n-1", "output": "-111\n"}, {"input": "3\n-156\n-1\n-1", "output": "-158\n"}, {"input": "3\n-166\n-1\n-1", "output": "-168\n"}, {"input": "3\n-166\n-2\n-1", "output": "-169\n"}, {"input": "3\n-166\n-4\n-1", "output": "-171\n"}, {"input": "3\n-390\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a set of all integers from $l$ to $r$ inclusive, $l < r$, $(r - l + 1) \\le 3 \\cdot 10^5$ and ...
[{"input": "804212830686677670 804212830686679109\n", "output": "YES\n804212830686677670 804212830686677671\n804212830686677672 804212830686677673\n804212830686677674 804212830686677675\n804212830686677676 804212830686677677\n804212830686677678 804212830686677679\n804212830686677680 804212830686677681\n8042128306866776...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nComplete the function that determines the score of a hand in the card game [Blackjack](https://en.wikipedia.o...
[{"input": "[\"A\", \"2\", \"A\", \"9\", \"9\"]", "output": "[22]", "fn_name": "score_hand"}, {"input": "[\"A\", \"2\", \"A\", \"3\", \"A\"]", "output": "[18]", "fn_name": "score_hand"}, {"input": "[\"A\", \"A\", \"A\", \"J\"]", "output": "[13]", "fn_name": "score_hand"}, {"input": "[\"5\", \"4\", \"A\", \"A\"]", "outp...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThe Little Elephant from the Zoo of Lviv likes listening to music.\nThere are N songs, numbered from 1 to N, ...
[{"input": "2\n3\n1 1\n2 2\n-1 2\n3\n1 3\n1 3\n4 2", "output": "11\n14\n"}, {"input": "2\n3\n1 1\n2 3\n-1 2\n3\n0 3\n1 3\n4 2", "output": "14\n17\n"}, {"input": "2\n3\n1 3\n2 3\n4 2\n3\n2 1\n1 2\n2 11", "output": "17\n27\n"}, {"input": "2\n3\n1 1\n2 2\n-1 2\n3\n0 3\n1 3\n4 4", "output": "11\n21\n"}, {"input": "2\n3\n1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nPolycarpus is an amateur programmer. Now he is analyzing a friend's program. He has already found there the f...
[{"input": "20\n5 9 11 12 13 13 13 13 13 13 13 13 13 6 12 11 11 8 6 4\n", "output": "19\n5 13\n4 13\n3 13\n3 13\n2 13\n2 13\n2 13\n15 15\n15 17\n15 17\n15 17\n15 18\n15 18\n2 19\n1 19\n1 20\n1 20\n1 20\n1 20\n"}, {"input": "20\n5 9 11 12 13 13 13 13 13 13 13 13 13 6 12 11 11 8 6 2\n", "output": "19\n5 13\n4 13\n3 13\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\n# Task\nYour task is to find the sum for the range `0 ... m` for all powers from `0 ... n.\n\n# Example\n\n F...
[{"input": "10\n9", "output": "[1762344782]", "fn_name": "S2N"}, {"input": "567\n2", "output": "[61083856]", "fn_name": "S2N"}, {"input": "300\n2", "output": "[9090501]", "fn_name": "S2N"}, {"input": "37\n4", "output": "[15335280]", "fn_name": "S2N"}, {"input": "36\n4", "output": "[13409059]", "fn_name": "S2N"}, {"inpu...
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\nPolycarp invited all his friends to the tea party to celebrate the holiday. He has n cups, one for each of hi...
[{"input": "100 10000\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 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\nProgrammers working on a large project have just received a task to write exactly m lines of code. There are ...
[{"input": "123 432 342 1000000007\n72 20 34 115 65 29 28 41 18 16 122 104 88 37 119 11 108 91 13 110 47 73 80 35 62 12 9 116 55 66 54 113 50 57 8 25 98 105 0 120 93 78 61 17 84 48 42 106 63 103 7 59 90 89 28 49 53 71 51 83 75 67 64 95 107 3 32 85 69 99 33 79 109 56 10 23 87 19 121 94 44 82 102 27 112 52 21 1 5 74 117 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given an integer $n$. You have to calculate the number of binary (consisting of characters 0 and/or 1...
[{"input": "20\n1 1 2 0 0 2 0 2 2 2 0 0 2 2 2 0 2 0 0 0\n0 0 0 0 0 0 0 0 0 2 0 2 0 0 0 2 0 0 0\n0 1 2 0 2 2 2 2 0 0 2 0 2 2 0 2 2 2\n1 2 2 2 2 2 2 2 0 2 2 2 0 2 2 2 2\n0 2 0 0 2 2 2 0 2 2 0 0 2 0 0 0\n1 1 1 0 2 0 0 0 0 0 2 0 2 0 2\n1 0 1 2 2 2 0 0 2 0 0 0 2 0\n0 1 2 0 0 0 0 0 0 0 0 2 0\n0 0 0 0 0 0 0 0 0 0 2 2\n0 2 0 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\nSome country is populated by wizards. They want to organize a demonstration.\n\nThere are n people living in ...
[{"input": "10000 10000 10000\n", "output": "990000\n"}, {"input": "16485 10573 4769\n", "output": "775597\n"}, {"input": "1829 10325 17617\n", "output": "311890\n"}, {"input": "12248 10573 4769\n", "output": "573535\n"}, {"input": "13372 2590 2818\n", "output": "374233\n"}, {"input": "6571 10325 8965\n", "output": "57...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven are two strings s and t consisting of lowercase English letters. Determine if there exists an integer i...
[{"input": "contest\nprogramming\n", "output": "-1\n"}, {"input": "contest\nprogrammhng", "output": "-1\n"}, {"input": "eontcst\nprogrammhng", "output": "-1\n"}, {"input": "eonscst\nprogrammhng", "output": "-1\n"}, {"input": "eonscst\nprogrammhog", "output": "-1\n"}, {"input": "eonscst\nprogrammhpg", "output": "-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\nWrite a program that will calculate the number of trailing zeros in a factorial of a given number.\n\n`N! = 1...
[{"input": "1000000000", "output": "[249999998]", "fn_name": "zeros"}, {"input": "100000", "output": "[24999]", "fn_name": "zeros"}, {"input": "1000", "output": "[249]", "fn_name": "zeros"}, {"input": "100", "output": "[24]", "fn_name": "zeros"}, {"input": "30", "output": "[7]", "fn_name": "zeros"}, {"input": "0", "out...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nAfter the educational reform Polycarp studies only two subjects at school, Safety Studies and PE (Physical Ed...
[{"input": "100\n45 55\n3 5 3 4 1 1 1 1 5 2 1 3 1 5 3 5 1 1 3 1 1 3 5 5 1 1 1 5 5 1 3 1 1 1 3 3 1 1 1 4 3 1 5 1 3 1 4 5 4 3 3 1 1 5 5 1 3 5 1 1 5 1 1 3 5 5 1 1 3 3 4 1 1 4 5 3 1 3 1 5 1 5 4 5 1 1 1 1 4 5 4 5 3 1 1 5 1 5 1 4\n", "output": "1 1 1 1 2 2 2 2 1 2 2 1 2 1 1 1 2 2 1 2 2 1 1 1 2 2 2 1 1 2 1 2 2 2 1 1 2 2 2 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\n# Task\nGiven an array `arr`, find the maximal value of `k` such `a[i] mod k` = `a[j] mod k` for all valid va...
[{"input": "[5, 6, 7, 8]", "output": "[1]", "fn_name": "finding_k"}, {"input": "[1, 1, 1]", "output": "[-1]", "fn_name": "finding_k"}, {"input": "[1, 7, 13]", "output": "[6]", "fn_name": "finding_k"}, {"input": "[10, 100]", "output": "[90]", "fn_name": "finding_k"}, {"input": "[64, 8, 1]", "output": "[7]", "fn_name": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nClaire is a man-eater. She's a real man-eater. She's going around with dozens of guys. She's dating all the t...
[{"input": "2\n2 100\n10 12\n14 16\n2 200\n12 13\n18 20\n4\n1 100\n6 22\n1 1000\n12 22\n1 10000\n6 22\n1 100000\n6 22\n16\n1 100000000\n6 7\n1 100000000\n7 8\n1 100000000\n8 15\n1 110000000\n9 10\n1 100000000\n10 11\n1 100000000\n11 12\n1 100000000\n12 13\n1 100000000\n13 17\n1 100000000\n14 15\n1 100000000\n15 16\n1 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\nOne day Misha and Andrew were playing a very simple game. First, each player chooses an integer in the range ...
[{"input": "1000000000 1000000000\n", "output": "999999999\n"}, {"input": "1000000000 1000000000\n", "output": "999999999"}, {"input": "1000000000 100000000\n", "output": "100000001\n"}, {"input": "1000000000 500000000\n", "output": "500000001\n"}, {"input": "1199670843 346250868\n", "output": "346250869\n"}, {"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\nDefine a method that accepts 2 strings as parameters. The method returns the first string sorted by the secon...
[{"input": "\"fumyarhncujlj\"\n\"nsejcwn\"", "output": "[\"njjcfumyarhul\"]", "fn_name": "sort_string"}, {"input": "\"bungholio\"\n\"aacbuoldiiaoh\"", "output": "[\"buoolihng\"]", "fn_name": "sort_string"}, {"input": "\"string\"\n\"gnirts\"", "output": "[\"gnirts\"]", "fn_name": "sort_string"}, {"input": "\"banana\"\n\...
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\nNathan O. Davis is trying to capture a game and struggling to get a very rare item. This rare item can be obt...
[{"input": "1 5 7 11 10\n11\n2 5 5 11 10\n2 4\n2 1 1 256 0\n128 255\n2 0 0 1 0\n1234 5678\n2 1 1 100 0\n99 98\n2 1 1 100 0\n99 99\n2 1 1 10000 0\n1 0\n3 1 2 10000 0\n2 1\n0 0 0 0 0", "output": "-1\n-1\n255\n-1\n198\n199\n10000\n-1\n"}, {"input": "1 5 7 11 10\n10\n2 5 7 11 10\n2 4\n2 1 1 256 0\n128 255\n2 0 0 1 0\n1234 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nGiven the list of numbers, you are to sort them in non decreasing order.\n\n-----Input-----\nt – the number o...
[{"input": "5\n0\n0\n10\n11\n2", "output": "0\n0\n2\n10\n11\n"}, {"input": "5\n1\n1\n3\n11\n2", "output": "1\n1\n2\n3\n11\n"}, {"input": "5\n1\n1\n3\n11\n4", "output": "1\n1\n3\n4\n11\n"}, {"input": "5\n1\n0\n3\n11\n4", "output": "0\n1\n3\n4\n11\n"}, {"input": "5\n1\n0\n3\n17\n4", "output": "0\n1\n3\n4\n17\n"}, {"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\nTo make it difficult to withdraw money, a certain bank allows its customers to withdraw only one of the follo...
[{"input": "44852\n", "output": "16\n"}, {"input": "43637\n", "output": "16\n"}, {"input": "99788\n", "output": "15\n"}, {"input": "35861\n", "output": "15\n"}, {"input": "100000\n", "output": "7\n"}, {"input": "182896", "output": "14\n"}, {"input": "135433", "output": "10\n"}, {"input": "59049\n", "output": "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\nDiameter of a Tree\n\n\n\n\nGiven a tree T with non-negative weight, find the diameter of the tree.\n\nThe di...
[{"input": "4\n1 0 -2\n2 1 10\n1 3 4", "output": "14\n"}, {"input": "4\n1 0 1\n0 2 12\n2 3 -1", "output": "13\n"}, {"input": "4\n1 0 0\n2 1 11\n0 3 11", "output": "22\n"}, {"input": "4\n1 0 -1\n2 1 15\n1 3 4", "output": "19\n"}, {"input": "4\n1 1 -1\n2 0 10\n0 3 6", "output": "16\n"}, {"input": "4\n0 1 2\n0 3 1\n2 3 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\nTakahashi has a strong stomach. He never gets a stomachache from eating something whose \"best-by\" date is a...
[{"input": "-2 -1 10", "output": "dangerous\n"}, {"input": "-1 13 12", "output": "delicious\n"}, {"input": "3 7 12\n", "output": "dangerous\n"}, {"input": "-1 7 12", "output": "dangerous\n"}, {"input": "-1 7 14", "output": "dangerous\n"}, {"input": "13 2 -1", "output": "delicious\n"}, {"input": "13 4 -1", "output": "de...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nFor a dynamic array $A = \\\\{a_0, a_1, ...\\\\}$ of integers, perform a sequence of the following operations...
[{"input": "8\n0 -1\n0 14\n0 1\n2\n0 4\n1 0\n1 0\n1 1", "output": "-1\n-1\n14\n"}, {"input": "8\n0 -1\n0 9\n1 1\n2\n0 4\n1 0\n1 0\n1 1", "output": "9\n-1\n-1\n4\n"}, {"input": "8\n0 -1\n0 2\n0 3\n2\n0 4\n1 0\n1 0\n1 0", "output": "-1\n-1\n-1\n"}, {"input": "8\n0 -1\n0 9\n0 1\n2\n0 4\n1 0\n1 0\n1 1", "output": "-1\n-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\nRead problems statements in Mandarin Chinese and Russian. \nRoman has no idea, why this problem is called St...
[{"input": "4 0\n5 -1 14 -1", "output": "5 -1 14 -1\n"}, {"input": "4 0\n6 -1 14 -1", "output": "6 -1 14 -1\n"}, {"input": "4 1\n1 -1 19 4", "output": "18 20 0 15\n"}, {"input": "4 1\n5 -1 15 0", "output": "10 16 0 15\n"}, {"input": "4 1\n5 -1 23 0", "output": "18 24 0 23\n"}, {"input": "4 1\n3 0 14 -1", "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\nYou are given three sticks with positive integer lengths of a, b, and c centimeters. You can increase length ...
[{"input": "300000 300000 300000 300000\n", "output": "4500090000549998\n"}, {"input": "300000 300000 313966 300000\n", "output": "4499976425036741\n"}, {"input": "300000 330804 313966 300000\n", "output": "4499890982537731\n"}, {"input": "53553 262850 271957 182759\n", "output": "834977070873802\n"}, {"input": "100000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nEkiden competitions are held every year in Aizukuni. The country of Aiz is dotted with N towns, each numbered...
[{"input": "7 11\n2 4 2\n1 6 2\n2 4 2\n1 5 10\n2 6 2\n6 4 1\n6 5 1\n3 6 1\n4 7 0\n5 5 6\n6 7 1", "output": "4\n3\n4\n5\n7\n"}, {"input": "7 11\n2 1 2\n1 3 1\n2 3 2\n3 4 4\n2 6 1\n4 4 1\n3 5 2\n3 6 1\n4 7 3\n5 7 7\n6 7 1", "output": "4\n1\n2\n6\n7\n"}, {"input": "7 11\n2 2 2\n1 3 2\n3 3 2\n3 4 4\n2 6 1\n4 4 1\n3 5 1\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\nWrite a program that prints a chessboard with N rows and M columns with the following rules:\nThe top left ce...
[{"input": "\"8 8\"", "output": "[\"*.*.*.*.\\n.*.*.*.*\\n*.*.*.*.\\n.*.*.*.*\\n*.*.*.*.\\n.*.*.*.*\\n*.*.*.*.\\n.*.*.*.*\"]", "fn_name": "chessboard"}, {"input": "\"5 2\"", "output": "[\"*.\\n.*\\n*.\\n.*\\n*.\"]", "fn_name": "chessboard"}, {"input": "\"3 3\"", "output": "[\"*.*\\n.*.\\n*.*\"]", "fn_name": "chessboard...
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\nVasya has got a magic matrix a of size n × m. The rows of the matrix are numbered from 1 to n from top to bot...
[{"input": "13 8\n3 2 1 4 8 2 5 9\n8 2 10 8 9 3 2 8\n3 6 8 3 11 7 6 4\n4 2 10 5 7 5 1 3\n10 9 3 6 4 10 10 2\n10 3 7 1 4 5 7 10\n5 3 1 6 1 10 3 6\n10 7 6 8 1 8 4 1\n7 8 1 10 8 5 3 6\n3 8 10 6 7 6 5 5\n1 5 9 8 4 8 5 10\n6 9 10 7 5 10 5 4\n3 9 2 4 8 2 5 4\n8 1\n", "output": "140693813\n"}, {"input": "13 8\n3 2 1 4 8 2 5 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\nThere are K items placed on a grid of squares with R rows and C columns. Let (i, j) denote the square at the ...
[{"input": "4 5 10\n2 5 12\n1 5 12\n2 3 15\n1 2 20\n1 1 28\n2 4 26\n3 2 27\n4 5 21\n3 5 10\n1 3 10\n", "output": "142\n"}, {"input": "4 5 3\n1 5 11\n1 -1 12\n2 3 61\n2 3 20\n0 0 33\n3 3 10\n4 4 31\n14 6 21\n-1 2 17\n2 3 10", "output": "61\n"}, {"input": "4 5 10\n2 5 12\n1 5 7\n2 3 15\n1 2 20\n1 1 28\n2 4 26\n3 2 27\n4 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a grid with 2 rows and 3 columns of squares.\nThe color of the square at the i-th row and j-th ...
[{"input": "pot\ntop\n", "output": "YES\n"}, {"input": "tab\nbet\n", "output": "NO\n"}, {"input": "eye\neel\n", "output": "NO\n"}, {"input": "spp\npps", "output": "YES\n"}, {"input": "tbb\nbet", "output": "NO\n"}, {"input": "eye\nele", "output": "NO\n"}, {"input": "pos\ntop", "output": "NO\n"}, {"input": "btb\nbet", "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\nTo satisfy his love of matching socks, Phoenix has brought his $n$ socks ($n$ is even) to the sock store. Eac...
[{"input": "4\n6 3 3\n1 2 3 2 2 2\n6 2 4\n1 1 2 2 2 2\n6 5 1\n6 5 4 3 2 1\n4 0 4\n4 4 4 3\n", "output": "\n2\n3\n5\n3\n"}, {"input": "4\n6 3 3\n1 2 3 2 2 2\n6 2 4\n1 1 2 2 2 2\n6 5 1\n6 5 4 3 2 1\n4 0 4\n4 4 4 3\n", "output": "2\n3\n5\n3\n"}, {"input": "4\n6 3 3\n1 2 6 2 2 2\n6 2 4\n1 1 2 2 2 2\n6 5 1\n6 5 4 3 2 1\n4 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\nIn the good old Hachioji railroad station located in the west of Tokyo, there are several parking lines, and ...
[{"input": "3 5\n0W 1W\n0W 2W\n0W 2E\n0E 1E\n1E 2E\naabbcdcee\n-\n-\n-\n-\nbbaadeecc\n3 3\n0E 1W\n1E 2W\n2E 0W\naabb\nbbcc\naa\nbbbb\ncc\naaaa\n3 4\n0E 1W\n0E 2E\n1E 2W\n2E 0W\nababab\n-\n-\naaabbb\n-\n-\n0 0", "output": "5\n2\n5\n"}, {"input": "3 5\n0W 1W\n0W 2W\n0W 2E\n0E 1E\n1E 2E\naabbccdee\n-\n-\n-\n-\nbbaadeecc\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\nPolycarpus got an internship in one well-known social network. His test task is to count the number of unique...
[{"input": "10 3 30000\n00:06:54\n00:42:06\n03:49:45\n04:38:35\n05:33:30\n05:51:46\n10:46:34\n14:34:59\n14:40:06\n14:53:13\n", "output": "6\n1\n2\n3\n3\n3\n3\n4\n5\n6\n6\n"}, {"input": "10 3 30000\n00:06:54\n00:42:06\n03:49:45\n04:38:35\n05:33:30\n05:51:56\n10:46:34\n14:34:59\n14:40:06\n14:53:13\n", "output": "6\n1\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\nTakahashi has decided to make a Christmas Tree for the Christmas party in AtCoder, Inc.\n\nA Christmas Tree i...
[{"input": "10\n1 2\n1 3\n1 4\n2 5\n6 10\n6 7\n7 8\n4 9\n10 5", "output": "2 6\n"}, {"input": "10\n1 2\n1 3\n3 4\n2 5\n6 5\n6 7\n7 8\n5 9\n10 5", "output": "2 5\n"}, {"input": "10\n1 2\n1 3\n3 4\n2 5\n7 5\n6 7\n7 8\n5 9\n10 5", "output": "3 5\n"}, {"input": "10\n1 2\n1 3\n1 4\n2 5\n7 5\n6 7\n7 8\n5 9\n10 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\nSasha likes programming. Once, during a very long contest, Sasha decided that he was a bit tired and needed t...
[{"input": "2\n114243 620721\n", "output": "0\n"}, {"input": "2\n182166 620721\n", "output": "0\n"}, {"input": "2\n182166 383547\n", "output": "0\n"}, {"input": "2\n60202 951227\n", "output": "0\n"}, {"input": "2\n60202 620721\n", "output": "0\n"}, {"input": "6\n5 2 2 3 10 6\n", "output": "1\n"}, {"input": "6\n5 2 2 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\nLaura really hates people using acronyms in her office and wants to force her colleagues to remove all acrony...
[{"input": "\"BRB I need to go into a KPI meeting before EOD\"", "output": "[\"BRB is an acronym. I do not like acronyms. Please remove them from your email.\"]", "fn_name": "acronym_buster"}, {"input": "\"The advert needs a CTA. NRN before EOD.\"", "output": "[\"The advert needs a call to action. No reply necessary be...
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\nYou've got two rectangular tables with sizes na × ma and nb × mb cells. The tables consist of zeroes and ones...
[{"input": "14 28\n1000000010111011101010010101\n1110010011000011000110001001\n0001100110101000010110110011\n0101101011010101110100100101\n0100100101000011011111100010\n0001111000100000101000110101\n1011100111110101000110101010\n1111011011110100100000101000\n0011111101110001010010001110\n1011100011110000001011100100\n0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nA little bear Limak plays a game. He has five cards. There is one number written on each card. Each number is...
[{"input": "100 100 100 100 100\n", "output": "200\n"}, {"input": "100 100 100 100 100\n", "output": "200\n"}, {"input": "100 100 100 100 000\n", "output": "100\n"}, {"input": "100 100 100 000 000\n", "output": "0\n"}, {"input": "100 100 99 99 98\n", "output": "296\n"}, {"input": "98 99 100 99 100\n", "output": "296\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\nInnokenty is a president of a new football league in Byteland. The first task he should do is to assign short...
[{"input": "10\nIJGDI KHB\nHBI CKKCG\nFHE GCAA\nEDCGH HHICE\nGFH AIHD\nHED KIK\nDCK BCFIJ\nFFIHE FDB\nJGB AKKI\nIJD CAG\n", "output": "YES\nIJG\nHBI\nFHE\nEDC\nGFH\nHED\nDCK\nFFI\nJGB\nIJD\n"}, {"input": "10\nIJGDI KHB\nHBI CKKCG\nFHE GCAA\nEDCGH HHICE\nGFH AIHD\nHED KIK\nDCK BCFIJ\nFFIHE FDB\nJGB AKKI\nIJD CAG\n", "ou...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWrite a function that calculates the *least common multiple* of its arguments; each argument is assumed to be...
[{"input": "17\n20\n4\n15\n4\n18\n12\n14\n20\n19\n2\n14\n13\n7", "output": "[5290740]", "fn_name": "lcm"}, {"input": "5\n6\n7\n9\n6\n9\n18\n4\n5\n15\n15\n10\n17\n7", "output": "[21420]", "fn_name": "lcm"}, {"input": "11\n13\n4\n5\n17\n4\n10\n13\n16\n13\n13", "output": "[194480]", "fn_name": "lcm"}, {"input": "3\n9\n9\n...
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\nShort Phrase\n\nA Short Phrase (aka. Tanku) is a fixed verse, inspired by Japanese poetry Tanka and Haiku. It...
[{"input": "9\ndo\nhte\nbest\nand\nenjoy\ntoday\nat\nacm\nicpc\n14\noh\nyes\nby\nfar\nit\nis\nwow\nso\nbad\nto\nme\nyou\nknow\nhey\n15\nabcde\nfghijkl\nmnopq\nrstuvwx\nyzz\nabcde\nfghijkl\nmnopq\nrstuvwx\nyz\nabcde\nfghijkl\nmnopq\nrstuvwx\nyz\n0", "output": "1\n2\n6\n"}, {"input": "9\ndo\nhte\nbest\nand\nenjoy\ntoday\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou will receive 5 points for solving this problem.\n\nManao has invented a new operation on strings that is ...
[{"input": "LEHLLLLLLHAFGEGLLHAFDLHHLLLLLDGGEHGGHLLLLLLLLDFLCBLLEFLLCBLLCGLEDLGGLECLDGLEHLLLGELLLEGLLLLGDLLLDALD\n", "output": "49\n"}, {"input": "LEHLLLLLLHAFGEGLLHAFDLHHMLLLLDGGEHGGHLLLLLLLLDFLCBLLEFLLCBLLCGLEDLGGLECLDGLEHLLLGELLLEGLLLLGDLLLDALD\n", "output": "47\n"}, {"input": "LEHLLLLLLHAFGEGLLHAFDLHHMLLKLDGGEHGGHL...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a n × m field consisting only of periods ('.') and asterisks ('*'). Your task is to count all r...
[{"input": "14 29\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\nSquirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Init...
[{"input": "llrlrlllrrllrllllrlrrlrlrrllrlrlrrlrrrrrrlllrrlrrrrrlrrrlrlrlrrlllllrrrrllrrlrlrrrllllrlrrlrrlrlrrll\n", "output": "3\n5\n9\n10\n13\n18\n20\n21\n23\n25\n26\n29\n31\n33\n34\n36\n37\n38\n39\n40\n41\n45\n46\n48\n49\n50\n51\n52\n54\n55\n56\n58\n60\n62\n63\n69\n70\n71\n72\n75\n76\n78\n80\n81\n82\n87\n89\n90\n92\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is an empty array.\nThe following N operations will be performed to insert integers into the array.\nIn...
[{"input": "10 878093\n1 100000\n1 110001\n1 100000\n1 100001\n1 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000", "output": "100000\n"}, {"input": "10 878093\n1 100000\n1 110001\n1 100000\n1 101001\n1 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000\n100000 100000", ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given a string q. A sequence of k strings s_1, s_2, ..., s_{k} is called beautiful, if the concatenat...
[{"input": "26\nlllplzkkzflzflffzznnnnfgflqlttlmtnkzlztskngyymitqagattkdllyutzimsrskpapcmuupjdopxqlnhqcscwvdtxbflefy\n", "output": "YES\nlll\npl\nz\nkkz\nflzflffzz\nnnnnf\ngfl\nql\nttl\nmtnkzlzt\nskng\nyym\nitq\nagattk\ndlly\nutzims\nrskpap\ncmuup\njd\nop\nxqln\nhqcsc\nw\nvdtx\nbfl\nefy\n"}, {"input": "26\nlllplzkkzflz...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nYou are given two integers $a$ and $m$. Calculate the number of integers $x$ such that $0 \\le x < m$ and $\\...
[{"input": "10\n164 252\n94 226\n38 254\n196 255\n35 256\n174 257\n251 495\n246 527\n9 260\n149 261\n", "output": "36\n112\n126\n128\n128\n256\n240\n480\n96\n168\n"}, {"input": "10\n164 252\n94 253\n171 254\n196 255\n35 256\n174 257\n251 258\n239 259\n9 260\n98 261\n", "output": "36\n220\n126\n128\n128\n256\n84\n216\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\nMelody Pond was stolen from her parents as a newborn baby by Madame Kovarian, to become a weapon of the Silen...
[{"input": "1219679533107\n", "output": "1 609839766552\n"}, {"input": "1044191868535\n", "output": "1 522095934266\n"}, {"input": "1041721920937\n", "output": "1 520860960467\n"}, {"input": "1025662663437\n", "output": "1 512831331717\n"}, {"input": "1026828404677\n", "output": "1 513414202337\n"}, {"input": "14523797...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are $n$ benches in the Berland Central park. It is known that $a_i$ people are currently sitting on the...
[{"input": "100\n3241\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n10...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nOn his trip to Luxor and Aswan, Sagheer went to a Nubian market to buy some souvenirs for his friends and rel...
[{"input": "90 61394040\n2480 6212 4506 829 8191 797 5336 6722 3178 1007 5849 3061 3588 6684 5983 5452 7654 5321 660 2569 2809 2179 679 4858 6887 2580 6880 6120 4159 5542 4999 8703 2386 8221 7046 1229 1662 4542 7089 3548 4298 1973 1854 2473 5507 241 359 5248 7907 5201 9624 4596 1723 2622 4800 4716 693 961 7402 9004 799...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere are many anime that are about \"love triangles\": Alice loves Bob, and Charlie loves Bob as well, but A...
[{"input": "28567 13\n28079 24675 1\n18409 26720 1\n980 10815 1\n20794 16571 1\n7376 19861 1\n10805 706 1\n4255 16391 1\n27376 18263 1\n10019 28444 1\n6574 28053 1\n5036 16610 1\n3543 7122 1\n512 9554 1\n", "output": "928433852\n"}, {"input": "28567 13\n28079 24675 1\n18409 26720 1\n980 12226 1\n20794 16571 1\n7376 198...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nBob is playing a game named \"Walk on Matrix\".\n\nIn this game, player is given an n × m matrix A=(a_{i,j}),...
[{"input": "127382\n", "output": "2 3\n258454 131072 0\n127382 258454 127382\n"}, {"input": "117079\n", "output": "2 3\n248151 131072 0\n117079 248151 117079\n"}, {"input": "101472\n", "output": "2 3\n232544 131072 0\n101472 232544 101472\n"}, {"input": "100461\n", "output": "2 3\n231533 131072 0\n100461 231533 100461\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nLittle Petya loves looking for numbers' divisors. One day Petya came across the following problem:\n\nYou are...
[{"input": "20\n68260 0\n819 1\n54174 1\n20460 1\n25696 2\n81647 4\n17736 4\n91307 5\n5210 4\n87730 2\n4653 8\n11044 6\n15776 4\n17068 7\n73738 7\n36004 12\n83183 7\n75700 12\n84270 14\n16120 5\n", "output": "12\n11\n6\n44\n18\n1\n9\n7\n6\n12\n8\n8\n21\n3\n14\n3\n3\n13\n18\n26\n"}, {"input": "20\n68260 0\n819 1\n54174 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nRead problems statements in Mandarin Chinese and Russian. \n\nOnce Chef decided to divide the tangerine into...
[{"input": "2\n10 3 2\n1 5\n5 5\n6 10\n1 5\n6 10\n10 3 0\n4 5\n10 1\n12 18\n1 10", "output": "Yes\nYes\n"}, {"input": "2\n10 3 2\n1 5\n5 5\n6 10\n1 5\n6 10\n10 3 0\n4 5\n10 1\n12 9\n1 10", "output": "Yes\nYes\n"}, {"input": "2\n10 3 2\n1 4\n10 5\n6 10\n1 5\n6 10\n10 3 0\n4 5\n10 1\n6 9\n1 10", "output": "Yes\nYes\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\nVasya has a beautiful garden where wonderful fruit trees grow and yield fantastic harvest every year. But lat...
[{"input": "10 10\n1 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n1 0 1 0 1 1 1 1 0 1\n1 1 0 1 1 1 0 0 0 1\n0 1 0 1 1 1 0 1 1 1\n1 0 1 0 1 0 1 1 1 1\n1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 0 1 1\n1 1 1 1 0 1 1 1 1 1\n0 1 1 1 1 0 1 1 0 1\n10 10\n", "output": "79\n"}, {"input": "10 10\n1 0 1 1 1 1 1 1 1 1\n1 1 1 0 1 1 0 1 1 1\n1 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn this Kata, you will be given two positive integers `a` and `b` and your task will be to apply the followin...
[{"input": "19394\n19394", "output": "[[19394, 19394]]", "fn_name": "solve"}, {"input": "8796203\n7556", "output": "[[1019, 1442]]", "fn_name": "solve"}, {"input": "7\n11", "output": "[[7, 11]]", "fn_name": "solve"}, {"input": "6\n19", "output": "[[6, 7]]", "fn_name": "solve"}, {"input": "22\n5", "output": "[[0, 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\nYou are given a string $s$ of length $n$, which consists only of the first $k$ letters of the Latin alphabet....
[{"input": "76 26\nABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPQRSTUVWXY\n", "output": "26\n"}, {"input": "76 26\nABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYABCDEFGHIJKLMNOPQRSTUVWXY\n", "output": "26"}, {"input": "22 1\nAAAAAAAAAAAAAAAAAAAAAA\n", "output": "22\n"}, {"input": "22 1\nAAAAA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nChef talks a lot on his mobile phone. As a result he exhausts his talk-value (in Rokdas) very quickly. One da...
[{"input": "4\n1.00 90 1\n1 1.7525489781557062 28\n1.3670910027404404 200 2\n2 0.75 40\n5 1.2448234862135843 101\n1.690723151930112 50 2\n1 1.4388842285899601 65\n2 2.296376152318535 100\n1.00 000 2\n3 1.1116288236865874 10\n4 1.5704897737882006 36", "output": "0\n1\n0\n0\n"}, {"input": "4\n1.00 200 1\n1 0.50 42\n1.00 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nWe have a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row fro...
[{"input": "80 80\n80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80\n80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nIn Morse code, an letter of English alphabet is represented as a string of some length from $1$ to $4$. Moreo...
[{"input": "100\n1\n0\n0\n1\n0\n0\n1\n1\n0\n0\n1\n0\n0\n0\n0\n0\n1\n1\n0\n0\n0\n1\n1\n1\n1\n0\n0\n1\n1\n0\n1\n1\n0\n1\n1\n1\n1\n0\n0\n0\n0\n0\n0\n1\n1\n0\n0\n1\n1\n1\n1\n0\n1\n0\n0\n0\n1\n0\n0\n1\n0\n1\n1\n1\n1\n1\n0\n1\n0\n0\n1\n1\n0\n0\n1\n0\n0\n1\n1\n0\n0\n0\n1\n0\n0\n0\n0\n0\n0\n1\n1\n0\n0\n0\n0\n1\n0\n0\n0\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\nCreate a program that reads the attendance numbers of students in a class and the data that stores the ABO bl...
[{"input": "1,B\n2,A\n3,B\n4,AB\n5,B\n5,O\n7,A\n8,O\n9,AB\n10,A\n11,A\n12,B\n13,AB\n14,A", "output": "5\n4\n3\n2\n"}, {"input": "1,B\n2,B\n3,B\n4,AB\n5,B\n6,O\n7,A\n8,O\n9,AB\n10,A\n11,A\n12,B\n13,AB\n14,A", "output": "4\n5\n3\n2\n"}, {"input": "1,B\n2,A\n3,B\n4,AB\n5,A\n6,O\n7,A\n8,O\n9,AB\n11,A\n11,A\n12,B\n13,AB\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\nComplete the function to determine the number of bits required to convert integer `A` to integer `B` (where `...
[{"input": "312312312\n5645657", "output": "[13]", "fn_name": "convert_bits"}, {"input": "43\n2009989843", "output": "[17]", "fn_name": "convert_bits"}, {"input": "127681\n127681", "output": "[0]", "fn_name": "convert_bits"}, {"input": "31\n14", "output": "[2]", "fn_name": "convert_bits"}, {"input": "7\n17", "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\n## Witamy!\n\nYou are in Poland and want to order a drink. You need to ask \"One beer please\": \"Jedno piwo ...
[{"input": "99", "output": "[\"Dziewiecdziesiat dziewiec piw poprosze\"]", "fn_name": "ordering_beers"}, {"input": "98", "output": "[\"Dziewiecdziesiat osiem piw poprosze\"]", "fn_name": "ordering_beers"}, {"input": "44", "output": "[\"Czterdziesci cztery piwa poprosze\"]", "fn_name": "ordering_beers"}, {"input": "21",...
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\nProblem statement\n\nMeatishi can increase or decrease the number of fingers.\nThere are n buns in front of N...
[{"input": "1237235", "output": "21\n"}, {"input": "140502", "output": "18\n"}, {"input": "299812", "output": "19\n"}, {"input": "763679", "output": "20\n"}, {"input": "17679", "output": "15\n"}, {"input": "33209", "output": "16\n"}, {"input": "96405", "output": "17\n"}, {"input": "1241", "output": "11\n"}, {"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\nAs we all know Barney's job is \"PLEASE\" and he has not much to do at work. That's why he started playing \"...
[{"input": "12\n254904759290707697 475737283258450340 533306428548398547 442127134828578937 779740159015946254 272877594683860919 93000149670491971 349640818793278778 498293278222136720 551099726729989816 149940343283925029 1677751211246811281\n", "output": "144527324/433581971\n"}, {"input": "12\n254904759290707697 50...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nThere is an ice cream shop named Ten Ice Cream. At this store, we always have 10 types of ice cream on the sh...
[{"input": "15\n2\n6\n7\n0\n1\n9\n8\n7\n4\n8\n9\n1\n9\n4\n2\n1\n2\n1\n0\n0", "output": "*\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-\n-\n"}, {"input": "15\n1\n6\n7\n0\n1\n9\n8\n7\n4\n8\n9\n1\n9\n4\n2\n1\n2\n1\n0\n0", "output": "*\n***\n*\n-\n**\n-\n*\n**\n**\n***\n-\n-\n*...
code_stdio