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\nCasimir has a rectangular piece ... | [{"type": "stdin_stdout", "input": "8\n2 3 1\n*.*\n...\n4 9 2\n*.*.*...*\n.*.*...*.\n..*.*.*..\n.....*...\n4 4 1\n*.*.\n****\n.**.\n....\n5 5 1\n.....\n*...*\n.*.*.\n..*.*\n...*.\n5 5 2\n.....\n*...*\n.*.*.\n..*.*\n...*.\n4 7 1\n*.....*\n.....*.\n..*.*..\n...*...\n3 3 1\n***\n***\n***\n3 5 1\n*...*\n.***.\n.**..\n", "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\nGildong is playing with his dog,... | [{"type": "stdin_stdout", "input": "3\n3\n1 2\n2 3\n4\n1 2\n2 3\n3 4\n5\n1 2\n2 3\n3 4\n4 5\n3 6\n6 7\n5 13\n", "output": "2\n3\n4\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 2\n2 3\n4\n1 2\n2 3\n3 4\n4\n1 2\n1 3\n3 4\n1 5\n3 8\n6 13\n5 8\n", "output": "2\n3\n2\n"}, {"type": "stdin_stdout", "input": "3\n3\n1 2\n2 3... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWe have a directed weighted grap... | [{"type": "stdin_stdout", "input": "6\n43 35\n97 26\n77 48\n133 16\n110 5\n154 15", "output": "140\n"}, {"type": "stdin_stdout", "input": "6\n43 35\n97 26\n77 48\n133 31\n110 5\n154 15", "output": "155\n"}, {"type": "stdin_stdout", "input": "6\n43 35\n97 26\n77 48\n133 36\n110 5\n154 15", "output": "160\n"}, {"type": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA bracket sequence is called reg... | [{"type": "stdin_stdout", "input": "12\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n", "output": "YES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "12\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n(??)\n", "output": "YES\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n# Task\n You are given a `moment... | [{"input": "\"12:30 am\"", "output": "[[false, false, true]]", "fn_name": "moment_of_time_in_space"}, {"input": "\"12:02 pm\"", "output": "[[false, true, false]]", "fn_name": "moment_of_time_in_space"}, {"input": "\"01:00 pm\"", "output": "[[true, false, false]]", "fn_name": "moment_of_time_in_space"}, {"input": "\"11:... | 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 witch named Marie lived deep i... | [{"type": "stdin_stdout", "input": "5 4\n1 2\n2 3\n3 4\n4 5\n4 6\n1 2\n1 3\n1 4\n2 4\n2 4\n3 4\n5 0\n0 0", "output": "yes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "5 4\n1 2\n2 3\n3 4\n4 5\n7 6\n1 2\n1 3\n1 4\n2 4\n2 4\n3 4\n5 0\n0 0", "output": "yes\nno\nyes\n"}, {"type": "stdin_stdout", "input": "5 4\n1 2\n2 3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSpin-off of this kata, here you ... | [{"input": "[8, 2, 6, 3, 7, 2, 5, 1, 4]", "output": "[2]", "fn_name": "find_dup"}, {"input": "[1, 3, 2, 5, 4, 5, 7, 6]", "output": "[5]", "fn_name": "find_dup"}, {"input": "[5, 4, 3, 2, 1, 1]", "output": "[1]", "fn_name": "find_dup"}, {"input": "[1, 1, 2, 3]", "output": "[1]", "fn_name": "find_dup"}, {"input": "[1, 2, ... | 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 the strings $a$ an... | [{"type": "stdin_stdout", "input": "5\na\na\nabcd\nbc\nhello\ncodeforces\nhello\nhelo\ndhjakjsnasjhfksafasd\nadjsnasjhfksvdafdser\n", "output": "\n0\n2\n13\n3\n20\n"}, {"type": "stdin_stdout", "input": "5\na\na\nabcd\nbc\nhello\ncodeforces\nhello\nhelo\ndhjakjsnasjhfksafasd\nadjsnasjhfksvdafdser\n", "output": "0\n2\n13... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 flower shop has got n bouquets... | [{"type": "stdin_stdout", "input": "25\n742168 377547 485672 437223 96307 902863 759104 747933 512899 410317 588598 666688 823202 257684 520631 910066 168864 71499 899972 565350 764848 754913 929040 864132 289976\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "25\n742168 377547 485672 437223 96307 902863 7591... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHeidi's friend Jenny is asking H... | [{"type": "stdin_stdout", "input": "11\n1 0 6646\n2 0 8816\n3 2 9375\n4 2 5950\n5 1 8702\n6 2 2657\n7 2 885\n8 7 2660\n9 2 5369\n10 6 3798\n", "output": "18191\n"}, {"type": "stdin_stdout", "input": "11\n1 0 6646\n2 0 8816\n3 2 9375\n4 2 5950\n5 1 8702\n6 2 2657\n7 2 885\n8 7 2660\n9 2 5369\n10 6 3798\n", "output": "18... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAlice likes snow a lot! Unfortun... | [{"type": "stdin_stdout", "input": "13\n1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1\n"}, {"type": "stdin_stdout", "input": "13\n1 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 1 1 1 1 1 1 1 1 1\n", "output": "1 1 1 1 1 1 1 1 1 1 1 1 1 "}, {"type": "stdin_stdout", "input": "13\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\n### Tongues\n\nGandalf's writing... | [{"input": "\"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\"", "output": "[\"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\"]", "fn_name": "tongues"}, {"input": "\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... | 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\nSnuke has N strings. The i-th st... | [{"type": "stdin_stdout", "input": "9\nBEWPVCRWH\nZQNZYIJX\nBAVREA\nPA\nHJMYITEOX\nBCJHMRMNK\nBP\nQVFABZ\nPRGKSPUNA", "output": "4\n"}, {"type": "stdin_stdout", "input": "9\nBEWPVCRWH\nZQNZYIJX\nAERVAB\nPA\nHJMYITEOX\nBCJHMRMNK\nBP\nQVFABZ\nPRGKSPUNA", "output": "4\n"}, {"type": "stdin_stdout", "input": "9\nBEWPVCRWH\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 an input string s, reverse... | [{"input": "\"Alice does not even like bob\"", "output": "\"bob like even not does Alice\"", "fn_name": "reverseWords"}, {"input": "\" Bob Loves Alice \"", "output": "\"Alice Loves Bob\"", "fn_name": "reverseWords"}, {"input": "\"the sky is blue\"", "output": "\"blue is sky the\"", "fn_name": "reverseWords"}, {"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function called calculat... | [{"input": "3.2\n\"+\"\n8", "output": "[11.2]", "fn_name": "calculate"}, {"input": "3.2\n\"-\"\n8", "output": "[-4.8]", "fn_name": "calculate"}, {"input": "3.2\n\"*\"\n8", "output": "[25.6]", "fn_name": "calculate"}, {"input": "3.2\n\"/\"\n8", "output": "[0.4]", "fn_name": "calculate"}, {"input": "-3\n\"/\"\n0", "outpu... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery evening Vitalya sets n ala... | [{"type": "stdin_stdout", "input": "100 40 20\n148 120 37 65 188 182 199 131 97 174 157 113 62 63 193 8 72 152 138 5 90 48 133 83 197 118 123 2 181 151 53 115 78 177 144 33 196 19 85 104 77 34 173 198 136 44 3 22 86 200 23 129 68 176 29 58 121 56 79 15 159 183 171 60 141 54 158 106 30 17 116 105 190 59 36 46 169 142 16... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUjan decided to make a new woode... | [{"type": "stdin_stdout", "input": "10\n1\n1\n2\n2 1\n3\n3 1 2\n3\n2 2 2\n4\n4 1 4 2\n5\n5 4 3 4 1\n5\n1 2 3 4 5\n6\n3 2 1 6 2 2\n10\n4 5 2 9 6 10 3 7 1 8\n10\n1 3 2 2 2 9 10 10 9 10\n", "output": "1\n1\n2\n2\n2\n3\n3\n2\n5\n5\n"}, {"type": "stdin_stdout", "input": "10\n1\n1\n2\n2 1\n3\n3 1 2\n3\n2 2 2\n4\n4 1 4 1\n5\n... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n\"Duel!\"\n\nBetting on the love... | [{"type": "stdin_stdout", "input": "30 27\n000000000010110000101111111111\n", "output": "tokitsukaze\n"}, {"type": "stdin_stdout", "input": "30 27\n100000000010110000101111111111\n", "output": "tokitsukaze\n"}, {"type": "stdin_stdout", "input": "30 16\n100000000010110000101111111111\n", "output": "once again\n"}, {"typ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis time Baby Ehab will only cu... | [{"type": "stdin_stdout", "input": "6 3\n2 3 10 12 5 14\n1 6\n2 4\n3 5\n", "output": "4\n2\n2\n"}, {"type": "stdin_stdout", "input": "6 3\n1 3 10 6 10 14\n1 6\n2 4\n3 5\n", "output": "4\n2\n3\n"}, {"type": "stdin_stdout", "input": "6 3\n1 5 10 6 10 14\n1 6\n2 4\n3 5\n", "output": "5\n3\n3\n"}, {"type": "stdin_stdout", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour friend has n cards.\n\nYou ... | [{"type": "stdin_stdout", "input": "01234567890123456789012345678901234567890123456789\n", "output": "25\n"}, {"type": "stdin_stdout", "input": "qwertyuioplkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcvb\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "kaq7jyialrfp4ilkni90eq8v3amcbygon7py0hb8z26fbl8ss1\n", "output": "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou received a whatsup message f... | [{"input": "\"Hallo, wie geht's dir?\"", "output": "[true]", "fn_name": "validate_hello"}, {"input": "\"hombre! Hola!\"", "output": "[true]", "fn_name": "validate_hello"}, {"input": "\"hallo, salut\"", "output": "[true]", "fn_name": "validate_hello"}, {"input": "\"ciao bella!\"", "output": "[true]", "fn_name": "validat... | 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 few years ago Sajjad left his ... | [{"type": "stdin_stdout", "input": "120494\n", "output": "60246\n"}, {"type": "stdin_stdout", "input": "116591\n", "output": "58295\n"}, {"type": "stdin_stdout", "input": "110052\n", "output": "55025\n"}, {"type": "stdin_stdout", "input": "101000\n", "output": "50499\n"}, {"type": "stdin_stdout", "input": "150380\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 a harder version of the ... | [{"type": "stdin_stdout", "input": "100\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 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 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Number encrypting: cypher\n## ... | [{"input": "\"I do not know what else I can test. Be cool. Good luck\"", "output": "[\"1 d0 n07 kn0w wh47 3153 1 c4n 7357. 83 c001. 600d 1uck\"]", "fn_name": "cypher"}, {"input": "\"IlRzEeAaSsGbTtBgOo\"", "output": "[\"112233445566778900\"]", "fn_name": "cypher"}, {"input": "\"I am your father\"", "output": "[\"1 4m y0... | 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\nSanta has $n$ candies and he wan... | [{"type": "stdin_stdout", "input": "5\n5 3\n19 4\n12 7\n10 2\n100001 44619\n", "output": "4\n18\n10\n10\n100001\n"}, {"type": "stdin_stdout", "input": "5\n5 3\n12 4\n12 7\n10 2\n100001 44619\n", "output": "4\n12\n10\n10\n100001\n"}, {"type": "stdin_stdout", "input": "5\n10 2\n1 11\n5 11\n11 1\n110001 90586\n", "output"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nA Ministry for Defense sent a ge... | [{"type": "stdin_stdout", "input": "100\n66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 55 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 66 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAt first, let's define function ... | [{"type": "stdin_stdout", "input": "1000000000000000000 1\n", "output": "1000000000000000000\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 100\n", "output": "31249999999999998\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 10000\n", "output": "244140624999998\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\n-----Input-----\n\nThe input con... | [{"type": "stdin_stdout", "input": "ALKALINITY\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "ALLALINITY\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "YTINILALLA\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "UNSCRAMBLE\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "ALKAL... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is one apple tree in Arkad... | [{"type": "stdin_stdout", "input": "10\n1 1 2 4 2 4 1 8 8\n", "output": "1 1 1 1 1 1 2 2 3 6 \n"}, {"type": "stdin_stdout", "input": "10\n1 2 2 3 3 4 4 5 5\n", "output": "1 1 1 1 1 2 2 3 5 5 \n"}, {"type": "stdin_stdout", "input": "10\n1 1 1 1 1 1 1 1 1\n", "output": "1 1 1 1 1 1 1 1 1 9 \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\nWhen provided with a String, cap... | [{"input": "\"HelloWorld!\"", "output": "[\"HEllOWOrld!\"]", "fn_name": "swap"}, {"input": "\"abracadabra\"", "output": "[\"AbrAcAdAbrA\"]", "fn_name": "swap"}, {"input": "\"Codewars\"", "output": "[\"COdEwArs\"]", "fn_name": "swap"}, {"input": "\"Sunday\"", "output": "[\"SUndAy\"]", "fn_name": "swap"}, {"input": "\"Mo... | 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\nOnce Max found an electronic cal... | [{"type": "stdin_stdout", "input": "222145 353252\n", "output": "3860750\n"}, {"type": "stdin_stdout", "input": "222145 353252\n", "output": "3860750\n"}, {"type": "stdin_stdout", "input": "188883 353252\n", "output": "4803878\n"}, {"type": "stdin_stdout", "input": "188883 240204\n", "output": "1479377\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\nGray code is a form of binary en... | [{"input": "[1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0]", "output": "[[1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMutual Recursion allows us to ta... | [{"input": "25", "output": "[16]", "fn_name": "f"}, {"input": "10", "output": "[6]", "fn_name": "f"}, {"input": "15", "output": "[9]", "fn_name": "f"}, {"input": "0", "output": "[1]", "fn_name": "f"}, {"input": "5", "output": "[3]", "fn_name": "f"}] | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a method `sayHello`/`say_... | [{"input": "[\"Franklin\", \"Delano\", \"Roosevelt\"]\n\"Chicago\"\n\"Illinois\"", "output": "[\"Hello, Franklin Delano Roosevelt! Welcome to Chicago, Illinois!\"]", "fn_name": "say_hello"}, {"input": "[\"Wallace\", \"Russel\", \"Osbourne\"]\n\"Albany\"\n\"New York\"", "output": "[\"Hello, Wallace Russel Osbourne! Welc... | 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\nHamed has recently found a strin... | [{"type": "stdin_stdout", "input": "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\nvvvvvvvv\n", "output": "2728075\n"}, {"type": "stdin_stdout", "input": "vnssnssnssnssnssnssnssnssnssnssnssnssnssnssnssnssn\nnssnssns\n", "output": "943392\n"}, {"type": "stdin_stdout", "input": "kpjmawawawawawawawawawawawawawawawawa... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecall that the bracket sequence... | [{"type": "stdin_stdout", "input": "9999 41526212\n", "output": "(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNuske has a grid with N rows and... | [{"type": "stdin_stdout", "input": "5 5 6\n11010\n01110\n10111\n11111\n01010\n1 1 5 5\n1 2 4 5\n2 3 3 5\n3 3 3 2\n3 1 3 5\n1 1 3 4", "output": "-2\n-2\n0\n0\n2\n1\n"}, {"type": "stdin_stdout", "input": "5 5 6\n11010\n01110\n10111\n11111\n01010\n1 1 5 5\n1 2 4 5\n3 3 3 5\n3 3 3 2\n3 1 3 5\n1 1 3 4", "output": "-2\n-2\n1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe Binomial Form of a polynomia... | [{"input": "[1, 1, 1, 1, 7, 0, 5]\n2", "output": "[12]", "fn_name": "value_at"}, {"input": "[1, 2, 7, 0, 5]\n0.6", "output": "[4.24]", "fn_name": "value_at"}, {"input": "[1, 2, 7, 0, 5]\n0", "output": "[5.0]", "fn_name": "value_at"}, {"input": "[1, 2, 7, 0, 5]\n2", "output": "[12]", "fn_name": "value_at"}, {"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\nFor a positive integer X, let f(... | [{"type": "stdin_stdout", "input": "10000000\n", "output": "838627288460105\n"}, {"type": "stdin_stdout", "input": "11001000", "output": "1020696029789074\n"}, {"type": "stdin_stdout", "input": "11000000", "output": "1020504841032058\n"}, {"type": "stdin_stdout", "input": "11001001", "output": "1020696117797082\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\nVasya wrote down two strings s o... | [{"type": "stdin_stdout", "input": "340\nbaa?b?abab??ab??aaabaa???bbbb??abaaaba?a?b?bb?ab?bbaa??aaaa???aaa?b???ba?a??b?bb?bbbabb?bb?a?a?bbbabbba?b?ababbb?b?a??bbb??bb?ababb?abbbbba??aabbaab?aaa??a???bbaa?bb?bb?babaa?bb?a???b?abbb???bb?a?a??b?b?abbba?b??a?bab??baa?aabaabb?abbbab?aa???bbaab?bbab?ba?aab?b?baabb???aaa??bb?... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThree numbers A, B and C are the... | [{"type": "stdin_stdout", "input": "3\n120 11 400\n10213 312 10\n10 3 450\n", "output": "120\n312\n10\n"}, {"type": "stdin_stdout", "input": "3 \n120 14 400\n10213 312 10\n10 3 450", "output": "120\n312\n10\n"}, {"type": "stdin_stdout", "input": "3 \n117 14 384\n10213 312 10\n10 3 450", "output": "117\n312\n10\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 family consisting of father be... | [{"type": "stdin_stdout", "input": "100 99 98 97\n", "output": "196\n195\n98\n"}, {"type": "stdin_stdout", "input": "100 50 19 10\n", "output": "100\n50\n19\n"}, {"type": "stdin_stdout", "input": "100 50 19 25\n", "output": "100\n51\n25\n"}, {"type": "stdin_stdout", "input": "100 50 19 30\n", "output": "100\n61\n30\n"}... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe image shows how we can obtai... | [{"input": "2\n10\n20", "output": "[7.1429]", "fn_name": "harmon_pointTrip"}, {"input": "6\n10\n11", "output": "[9.3333]", "fn_name": "harmon_pointTrip"}, {"input": "5\n17\n20", "output": "[15.0]", "fn_name": "harmon_pointTrip"}, {"input": "3\n9\n18", "output": "[6.75]", "fn_name": "harmon_pointTrip"}, {"input": "4\n12... | 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\nEfim just received his grade for... | [{"type": "stdin_stdout", "input": "320 142\n2704701300865535.432223312233434114130011113220102420131323010344144201124303144444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444447444444444444444444444444444444615444444482101673308979557675074444444444444446... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\nYou have to write a ... | [{"input": "7", "output": "[\" 1 \\n 121 \\n 12321 \\n 1234321 \\n 123454321 \\n 12345654321 \\n1234567654321\"]", "fn_name": "pattern"}, {"input": "4", "output": "[\" 1 \\n 121 \\n 12321 \\n1234321\"]", "fn_name": "pattern"}, {"input": "-25", "output": "[\"\"]", "fn_name": "pattern"... | 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\nPrincess'Marriage\n\nMarriage of... | [{"type": "stdin_stdout", "input": "2 8\n7 6\n4 10\n3 2\n5 10\n3 10\n5 10\n0 0", "output": "18\n110\n"}, {"type": "stdin_stdout", "input": "2 8\n7 6\n4 10\n3 3\n5 10\n3 10\n5 10\n0 0", "output": "18\n100\n"}, {"type": "stdin_stdout", "input": "2 8\n5 6\n5 5\n3 3\n4 10\n13 10\n5 10\n0 0", "output": "10\n190\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given strings s and t. F... | [{"type": "stdin_stdout", "input": "abracadabra\navaeakedavra", "output": "aaadara\n"}, {"type": "stdin_stdout", "input": "abracbdaara\navadakedavra", "output": "aadaara\n"}, {"type": "stdin_stdout", "input": "abracbdaara\narvadekadava", "output": "aradaaa\n"}, {"type": "stdin_stdout", "input": "araadbcarba\narvadekada... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 a *khm*mad*khm* scientis... | [{"input": "61", "output": "[[2, 8, 18, 32, 1]]", "fn_name": "atomic_number"}, {"input": "47", "output": "[[2, 8, 18, 19]]", "fn_name": "atomic_number"}, {"input": "50", "output": "[[2, 8, 18, 22]]", "fn_name": "atomic_number"}, {"input": "52", "output": "[[2, 8, 18, 24]]", "fn_name": "atomic_number"}, {"input": "60", ... | 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 City company developing compu... | [{"type": "stdin_stdout", "input": "2558402827158016680\n", "output": "1015239217126197\n"}, {"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "396825396825396\n"}, {"type": "stdin_stdout", "input": "1209365011581446835\n", "output": "479906750627558\n"}, {"type": "stdin_stdout", "input": "1155798879... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet {\\rm comb}(n,r) be the numb... | [{"type": "stdin_stdout", "input": "5\n20 13 1 4 20", "output": "20 13\n"}, {"type": "stdin_stdout", "input": "5\n36 13 1 8 10", "output": "36 13\n"}, {"type": "stdin_stdout", "input": "5\n36 13 1 8 17", "output": "36 17\n"}, {"type": "stdin_stdout", "input": "5\n1 10 -1 2 16", "output": "16 10\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\nMike has a string s consisting o... | [{"type": "stdin_stdout", "input": "scfwrjevejrwfcs\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "thdaonpepdoadht\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "scfwrievejrwfcs\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "thdaodpepnoadht\n", "output": "YES\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\nWhen you play the game of throne... | [{"type": "stdin_stdout", "input": "20 53\n1 2\n1 4\n1 5\n1 6\n1 7\n1 8\n1 20\n2 3\n2 6\n2 16\n2 17\n3 6\n3 18\n3 20\n4 6\n4 7\n4 8\n4 9\n4 14\n4 18\n5 11\n5 13\n5 17\n5 18\n5 19\n6 8\n6 13\n7 8\n7 10\n7 15\n7 17\n7 18\n8 15\n8 16\n9 10\n9 15\n10 11\n10 17\n10 20\n11 15\n11 16\n12 14\n12 15\n12 16\n12 19\n14 16\n14 19\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a sequence $a_1, a... | [{"type": "stdin_stdout", "input": "100\n49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 100 49 49 49 100 2 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\nRead problems statements in Mand... | [{"type": "stdin_stdout", "input": "2\nABAA\n@BC", "output": "ABA\n-1\n"}, {"type": "stdin_stdout", "input": "2\nBABB\n?BB", "output": "BAB\n-1\n"}, {"type": "stdin_stdout", "input": "2\nAA?A\nBBB", "output": "-1\n-1\n"}, {"type": "stdin_stdout", "input": "2\nABAA\nBAA", "output": "ABA\nA\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\nPolycarp takes part in a quadcop... | [{"type": "stdin_stdout", "input": "-100 -100\n-100 100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "-100 -100\n100 -100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "100 -100\n-100 -100\n", "output": "406\n"}, {"type": "stdin_stdout", "input": "-100 100\n-100 -100\n", "output": "406\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWoken up by the alarm clock Igor... | [{"type": "stdin_stdout", "input": "7 7\n.S.****\n...*.*.\n.****..\n.*.**.*\n..T*...\n***..*.\n**+****\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "7 7\n.S.****\n...*.*.\n.****..\n.*.**.*\n..T*...\n***..*.\n****+**\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "7 7\n.S.****\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\nTomash keeps wandering off and g... | [{"type": "stdin_stdout", "input": "8 56\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n2 1\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n3 1\n3 2\n3 4\n3 5\n3 6\n3 7\n3 8\n4 1\n4 2\n4 3\n4 5\n4 6\n4 7\n4 8\n5 1\n5 2\n5 3\n5 4\n5 6\n5 7\n5 8\n6 1\n6 2\n6 3\n6 4\n6 5\n6 7\n6 8\n7 1\n7 2\n7 3\n7 4\n7 5\n7 6\n7 8\n8 1\n8 2\n8 3\n8 4\n8 5\n8 6\n8 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\nSimple, given a string of words,... | [{"input": "\"turns out random test cases are easier than writing out basic ones\"", "output": "[3]", "fn_name": "find_short"}, {"input": "\"bitcoin take over the world maybe who knows perhaps\"", "output": "[3]", "fn_name": "find_short"}, {"input": "\"i want to travel the world writing code one day\"", "output": "[1]"... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nKatie, Kuro and Shiro are best f... | [{"type": "stdin_stdout", "input": "1000000000000000000\n", "output": "1000000000000000001\n"}, {"type": "stdin_stdout", "input": "1043714136496022950\n", "output": "1043714136496022951\n"}, {"type": "stdin_stdout", "input": "1837625121252532586\n", "output": "1837625121252532587\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\nAs you might know, cooking is th... | [{"type": "stdin_stdout", "input": "3\n-2 2\n5 10\n1 11", "output": "2\n555841676\n110\n"}, {"type": "stdin_stdout", "input": "3\n-2 2\n4 15\n1 12", "output": "2\n286982263\n132\n"}, {"type": "stdin_stdout", "input": "3\n-16 2\n10 13\n1 6", "output": "2\n131267026\n30\n"}, {"type": "stdin_stdout", "input": "3\n-8 2\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\nSolve the following coding problem using the programming language python:\n\nDr. Moriarty is about to send a ... | [{"type": "stdin_stdout", "input": "ksmbytfyhhnstlecripupiwdhbkhfpfmimrbqgszohcqnezcybvwasxmkxfupvuecsctcpadccnqexsglwaiyxcoyheefcjmdedesgjqdtqgrvfjonzesffousooutsjumrxl\nhgjqihcfbnmgufonaiudbjegexexthrzcdkuimwogpbyovemztzcmqnrbhabxyyxyfuzpyhjgnioexbezzupcxlyzuuncstiiqsjzdtqppqhxilvqimlpjejiqbwpeekzweeyvthvjffgfvqauqru... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCalculate the number of items in... | [{"input": "[6, 6, 6, 6, 6, 6]\n[6, null, null, 6, 6, null]", "output": "[0.5]", "fn_name": "vector_affinity"}, {"input": "[6]\n[6, 6, 6, 6, 6, 6]", "output": "[0.16666666666666666]", "fn_name": "vector_affinity"}, {"input": "[1, 2, 3, 4]\n[1, 2, 3, 5]", "output": "[0.75]", "fn_name": "vector_affinity"}, {"input": "[1,... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn order to put away old things ... | [{"type": "stdin_stdout", "input": "1000000000000000000 2\n", "output": "61\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 \n"}, {"type": "stdin_stdout", "input": "1000000000000000000 2\n", "output": "61\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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\nStick n circular stickers with a... | [{"type": "stdin_stdout", "input": "15\n3.13979,8.51743\n2.39506,3.84915\n2.68432,5.39095\n5.61904,9.16332\n7.85653,4.75593\n2.84021,5.41511\n1.79500,8.59211\n7.55389,8.17604\n4.70665,4.66125\n1.63470,4.42538\n7.34959,4.61981\n5.09003,8.11122\n5.24373,1.30066\n0.13517,1.83659\n7.57313,1.58150\n0", "output": "4\n"}, {"t... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRecently, Anton has found a set.... | [{"type": "stdin_stdout", "input": "{a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a, a... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 dishes, numbered 1, ... | [{"type": "stdin_stdout", "input": "10\n1 3 2 3 3 2 3 2 1 3", "output": "54.48064457488221"}, {"type": "stdin_stdout", "input": "10\n1 3 2 2 3 2 3 2 1 3", "output": "52.8643923040\n"}, {"type": "stdin_stdout", "input": "10\n1 3 3 3 3 2 3 2 1 3", "output": "55.9466970748\n"}, {"type": "stdin_stdout", "input": "10\n1 3 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\nValera the horse lives on a plan... | [{"type": "stdin_stdout", "input": "37 -100\n", "output": "400\n"}, {"type": "stdin_stdout", "input": "100 100\n", "output": "397\n"}, {"type": "stdin_stdout", "input": "-96 -96\n", "output": "383\n"}, {"type": "stdin_stdout", "input": "100 100\n", "output": "397\n"}, {"type": "stdin_stdout", "input": "37 -100\n", "out... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this Kata, you will implement... | [{"input": "50000000", "output": "[363233781]", "fn_name": "count"}, {"input": "5000000", "output": "[31323382]", "fn_name": "count"}, {"input": "500000", "output": "[2632342]", "fn_name": "count"}, {"input": "50000", "output": "[213237]", "fn_name": "count"}, {"input": "5000", "output": "[16326]", "fn_name": "count"},... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn computer science, cycle detec... | [{"input": "[1, 1, 1, 1, 1, 1, 1, 1]", "output": "[[0, 1]]", "fn_name": "cycle"}, {"input": "[1, 2, 3, 4, 2, 3, 4]", "output": "[[1, 3]]", "fn_name": "cycle"}, {"input": "[2, 3, 4, 2, 3, 4]", "output": "[[0, 3]]", "fn_name": "cycle"}, {"input": "[1, 2, 3, 4]", "output": "[[]]", "fn_name": "cycle"}, {"input": "[7]", "ou... | 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\nCreate a program to determine th... | [{"type": "stdin_stdout", "input": "1 1\n6 0\n3 3\n3 0\n3\n3 11\n1 3\n11 16\n12 4\n5\n15 4\n17 12\n22 5\n7 22\n3\n5 13\n16 2\n16 9\n5 3\n1\n0 0", "output": "b\nd\nd\nd\n"}, {"type": "stdin_stdout", "input": "1 1\n6 0\n3 3\n3 2\n3\n3 11\n1 3\n11 16\n12 7\n5\n15 3\n17 7\n22 5\n7 12\n4\n5 13\n13 2\n16 9\n5 3\n2\n0 0", "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\nSolve the following coding problem using the programming language python:\n\nI always thought that my old fri... | [{"input": "0\n200", "output": "[[[\"M: 37\", \"B: 5\", \"C: 4\"], [\"M: 100\", \"B: 14\", \"C: 11\"], [\"M: 163\", \"B: 23\", \"C: 18\"]]]", "fn_name": "howmuch"}, {"input": "20000\n20100", "output": "[[[\"M: 20008\", \"B: 2858\", \"C: 2223\"], [\"M: 20071\", \"B: 2867\", \"C: 2230\"]]]", "fn_name": "howmuch"}, {"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\nSolve the following coding problem using the programming language python:\n\nPolycarp is an organizer of a Be... | [{"type": "stdin_stdout", "input": "4\n7\n1 3 1 2 1 2 1\n12 8 3 2 5 1 5\n10\n2 2 2 4 2 2 2 6 3 3\n3435 3014 2197 4336 2893 1527 5359 2175 1961 2567\n6\n3 6 3 3 3 3\n0 11 6 5 9 7\n1\n1\n278\n", "output": "36 28 22 25 0 0 0\n29464 22953 18425 14701 16898 18425 0 0 0 0\n38 27 22 27 27 0\n278\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\nBerland annual chess tournament ... | [{"type": "stdin_stdout", "input": "100\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 mobile application store has... | [{"type": "stdin_stdout", "input": "1\n100 26\ns................PPPP.CCCCC..UUUUUU.........YYYQQQQQQQ...GGGGG............MMM.....JJJJ..............\n.OOOOOO....EEE....................................................SSSSSS........LLLLLL......NNNIIII.\n......FFFFFF...VVVV..ZZZBBB...KKKKK..WWWWWWWXXX..RRRRRRR......AAAAADD... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 names of two days ... | [{"type": "stdin_stdout", "input": "wednesday\nwednesday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nwednesday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nsaturday\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "wednesday\nsaturday\n", "output": "YES\n"}, {... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMr. A came to Aizu for sightseei... | [{"type": "stdin_stdout", "input": "8 4\n2 1 3 1 1 5 1 3\n2 3 2 4 1 0 2 1\n0 3 -1 2 1 1 4 2\n1 2 3 2 1 1 5 4\n0 2 0 1 1 3 2 1\n1 3 1 2 2 4 3 2\n5 1 2 1 4 1 1 5\n4 1 1 -1 1 2 2 1\n2 -1 -1 -1\n0 3 -1 -1\n-1 2 2 4\n-1 1 -1 1\n5 3\n1 0 2 3 5\n2 3 7 2 1\n2 5 4 2 2\n8 9 0 3 3\n3 6 0 4 7\n-1 -1 2\n-1 3 5\n0 4 -1\n0 0", "outp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBrave Ponta has finally arrived ... | [{"type": "stdin_stdout", "input": "2\n1 1\n5 5\n4\n1.0 1.0317956219670807\n1.5068159031079704 3.2675997669892194\n4.150171138530334 2.1332708795299036\n3.0 3.589169796022375\n1\n2.6727744925703703 2.0\n0", "output": "impossible\n4.57812033\nimpossible\n"}, {"type": "stdin_stdout", "input": "2\n1 1\n5 5\n4\n1.0 1.03179... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nValera has array a, consisting o... | [{"type": "stdin_stdout", "input": "43\n761 2165 6131 8874 8980 119 8300 9006 6278 7582 4740 6321 10042 6869 3788 17625 1707 5070 3809 335 2494 8255 1123 1430 190 5712 7313 3286 15423 133 1032 3067 8043 5297 5398 12168 13897 2141 1436 10227 362 8438 2300\n0111011100100011110010011110011011010001101\n", "output": "23536... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nUh oh, Someone at the office has... | [{"input": "[\"301\", \"302\", \"303\", \"304\", \"305\", \"310\", \"311\", \"312\", \"313\", \"314\"]", "output": "[6]", "fn_name": "base_finder"}, {"input": "[\"50\", \"51\", \"61\", \"53\", \"54\", \"60\", \"52\", \"62\", \"55\", \"56\"]", "output": "[7]", "fn_name": "base_finder"}, {"input": "[\"1\", \"2\", \"3\", ... | 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\nWe arrange the numbers between 1... | [{"type": "stdin_stdout", "input": "1\n10\n13\n373", "output": "0\n0\n3\n20\n"}, {"type": "stdin_stdout", "input": "1\n175\n19\n12", "output": "0\n14\n4\n2\n"}, {"type": "stdin_stdout", "input": "1\n175\n19\n16", "output": "0\n14\n4\n0\n"}, {"type": "stdin_stdout", "input": "1\n12\n7\n115", "output": "0\n2\n2\n12\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 representing... | [{"type": "stdin_stdout", "input": "SAT\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "SUN\n", "output": "7\n"}, {"type": "stdin_stdout", "input": "FRI\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "MON\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "THU\n", "output": "3\n"}, {"type": "stdi... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a positive integer N.\n... | [{"type": "stdin_stdout", "input": "1000000\n", "output": "13969985\n"}, {"type": "stdin_stdout", "input": "877046\n", "output": "12137262\n"}, {"type": "stdin_stdout", "input": "999931\n", "output": "13968881\n"}, {"type": "stdin_stdout", "input": "999901\n", "output": "13968459\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\nPolycarp loves lowercase letters... | [{"type": "stdin_stdout", "input": "200\nrsgraosldglhdoorwhkrsehjpuxrjuwgeanjgezhekprzarelduuaxdnspzjuooguuwnzkowkuhzduakdrzpnslauejhrrkalwpurpuuswdgeadlhjwzjgegwpknepazwwleulppwrlgrgedlwdzuodzropsrrkxusjnuzshdkjrxxpgzanzdrpnggdwxarpwohxdepJ\n", "output": "17\n"}, {"type": "stdin_stdout", "input": "200\nMkuxcDWdcnqsrlT... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two arrays $a$ and... | [{"type": "stdin_stdout", "input": "4\n3 4\n0 2 -1\n1 2 2\n\n2 6\n1 4\n2 5\n\n4 4\n2 2 3 -1\n3 5 2 4\n\n1 0\n5\n5\n", "output": "Yes\nYes\nNo\nNo\n"}, {"type": "stdin_stdout", "input": "4\n3 4\n0 2 -1\n1 2 2\n\n2 6\n1 4\n2 5\n\n4 4\n2 2 3 -1\n1 5 2 4\n\n1 0\n5\n5\n", "output": "Yes\nYes\nNo\nNo\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\nVitaly is a very weird man. He's... | [{"type": "stdin_stdout", "input": "3 6 1000000\n", "output": "786609214\n"}, {"type": "stdin_stdout", "input": "8 9 1000000\n", "output": "573697309\n"}, {"type": "stdin_stdout", "input": "1 2 1000000\n", "output": "786609214\n"}, {"type": "stdin_stdout", "input": "1 2 1000000\n", "output": "786609214\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\n## Nova polynomial add\n\nThis k... | [{"input": "[1, 2, 3, 4, 5, 6]\n[]", "output": "[[1, 2, 3, 4, 5, 6]]", "fn_name": "poly_add"}, {"input": "[]\n[1, 2, 3, 4, 5, 6]", "output": "[[1, 2, 3, 4, 5, 6]]", "fn_name": "poly_add"}, {"input": "[1, 2, 3, 4]\n[4, 3, 2, 1]", "output": "[[5, 5, 5, 5]]", "fn_name": "poly_add"}, {"input": "[1, 2]\n[1]", "output": "[[2... | 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 are positive integers A an... | [{"type": "stdin_stdout", "input": "1000000000000 1000000000000\n", "output": "3\n"}, {"type": "stdin_stdout", "input": "642507465600 642507465600\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "963761198400 963761198400\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "200560490130 200560490130\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\nproblem\n\nA mysterious $ X $ [c... | [{"type": "stdin_stdout", "input": "109 30 5\n0\norioan\nnobiro\nuifimd", "output": "109\n"}, {"type": "stdin_stdout", "input": "112 30 9\n0\norioan\nniboro\ntieimd", "output": "112\n"}, {"type": "stdin_stdout", "input": "84 122 10\n0\noobrjn\nonciro\nudfimi", "output": "84\n"}, {"type": "stdin_stdout", "input": "17 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\nproblem\n\nGiven a sequence $ a_... | [{"type": "stdin_stdout", "input": "8\n0 1 1 -24 -1 1 1 0", "output": "1 2 3 5 6 7 8\n"}, {"type": "stdin_stdout", "input": "8\n-1 0 12 16 3 1 0 -1", "output": "1 2 6 7 8\n"}, {"type": "stdin_stdout", "input": "8\n-1 0 12 8 3 1 0 -1", "output": "1 2 6 7 8\n"}, {"type": "stdin_stdout", "input": "8\n5 2 4 4 4 14 2 5", "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\nTakahashi is doing a research on... | [{"type": "stdin_stdout", "input": "33 4 2", "output": "0 0\n0 1\n0 4\n0 5\n0 8\n0 9\n0 12\n0 13\n0 16\n0 17\n0 20\n0 21\n0 24\n0 25\n0 28\n0 29\n0 32\n0 33\n0 36\n0 37\n0 40\n0 41\n0 44\n0 45\n0 48\n0 49\n0 52\n0 53\n0 56\n0 57\n0 60\n0 61\n0 64\n0 65\n2 2\n2 3\n2 6\n2 7\n2 10\n2 11\n2 14\n2 15\n2 18\n2 19\n2 22\n2 23... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven is a sequence of N integer... | [{"type": "stdin_stdout", "input": "100\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 1000 1000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite\n```python\nword_pattern(p... | [{"input": "\"aafggiilp\"\n\"cow cow fly rooster pig sheep sheep chicken aardvark\"", "output": "[false]", "fn_name": "word_pattern"}, {"input": "\"aafggiilp\"\n\"cow cow fly pig pig sheep sheep chicken aardvark\"", "output": "[true]", "fn_name": "word_pattern"}, {"input": "\"abcdef\"\n\"apple banana cat donkey elephan... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's consider one interesting w... | [{"type": "stdin_stdout", "input": "dkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjijdkjij\ndddkikjjidkkidijjjjkkjjikjdikiidijjikikjijjiijdikkjjjiddjjijkkkjkiijijki... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSometimes Mister B has free even... | [{"type": "stdin_stdout", "input": "12 12 876543210 1000000000\n", "output": "13"}, {"type": "stdin_stdout", "input": "10 12 220000011 220000032\n", "output": "11"}, {"type": "stdin_stdout", "input": "3 10 498103029 1063506054\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "13 8 654321109 654321126\n", "output... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are an environmental activis... | [{"type": "stdin_stdout", "input": "4\n1\n100\n50 1\n49 1\n100\n8\n100 200 100 200 100 200 100 100\n10 2\n15 3\n107\n3\n1000000000 1000000000 1000000000\n50 1\n50 1\n3000000000\n5\n200 100 100 100 100\n69 5\n31 2\n90\n", "output": "-1\n6\n3\n4\n"}, {"type": "stdin_stdout", "input": "4\n1\n100\n50 1\n49 1\n100\n8\n100 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\nMonocarp has got an array $a$ co... | [{"type": "stdin_stdout", "input": "4\n4\n8 8 12 14\n3\n50 25 10\n5\n1 4 7 3 5\n7\n-1 2 3 4 1 0 7\n", "output": "0\n0\n2\n0\n"}, {"type": "stdin_stdout", "input": "4\n4\n8 8 12 14\n3\n44 25 10\n5\n1 4 7 3 5\n7\n-1 2 3 4 1 0 7\n", "output": "0\n0\n2\n0\n"}, {"type": "stdin_stdout", "input": "4\n4\n8 8 18 14\n3\n44 25 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\nThere are $n$ candles on a Hanuk... | [{"type": "stdin_stdout", "input": "5\n5\n10010\n11010\n2\n01\n11\n3\n110\n111\n9\n100010111\n111101100\n4\n001011011\n011010111\n", "output": "-1\n1\n-1\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "5\n5\n11000\n01000\n2\n01\n10\n3\n000\n101\n9\n100011111\n101101100\n9\n001001000\n011000101\n", "output": "-1\n2\n-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\nRelative B came to Mr. A's house... | [{"type": "stdin_stdout", "input": "20 21\n1 0\n14 8\n7\n4 0 1 1\n6 -1 1 3\n2 0 3 3\n1 0 5 0\n5 1 7 3\n2 -1 2 7\n2 -1 6 8\n20 20\n9 9\n1 1\n6\n2 0 1 1\n1 0 5 0\n2 1 1 4\n5 0 1 0\n4 1 6 10\n4 0 8 5\n0 0", "output": "NG\nNG\n"}, {"type": "stdin_stdout", "input": "20 21\n1 0\n14 8\n7\n4 0 1 1\n6 -1 1 3\n2 0 3 3\n1 0 5 0\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 is BMI (Body Mass Index) a... | [{"type": "stdin_stdout", "input": "6\n2 165 27\n-1 317 60\n2 68 72\n11 160 75\n7 185 001\n10 182 113\n3\n3 37 105\n0 229 6\n2 204 75\n0", "output": "11\n2\n"}, {"type": "stdin_stdout", "input": "6\n2 95 27\n-1 317 60\n2 68 72\n11 160 75\n7 185 101\n10 182 113\n3\n3 37 105\n0 229 6\n1 204 75\n0", "output": "11\n1\n"}, ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn Aramic language words can onl... | [{"type": "stdin_stdout", "input": "10\nbda bbb cda dca dda dcb bcd dcb ada ddd\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "10\ncda bbb cda dca dda dcb bcd dcb ada ddd\n", "output": "5\n"}, {"type": "stdin_stdout", "input": "10\nbda bbb cda dca dda dcb bcd dcb ada edd\n", "output": "6\n"}, {"type": "stdin_... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.