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\nYou are given n segments on the ...
[{"type": "stdin_stdout", "input": "10 1\n-260424665 -168566709\n299109864 663179811\n769984405 942516913\n-998905510 -707148023\n-167958021 60599275\n658861231 718845364\n79407402 279078536\n13652788 79756488\n-676213666 -339118351\n-349156760 -258185154\n", "output": "5\n-998905510 -707148023\n-676213666 -168566709\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 enough money available ...
[{"input": "1250", "output": "[4]", "fn_name": "solve"}, {"input": "125", "output": "[-1]", "fn_name": "solve"}, {"input": "666", "output": "[-1]", "fn_name": "solve"}, {"input": "770", "output": "[4]", "fn_name": "solve"}, {"input": "550", "output": "[2]", "fn_name": "solve"}, {"input": "42", "output": "[-1]", "fn_nam...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array $a$ consi...
[{"type": "stdin_stdout", "input": "200\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLuba has to do n chores today. i...
[{"type": "stdin_stdout", "input": "100 1 99\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 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\nWe have a string s consisting of...
[{"type": "stdin_stdout", "input": "bxbax", "output": "-1\n"}, {"type": "stdin_stdout", "input": "xxabb", "output": "-1\n"}, {"type": "stdin_stdout", "input": "xyabb", "output": "-1\n"}, {"type": "stdin_stdout", "input": "bbayx", "output": "-1\n"}, {"type": "stdin_stdout", "input": "bb`yx", "output": "-1\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 schoolboy named Vasya loves re...
[{"type": "stdin_stdout", "input": "168\n0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a keyboard that co...
[{"type": "stdin_stdout", "input": "5\nabcdefghijklmnopqrstuvwxyz\nnlleh\nabcxefghijklmnopqrstuvwdyz\ni\nabcdefghhjllmnzpqrstuvwxyo\ncodeforecs\nmnbvcxzlkjhefdsapoiuytrgwq\nqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\nqwertyuiopasdfghjklzxcvbnm\nabacaba\n", "output": "12\n0\n106\n18\n74\n"}, {"type": "stdin_stdo...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the number with the most di...
[{"input": "[1, 200, 100000]", "output": "[100000]", "fn_name": "find_longest"}, {"input": "[3, 40000, 100]", "output": "[40000]", "fn_name": "find_longest"}, {"input": "[9000, 8, 800]", "output": "[9000]", "fn_name": "find_longest"}, {"input": "[8, 900, 500]", "output": "[900]", "fn_name": "find_longest"}, {"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\nThis is the hard version of the ...
[{"type": "stdin_stdout", "input": "87 83\n40 6 7 50 16 65 47 90 94 65 79 29 41 76 80 13 87 37 92 71 54 53 93 79 14 53 71 78 50 50 74 40 30 92 66 86 94 60 37 65 82 14 61 48 68 71 91 99 74 88 89 34 57 74 25 2 79 72 92 37 61 16 32 85 29 74 6 69 50 74 76 48 31 42 40 95 29 27 28 31 38 60 52 45 14 78 59\n", "output": "75\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\nGiven is a string S consisting o...
[{"type": "stdin_stdout", "input": "aaaccacabaababb", "output": "11\n"}, {"type": "stdin_stdout", "input": "abbccacabaababa", "output": "13\n"}, {"type": "stdin_stdout", "input": "abbccaaabaababc", "output": "12\n"}, {"type": "stdin_stdout", "input": "`abab`cbbba`c`b", "output": "14\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\nn hobbits are planning to spend ...
[{"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100000000 999834114 93836827\n", "output": "29998\n"}, {"type": "stdin_stdout", "input": "1000000000 1000000000 1000000000\n", "output": "1\n"}, {"type": "stdin_stdout", "input": "100000000 9998...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 most important part of a GSM...
[{"type": "stdin_stdout", "input": "6\n3\n175\n101\n1057\n17888\n11057064", "output": "0\n43\n24\n262\n4469\n2764261\n"}, {"type": "stdin_stdout", "input": "6\n3\n175\n111\n1057\n17888\n11057064", "output": "0\n43\n26\n262\n4469\n2764261\n"}, {"type": "stdin_stdout", "input": "6\n1\n60\n100\n1526\n23456\n17396335", "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\nКак извСстно, Π² Ρ‚Π΅ΠΏΠ»ΡƒΡŽ ΠΏΠΎΠ³ΠΎΠ΄Ρƒ ΠΌΠ½...
[{"type": "stdin_stdout", "input": "50 15001\n1269 1580 5431 5916 6642 14145 15760 19922 20589 22062 24138 33454 33505 35916 37012 42577 43140 49457 54720 55188 56205 56639 56870 57997 58379 59088 59297 61805 61861 63005 64013 68848 71182 71497 72715 73008 75616 76042 76614 80690 83089 85033 86408 92392 92763 93833 950...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 strings s and t of len...
[{"type": "stdin_stdout", "input": "100\naernvaoeiuraxmueiwovioxmuaioervuaionuxiaomuahlhakaqduwbuvpgrrgreiufwuiaubewobsjdhfbajkslfhjcaklyuwee aibfaeqpwidbcuoifnydukfbavysknxyualdyksayfkjdafqiryekucyuwepaasfdasdfiocaudmiovuandksfucnaldsfumioxa\n", "output": "aaeirbnfvaaeoqepiwuirdabxcmuuoeiifwnoyvdiuokxfmbuaaviyosekrnvx...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "1\n4\ngrace gracefuk disgraceful gracefully", "output": "grace\n"}, {"type": "stdin_stdout", "input": "1\n4\ngrace graceful disgraceful gracefully", "output": "grace\n"}, {"type": "stdin_stdout", "input": "1\n4\ngrace graceful disgraceful gracefully", "output": "grace"}, {"type": "st...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is the hard version of the ...
[{"type": "stdin_stdout", "input": "10\nu\nxqpczgnzazxyrvx\ncfjgfhxmzqmjgzzjthziuomldylspyfuxvjlgdc\nooydbldio\nyvaamavy\nrzjjebcgotjffuzr\nhtfkwvihzuwxczopzqujdnaorgxibjfcmlzntskawxhyoymwynitukttewfpajuph\nfactnjajntcaf\nywowyovhrgradhtrqkgurkjpudnrrqhmmwiaqicfxnoyejdsmmurusdzqgjjntocryhqsgr\nqq\n", "output": "u\nxqx\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nImplement a function/class, whic...
[{"input": "\"0xDEADbeef\"", "output": "[3735928559]", "fn_name": "to_integer"}, {"input": "\"0B1010\"", "output": "[null]", "fn_name": "to_integer"}, {"input": "\"-0x123\"", "output": "[-291]", "fn_name": "to_integer"}, {"input": "\"-0b1010\"", "output": "[-10]", "fn_name": "to_integer"}, {"input": "\"-0o123\"", "outp...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn this kata, you'll be given an...
[{"input": "23", "output": "[\"twenty three\"]", "fn_name": "name_that_number"}, {"input": "99", "output": "[\"ninety nine\"]", "fn_name": "name_that_number"}, {"input": "53", "output": "[\"fifty three\"]", "fn_name": "name_that_number"}, {"input": "76", "output": "[\"seventy six\"]", "fn_name": "name_that_number"}, {"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt's your Birthday. Your colleag...
[{"input": "871\n\"gnlyvknjga\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "900\n\"abcdef\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "583\n\"slhacx\"", "output": "[\"That was close!\"]", "fn_name": "cake"}, {"input": "0\n\"jpipe\"", "output": "[\"That was close!\"]", "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\nAn Ironman Triathlon is one of a...
[{"input": "151", "output": "[\"You're done! Stop running!\"]", "fn_name": "i_tri"}, {"input": "0", "output": "[\"Starting Line... Good Luck!\"]", "fn_name": "i_tri"}, {"input": "36", "output": "[{\"Bike\": \"104.60 to go!\"}]", "fn_name": "i_tri"}, {"input": "103", "output": "[{\"Bike\": \"37.60 to go!\"}]", "fn_name"...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given N real values A_1,...
[{"type": "stdin_stdout", "input": "11\n0.9\n1\n1\n1.25\n2.7527267588296525\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "7\n"}, {"type": "stdin_stdout", "input": "11\n0.9\n1\n1\n1.25\n2.30000\n5\n70\n0.000000001\n9999.999999999\n0.999999999\n1.7676771981771382", "output": "8\n"}, {"...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCounting sort can be used for so...
[{"type": "stdin_stdout", "input": "7\n4 11 2 3 4 3 1", "output": "1 2 3 3 4 4 11\n"}, {"type": "stdin_stdout", "input": "7\n8 9 2 0 12 3 3", "output": "0 2 3 3 8 9 12\n"}, {"type": "stdin_stdout", "input": "7\n10 9 3 0 6 3 3", "output": "0 3 3 3 6 9 10\n"}, {"type": "stdin_stdout", "input": "7\n6 5 3 0 12 3 3", "outpu...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nInternational Women's Day is com...
[{"type": "stdin_stdout", "input": "8 2\n1 2 2 3 2 4 6 10\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "8 2\n2 2 2 2 2 4 6 10\n", "output": "8\n"}, {"type": "stdin_stdout", "input": "8 2\n1 2 2 2 2 4 6 10\n", "output": "6\n"}, {"type": "stdin_stdout", "input": "8 2\n2 2 2 2 2 4 7 10\n", "output": "6\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\nProblem\n\nGiven the strings $ s...
[{"type": "stdin_stdout", "input": "abaabbabaab`abbabbabaabbab\nab", "output": "2\n"}, {"type": "stdin_stdout", "input": "abaabbbbaab`abbabbabaabaab\nab", "output": "2\n"}, {"type": "stdin_stdout", "input": "abaabbbbaab`abbabbabaabaab\n`b", "output": "1\n"}, {"type": "stdin_stdout", "input": "abaabbbbaaa`abbabbabbabaab...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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've gotten an n Γ— m sheet of ...
[{"type": "stdin_stdout", "input": "20 20\n.....######.........\n.....#....#.........\n.....#....#.........\n.....#....#.........\n.....############...\n.........##.....#...\n..........#.....#...\n..........#.....#...\n..........###...#...\n............#...#...\n............#...#...\n............#...#...\n............#...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are $n$ persons who initia...
[{"type": "stdin_stdout", "input": "16 20 2\n10 4\n5 3\n10 5\n12 7\n7 6\n9 12\n9 6\n1 10\n11 16\n11 1\n16 3\n10 2\n14 4\n15 14\n4 13\n13 15\n1 8\n7 15\n1 7\n8 15\n", "output": "0\n0\n0\n0\n0\n0\n4\n4\n4\n4\n10\n10\n10\n10\n10\n14\n14\n14\n14\n15\n"}, {"type": "stdin_stdout", "input": "16 20 2\n10 4\n5 3\n10 5\n12 7\n7 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCorrect this code so that it tak...
[{"input": "-2", "output": "[\"-2 is equal to or less than zero.\"]", "fn_name": "corrections"}, {"input": "-1", "output": "[\"-1 is equal to or less than zero.\"]", "fn_name": "corrections"}, {"input": "0", "output": "[\"0 is equal to or less than zero.\"]", "fn_name": "corrections"}, {"input": "8", "output": "[\"8 is...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWhen Valera has got some free ti...
[{"type": "stdin_stdout", "input": "100 100\n75 92 18 7 81 67 7 92 100 65 57 32 50 131 85 31 80 91 84 63 39 52 92 81 1 98 24 12 84 48 17 86 51 72 48 95 81 50 12 66 19 79 49 89 34 1 193 75 20 33 96 27 42 23 133 71 93 1 85 19 66 14 13 13 20 39 36 33 42 61 56 64 23 91 37 99 40 74 13 18 98 85 74 39 62 84 46 74 50 23 38 11 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOm Nom is the main character of ...
[{"type": "stdin_stdout", "input": "6\n87 62 58 32 81 92 12 50 23 27 38 39 64 74 16 35 84 59 91 87 14 48 90 47 44 95 64 45 31 11 67 5 80 60 36 15 91 3 21 2 40 24 37 69 5 50 23 37 49 19 68 21 49 9 100 94 45 41 22 31 31 48 25 70 25 25 95 88 82 1 37 53 49 31 57 74 94 45 55 93 43 37 13 85 59 72 15 68 3 90 96 55 100 64 63 6...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nVlad enjoys listening to music. ...
[{"type": "stdin_stdout", "input": "3\n4\n-1 16 14 1\n2\n5\n1 4 0 17 8\n3\n5\n-1 1 -1 18 4 \n0", "output": "4\n1\n4\n"}, {"type": "stdin_stdout", "input": "3\n4\n0 4 5 2\n-1\n5\n1 1 5 11 4\n-1\n5\n1 2 3 9 -1 \n2", "output": "4\n5\n3\n"}, {"type": "stdin_stdout", "input": "3\n4\n1 3 4 2\n2\n5\n1 2 3 9 4\n5\n5\n1 2 3 9 4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is a follow-up from my prev...
[{"input": "[0, 1, 2, 3, 100000]", "output": "[\"Non-linear sequence\"]", "fn_name": "get_function"}, {"input": "[0, 1, 2, 100000, 4]", "output": "[\"Non-linear sequence\"]", "fn_name": "get_function"}, {"input": "[0, 1, 100000, 3, 4]", "output": "[\"Non-linear sequence\"]", "fn_name": "get_function"}, {"input": "[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\nSolve the following coding problem using the programming language python:\n\nYou are given three words s_1, s...
[{"type": "stdin_stdout", "input": "atcoder beginner contest\n", "output": "ABC\n"}, {"type": "stdin_stdout", "input": "resident register number\n", "output": "RRN\n"}, {"type": "stdin_stdout", "input": "resident retsiger number", "output": "RRN\n"}, {"type": "stdin_stdout", "input": "atcoder beginner contdst", "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\nThe Smart Beaver from ABBYY came...
[{"type": "stdin_stdout", "input": "24000\nN.Y. BANK DISCOUNT BORROWINGS 169 MLN DLRS\nNEW YORK, April 9 - The eight major New York City banks had\ndaily average borrowings of 169 mln dlrs from the Federal\nReserve in the week ended April 8, a Fed spokesman said.\nA Fed spokesman said that all of the borrowings were ma...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nHow to make a cake you'll never ...
[{"type": "stdin_stdout", "input": "100 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 1010 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\n## Description\nYour job is to c...
[{"input": "\"AbcdefGhijKlmnopQRsTuvwxyZ1234567890\"", "output": "[true]", "fn_name": "password"}, {"input": "\"Ab1!@#$%^&*()-_+={}[]|\\\\:;?/>.<,\"", "output": "[true]", "fn_name": "password"}, {"input": "\"!@#$%^&*()-_+={}[]|\\\\:;?/>.<,\"", "output": "[false]", "fn_name": "password"}, {"input": "\"abcd1234\"", "outp...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSereja showed an interesting gam...
[{"type": "stdin_stdout", "input": "100 1000\n10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 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\nBeing stuck at home, Ray became ...
[{"type": "stdin_stdout", "input": "5\n20 809014\n289 -254 1 -109 -167 93 23 -37 -31 -109 204 59 296 49 132 0 -28 35 -197 -266\n20 458494\n113 218 -292 -298 179 258 -257 -20 296 76 -145 93 -282 -261 -159 -45 255 -107 171 63\n14 876161\n69 74 12 2 177 -113 103 93 38 -48 282 169 205 145\n26 731742\n76 190 -227 -81 -293 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\nYou are given a chessboard of si...
[{"type": "stdin_stdout", "input": "4 5\n2 1\n1 4\n5 3\n3 2\n2 4\n", "output": "11\n10\n10\n13\n4\n"}, {"type": "stdin_stdout", "input": "4 5\n2 1\n1 4\n5 3\n6 2\n2 4\n", "output": "11\n10\n10\n11\n4\n"}, {"type": "stdin_stdout", "input": "8 5\n2 1\n4 4\n4 3\n3 2\n2 4\n", "output": "37\n14\n46\n41\n6\n"}, {"type": "std...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is an integer sequence of ...
[{"type": "stdin_stdout", "input": "4\n75 26 45 72 81 47 97 97 2 2 25 82 84 17 56 32\n", "output": "101\n120\n147\n156\n156\n178\n194\n194\n194\n194\n194\n194\n194\n194\n194\n"}, {"type": "stdin_stdout", "input": "4\n75 26 45 112 81 47 97 97 2 2 25 95 84 17 56 32", "output": "101\n120\n187\n187\n187\n187\n209\n209\n209...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is an interactive problem. ...
[{"type": "stdin_stdout", "input": "no\nyes\nno\nnn\nno\n", "output": "2\n3\n5\n7\n11\n13\n17\n19\n23\n29\n31\n37\n41\n43\n47\n4\n9\n25\n49\nprime\n"}, {"type": "stdin_stdout", "input": "no\nyes\nno\nno\nno\n", "output": "2\n3\n5\n7\n11\n13\n17\n19\n23\n29\n31\n37\n41\n43\n47\n4\n9\n25\n49\nprime\n"}, {"type": "stdin_s...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given $n$ segments on a ...
[{"type": "stdin_stdout", "input": "4\n4\n1 5\n2 4\n2 3\n3 4\n5\n1 5\n2 3\n2 5\n3 5\n2 2\n3\n1 3\n2 4\n2 3\n7\n1 10\n2 8\n2 5\n3 4\n4 4\n6 8\n7 7\n", "output": "3\n4\n2\n7\n"}, {"type": "stdin_stdout", "input": "4\n4\n1 5\n2 4\n2 3\n3 4\n5\n1 5\n2 3\n2 5\n3 5\n2 2\n3\n1 3\n2 4\n2 3\n7\n1 10\n2 8\n0 5\n3 4\n4 4\n6 8\n7 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a string $s$ of length ...
[{"type": "stdin_stdout", "input": "10\nYES\nyES\nyes\nYes\nYeS\nNoo\norZ\nyEz\nYas\nXES\n", "output": "YES\nYES\nYES\nYES\nYES\nNO\nNO\nNO\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "2\nyes\nlll\n", "output": "YES\nNO\n"}, {"type": "stdin_stdout", "input": "1\nvop\n", "output": "NO\n"}, {"type": "stdin_stdout", "i...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou have $n$ chains, the $i$-th ...
[{"type": "stdin_stdout", "input": "3\n4\n3 4 3 6\n-1 1 2 2\n-2 2 2 3\n2\n5 10\n-2 5\n-1 1\n3\n10 5 2\n-1 1 2\n-1 10 5\n", "output": "10\n15\n15\n"}, {"type": "stdin_stdout", "input": "3\n4\n3 4 3 6\n-1 1 2 2\n-1 2 2 3\n2\n5 10\n-1 5\n-1 1\n3\n6 5 2\n-1 1 2\n-1 5 5\n", "output": "10\n15\n10\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\nOnce upon a time in the Kingdom ...
[{"type": "stdin_stdout", "input": "1000 1000\n", "output": "500000\n"}, {"type": "stdin_stdout", "input": "997 1000\n", "output": "498500\n"}, {"type": "stdin_stdout", "input": "999 1000\n", "output": "499500\n"}, {"type": "stdin_stdout", "input": "1000 999\n", "output": "499500\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\nPaw the Spider is making a web. ...
[{"type": "stdin_stdout", "input": "20\n5 15 40 35 68 22\n6 70 19 28 69 63 1\n4 37 154 41 90\n7 11 148 35 94 55 59 64\n7 46 28 22 90 97 37 13\n5 62 45 34 50 94\n6 85 83 37 72 27 53\n6 46 56 116 71 49 33\n7 17 35 91 24 50 30 38\n2 75 12\n2 46 38\n1 61\n11 15 79 14 89 20 96 84 26 93 132 18\n1 75\n6 4 100 55 59 62 83\n5 4...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe polar bears are going fishin...
[{"type": "stdin_stdout", "input": "39 -1000000000 -1000000000 -999999997 -1000000000\nENEENWSWSSWESNSSEESNSESWSWNSWESNENWNWEE\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "39 -1000000000 -1000000000 -999999997 -1000000000\nENEENWSWSSWESNSSEESNSESWSWNSWESNENWNWEE\n", "output": "4\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\nThe time is 2020. There is data ...
[{"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n6,20\n0,0\n1\n2\n4\n1", "output": "2\n2\n3\n2\n"}, {"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n0,26\n0,0\n1\n2\n4\n1", "output": "3\n3\n4\n3\n"}, {"type": "stdin_stdout", "input": "1,20\n2,20\n3,30\n4,10\n5,10\n0,26\n0,0\n0\n2\n4\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\nSonya decided that having her ow...
[{"type": "stdin_stdout", "input": "100 10\n-489 -476 -445 -432 -430 -421 -420 -418 -412 -411 -404 -383 -356 -300 -295 -293 -287 -276 -265 -263 -258 -251 -249 -246 -220 -219 -205 -186 -166 -157 -143 -137 -136 -130 -103 -86 -80 -69 -67 -55 -43 -41 -40 -26 -19 -9 16 29 41 42 54 76 84 97 98 99 101 115 134 151 157 167 169 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 be the concatenation of 10...
[{"type": "stdin_stdout", "input": "62089\n1101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101101...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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\"Fukusekiken\" is a popular ram...
[{"type": "stdin_stdout", "input": "5\n41\n27\n26", "output": "0\n28\n18\n23\n"}, {"type": "stdin_stdout", "input": "5\n24\n18\n13", "output": "0\n11\n15\n2\n"}, {"type": "stdin_stdout", "input": "5\n24\n27\n13", "output": "0\n11\n18\n2\n"}, {"type": "stdin_stdout", "input": "5\n29\n27\n26", "output": "0\n8\n18\n23\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\nRecently, the Fair Nut has writt...
[{"type": "stdin_stdout", "input": "100 1000000000\nbbabbaabbbaaaaabbabbbaaabbbbabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaabbbbabaabbbabbaaaaabbbbaab\nbbabbaabbbaaaaabbabbbaaabbbbabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababbbabbbbaaaaabbaaaaaaaab\n", "output": "41073741883\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\nIt's a walking tour day in SIS.W...
[{"type": "stdin_stdout", "input": "16\n4\nPPPP\n4\nAPPP\n4\nPAPP\n4\nAAPP\n4\nPPAP\n4\nAPAP\n4\nPAAP\n4\nAAAP\n4\nPPPA\n4\nAPPA\n4\nPAPA\n4\nAAPA\n4\nPPAA\n4\nAPAA\n4\nPAAA\n4\nAAAA\n", "output": "0\n3\n2\n2\n1\n1\n1\n1\n0\n2\n1\n1\n0\n1\n0\n0\n"}, {"type": "stdin_stdout", "input": "16\n4\nPPPP\n4\nAPPP\n4\nPAPP\n4\nA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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, remove the spaces from t...
[{"input": "\"8 8 Bi fk8h B 8 BB8B B B B888 c hl8 BhB fd\"", "output": "[\"88Bifk8hB8BB8BBBB888chl8BhBfd\"]", "fn_name": "no_space"}, {"input": "\"8 j 8 mBliB8g imjB8B8 jl B\"", "output": "[\"8j8mBliB8gimjB8B8jlB\"]", "fn_name": "no_space"}, {"input": "\"jfBm gk lf8hg 88lbe8 \"", "output": "[\"jfBmgklf8hg88lbe8...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nOn some day in January 2018, Tak...
[{"type": "stdin_stdout", "input": "2017/01/07\n", "output": "2018/01/07\n"}, {"type": "stdin_stdout", "input": "2017/01/31\n", "output": "2018/01/31\n"}, {"type": "stdin_stdout", "input": "2017/01/06", "output": "2018/01/06\n"}, {"type": "stdin_stdout", "input": "2017/01/32", "output": "2018/01/32\n"}, {"type": "stdin...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nWrite a function, `persistence`,...
[{"input": "999", "output": "[4]", "fn_name": "persistence"}, {"input": "444", "output": "[3]", "fn_name": "persistence"}, {"input": "39", "output": "[3]", "fn_name": "persistence"}, {"input": "25", "output": "[2]", "fn_name": "persistence"}, {"input": "4", "output": "[0]", "fn_name": "persistence"}]
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\nElections in Berland are coming....
[{"type": "stdin_stdout", "input": "54\n10 13\n10 45\n10 51\n01 44\n10 24\n10 26\n10 39\n10 38\n10 41\n10 33\n10 18\n10 12\n10 38\n10 30\n11 31\n10 46\n11 50\n00 26\n00 29\n00 50\n10 16\n10 40\n10 50\n00 43\n10 48\n10 32\n10 18\n10 8\n10 24\n10 32\n10 52\n00 41\n10 37\n10 38\n10 49\n00 35\n10 52\n00 44\n10 41\n10 36\n0...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n## The Riddle\n\nThe King of a s...
[{"input": "[3, 5, 6, 7, 8, 9]", "output": "[1000]", "fn_name": "find"}, {"input": "[0, 3, 5, 4, 9, 8]", "output": "[825]", "fn_name": "find"}, {"input": "[0, 1, 2, 3, 4, 6]", "output": "[95]", "fn_name": "find"}, {"input": "[0, 1, 9, 3, 5]", "output": "[555]", "fn_name": "find"}, {"input": "[0, 1, 3, 4]", "output": "[...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAssume that you have $k$ one-dim...
[{"type": "stdin_stdout", "input": "1\n10\n1 2\n1 3\n2 4\n2 5\n2 6\n3 7\n3 8\n4 9\n4 10\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1\n10\n1 2\n2 3\n1 4\n2 5\n4 6\n6 7\n3 8\n4 9\n4 10\n", "output": "10\n"}, {"type": "stdin_stdout", "input": "1\n10\n1 2\n1 3\n1 4\n2 5\n2 6\n6 7\n1 8\n4 9\n4 10\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\nThe only difference between easy...
[{"type": "stdin_stdout", "input": "32\n3 1 3\n2 2 1\n3 1 3\n2 2 2\n3 1 3\n2 2 3\n3 1 3\n2 3 1\n3 1 3\n2 3 2\n3 1 3\n2 3 3\n3 1 3\n3 1 1\n3 1 3\n3 1 2\n3 1 3\n3 1 3\n3 1 3\n3 2 1\n3 1 3\n3 2 2\n3 1 3\n3 2 3\n3 1 3\n3 3 1\n3 1 3\n3 3 2\n3 1 3\n3 3 3\n3 2 1\n1 1 1\n3 2 1\n1 1 2\n3 2 1\n1 1 3\n3 2 1\n1 2 1\n3 2 1\n1 2 2\n...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAfter the mysterious disappearan...
[{"type": "stdin_stdout", "input": "20\n9 15 11 8 10 5 19 13 12 18 3 20 17 14 2 16 7 4 1 6\n12 6 7 5 4 20 15 14 1 18 10 17 9 19 16 3 13 11 2 8\n", "output": "2\n"}, {"type": "stdin_stdout", "input": "20\n9 15 11 8 10 5 19 13 12 18 3 20 17 14 2 16 7 4 1 6\n12 6 7 5 4 20 15 14 1 18 10 17 9 19 16 3 13 11 2 8\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\nThe Little Elephant likes permut...
[{"type": "stdin_stdout", "input": "4\n0\n1\n2\n0 1\n3\n0 1 2\n4\n1 3 2 4", "output": "YES\nYES\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "4\n0\n1\n2\n0 1\n3\n11 1 1\n4\n1 3 2 -1", "output": "YES\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "4\n-1\n1\n1\n0 1\n3\n3 0 1\n4\n1 3 2 4", "output": "YES\nYES\nNO...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nShinya watched a program on TV c...
[{"type": "stdin_stdout", "input": "2012.12.31\n2.11.16.14.14\n7138.4.03\n10.5.5.1.2\n10000000.12.31\n#", "output": "0.0.0.0.10\n3034.11.28\n12.19.19.16.10\n6059.2.10\n8.19.3.13.2\n"}, {"type": "stdin_stdout", "input": "2312.02.12\n2.12.16.14.14\n7128.5.13\n5.1.5.2.01\n10020000.10.31\n#", "output": "0.15.3.8.19\n3054.8...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIt is a complicated version of p...
[{"type": "stdin_stdout", "input": "6\n2021 3\n177890 2\n34512 3\n724533 4\n998244353 1\n12345678 10\n", "output": "2021\n181111\n34533\n724542\n999999999\n12345678\n"}, {"type": "stdin_stdout", "input": "6\n2021 3\n177890 2\n34512 3\n724533 4\n998244353 1\n12345678 10\n", "output": "2021\n181111\n34533\n724542\n999999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a toy building consisti...
[{"type": "stdin_stdout", "input": "10 10\n1 1 1 1 1 1 1 1 1 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 10\n3 3 3 3 3 3 3 3 3 3\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 10\n1 1 1 1 1 1 1 1 1 1\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "10 10\n3 3 3 3 3 3 3 3 3 3\n", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nAnton's favourite geometric figu...
[{"type": "stdin_stdout", "input": "28\nOctahedron\nDodecahedron\nOctahedron\nOctahedron\nDodecahedron\nIcosahedron\nIcosahedron\nDodecahedron\nDodecahedron\nDodecahedron\nCube\nDodecahedron\nCube\nTetrahedron\nCube\nCube\nTetrahedron\nDodecahedron\nDodecahedron\nDodecahedron\nIcosahedron\nIcosahedron\nDodecahedron\nIc...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Given an array `arr` an...
[{"input": "[1, 4, 2, 3, 0, 5]\n7", "output": "[11]", "fn_name": "pairwise"}, {"input": "[0, 0, 0, 0, 1, 1]\n1", "output": "[10]", "fn_name": "pairwise"}, {"input": "[1, 3, 2, 4]\n4", "output": "[1]", "fn_name": "pairwise"}, {"input": "[15, 1, 1]\n5", "output": "[0]", "fn_name": "pairwise"}, {"input": "[1, 1, 1]\n2", "...
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\nEvil organizations that attempt ...
[{"type": "stdin_stdout", "input": "4\n0.200 3 1.3409251190635834\n0.38744720010760914 0 0.400\n0.900 1 1.000\n0.400 2 0.902270275623373\n2\n1.4849846876484776 1 1.1947768336367894\n0.500 0 1.000\n9\n0.200 7 0.600\n0.400 0 0.500\n1.540928395286643 8 1.727681009880635\n0.100 4 0.400\n0.200 2 0.600\n0.100 6 1.20624050513...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 problem was inspired by Pied...
[{"type": "stdin_stdout", "input": "6\n7\ncontest\nntecost\n7\ncontest\nnsttdco\n7\ncontest\ntnsteco\n7\ncontess\ncotestn\n7\ncontest\ncontest\n7\nontestc\ncontest\n", "output": "3\n-1\n4\n-1\n0\n1\n"}, {"type": "stdin_stdout", "input": "6\n7\ncontest\nntecost\n7\ncontest\nnstteco\n7\ncontest\ntnsteco\n7\ncontess\ncote...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Beroil corporation structure...
[{"type": "stdin_stdout", "input": "ZLWSYH:WNMTNAI:FTCKPGZBJ.,UZSCFZVXXK.,LNGCU.,TCT.,LNGCU.,U.,NEHYSET..,FBLI:NEHYSET:IFY..,VN.,VN.,IFY.,FBLI.,YH.,FBLI.,DTXG.,NEHYSET.,WNMTNAI.,VN.,SVXN.,NEHYSET.,TCT.,DTXG..,UZSCFZVXXK:KZQRJFST.,FTCKPGZBJ.,WNMTNAI.,SVXN:DHONBXRZAL..,NEHYSET.,IFY..,MPOEEMVOP:DHONBXRZAL.,DTXG.,FTCKPGZBJ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 were lucky enough to get a m...
[{"type": "stdin_stdout", "input": "6\nBlizid\n0 0\n60 -1\n60 60\n0 60\n0 50\n50 50\n50 10\n0 10\n-1\nBlizid\n0 10\n10 10\n10 50\n0 50\n-1\nWindom\n10 10\n50 10\n40 20\n20 20\n20 40\n10 50\n-1\nAccent\n50 10\n50 50\n35 50\n35 25\n-1\nPilot\n35 25\n35 50\n19 50\n-1\nBlizid\n20 20\n40 20\n20 40\n-1\n4\nA12345678901234567...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nRunning with barriers on the cir...
[{"type": "stdin_stdout", "input": "50 100\n0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98\n1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\ncoastline\n\nWaves rush to the b...
[{"type": "stdin_stdout", "input": "5 2 3\n3\n2\n1\n2\n6\n3 100 100\n5\n3\n4\n20 2 8\n3\n2\n10\n1\n14\n1\n1\n4\n2\n2\n16\n1\n8\n8\n2\n6\n3\n8\n3\n8\n7 2 2\n0\n2\n5\n2\n5\n2\n-1\n0 0 0", "output": "2\n0\n11\n5\n"}, {"type": "stdin_stdout", "input": "5 2 3\n3\n2\n1\n2\n6\n3 110 100\n5\n3\n4\n20 2 3\n3\n2\n10\n1\n14\n1\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\nOne day, as Sherlock Holmes was ...
[{"type": "stdin_stdout", "input": "100\n901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIf we list all the natural numbe...
[{"input": "200", "output": "[9168]", "fn_name": "solution"}, {"input": "10", "output": "[23]", "fn_name": "solution"}, {"input": "20", "output": "[78]", "fn_name": "solution"}, {"input": "0", "output": "[0]", "fn_name": "solution"}, {"input": "1", "output": "[0]", "fn_name": "solution"}]
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\nToday on a lecture about strings...
[{"type": "stdin_stdout", "input": "yhwepqwyhwepqwyhwepqweahnqtueahnqtueahnqtuyhwepqwyhwepqwyhwepqwyhwepqweahnqtueahnqtuyhwepqweahnqtueahnqtueahnqtueahnqtueahnqtueahnqtu\neahnqtueahnqtueahnqtuyhwepqweahnqtuyhwepqwyhwepqweahnqtuyhwepqweahnqtuyhwepqweahnqtueahnqtuyhwepqweahnqtueahnqtuyhwepqwyhwepqwyhwepqw\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\n[Image] \n\n\n-----Input-----\n\...
[{"type": "stdin_stdout", "input": "000\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "3\n", "output": "13\n"}, {"type": "stdin_stdout", "input": "0\n", "output": "15\n"}, {"type": "stdin_stdout", "input": "1\n", "output": "14\n"}, {"type": "stdin_stdout", "input": "2\n", "output": "12\n"}, {"type": "stdin_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###Lucky number\n\nWrite a funct...
[{"input": "1892231413243242344321432142343423437", "output": "[true]", "fn_name": "is_lucky"}, {"input": "18922314324324234423437", "output": "[false]", "fn_name": "is_lucky"}, {"input": "189223141324324234423437", "output": "[true]", "fn_name": "is_lucky"}, {"input": "1892376", "output": "[true]", "fn_name": "is_luck...
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 function finalGrade, wh...
[{"input": "100\n12", "output": "[100]", "fn_name": "final_grade"}, {"input": "10\n15", "output": "[100]", "fn_name": "final_grade"}, {"input": "99\n0", "output": "[100]", "fn_name": "final_grade"}, {"input": "85\n5", "output": "[90]", "fn_name": "final_grade"}, {"input": "55\n3", "output": "[75]", "fn_name": "final_gr...
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\nSmart Beaver recently got intere...
[{"type": "stdin_stdout", "input": "hrsszhjvrbsszvqesessiqbzeqijjerqirhhjsehiehezvzihzssivhvihrivrhizeqvvhejvibhqrbbqjrjsessvrhijzsrqirvsqqbibzhrzseijesszsrzhjjbqsrjrsrizivvhsjvqz\n3\nrzzevhiibziqiirhsebebrvrvvjihsjhvjjrejvqezireqevqeszrrseriijijijveqzbsbrezqhrrhbshqrhzshjervqjjzveeqsisrbevvjvjhbzvbjrrvizh 0 122\niqqqj...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSkier rides on a snowy field. It...
[{"type": "stdin_stdout", "input": "1\nENNNNNNNNNNNSSSSSSSSSSSEEEEEEEEEEN\n", "output": "126\n"}, {"type": "stdin_stdout", "input": "1\nNEEEEEEEEEEEWWWWWWWWWWWNNNNNNNNNNE\n", "output": "126\n"}, {"type": "stdin_stdout", "input": "1\nENNNNNNNNNNNSSSSSSSNSSSEEEEEEEEEES\n", "output": "126\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\nBalph is learning to play a game...
[{"type": "stdin_stdout", "input": "WWWOONOOOWWW\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "WWWOONOOOVWW\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "WVWOONOOOVWW\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "WOWOONVOOVWW\n", "output": "0\n"}, {"type": "stdin_stdout", "input": "WOWO...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEvery day, N passengers arrive a...
[{"type": "stdin_stdout", "input": "6 4 3\n11\n6\n2\n13\n17\n5", "output": "4\n"}, {"type": "stdin_stdout", "input": "6 4 3\n11\n9\n2\n13\n17\n5", "output": "4\n"}, {"type": "stdin_stdout", "input": "6 3 3\n7\n6\n2\n13\n17\n5", "output": "4\n"}, {"type": "stdin_stdout", "input": "6 3 3\n7\n6\n2\n13\n10\n6", "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\nWilliam really likes the cellula...
[{"type": "stdin_stdout", "input": "4\n10 1\n1111111111\n9 4\n000000000\n9 4\n000000000\n9 4\n000000000\n", "output": "1111111111\n000000000\n000000000\n000000000\n"}, {"type": "stdin_stdout", "input": "4\n10 1\n1111111111\n9 4\n000000000\n9 4\n000000000\n9 4\n000000000\n", "output": "1111111111\n000000000\n000000000\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 the Jambo Amusement Garden (J...
[{"type": "stdin_stdout", "input": "4\nred 3444\nred 3018\nred 3098\nred 3319\n4\nred\nred\nrec\nred", "output": "No\n"}, {"type": "stdin_stdout", "input": "4\nred 3444\nder 3018\nred 3098\nred 3319\n4\nred\nred\nrec\nred", "output": "No\n"}, {"type": "stdin_stdout", "input": "4\nred 2133\nder 3018\nred 3098\nred 3319\...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nQuantum mechanics tells us that ...
[{"input": "423\n100\n150", "output": "[[4272300, 4357746, 4444038, 4531176, 4619160, 4707990, 4797666, 4888188, 4979556, 5071770, 5164830, 5258736, 5353488, 5449086, 5545530, 5642820, 5740956, 5839938, 5939766, 6040440, 6141960, 6244326, 6347538, 6451596, 6556500, 6662250, 6768846, 6876288, 6984576, 7093710, 7203690, ...
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\nKattapa, as you all know was one...
[{"type": "stdin_stdout", "input": "3\n2 3 4\n\n\n", "output": "READY FOR BATTLE\n"}, {"type": "stdin_stdout", "input": "4\n11 12 13 14\n\n\n", "output": "NOT READY\n"}, {"type": "stdin_stdout", "input": "5\n1 2 3 4 5\n\n\n", "output": "NOT READY\n"}, {"type": "stdin_stdout", "input": "1\n2\n\n\n", "output": "READY FOR...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nChef loves to play games. Now he...
[{"type": "stdin_stdout", "input": "4\n-1 3\n16 2\n13 1\n1001000000 3092440", "output": "-0.7500000000000000\n4.0000000000000000\n6.5000000000000000\n475065130.4721832275390625\n"}, {"type": "stdin_stdout", "input": "4\n3 2\n23 1\n22 3\n1000000001 3153660", "output": "0.7500000000000000\n11.5000000000000000\n16.5000000...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Sherlock Holmes was investiga...
[{"type": "stdin_stdout", "input": "30 70 288262020\n27 18\n5 19\n23 17\n16 17\n29 17\n1 22\n23 5\n10 13\n22 26\n14 3\n8 3\n29 9\n9 1\n3 9\n16 4\n9 22\n10 22\n20 1\n3 7\n23 19\n26 8\n24 1\n5 7\n28 29\n20 11\n16 12\n6 9\n24 29\n30 4\n5 26\n18 21\n5 21\n30 6\n12 13\n16 23\n28 14\n30 1\n7 27\n7 19\n27 17\n5 30\n30 27\n28 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given the current time i...
[{"type": "stdin_stdout", "input": "12:34\n10000\n", "output": "11:14\n"}, {"type": "stdin_stdout", "input": "00:00\n10000\n", "output": "22:40\n"}, {"type": "stdin_stdout", "input": "00:00\n10000\n", "output": "22:40\n"}, {"type": "stdin_stdout", "input": "12:34\n10000\n", "output": "11:14\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\nNickname Generator\n\nWrite a fu...
[{"input": "\"Sam\"", "output": "[\"Error: Name too short\"]", "fn_name": "nickname_generator"}, {"input": "\"Jam\"", "output": "[\"Error: Name too short\"]", "fn_name": "nickname_generator"}, {"input": "\"Suv\"", "output": "[\"Error: Name too short\"]", "fn_name": "nickname_generator"}, {"input": "\"Ni\"", "output": "...
code_functional
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nProblem statement\n\nThere is a ...
[{"type": "stdin_stdout", "input": "2\n10 -2", "output": "Second\n"}, {"type": "stdin_stdout", "input": "2\n-1 10", "output": "First\n"}, {"type": "stdin_stdout", "input": "2\n-2 2", "output": "Second\n"}, {"type": "stdin_stdout", "input": "2\n-2 4", "output": "Second\n"}, {"type": "stdin_stdout", "input": "2\n-2 8", "...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nGiven a positive integer $k$, tw...
[{"type": "stdin_stdout", "input": "6 5 15\n2 5 6 7 8 15\n1 2\n1 1\n5 5\n5 6\n4 5\n", "output": "15\n14\n14\n19\n13\n"}, {"type": "stdin_stdout", "input": "6 5 15\n2 5 6 4 8 15\n1 2\n1 1\n5 5\n5 6\n4 5\n", "output": "15\n14\n14\n19\n16\n"}, {"type": "stdin_stdout", "input": "6 5 13\n2 4 6 7 8 12\n1 4\n1 3\n3 5\n2 2\n5 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 convex polygon consisting of N...
[{"type": "stdin_stdout", "input": "4\n100 100\n0 100\n0 0\n100 0", "output": "50.00000 50.00000"}, {"type": "stdin_stdout", "input": "4\n111 100\n-2 110\n0 -2\n110 -1", "output": "NA\n"}, {"type": "stdin_stdout", "input": "4\n111 110\n-2 110\n0 -2\n110 -1", "output": "NA\n"}, {"type": "stdin_stdout", "input": "4\n111 ...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 and some bears are playing ...
[{"type": "stdin_stdout", "input": "5 5 30\n0 1 1 1 0\n1 1 0 1 1\n0 1 1 1 1\n0 0 1 1 0\n0 0 0 0 0\n3 2\n2 2\n2 2\n4 3\n1 4\n3 2\n4 1\n2 4\n1 4\n2 1\n5 2\n4 1\n4 1\n5 1\n2 4\n2 4\n4 4\n1 2\n3 1\n4 5\n1 2\n2 3\n1 1\n5 1\n3 4\n1 1\n5 4\n1 5\n5 4\n2 2\n", "output": "3\n3\n3\n3\n3\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\n4\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\nVasya is very upset that many pe...
[{"type": "stdin_stdout", "input": "XHRPXZEGHSOCJPICUIXSKFrZUPYTSGJSDIYBCMNMNBPNDBXLXBzhbfnqvwcffvUdhtickyqhupmcehlsyvncqmfhautvxudqdhgg\n", "output": "xhrpxzeghsocjpicuixskfrzupytsgjsdiybcmnmnbpndbxlxbzhbfnqvwcffvudhtickyqhupmcehlsyvncqmfhautvxudqdhgg\n"}, {"type": "stdin_stdout", "input": "RJIQZMJzIMSNDBOHBRAWIENODSA...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 has K 500-yen coins. (...
[{"type": "stdin_stdout", "input": "100 100000\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "84 42001\n", "output": "No\n"}, {"type": "stdin_stdout", "input": "13 6498\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "4 2000\n", "output": "Yes\n"}, {"type": "stdin_stdout", "input": "13 1282", "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\nPupils Alice and Ibragim are bes...
[{"type": "stdin_stdout", "input": "50\n0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0\n0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1\n0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 1 0 0 1 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\nIvan likes to learn different th...
[{"type": "stdin_stdout", "input": "1000000000000000000 100000000000000000\n", "output": "899999999999999991\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 200000000000000000\n", "output": "799999999999999991\n"}, {"type": "stdin_stdout", "input": "1000000000000000000 100000000000000000\n", "output": "8999...
code_stdio
[ { "content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIntegral numbers can be even or ...
[{"input": "[1, 3, 5, 7]", "output": "[7]", "fn_name": "oddest"}, {"input": "[-1, -1]", "output": "[null]", "fn_name": "oddest"}, {"input": "[-1, 0, 1]", "output": "[-1]", "fn_name": "oddest"}, {"input": "[-5, 3]", "output": "[null]", "fn_name": "oddest"}, {"input": "[1, 5]", "output": "[null]", "fn_name": "oddest"}, {...
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\nQuite recently, a very smart stu...
[{"type": "stdin_stdout", "input": "1809 1302 7164 6122\n3144121413113111223311232232114144321414421243443243422322144324121433444342231344234443332241322442\n", "output": "420780\n"}, {"type": "stdin_stdout", "input": "1809 1302 7164 6122\n3144121413113111223311232232114144321414421243443243422322144324121433444342231...
code_stdio