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\nNatsuki and her friends were tak... | [{"type": "stdin_stdout", "input": "23 4\n2 3\n3 1\n6 4\n5 2", "output": "1966080\n"}, {"type": "stdin_stdout", "input": "23 4\n2 3\n3 1\n6 6\n5 2", "output": "2621440\n"}, {"type": "stdin_stdout", "input": "24 4\n2 3\n3 2\n4 4\n5 2", "output": "6291456\n"}, {"type": "stdin_stdout", "input": "19 4\n2 2\n3 4\n4 3\n9 5",... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of $n$ in... | [{"type": "stdin_stdout", "input": "100 2\n96 58 6 51 50 14 42 14 8 23 50 87 18 38 66 12 60 34 67 79 73 79 100 94 89 73 4 13 30 3 34 26 41 65 18 71 29 3 40 65 77 83 51 20 38 45 43 64 7 12 97 42 88 32 62 61 92 17 83 14 3 23 5 58 3 64 17 35 23 86 65 22 44 81 30 95 62 63 17 85 3 3 17 56 26 94 59 84 3 88 70 53 52 74 12 47 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPavel cooks barbecue. There are ... | [{"type": "stdin_stdout", "input": "100\n87 69 49 86 96 12 10 79 29 66 48 77 73 62 70 52 22 28 97 35 91 5 33 82 65 85 68 80 64 8 38 23 94 34 75 53 57 6 100 2 56 50 55 58 74 9 18 44 40 3 43 45 99 51 21 92 89 36 88 54 42 14 78 71 25 76 13 11 27 72 7 32 93 46 83 30 26 37 39 31 95 59 47 24 67 16 4 15 1 98 19 81 84 61 90 41... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 celebrate Twice's 5t... | [{"type": "stdin_stdout", "input": "6\n6 12\n8 4\n90 1219\n55 14\n6484 2912\n2 1\n", "output": "10\n12\n1177\n57\n4660\n3\n"}, {"type": "stdin_stdout", "input": "6\n6 12\n13 4\n90 1219\n55 14\n6484 2912\n2 1\n", "output": "10\n9\n1177\n57\n4660\n3\n"}, {"type": "stdin_stdout", "input": "6\n6 12\n8 6\n90 1219\n55 14\n64... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 f... | [{"input": "5", "output": "[\"12345\\n2345\\n345\\n45\\n5\"]", "fn_name": "pattern"}, {"input": "2", "output": "[\"12\\n2\"]", "fn_name": "pattern"}, {"input": "-25", "output": "[\"\"]", "fn_name": "pattern"}, {"input": "1", "output": "[\"1\"]", "fn_name": "pattern"}, {"input": "0", "output": "[\"\"]", "fn_name": "patt... | 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 have $n$ barrels lined up in... | [{"type": "stdin_stdout", "input": "2\n4 1\n19 5 2 5\n3 2\n0 0 1\n", "output": "24\n1\n"}, {"type": "stdin_stdout", "input": "2\n4 1\n5 16 5 5\n3 2\n0 0 1\n", "output": "21\n1\n"}, {"type": "stdin_stdout", "input": "2\n4 3\n10 1 1 2\n3 2\n0 1 1\n", "output": "14\n2\n"}, {"type": "stdin_stdout", "input": "2\n4 1\n5 16 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nCreate a function with two argum... | [{"input": "100\n5", "output": "[[100, 200, 300, 400, 500]]", "fn_name": "count_by"}, {"input": "50\n5", "output": "[[50, 100, 150, 200, 250]]", "fn_name": "count_by"}, {"input": "3\n5", "output": "[[3, 6, 9, 12, 15]]", "fn_name": "count_by"}, {"input": "2\n5", "output": "[[2, 4, 6, 8, 10]]", "fn_name": "count_by"}, {"... | 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 the number pledged for a y... | [{"input": "100\n53\n\"July\"", "output": "[\"You are 1 ahead of schedule!\"]", "fn_name": "check_challenge"}, {"input": "12\n12\n\"September\"", "output": "[\"Challenge is completed.\"]", "fn_name": "check_challenge"}, {"input": "12\n5\n\"March\"", "output": "[\"You are 3 ahead of schedule!\"]", "fn_name": "check_chal... | 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\nGuy-Manuel and Thomas are going ... | [{"type": "stdin_stdout", "input": "8\n-440365664 -1386303283\n107345267 -994221803\n248590739 -968608613\n473576011 -880752952\n138674534 994450706\n-164464580 986382989\n-522092561 852888831\n-874210729 485546704\n", "output": "NO\n"}, {"type": "stdin_stdout", "input": "8\n-440365664 -897818514\n107345267 -994221803\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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": "78 36\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0\n1 52\n2 6\n9 43\n10 52\n4 63\n9 35\n10 67\n9 17\n3 43\n4 38\n1 27\n9 44\n6 74\n7 3\n8 18\n1 52\n1 68\n5 51\n5 2\n7 50\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 Vitaly was going home la... | [{"type": "stdin_stdout", "input": "100 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 0\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n0 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 0\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 1\n1 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nPetya loves lucky numbers very m... | [{"type": "stdin_stdout", "input": "86451 754 85 84\n", "output": "4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 + 1$ cities, number... | [{"type": "stdin_stdout", "input": "2\n6\nLRRRLL\n3\nLRL\n", "output": "\n1 3 2 3 1 3 2\n1 4 1 4\n"}, {"type": "stdin_stdout", "input": "2\n6\nLRRRLL\n3\nLRL\n", "output": "1 3 2 3 1 3 2\n1 4 1 4\n"}, {"type": "stdin_stdout", "input": "2\n6\nLLRRRL\n3\nLRL\n", "output": "1 2 3 2 3 1 3\n1 4 1 4\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\nA permutation is a sequence of $... | [{"type": "stdin_stdout", "input": "4\n7\n3 3 4 4 7 7 7\n4\n1 2 3 4\n7\n3 4 5 5 5 7 7\n1\n1\n", "output": "\n3 1 4 2 7 5 6 \n3 2 4 1 7 6 5 \n1 2 3 4 \n1 2 3 4 \n3 4 5 1 2 7 6 \n3 4 5 2 1 7 6 \n1 \n1 \n"}, {"type": "stdin_stdout", "input": "4\n7\n3 3 4 4 7 7 7\n4\n1 2 3 4\n7\n3 4 5 5 5 7 7\n1\n1\n", "output": "3 1 4 2 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\nIt's been a tough week at work a... | [{"input": "\"23:57\"", "output": "[358]", "fn_name": "bus_timer"}, {"input": "\"00:00\"", "output": "[355]", "fn_name": "bus_timer"}, {"input": "\"10:00\"", "output": "[10]", "fn_name": "bus_timer"}, {"input": "\"10:45\"", "output": "[10]", "fn_name": "bus_timer"}, {"input": "\"05:10\"", "output": "[45]", "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\n## Your Job\n\n Find the sum of... | [{"input": "123\n4567", "output": "[86469]", "fn_name": "sum_mul"}, {"input": "4\n-7", "output": "[\"INVALID\"]", "fn_name": "sum_mul"}, {"input": "-7\n4", "output": "[\"INVALID\"]", "fn_name": "sum_mul"}, {"input": "0\n2", "output": "[\"INVALID\"]", "fn_name": "sum_mul"}, {"input": "2\n0", "output": "[\"INVALID\"]", "... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\n\"The Chamber of Secrets has bee... | [{"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\nWe have a sequence of k numbers:... | [{"type": "stdin_stdout", "input": "7 3\n27 18 28 18 28 46 1000000000\n1000000000 1 7\n1000000000 2 10\n1000000000 3 12\n", "output": "224489796\n214285714\n559523809\n"}, {"type": "stdin_stdout", "input": "7 3\n27 18 15 18 28 73 1000000000\n1000000010 1 13\n1000000000 2 10\n1000010000 2 12", "output": "615384622\n3000... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nMisha and Grisha are funny boys,... | [{"type": "stdin_stdout", "input": "5 20\n5 5 1 4\n1 4 3\n2 4 1\n1 5 5\n5 1 4\n5 1 5\n1 5 5\n5 4 4\n2 3 3\n4 4 1\n1 4 1\n4 5 4\n1 4 5\n4 1 5\n2 4 2\n4 3 3\n2 5 5\n1 5 4\n3 3 4\n5 5 1\n3 4 1\n", "output": "3\n3\n3\n2\n3\n3\n2\n3\n2\n2\n2\n2\n2\n3\n3\n2\n2\n3\n3\n3\n"}, {"type": "stdin_stdout", "input": "5 20\n4 1 1 4\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nIn 20XX, the Aizu Chuo Road, whi... | [{"type": "stdin_stdout", "input": "2\n17 24\n4\n17 45\n2\n17 25\n7\n-1 35\n0", "output": "250\n1500\n"}, {"type": "stdin_stdout", "input": "2\n13 25\n6\n17 14\n4\n17 25\n7\n1 10\n0", "output": "1150\n1300\n"}, {"type": "stdin_stdout", "input": "2\n17 25\n4\n17 45\n4\n17 19\n7\n19 35\n0", "output": "250\n1300\n"}, {"ty... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nNate U. Smith runs a railroad co... | [{"type": "stdin_stdout", "input": "2\n-10 1 10 1\n4\n-6 2 -2 -2 1 1\n-6 -2 -2 2 1 0\n12 2 1 -2 0 0\n11 -2 2 2 1 1\n8 12 -7 -3\n8\n4 -5 4 -2 1 2\n4 -2 4 9 1 0\n6 9 6 14 1 1\n-5 6 7 6 0 0\n1 0 1 10 0 0\n-5 0 -5 10 0 1\n-7 -1 7 0 0 1\n-1 -1 -1 -3 0 1", "output": "2\n3\n"}, {"type": "stdin_stdout", "input": "2\n-10 2 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\nThere is Kannon-do in the mounta... | [{"type": "stdin_stdout", "input": "1\n1\n30\n27\n0", "output": "1\n1\n14740\n2369\n"}, {"type": "stdin_stdout", "input": "1\n17\n28\n27\n0", "output": "1\n6\n4357\n2369\n"}, {"type": "stdin_stdout", "input": "1\n1\n30\n25\n0", "output": "1\n1\n14740\n701\n"}, {"type": "stdin_stdout", "input": "1\n17\n28\n24\n0", "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\nProblem\n\nThere is a grid of $ ... | [{"type": "stdin_stdout", "input": "421 435 361 230 182 16", "output": "196 792283366\n"}, {"type": "stdin_stdout", "input": "421 547 377 188 235 13", "output": "156 501147202\n"}, {"type": "stdin_stdout", "input": "421 435 196 169 388 12", "output": "46 766230083\n"}, {"type": "stdin_stdout", "input": "421 435 196 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\nAs the guys fried the radio stat... | [{"type": "stdin_stdout", "input": "10 10\nittmcs 112.147.123.173\njkt 228.40.73.178\nfwckqtz 88.28.31.198\nkal 224.226.34.213\nnacuyokm 49.57.13.44\nfouynv 243.18.250.17\ns 45.248.83.247\ne 75.69.23.169\nauwoqlch 100.44.219.187\nlkldjq 46.123.169.140\ngjcylatwzi 46.123.169.140;\ndxfi 88.28.31.198;\ngv 46.123.169.140;\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSome number of people (this numb... | [{"type": "stdin_stdout", "input": "7\n6 4 4\n2 3 0\n0 4 10\n5 3 4\n1 3 2\n4 5 12\n4 3 2\n", "output": "-1\n-1\n-1\n-1\n4\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "7\n6 2 4\n2 3 0\n2 4 10\n5 3 4\n1 3 2\n2 5 8\n4 3 2\n", "output": "8\n-1\n-1\n-1\n4\n-1\n-1\n"}, {"type": "stdin_stdout", "input": "7\n6 2 4\n2 3 1\n2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nR3D3 spent some time on an inter... | [{"type": "stdin_stdout", "input": "100000000 100000000 100000000\n", "output": "266578227200000000\n"}, {"type": "stdin_stdout", "input": "100000000 100000000 100000000\n", "output": "266578227200000000\n"}, {"type": "stdin_stdout", "input": "100000000 100000010 100000000\n", "output": "266578239852872360\n"}, {"type"... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given two strings $s$ an... | [{"type": "stdin_stdout", "input": "12\nlylfekzszgqx\noewrpuflwlir\n", "output": "nbqykcppkvzu\n"}, {"type": "stdin_stdout", "input": "12\nlylfekzszgqx\noewrpuflwril\n", "output": "nbqykcppkyzr\n"}, {"type": "stdin_stdout", "input": "12\nlylfekzszgqx\noewrpuflwlir\n", "output": "nbqykcppkvzu"}, {"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\nProblem\n\nFind the angle betwee... | [{"type": "stdin_stdout", "input": "20\n594", "output": "127.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n704", "output": "182.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n682", "output": "171.0000000000\n"}, {"type": "stdin_stdout", "input": "20\n253", "output": "316.5000000000\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\nTakahashi has a water bottle wit... | [{"type": "stdin_stdout", "input": "100 100 1000000\n", "output": "0.0000000000\n"}, {"type": "stdin_stdout", "input": "82 84 416241\n", "output": "28.3216596827\n"}, {"type": "stdin_stdout", "input": "22 75 24126\n", "output": "66.3790171829\n"}, {"type": "stdin_stdout", "input": "45 72 83481\n", "output": "53.8288157... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLet's call an integer array $a_1... | [{"type": "stdin_stdout", "input": "10\n20000 -431912570 597469643\n20000 -13928452 414987414\n20000 -472808872 367983694\n20000 -84913058 517394906\n20000 -514402152 597357115\n20000 -720971736 526102810\n20000 -416160739 748291750\n20000 -665939649 743938438\n20000 -80741314 634025883\n20000 -824743396 138091345\n", ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given a text consisting ... | [{"type": "stdin_stdout", "input": "4\n13 11 15 15\nto be or not to be that is the question\nwhether tis nobler in the mind to suffer\nthe slings and arrows of outrageous fortune\nor to take arms against a sea of troubles\n", "output": "YES\n"}, {"type": "stdin_stdout", "input": "4\n13 11 15 15\nto be or not to be that... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# altERnaTIng cAsE <=> ALTerNAti... | [{"input": "\"String.prototype.toAlternatingCase\"", "output": "[\"sTRING.PROTOTYPE.TOaLTERNATINGcASE\"]", "fn_name": "to_alternating_case"}, {"input": "\"hello world\"", "output": "[\"HELLO WORLD\"]", "fn_name": "to_alternating_case"}, {"input": "\"HELLO WORLD\"", "output": "[\"hello world\"]", "fn_name": "to_alternat... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe goal of this Kata is to redu... | [{"input": "9889345778311094737448", "output": "[2]", "fn_name": "single_digit"}, {"input": "10000000000", "output": "[3]", "fn_name": "single_digit"}, {"input": "1234444123", "output": "[1]", "fn_name": "single_digit"}, {"input": "565656565", "output": "[3]", "fn_name": "single_digit"}, {"input": "234234235", "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\nPasha has recently bought a new ... | [{"type": "stdin_stdout", "input": "100 1\n5 3 1 5 6 2 4 8 3 3 1 1 2 8 2 3 8 2 5 2 6 2 3 5 2 1 2 1 2 8 4 3 3 5 1 4 2 2 2 5 8 2 2 6 2 9 3 4 1 8 1 5 5 6 6 2 2 7 3 3 4 2 4 1 2 6 6 4 9 4 3 2 3 8 2 3 1 4 1 4 1 3 5 3 5 5 2 3 4 1 1 8 1 5 6 9 4 2 5 1\n6 0 4 5 3 1 0 7 5 3 5 4 5 4 0 2 1 6 2 2 4 3 1 9 5 9 2 2 6 8 6 5 9 6 4 9 9 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\nIn this problem, a date is writt... | [{"type": "stdin_stdout", "input": "11 17\n11 122", "output": "0\n"}, {"type": "stdin_stdout", "input": "11 11\n11 101", "output": "0\n"}, {"type": "stdin_stdout", "input": "11 17\n11 17", "output": "0\n"}, {"type": "stdin_stdout", "input": "11 16\n11 28", "output": "0\n"}, {"type": "stdin_stdout", "input": "11 24\n11 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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$ students standing ... | [{"type": "stdin_stdout", "input": "5\n4\n1 2 3 4\n3\n1 3 2\n5\n1 2 3 5 4\n1\n1\n5\n3 2 1 5 4\n", "output": "YES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "5\n4\n1 2 3 4\n3\n1 3 2\n5\n1 2 3 5 4\n1\n1\n5\n3 2 1 5 4\n", "output": "YES\nYES\nNO\nYES\nYES\n"}, {"type": "stdin_stdout", "input": "1\n12\n12 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\nMemory is performing a walk on t... | [{"type": "stdin_stdout", "input": "RDDLLDLUUUDDRDRURLUUURLLDDLRLUURRLLRRLDRLLUDRLRULLDLRRLRLRLRUDUUDLULURLLDUURULURLLRRRURRRDRUUDLDRLRDRLRRDDLDLDLLUDRUDRLLLLDRDUULRUURRDLULLULDUDULRURRDDDLLUDRLUDDLDDDRRDDDULLLLDLDRLRRLRRDDRLULURRUDRDUUUULDURUDRDLDDUDUDRRURDULRRUDRLRRDLUURURDLDRLRDUDDDLDDDURURLUULRDUUULRURUDUDRRUDULLLU... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 have a lot of friends. Every f... | [{"type": "stdin_stdout", "input": "6 50\n10\n30\n13\n18\n12\n16", "output": "15\n"}, {"type": "stdin_stdout", "input": "6 37\n6\n16\n13\n18\n12\n16", "output": "10\n"}, {"type": "stdin_stdout", "input": "6 50\n6\n16\n13\n18\n12\n16", "output": "12\n"}, {"type": "stdin_stdout", "input": "6 37\n5\n16\n13\n18\n26\n33", "... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 end of the school year is ne... | [{"type": "stdin_stdout", "input": "50 50\n374 573 323 744 190 806 485 247 628 336 491 606 702 321 991 678 337 579 86 240 993 208 668 686 855 205 363 177 719 249 896 919 782 434 59 647 787 996 286 216 636 212 546 903 958 559 544 126 608 993\n", "output": "937\n"}, {"type": "stdin_stdout", "input": "50 50\n374 573 323 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\nIn the year 2xxx, an expedition ... | [{"type": "stdin_stdout", "input": "3\n95 20 180 18\n125 20 185 18\n40 26 195 10\n1\n6 5 5 4\n2\n5 5 5 4\n5 10 5 2\n2\n5 5 11 6\n0 7 5 3\n16\n2338 3465 29034 1351\n1571 14389 25019 842\n1706 8015 21355 1155\n1899 4359 33815 888\n2160 10364 20511 2353\n333 8835 6587 63\n2598 3176 23679 618\n1613 14217 8003 1505\n3140 47... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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're given an array $a_1, \\ld... | [{"type": "stdin_stdout", "input": "10\n1\n248618\n3\n23 21 11\n6\n110 11 15 10 1 14\n4\n0 2 1 0\n2\n0 0\n2\n0 1\n2\n1 0\n2\n1 0\n3\n0 1 0\n3\n1 0 1\n", "output": "YES\nYES\nYES\nYES\nNO\nYES\nYES\nYES\nYES\nNO\n"}, {"type": "stdin_stdout", "input": "10\n1\n248618\n3\n23 21 11\n6\n110 11 15 0 1 14\n4\n0 2 1 0\n2\n0 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\nAre you going to Scarborough Fai... | [{"type": "stdin_stdout", "input": "67 39\nacbcbccccbabaabcabcaaaaaaccbcbbcbaaaacbbcccbcbabbcacccbbabbabbabaac\n4 36 a b\n25 38 a a\n3 44 b c\n35 57 b a\n4 8 a c\n20 67 c a\n30 66 b b\n27 40 a a\n2 56 a b\n10 47 c a\n22 65 c b\n29 42 a b\n1 46 c b\n57 64 b c\n20 29 b a\n14 51 c a\n12 55 b b\n20 20 a c\n2 57 c a\n22 60 ... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou will be given an integer a a... | [{"type": "stdin_stdout", "input": "4999\nzzzzzzzzzz\n", "output": "zzzzzzzzzz\n"}, {"type": "stdin_stdout", "input": "4998\nrainbow\n", "output": "rainbow\n"}, {"type": "stdin_stdout", "input": "3201\npurple\n", "output": "purple\n"}, {"type": "stdin_stdout", "input": "3200\npink\n", "output": "pink\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\nThe secret organization AiZu Ana... | [{"type": "stdin_stdout", "input": "100\n3 -1 100 3\n-1\n2 4 3", "output": "1\n"}, {"type": "stdin_stdout", "input": "100\n3 0 001 4\n-2\n2 10 3", "output": "2\n"}, {"type": "stdin_stdout", "input": "100\n3 0 001 4\n-3\n2 10 3", "output": "2\n"}, {"type": "stdin_stdout", "input": "100\n3 -1 100 3\n-1\n2 6 3", "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**An [isogram](https://en.wikipe... | [{"input": "\"Hjelmqvist-Gryb-Zock-Pfund-Wax\"", "output": "[true]", "fn_name": "is_isogram"}, {"input": "\"Emily Jung Schwartzkopf\"", "output": "[true]", "fn_name": "is_isogram"}, {"input": "\"thumbscrew-japingly\"", "output": "[true]", "fn_name": "is_isogram"}, {"input": "\"subdermatoglyphic\"", "output": "[true]", ... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is a harder version of the ... | [{"type": "stdin_stdout", "input": "500\n)))())(())((()))()((())())((()))()()(()(()))((()))(()()())()(())()()()(()()(()))((()))(((()))()())()((()))()()(()()(()())())(((()))()())(()())(()()(())())()((()))()()((())())(())()()()()()()(())()()(()())(((())))(()())((()))()((()))()(((()())))()(()(())())()(()())(()())(())((())... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nLittle Johnny has recently learn... | [{"type": "stdin_stdout", "input": "2000\n", "output": "323848720\n"}, {"type": "stdin_stdout", "input": "4000\n", "output": "341934157\n"}, {"type": "stdin_stdout", "input": "2345\n", "output": "832335061\n"}, {"type": "stdin_stdout", "input": "2500\n", "output": "544067513\n"}, {"type": "stdin_stdout", "input": "2780... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 beta testing the new sec... | [{"type": "stdin_stdout", "input": "38 1\n2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999 2 999999999\n7 2\n", "output": "1999999994\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\nThere is a square field of size ... | [{"type": "stdin_stdout", "input": "6\n4\n..*.\n....\n*...\n....\n2\n*.\n.*\n2\n.*\n.*\n3\n*.*\n...\n...\n5\n.....\n..*..\n.....\n.*...\n.....\n4\n....\n....\n*...\n*...\n", "output": "\n*.*.\n....\n*.*.\n....\n**\n**\n**\n**\n*.*\n*.*\n...\n.....\n.**..\n.....\n.**..\n.....\n....\n....\n**..\n**..\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\nAnchored Balloon\n\nA balloon pl... | [{"type": "stdin_stdout", "input": "3\n10 10 20\n10 -10 25\n-10 10 120\n1\n10 10 16\n2\n10 10 20\n10 -10 20\n2\n100 0 101\n-90 0 91\n2\n0 0 53\n40 40 102\n3\n10 10 20\n10 -10 20\n-10 -10 20\n3\n1 5 13\n5 -3 13\n-3 -2 13\n3\n98 97 168\n-82 -80 193\n-170 -160 211\n4\n90 -100 160\n-80 -80 150\n90 137 150\n80 80 245\n4\n85... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 numbers of all offices in th... | [{"type": "stdin_stdout", "input": "55\n", "output": "72057594037927934\n"}, {"type": "stdin_stdout", "input": "54\n", "output": "36028797018963966\n"}, {"type": "stdin_stdout", "input": "54\n", "output": "36028797018963966"}, {"type": "stdin_stdout", "input": "55\n", "output": "72057594037927934"}, {"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\nYou are given an array $a$ consi... | [{"type": "stdin_stdout", "input": "5\n4\n1 2 3 4\n7\n4 8 3 16 4 10 2\n3\n0 1 1\n7\n1 3 1 4 5 3 2\n5\n5 3 3 2 5\n", "output": "0\n4\n0\n2\n3\n"}, {"type": "stdin_stdout", "input": "5\n4\n1 2 3 4\n7\n13 3 4 8 4 5 2\n3\n1 1 1\n7\n1 3 1 7 5 0 2\n5\n5 4 3 2 3\n", "output": "0\n4\n0\n5\n3\n"}, {"type": "stdin_stdout", "inpu... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThis is the hard version of the ... | [{"type": "stdin_stdout", "input": "5\n2 0\n1 2\n2 1\n1 2\n1 2\n2 1\n2 1\n1 2\n3 9\n1 2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n1 2\n1 3\n2 3\n3 0\n3 2 1\n", "output": "2\n2\n2\n2\n2\n3\n4\n4\n3\n3\n3\n3\n4\n4\n3\n3\n"}, {"type": "stdin_stdout", "input": "5\n2 0\n1 2\n2 1\n1 2\n1 2\n2 1\n2 1\n1 2\n3 9\n1 2 3\n1 2\n1 3\n2 3\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\nG --Derangement / Derangement\n\... | [{"type": "stdin_stdout", "input": "5\n4 0 0 10 12", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n4 1 0 10 12", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n4 1 0 10 19", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n4 1 0 10 38", "output": "0\n"}, {"type": "stdin_stdout", "input": "5\n4... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nSnuke received a triangle as a b... | [{"type": "stdin_stdout", "input": "-1 -1\n1 1\n2 0", "output": "0.402627528107\n"}, {"type": "stdin_stdout", "input": "3 -1\n2 5\n1 16", "output": "0.143556168892\n"}, {"type": "stdin_stdout", "input": "-3 1\n1 1\n2 -1", "output": "0.548232156368\n"}, {"type": "stdin_stdout", "input": "6 -2\n2 5\n1 18", "output": "0.9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDefine a cyclic sequence of size... | [{"type": "stdin_stdout", "input": "1\n100\n60 76 89 77 41 81 42 49 39 37 48 56 26 38 85 50 40 13 20 24 79 21 22 9 92 11 45 58 55 62 69 82 97 67 18 32 88 84 19 96 7 36 83 95 52 98 44 53 12 75 90 87 28 3 1 6 15 65 68 94 30 99 78 63 46 86 47 73 72 66 74 80 35 70 51 33 16 93 34 10 23 71 17 5 2 64 43 100 29 8 27 31 14 25 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nFind the number, modulo 99824435... | [{"type": "stdin_stdout", "input": "102 205", "output": "214138673\n"}, {"type": "stdin_stdout", "input": "169 205", "output": "909969555\n"}, {"type": "stdin_stdout", "input": "613 159", "output": "832714847\n"}, {"type": "stdin_stdout", "input": "325 205", "output": "688557253\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\nOnce little Vasya read an articl... | [{"type": "stdin_stdout", "input": "hvewdvwdwudrwarwmddwnazmwauzatrmwptwwevavpmwrtruwnpwantewrnwmepdwvtmnveanunrvrtwpvhhnuhnmpptdttzmmndtvudmzhhannmmnahdpzamuvhzaavnhtnumwrwvttdetvuewaaennddwuvzvaptdzrzhtetwwzmzedrwuvrwznprhdvnavrruvvhzuwpdtmpwmzrwvermrhdamv\nuvzhwtpuputnahwwarduzddhpnwwvettprwavdmnztdnrddmarmvuevtdezn... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 pet store on sale there a... | [{"type": "stdin_stdout", "input": "7\n1 1 4 2 3\n0 0 0 0 0\n5 5 0 4 6\n1 1 1 1 1\n50000000 50000000 100000000 100000000 100000000\n0 0 0 100000000 100000000\n1 3 2 2 5\n", "output": "YES\nYES\nNO\nYES\nYES\nNO\nNO\n"}, {"type": "stdin_stdout", "input": "3\n0 0 0 0 0\n2 1 0 2 2\n60 600 609 700 500\n", "output": "YES\nN... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe city administration of IT Ci... | [{"type": "stdin_stdout", "input": "10000 671249297\n", "output": "16096020.300745647400617599487304687500"}, {"type": "stdin_stdout", "input": "10001 671249297\n", "output": "16097629.902775721624493598937988281250"}, {"type": "stdin_stdout", "input": "11001 671249297\n", "output": "17707231.93285028636455535888671875... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 as a gift a very cl... | [{"type": "stdin_stdout", "input": "1000 1000\n162 276\n", "output": "3351.9999999997744\n"}, {"type": "stdin_stdout", "input": "1000 1000\n153 276\n", "output": "3387.9999999997344\n"}, {"type": "stdin_stdout", "input": "1000 1000\n162 234\n", "output": "3351.999999903682\n"}, {"type": "stdin_stdout", "input": "663 90... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nBackground\n----------\nIn anoth... | [{"input": "[[2, 2, 100], [3, 1, 25], [4, 0, 8], [-6, 3, 25], [-1, 2, 80], [8, 0, 12], [-10, 3, 220], [0, 1, 150]]", "output": "[[530, 15664]]", "fn_name": "solomons_quest"}, {"input": "[[3, 2, 80], [1, 1, 25], [6, 0, 8], [-5, 3, 50], [1, 2, 100], [4, 0, 9], [-8, 3, 260], [0, 1, 90]]", "output": "[[-1880, 10368]]", "fn... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEhab is interested in the bitwis... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "20140978692096\n"}, {"type": "stdin_stdout", "input": "1000100000000\n", "output": "20142429742080\n"}, {"type": "stdin_stdout", "input": "1000100000010\n", "output": "20142429742357\n"}, {"type": "stdin_stdout", "input": "1001100000010\n", "output": "201... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDo you like summer? Residents of... | [{"type": "stdin_stdout", "input": "10\n536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132\n", "output": "536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 536259132 "}, {"type": "stdin_stdout", "input": "10\n876584065 876584063 87... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 integer array $... | [{"type": "stdin_stdout", "input": "1\n98 282\n103 948 349 26 241 933 394 546 476 785 441 397 658 308 801 940 760 29 717 343 99 530 389 797 955 322 662 763 654 781 1814 185 622 960 363 84 375 998 331 572 236 837 604 874 376 362 649 482 860 718 54 298 574 1726 16 943 71 292 615 829 460 301 358 245 585 438 24 561 252 416... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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# Write Number in Expanded Form ... | [{"input": "693.230459", "output": "[\"600 + 90 + 3 + 2/10 + 3/100 + 4/10000 + 5/100000 + 9/1000000\"]", "fn_name": "expanded_form"}, {"input": "7.3004", "output": "[\"7 + 3/10 + 4/10000\"]", "fn_name": "expanded_form"}, {"input": "7.304", "output": "[\"7 + 3/10 + 4/1000\"]", "fn_name": "expanded_form"}, {"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\nAn X-layered kagami mochi (X ≥ 1... | [{"type": "stdin_stdout", "input": "7\n50\n30\n50\n100\n50\n80\n30\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "7\n50\n30\n50\n100\n50\n80\n35", "output": "5\n"}, {"type": "stdin_stdout", "input": "7\n50\n40\n91\n110\n50\n34\n59", "output": "6\n"}, {"type": "stdin_stdout", "input": "7\n50\n30\n50\n100\n50\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\nPavel loves grid mazes. A grid m... | [{"type": "stdin_stdout", "input": "19 20 196\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\nIt's holiday. Mashmokh and his b... | [{"type": "stdin_stdout", "input": "16199 5506872\n", "output": "5498774 10997548 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 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\nFor integers b (b \\geq 2) and n... | [{"type": "stdin_stdout", "input": "31415926535\n13", "output": "15707963262\n"}, {"type": "stdin_stdout", "input": "31415926535\n2", "output": "31415926534\n"}, {"type": "stdin_stdout", "input": "31415926535\n4", "output": "31415926532\n"}, {"type": "stdin_stdout", "input": "31415926535\n3", "output": "15707963267\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\nLet's define the permutation of ... | [{"type": "stdin_stdout", "input": "50 20365011074\n", "output": "2 1 4 3 6 5 8 7 10 9 12 11 14 13 16 15 18 17 20 19 22 21 24 23 26 25 28 27 30 29 32 31 34 33 36 35 38 37 40 39 42 41 44 43 46 45 48 47 50 49 "}, {"type": "stdin_stdout", "input": "50 5608642004\n", "output": "1 2 4 3 5 6 8 7 9 10 11 13 12 15 14 17 16 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\nPair of gloves\n=============\n\... | [{"input": "[\"red\", \"green\", \"blue\", \"blue\", \"red\", \"green\", \"red\", \"red\", \"red\"]", "output": "[4]", "fn_name": "number_of_pairs"}, {"input": "[\"gray\", \"black\", \"purple\", \"purple\", \"gray\", \"black\"]", "output": "[3]", "fn_name": "number_of_pairs"}, {"input": "[\"red\", \"green\", \"blue\"]"... | 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\nApparently \"Put A Pillow On You... | [{"input": "[\"yF[CeAAiNihWEmKxJc/NRMVn\", \"rMeIa\\\\KAfbjuLiTnAQxNw[XB\"]", "output": "[true]", "fn_name": "pillow"}, {"input": "[\"\\\\DjQ\\\\[zv]SpG]Z/[Qm\\\\eLL\", \"amwZArsaGRmibriXBgTRZp\"]", "output": "[false]", "fn_name": "pillow"}, {"input": "[\"EvH/KNikBiyxfeyK/miCMj\", \"I/HwjnHlFLlahMOKNadps\"]", "output":... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe aim of the kata is to try to... | [{"input": "1e-06", "output": "[[1000001, 3.1415936536]]", "fn_name": "iter_pi"}, {"input": "0.0001", "output": "[[10000, 3.1414926536]]", "fn_name": "iter_pi"}, {"input": "1e-05", "output": "[[100001, 3.1416026535]]", "fn_name": "iter_pi"}, {"input": "0.001", "output": "[[1000, 3.1405926538]]", "fn_name": "iter_pi"}, ... | 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 a set of integers (it can ... | [{"type": "stdin_stdout", "input": "1\n100\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 9... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDescription\n\nIn 200X, the myst... | [{"type": "stdin_stdout", "input": "3\n0 1 0 1 0 0 0 -1 0 1 0 -1 0\n1 0 0 0 0 0 1 0 0 0 0 0 2\n0 1 1 0 1 1 1 0 1 0 0 5 5\n3 1 1 1 0 1 0 0 1 0 3 -1 1\n1 1 2 7 5 10 20 50 100\n7H 6H 2H 5H 3H\n9S 9C 9H 8H 8D\nKS KH QH JD TS\n10\n1 1 1 1 1 1 1 1 1 0 1 1 1\n0 1 1 1 1 1 1 1 1 1 1 1 1\n1 1 1 1 2 1 1 1 1 1 1 1 0\n1 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\nSummer is coming! It's time for ... | [{"type": "stdin_stdout", "input": "4 5\n22972 40786 3691 85313 46694\n33077 16067 3134 97367 68508\n4250 35501 17327 14435 32518\n64673 65438 56977 123599 27280\n", "output": "753143\n"}, {"type": "stdin_stdout", "input": "4 5\n22972 40786 3691 85313 46694\n33077 16067 3134 97367 129038\n4250 35501 17327 14435 32518\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\n100 years have passed since the ... | [{"type": "stdin_stdout", "input": "68 -9959\n-3666\n-3501\n9169\n5724\n1478\n-643\n-3039\n-5537\n-4295\n-1856\n-6720\n6827\n-39\n-9509\n-7005\n1942\n-5173\n-4564\n2390\n4604\n-6098\n-9847\n-9708\n2382\n7421\n8716\n9718\n9895\n-4553\n-8275\n4771\n1538\n-8131\n9912\n-4334\n-3702\n7035\n-106\n-1298\n-6190\n1321\n332\n767... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nExample\n\nInput\n\n3\nNNN\nNNN\... | [{"type": "stdin_stdout", "input": "3\nNNN\nNNO\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nNMN\nNNO\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nNMN\nNNP\nNNN", "output": "Taro\n"}, {"type": "stdin_stdout", "input": "3\nMMN\nNNO\nNNN", "output": "Taro\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\nRng is baking cookies.\n\nInitia... | [{"type": "stdin_stdout", "input": "1000000000000 1000000100000", "output": "1000000000000\n"}, {"type": "stdin_stdout", "input": "1000010000000 1000100100001", "output": "1000010000000\n"}, {"type": "stdin_stdout", "input": "1000110000000 1000100100001", "output": "1000102100111\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\nYou are given a positive integer... | [{"type": "stdin_stdout", "input": "1000000000000\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "1000000000000\n", "output": "109\n"}, {"type": "stdin_stdout", "input": "999999999992\n", "output": "200\n"}, {"type": "stdin_stdout", "input": "290687942106\n", "output": "153\n"}, {"type": "stdin_stdout", "inp... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYou are given an array of positi... | [{"type": "stdin_stdout", "input": "100 10000000\n300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 300 30... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nDivisors of 42 are : 1, 2, 3, 6,... | [{"input": "5000\n10000", "output": "[[[6237, 45024100], [9799, 96079204], [9855, 113635600]]]", "fn_name": "list_squared"}, {"input": "600\n1500", "output": "[[[728, 722500], [1434, 2856100]]]", "fn_name": "list_squared"}, {"input": "1\n250", "output": "[[[1, 1], [42, 2500], [246, 84100]]]", "fn_name": "list_squared"}... | 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 the judge at a competiti... | [{"input": "[{\"name\": \"Billy The Beast\", \"chickenwings\": 17, \"hamburgers\": 7, \"hotdogs\": 8}, {\"name\": \"Habanero Hillary\", \"chickenwings\": 5, \"hamburgers\": 17, \"hotdogs\": 11}, {\"name\": \"Joey Jaws\", \"chickenwings\": 8, \"hamburgers\": 8, \"hotdogs\": 15}, {\"name\": \"Big Bob\", \"chickenwings\":... | 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 a program you want... | [{"type": "stdin_stdout", "input": "10 39\n0 1 0 1 0 1 1 0 1 1\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n3 4\n3 6\n3 7\n3 8\n3 9\n4 5\n4 6\n4 7\n4 9\n5 6\n5 7\n5 8\n5 9\n6 8\n6 9\n7 8\n7 9\n8 9\n", "output": "4\n"}, {"type": "stdin_stdout", "input": "10 39... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 n, find... | [{"type": "stdin_stdout", "input": "100000 10\n", "output": "2 2 2 2 2 5 5 5 5 5\n"}, {"type": "stdin_stdout", "input": "2048 11\n", "output": "2 2 2 2 2 2 2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "1024 10\n", "output": "2 2 2 2 2 2 2 2 2 2\n"}, {"type": "stdin_stdout", "input": "100000 8\n", "output": "2 2 2 2... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nEmail address in Berland is a st... | [{"type": "stdin_stdout", "input": "c@ir@xf@ap@fk@sp@wm@ec@qw@vg@by@iu@tr@wu@pv@lj@dd@tc@qj@ok@hm@bs@ul@ez@cg@ht@xf@ag@tr@hz@ap@tx@ly@dg@hu@nd@uv@il@ii@cn@nc@nb@cy@kp@dk@xa@da@ta@yr@yv@qg@db@je@wz@rn@yh@xi@mj@kc@uj@yu@cf@ps@ao@fo@le@d\n", "output": "c@i,r@x,f@a,p@f,k@s,p@w,m@e,c@q,w@v,g@b,y@i,u@t,r@w,u@p,v@l,j@d,d@t,c@... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 Russ... | [{"type": "stdin_stdout", "input": "1\n6 1\n0 12 11\n7 5 10\n7", "output": "19\n"}, {"type": "stdin_stdout", "input": "1\n6 1\n0 10 11\n7 5 10\n7", "output": "18\n"}, {"type": "stdin_stdout", "input": "1\n10 1\n1 5 -1\n6 -1 2\n1", "output": "-2\n"}, {"type": "stdin_stdout", "input": "1\n10 1\n1 5 -2\n6 -1 2\n1", "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\nPete and his mate Phil are out i... | [{"input": "[[{\"P1\": \"XX\", \"P2\": \"XO\"}, false], [{\"P1\": \"OX\", \"P2\": \"XX\"}, false], [{\"P1\": \"OO\", \"P2\": \"XX\"}, true]]", "output": "[\"Phil Wins!\"]", "fn_name": "shoot"}, {"input": "[[{\"P1\": \"XX\", \"P2\": \"XO\"}, true], [{\"P1\": \"OX\", \"P2\": \"OO\"}, false], [{\"P1\": \"XX\", \"P2\": \"O... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThe game of billiards involves t... | [{"type": "stdin_stdout", "input": "5\n140 82\n141 134\n90 110\n339 106\n88 90", "output": "1 278\n"}, {"type": "stdin_stdout", "input": "5\n140 82\n176 134\n90 110\n289 106\n88 90", "output": "1 263\n"}, {"type": "stdin_stdout", "input": "5\n140 147\n141 71\n172 110\n339 30\n40 90", "output": "1 434\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\nAka Beko, trying to escape from ... | [{"type": "stdin_stdout", "input": "0100\n0101\n10100\n10000\n0101011\n1011\n011111\n#", "output": "Yes\nNo\nYes\nNo\nYes\nYes\nYes\n"}, {"type": "stdin_stdout", "input": "0100\n0100\n10100\n10000\n0101011\n1001\n011111\n#", "output": "Yes\nYes\nYes\nNo\nYes\nNo\nYes\n"}, {"type": "stdin_stdout", "input": "0100\n0100\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\nA positive integer may be expres... | [{"type": "stdin_stdout", "input": "24 3\n24 2\n2 1\n1 1\n4 2\n18 3\n17 1\n17 3\n17 4\n110 5\n1000 10\n1120 14\n0 0", "output": "2\n3\n1\n0\n0\n2\n1\n0\n1\n79\n200102899\n2079324314\n"}, {"type": "stdin_stdout", "input": "24 3\n24 2\n2 1\n1 1\n4 2\n33 3\n17 1\n17 3\n17 4\n100 5\n1000 10\n1120 14\n0 0", "output": "2\n3\... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere are n walruses standing in... | [{"type": "stdin_stdout", "input": "15\n18 6 18 21 14 20 13 9 18 20 28 13 19 25 21\n", "output": "10 -1 8 8 6 6 0 -1 2 2 3 -1 -1 0 -1 "}, {"type": "stdin_stdout", "input": "15\n14 4 5 12 6 19 14 19 12 22 23 17 14 21 27\n", "output": "7 -1 -1 0 -1 6 1 4 -1 3 2 0 -1 -1 -1 "}, {"type": "stdin_stdout", "input": "15\n14 4 5... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nYour aged grandfather is tragica... | [{"input": "109.1", "output": "[\"X-----------------------------------------------------XX-----------------------------------------------------X\\n-X----------------------------------------------------XX----------------------------------------------------X-\\n--X---------------------------------------------------XX----... | 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 circle $A$ with ra... | [{"type": "stdin_stdout", "input": "2\n1.3018830993798196 1.1804991696233216 6.678597997840617 2.1321559253491804 2.072303142011048 4.898405435743801\n1.6154186783950772 0.39921226227011497 2.512872370263131 5.273208013897418 2.169775861927481 3.924014997809771", "output": "2\n1\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\nUser ainta has a stack of n red ... | [{"type": "stdin_stdout", "input": "50\nBRRRBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842609\n"}, {"type": "stdin_stdout", "input": "50\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n", "output": "1125899906842623\n"}, {"type": "stdin_stdout", "input": "50\nBBBBBBBBBBBBBBBBBBBBBBBBBB... | code_stdio |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate 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 trick of fate caused Hatsumi a... | [{"type": "stdin_stdout", "input": "1505 13 9\n2619 11 3", "output": "1114\n"}, {"type": "stdin_stdout", "input": "2137 -1 28\n1419 -2 1", "output": "719\n"}, {"type": "stdin_stdout", "input": "2137 -1 28\n1818 -1 1", "output": "320\n"}, {"type": "stdin_stdout", "input": "2137 -1 28\n3039 -1 1", "output": "902\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\nBetter things, cheaper. There is... | [{"type": "stdin_stdout", "input": "6 5\n1 1 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . - . . .\n5\n0 50 5 10\n1 20 0 10\n2 10 5 15\n3 150 3 10\n4 100 8 9\n0 0", "output": "330\n"}, {"type": "stdin_stdout", "input": "6 5\n1 0 . 0 0 4\n1 . . . . .\n. . 2 2 . .\n. . 2 2 3 3\nP . . . . .\n5\n0 50 8 10\n1 20 0 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\nCreate a function that takes an ... | [{"input": "\"i First need Thing In coffee The Morning\"", "output": "[\"First Thing In The Morning i need coffee\"]", "fn_name": "capitals_first"}, {"input": "\"Life gets Sometimes pretty !Hard\"", "output": "[\"Life Sometimes gets pretty\"]", "fn_name": "capitals_first"}, {"input": "\"sense Does to That Make you?\"",... | code_functional |
[
{
"content": "You are an expert Python programmer. You will be given a question (problem specification) and will generate a correct Python program that matches the specification and passes all tests.\n\nSolve the following coding problem using the programming language python:\n\nThere is a grid, consisting of n... | [{"type": "stdin_stdout", "input": "1\n3 31\n############################..#\n.............................L.\n############################..#\n", "output": "############################++#\n+++++++++++++++++++++++++++++L+\n############################++#\n"}, {"type": "stdin_stdout", "input": "1\n3 31\n###############... | code_stdio |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.